/* Nobatis app design foundation — Material 3 roles and primitives. */
:root {
  color-scheme: light;
  --md-sys-color-primary: #684258;
  --md-sys-color-on-primary: #fff7fb;
  --md-sys-color-primary-container: #f4dce9;
  --md-sys-color-on-primary-container: #32152a;
  --md-sys-color-secondary: #49665d;
  --md-sys-color-on-secondary: #f3fbf5;
  --md-sys-color-secondary-container: #cfe9dc;
  --md-sys-color-on-secondary-container: #102b22;
  --md-sys-color-tertiary: #805b2e;
  --md-sys-color-on-tertiary: #fff8ed;
  --md-sys-color-tertiary-container: #f5dfbd;
  --md-sys-color-on-tertiary-container: #2d1900;
  --md-sys-color-error: #b3261e;
  --md-sys-color-on-error: #fff;
  --md-sys-color-error-container: #f9dedb;
  --md-sys-color-on-error-container: #410e0b;
  --md-sys-color-background: #faf8f6;
  --md-sys-color-on-background: #211a1e;
  --md-sys-color-surface: #faf8f6;
  --md-sys-color-on-surface: #211a1e;
  --md-sys-color-surface-variant: #eee7eb;
  --md-sys-color-on-surface-variant: #51464d;
  --md-sys-color-surface-container-lowest: #fff;
  --md-sys-color-surface-container-low: #f5f0f2;
  --md-sys-color-surface-container: #f0eaed;
  --md-sys-color-surface-container-high: #eae4e7;
  --md-sys-color-surface-container-highest: #e4dfe2;
  --md-sys-color-outline: #82767e;
  --md-sys-color-outline-variant: #d4c9d0;
  --md-sys-color-inverse-surface: #362f33;
  --md-sys-color-inverse-on-surface: #f5eff2;
  --md-sys-color-inverse-primary: #e3b8d0;
  --md-sys-color-scrim: #000;
  --md-sys-color-shadow: #000;
  --md-elevation-1: 0 1px 2px rgb(34 24 31 / 12%), 0 1px 3px 1px rgb(34 24 31 / 8%);
  --md-shape-xs: 4px;
  --md-shape-sm: 8px;
  --md-shape-md: 12px;
  --md-shape-lg: 16px;
  --md-shape-xl: 24px;
  --md-shape-full: 999px;
  --md-space-1: 4px;
  --md-space-2: 8px;
  --md-space-3: 12px;
  --md-space-4: 16px;
  --md-space-5: 20px;
  --md-space-6: 24px;
  --md-space-8: 32px;
  --md-motion-standard: cubic-bezier(.2, 0, 0, 1);
  --md-motion-emphasized: cubic-bezier(.2, 0, 0, 1);
  --md-motion-duration-short: 180ms;
  --md-motion-duration-medium: 280ms;
  --md-state-hover: rgb(104 66 88 / 8%);
  --md-state-focus: rgb(104 66 88 / 10%);
  --md-state-pressed: rgb(104 66 88 / 10%);
  --md-state-dragged: rgb(104 66 88 / 16%);
  --md-type-display: 36px;
  --md-type-headline: 28px;
  --md-type-title: 20px;
  --md-type-body: 14px;
  --md-type-label: 12px;
  --md-min-touch: 48px;
  font-family: Vazir, Tahoma, sans-serif;
  font-synthesis: none;
  font-optical-sizing: auto;
  font-variant-numeric: tabular-nums;
  color: var(--md-sys-color-on-background);
  background: var(--md-sys-color-background);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --md-sys-color-primary: #e3b8d0;
    --md-sys-color-on-primary: #3b2232;
    --md-sys-color-primary-container: #513549;
    --md-sys-color-on-primary-container: #f8ddeb;
    --md-sys-color-secondary: #b4d1c4;
    --md-sys-color-on-secondary: #243b32;
    --md-sys-color-secondary-container: #354d43;
    --md-sys-color-on-secondary-container: #d0ecde;
    --md-sys-color-tertiary: #dec197;
    --md-sys-color-on-tertiary: #3f2d13;
    --md-sys-color-tertiary-container: #594326;
    --md-sys-color-on-tertiary-container: #f5dfbd;
    --md-sys-color-error: #ffb4ab;
    --md-sys-color-on-error: #690005;
    --md-sys-color-error-container: #93000a;
    --md-sys-color-on-error-container: #ffdad6;
    --md-sys-color-background: #171316;
    --md-sys-color-on-background: #eee7eb;
    --md-sys-color-surface: #171316;
    --md-sys-color-on-surface: #eee7eb;
    --md-sys-color-surface-variant: #50464d;
    --md-sys-color-on-surface-variant: #d4c9d0;
    --md-sys-color-surface-container-lowest: #100d10;
    --md-sys-color-surface-container-low: #1f1a1e;
    --md-sys-color-surface-container: #231e22;
    --md-sys-color-surface-container-high: #2e282d;
    --md-sys-color-surface-container-highest: #393339;
    --md-sys-color-outline: #9d9199;
    --md-sys-color-outline-variant: #50464d;
    --md-sys-color-inverse-surface: #eee7eb;
    --md-sys-color-inverse-on-surface: #362f33;
    --md-sys-color-inverse-primary: #684258;
    --md-elevation-1: 0 1px 3px rgb(0 0 0 / 32%);
  }
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --md-sys-color-primary: #e3b8d0; --md-sys-color-on-primary: #3b2232;
  --md-sys-color-primary-container: #513549; --md-sys-color-on-primary-container: #f8ddeb;
  --md-sys-color-secondary: #b4d1c4; --md-sys-color-on-secondary: #243b32;
  --md-sys-color-secondary-container: #354d43; --md-sys-color-on-secondary-container: #d0ecde;
  --md-sys-color-tertiary: #dec197; --md-sys-color-on-tertiary: #3f2d13;
  --md-sys-color-tertiary-container: #594326; --md-sys-color-on-tertiary-container: #f5dfbd;
  --md-sys-color-error: #ffb4ab; --md-sys-color-on-error: #690005;
  --md-sys-color-error-container: #93000a; --md-sys-color-on-error-container: #ffdad6;
  --md-sys-color-background: #171316; --md-sys-color-on-background: #eee7eb;
  --md-sys-color-surface: #171316; --md-sys-color-on-surface: #eee7eb;
  --md-sys-color-surface-variant: #50464d; --md-sys-color-on-surface-variant: #d4c9d0;
  --md-sys-color-surface-container-lowest: #100d10; --md-sys-color-surface-container-low: #1f1a1e;
  --md-sys-color-surface-container: #231e22; --md-sys-color-surface-container-high: #2e282d;
  --md-sys-color-surface-container-highest: #393339; --md-sys-color-outline: #9d9199;
  --md-sys-color-outline-variant: #50464d; --md-sys-color-inverse-surface: #eee7eb;
  --md-sys-color-inverse-on-surface: #362f33; --md-sys-color-inverse-primary: #684258;
  --md-elevation-1: 0 1px 3px rgb(0 0 0 / 32%);
}

/* Keep the product app on its approved sage, copper, and warm-stone palette. */
body.app-body, body.mobile-body {
  --md-sys-color-primary: #315842;
  --md-sys-color-on-primary: #fffdf9;
  --md-sys-color-primary-container: #d5ebdf;
  --md-sys-color-on-primary-container: #19382d;
  --md-sys-color-secondary: #a46e4b;
  --md-sys-color-on-secondary: #fffaf6;
  --md-sys-color-secondary-container: #d5ebdf;
  --md-sys-color-on-secondary-container: #244936;
  --md-sys-color-tertiary: #805b2e;
  --md-sys-color-on-tertiary: #fff8ed;
  --md-sys-color-tertiary-container: #f5dfbd;
  --md-sys-color-on-tertiary-container: #2d1900;
  --md-sys-color-background: #e8e2dd;
  --md-sys-color-on-background: #2b2429;
  --md-sys-color-surface: #fbf8f5;
  --md-sys-color-on-surface: #2b2429;
  --md-sys-color-surface-variant: #f0ece8;
  --md-sys-color-on-surface-variant: #70696a;
  --md-sys-color-surface-container-lowest: #fff;
  --md-sys-color-surface-container-low: #f6f2ee;
  --md-sys-color-surface-container: #f0ece8;
  --md-sys-color-surface-container-high: #e9e4df;
  --md-sys-color-surface-container-highest: #e1dbd6;
  --md-sys-color-outline: #8d827c;
  --md-sys-color-outline-variant: #dcd4ce;
  --md-sys-color-inverse-surface: #302e2d;
  --md-sys-color-inverse-on-surface: #f5f1ed;
  --md-sys-color-inverse-primary: #b8ddc1;
  --md-state-hover: rgb(49 88 66 / 8%);
  --md-state-focus: rgb(49 88 66 / 12%);
  --md-state-pressed: rgb(49 88 66 / 10%);
  --md-state-dragged: rgb(49 88 66 / 16%);
}
body.app-body[data-theme="dark"], body.mobile-body[data-theme="dark"] {
  color-scheme: dark;
  --md-sys-color-primary: #b8ddc1;
  --md-sys-color-on-primary: #173326;
  --md-sys-color-primary-container: #315842;
  --md-sys-color-on-primary-container: #d5ebdf;
  --md-sys-color-secondary: #e9b18d;
  --md-sys-color-on-secondary: #412714;
  --md-sys-color-secondary-container: #385b48;
  --md-sys-color-on-secondary-container: #e8f5eb;
  --md-sys-color-tertiary: #dec197;
  --md-sys-color-background: #171a17;
  --md-sys-color-on-background: #eef2ee;
  --md-sys-color-surface: #1c201d;
  --md-sys-color-on-surface: #eef2ee;
  --md-sys-color-surface-variant: #464d47;
  --md-sys-color-on-surface-variant: #c2cbc2;
  --md-sys-color-surface-container-lowest: #111411;
  --md-sys-color-surface-container-low: #202520;
  --md-sys-color-surface-container: #252b26;
  --md-sys-color-surface-container-high: #303630;
  --md-sys-color-surface-container-highest: #3b423c;
  --md-sys-color-outline: #89938a;
  --md-sys-color-outline-variant: #404941;
  --md-sys-color-inverse-surface: #eef2ee;
  --md-sys-color-inverse-on-surface: #303630;
  --md-sys-color-inverse-primary: #315842;
}

body.app-body, body.mobile-body { font-family: Vazir, Tahoma, sans-serif; }
body.app-body, body.mobile-body, body.app-body input, body.mobile-body input,
body.app-body select, body.mobile-body select, body.app-body button, body.mobile-body button,
body.app-body textarea, body.mobile-body textarea { font-family: Vazir, Tahoma, sans-serif; }
body.mobile-body .phone-field { display: flex; direction: ltr; flex-direction: row; justify-content: flex-start; }
body.mobile-body .phone-field > span { order: 0; flex: 0 0 auto; direction: ltr; }
body.mobile-body .phone-field input { order: 1; flex: 1 1 auto; min-width: 0; direction: ltr; text-align: left; unicode-bidi: plaintext; }
body.mobile-body .phone-field input::placeholder { direction: ltr; text-align: left; unicode-bidi: plaintext; }
body.app-body :focus-visible, body.mobile-body :focus-visible { outline: 3px solid var(--md-sys-color-primary); outline-offset: 2px; }
body.app-body button, body.mobile-body button, body.app-body a, body.mobile-body a { -webkit-tap-highlight-color: transparent; }

.m3-button { min-height: var(--md-min-touch); padding-inline: var(--md-space-4); display: inline-flex; align-items: center; justify-content: center; gap: var(--md-space-2); border: 0; border-radius: var(--md-shape-full); background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); font: 700 var(--md-type-label)/1.4 Vazir, Tahoma, sans-serif; cursor: pointer; transition: background var(--md-motion-duration-short) var(--md-motion-standard), transform var(--md-motion-duration-short) var(--md-motion-standard); }
.m3-button:active { transform: scale(.98); }
.m3-button:disabled { opacity: .38; cursor: not-allowed; }
.m3-button--tonal { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.m3-button--outlined { border: 1px solid var(--md-sys-color-outline); background: transparent; color: var(--md-sys-color-primary); }
.m3-card { border-radius: var(--md-shape-lg); background: var(--md-sys-color-surface-container-low); color: var(--md-sys-color-on-surface); }
.m3-field { min-height: var(--md-min-touch); padding-inline: var(--md-space-4); border: 1px solid var(--md-sys-color-outline); border-radius: var(--md-shape-sm); background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-on-surface); font: 500 var(--md-type-body)/1.5 Vazir, Tahoma, sans-serif; }
.m3-field:focus { border-color: var(--md-sys-color-primary); outline: 2px solid var(--md-sys-color-primary); outline-offset: 1px; }
.m3-chip { min-height: 32px; padding-inline: 12px; display: inline-flex; align-items: center; border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-shape-sm); color: var(--md-sys-color-on-surface-variant); font-size: var(--md-type-label); }
.m3-snackbar { position: fixed; z-index: 100; inset-inline: 16px; inset-block-end: calc(90px + env(safe-area-inset-bottom)); width: min(560px, calc(100% - 32px)); margin-inline: auto; padding: 14px 16px; border-radius: var(--md-shape-sm); background: var(--md-sys-color-inverse-surface); color: var(--md-sys-color-inverse-on-surface); box-shadow: var(--md-elevation-1); }
.m3-sheet { border: 0; border-radius: var(--md-shape-xl) var(--md-shape-xl) 0 0; background: var(--md-sys-color-surface-container-low); color: var(--md-sys-color-on-surface); }
.m3-ripple { position: absolute; width: 18px; height: 18px; border-radius: 50%; pointer-events: none; background: currentColor; opacity: .16; transform: translate(-50%, -50%) scale(0); animation: m3-ripple 520ms var(--md-motion-standard) forwards; }
@keyframes m3-ripple { to { opacity: 0; transform: translate(-50%, -50%) scale(13); } }

/* The active destination is a single movable tonal indicator, not a highlight per item. */
.mobile-panel-tabs, .mobile-tabbar { position: relative; isolation: isolate; }
.mobile-panel-tabs .m3-nav-indicator, .mobile-tabbar .m3-nav-indicator { position: absolute; z-index: -1; inset-block-start: 6px; inset-inline-start: auto; left: 0; right: auto; height: calc(100% - 12px - env(safe-area-inset-bottom)); border-radius: var(--md-shape-full); background: var(--md-sys-color-secondary-container); opacity: 0; pointer-events: none; transform: translateX(var(--nav-x, 0)); width: var(--nav-width, 0); }
.mobile-panel-tabs.is-nav-ready .m3-nav-indicator, .mobile-tabbar.is-nav-ready .m3-nav-indicator { opacity: 1; transition: transform 320ms var(--md-motion-emphasized), width 240ms var(--md-motion-standard); }
.mobile-panel-tabs .mobile-panel-tab, .mobile-panel-tabs .mobile-panel-more > summary,
.mobile-tabbar a, .mobile-tabbar button { position: relative; z-index: 1; min-height: var(--md-min-touch); transition: color 180ms var(--md-motion-standard), transform 220ms var(--md-motion-emphasized); }
.mobile-panel-tabs .mobile-panel-tab.active, .mobile-panel-tabs .mobile-panel-more.active > summary { background: transparent !important; color: var(--md-sys-color-on-secondary-container) !important; }
.mobile-panel-tabs .mobile-panel-tab.active svg, .mobile-panel-tabs .mobile-panel-more.active > summary span { animation: m3-icon-pop 300ms var(--md-motion-emphasized) both; }
.mobile-panel-tabs .mobile-panel-more > summary > svg { width: 22px; height: 22px; }
.mobile-tabbar a.is-active, .mobile-tabbar button.is-active { color: var(--md-sys-color-on-secondary-container) !important; }
.mobile-tabbar .m3-nav-indicator { inset-block-start: 4px; height: calc(100% - 8px - env(safe-area-inset-bottom)); }
.mobile-tabbar .is-active > span:first-child { animation: m3-icon-pop 300ms var(--md-motion-emphasized) both; }
@keyframes m3-icon-pop { 0% { transform: scale(.84); } 70% { transform: scale(1.1); } 100% { transform: scale(1); } }
.m3-theme-toggle { min-height: 48px; padding-inline: 12px; display: flex; align-items: center; gap: 10px; border: 0; border-radius: var(--md-shape-sm); background: transparent; color: inherit; font: 650 12px Vazir, Tahoma, sans-serif; cursor: pointer; }
.m3-theme-toggle:hover { background: var(--md-state-hover); }
.m3-theme-toggle:active { background: var(--md-state-pressed); }
.m3-theme-icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border: 0; border-radius: var(--md-shape-full); background: transparent; color: var(--md-sys-color-on-surface-variant); cursor: pointer; }
.m3-theme-icon svg { width: 21px; height: 21px; }
.m3-theme-icon:hover { background: var(--md-state-hover); }
.mobile-panel-quick > summary svg { width: 19px; height: 19px; }
.m3-theme-toggle svg { width: 20px; height: 20px; flex: 0 0 20px; }
.mobile-tabbar svg { width: 23px; height: 23px; }

@media (min-width: 600px) {
  body.app-body .app-shell, body.app-body .calendar-shell {
    width: 100vw !important; max-width: none !important; min-height: 100dvh;
    margin: 0 !important; padding: 0 !important; display: grid !important;
    grid-template-columns: 76px minmax(0, 1fr) !important; overflow: visible !important;
    box-shadow: none !important;
  }
  body.app-body .app-shell > .side, body.app-body .calendar-shell > .side {
    position: sticky !important; inset-block-start: 0 !important; inset-inline: auto !important;
    grid-column: 1 !important; grid-row: 1 !important; width: 76px !important; height: 100dvh !important;
    min-height: 100dvh !important; padding: 16px 8px !important; display: flex !important;
    flex-direction: column !important; align-items: stretch; overflow: auto !important;
    background: var(--md-sys-color-surface-container-low) !important; color: var(--md-sys-color-on-surface) !important;
    border: 0 !important; border-inline-end: 1px solid var(--md-sys-color-outline-variant) !important;
  }
  body.app-body .mobile-panel-header, body.app-body .mobile-panel-tabs { display: none !important; }
  body.app-body .side > .brand { display: flex !important; justify-content: center; padding: 6px 0 16px !important; color: var(--md-sys-color-primary) !important; }
  body.app-body .side > .brand .brand-name, body.app-body .side > .salon-context,
  body.app-body .side > .panel-nav .panel-nav-link > span, body.app-body .side .side-bottom span { display: none !important; }
  body.app-body .side > .panel-nav { display: grid !important; gap: 6px !important; margin-top: 4px !important; }
  body.app-body .side > .panel-nav .panel-nav-link { min-height: 52px; justify-content: center; padding: 8px; border-radius: var(--md-shape-full); color: var(--md-sys-color-on-surface-variant); }
  body.app-body .side > .panel-nav .panel-nav-link svg { width: 22px; height: 22px; color: inherit; }
  body.app-body .side > .panel-nav .panel-nav-link.active { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
  body.app-body .side > .panel-nav .nav-indicator { display: none; }
  body.app-body .side > .side-bottom { display: grid !important; margin-top: auto !important; padding-top: 12px !important; border-color: var(--md-sys-color-outline-variant) !important; }
  body.app-body .side .public-link, body.app-body .side .logout { min-height: 48px; justify-content: center; padding: 8px; color: var(--md-sys-color-on-surface-variant); }
  body.app-body .side .public-link svg, body.app-body .side .logout svg { color: var(--md-sys-color-primary); }
  body.app-body .app-shell > .workspace, body.app-body .calendar-shell > .calendar-workspace {
    grid-column: 2 !important; grid-row: 1 !important; width: 100% !important; min-width: 0 !important;
    margin: 0 !important; padding: 32px clamp(24px, 4vw, 64px) 48px !important;
  }
  body.app-body .app-shell .page-top, body.app-body .calendar-shell .page-top { flex-direction: row !important; align-items: flex-end !important; }
  body.app-body .app-shell .form-grid, body.app-body .app-shell .branch-form { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body.app-body .app-shell .branch-form .wide { grid-column: 1 / -1 !important; }
  body.app-body .admin-shell { width: 100% !important; max-width: none !important; min-height: 100dvh; margin: 0 !important; overflow: visible !important; box-shadow: none !important; }
  body.app-body .admin-shell .admin-main { width: min(100% - 48px, 1120px) !important; margin: 32px auto 64px !important; padding: 0 !important; }
}

/* Android-first identity flow: quiet surfaces, tactile controls, clear progress. */
body.mobile-body:has(#mobile-auth) {
  background: #e9e8e5;
  color: #242326;
}
body.mobile-body:has(#mobile-auth) .mobile-app {
  width: min(100%, 480px);
  min-height: 100svh;
  overflow: visible;
  background: #f5f4f1;
  box-shadow: 0 16px 56px rgb(28 27 29 / 9%);
}
body.mobile-body:has(#mobile-auth) .mobile-auth {
  min-height: 100svh;
  padding: 0 26px max(30px, env(safe-area-inset-bottom));
  color: #242326;
}
body.mobile-body:has(#mobile-auth) .mobile-topbar {
  height: calc(68px + env(safe-area-inset-top));
  border-bottom: 1px solid #deddd9;
}
body.mobile-body:has(#mobile-auth) .mobile-brand { color: #242326; }
body.mobile-body:has(#mobile-auth) .auth-progress {
  gap: 6px;
  margin: 18px 0 0;
}
body.mobile-body:has(#mobile-auth) .auth-progress i {
  height: 4px;
  border-radius: 8px;
  background: #d9d8d4;
}
body.mobile-body:has(#mobile-auth) .auth-progress i.is-current { background: #e47b52; }
body.mobile-body:has(#mobile-auth) .auth-step { padding-top: 18px; }
body.mobile-body:has(#mobile-auth) .step-illustration {
  height: 156px;
  margin: 10px 0 26px;
  overflow: visible;
}
body.mobile-body:has(#mobile-auth) .illustration-ring { display: none; }
body.mobile-body:has(#mobile-auth) .illustration-card {
  width: min(100%, 300px);
  height: 112px;
  padding: 20px 22px;
  grid-template-columns: 1fr auto;
  gap: 6px 14px;
  border: 1px solid #353438;
  border-radius: 20px;
  background: #252427;
  box-shadow: 0 16px 30px rgb(30 29 32 / 18%);
  transform: rotate(-2deg);
}
body.mobile-body:has(#mobile-auth) .illustration-card span { color: #d0cbca; font-size: 10px; }
body.mobile-body:has(#mobile-auth) .illustration-card strong { color: #fff; font-size: 27px; }
body.mobile-body:has(#mobile-auth) .illustration-card i {
  padding: 6px 9px;
  background: #f2a17e;
  color: #292528;
  font-size: 9px;
  font-weight: 750;
}
body.mobile-body:has(#mobile-auth) .step-illustration > b { display: none; }
body.mobile-body:has(#mobile-auth) .mobile-eyebrow { color: #a94728; font-size: 11px; }
body.mobile-body:has(#mobile-auth) .auth-step h1 {
  color: #242326;
  font-size: clamp(34px, 9vw, 42px);
  line-height: 1.27;
  letter-spacing: -.035em;
}
body.mobile-body:has(#mobile-auth) .auth-step h1 em { color: #b95836; }
body.mobile-body:has(#mobile-auth) .mobile-lead {
  max-width: 39ch;
  margin: 12px 0 27px;
  color: #565459;
  font-size: 13px;
  line-height: 1.9;
}
body.mobile-body:has(#mobile-auth) .mobile-form { gap: 11px; }
body.mobile-body:has(#mobile-auth) .mobile-form > label { color: #343337; font-size: 12px; }
body.mobile-body:has(#mobile-auth) .phone-field,
body.mobile-body:has(#mobile-auth) .auth-step .name-field {
  min-height: 60px;
  border: 1px solid #cfceca;
  border-radius: 15px;
  background: #fff;
}
body.mobile-body:has(#mobile-auth) .phone-field { padding-inline: 15px; }
body.mobile-body:has(#mobile-auth) .phone-field > span { color: #555358; font-size: 12px; }
body.mobile-body:has(#mobile-auth) .phone-field input,
body.mobile-body:has(#mobile-auth) .auth-step .name-field { color: #242326; }
body.mobile-body:has(#mobile-auth) .phone-field:focus-within,
body.mobile-body:has(#mobile-auth) .auth-step .name-field:focus {
  border-color: #b95836;
  box-shadow: 0 0 0 3px rgb(185 88 54 / 14%);
}
body.mobile-body:has(#mobile-auth) .field-hint,
body.mobile-body:has(#mobile-auth) .mobile-legal { color: #5f5d62; }
body.mobile-body:has(#mobile-auth) .mobile-primary {
  min-height: 58px;
  margin-top: 9px;
  border-radius: 15px;
  background: #29282b;
  box-shadow: 0 9px 18px rgb(32 31 34 / 13%);
  font-size: 13px;
}
body.mobile-body:has(#mobile-auth) .mobile-primary:hover { background: #39383c; }
body.mobile-body:has(#mobile-auth) .mobile-primary:focus-visible,
body.mobile-body:has(#mobile-auth) .step-back:focus-visible,
body.mobile-body:has(#mobile-auth) .resend-button:focus-visible {
  outline: 3px solid #e47b52;
  outline-offset: 3px;
}
body.mobile-body:has(#mobile-auth) .salon-login-note {
  border-color: #d6d5d1;
  color: #555358;
  font-size: 11px;
}
body.mobile-body:has(#mobile-auth) .salon-login-note a { color: #a94728; }
body.mobile-body:has(#mobile-auth) .otp-illustration {
  width: 100px;
  height: 100px;
  margin: 30px auto 27px;
  border-radius: 28px;
  background: #e6e5e1;
  color: #29282b;
  transform: none;
}
body.mobile-body:has(#mobile-auth) .otp-illustration svg { display: block; width: 44px; height: 44px; }
body.mobile-body:has(#mobile-auth) .otp-illustration > i {
  right: -5px;
  bottom: -5px;
  width: 31px;
  height: 31px;
  border-color: #f5f4f1;
  background: #e47b52;
  color: #242326;
}
body.mobile-body:has(#mobile-auth) .step-back {
  top: 16px;
  width: 46px;
  height: 46px;
  border-color: #cfceca;
  background: #fff;
  color: #29282b;
}
body.mobile-body:has(#mobile-auth) .otp-entry {
  min-height: 76px;
  padding: 10px 12px;
  border-color: #cfceca;
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
}
body.mobile-body:has(#mobile-auth) .otp-entry:focus-within {
  border-color: #b95836;
  box-shadow: 0 0 0 3px rgb(185 88 54 / 14%);
  transform: none;
}
body.mobile-body:has(#mobile-auth) .otp-slot {
  height: 50px;
  border-color: #d8d7d3;
  border-radius: 12px;
  background: #f8f7f4;
  color: #242326;
}
body.mobile-body:has(#mobile-auth) .otp-slot.is-current,
body.mobile-body:has(#mobile-auth) .otp-slot.is-decoding { border-color: #b95836; }
body.mobile-body:has(#mobile-auth) .otp-digit { color: #242326; }
body.mobile-body:has(#mobile-auth) .otp-slot.is-decoding .otp-digit { color: #a94728; }
body.mobile-body:has(#mobile-auth) .otp-entry.is-complete { border-color: #48735a; }
body.mobile-body:has(#mobile-auth) .resend-button { min-height: 48px; color: #8e3f25; font-size: 12px; }
body.mobile-body:has(#mobile-auth) .mobile-message { min-height: 22px; font-size: 11px; }
body.mobile-body:has(#mobile-auth) .mobile-legal { font-size: 10px; }
@media (max-width: 380px) {
  body.mobile-body:has(#mobile-auth) .mobile-auth { padding-inline: 20px; }
  body.mobile-body:has(#mobile-auth) .step-illustration { height: 136px; margin-bottom: 19px; }
  body.mobile-body:has(#mobile-auth) .auth-step h1 { font-size: 34px; }
  body.mobile-body:has(#mobile-auth) .otp-slots { gap: 5px; }
  body.mobile-body:has(#mobile-auth) .otp-slot { height: 46px; }
}
@media (display-mode: standalone) {
  body.mobile-body:has(#mobile-auth) .mobile-app { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  body.mobile-body:has(#mobile-auth) .auth-step,
  body.mobile-body:has(#mobile-auth) .illustration-card { animation: none !important; transition: none !important; }
}

@media (min-width: 1200px) {
  body.app-body .app-shell, body.app-body .calendar-shell { grid-template-columns: 256px minmax(0, 1fr) !important; }
  body.app-body .app-shell > .side, body.app-body .calendar-shell > .side { width: 256px !important; padding: 24px 16px 18px !important; }
  body.app-body .side > .brand { justify-content: flex-start; padding: 6px 10px !important; }
  body.app-body .side > .brand .brand-name, body.app-body .side > .salon-context,
  body.app-body .side > .panel-nav .panel-nav-link > span, body.app-body .side .side-bottom span { display: initial !important; }
  body.app-body .side > .brand .brand-name { display: inline !important; }
  body.app-body .side > .salon-context { display: flex !important; }
  body.app-body .side > .panel-nav .panel-nav-link { justify-content: flex-start; padding: 9px 11px; }
  body.app-body .side > .panel-nav .panel-nav-link > span { display: inline !important; }
  body.app-body .side > .side-bottom .public-link, body.app-body .side > .side-bottom .logout { justify-content: flex-start; padding: 9px 11px; }
  body.app-body .side > .side-bottom .public-link span, body.app-body .side > .side-bottom .logout span { display: inline !important; }
  body.app-body .app-shell > .workspace, body.app-body .calendar-shell > .calendar-workspace { grid-column: 2 !important; padding: 42px clamp(32px, 4vw, 72px) 60px !important; }
}

@media (max-width: 599px) {
  body.mobile-body .mobile-tabbar { height: calc(80px + env(safe-area-inset-bottom)); padding: 7px 12px calc(7px + env(safe-area-inset-bottom)); }
  body.mobile-body .mobile-tabbar small { font-size: 10px; }
  body.mobile-body .mobile-tabbar span { font-size: 20px; }
  body.app-body .mobile-panel-tabs { height: calc(80px + env(safe-area-inset-bottom)); padding: 7px 10px env(safe-area-inset-bottom); }
  body.app-body .mobile-panel-more-menu { inset-block-end: calc(90px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (min-width: 600px) and (max-width: 1199px) {
  body.app-body .admin-shell { width: min(100%, 1080px); }
  body.app-body .admin-main { width: min(100% - 48px, 1000px); }
}

/* Android app direction: quiet stone workspace, charcoal navigation, copper and mint states. */
@media (min-width: 600px) {
  body.app-body .app-shell,
  body.app-body .calendar-shell { background: #f0f0ee !important; }
  body.app-body .app-shell > .side,
  body.app-body .calendar-shell > .side {
    background: #242326 !important;
    color: #f2efed !important;
    border-color: #3a393b !important;
    box-shadow: 5px 0 24px rgb(28 26 28 / 10%);
  }
  body.app-body .side > .brand { color: #faf8f6 !important; }
  body.app-body .side > .brand .brand-mark { border-color: #e8875b66; background: #e8875b1c; }
  body.app-body .side > .salon-context { color: #d4ceca !important; border-color: #ffffff18; background: #ffffff08; }
  body.app-body .side > .panel-nav .panel-nav-link {
    color: #bdb8b7 !important;
    border-radius: 14px !important;
    transition: color 180ms var(--md-motion-standard), background 180ms var(--md-motion-standard), transform 180ms var(--md-motion-standard);
  }
  body.app-body .side > .panel-nav .panel-nav-link:hover { color: #fff !important; background: #ffffff0d !important; }
  body.app-body .side > .panel-nav .panel-nav-link.active {
    color: #19382d !important;
    background: #d5eddf !important;
    font-weight: 750;
  }
  body.app-body .side > .panel-nav .panel-nav-link.active svg { color: #315842 !important; }
  body.app-body .side > .side-bottom { border-color: #ffffff1c !important; }
  body.app-body .side .m3-theme-toggle,
  body.app-body .side .public-link,
  body.app-body .side .logout { color: #d0cac8 !important; }
  body.app-body .side .m3-theme-toggle:hover,
  body.app-body .side .public-link:hover,
  body.app-body .side .logout:hover { background: #ffffff0d !important; }
  body.app-body .app-shell > .workspace,
  body.app-body .calendar-shell > .calendar-workspace {
    background: #f0f0ee;
    max-width: 1560px;
  }
  body.app-body .app-shell .page-top h1,
  body.app-body .calendar-shell .page-top h1 { color: #242326; }
  body.app-body .app-shell .page-top p:last-child,
  body.app-body .calendar-shell .page-top p:last-child { color: #68666a; }
  body.app-body .app-shell .stats article {
    min-height: 104px;
    padding: 18px 20px;
    align-content: space-between;
    border: 1px solid #e5e3df;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 22px rgb(35 32 32 / 4%);
    transition: transform 180ms var(--md-motion-standard), box-shadow 180ms var(--md-motion-standard);
  }
  body.app-body .app-shell .stats article:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgb(35 32 32 / 8%); }
  body.app-body .app-shell .stats article span { color: #6e6968; }
  body.app-body .app-shell .stats article strong { color: #242326; font-size: clamp(23px, 2vw, 30px); }
  body.app-body .app-shell .setup-card,
  body.app-body .app-shell .panel-card,
  body.app-body .calendar-shell .panel-card {
    border-color: #e5e3df;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 22px rgb(35 32 32 / 4%);
  }
  body.app-body .app-shell .dashboard-booking {
    border-color: #eceae7;
    border-radius: 14px;
    background: #faf9f7;
  }
}

/* Mobile navigation sits on the screen edge; safe-area space is inside the bar once. */
@media (max-width: 599px) {
  /* A fixed bar was being clipped by the old 480px app shell's overflow rule. */
  body.mobile-body .mobile-app { overflow: visible !important; }
  body.mobile-body .mobile-tabbar {
    position: fixed !important;
    z-index: 1000 !important;
    inset-inline: auto !important;
    inset-block-end: 0 !important;
    left: 50% !important;
    right: auto !important;
    height: calc(68px + env(safe-area-inset-bottom)) !important;
    padding: 5px 10px env(safe-area-inset-bottom) !important;
    transform: translateX(-50%) !important;
    border-top: 1px solid #e8e5e1;
    background: #fffefa;
    box-shadow: 0 -8px 24px rgb(35 32 32 / 6%);
    backdrop-filter: none;
  }
  body.mobile-body .mobile-tabbar a,
  body.mobile-body .mobile-tabbar button {
    position: relative;
    isolation: isolate;
    min-height: 48px;
    border-radius: 999px;
    color: #777477;
    transition: color 180ms var(--md-motion-standard), transform 180ms var(--md-motion-standard);
  }
  body.mobile-body .mobile-tabbar a::before,
  body.mobile-body .mobile-tabbar button::before {
    content: "";
    position: absolute;
    inset: 0 5px;
    z-index: -1;
    border-radius: 999px;
    background: #d5eddf;
    opacity: 0;
    transform: scale(.9);
    transition: opacity 180ms var(--md-motion-standard), transform 220ms var(--md-motion-emphasized);
  }
  body.mobile-body .mobile-tabbar a.is-active::before,
  body.mobile-body .mobile-tabbar button.is-active::before { opacity: 1; transform: scale(1); }
  body.mobile-body .mobile-tabbar a.is-active,
  body.mobile-body .mobile-tabbar button.is-active { color: #244936 !important; }
  body.mobile-body .mobile-tabbar a:active,
  body.mobile-body .mobile-tabbar button:active { transform: scale(.96); }
  body.mobile-body .mobile-tabbar small { font-size: 9px; font-weight: 700; }

  body.app-body .mobile-panel-tabs {
    height: calc(72px + env(safe-area-inset-bottom)) !important;
    padding: 5px 10px env(safe-area-inset-bottom) !important;
    border-top-color: #e8e5e1 !important;
    background: #fffefa !important;
    box-shadow: 0 -8px 24px rgb(35 32 32 / 6%) !important;
  }
  body.app-body .mobile-panel-header {
    background: #fbfaf8 !important;
    box-shadow: 0 3px 14px rgb(35 32 32 / 5%) !important;
  }
  body.app-body .mobile-panel-tab,
  body.app-body .mobile-panel-more > summary { min-height: 54px; border-radius: 999px !important; }
  body.app-body .mobile-panel-tab::before,
  body.app-body .mobile-panel-more > summary::before { inset: 2px 5px !important; border-radius: 999px !important; background: #d5eddf !important; }
  body.app-body .mobile-panel-tab.active,
  body.app-body .mobile-panel-more.active > summary { color: #244936 !important; }
  body.app-body .app-shell > .workspace,
  body.app-body .calendar-shell > .calendar-workspace {
    padding-bottom: calc(88px + env(safe-area-inset-bottom)) !important;
    background: #f6f5f2;
  }
  body.app-body .app-shell .stats article,
  body.app-body .app-shell .panel-card,
  body.app-body .app-shell .setup-card,
  body.app-body .calendar-shell .panel-card {
    border-color: #e8e5e1;
    border-radius: 16px;
    box-shadow: 0 5px 16px rgb(35 32 32 / 4%);
  }
  body.app-body .app-shell .page-top h1,
  body.app-body .calendar-shell .page-top h1 { color: #242326; }
}

/* The dark theme stays legible while preserving the same app navigation geometry. */
body.app-body[data-theme="dark"], body.mobile-body[data-theme="dark"] { color: var(--md-sys-color-on-background); background: var(--md-sys-color-background); }
body.app-body[data-theme="dark"] .app-shell, body.app-body[data-theme="dark"] .calendar-shell,
body.app-body[data-theme="dark"] .admin-shell, body.mobile-body[data-theme="dark"] #mobile-app { background: var(--md-sys-color-surface); color: var(--md-sys-color-on-surface); }
body.mobile-body[data-theme="dark"] .notification-page, body.mobile-body[data-theme="dark"] .invitations-page { background: var(--md-sys-color-surface); color: var(--md-sys-color-on-surface); }
body.app-body[data-theme="dark"] .mobile-panel-header, body.app-body[data-theme="dark"] .mobile-panel-tabs,
body.mobile-body[data-theme="dark"] .discovery-header, body.mobile-body[data-theme="dark"] .mobile-tabbar { background: var(--md-sys-color-surface-container-low); border-color: var(--md-sys-color-outline-variant); }
body.app-body[data-theme="dark"] .mobile-panel-quick-menu, body.app-body[data-theme="dark"] .mobile-panel-more-menu,
body.mobile-body[data-theme="dark"] .ios-install-hint { background: var(--md-sys-color-surface-container-high); color: var(--md-sys-color-on-surface); border-color: var(--md-sys-color-outline-variant); }
body.app-body[data-theme="dark"] .panel-card, body.app-body[data-theme="dark"] .admin-section,
body.app-body[data-theme="dark"] .metrics article, body.mobile-body[data-theme="dark"] .location-card,
body.mobile-body[data-theme="dark"] .salon-card, body.mobile-body[data-theme="dark"] .customer-booking-card,
body.mobile-body[data-theme="dark"] .customer-profile-card, body.mobile-body[data-theme="dark"] .customer-profile-form,
body.mobile-body[data-theme="dark"] .customer-empty, body.mobile-body[data-theme="dark"] .discovery-empty,
body.mobile-body[data-theme="dark"] .profile-dialog { background: var(--md-sys-color-surface-container); color: var(--md-sys-color-on-surface); border-color: var(--md-sys-color-outline-variant); }
body.mobile-body[data-theme="dark"] .notification-item, body.mobile-body[data-theme="dark"] .notification-empty,
body.mobile-body[data-theme="dark"] .invitation-card, body.mobile-body[data-theme="dark"] .invitation-empty { background: var(--md-sys-color-surface-container); color: var(--md-sys-color-on-surface); border-color: var(--md-sys-color-outline-variant); }
body.mobile-body[data-theme="dark"] .notification-heading h1, body.mobile-body[data-theme="dark"] .notification-copy h2,
body.mobile-body[data-theme="dark"] .notification-empty strong, body.mobile-body[data-theme="dark"] .invitations-content h1,
body.mobile-body[data-theme="dark"] .invitation-card h2, body.mobile-body[data-theme="dark"] .invitation-empty strong { color: var(--md-sys-color-on-surface); }
body.mobile-body[data-theme="dark"] .notification-item.is-unread { background: #26352d; border-color: #486553; }
body.mobile-body[data-theme="dark"] .notification-copy p, body.mobile-body[data-theme="dark"] .notification-copy > small,
body.mobile-body[data-theme="dark"] .notification-heading p:last-child, body.mobile-body[data-theme="dark"] .notification-empty p,
body.mobile-body[data-theme="dark"] .invitations-lead, body.mobile-body[data-theme="dark"] .invitation-card > p:not(.mobile-eyebrow),
body.mobile-body[data-theme="dark"] .invitation-card > small, body.mobile-body[data-theme="dark"] .invitation-empty p { color: var(--md-sys-color-on-surface-variant); }
body.mobile-body[data-theme="dark"] .notification-bell, body.mobile-body[data-theme="dark"] .notification-mark,
body.mobile-body[data-theme="dark"] .invitation-empty > span { background: #30483a; color: #c5e0cb; }
body.mobile-body[data-theme="dark"] .notification-item.is-unread .notification-mark { background: #477456; color: #f4fff5; }
body.mobile-body[data-theme="dark"] .invitation-decline { background: var(--md-sys-color-surface-container-low); color: var(--md-sys-color-on-surface); border-color: var(--md-sys-color-outline-variant); }
body.mobile-body[data-theme="dark"] .device-page, body.mobile-body[data-theme="dark"] .support-app { background: var(--md-sys-color-surface); color: var(--md-sys-color-on-surface); }
body.mobile-body[data-theme="dark"] .device-card, body.mobile-body[data-theme="dark"] .device-empty,
body.mobile-body[data-theme="dark"] .support-form, body.mobile-body[data-theme="dark"] .support-ticket,
body.mobile-body[data-theme="dark"] .support-empty, body.mobile-body[data-theme="dark"] .support-notice,
body.mobile-body[data-theme="dark"] .support-thread-heading, body.mobile-body[data-theme="dark"] .support-messages,
body.mobile-body[data-theme="dark"] .support-reply, body.mobile-body[data-theme="dark"] .support-rating,
body.mobile-body[data-theme="dark"] .support-events, body.mobile-body[data-theme="dark"] .help-list > a,
body.mobile-body[data-theme="dark"] .help-article, body.mobile-body[data-theme="dark"] .help-feedback {
  background: var(--md-sys-color-surface-container); color: var(--md-sys-color-on-surface); border-color: var(--md-sys-color-outline-variant);
}
body.mobile-body[data-theme="dark"] .device-content h1, body.mobile-body[data-theme="dark"] .device-details > strong,
body.mobile-body[data-theme="dark"] .device-empty strong, body.mobile-body[data-theme="dark"] .support-app h1,
body.mobile-body[data-theme="dark"] .support-form h2, body.mobile-body[data-theme="dark"] .support-section-head h2,
body.mobile-body[data-theme="dark"] .support-ticket-copy strong, body.mobile-body[data-theme="dark"] .support-empty strong,
body.mobile-body[data-theme="dark"] .help-article h1 { color: var(--md-sys-color-on-surface); }
body.mobile-body[data-theme="dark"] .device-lead, body.mobile-body[data-theme="dark"] .device-details > small,
body.mobile-body[data-theme="dark"] .device-empty span, body.mobile-body[data-theme="dark"] .support-lead,
body.mobile-body[data-theme="dark"] .support-form label, body.mobile-body[data-theme="dark"] .support-ticket-copy small,
body.mobile-body[data-theme="dark"] .support-ticket-copy time, body.mobile-body[data-theme="dark"] .support-empty p,
body.mobile-body[data-theme="dark"] .help-article p { color: var(--md-sys-color-on-surface-variant); }
body.mobile-body[data-theme="dark"] .device-icon, body.mobile-body[data-theme="dark"] .support-ticket-mark { background: #30483a; color: #c5e0cb; }
body.mobile-body[data-theme="dark"] .device-revoke { background: var(--md-sys-color-surface-container-low); color: #f2b8b5; border-color: #754947; }
body.mobile-body[data-theme="dark"] .device-back, body.mobile-body[data-theme="dark"] .help-shortcut,
body.mobile-body[data-theme="dark"] .support-back { color: #b9ddc2; }
body.app-body[data-theme="dark"] .workspace, body.app-body[data-theme="dark"] .calendar-workspace,
body.app-body[data-theme="dark"] .admin-main, body.mobile-body[data-theme="dark"] .mobile-discovery,
body.mobile-body[data-theme="dark"] .customer-page-heading h1, body.mobile-body[data-theme="dark"] .welcome-copy h1 { color: var(--md-sys-color-on-surface); }
body.app-body[data-theme="dark"] .auth-wrap { background: var(--md-sys-color-surface); color: var(--md-sys-color-on-surface); }
body.app-body[data-theme="dark"] .auth-card, body.app-body[data-theme="dark"] .panel-card,
body.app-body[data-theme="dark"] .setup-card, body.app-body[data-theme="dark"] .notice { background: var(--md-sys-color-surface-container); color: var(--md-sys-color-on-surface); border-color: var(--md-sys-color-outline-variant); }
body.app-body[data-theme="dark"] .page-top h1, body.app-body[data-theme="dark"] .panel-card h2,
body.app-body[data-theme="dark"] .panel-card h3, body.app-body[data-theme="dark"] .admin-main h1,
body.app-body[data-theme="dark"] .section-head h2, body.app-body[data-theme="dark"] .setup-card h2 { color: var(--md-sys-color-on-surface); }
body.app-body[data-theme="dark"] .page-top p, body.app-body[data-theme="dark"] .muted,
body.app-body[data-theme="dark"] .section-head p, body.app-body[data-theme="dark"] .setup-card small { color: var(--md-sys-color-on-surface-variant); }
body.app-body[data-theme="dark"] .admin-head { background: var(--md-sys-color-surface-container-low); border-color: var(--md-sys-color-outline-variant); color: var(--md-sys-color-on-surface); }
body.mobile-body[data-theme="dark"] .mobile-brand, body.mobile-body[data-theme="dark"] .customer-page-heading h1 em,
body.mobile-body[data-theme="dark"] .welcome-copy h1 em, body.mobile-body[data-theme="dark"] .discovery-toolbar h2,
body.mobile-body[data-theme="dark"] .customer-empty > strong, body.mobile-body[data-theme="dark"] .customer-booking-card h2 { color: var(--md-sys-color-on-surface); }
body.mobile-body[data-theme="dark"] .mobile-auth, body.mobile-body[data-theme="dark"] .auth-step h1,
body.mobile-body[data-theme="dark"] .mobile-topbar, body.mobile-body[data-theme="dark"] .mobile-form > label,
body.mobile-body[data-theme="dark"] .customer-profile-form label { color: var(--md-sys-color-on-surface); }
body.mobile-body[data-theme="dark"] .phone-field, body.mobile-body[data-theme="dark"] .name-field,
body.mobile-body[data-theme="dark"] .otp-entry, body.mobile-body[data-theme="dark"] .mobile-secondary,
body.mobile-body[data-theme="dark"] .customer-profile-form input { background: var(--md-sys-color-surface-container-low); color: var(--md-sys-color-on-surface); border-color: var(--md-sys-color-outline); }
body.mobile-body[data-theme="dark"] .mobile-lead, body.mobile-body[data-theme="dark"] .field-hint,
body.mobile-body[data-theme="dark"] .mobile-legal, body.mobile-body[data-theme="dark"] .customer-page-heading > p:last-child,
body.mobile-body[data-theme="dark"] .welcome-copy > p:last-child, body.mobile-body[data-theme="dark"] .location-copy span { color: var(--md-sys-color-on-surface-variant); }
body.app-body[data-theme="dark"] .mobile-panel-salon strong, body.app-body[data-theme="dark"] .mobile-panel-quick-menu a,
body.app-body[data-theme="dark"] .mobile-panel-more-menu a, body.app-body[data-theme="dark"] .mobile-panel-more-menu button,
body.mobile-body[data-theme="dark"] .location-copy strong, body.mobile-body[data-theme="dark"] .salon-card-title h3,
body.mobile-body[data-theme="dark"] .customer-profile-card > div strong { color: var(--md-sys-color-on-surface); }
body.app-body[data-theme="dark"] input, body.app-body[data-theme="dark"] select, body.app-body[data-theme="dark"] textarea,
body.mobile-body[data-theme="dark"] input, body.mobile-body[data-theme="dark"] select, body.mobile-body[data-theme="dark"] textarea { background-color: var(--md-sys-color-surface-container-low); color: var(--md-sys-color-on-surface); border-color: var(--md-sys-color-outline); color-scheme: dark; }

/* Fixed navigation must escape the legacy clipped phone-frame at every viewport width. */
body.mobile-body .mobile-app { overflow: visible !important; }
body.mobile-body .mobile-tabbar {
  position: fixed !important;
  z-index: 1000 !important;
  inset-inline: auto !important;
  inset-block-end: calc(10px + env(safe-area-inset-bottom)) !important;
  left: 50% !important;
  right: auto !important;
  width: min(calc(100vw - 28px), 456px) !important;
  height: 70px !important;
  margin: 0 !important;
  padding: 7px 8px !important;
  display: grid !important;
  align-items: center;
  border: 1px solid #ffffff1a !important;
  border-radius: 23px !important;
  background: #252427 !important;
  box-shadow: 0 12px 34px rgb(24 22 24 / 26%) !important;
  transform: translateX(-50%) !important;
  backdrop-filter: none !important;
}
body.mobile-body .mobile-tabbar a,
body.mobile-body .mobile-tabbar button {
  position: relative;
  z-index: 0;
  min-width: 0;
  min-height: 54px;
  padding: 2px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #c7c2c1 !important;
  font: 650 9px/1.3 Vazir, Tahoma, sans-serif;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: color 180ms var(--md-motion-standard), transform 180ms var(--md-motion-standard);
}
body.mobile-body .mobile-tabbar a::before,
body.mobile-body .mobile-tabbar button::before { display: none !important; }
body.mobile-body .mobile-tabbar a > span:first-child,
body.mobile-body .mobile-tabbar button > span:first-child {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: inherit;
  transition: color 180ms var(--md-motion-standard), background 180ms var(--md-motion-standard), transform 220ms var(--md-motion-emphasized);
}
body.mobile-body .mobile-tabbar svg { width: 20px; height: 20px; display: block; }
body.mobile-body .mobile-tabbar small { max-width: 100%; overflow: hidden; color: inherit; font-size: 9px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
body.mobile-body .mobile-tabbar a.is-active,
body.mobile-body .mobile-tabbar button.is-active { color: #244936 !important; }
body.mobile-body .mobile-tabbar a.is-active > span:first-child,
body.mobile-body .mobile-tabbar button.is-active > span:first-child {
  background: transparent;
  color: inherit;
  transform: translateY(-1px) scale(1.03);
}
body.mobile-body .mobile-tabbar a:active,
body.mobile-body .mobile-tabbar button:active { transform: scale(.95); }

body.app-body .app-shell,
body.app-body .calendar-shell { overflow: visible !important; }
body.app-body .mobile-panel-tabs {
  position: fixed !important;
  z-index: 1000 !important;
  inset-inline: auto !important;
  inset-block-end: calc(10px + env(safe-area-inset-bottom)) !important;
  left: 50% !important;
  right: auto !important;
  width: min(calc(100vw - 28px), 456px) !important;
  height: 70px !important;
  margin: 0 !important;
  padding: 7px 8px !important;
  display: grid !important;
  align-items: center;
  border: 1px solid #ffffff1a !important;
  border-radius: 23px !important;
  background: #252427 !important;
  box-shadow: 0 12px 34px rgb(24 22 24 / 26%) !important;
  transform: translateX(-50%) !important;
}
body.app-body .mobile-panel-tab,
body.app-body .mobile-panel-more > summary,
body.app-body .mobile-panel-action {
  min-width: 0;
  min-height: 54px;
  margin: 0;
  padding: 2px 3px;
  gap: 1px;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
  color: #c7c2c1;
  font: 650 9px/1.3 Vazir, Tahoma, sans-serif;
}
body.app-body .mobile-panel-tab::before,
body.app-body .mobile-panel-more > summary::before { display: none !important; }
body.app-body .mobile-panel-tab svg,
body.app-body .mobile-panel-more > summary > svg,
body.app-body .mobile-panel-action svg { width: 20px; height: 20px; color: inherit; }
body.app-body .mobile-panel-tab.active,
body.app-body .mobile-panel-more.active > summary { color: #fff !important; }
body.app-body .mobile-panel-tab.active svg,
body.app-body .mobile-panel-more.active > summary > svg {
  box-sizing: content-box;
  width: 20px;
  height: 20px;
  padding: 8px;
  border-radius: 50%;
  background: #e47b52;
  color: #fff !important;
  transform: translateY(-2px);
}
body.app-body .mobile-panel-action { color: #fff; }
body.app-body .mobile-panel-action svg {
  box-sizing: content-box;
  padding: 8px;
  border-radius: 50%;
  background: #e47b52;
}
body.app-body .mobile-panel-tab small,
body.app-body .mobile-panel-more > summary > small,
body.app-body .mobile-panel-action small { color: inherit; font-size: 9px; }
/* Customer and salon navigation share one rounded, moving destination pill. */
body.mobile-body .mobile-tabbar .m3-nav-indicator {
  z-index: 0;
  top: 8px;
  bottom: 8px;
  left: 0;
  right: auto;
  height: auto;
  width: calc(var(--nav-width, 0px) - 12px);
  border-radius: 21px;
  background: #d5ebdf;
  box-shadow: inset 0 1px 0 #ffffffb5;
  transform: translateX(calc(var(--nav-x, 0px) + 6px));
}
body.mobile-body .mobile-tabbar.is-nav-ready .m3-nav-indicator {
  opacity: 1;
  transition: transform 360ms cubic-bezier(.2,.8,.2,1), width 240ms cubic-bezier(.2,.8,.2,1), background-color 200ms ease;
}
body.mobile-body[data-theme="dark"] .mobile-tabbar .m3-nav-indicator {
  background: #385b48;
  box-shadow: inset 0 1px 0 #ffffff12;
}
body.mobile-body[data-theme="dark"] .mobile-tabbar a.is-active,
body.mobile-body[data-theme="dark"] .mobile-tabbar button.is-active { color: #e8f5eb !important; }
body.mobile-body .mobile-tabbar .m3-nav-indicator::after,
body.app-body .mobile-panel-tabs .m3-nav-indicator::after {
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 42px;
  height: 10px;
  border-radius: 0 0 50% 50%;
  background: inherit;
  content: "";
  transform: translateX(-50%);
}

/* Salon navigation shares the same rounded destination pill as the customer app. */
body.app-body .mobile-panel-tabs {
  height: 76px !important;
  inset-block-end: calc(12px + env(safe-area-inset-bottom)) !important;
  padding: 7px 8px !important;
  border: 1px solid #e8dfd9 !important;
  border-radius: 25px !important;
  background: #fffdfaf5 !important;
  box-shadow: 0 10px 30px #35271f18, 0 2px 6px #35271f0b !important;
  backdrop-filter: blur(18px);
}
body.app-body .mobile-panel-tabs .m3-nav-indicator {
  z-index: 0;
  top: 8px;
  bottom: 8px;
  left: 0;
  right: auto;
  height: auto;
  width: calc(var(--nav-width, 0px) - 12px);
  border-radius: 21px;
  background: #d5ebdf;
  box-shadow: inset 0 1px 0 #ffffffb5;
  transform: translateX(calc(var(--nav-x, 0px) + 6px));
}
body.app-body .mobile-panel-tabs.is-nav-ready .m3-nav-indicator {
  transition: transform 360ms cubic-bezier(.2,.8,.2,1), width 240ms cubic-bezier(.2,.8,.2,1), background-color 200ms ease;
}
body.app-body .mobile-panel-tab.active,
body.app-body .mobile-panel-more.active > summary { color: #244936 !important; }
body.app-body .mobile-panel-tab.active svg,
body.app-body .mobile-panel-more.active > summary > svg {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit !important;
  transform: translateY(-1px);
}
body.app-body .mobile-panel-tab.active small,
body.app-body .mobile-panel-more.active > summary > small { font-weight: 850; }
body.app-body[data-theme="dark"] .mobile-panel-tabs {
  border-color: #413b43 !important;
  background: #29252c !important;
  box-shadow: 0 10px 30px #09080a70 !important;
}
body.app-body[data-theme="dark"] .mobile-panel-tabs .m3-nav-indicator {
  background: #385b48;
  box-shadow: inset 0 1px 0 #ffffff12;
}
body.app-body[data-theme="dark"] .mobile-panel-tab.active,
body.app-body[data-theme="dark"] .mobile-panel-more.active > summary { color: #e8f5eb !important; }
@media (prefers-reduced-motion: reduce) {
  body.app-body .mobile-panel-tabs .m3-nav-indicator { transition-duration: .01ms !important; }
}

/* Installed PWA uses the available device canvas; desktop browser previews retain a phone canvas. */
@media (display-mode: standalone) {
  body.mobile-body .mobile-app {
    width: min(100%, 480px);
    min-height: 100dvh;
    box-shadow: none;
  }
}
@media (display-mode: standalone) and (min-width: 720px) {
  body.mobile-body .mobile-app { width: min(100%, 760px); }
  body.mobile-body .mobile-discovery { max-width: 760px; margin-inline: auto; }
}

/* Bring platform administration into the same graphite and stone workspace. */
@media (min-width: 600px) {
  body.app-body .admin-shell { background: #f0f0ee; color: #242326; }
  body.app-body .admin-head {
    position: sticky;
    top: 0;
    z-index: 25;
    min-height: 68px;
    background: #252427;
    border-color: #3b393c;
    color: #f7f5f2;
    box-shadow: 0 5px 20px rgb(24 22 24 / 12%);
  }
  body.app-body .admin-head .brand { color: #fff; }
  body.app-body .admin-head a:last-child { color: #f0a17d; }
  body.app-body .admin-main { max-width: 1260px; color: #242326; }
  body.app-body .admin-main h1 { color: #242326; }
  body.app-body .admin-main .muted,
  body.app-body .admin-main .section-head p { color: #68666a; }
  body.app-body .admin-main .metrics article,
  body.app-body .admin-main .admin-section {
    border-color: #e5e3df;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 22px rgb(35 32 32 / 4%);
  }
  body.app-body .admin-main .metrics strong { color: #242326; }
  body.app-body .admin-main .section-head h2 { color: #242326; }
}

@media (prefers-reduced-motion: reduce) {
  body.mobile-body .mobile-tabbar *, body.app-body .mobile-panel-tabs * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
body.platform-admin-body .admin-main,
body.platform-admin-body .support-app {
  padding-bottom: calc(155px + env(safe-area-inset-bottom)) !important;
}

@media (min-width: 900px) {
  body.app-body.platform-admin-body .admin-shell {
    width: 100% !important;
    max-width: none !important;
    box-shadow: none !important;
  }
  body.app-body.platform-admin-body .admin-shell .admin-main {
    width: min(1320px, calc(100% - 64px)) !important;
    max-width: none !important;
    margin: 32px auto 0 !important;
    padding: 18px 0 calc(155px + env(safe-area-inset-bottom)) !important;
  }
  body.app-body.platform-admin-body .admin-shell .metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  body.app-body.platform-admin-body .admin-shell .plan-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  body.app-body.platform-admin-body .admin-shell .plan-form {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}
@media (min-width: 600px) {
  body.app-body[data-theme="dark"] .admin-shell { background: var(--md-sys-color-background); color: var(--md-sys-color-on-background); }
  body.app-body[data-theme="dark"] .admin-head { background: var(--md-sys-color-surface-container-high); border-color: var(--md-sys-color-outline-variant); color: var(--md-sys-color-on-surface); }
  body.app-body[data-theme="dark"] .admin-main .metrics article,
  body.app-body[data-theme="dark"] .admin-main .admin-section { background: var(--md-sys-color-surface-container); border-color: var(--md-sys-color-outline-variant); }
  body.app-body[data-theme="dark"] .admin-main h1,
  body.app-body[data-theme="dark"] .admin-main .section-head h2,
  body.app-body[data-theme="dark"] .admin-main .metrics strong { color: var(--md-sys-color-on-surface); }
}

/* Wide browser previews remain the same handset app that ships in the native wrapper. */
@media (min-width: 600px) {
  body.app-body .app-shell,
  body.app-body .calendar-shell {
    display: block !important;
    width: min(100vw, 480px) !important;
    max-width: 480px !important;
    min-height: 100dvh;
    margin-inline: auto !important;
    padding: 0 0 calc(92px + env(safe-area-inset-bottom)) !important;
    overflow: visible !important;
    background: #fbf8f5 !important;
    box-shadow: 0 0 46px #21182018 !important;
  }
  body.app-body .app-shell > .side,
  body.app-body .calendar-shell > .side {
    position: absolute !important;
    inset: 0 0 auto !important;
    z-index: 30;
    display: block !important;
    width: auto !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  body.app-body .side > .brand,
  body.app-body .side > .salon-context,
  body.app-body .side > .panel-nav,
  body.app-body .side > .side-bottom { display: none !important; }
  body.app-body .mobile-panel-header,
  body.app-body .mobile-panel-tabs {
    display: flex !important;
    width: min(100vw, 480px) !important;
    margin-inline: auto !important;
  }
  body.app-body .mobile-panel-tabs { display: grid !important; }
  body.app-body .app-shell > .workspace,
  body.app-body .calendar-shell > .calendar-workspace {
    display: block !important;
    grid-column: auto !important;
    grid-row: auto !important;
    width: 100% !important;
    max-width: 480px !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    padding: calc(82px + env(safe-area-inset-top)) 16px calc(100px + env(safe-area-inset-bottom)) !important;
    background: #fbf8f5 !important;
  }
  body.app-body .app-shell .page-top,
  body.app-body .calendar-shell .page-top {
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-bottom: 18px !important;
  }
  body.app-body .app-shell .page-top > .button,
  body.app-body .calendar-shell .page-top > .button { width: 100%; min-height: 48px; justify-content: center; }
  body.app-body .app-shell .top-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  body.app-body .app-shell .top-actions .button { min-width: 0; padding: 9px; font-size: 11px; }
  body.app-body .app-shell .form-grid,
  body.app-body .app-shell .branch-form { grid-template-columns: minmax(0, 1fr) !important; gap: 14px; }
  body.app-body .app-shell .branch-form .wide { grid-column: auto !important; }
  body.app-body .app-shell .branch-form .button,
  body.app-body .app-shell .form-grid > .button { width: 100%; min-height: 48px; justify-self: stretch; }
  body.app-body .app-shell .panel-card,
  body.app-body .app-shell .admin-section,
  body.app-body .calendar-shell .panel-card { margin: 13px 0; padding: 17px; border-radius: 16px; }
  body.app-body .admin-shell .plan-grid,
  body.app-body .admin-shell .plan-form { grid-template-columns: minmax(0, 1fr) !important; }
  body.app-body .admin-shell {
    width: min(100vw, 480px) !important;
    max-width: 480px !important;
    min-height: 100dvh;
    margin-inline: auto !important;
    overflow: visible !important;
    background: #fbf8f5 !important;
    box-shadow: 0 0 46px #21182018 !important;
  }
  body.app-body .admin-main {
    width: 100% !important;
    max-width: 480px !important;
    margin: 0 auto !important;
    padding: 23px 14px calc(100px + env(safe-area-inset-bottom)) !important;
  }
  body.app-body .auth-wrap,
  body.app-body .auth-wrap.auth-wide {
    width: min(100vw, 480px) !important;
    max-width: 480px !important;
    min-height: 100dvh;
    margin-inline: auto !important;
    padding: calc(54px + env(safe-area-inset-top)) 20px 40px !important;
  }
  body.app-body[data-theme="dark"] .app-shell,
  body.app-body[data-theme="dark"] .calendar-shell,
  body.app-body[data-theme="dark"] .admin-shell,
  body.app-body[data-theme="dark"] .auth-wrap {
    background: var(--md-sys-color-surface) !important;
    color: var(--md-sys-color-on-surface) !important;
  }
  body.app-body[data-theme="dark"] .app-shell > .workspace,
  body.app-body[data-theme="dark"] .calendar-shell > .calendar-workspace,
  body.app-body[data-theme="dark"] .admin-main { background: var(--md-sys-color-background) !important; }
}

/* A raised circular destination with a clear surface gap, shared by every app tab bar. */
body.mobile-body .mobile-tabbar .m3-nav-indicator,
body.app-body .mobile-panel-tabs .m3-nav-indicator {
  position: absolute !important;
  z-index: 0 !important;
  top: -16px !important;
  bottom: auto !important;
  left: calc(var(--nav-x, 50%) - 34px) !important;
  right: auto !important;
  width: 68px !important;
  height: 68px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: var(--md-sys-color-surface, #fbf8f5) !important;
  box-shadow: none !important;
  opacity: 0;
  transform: none !important;
  transition: left 420ms cubic-bezier(.2,.8,.2,1), opacity 180ms ease !important;
}
body.mobile-body .mobile-tabbar.is-nav-ready .m3-nav-indicator,
body.app-body .mobile-panel-tabs.is-nav-ready .m3-nav-indicator { opacity: 1; }
body.mobile-body .mobile-tabbar .m3-nav-indicator::after,
body.app-body .mobile-panel-tabs .m3-nav-indicator::after {
  position: absolute;
  top: 10px;
  bottom: auto;
  left: 50%;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #d5ebdf;
  box-shadow: 0 4px 12px #10281b20, inset 0 1px 0 #ffffffbd;
  content: "";
  transform: translateX(-50%);
  transition: background-color 180ms ease, box-shadow 180ms ease;
}
body.mobile-body .mobile-tabbar a.is-active,
body.mobile-body .mobile-tabbar button.is-active,
body.app-body .mobile-panel-tab.active,
body.app-body .mobile-panel-more.active > summary { color: #d5ebdf !important; }
body.mobile-body .mobile-tabbar a.is-active > span:first-child,
body.mobile-body .mobile-tabbar button.is-active > span:first-child,
body.app-body .mobile-panel-tab.active > svg,
body.app-body .mobile-panel-more.active > summary > svg {
  position: relative;
  z-index: 2;
  color: #244936 !important;
  background: transparent !important;
  animation: nobatis-tab-lift 360ms cubic-bezier(.2,.8,.2,1) both;
}
body.mobile-body .mobile-tabbar a.is-active small,
body.mobile-body .mobile-tabbar button.is-active small,
body.app-body .mobile-panel-tab.active small,
body.app-body .mobile-panel-more.active > summary > small {
  position: relative;
  z-index: 2;
  color: #d5ebdf !important;
  transform: translateY(6px);
  transition: transform 220ms cubic-bezier(.2,.8,.2,1), color 180ms ease;
}
body.mobile-body .mobile-tabbar[data-workspace] .m3-nav-indicator,
body.app-body .mobile-panel-tabs[data-workspace] .m3-nav-indicator { left: calc(var(--nav-x, 50%) - 34px) !important; }
body.mobile-body[data-theme="dark"] .mobile-tabbar .m3-nav-indicator,
body.app-body[data-theme="dark"] .mobile-panel-tabs .m3-nav-indicator { background: var(--md-sys-color-surface, #26232a) !important; }
body.mobile-body[data-theme="dark"] .mobile-tabbar .m3-nav-indicator::after,
body.app-body[data-theme="dark"] .mobile-panel-tabs .m3-nav-indicator::after {
  background: #385b48;
  box-shadow: 0 4px 12px #00000042, inset 0 1px 0 #ffffff22;
}
body.mobile-body[data-theme="dark"] .mobile-tabbar a.is-active,
body.mobile-body[data-theme="dark"] .mobile-tabbar button.is-active,
body.app-body[data-theme="dark"] .mobile-panel-tab.active,
body.app-body[data-theme="dark"] .mobile-panel-more.active > summary { color: #e8f5eb !important; }
body.mobile-body[data-theme="dark"] .mobile-tabbar a.is-active > span:first-child,
body.mobile-body[data-theme="dark"] .mobile-tabbar button.is-active > span:first-child,
body.app-body[data-theme="dark"] .mobile-panel-tab.active > svg,
body.app-body[data-theme="dark"] .mobile-panel-more.active > summary > svg { color: #e8f5eb !important; }
@keyframes nobatis-tab-lift {
  0% { transform: translateY(2px) scale(.86); }
  70% { transform: translateY(-11px) scale(1.08); }
  100% { transform: translateY(-10px) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  body.mobile-body .mobile-tabbar .m3-nav-indicator,
  body.app-body .mobile-panel-tabs .m3-nav-indicator,
  body.mobile-body .mobile-tabbar a.is-active > span:first-child,
  body.mobile-body .mobile-tabbar button.is-active > span:first-child,
  body.app-body .mobile-panel-tab.active > svg,
  body.app-body .mobile-panel-more.active > summary > svg { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* The bar is one continuous SVG surface; its cradle follows the floating tab. */
body.mobile-body .mobile-tabbar,
body.app-body .mobile-panel-tabs {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
body.mobile-body[data-theme="dark"] .mobile-tabbar,
body.app-body[data-theme="dark"] .mobile-panel-tabs {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
body.mobile-body .mobile-tabbar .nav-shape,
body.app-body .mobile-panel-tabs .nav-shape {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(0 12px 20px rgb(24 22 24 / 26%));
  transition: opacity 160ms ease;
}
body.mobile-body .mobile-tabbar.is-nav-ready .nav-shape,
body.app-body .mobile-panel-tabs.is-nav-ready .nav-shape { opacity: 1; }
body.mobile-body .mobile-tabbar .nav-shape path,
body.app-body .mobile-panel-tabs .nav-shape path {
  fill: #fffdfa;
}
body.mobile-body .mobile-tabbar a,
body.mobile-body .mobile-tabbar button,
body.app-body .mobile-panel-tab,
body.app-body .mobile-panel-more > summary { color: #625e60 !important; }
body.mobile-body .mobile-tabbar a.is-active,
body.mobile-body .mobile-tabbar button.is-active,
body.app-body .mobile-panel-tab.active,
body.app-body .mobile-panel-more.active > summary { color: #244936 !important; }
body.mobile-body .mobile-tabbar a.is-active small,
body.mobile-body .mobile-tabbar button.is-active small,
body.app-body .mobile-panel-tab.active small,
body.app-body .mobile-panel-more.active > summary > small { color: #244936 !important; }
body.mobile-body .mobile-tabbar .nav-shape,
body.app-body .mobile-panel-tabs .nav-shape {
  filter: drop-shadow(0 12px 24px rgb(40 33 29 / 14%));
}
body.mobile-body[data-theme="dark"] .mobile-tabbar .nav-shape,
body.app-body[data-theme="dark"] .mobile-panel-tabs .nav-shape {
  filter: drop-shadow(0 12px 22px #00000055);
}
body.mobile-body[data-theme="dark"] .mobile-tabbar .nav-shape path,
body.app-body[data-theme="dark"] .mobile-panel-tabs .nav-shape path { fill: #29252c; }
body.mobile-body[data-theme="dark"] .mobile-tabbar a,
body.mobile-body[data-theme="dark"] .mobile-tabbar button,
body.app-body[data-theme="dark"] .mobile-panel-tab,
body.app-body[data-theme="dark"] .mobile-panel-more > summary { color: #c7c2c1 !important; }
body.mobile-body[data-theme="dark"] .mobile-tabbar a.is-active,
body.mobile-body[data-theme="dark"] .mobile-tabbar button.is-active,
body.app-body[data-theme="dark"] .mobile-panel-tab.active,
body.app-body[data-theme="dark"] .mobile-panel-more.active > summary,
body.mobile-body[data-theme="dark"] .mobile-tabbar a.is-active small,
body.mobile-body[data-theme="dark"] .mobile-tabbar button.is-active small,
body.app-body[data-theme="dark"] .mobile-panel-tab.active small,
body.app-body[data-theme="dark"] .mobile-panel-more.active > summary > small { color: #e8f5eb !important; }
body.mobile-body .mobile-tabbar .m3-nav-indicator,
body.app-body .mobile-panel-tabs .m3-nav-indicator {
  position: absolute !important;
  z-index: 0 !important;
  top: var(--nav-orb-top, -21px) !important;
  bottom: auto !important;
  left: calc(var(--nav-x, 50%) - var(--nav-orb-size, 53px) / 2) !important;
  right: auto !important;
  width: var(--nav-orb-size, 53px) !important;
  height: var(--nav-orb-size, 53px) !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: #fffdfa !important;
  box-shadow: 0 3px 9px rgb(35 29 26 / 5%) !important;
  opacity: 0;
  transform: none !important;
  transition: opacity 160ms ease !important;
}
body.mobile-body .mobile-tabbar.is-nav-ready .m3-nav-indicator,
body.app-body .mobile-panel-tabs.is-nav-ready .m3-nav-indicator { opacity: 1; }
body.mobile-body .mobile-tabbar .m3-nav-indicator::after,
body.app-body .mobile-panel-tabs .m3-nav-indicator::after {
  display: none !important;
}
/* Match the reference's visibly lifted icon; the label stays seated on the bar. */
body.mobile-body .mobile-tabbar a.is-active > span:first-child,
body.mobile-body .mobile-tabbar button.is-active > span:first-child {
  position: relative;
  z-index: 2;
  background: transparent !important;
  transform: translateY(var(--nav-icon-lift, -21px)) scale(1.13) !important;
  transition: transform 500ms cubic-bezier(.2,.85,.2,1), color 250ms ease !important;
}
body.app-body .mobile-panel-tab.active svg,
body.app-body .mobile-panel-more.active > summary > svg {
  position: relative;
  z-index: 2;
  transform: translateY(var(--nav-icon-lift, -21px)) scale(1.13) !important;
  transition: transform 300ms cubic-bezier(.2,.8,.2,1), color 180ms ease !important;
}
body.mobile-body[data-theme="dark"] .mobile-tabbar .m3-nav-indicator,
body.app-body[data-theme="dark"] .mobile-panel-tabs .m3-nav-indicator { background: #26232a !important; }
body.mobile-body[data-theme="dark"] .mobile-tabbar .m3-nav-indicator::after,
body.app-body[data-theme="dark"] .mobile-panel-tabs .m3-nav-indicator::after {
  background: #385b48;
  box-shadow: 0 4px 12px #00000042, inset 0 1px 0 #ffffff22;
}
@media (prefers-reduced-motion: reduce) {
  body.mobile-body .mobile-tabbar .nav-shape,
  body.app-body .mobile-panel-tabs .nav-shape,
  body.mobile-body .mobile-tabbar .m3-nav-indicator,
  body.app-body .mobile-panel-tabs .m3-nav-indicator { transition-duration: .01ms !important; }
}

/* Preserve the selected orb across PHP route changes, so tab taps sweep instead of flashing. */
@view-transition { navigation: auto; }
body.mobile-body .mobile-tabbar .m3-nav-indicator,
body.app-body .mobile-panel-tabs .m3-nav-indicator { view-transition-name: nobatis-selected-tab; }
::view-transition-group(nobatis-selected-tab) {
  animation-duration: 460ms;
  animation-timing-function: cubic-bezier(.2,.85,.2,1);
}
::view-transition-old(root) { animation: nobatis-route-out 100ms ease-out both; }
::view-transition-new(root) { animation: nobatis-route-in 180ms ease-out both; }
@keyframes nobatis-route-out { to { opacity: 0; } }
@keyframes nobatis-route-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(nobatis-selected-tab),
  ::view-transition-old(root),
  ::view-transition-new(root) { animation-duration: 1ms !important; }
}

/* Platform pages must never inherit the salon workspace navigation. Keep this
   after the shared app-body rules, which use !important to show mobile bars. */
body.app-body.platform-admin-body .app-shell > .side > .mobile-panel-header,
body.app-body.platform-admin-body .app-shell > .side > .mobile-panel-tabs,
body.app-body.platform-admin-body #salon-reference-nav,
body.app-body.platform-admin-body #salon-reference-menu {
  display: none !important;
}
