:root {
  --ink: #36261d;
  --muted: #8a7566;
  --soft: #f4eee7;
  --paper: #fffaf5;
  --line: #e4dace;
  --sage: #c7af95;
  --sage-dark: #9c5a20;
  --rose: #c18170;
  --clay: #9c5a20;
  --gold: #c7af95;
  --mint: #eaded3;
  --blue: #f1ddd7;
  --shadow: 0 18px 45px rgba(54, 38, 29, 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(228, 218, 206, 0.88), transparent 36%),
    linear-gradient(315deg, rgba(193, 129, 112, 0.2), transparent 40%),
    var(--soft);
  color: var(--ink);
  font-family: Montserrat, system-ui, sans-serif;
  letter-spacing: 0;
}

html:has(body.donavila-system-page),
body.donavila-system-page {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  min-height: 100vh !important;
  overflow-x: hidden !important;
  background: #faf9f8 !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

#donavila-system {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh;
  overflow: auto !important;
  background:
    linear-gradient(135deg, rgba(228, 218, 206, 0.88), transparent 36%),
    linear-gradient(315deg, rgba(193, 129, 112, 0.2), transparent 40%),
    var(--soft);
}

#donavila-system,
#donavila-system * {
  font-family: Montserrat, system-ui, sans-serif !important;
}

body.donavila-system-page #donavila-system {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  overflow: auto !important;
}

body.donavila-system-page .elementor,
body.donavila-system-page [data-elementor-type="wp-page"],
body.donavila-system-page .elementor-section-wrap,
body.donavila-system-page .elementor-element,
body.donavila-system-page .e-con,
body.donavila-system-page .elementor-widget,
body.donavila-system-page .elementor-widget-container,
body.donavila-system-page .elementor-shortcode,
body.donavila-system-page .hostinger-elementor-aos {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  width: 100% !important;
  min-height: 0 !important;
  transform: none !important;
}

body.donavila-system-page .wp-site-blocks > header,
body.donavila-system-page .wp-site-blocks > .wp-block-group:first-child:not(:has(#donavila-system)),
body.donavila-system-page #wpadminbar,
body.donavila-system-page header.wp-block-template-part,
body.donavila-system-page .site-header,
body.donavila-system-page .site-branding,
body.donavila-system-page .entry-header,
body.donavila-system-page .page-header,
body.donavila-system-page #masthead,
body.donavila-system-page #site-header,
body.donavila-system-page .wp-block-template-part:first-child,
body.donavila-system-page .wp-block-site-title,
body.donavila-system-page .wp-block-site-logo,
body.donavila-system-page .wp-block-navigation,
body.donavila-system-page .elementor-location-header,
body.donavila-system-page [data-elementor-type="header"],
body.donavila-system-page .hfe-header,
body.donavila-system-page .whb-header,
body.donavila-system-page .main-header,
body.donavila-system-page .header,
body.donavila-system-page nav[aria-label="Menu"],
body.donavila-system-page nav[aria-label="Navigation"] {
  display: none !important;
}

html:has(body.donavila-system-page) {
  margin-top: 0 !important;
}

body.donavila-system-page .wp-site-blocks > footer,
body.donavila-system-page footer.wp-block-template-part,
body.donavila-system-page .site-footer,
body.donavila-system-page .wp-block-template-part:has(footer),
body.donavila-system-page #colophon,
body.donavila-system-page footer {
  display: none !important;
}

body.donavila-system-page .wp-site-blocks,
body.donavila-system-page main,
body.donavila-system-page .entry-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.donavila-system-page .entry-title,
body.donavila-system-page .page-title,
body.donavila-system-page .wp-block-post-title,
body.donavila-system-page h1.entry-title,
body.donavila-system-page h1.page-title,
body.donavila-system-page .elementor-heading-title,
body.donavila-system-page [data-elementor-type="wp-page"] > h1,
body.donavila-system-page main > h1:first-child {
  display: none !important;
}

#donavila-system .donavila-userbar {
  min-height: 42px;
  padding: 8px 26px;
  background: var(--sage-dark);
  color: #fffdf8;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  font-size: 0.82rem;
}

#donavila-system .donavila-userbar a {
  color: #fffdf8;
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

#donavila-system .donavila-login-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--sage-dark);
  font-weight: 800;
  text-decoration: none;
}

#donavila-system .donavila-logout-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

#donavila-system .login-form,
#donavila-system #loginform {
  display: grid;
  gap: 25px;
}

#donavila-system #loginform p {
  margin: 0;
  text-align: left;
}

#donavila-system #loginform label {
  display: grid;
  gap: 10px;
  color: #111111;
  font-size: 0.88rem;
  font-weight: 600;
}

#donavila-system #loginform input[type="text"],
#donavila-system #loginform input[type="password"] {
  width: 100%;
  min-height: 37px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fffdfb;
  color: var(--ink);
  padding: 0 13px;
  box-shadow: inset 0 1px 1px rgba(54, 38, 29, 0.03);
}

#donavila-system #loginform input[type="submit"],
#donavila-system #loginform button[type="submit"] {
  width: 100%;
  min-height: 37px;
  border: 0;
  border-radius: 9px;
  background: var(--sage-dark);
  color: #fffdf8;
  font-weight: 800;
  cursor: pointer;
  margin-top: 9px;
}

#donavila-system .login-remember label {
  display: none;
}

#donavila-system .login-remember input {
  display: none;
}

#donavila-system .login-remember {
  display: none;
}

#donavila-system .login-back-link {
  display: none;
  margin-top: 27px;
  color: var(--sage-dark);
  font-size: 0.91rem;
  font-weight: 500;
  text-decoration: none;
}

#donavila-system .login-card a[href*="wp-login.php"],
#donavila-system .login-card a[href*="lostpassword"],
#donavila-system .login-card a[href*="action=lostpassword"],
#donavila-system .login-card .backtoblog,
#donavila-system .login-card #backtoblog,
#donavila-system .login-card .privacy-policy-page-link {
  display: none !important;
}

#donavila-system .login-arrow {
  display: none !important;
}

#donavila-system #wp-submit::before,
#donavila-system #loginform button[type="submit"]::before,
#donavila-system #loginform input[type="submit"]::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: -3px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 3h4v18h-4v-2h2V5h-2V3Zm-4.7 4.3L15 12l-4.7 4.7-1.4-1.4 2.3-2.3H3v-2h8.2L8.9 8.7l1.4-1.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 3h4v18h-4v-2h2V5h-2V3Zm-4.7 4.3L15 12l-4.7 4.7-1.4-1.4 2.3-2.3H3v-2h8.2L8.9 8.7l1.4-1.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

#donavila-system .login-arrow svg {
  display: none !important;
}

/*
#donavila-system .login-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  width: 17px;
  height: 17px;
  transform: translateY(3px);
}

#donavila-system .login-arrow svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
*/

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-shell.is-locked {
  display: none;
}

#donavila-system .donavila-userbar,
#donavila-system .login-strip,
#donavila-system .access-levels {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  padding: 28px;
  display: grid;
  place-items: center;
  background: #faf9f8;
}

.login-card {
  width: min(448px, calc(100vw - 32px));
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fffdfb;
  box-shadow: 0 18px 34px rgba(54, 38, 29, 0.15);
  padding: 31px 32px 34px;
  backdrop-filter: none;
  text-align: center;
}

.login-brand {
  width: min(280px, 80%);
  margin: 0 auto 26px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.login-logo-wrap {
  width: min(260px, 78%);
  margin: 0 auto 26px;
  padding: 0;
  border: 0;
  background: transparent !important;
  box-shadow: none !important;
  display: block !important;
  visibility: visible !important;
}

.login-logo {
  display: block !important;
  width: 100%;
  height: auto;
  max-height: 120px;
  object-fit: contain;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  visibility: visible !important;
}

.donavila-logo-text {
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.login-card h1 {
  display: none !important;
}

.login-subtitle,
.login-copy {
  display: none !important;
}

.login-form {
  display: grid;
  gap: 13px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.login-form input,
.login-form select {
  width: 100%;
  min-height: 46px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  padding: 0 12px;
}

.login-form .primary-button {
  min-height: 48px;
  margin-top: 4px;
}

.login-hint {
  display: block;
  margin-top: 16px;
  color: var(--muted);
}

.sidebar {
  position: sticky;
  top: 0;
  min-height: 72px;
  padding: 10px 24px;
  background: rgba(255, 252, 248, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 20;
}

.sidebar-panel,
.login-strip,
.panel,
.table-panel,
.metric-card,
.hero-dashboard {
  border: 1px solid rgba(229, 221, 210, 0.9);
  background: rgba(255, 252, 248, 0.78);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  flex: 0 0 auto;
  width: 148px;
  min-height: 46px;
  margin-left: 46px;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
}

.brand-wordmark {
  width: 100%;
  text-align: center;
  color: var(--ink);
}

.brand-wordmark strong {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.05;
}

.brand-wordmark small {
  display: block;
  margin-top: 5px;
  color: var(--sage-dark);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.brand-logo {
  width: 100%;
  max-width: 128px;
  height: auto;
  display: block !important;
  visibility: visible !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--sage-dark), var(--rose));
  color: #fffaf4;
  font-family: Montserrat, system-ui, sans-serif;
  font-size: 25px;
}

.brand strong,
.hero-stat strong,
.metric-card strong {
  display: block;
}

.brand small,
.sidebar-panel small,
.login-strip small,
.metric-card small,
.hero-stat small,
.client-card small,
.service-card small,
.team-card small {
  color: var(--muted);
}

.nav-list {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.nav-item {
  width: auto;
  min-height: 36px;
  padding: 0 11px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 700;
  font-size: 0.88rem;
  text-align: center;
  white-space: nowrap;
}

.nav-item span {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  color: currentColor;
}

.nav-item svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item.active,
.nav-item:hover {
  background: #efe2d7;
  color: var(--ink);
}

.sidebar-panel {
  flex: 0 0 auto;
  margin-top: 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: 230px;
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: #5b9a74;
  box-shadow: 0 0 0 6px rgba(91, 154, 116, 0.14);
}

.workspace {
  flex: 1 1 auto;
  padding: 24px 26px 26px;
  overflow: hidden;
}

.topbar,
.section-header,
.panel-heading,
.agenda-toolbar,
.action-row,
.topbar-actions,
menu {
  display: flex;
  align-items: center;
}

.topbar,
.section-header {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.topbar h1,
.section-header h2,
.hero-dashboard h2,
.modal h2 {
  margin: 0;
  font-family: Montserrat, system-ui, sans-serif;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(28px, 4vw, 42px);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--sage-dark);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.menu-button {
  display: none;
}

.primary-button,
.ghost-button,
.icon-button,
.segmented button {
  min-height: 42px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 0 15px;
  font-weight: 800;
}

.primary-button {
  background: var(--sage-dark);
  color: #fffdf8;
}

.ghost-button,
.icon-button,
.segmented {
  background: rgba(255, 252, 248, 0.8);
  border: 1px solid var(--line);
  color: var(--ink);
}

.compact {
  min-height: 34px;
  padding: 0 11px;
}

.icon-button {
  width: 38px;
  padding: 0;
  font-size: 22px;
}

.topbar-actions,
.action-row {
  gap: 10px;
  flex-wrap: wrap;
}

.login-strip {
  border-radius: var(--radius);
  margin-bottom: 24px;
  padding: 15px 18px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.pill,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
}

.pill {
  background: var(--blue);
  color: #395c65;
  margin-right: 8px;
}

.access-levels {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.access-levels span {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(143, 167, 154, 0.18);
  color: var(--sage-dark);
  font-weight: 800;
  font-size: 0.78rem;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero-dashboard {
  min-height: 240px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  padding: clamp(24px, 5vw, 44px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: end;
  gap: 24px;
  background:
    linear-gradient(90deg, rgba(255, 250, 245, 0.92), rgba(255, 250, 245, 0.5)),
    url("https://images.unsplash.com/photo-1540555700478-4be289fbecef?auto=format&fit=crop&w=1600&q=80") center/cover;
}

.hero-dashboard h2 {
  max-width: 710px;
  font-size: clamp(32px, 5vw, 60px);
  color: #1e2925;
}

.hero-dashboard p:not(.eyebrow) {
  max-width: 620px;
  color: #53615b;
  line-height: 1.7;
}

.hero-stat {
  border-radius: var(--radius);
  background: rgba(255, 252, 248, 0.88);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.65);
}

.hero-stat strong {
  font-size: 44px;
  color: var(--sage-dark);
}

.metric-grid,
.finance-grid,
.service-grid,
.report-grid,
.team-grid {
  display: grid;
  gap: 14px;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.metric-card,
.panel,
.table-panel {
  border-radius: var(--radius);
}

.metric-card {
  min-height: 132px;
  padding: 18px;
}

.metric-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.metric-card strong {
  margin: 12px 0 7px;
  font-size: clamp(25px, 3vw, 34px);
}

.income {
  border-color: rgba(91, 154, 116, 0.28);
}

.outcome {
  border-color: rgba(166, 123, 99, 0.32);
}

.profit {
  border-color: rgba(183, 155, 104, 0.42);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 14px;
}

.panel {
  padding: 18px;
}

.panel.large {
  min-height: 280px;
}

.panel-heading {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel h3,
.appointment-details h3 {
  margin: 0;
  font-size: 1.05rem;
}

.bar-chart {
  height: 214px;
  display: grid;
  grid-template-columns: repeat(7, minmax(32px, 1fr));
  align-items: end;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.bar {
  min-height: 28px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--rose), var(--sage-dark));
  position: relative;
}

.bar::before,
.bar::after {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.bar::before {
  content: attr(data-value);
  top: -23px;
  color: var(--ink);
}

.bar::after {
  content: attr(data-label);
  bottom: -24px;
  color: var(--muted);
}

.ranking,
.client-list,
.alert-list,
.dre-list {
  display: grid;
  gap: 11px;
}

.rank-item,
.client-card,
.alert-item,
.dre-item,
.schedule-item,
.service-card,
.report-card,
.team-card {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
}

.rank-item,
.client-card,
.alert-item,
.dre-item {
  padding: 12px;
}

.rank-item,
.dre-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.progress {
  height: 7px;
  border-radius: 999px;
  background: #ebe4d9;
  overflow: hidden;
  margin-top: 8px;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--sage-dark);
}

.alert-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.agenda-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
}

.agenda-toolbar {
  justify-content: space-between;
  margin-bottom: 16px;
}

.segmented {
  padding: 4px;
  border-radius: var(--radius);
}

.segmented button {
  border: 0;
  background: transparent;
}

.segmented button.active {
  background: var(--sage-dark);
  color: #fff;
}

.schedule {
  display: grid;
  gap: 10px;
}

.schedule-item {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px;
}

.schedule-time {
  font-weight: 800;
  color: var(--sage-dark);
}

.schedule-item h4 {
  margin: 0 0 4px;
}

.schedule-item p {
  margin: 0;
  color: var(--muted);
}

.status.confirmed {
  color: #6d3e16;
  background: #f0dfd2;
}

.status.pending {
  color: #8a5532;
  background: #f4e8dc;
}

.status.cancelled {
  color: #8c4a4a;
  background: #f1dddd;
}

.status.done {
  color: #8c4f41;
  background: #f1ddd7;
}

.appointment-details dl {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.appointment-details div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-weight: 700;
}

dd {
  margin: 0;
  font-weight: 800;
}

.search-box input,
select,
.form-grid input,
.form-grid textarea,
.form-grid select {
  width: 100%;
  min-height: 42px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 252, 248, 0.92);
  color: var(--ink);
  padding: 0 12px;
}

.table-panel {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

th,
td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--sage-dark);
  font-size: 0.78rem;
  text-transform: uppercase;
}

td strong {
  display: block;
}

td small {
  color: var(--muted);
}

.service-grid,
.report-grid,
.team-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card,
.report-card,
.team-card {
  min-height: 210px;
  padding: 18px;
}

.service-card h3,
.report-card h3,
.team-card h3 {
  margin: 10px 0 8px;
}

.service-card p,
.report-card p,
.team-card p {
  color: var(--muted);
  line-height: 1.55;
}

.service-meta,
.team-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.service-meta span,
.team-meta span {
  padding: 7px 9px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--sage-dark);
  font-size: 0.75rem;
  font-weight: 800;
}

.finance-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  padding: 13px 16px;
  border-radius: var(--radius);
  color: #fff;
  background: var(--sage-dark);
  box-shadow: var(--shadow);
  transition: 0.2s ease;
  z-index: 20;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.modal {
  width: min(720px, calc(100vw - 30px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 28px 80px rgba(39, 48, 45, 0.22);
}

.modal::backdrop {
  background: rgba(39, 48, 45, 0.34);
  backdrop-filter: blur(5px);
}

.modal form {
  padding: 22px;
}

.modal-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  display: grid;
  gap: 7px;
}

.form-grid textarea {
  min-height: 92px;
  padding-top: 10px;
  resize: vertical;
}

menu {
  justify-content: flex-end;
  gap: 10px;
  padding: 0;
  margin: 20px 0 0;
}

@media (max-width: 1120px) {
  .metric-grid,
  .service-grid,
  .report-grid,
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .agenda-layout {
    grid-template-columns: 1fr;
  }

  .appointment-details {
    order: -1;
  }
}

@media (max-width: 820px) {
  .app-shell {
    display: flex;
  }

  .sidebar {
    position: sticky;
    inset: auto;
    width: 100%;
    min-height: 0;
    padding: 9px 12px;
    transform: none;
    flex-wrap: wrap;
    gap: 8px;
  }

  .workspace {
    padding: 18px;
  }

  .brand {
    width: 128px;
    min-height: 40px;
    margin-left: 18px;
    padding: 0;
  }

  .brand-logo {
    max-width: 108px;
  }

  .nav-list {
    order: 3;
    flex: 1 0 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 2px 0 4px;
    scrollbar-width: thin;
  }

  .nav-item {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 10px;
  }

  .sidebar-panel {
    margin-left: auto;
    max-width: 180px;
    padding: 9px 10px;
  }

  .sidebar-panel small {
    display: none;
  }

  .menu-button {
    display: none;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-actions,
  .login-strip,
  .section-header {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-dashboard {
    grid-template-columns: 1fr;
    min-height: 420px;
    align-items: end;
  }

  .metric-grid,
  .finance-grid,
  .service-grid,
  .report-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .schedule-item {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .workspace {
    padding: 14px;
  }

  .hero-dashboard {
    padding: 22px;
  }

  .hero-dashboard h2 {
    font-size: 34px;
  }

  .bar-chart {
    gap: 8px;
    overflow-x: auto;
    grid-template-columns: repeat(7, 48px);
  }

  .topbar h1 {
    font-size: 30px;
  }
}
