/*!
 * Zenora — Salon Management PWA
 * © 2026 Marius Costaru. Toate drepturile rezervate.
 * Utilizarea neautorizată este interzisă.
 */
/* ===== ZENORA — Apple-inspired Salon OS, Mobile-first ===== */

/* === TOKENS === */
:root {
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  /* Safe-area insets exposed as JS-readable CSS vars */
  --sat: env(safe-area-inset-top,    0px);
  --sab: env(safe-area-inset-bottom, 0px);

  /* Backgrounds */
  --bg:        #F2F2F7;
  --surface:   #FFFFFF;
  --surface-2: #F2F2F7;
  --surface-3: #E5E5EA;

  /* Text */
  --ink:   #000000;
  --ink-2: rgba(60,60,67,0.85);
  --muted: #8E8E93;

  /* Lines */
  --line:        rgba(60,60,67,0.13);
  --line-strong: rgba(60,60,67,0.28);

  /* Brand — premium glass */
  --accent:      #1C1C1E;
  --accent-dark: #000000;
  --accent-bg:   rgba(28,28,30,0.06);
  --accent-glow: rgba(28,28,30,0.16);
  --accent-contrast: #FFFFFF;
  --accent-rgb: 28,28,30;

  /* System semantic */
  --green:      #34C759;
  --green-bg:   rgba(52,199,89,0.11);
  --orange:     #7C3AED;
  --orange-bg:  rgba(124,58,237,0.13);
  --blue:       #007AFF;
  --blue-bg:    rgba(0,122,255,0.11);
  --red:        #FF3B30;
  --red-bg:     rgba(255,59,48,0.11);

  /* Layout */
  --topbar-h:   56px;
  --bottomnav-h: 82px;
  --sidebar-w:  264px;

  /* Radius */
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-full: 9999px;

  /* Shadow */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:    0 2px 12px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.11), 0 2px 8px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 64px rgba(0,0,0,0.16), 0 8px 24px rgba(0,0,0,0.08);

  /* Motion */
  --ease:       cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out:   cubic-bezier(0.0, 0.0, 0.2, 1);
  --ease-spring:cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur:        0.25s;
  --dur-fast:   0.15s;
  --dur-slow:   0.4s;
}

@media (max-width: 1023px) {
  :root {
    --bg: #F7F7F4;
    --surface: #FFFFFF;
    --surface-2: #F1F1EF;
    --surface-3: #E8E8E4;
    --line: rgba(17,17,17,0.08);
    --line-strong: rgba(17,17,17,0.14);
    --bottomnav-h: 108px;
    --r: 14px;
    --r-lg: 18px;
    --r-xl: 24px;
  }
}

/* Dark mode */
[data-theme="dark"] {
  --bg:          #000000;
  --surface:     #1C1C1E;
  --surface-2:   #2C2C2E;
  --surface-3:   #3A3A3C;
  --ink:         #FFFFFF;
  --ink-2:       rgba(235,235,245,0.85);
  --muted:       #636366;
  --line:        rgba(84,84,88,0.55);
  --line-strong: rgba(84,84,88,0.80);
  --accent:      #F5F5F7;
  --accent-dark: #FFFFFF;
  --accent-bg:   rgba(245,245,247,0.10);
  --accent-glow: rgba(0,0,0,0.45);
  --accent-contrast: #1C1C1E;
  --accent-rgb: 245,245,247;
  --green-bg:    rgba(52,199,89,0.15);
  --orange-bg:   rgba(167,139,250,0.18);
  --blue-bg:     rgba(0,122,255,0.15);
  --red-bg:      rgba(255,59,48,0.15);
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.40);
  --shadow:      0 2px 12px rgba(0,0,0,0.50), 0 1px 4px rgba(0,0,0,0.35);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.65);
  --shadow-xl:   0 20px 64px rgba(0,0,0,0.75);
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
  min-height: 100vh;
  min-height: 100dvh; /* dvh = viewport vizibil; evită gap-ul de jos pe iOS Safari */
}
button { cursor: pointer; border: none; background: none; color: inherit; font-family: inherit; font-size: inherit; -webkit-tap-highlight-color: transparent; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); text-decoration: none; }

/* === AUTH GATE === */
.auth-loading .topbar,
.auth-loading .sidebar,
.auth-loading .content,
.auth-loading .bottom-nav,
.auth-loading #salonSetupOverlay,
.auth-loading #trialExpiredOverlay,
.salon-boot-loading .topbar,
.salon-boot-loading .sidebar,
.salon-boot-loading .content,
.salon-boot-loading .bottom-nav,
.salon-boot-loading #salonSetupOverlay,
.salon-boot-loading #trialExpiredOverlay,
.salon-boot-loading #platformAdminLanding,
.salon-boot-loading #superAdminPanel,
.auth-signed-out .topbar,
.auth-signed-out .sidebar,
.auth-signed-out .content,
.auth-signed-out .bottom-nav,
.auth-signed-out #salonSetupOverlay,
.auth-signed-out #trialExpiredOverlay,
.auth-signed-out #platformAdminLanding,
.auth-signed-out #superAdminPanel {
  display: none !important;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 0%, rgba(10, 132, 255, 0.13), transparent 34%),
    var(--bg);
}

/* Only show auth screen when Firebase has confirmed no user — never during resolution */
.auth-signed-out .auth-screen {
  display: flex;
}

/* Show boot screen while Firebase resolves auth state from IndexedDB */
.auth-loading .salon-boot-screen,
.salon-boot-loading .salon-boot-screen {
  display: flex;
}

.salon-boot-screen {
  position: fixed;
  inset: 0;
  z-index: 19990;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 0%, rgba(100, 210, 255, 0.12), transparent 34%),
    var(--bg);
}

.salon-boot-card {
  width: min(100%, 390px);
  padding: 24px;
  border-radius: 26px;
  background: var(--card);
  border: 0.5px solid var(--line);
  box-shadow: var(--shadow-lg);
}

.salon-boot-title {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.06;
  letter-spacing: -0.3px;
}

.salon-boot-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  font-weight: 600;
}

.salon-boot-error {
  min-height: 18px;
  margin-top: 12px;
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
}

.salon-boot-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.salon-boot-actions[hidden] {
  display: none !important;
}

.auth-card {
  width: min(100%, 390px);
  padding: 26px;
  border-radius: 28px;
  background: var(--card);
  border: 0.5px solid var(--line);
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  font-size: 25px;
  font-weight: 900;
  font-style: italic;
  margin-bottom: 18px;
  box-shadow: 0 10px 30px var(--accent-glow);
}

.auth-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.auth-title {
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.4px;
}

.auth-subtitle {
  margin: 10px 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  font-weight: 600;
}

.auth-error {
  min-height: 20px;
  margin: 12px 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
}

.auth-card .btn + .btn {
  margin-top: 10px;
}

.auth-footnote {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.auth-logout-mobile {
  min-width: 46px;
  height: 38px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 800;
  padding: 0 12px;
}

[data-theme="dark"] .auth-card {
  background: rgba(28,28,30,0.94);
}

/* === TOPBAR (Mobile only) === */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: rgba(242,242,247,0.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 0.5px solid var(--line-strong);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 10px;
}
[data-theme="dark"] .topbar {
  background: rgba(0,0,0,0.88);
}
.topbar-logo {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: 9px;
  display: grid; place-items: center;
  font-size: 15px;
  font-weight: 800;
  color: white;
  font-style: italic;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px var(--accent-glow);
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
  flex: 1;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.topbar-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.4px;
  flex: 1;
}
.topbar-page-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  flex: 1;
  text-align: center;
}

/* === GLASS DARK MODE TOGGLE === */
.mode-toggle {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  border: 0.5px solid rgba(255,255,255,0.55);
  box-shadow:
    0 2px 10px rgba(0,0,0,0.10),
    0 0 0 0.5px rgba(0,0,0,0.06),
    inset 0 1px 0 rgba(255,255,255,0.8);
  display: grid; place-items: center;
  font-size: 17px;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
  flex-shrink: 0;
  position: relative;
}
[data-theme="dark"] .mode-toggle {
  background: rgba(58,58,60,0.80);
  border-color: rgba(255,255,255,0.10);
  box-shadow:
    0 2px 10px rgba(0,0,0,0.45),
    0 0 0 0.5px rgba(255,255,255,0.05),
    inset 0 1px 0 rgba(255,255,255,0.08);
}
.mode-toggle:active { transform: scale(0.88); }

/* Sidebar mode toggle (desktop) */
.sidebar-mode-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r);
  width: 100%;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  transition: background var(--dur-fast);
}
.sidebar-mode-toggle:hover { background: var(--surface-2); }
.sidebar-mode-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 0.5px solid rgba(0,0,0,0.08);
  display: grid; place-items: center;
  font-size: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.7);
}
[data-theme="dark"] .sidebar-mode-icon {
  background: rgba(58,58,60,0.8);
  border-color: rgba(255,255,255,0.10);
  box-shadow: 0 1px 4px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.07);
}

/* === CONTENT AREA (Mobile) === */
.content {
  padding-top: var(--topbar-h);
  padding-bottom: var(--bottomnav-h);
  min-height: 100vh;
  min-height: 100dvh; /* dvh = viewport vizibil; evită gap-ul de jos pe iOS Safari */
}

@media (max-width: 1023px) {
  body { background: #F7F7F4; }
  [data-theme="dark"] body { background: #000; color: #fff; }
  .content {
    max-width: 520px;
    margin: 0 auto;
    padding-top: 70px;
    padding-bottom: 116px;
  }
  .topbar {
    height: 64px;
    background: rgba(247,247,244,0.88);
    border-bottom: 0;
    padding: 8px 18px 0;
  }
  .topbar-logo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #171717;
    box-shadow: none;
  }
  .topbar-title {
    font-size: 19px;
    font-weight: 800;
  }
  .mode-toggle {
    width: 38px;
    height: 38px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: none;
  }
  .page-actions {
    width: 100%;
  }
  .page-actions .search-field {
    flex: 1 1 100%;
  }
  .page-actions .btn {
    flex: 1 1 auto;
    min-height: 44px;
  }
  .group-label {
    padding-left: 18px;
    padding-right: 18px;
  }
  .filter-row {
    gap: 10px;
    padding: 14px 18px;
  }
  .filter-pill {
    padding: 10px 16px;
    font-size: 15px;
    background: #fff;
  }
  .quick-start-card {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }
  .quick-start-actions,
  .quick-start-actions .btn {
    width: 100%;
  }
  .free-controls-card {
    flex-direction: column;
  }
  .free-date-input,
  .free-duration-input {
    width: 100%;
  }
  .appt-item {
    grid-template-columns: 58px 1fr;
    gap: 14px;
    padding: 18px;
  }
  .appt-right {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-left: 72px;
  }
  .appt-hour { font-size: 25px; }
  .appt-name { font-size: 17px; }
  .appt-svc { font-size: 14px; }
  .modal {
    border-radius: 28px 28px 0 0;
  }
}

/* === BOTTOM NAV (Mobile) === */
.bottomnav {
  position: fixed;
  bottom: max(12px, env(safe-area-inset-bottom)); left: 22px; right: 22px;
  height: 66px;
  background: #171717;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 999px;
  border: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 10px;
  box-shadow: 0 18px 42px rgba(0,0,0,0.24);
}
[data-theme="dark"] .bottomnav {
  background: #F4F4F1;
}
.nav-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: rgba(255,255,255,0.48);
  font-weight: 600;
  transition: color var(--dur-fast);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.nav-tab svg {
  width: 46px;
  height: 46px;
  padding: 12px;
  border-radius: 50%;
  transition: background var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
}
.nav-tab-label { display: none; }
.nav-tab.active { color: #111; }
.nav-tab.active svg { background: #fff; transform: translateY(-1px); }
[data-theme="dark"] .nav-tab { color: rgba(0,0,0,0.40); }
[data-theme="dark"] .nav-tab.active { color: #fff; }
[data-theme="dark"] .nav-tab.active svg { background: #111; }
.nav-tab:active { opacity: 0.7; }

/* ===== Income / Încasări screen ===== */
.inc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 600px) { .inc-grid { grid-template-columns: repeat(3, 1fr); } }
.inc-card { background: var(--surface); border: 0.5px solid var(--line); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--shadow-sm); min-width: 0; }
.inc-card.inc-hero { background: var(--accent); border: none; color: #fff; }
.inc-label { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-bottom: 6px; line-height: 1.3; }
.inc-hero .inc-label { color: rgba(255,255,255,0.85); }
.inc-val { font-size: 21px; font-weight: 800; letter-spacing: -0.5px; color: var(--ink); white-space: nowrap; }
.inc-val small { font-size: 12px; font-weight: 600; color: var(--muted); }
.inc-hero .inc-val { color: #fff; }
.inc-hero .inc-val small { color: rgba(255,255,255,0.8); }
.inc-lock { padding: 22px; text-align: center; }
.inc-lock-ic { font-size: 30px; margin-bottom: 8px; }
.inc-lock-title { font-size: 17px; font-weight: 800; letter-spacing: -0.3px; margin-bottom: 6px; }
.inc-lock-text { font-size: 14px; color: var(--ink-2); line-height: 1.5; margin-bottom: 14px; }
.inc-lock-value { font-size: 13px; color: var(--accent); font-weight: 600; background: var(--accent-bg); border-radius: 12px; padding: 11px 13px; margin-bottom: 16px; line-height: 1.45; }
.inc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 0.5px solid var(--line); }
.inc-row:last-child { border-bottom: none; }
.inc-row .inc-row-name { font-size: 14px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inc-row .inc-row-sub { font-size: 12px; color: var(--muted); }
.inc-row .inc-row-val { font-size: 14px; font-weight: 800; color: var(--accent); white-space: nowrap; flex-shrink: 0; }
.nav-dot {
  position: absolute;
  top: 10px; right: calc(50% - 18px);
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  border: 1.5px solid #171717;
}

/* === SIDEBAR (Desktop) === */
.sidebar { display: none; }

/* === VIEWS === */
.view { display: none; }
.view.active { display: block; }

/* === PAGE HEADER === */
.page-header {
  padding: 26px 18px 12px;
}
.page-meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.page-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.1;
  color: var(--ink);
}
[data-theme="dark"] .page-title { color: #fff; }
.page-title em { font-style: normal; color: var(--accent); }
[data-theme="dark"] .page-title em {
  color: #64D2FF;
  text-shadow: 0 0 18px rgba(100,210,255,0.18);
}
.page-sub { font-size: 14px; color: var(--muted); margin-top: 4px; font-weight: 400; }
.page-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

.search-field {
  min-width: min(100%, 220px);
  height: 54px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: var(--surface);
  color: var(--muted);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast), background var(--dur-fast);
}
.search-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
  background: var(--surface);
}
.search-field svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}
.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
}
.search-field input::placeholder { color: var(--muted); font-weight: 500; }

/* === CONTENT SECTIONS === */
.section { padding: 0 18px; }
.section + .section { margin-top: 20px; }
.section-spacer { height: 20px; }
.hidden { display: none !important; }
.global-search-wrap[hidden] { display: none; }
.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  border-bottom: 0.5px solid var(--line);
  color: var(--ink);
  transition: background var(--dur-fast);
}
.search-result-item:last-child { border-bottom: 0; }
.search-result-item:active { background: var(--surface-2); }
.search-result-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 15px;
  font-weight: 800;
}
.search-result-main { min-width: 0; flex: 1; }
.search-result-title {
  font-size: 14px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-result-meta {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-result-type {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.quick-start-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.quick-start-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.35px;
}
.quick-start-sub {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  font-weight: 600;
}
.quick-start-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-start-copy {
  min-width: 0;
}

.onboarding-checklist {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.onboarding-step {
  width: 100%;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.onboarding-step-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 800;
  flex-shrink: 0;
}

.onboarding-step.done .onboarding-step-check {
  background: var(--green-bg);
  color: var(--green);
}

.onboarding-step-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.onboarding-step-copy strong {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.onboarding-step-copy small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

/* ===== Welcome sheet — first-run onboarding ===== */
.welcome-sheet {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.welcome-sheet[hidden] { display: none; }

.welcome-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.32s ease;
}
.welcome-sheet.is-open .welcome-backdrop { opacity: 1; }

.welcome-panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border-radius: 28px 28px 0 0;
  padding: 36px 24px calc(28px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 -8px 48px rgba(0,0,0,0.12);
}
.welcome-sheet.is-open .welcome-panel { transform: translateY(0); }

/* ── drag handle pill ── */
.welcome-panel::before {
  content: '';
  display: block;
  width: 36px; height: 4px;
  border-radius: 2px;
  background: var(--surface-3);
  margin: -20px auto 24px;
}

/* Desktop: centered card */
@media (min-width: 540px) {
  .welcome-sheet { align-items: center; }
  .welcome-panel {
    border-radius: 28px;
    padding: 44px 40px 36px;
    transform: scale(0.96) translateY(12px);
    opacity: 0;
    transition: transform 0.34s cubic-bezier(0.22,1,0.36,1), opacity 0.3s ease;
  }
  .welcome-panel::before { display: none; }
  .welcome-sheet.is-open .welcome-panel { transform: scale(1) translateY(0); opacity: 1; }
}

[data-theme="dark"] .welcome-panel {
  background: var(--surface);
  box-shadow: 0 -8px 48px rgba(0,0,0,0.4);
}

.welcome-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  transition: background 0.15s;
}
.welcome-close:active { background: var(--surface-2); }

.welcome-slides { min-height: 200px; }

.welcome-slide {
  display: none;
  text-align: center;
}
.welcome-slide.is-active {
  display: block;
  animation: welcomeIn 0.30s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes welcomeIn {
  from { opacity: 0; transform: translateX(18px); }
  to   { opacity: 1; transform: translateX(0); }
}

.welcome-emoji {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 18px;
  user-select: none;
}

.welcome-title {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.08;
  color: var(--ink);
  margin-bottom: 12px;
}

.welcome-text {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--muted);
  max-width: 340px;
  margin: 0 auto;
}

.welcome-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
}

.welcome-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.welcome-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--surface-3);
  transition: width 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}
.welcome-dot.is-active {
  width: 22px;
  border-radius: 99px;
  background: var(--accent);
}

.welcome-next {
  flex: 1;
  max-width: 200px;
  min-height: 50px;
  border-radius: 14px;
  font-size: 16px;
}

/* ===== Per-view inline hint banners ===== */
.view-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 14px;
  padding: 11px 14px;
  margin: 12px 16px 0;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.24s ease, transform 0.24s cubic-bezier(0.22,1,0.36,1);
}
.view-hint.is-visible { opacity: 1; transform: translateY(0); }

.view-hint-text {
  flex: 1;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.4;
}

.view-hint-close {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: none;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  font-size: 11px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
  line-height: 1;
}
.view-hint-close:active { background: color-mix(in srgb, var(--accent) 28%, transparent); }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  border: none;
  background: var(--surface-2);
  color: var(--ink);
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.btn:active { transform: scale(0.96); opacity: 0.82; }
.btn-primary { background: var(--accent); color: white; box-shadow: 0 3px 12px var(--accent-glow); }
.btn-primary:active { box-shadow: 0 1px 6px var(--accent-glow); }
.btn-secondary { background: var(--surface-3); color: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-wa { background: #25D366; color: white; }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: var(--r-sm); }
.btn-lg { padding: 15px 24px; font-size: 17px; border-radius: var(--r-lg); }
.btn-full { width: 100%; }
.btn-icon { padding: 8px; border-radius: 50%; }

/* === HERO CONFIRM CARD === */
.hero-card {
  margin: 16px 16px 0;
  background: var(--accent);
  border-radius: var(--r-xl);
  padding: 20px;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 24px var(--accent-glow);
}
.hero-card::before {
  content: '';
  position: absolute;
  top: -50%; right: -15%;
  width: 220px; height: 220px;
  background: rgba(255,255,255,0.07);
  border-radius: 50%;
  pointer-events: none;
}
.hero-card::after {
  content: '';
  position: absolute;
  bottom: -60%; left: -10%;
  width: 180px; height: 180px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  pointer-events: none;
}
.hero-eyebrow { font-size: 11px; font-weight: 700; opacity: 0.70; text-transform: uppercase; letter-spacing: 0.10em; margin-bottom: 6px; }
.hero-title { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.15; margin-bottom: 4px; position: relative; z-index: 1; }
.hero-sub { font-size: 14px; opacity: 0.75; margin-bottom: 18px; position: relative; z-index: 1; line-height: 1.4; }
.hero-btn {
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.32);
  color: white;
  padding: 11px 20px;
  border-radius: var(--r);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
  position: relative;
  z-index: 1;
  -webkit-tap-highlight-color: transparent;
}
.hero-btn:active { transform: scale(0.96); background: rgba(255,255,255,0.25); }
.hero-saved {
  margin: 16px 16px 0;
  background: var(--green-bg);
  border-radius: var(--r-xl);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero-saved-icon {
  width: 46px; height: 46px;
  background: var(--green);
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(52,199,89,0.35);
}
.hero-saved-title { font-size: 16px; font-weight: 700; color: var(--green); letter-spacing: -0.3px; }
.hero-saved-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* === KPI GRID === */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 16px 0;
}
.kpi {
  background: var(--surface);
  border-radius: 22px;
  padding: 14px 16px;
  box-shadow: none;
  border: 1px solid var(--line);
}
.kpi-label { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; letter-spacing: -0.1px; }
.kpi-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1;
}
.kpi-unit { font-size: 14px; font-weight: 600; color: var(--muted); }
.kpi-delta { font-size: 12px; font-weight: 700; margin-top: 6px; }
.kpi-delta.up { color: var(--green); }
.kpi-delta.down-good { color: var(--green); }
.kpi-delta.down { color: var(--red); }
.kpi-green .kpi-value { color: var(--green); }
.kpi-accent .kpi-value { color: var(--accent); }
.kpi-orange .kpi-value { color: var(--orange); }

/* === TODAY COMMAND CENTER === */
.today-hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.today-eyebrow {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.today-hero-title {
  font-size: 24px;
  line-height: 1.18;
  font-weight: 850;
  letter-spacing: -0.6px;
  color: var(--ink);
}
.today-hero-sub {
  margin-top: 7px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
  font-weight: 600;
}
.today-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 16px 0;
}
.today-kpi {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 13px 12px;
  box-shadow: var(--shadow-sm);
}
.today-kpi-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.today-kpi-icon--blue   { background: var(--blue-bg);   color: var(--blue); }
.today-kpi-icon--green  { background: var(--green-bg);  color: var(--green); }
.today-kpi-icon--orange,
.today-kpi-icon--attention { background: var(--orange-bg); color: var(--orange); }
.today-hero-illus {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 10px;
  display: block;
}
.today-kpi-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.25;
}
.today-kpi-value {
  margin-top: 7px;
  font-size: 25px;
  line-height: 1;
  font-weight: 850;
  color: var(--ink);
  letter-spacing: -0.5px;
  overflow-wrap: anywhere;
}
.today-kpi-note {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 600;
}
.today-kpi-time {
  font-size: 22px;
}
.today-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.today-actions .btn {
  min-height: 42px;
  justify-content: center;
  white-space: normal;
}
.today-insight-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: linear-gradient(135deg, var(--accent-bg), var(--surface));
  border: 1px solid rgba(var(--accent-rgb),0.18);
  border-radius: var(--r);
  padding: 14px;
}
.today-insight-copy {
  min-width: 0;
}
.today-insight-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.2px;
  line-height: 1.3;
}
.today-insight-sub {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  font-weight: 600;
}
.today-agenda-card {
  padding: 0;
}
.today-appt-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 0.5px solid var(--line);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.today-appt-row:last-child { border-bottom: none; }
.today-appt-row:active { background: var(--surface-2); }
.today-appt-time {
  font-size: 18px;
  font-weight: 850;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.4px;
}
.today-appt-duration {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.today-appt-main {
  min-width: 0;
}
.today-appt-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.25px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.today-appt-meta {
  margin-top: 3px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.today-appt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}
.today-appt-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.today-appt-price {
  font-size: 15px;
  font-weight: 850;
  color: var(--ink);
  white-space: nowrap;
}
.today-appt-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.today-appt-action {
  min-height: 30px;
  padding: 0 10px;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 800;
}
.today-appt-action.primary {
  background: var(--accent-bg);
  color: var(--accent);
  border-color: rgba(var(--accent-rgb),0.22);
}
.today-empty-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.today-confirmation-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 0.5px solid var(--line);
}
.today-confirmation-row:last-child { border-bottom: none; }
.today-confirmation-main {
  min-width: 0;
}
.today-confirmation-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.today-confirmation-sub {
  margin-top: 3px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
}
@media (min-width: 1024px) {
  .today-kpi-grid {
    margin: 16px 32px 0;
    gap: 12px;
  }
}
@media (max-width: 640px) {
  .today-hero {
    padding: 16px;
  }
  .today-hero-title {
    font-size: 21px;
  }
  .today-kpi-grid {
    gap: 8px;
  }
  .today-kpi {
    padding: 11px 9px;
  }
  .today-kpi-value {
    font-size: 22px;
  }
  .today-kpi-time {
    font-size: 19px;
  }
  .today-actions {
    grid-template-columns: 1fr;
  }
  .today-insight-card {
    align-items: stretch;
    flex-direction: column;
  }
  .today-insight-card .btn {
    width: 100%;
  }
  .today-appt-row {
    grid-template-columns: 52px minmax(0, 1fr);
  }
  .today-appt-side {
    grid-column: 1 / -1;
    padding-left: 64px;
    align-items: flex-start;
  }
  .today-appt-actions {
    justify-content: flex-start;
  }
  .today-confirmation-row {
    align-items: stretch;
    flex-direction: column;
  }
}

/* === CARDS === */
.card {
  background: var(--surface);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: none;
  border: 1px solid var(--line);
}
.card-header {
  padding: 14px 16px 12px;
  border-bottom: 0.5px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title { font-size: 15px; font-weight: 700; letter-spacing: -0.3px; }
.card-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Card group label */
.group-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 20px 16px 8px;
}

/* === APPOINTMENT ITEM === */
.appt-item {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--line);
  align-items: center;
  transition: background var(--dur-fast);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.appt-item:last-child { border-bottom: none; }
.appt-item:active { background: var(--surface-2); }

/* Risk bar (left border) */
.appt-item::before {
  content: '';
  position: absolute;
  left: 0; top: 10px; bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
}
.appt-item[data-risk="high"]::before { background: var(--red); }
.appt-item[data-risk="medium"]::before { background: var(--orange); }
.appt-item[data-risk="low"]::before { background: var(--green); }

.appt-time-block { text-align: center; }
.appt-hour { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; line-height: 1; }
.appt-dur { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 3px; }

.appt-info { min-width: 0; }
.appt-name { font-size: 15px; font-weight: 700; letter-spacing: -0.3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appt-svc { font-size: 13px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appt-tags { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }

.appt-right { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; flex-shrink: 0; }
.appt-price-big { font-size: 16px; font-weight: 800; letter-spacing: -0.4px; }
.appt-deposit-label { font-size: 11px; color: var(--muted); font-weight: 500; }

.appt-actions { display: flex; gap: 6px; }
.appt-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2);
  transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast), opacity var(--dur-fast);
  flex-shrink: 0;
}
.appt-btn:active { transform: scale(0.88); }
.appt-btn.wa { background: #25D366; color: white; box-shadow: 0 2px 8px rgba(37,211,102,0.35); }
.appt-btn.check      { background: var(--surface-3, #E6E2DD); color: var(--muted, #8B8882); }
.appt-btn.check.done { background: var(--green-bg); color: var(--green); }
.appt-btn svg { width: 16px; height: 16px; }

/* === TAGS === */
.tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-full);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  letter-spacing: -0.1px;
}
.tag-green  { background: var(--green-bg);  color: var(--green);  }
.tag-orange,
.tag-attention { background: var(--orange-bg); color: var(--orange); }
.tag-red    { background: var(--red-bg);    color: var(--red);    }
.tag-blue   { background: var(--blue-bg);   color: var(--blue);   }
.tag-accent { background: var(--accent-bg); color: var(--accent); }
.tag-muted  { background: var(--surface-2); color: var(--muted);  }

/* === FILTER PILLS === */
.filter-row {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
  background: var(--surface);
  color: var(--muted);
  white-space: nowrap;
  border: 0.5px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
  transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast), opacity var(--dur-fast);
  -webkit-tap-highlight-color: transparent;
}
.filter-count {
  min-width: 24px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-bg);
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb),0.24);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}
.filter-pill.active {
  background: var(--ink);
  color: var(--bg);
  border-color: transparent;
}
.filter-pill.active .filter-count {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
[data-theme="dark"] .filter-pill.active {
  background: var(--surface-3);
  color: var(--ink);
}
[data-theme="dark"] .filter-count {
  background: rgba(var(--accent-rgb),0.24);
  color: var(--accent);
  border-color: rgba(243,179,156,0.26);
}
[data-theme="dark"] .filter-pill.active .filter-count {
  background: #D9EFFF;
  color: #06111F;
}

/* === CLIENT ROW === */
.client-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--line);
  transition: background var(--dur-fast);
  -webkit-tap-highlight-color: transparent;
}
.client-item:last-child { border-bottom: none; }
.client-item:active { background: var(--surface-2); }

.client-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 15px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  letter-spacing: -0.3px;
}
.client-info { flex: 1; min-width: 0; }
.client-name { font-size: 15px; font-weight: 700; letter-spacing: -0.3px; }
.client-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.client-right { flex-shrink: 0; text-align: right; }
.client-vip { font-size: 11px; font-weight: 700; color: var(--orange); }
.client-last { font-size: 12px; color: var(--muted); }

/* === SEGMENT CARDS === */
.segment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 16px;
}
.segment-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.segment-icon {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
}
.segment-count { font-size: 26px; font-weight: 800; letter-spacing: -0.6px; line-height: 1; }
.segment-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.segment-name { font-size: 14px; font-weight: 700; letter-spacing: -0.2px; }

/* === INSIGHT CARD === */
/* ===== NEXT BEST ACTIONS ===== */
.nba-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 0.5px solid var(--line);
  cursor: pointer;
  transition: background var(--dur-fast);
  text-align: left;
}
.nba-item:last-child { border-bottom: none; }
.nba-item:hover { background: var(--surface-2); }
.nba-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--nba-bg, var(--surface-2));
  display: grid;
  place-items: center;
  font-size: 17px;
  flex-shrink: 0;
}
.nba-content { flex: 1; min-width: 0; }
.nba-title { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.nba-sub { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.3; }
.nba-arrow { flex-shrink: 0; }
.nba-done { padding: 28px 16px; text-align: center; }
.nba-done-icon { font-size: 30px; margin-bottom: 8px; }
.nba-done-title { font-size: 15px; font-weight: 700; color: var(--green); }
.nba-done-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ===== PLAN BADGE (sidebar) ===== */
.plan-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 5px;
  flex-shrink: 0;
}
.plan-badge.plan-start { background: var(--surface-2); color: var(--muted); }
.plan-badge.plan-pro { background: var(--accent); color: #fff; }
.plan-badge.plan-premium { background: linear-gradient(135deg,#6c47ff,#c4603d); color: #fff; }

/* ===== PLAN LOCK (locked feature states) ===== */
.plan-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  padding: 4px 8px;
  margin-top: 6px;
}

/* ===== PLAN GRID (Settings) ===== */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.plan-card {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 26px;
  padding: 28px;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.plan-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.10);
  border-color: var(--accent);
}
.plan-card-current:hover {
  box-shadow: 0 22px 52px rgba(var(--accent-rgb),0.18);
}
.plan-select-btn {
  display: flex !important;
  width: 100% !important;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  margin-top: 24px !important;
  border-radius: 999px !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  padding: 13px 18px !important;
  box-shadow: none;
}
.plan-card-current {
  border-color: var(--accent);
  border-width: 2px;
}
.plan-badge-current {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(var(--accent-rgb),0.20);
  z-index: 1;
}
.plan-card-landing {
  min-height: 100%;
}
.plan-card-start {
  background: linear-gradient(180deg, var(--surface), rgba(255,255,255,0.94));
}
.plan-card-pro {
  background: linear-gradient(180deg, var(--surface), rgba(253,246,241,0.96));
  box-shadow: 0 20px 54px rgba(10, 132, 255, 0.10);
}
.plan-tier-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.plan-tier-badge.is-start {
  background: var(--surface-2);
  color: var(--ink-2);
}
.plan-tier-badge.is-pro {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 22px rgba(var(--accent-rgb),0.20);
}
.plan-name {
  font-size: 32px;
  font-weight: 850;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 12px;
  color: var(--ink);
}
.plan-for {
  min-height: 46px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 22px;
}
.plan-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.plan-price {
  font-size: 38px;
  font-weight: 850;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}
.plan-unit {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--muted);
}
.plan-capacity {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 20px;
  padding: 12px 14px;
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 800;
}
.plan-card-pro .plan-capacity {
  background: var(--accent-bg);
  color: var(--accent-dark);
}
.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin: 0;
  padding: 0;
}
.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.42;
}
.plan-features li::before {
  content: "✓";
  flex: 0 0 20px;
  color: var(--green);
  font-size: 22px;
  font-weight: 850;
  line-height: 1;
  margin-top: -1px;
}
.plan-features li.lead-feat {
  font-weight: 800;
}
.plan-was {
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}
.plan-offer-badge {
  display: inline-block;
  align-self: center;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.plan-offer-note {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 22px;
}
.plan-offer-note b {
  color: var(--accent);
}
.plan-value {
  margin-top: 22px;
  padding: 15px 16px;
  border-radius: 15px;
  border: 1px solid rgba(var(--accent-rgb),0.24);
  background: linear-gradient(180deg, rgba(var(--accent-rgb),0.10), rgba(var(--accent-rgb),0.05));
  color: var(--accent-dark);
  font-size: 14px;
  line-height: 1.45;
}
.plan-bestfor {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.plan-card-start .plan-select-btn:not(:disabled) {
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.plan-card-pro .plan-select-btn:not(:disabled) {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}
.plan-select-btn:disabled {
  opacity: 0.58 !important;
  cursor: default;
}
[data-theme="dark"] .plan-card-start {
  background: linear-gradient(180deg, var(--surface), rgba(35,35,35,0.96));
}
[data-theme="dark"] .plan-card-pro {
  background: linear-gradient(180deg, var(--surface), rgba(16,26,43,0.76));
}
[data-theme="dark"] .plan-tier-badge.is-start,
[data-theme="dark"] .plan-capacity {
  background: rgba(255,255,255,0.08);
}
[data-theme="dark"] .plan-card-start .plan-select-btn:not(:disabled) {
  background: rgba(255,255,255,0.06);
  color: var(--ink);
  border-color: rgba(255,255,255,0.16);
}

/* ===== Launch-offer discount (mirrors landing page) ===== */
.sub-was {
  color: rgba(255,255,255,0.55);
  text-decoration: line-through;
  text-decoration-color: rgba(255,255,255,0.45);
  font-weight: 600;
}
.sub-was { font-size: 16px; margin-left: 6px; }
.sub-price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 4px; }
.offer-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 8px;
  white-space: nowrap;
}
.offer-badge { align-self: center; }
.sub-offer-note {
  font-size: 12.5px;
  color: rgba(255,255,255,0.82);
  line-height: 1.45;
  margin-top: 8px;
  font-weight: 600;
}

/* ===== SUPER ADMIN — platform control panel ===== */
.sa-tabs { display: flex; flex-shrink: 0; border-bottom: 1px solid var(--line); background: var(--surface); }
.sa-tab { flex: 1; padding: 13px 8px; font-size: 13px; font-weight: 600; border: none; cursor: pointer;
  background: transparent; color: var(--muted); border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.sa-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.sa-body { flex: 1; overflow-y: auto; padding: 16px; -webkit-overflow-scrolling: touch; }

.sa-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.sa-metric { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 15px 14px; }
.sa-metric-val { font-size: 27px; font-weight: 800; color: var(--ink); letter-spacing: -0.5px; line-height: 1; }
.sa-metric-label { font-size: 12px; color: var(--muted); margin-top: 7px; }
.sa-metric.accent .sa-metric-val { color: var(--accent); }
.sa-metric.warn .sa-metric-val { color: var(--orange); }

.sa-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 18px 0 10px; }

.sa-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.sa-chip { font-size: 12px; font-weight: 600; padding: 6px 13px; border-radius: 20px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.sa-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.sa-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; margin-bottom: 10px; }
.sa-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sa-card-title { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 2px; word-break: break-word; }
.sa-card-sub { font-size: 11px; color: var(--muted); font-family: ui-monospace, monospace; word-break: break-all; }
.sa-card-meta { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5; word-break: break-word; }
.sa-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }

.sa-badge { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 20px; white-space: nowrap;
  text-transform: uppercase; letter-spacing: 0.03em; }
.sa-badge-start { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.sa-badge-pro { background: var(--accent-bg); color: var(--accent); border: 1px solid var(--accent); }
.sa-badge-active { background: var(--green-bg); color: var(--green); }
.sa-badge-trial { background: var(--blue-bg); color: var(--blue); }
.sa-badge-warn { background: var(--orange-bg); color: var(--orange); }
.sa-badge-expired { background: var(--red-bg); color: var(--red); }
.sa-badge-muted { background: var(--surface-2); color: var(--muted); }

.sa-count { font-size: 12px; font-weight: 600; margin-top: 6px; }
.sa-count.ok { color: var(--green); }
.sa-count.warn { color: var(--orange); }
.sa-count.exp { color: var(--red); }
.sa-count.muted { color: var(--muted); }

.sa-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; align-items: center; }
.sa-select { font-size: 12px; padding: 7px 9px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); min-width: 92px; }
.sa-btn { font-size: 12px; font-weight: 600; padding: 7px 11px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.sa-btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.sa-btn-danger  { background: var(--red-bg); color: var(--red); border-color: var(--red); }
.sa-btn-ghost   { background: transparent; color: var(--muted); border-color: transparent; }
.sa-btn-xs      { font-size: 11px; padding: 4px 8px; }
.sa-invites     { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.sa-invite-list { display: flex; flex-direction: column; gap: 6px; }
.sa-invite-row  { display: flex; align-items: center; gap: 8px; font-size: 12px; flex-wrap: wrap; }
.sa-invite-status       { font-weight: 700; }
.sa-invite-status.active{ color: var(--green); }
.sa-invite-status.muted { color: var(--muted); }
.sa-invite-role { color: var(--ink-2); font-weight: 600; }
.sa-invite-by   { color: var(--muted); flex: 1; }

.sa-form { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 18px; }
.sa-form-title { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 14px; }
.sa-field { margin-bottom: 13px; }
.sa-label { display: block; font-size: 12px; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
.sa-help { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.sa-input { width: 100%; font-size: 13px; padding: 10px 11px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); box-sizing: border-box; }
.sa-seg { display: flex; gap: 6px; }
.sa-seg button { flex: 1; font-size: 13px; font-weight: 600; padding: 9px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); cursor: pointer; }
.sa-seg button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.sa-generate { width: 100%; font-size: 14px; font-weight: 700; padding: 13px; border-radius: 11px; border: none;
  background: var(--accent); color: #fff; cursor: pointer; margin-top: 4px; }
.sa-linkbox { background: var(--green-bg); border: 1px solid var(--green); border-radius: 12px; padding: 13px; margin-bottom: 16px; }
.sa-linkbox .sa-lk { font-family: ui-monospace, monospace; font-size: 12px; color: var(--accent); word-break: break-all; margin: 7px 0 11px; }

@media (max-width: 480px) {
  .sa-metrics { grid-template-columns: repeat(2, 1fr); }
}

/* ===== INSIGHT CARD ===== */
.insight-card {
  background: linear-gradient(135deg, var(--accent-bg), var(--orange-bg));
  border-radius: var(--r-lg);
  padding: 16px;
  border: 0.5px solid rgba(var(--accent-rgb),0.15);
}
.insight-eyebrow { font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 5px; }
.insight-title { font-size: 16px; font-weight: 700; letter-spacing: -0.3px; line-height: 1.25; margin-bottom: 4px; }
.insight-sub { font-size: 13px; color: var(--muted); line-height: 1.45; margin-bottom: 12px; }

/* ===== REMINDER BANNER (in-app, no push permission) ===== */
.reminder-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #0A84FF, #5856D6);
  color: #fff;
  border-radius: var(--r);
  padding: 12px 14px;
  margin: 10px 18px 0;
  box-shadow: 0 2px 10px rgba(200, 110, 0, 0.22);
  animation: reminderSlideIn 0.3s ease;
}
@keyframes reminderSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reminder-banner-icon { font-size: 22px; flex-shrink: 0; }
.reminder-banner-body { flex: 1; min-width: 0; }
.reminder-banner-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reminder-banner-sub {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reminder-banner-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.reminder-banner-close:hover { background: rgba(255,255,255,0.35); }

/* === REVENUE MINI CHART === */
.revenue-bars-row {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 56px;
  padding: 0 16px;
  margin-top: 14px;
}
.revenue-bar {
  flex: 1;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
  opacity: 0.25;
  transition: opacity var(--dur);
  min-height: 6px;
}
.revenue-bar.high { opacity: 0.75; }
.revenue-bar.today { opacity: 1; background: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; }
.revenue-bar:hover { opacity: 1; }
.revenue-days-row {
  display: flex;
  padding: 5px 16px 0;
}
.revenue-day { flex: 1; font-size: 10px; font-weight: 600; color: var(--muted); text-align: center; }

/* === ANALYTICS CHART === */
.chart-wrap { padding: 16px; }

/* === CAMPAIGN CARD === */
.campaign-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px 16px 4px;
}
.campaign-summary-item {
  background: var(--surface);
  border: 0.5px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}
.campaign-summary-value {
  display: block;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--ink);
}
.campaign-summary-label {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.campaign-stat {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 0.5px solid var(--line);
  font-size: 14px;
}
.campaign-stat:last-child { border-bottom: none; }
.campaign-stat-label { color: var(--muted); }
.campaign-stat-val { font-weight: 700; letter-spacing: -0.2px; }
.campaign-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 16px;
}

/* === FREE SLOTS === */
.free-controls-card {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.free-date-input { width: auto; min-width: 150px; }
.free-duration-input { width: auto; min-width: 118px; }
.free-day-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #171717;
  color: #fff;
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 16px 36px rgba(0,0,0,0.16);
}
.free-day-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.free-day-sub {
  margin-top: 4px;
  color: rgba(255,255,255,0.62);
  font-size: 13px;
  font-weight: 600;
}
.free-slot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.free-slot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 16px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  text-align: left;
}
.free-slot:active { transform: scale(0.98); background: var(--surface-2); }
.free-slot-time {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.7px;
}
.free-slot-meta {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

/* === TABS === */
.tabs-row {
  display: flex;
  border-bottom: 0.5px solid var(--line);
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 4px;
}
.tabs-row::-webkit-scrollbar { display: none; }
.compact-tabs {
  padding-top: 12px;
  border-bottom: 0;
}
.compact-tabs .tab-btn {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink-2);
  margin-bottom: 0;
}
.compact-tabs .tab-btn.active {
  background: #171717;
  border-color: #171717;
  color: #fff;
  box-shadow: 0 12px 28px rgba(0,0,0,0.16);
}
.compact-tabs .tab-btn.active .filter-count {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.22);
  color: #fff;
}
[data-theme="dark"] .compact-tabs .tab-btn.active {
  background: #fff;
  border-color: #fff;
  color: #111;
}
[data-theme="dark"] .compact-tabs .tab-btn.active .filter-count {
  background: rgba(0,0,0,0.10);
  border-color: rgba(0,0,0,0.14);
  color: #111;
}
.tab-btn {
  padding: 12px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -0.5px;
  white-space: nowrap;
  transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast), opacity var(--dur-fast);
  letter-spacing: -0.2px;
  -webkit-tap-highlight-color: transparent;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* === MODAL (Sheet) === */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.48);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: none;
  align-items: flex-end;
}
.overlay.show { display: flex; }
@media (min-width: 640px) {
  .overlay { align-items: center; justify-content: center; }
}
.modal {
  background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  animation: sheetUp var(--dur) var(--ease-out);
  padding-bottom: env(safe-area-inset-bottom, 20px);
  box-shadow: var(--shadow-xl);
}
@media (min-width: 640px) {
  .modal {
    border-radius: var(--r-xl);
    max-width: 540px;
    max-height: 88vh;
    animation: popIn 0.2s var(--ease-out);
  }
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes popIn  { from { opacity:0; transform: scale(0.95) translateY(10px); } to { opacity:1; transform: scale(1) translateY(0); } }

.modal-drag {
  width: 36px; height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
  margin: 10px auto 4px;
}
.modal-header {
  padding: 4px 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 0.5px solid var(--line);
}
.modal-title { font-size: 18px; font-weight: 800; letter-spacing: -0.4px; }
.modal-close {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--surface-2);
  display: grid; place-items: center;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
}
.modal-close:active { transform: scale(0.88); }
.modal-body { padding: 16px 20px; }
.modal-footer {
  padding: 12px 20px 4px;
  border-top: 0.5px solid var(--line);
  display: flex;
  gap: 8px;
}

/* === FORM === */
.form-group { margin-bottom: 14px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.form-input, .form-select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
  appearance: none;
  -webkit-appearance: none;
}
.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
  background: var(--surface);
}
.form-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r);
  cursor: pointer;
  transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast), opacity var(--dur-fast);
  background: var(--bg);
}
.form-checkbox-row:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.form-checkbox-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.form-checkbox-label { font-size: 14px; font-weight: 500; }

/* === WHATSAPP PREVIEW === */
.wa-bg {
  background: #ECE5DD;
  border-radius: var(--r);
  padding: 14px;
  margin: 10px 0;
}
.wa-bubble {
  background: #DCF8C6;
  border-radius: 8px 8px 2px 8px;
  padding: 9px 11px;
  font-size: 14px;
  line-height: 1.5;
  color: #111;
  max-width: 92%;
  margin-left: auto;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
  position: relative;
}
.wa-bubble::after {
  content: '';
  position: absolute;
  right: -6px; top: 0;
  border: 6px solid transparent;
  border-left-color: #DCF8C6;
  border-top-color: #DCF8C6;
}
.wa-time { font-size: 10px; color: rgba(0,0,0,0.45); text-align: right; margin-top: 3px; }

/* === TOAST === */
.toast {
  position: fixed;
  bottom: calc(var(--bottomnav-h) + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: rgba(28,28,30,0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: white;
  padding: 11px 22px;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.2px;
  opacity: 0;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
  z-index: 300;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
}
[data-theme="dark"] .toast { background: rgba(72,72,74,0.92); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* === DETAIL PANEL === */
.detail-scrim {
  position: fixed;
  inset: 0;
  z-index: 179;
  pointer-events: none;
  background: rgba(0,0,0,0);
  transition: background var(--dur) var(--ease-out);
}
.detail-scrim.show {
  pointer-events: auto;
  background: rgba(0,0,0,0.14);
}
.detail-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 100%;
  max-width: 440px;
  background: var(--bg);
  transform: translateX(110%);
  transition: transform var(--dur) var(--ease-out);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow-xl);
  padding-bottom: env(safe-area-inset-bottom, 20px);
}
.detail-scrim.show .detail-panel { transform: translateX(0); }
.detail-topbar {
  position: sticky;
  top: 0;
  background: rgba(242,242,247,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 0.5px solid var(--line);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1;
}
[data-theme="dark"] .detail-topbar { background: rgba(28,28,30,0.92); }
.detail-close-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  display: grid; place-items: center;
  color: var(--muted);
  flex-shrink: 0;
}
.detail-close-btn:active { transform: scale(0.88); }
.detail-panel-title { font-size: 16px; font-weight: 700; letter-spacing: -0.3px; }
.detail-body { padding: 16px; }
.detail-section { margin-bottom: 20px; }
.detail-section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 0.5px solid var(--line);
  font-size: 14px;
}
.detail-row:last-child { border-bottom: none; }
.detail-row-label { color: var(--muted); font-weight: 500; }
.detail-row-val { font-weight: 700; letter-spacing: -0.2px; }

/* History */
.history-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--line);
}
.history-item:last-child { border-bottom: none; }
.history-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  margin-top: 5px;
  flex-shrink: 0;
}
.history-dot.orange,
.history-dot.attention { background: var(--orange); }
.history-dot.red { background: var(--red); }
.history-dot.blue { background: var(--blue); }
.history-text { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.history-time { font-size: 12px; color: var(--muted); margin-top: 2px; }

.client-note-box {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
  margin-bottom: 8px;
}
.timeline-list {
  background: var(--surface-2);
  border-radius: var(--r);
  padding: 4px 12px;
}

.data-action-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.data-action {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: var(--surface-2);
  text-align: left;
}
.data-action:active { transform: scale(0.99); }
.data-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  font-weight: 800;
  flex: 0 0 auto;
}
.data-action strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}
.data-action small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

/* === SETTINGS === */
.settings-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 0 16px;
  box-shadow: var(--shadow-sm);
}
.settings-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin-bottom: 2px;
}
.settings-sub { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 0.5px solid var(--line);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-info { flex: 1; }
.toggle-label { font-size: 15px; font-weight: 600; letter-spacing: -0.2px; }
.toggle-desc { font-size: 13px; color: var(--muted); margin-top: 2px; }
.ios-toggle {
  width: 51px; height: 31px;
  background: var(--surface-3);
  border-radius: var(--r-full);
  position: relative;
  cursor: pointer;
  transition: background 0.28s var(--ease);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.ios-toggle::after {
  content: '';
  position: absolute;
  width: 27px; height: 27px;
  border-radius: 50%;
  background: white;
  top: 2px; left: 2px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.28), 0 0 0 0.5px rgba(0,0,0,0.08);
  transition: left 0.28s var(--ease);
}
.ios-toggle.on { background: var(--green); }
.ios-toggle.on::after { left: 22px; }

/* === TEMPLATE CARD === */
.template-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.template-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 16px;
  border-bottom: 0.5px solid var(--line);
}
.template-name { font-size: 15px; font-weight: 700; letter-spacing: -0.2px; }
.template-trigger { font-size: 12px; color: var(--muted); margin-top: 2px; }
.template-text {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.6;
  background: var(--bg);
}
.token { color: var(--accent); font-weight: 700; }

/* === SUBSCRIPTION CARD === */
.sub-card {
  background: linear-gradient(135deg, #1C1C1E 0%, #3A3A3C 100%);
  border-radius: var(--r-xl);
  padding: 22px;
  color: white;
  box-shadow: var(--shadow-lg);
}
.sub-price { font-size: 30px; font-weight: 800; letter-spacing: -0.8px; }
.sub-unit { font-size: 15px; font-weight: 400; opacity: 0.55; }
.sub-next { font-size: 13px; opacity: 0.55; margin-top: 3px; }
.sub-actions { display: flex; gap: 8px; margin-top: 18px; }
.sub-btn {
  padding: 9px 16px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.20);
  color: white;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.sub-btn:active { background: rgba(255,255,255,0.20); }

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}
.empty-icon { font-size: 44px; margin-bottom: 12px; }
.empty-title { font-size: 17px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; letter-spacing: -0.3px; }
.empty-sub { font-size: 14px; line-height: 1.5; }

/* === DESKTOP LAYOUT === */
@media (min-width: 1024px) {
  .topbar { display: none; }
  .bottomnav { display: none; }

  .sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 0.5px solid var(--line-strong);
    padding: 20px 12px;
    z-index: 100;
    overflow-y: auto;
    gap: 2px;
  }
  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 20px;
    margin-bottom: 6px;
    border-bottom: 0.5px solid var(--line);
  }
  .sidebar-logo {
    width: 34px; height: 34px;
    background: var(--accent);
    border-radius: 9px;
    display: grid; place-items: center;
    font-size: 16px;
    font-weight: 800;
    color: white;
    font-style: italic;
    box-shadow: 0 3px 10px var(--accent-glow);
    flex-shrink: 0;
  }
  .sidebar-app-name { font-size: 17px; font-weight: 800; letter-spacing: -0.4px; }
  .sidebar-app-sub { font-size: 11px; color: var(--muted); font-weight: 500; }

  .sidebar-section {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 14px 12px 5px;
  }
  .sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--r);
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 600;
    width: 100%;
    transition: background var(--dur-fast);
    text-align: left;
    letter-spacing: -0.2px;
    position: relative;
  }
  .sidebar-item:hover { background: var(--surface-2); }
  .sidebar-item.active {
    background: var(--accent-bg);
    color: var(--accent);
    font-weight: 700;
    box-shadow: inset 3px 0 0 var(--accent);
  }
  .sidebar-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.75; }
  .sidebar-item.active svg { opacity: 1; }
  .sidebar-badge {
    margin-left: auto;
    background: var(--red);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: var(--r-full);
    min-width: 20px;
    text-align: center;
  }
	  .sidebar-user {
	    display: flex;
	    align-items: center;
	    gap: 10px;
	    padding: 10px 12px;
	    border-radius: var(--r);
	    margin-top: 4px;
	    width: 100%;
	    border: 0;
	    background: transparent;
	    color: inherit;
	    font: inherit;
	    text-align: left;
	  }
	  .sidebar-user-clickable {
	    cursor: pointer;
	    transition: background var(--dur-fast), transform var(--dur-fast), box-shadow var(--dur-fast);
	  }
	  .sidebar-user-clickable:hover,
	  .sidebar-user-clickable:focus-visible {
	    background: var(--surface-2);
	    box-shadow: inset 0 0 0 1px var(--line);
	    outline: none;
	  }
	  .sidebar-user-clickable:active { transform: scale(0.985); }
  .sidebar-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #C47878, var(--accent));
    display: grid; place-items: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
  }
  .sidebar-user-name { font-size: 13px; font-weight: 700; }
  .sidebar-user-role { font-size: 11px; color: var(--muted); }
  .sidebar-bottom {
    margin-top: auto;
    border-top: 0.5px solid var(--line);
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .content {
    padding-top: 0;
    padding-bottom: 0;
    margin-left: var(--sidebar-w);
  }

  /* Desktop spacing adjustments */
  .page-header { padding: 32px 36px 20px; display: flex; align-items: flex-end; justify-content: space-between; border-bottom: 0.5px solid var(--line); }
  .page-actions { margin-top: 0; justify-content: flex-end; }
  .search-field { width: 240px; }
  .section { padding: 0 36px; }
  .filter-row { padding: 16px 36px; flex-wrap: wrap; }
  .group-label { padding: 24px 36px 10px; }
  .campaign-summary { grid-template-columns: repeat(3, 1fr); padding: 20px 36px 0; }
  .hero-card { margin: 28px 36px 0; }
  .hero-saved { margin: 20px 36px 0; }
  .kpi-grid { grid-template-columns: repeat(4, 1fr); margin: 24px 36px 0; gap: 12px; }
  .segment-grid { grid-template-columns: repeat(3, 1fr); margin: 0 36px; }
  .insight-card { margin: 0; }
  .toast { bottom: 24px; }

  /* Desktop 2-column layout */
  .desktop-cols { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; padding: 24px 36px; }
  .desktop-right { display: flex; flex-direction: column; gap: 16px; }
  .desktop-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .tabs-row { padding: 0 36px; }
  .detail-panel { max-width: 460px; }
}

/* Utilities */
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.pb-16 { padding-bottom: 16px; }
.pb-24 { padding-bottom: 24px; }
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-green { color: var(--green); }
.text-sm { font-size: 13px; }
.fw-700 { font-weight: 700; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.justify-between { justify-content: space-between; }

/* Final mobile dark-mode contrast guard.
   Kept at the end so iOS/Safari cannot lose title contrast through earlier mobile overrides. */
@media (max-width: 1023px) {
  html[data-theme="dark"],
  html[data-theme="dark"] body,
  html[data-theme="dark"] .content,
  html[data-theme="dark"] .view,
  html[data-theme="dark"] .page-header {
    background: #000;
    color: #fff;
  }

  html[data-theme="dark"] .page-title,
  html[data-theme="dark"] .page-title span,
  html[data-theme="dark"] .page-title strong {
    color: #fff;
    -webkit-text-fill-color: #fff;
  }

  html[data-theme="dark"] .page-title em {
  color: #64D2FF;
  -webkit-text-fill-color: #64D2FF;
  }

  html[data-theme="dark"] .topbar {
    background: rgba(0,0,0,0.88);
  }
}


/* ================================================================
   iOS NATIVE DESIGN LAYER
   Apple Human Interface Guidelines — SF Pro · System Colors · HIG
   ================================================================ */

/* ── System font stack (SF Pro on Apple devices) ── */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "SF UI Display", "SF UI Text", "Helvetica Neue", Arial, sans-serif;

  /* iOS System Backgrounds */
  --bg:        #F2F2F7;
  --surface:   #FFFFFF;
  --surface-2: #F2F2F7;
  --surface-3: #E5E5EA;

  /* iOS System Labels */
  --ink:   #000000;
  --ink-2: rgba(60,60,67,0.85);
  --muted: rgba(60,60,67,0.55);

  /* iOS Separators */
  --line:        rgba(60,60,67,0.13);
  --line-strong: rgba(60,60,67,0.25);

  /* Brand — premium glass */
  --accent:      #1C1C1E;
  --accent-dark: #000000;
  --accent-bg:   rgba(28,28,30,0.07);
  --accent-glow: rgba(28,28,30,0.14);
  --accent-contrast: #FFFFFF;
  --accent-rgb: 28,28,30;

  /* iOS System Colors */
  --green:      #34C759;
  --green-bg:   rgba(52,199,89,0.12);
  --orange:     #7C3AED;
  --orange-bg:  rgba(124,58,237,0.13);
  --blue:       #007AFF;
  --blue-bg:    rgba(0,122,255,0.12);
  --red:        #FF3B30;
  --red-bg:     rgba(255,59,48,0.12);

  /* iOS Radii */
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-full: 9999px;

  /* iOS Tab Bar */
  --tabbar-h: 83px; /* 49px tab bar + 34px safe area */

  /* iOS Shadows — minimal, almost invisible */
  --shadow-sm: 0 1px 0 rgba(0,0,0,0.05);
  --shadow:    0 1px 3px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
  --shadow-xl: 0 8px 40px rgba(0,0,0,0.18);

  /* iOS Motion */
  --ease:        cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out:    cubic-bezier(0.0, 0.0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur:         0.28s;
  --dur-fast:    0.18s;
  --dur-slow:    0.45s;
}

/* iOS Dark Mode — true black, pure iOS */
[data-theme="dark"] {
  --bg:          #000000;
  --surface:     #1C1C1E;
  --surface-2:   #2C2C2E;
  --surface-3:   #3A3A3C;
  --ink:         #FFFFFF;
  --ink-2:       rgba(235,235,245,0.85);
  --muted:       rgba(235,235,245,0.45);
  --line:        rgba(84,84,88,0.55);
  --line-strong: rgba(84,84,88,0.75);
  --accent:      #F5F5F7;
  --accent-dark: #FFFFFF;
  --accent-bg:   rgba(245,245,247,0.12);
  --accent-glow: rgba(0,0,0,0.45);
  --accent-contrast: #1C1C1E;
  --accent-rgb: 245,245,247;
  --green:       #30D158;
  --green-bg:    rgba(48,209,88,0.15);
  --orange:      #A78BFA;
  --orange-bg:   rgba(167,139,250,0.18);
  --blue:        #0A84FF;
  --blue-bg:     rgba(10,132,255,0.15);
  --red:         #FF453A;
  --red-bg:      rgba(255,69,58,0.15);
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.55);
  --shadow:      0 2px 12px rgba(0,0,0,0.65);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.72);
  --shadow-xl:   0 20px 64px rgba(0,0,0,0.80);
}

/* ── Reset body to iOS system ── */
html {
  background: var(--bg);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

[data-theme="dark"] body {
  background: var(--bg);
}

/* ── iOS Navigation Bar (Topbar) ── */
.topbar {
  height: 56px;
  background: rgba(242,242,247,0.94);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 0.5px solid rgba(60,60,67,0.25);
  box-shadow: none;
}

[data-theme="dark"] .topbar {
  background: rgba(0,0,0,0.92);
  border-bottom-color: rgba(84,84,88,0.55);
}

.topbar-logo,
.sidebar-logo {
  background: var(--accent);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(var(--accent-rgb),0.35);
  color: white;
  font-weight: 700;
  font-style: normal;
}

.topbar-title,
.sidebar-app-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

/* ── iOS Content Area ── */
.content {
  padding-top: 56px;
  padding-bottom: calc(49px + env(safe-area-inset-bottom, 20px));
  background: var(--bg);
}

@media (max-width: 1023px) {
  body { background: var(--bg); }
  [data-theme="dark"] body { background: #000; }

  .content {
    max-width: 100%;
    margin: 0;
    padding-top: 56px;
    padding-bottom: calc(49px + env(safe-area-inset-bottom, 20px));
  }
}

/* ── iOS Large Title ── */
.page-header {
  padding: 12px 16px 8px;
  border-bottom: none;
  background: var(--bg);
}

.page-meta {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  text-transform: none;
  letter-spacing: normal;
  margin-bottom: 2px;
}

.page-title {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.1;
  color: var(--ink);
}

.page-title em {
  font-style: normal;
  color: var(--accent);
}

[data-theme="dark"] .page-title em {
  color: var(--accent);
  text-shadow: none;
}

.page-sub {
  font-size: 15px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 400;
  letter-spacing: -0.1px;
  max-width: 100%;
}

.salon-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.salon-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 8px 24px rgba(0,0,0,0.04);
  transition: border-color var(--dur-fast), background var(--dur-fast), transform var(--dur-fast);
}

.salon-menu-item:hover {
  border-color: rgba(var(--accent-rgb),0.36);
  background: var(--surface-2);
}

.salon-menu-item:active {
  transform: translateY(1px);
}

.salon-menu-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--accent-bg);
  color: var(--accent);
  flex-shrink: 0;
}

.salon-menu-icon svg {
  width: 20px;
  height: 20px;
}

.salon-menu-item strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.15;
}

.salon-menu-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

/* ── iOS Tab Bar (Bottom Navigation) ── */
.bottomnav {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  height: calc(49px + env(safe-area-inset-bottom, 20px));
  background: rgba(248,248,248,0.94);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 0;
  border-top: 0.5px solid rgba(60,60,67,0.25);
  border-bottom: none;
  box-shadow: none;
  padding: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  align-items: flex-start;
}

[data-theme="dark"] .bottomnav {
  background: rgba(28,28,30,0.94);
  border-top-color: rgba(84,84,88,0.55);
}

/* iOS Tab items — icon + label stacked */
.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 0 4px;
  height: 49px;
  color: rgba(60,60,67,0.45);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--dur-fast);
}

[data-theme="dark"] .nav-tab {
  color: rgba(235,235,245,0.35);
}

.nav-tab svg {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 0;
  background: none !important;
  transition: color var(--dur-fast), transform var(--dur-fast);
  transform: none !important;
}

/* iOS active tab: cool accent icon on a clear selected pill */
.nav-tab.active {
  color: var(--accent);
}

.nav-tab.active svg {
  color: var(--accent);
  background: #fff !important;
  transform: scale(1.06) !important;
}

[data-theme="dark"] .nav-tab.active {
  color: var(--accent);
}

[data-theme="dark"] .nav-tab.active svg {
  background: #1c1c1e !important;
}

/* Show tab labels on iOS tab bar */
.nav-tab-label {
  display: block !important;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* iOS notification dot on tab */
.nav-dot {
  top: 6px;
  right: calc(50% - 18px);
  border: 2px solid rgba(248,248,248,0.94);
}

[data-theme="dark"] .nav-dot {
  border-color: rgba(28,28,30,0.94);
}

/* Tap feedback */
.nav-tab:active { opacity: 0.65; }

/* ── iOS Cards ── */
.card,
.kpi,
.segment-card,
.campaign-summary-item,
.template-card,
.quick-start-card,
.free-controls-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

[data-theme="dark"] .card,
[data-theme="dark"] .kpi,
[data-theme="dark"] .segment-card,
[data-theme="dark"] .template-card,
[data-theme="dark"] .quick-start-card,
[data-theme="dark"] .free-controls-card {
  background: var(--surface);
  box-shadow: none;
}

.kpi {
  min-height: auto;
  padding: 16px;
  border-radius: var(--r-lg);
}

.kpi-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

/* ── iOS Section Header ── */
.group-label {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 20px 16px 6px;
}

/* ── iOS Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 11px 20px;
  border-radius: var(--r);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
  border: none;
  background: var(--surface-2);
  color: var(--blue);
  transition: opacity var(--dur-fast), transform var(--dur-fast);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  box-shadow: none;
  backdrop-filter: none;
}

.btn:active {
  opacity: 0.65;
  transform: scale(0.98);
}

/* iOS primary button — filled, accent color */
.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: none;
}

.btn-primary:active {
  box-shadow: none;
  opacity: 0.75;
}

/* iOS secondary button — system fill */
.btn-secondary {
  background: rgba(120,120,128,0.12);
  color: var(--ink);
  font-weight: 600;
  border: none;
}

[data-theme="dark"] .btn-secondary {
  background: rgba(120,120,128,0.18);
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  font-weight: 600;
}

.btn-sm {
  min-height: 34px;
  padding: 7px 14px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--r-sm);
}

.btn-lg {
  min-height: 50px;
  padding: 13px 24px;
  font-size: 17px;
  border-radius: var(--r-lg);
}

.btn-full { width: 100%; }

.btn-wa {
  background: #25D366;
  color: white;
  box-shadow: none;
}

/* ── iOS Hero Card ── */
.hero-card {
  margin: 12px 16px 0;
  background: var(--accent);
  border-radius: var(--r-xl);
  box-shadow: 0 4px 20px rgba(var(--accent-rgb),0.30);
  overflow: hidden;
  color: white;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: -40%; right: -10%;
  width: 200px; height: 200px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  pointer-events: none;
}

.hero-card::after {
  content: '';
  position: absolute;
  bottom: -60%; left: -5%;
  width: 180px; height: 180px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  pointer-events: none;
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 6px;
}

.hero-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.2;
  margin-bottom: 4px;
  position: relative; z-index: 1;
}

.hero-sub {
  font-size: 15px;
  opacity: 0.8;
  margin-bottom: 16px;
  line-height: 1.45;
  position: relative; z-index: 1;
}

.hero-btn {
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.30);
  color: white;
  padding: 10px 20px;
  border-radius: var(--r);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.15px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast), opacity var(--dur-fast);
  position: relative; z-index: 1;
}

.hero-btn:active { opacity: 0.75; transform: scale(0.98); }

/* ── KPI Grid ── */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 16px 0;
}

/* ── iOS Filter Pills — Scrollable chips ── */
.filter-row {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-size: 15px;
  font-weight: 500;
  background: var(--surface);
  color: var(--ink);
  white-space: nowrap;
  border: none;
  box-shadow: none;
  min-height: 34px;
  transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast), opacity var(--dur-fast);
  -webkit-tap-highlight-color: transparent;
}

.filter-pill.active {
  background: var(--accent);
  color: #FFFFFF;
  font-weight: 600;
}

[data-theme="dark"] .filter-pill {
  background: var(--surface-2);
  color: var(--ink);
}

[data-theme="dark"] .filter-pill.active {
  background: var(--accent);
  color: #FFFFFF;
}

.filter-count {
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 9px;
  background: rgba(60,60,67,0.13);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  border: none;
  box-shadow: none;
}

.filter-pill.active .filter-count {
  background: rgba(255,255,255,0.25);
  color: #FFFFFF;
}

/* ── iOS Appointment Items ── */
.appt-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 0.5px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
  border-left: none;
  border-right: none;
  border-top: none;
  backdrop-filter: none;
  margin: 0;
}

.appt-item + .appt-item { margin-top: 0; }

.appt-item:last-child { border-bottom: none; }

.appt-item:active { background: rgba(60,60,67,0.06); }

[data-theme="dark"] .appt-item {
  background: var(--surface);
  box-shadow: none;
}

[data-theme="dark"] .appt-item:active {
  background: rgba(120,120,128,0.18);
}

.appt-hour {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1;
}

.appt-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.appt-svc {
  font-size: 15px;
  color: var(--muted);
  margin-top: 2px;
  letter-spacing: -0.1px;
}

/* iOS List row disclosure */
.appt-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

/* ── iOS Client Rows ── */
.client-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--line);
  background: var(--surface);
  transition: background var(--dur-fast);
}

.client-item:last-child { border-bottom: none; }
.client-item:active { background: rgba(60,60,67,0.06); }

[data-theme="dark"] .client-item { background: var(--surface); }
[data-theme="dark"] .client-item:active { background: rgba(120,120,128,0.18); }

.client-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 17px;
  font-weight: 600;
}

.client-name {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.2px;
}

.client-meta {
  font-size: 15px;
  color: var(--muted);
  margin-top: 1px;
}

/* ── iOS Tabs (within views) ── */
.tabs-row {
  display: flex;
  border-bottom: 0.5px solid var(--line);
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0;
  background: var(--surface);
}

.tab-btn {
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -0.5px;
  white-space: nowrap;
  transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast), opacity var(--dur-fast);
  min-height: auto;
  border-radius: 0;
  background: transparent;
  border-top: none;
  border-left: none;
  border-right: none;
  box-shadow: none;
  min-height: auto;
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
  background: transparent;
}

/* Compact (pill-style) tabs */
.compact-tabs {
  padding-top: 10px;
  border-bottom: 0;
  background: var(--bg);
  gap: 8px;
}

.compact-tabs .tab-btn {
  padding: 6px 16px;
  border: none;
  border-radius: var(--r-full);
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 0;
  min-height: 34px;
  border-bottom: none;
}

.compact-tabs .tab-btn.active {
  background: var(--accent);
  color: #FFFFFF;
  font-weight: 600;
  border-bottom: none;
  box-shadow: none;
}

[data-theme="dark"] .compact-tabs .tab-btn {
  background: var(--surface-2);
  color: var(--ink);
}

[data-theme="dark"] .compact-tabs .tab-btn.active {
  background: var(--accent);
  color: #FFFFFF;
}

/* ── iOS Modal / Bottom Sheet ── */
.overlay {
  background: rgba(0,0,0,0.40);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal {
  background: var(--surface);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -1px 0 rgba(60,60,67,0.10), 0 -4px 40px rgba(0,0,0,0.15);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

@media (min-width: 640px) {
  .modal {
    border-radius: var(--r-xl);
    box-shadow: 0 20px 60px rgba(0,0,0,0.22);
  }
}

[data-theme="dark"] .modal {
  background: var(--surface);
  box-shadow: 0 -1px 0 rgba(84,84,88,0.55), 0 -4px 40px rgba(0,0,0,0.50);
}

.modal-drag {
  width: 36px; height: 5px;
  background: rgba(60,60,67,0.18);
  border-radius: 2.5px;
  margin: 8px auto 4px;
}

[data-theme="dark"] .modal-drag {
  background: rgba(235,235,245,0.18);
}

.modal-header {
  padding: 4px 20px 14px;
  border-bottom: 0.5px solid var(--line);
}

.modal-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.modal-close {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(120,120,128,0.12);
  color: var(--muted);
  font-size: 15px;
}

.modal-footer {
  padding: 12px 20px;
  border-top: 0.5px solid var(--line);
  display: flex;
  gap: 8px;
}

/* ── iOS Form Elements ── */
.form-label {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  text-transform: none;
  letter-spacing: normal;
  margin-bottom: 4px;
}

.form-input, .form-select {
  width: 100%;
  padding: 11px 14px;
  border: none;
  border-radius: var(--r);
  background: rgba(120,120,128,0.12);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  transition: box-shadow var(--dur-fast);
  appearance: none;
  -webkit-appearance: none;
  min-height: 44px;
}

[data-theme="dark"] .form-input,
[data-theme="dark"] .form-select {
  background: rgba(120,120,128,0.22);
  color: var(--ink);
}

.form-input:focus, .form-select:focus {
  outline: none;
  box-shadow: 0 0 0 3.5px var(--accent-bg);
  background: rgba(120,120,128,0.12);
}

.form-checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: none;
  border-radius: var(--r);
  background: rgba(120,120,128,0.12);
  cursor: pointer;
  transition: background var(--dur-fast);
}

.form-checkbox-row:has(input:checked) {
  background: var(--accent-bg);
  border: none;
}

.form-checkbox-row input {
  width: 22px; height: 22px;
  accent-color: var(--accent);
  border-radius: 50%;
}

.form-checkbox-label {
  font-size: 17px;
  font-weight: 400;
}

/* ── iOS Search Field ── */
.search-field {
  min-width: min(100%, 200px);
  height: 36px;
  padding: 0 12px;
  border: none;
  border-radius: var(--r-sm);
  background: rgba(120,120,128,0.12);
  color: var(--muted);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.search-field:focus-within {
  border: none;
  box-shadow: none;
  background: rgba(120,120,128,0.16);
}

.search-field input {
  font-size: 15px;
  font-weight: 400;
  color: var(--ink);
}

.search-field input::placeholder {
  color: var(--muted);
  font-weight: 400;
}

/* ── iOS Settings ── */
.settings-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 0;
  box-shadow: none;
  overflow: hidden;
  border: none;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--line);
  background: var(--surface);
}

.toggle-row:last-child { border-bottom: none; }

.toggle-label {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.1px;
}

.toggle-desc {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

/* iOS UISwitch */
.ios-toggle {
  width: 51px; height: 31px;
  background: rgba(120,120,128,0.22);
  border-radius: var(--r-full);
  transition: background 0.28s var(--ease);
}

.ios-toggle::after {
  width: 27px; height: 27px;
  top: 2px; left: 2px;
  box-shadow: 0 3px 7px rgba(0,0,0,0.22), 0 0 0 0.5px rgba(0,0,0,0.06);
  transition: left 0.28s var(--ease);
}

.ios-toggle.on { background: var(--green); }
.ios-toggle.on::after { left: 22px; }

/* ── iOS Tags / Badges ── */
.tag {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0;
}

/* ── iOS Toast ── */
.toast {
  bottom: calc(49px + env(safe-area-inset-bottom, 20px) + 12px);
  background: rgba(28,28,30,0.92);
  border-radius: var(--r-full);
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.1px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

[data-theme="dark"] .toast {
  background: rgba(72,72,74,0.92);
}

/* ── iOS Detail Panel ── */
.detail-topbar {
  background: rgba(242,242,247,0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 0.5px solid var(--line);
}

[data-theme="dark"] .detail-topbar {
  background: rgba(0,0,0,0.92);
}

/* ── iOS Sidebar (Desktop — macOS-like) ── */
@media (min-width: 1024px) {
  .topbar { display: none; }
  .bottomnav { display: none; }

  .sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 260px;
    background: var(--surface);
    border-right: 0.5px solid var(--line-strong);
    padding: 20px 8px;
    z-index: 100;
    overflow-y: auto;
    gap: 2px;
  }

  [data-theme="dark"] .sidebar {
    background: var(--surface);
  }

  .sidebar-brand {
    padding: 4px 10px 18px;
    margin-bottom: 4px;
    border-bottom: 0.5px solid var(--line);
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .sidebar-logo {
    width: 32px; height: 32px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
  }

  .sidebar-app-name {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.2px;
  }

  .sidebar-section {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 14px 10px 4px;
  }

  .sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: -0.1px;
    width: 100%;
    text-align: left;
    transition: background var(--dur-fast);
    position: relative;
  }

  .sidebar-item:hover {
    background: rgba(120,120,128,0.10);
  }

  .sidebar-item.active {
    background: var(--accent-bg);
    color: var(--accent);
    font-weight: 600;
  }

  .sidebar-item svg {
    width: 20px; height: 20px;
    flex-shrink: 0;
    opacity: 0.85;
  }

  .sidebar-item.active svg { opacity: 1; }

  .sidebar-badge {
    margin-left: auto;
    background: var(--red);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--r-full);
    min-width: 22px;
    text-align: center;
  }

	  .sidebar-user {
	    display: flex;
	    align-items: center;
	    gap: 10px;
	    padding: 10px;
	    border-radius: 8px;
	    margin-top: 4px;
	    width: 100%;
	    border: 0;
	    background: transparent;
	    color: inherit;
	    font: inherit;
	    text-align: left;
	  }
	  .sidebar-user-clickable {
	    cursor: pointer;
	    transition: background var(--dur-fast), transform var(--dur-fast), box-shadow var(--dur-fast);
	  }
	  .sidebar-user-clickable:hover,
	  .sidebar-user-clickable:focus-visible {
	    background: var(--surface-2);
	    box-shadow: inset 0 0 0 1px var(--line);
	    outline: none;
	  }
	  .sidebar-user-clickable:active { transform: scale(0.985); }

  .sidebar-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #5856D6);
    font-size: 13px;
    font-weight: 600;
  }

  .sidebar-user-name { font-size: 13px; font-weight: 600; }
  .sidebar-user-role { font-size: 11px; color: var(--muted); }

  .sidebar-bottom {
    margin-top: auto;
    border-top: 0.5px solid var(--line);
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .content {
    padding-top: 0;
    padding-bottom: 0;
    margin-left: 260px;
    background: var(--bg);
  }

  /* Desktop spacing — iOS iPad-like */
  .page-header {
    padding: 28px 32px 16px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    border-bottom: 0.5px solid var(--line);
    background: var(--surface);
  }

  .page-title { font-size: 28px; font-weight: 700; letter-spacing: -0.4px; }
  .page-actions { margin-top: 0; }

  .section { padding: 0 32px; }
  .filter-row { padding: 12px 32px; flex-wrap: wrap; }
  .group-label { padding: 20px 32px 6px; }
  .tabs-row { padding: 0 32px; background: var(--surface); }

  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
    margin: 20px 32px 0;
    gap: 12px;
  }

  .hero-card { margin: 24px 32px 0; }
  .hero-saved { margin: 16px 32px 0; }
  .segment-grid { grid-template-columns: repeat(3, 1fr); margin: 0 32px; }
  .campaign-summary { grid-template-columns: repeat(3, 1fr); padding: 16px 32px 0; }
  .desktop-cols { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; padding: 20px 32px; }
  .desktop-right { display: flex; flex-direction: column; gap: 16px; }
  .desktop-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .campaign-actions { padding: 0 32px 16px; }
  .toast { bottom: 24px; }
  .detail-panel { max-width: 440px; }
}

/* ── iOS Section Groups (mobile) ── */
@media (max-width: 1023px) {
  .section { padding: 0 16px; }
  .filter-row { padding: 10px 16px; }
  .group-label { padding: 20px 16px 6px; }

  .page-header {
    padding: 12px 16px 8px;
    border-bottom: 0.5px solid var(--line);
    background: var(--surface);
  }

  .modal {
    border-radius: 12px 12px 0 0;
  }

  .appt-item {
    grid-template-columns: 60px 1fr;
  }

  .appt-right {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-left: 72px;
  }

  .appt-hour { font-size: 20px; }
}

/* ── iOS Empty State ── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--muted);
}

.empty-icon {
  font-size: 52px;
  margin-bottom: 14px;
  opacity: 1;
  filter: none;
}

.empty-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.empty-sub {
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

/* ── iOS Staff Action Grid ── */
.staff-actions-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 16px 16px 4px;
}

.staff-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: none;
  border-radius: var(--r-lg);
  padding: 14px 8px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  transition: opacity var(--dur-fast), transform var(--dur-fast);
}

.staff-action-btn:active {
  opacity: 0.65;
  transform: scale(0.96);
  background: var(--surface);
}

.staff-action-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
}

/* ── iOS Data Actions ── */
.data-action {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 0;
  background: var(--surface);
  border: none;
  border-bottom: 0.5px solid var(--line);
  backdrop-filter: none;
  text-align: left;
}

.data-action:first-child { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.data-action:last-child { border-radius: 0 0 var(--r-lg) var(--r-lg); border-bottom: none; }

.data-action:active { background: rgba(60,60,67,0.06); }

.data-action-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: var(--accent-bg);
  flex: 0 0 auto;
}

.data-action strong {
  font-size: 17px;
  font-weight: 400;
  color: var(--ink);
  display: block;
}

.data-action small {
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-top: 1px;
}

/* ── iOS Subscription Card ── */
.sub-card {
  background: linear-gradient(135deg, #1C1C1E 0%, #3A3A3C 100%);
  border-radius: var(--r-xl);
  padding: 20px;
  color: white;
  box-shadow: 0 4px 20px rgba(0,0,0,0.20);
}

/* ── iOS Role Badge ── */
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
}

/* ── iOS PIN Input ── */
.pin-input {
  font-size: 24px !important;
  letter-spacing: 0.25em !important;
  font-weight: 600 !important;
  text-align: center !important;
  background: rgba(120,120,128,0.12) !important;
  border: none !important;
  border-radius: var(--r) !important;
}

/* ── iOS Pager ── */
.pager-btn {
  padding: 8px 18px;
  border-radius: var(--r-full);
  font-size: 15px;
  font-weight: 500;
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--line);
}

[data-theme="dark"] .pager-btn {
  background: var(--surface);
  border-color: var(--line);
  color: var(--accent);
}

/* ── Sort Chips ── */
.sort-chip {
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 500;
  background: var(--surface);
  color: var(--muted);
  border: none;
  padding: 5px 13px;
}

.sort-chip.active {
  background: var(--accent);
  color: #FFFFFF;
}

[data-theme="dark"] .sort-chip { background: var(--surface-2); }
[data-theme="dark"] .sort-chip.active { background: var(--accent); color: #FFFFFF; }

/* ── iOS Phone Hint ── */
.phone-hint-ok  { color: var(--green); }
.phone-hint-bad { color: var(--red); }

.form-input.phone-ok  { box-shadow: 0 0 0 2px var(--green) !important; }
.form-input.phone-bad { box-shadow: 0 0 0 2px var(--red) !important; }

/* ── iOS Client Suggest Dropdown ── */
.client-suggest-drop {
  border-radius: var(--r);
  border: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.20);
  background: var(--surface);
}

[data-theme="dark"] .client-suggest-drop {
  background: var(--surface-2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.55);
}

.client-suggest-row {
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--line);
}

.client-suggest-name { font-size: 17px; font-weight: 400; }
.client-suggest-meta { font-size: 13px; color: var(--muted); }

/* ── iOS Disc Chips (Discount) ── */
.disc-chip {
  padding: 8px 16px;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 15px;
  font-weight: 500;
}

.disc-chip:has(input:checked) {
  border-color: var(--green);
  background: var(--green-bg);
  color: var(--green);
}

/* ── iOS Template Card ── */
.template-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: none;
  overflow: hidden;
}

.template-head {
  padding: 14px 16px;
  border-bottom: 0.5px solid var(--line);
}

.template-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.template-text {
  padding: 12px 16px;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.55;
  background: rgba(120,120,128,0.08);
}

/* ── iOS Hero Saved State ── */
.hero-saved {
  margin: 12px 16px 0;
  background: var(--green-bg);
  border-radius: var(--r-xl);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-saved-icon {
  width: 44px; height: 44px;
  background: var(--green);
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(52,199,89,0.30);
}

/* ── iOS Snapshot Rows ── */
.snapshot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 0.5px solid var(--line);
  gap: 12px;
}

.snapshot-date { font-size: 17px; font-weight: 400; }
.snapshot-meta { font-size: 13px; color: var(--muted); }

/* ── iOS Free Slots ── */
.free-day-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-xl);
  padding: 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}

.free-slot {
  border-radius: var(--r-lg);
  background: var(--surface);
  border: none;
  box-shadow: none;
}

[data-theme="dark"] .free-slot {
  background: var(--surface);
}

.free-slot:active { opacity: 0.7; }

/* ── Free slot staff row ── */
.fs-staff-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.fs-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0;
  flex-shrink: 0;
}
.fs-avatar-more {
  background: var(--surface-3) !important;
  color: var(--muted);
  font-size: 9px;
}
.fs-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── iOS Insight Card ── */
.insight-card {
  background: linear-gradient(135deg, var(--accent-bg), rgba(124,58,237,0.08));
  border-radius: var(--r-lg);
  padding: 16px;
  border: none;
}

/* ── Dark mode — iOS final guard ── */
html[data-theme="dark"] body,
html[data-theme="dark"] .content,
html[data-theme="dark"] .view,
html[data-theme="dark"] .client-filters-sticky {
  background: #000;
}

html[data-theme="dark"] .page-header {
  background: #1C1C1E;
  border-bottom-color: rgba(84,84,88,0.55);
}

html[data-theme="dark"] .tabs-row {
  background: #1C1C1E;
}

html[data-theme="dark"] .topbar-logo,
html[data-theme="dark"] .sidebar-logo {
  background: var(--accent);
  color: white;
}

/* Appointment risk bars */
.appt-item[data-risk="high"]::before   { background: var(--red);    }
.appt-item[data-risk="medium"]::before { background: var(--orange);  }
.appt-item[data-risk="low"]::before    { background: var(--green);   }

/* Hidden for staff */
.hidden-for-staff { display: none !important; }

/* Utilities — final */
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.pb-16 { padding-bottom: 16px; }
.pb-24 { padding-bottom: 24px; }
.text-muted   { color: var(--muted); }
.text-accent  { color: var(--accent); }
.text-green   { color: var(--green); }
.text-sm      { font-size: 13px; }
.fw-700       { font-weight: 700; }
.hidden       { display: none !important; }
.flex         { display: flex; }
.items-center { align-items: center; }
.gap-8        { gap: 8px; }
.justify-between { justify-content: space-between; }

/* ===== MOBILE: plan-grid responsive ===== */
@media (max-width: 640px) {
  .plan-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .plan-card {
    border-radius: 22px;
    padding: 24px 20px;
  }
  .plan-card-current { margin-top: 0; }
  .plan-badge-current {
    top: 14px;
    right: 14px;
  }
  .plan-name {
    font-size: 30px;
  }
  .plan-for {
    min-height: 0;
    font-size: 14px;
  }
  .plan-price {
    font-size: 36px;
  }
  .plan-unit {
    font-size: 15px;
  }
  .plan-features {
    gap: 12px;
  }
  .plan-features li {
    font-size: 14px;
  }
  .nba-title { font-size: 13px; }
}

/* ── Staff appointment rows ── */
.staff-appt-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 0.5px solid var(--line);
  background: var(--surface);
  transition: background var(--dur-fast);
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.staff-appt-row:last-child { border-bottom: none; }
.staff-appt-row:active { background: rgba(60,60,67,0.06); }
[data-theme="dark"] .staff-appt-row:active { background: rgba(120,120,128,0.18); }

.staff-appt-time {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--ink);
  min-width: 46px;
  flex-shrink: 0;
}

.staff-appt-info { flex: 1; min-width: 0; }

.staff-appt-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.staff-appt-svc {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Staff summary chips ── */
.staff-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.1px;
}
.chip-green  { background: var(--green-bg);  color: var(--green); }
.chip-orange,
.chip-attention { background: var(--orange-bg); color: var(--orange); }
.chip-muted  { background: var(--surface-3); color: var(--muted); }

/* ── Service rows in Settings ── */
.service-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 0.5px solid var(--line);
  background: var(--surface);
  transition: background var(--dur-fast);
}
.service-row:last-child { border-bottom: none; }

.service-row-name {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.2px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-row-price {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Service action buttons (edit/delete) */
.service-row .btn-xs {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  padding: 0;
  flex-shrink: 0;
  background: var(--surface-2);
  border: none;
}
.service-row .btn-xs:active { transform: scale(0.88); }
.btn-danger-soft {
  background: rgba(220, 60, 60, 0.10);
  color: var(--red, #c0392b);
  border: none;
}
.btn-danger-soft:hover { background: rgba(220, 60, 60, 0.18); }

/* ===== STAFF CARD ROW (Settings → Echipă) ===== */
.staff-card-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 0.5px solid var(--line);
}
.staff-card-row:last-child { border-bottom: none; }
.staff-card-row.staff-card-locked {
  opacity: .72;
}

.staff-card-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0;
}

.staff-card-info {
  flex: 1;
  min-width: 0;
}
.staff-card-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.staff-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}
.staff-card-role {
  font-size: 12px;
  color: var(--muted);
}
.staff-active-tag {
  font-size: 11px !important;
  padding: 1px 7px !important;
  cursor: pointer;
}
.staff-locked-tag {
  cursor: help;
}

.staff-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* "Intră" — compact accent pill */
.staff-enter-btn {
  height: 32px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--r-full);
  white-space: nowrap;
}

/* ✓ badge when this is the currently active staff account */
.staff-current-check {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(76, 175, 80, 0.12);
  color: var(--green, #3a9f47);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
}

/* Trash delete button */
.staff-delete-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* legacy — keep for backward compat */
.staff-settings-row { gap: 8px; }
.staff-settings-name { min-width: 0; flex: 1 1 auto; }
.staff-settings-name span { display: inline; color: var(--muted); font-size: 11px; }
.staff-switch-btn { min-width: 72px; height: 34px; padding: 0 10px; border-radius: var(--r-full); font-size: 11px; font-weight: 700; white-space: nowrap; flex-shrink: 0; }

.settings-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.settings-add-row .form-input,
.settings-add-row .btn {
  margin: 0;
}

.settings-add-row .btn {
  white-space: nowrap;
}
.settings-add-row.is-locked {
  opacity: .72;
}
.settings-add-row input:disabled,
.settings-add-row button:disabled {
  cursor: not-allowed;
}
.settings-add-row button:disabled {
  box-shadow: none;
}

.service-add-row {
  grid-template-columns: minmax(0, 1.5fr) 72px 68px auto;
}

/* ===== SERVICE EDIT INLINE (2-row layout) ===== */
.svc-edit-form {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
}
.svc-edit-name {
  width: 100%;
  margin: 0 !important;
  height: 40px;
  font-size: 14px;
}
.svc-edit-row2 {
  display: flex;
  gap: 6px;
  align-items: center;
}
.svc-edit-price,
.svc-edit-dur {
  margin: 0 !important;
  height: 38px;
  flex-shrink: 0;
}
.svc-edit-price { width: 68px; }
.svc-edit-dur   { width: 60px; }
.svc-edit-save {
  flex: 1;
  height: 38px;
  font-size: 13px;
  font-weight: 700;
  min-width: 0;
}
.svc-edit-cancel {
  width: 38px;
  height: 38px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 10px;
}

/* ===== SERVICE ADD FORM (2-row layout, Settings) ===== */
.svc-add-form {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.svc-add-name {
  width: 100%;
  margin: 0 !important;
  height: 40px;
}
.svc-add-row2 {
  display: flex;
  gap: 6px;
  align-items: center;
}
.svc-add-price,
.svc-add-dur {
  margin: 0 !important;
  height: 38px;
  flex-shrink: 0;
}
.svc-add-price { flex: 1; min-width: 60px; }
.svc-add-dur   { width: 60px; flex-shrink: 0; }
.svc-add-btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  border-radius: 10px;
}

/* legacy — kept for backward compat */
.edit-service-name, .edit-service-price, .edit-service-duration { margin: 0; height: 40px; }
.edit-service-name { flex: 1 1 160px; min-width: 0; }
.edit-service-price { width: 76px; flex: 0 0 76px; }
.edit-service-duration { width: 68px; flex: 0 0 68px; }
.service-edit-actions { display: flex; gap: 6px; flex-shrink: 0; }

@media (max-width: 640px) {
  .service-row {
    padding: 12px 10px;
    gap: 8px;
  }

  /* staff-card-row is already flex+compact, no overrides needed on mobile */
  .staff-enter-btn {
    padding: 0 10px;
    font-size: 11px;
  }

  .settings-add-row,
  .service-add-row {
    grid-template-columns: 1fr;
  }

  .settings-add-row .form-input,
  .settings-add-row .btn {
    width: 100%;
    min-width: 0;
  }

  .service-row-name {
    font-size: 15px;
  }

  .service-row-price {
    font-size: 13px;
  }

  /* svc-edit-form and svc-add-form are already mobile-first, no overrides needed */
}

/* ===== ONBOARDING WIZARD ===== */
.onboard-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  overflow-y: auto;
}
.onboard-card {
  max-width: 380px;
  width: 100%;
  text-align: left;
}
.onboard-card.onboard-enter {
  animation: onboardSlideIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes onboardSlideIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.onboard-logo {
  font-size: 56px;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1;
}
.onboard-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}
.onboard-sub {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}
/* ── Setup wizard (services / team / hours) ── */
.onb-prog { display: flex; gap: 6px; justify-content: center; margin-bottom: 16px; }
.onb-prog span { width: 26px; height: 4px; border-radius: 99px; background: var(--line-strong); }
.onb-prog span.on { background: var(--blue); }
.onb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; justify-content: center; }
.onb-chip { padding: 9px 14px; border-radius: 99px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; transition: all .15s var(--ease); }
.onb-chip.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.onb-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.onb-tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 99px; background: var(--blue-bg); color: var(--blue); font-size: 13px; font-weight: 600; }
.onb-tag i { cursor: pointer; font-style: normal; font-size: 17px; line-height: 1; opacity: .7; }
.onb-manual { margin-top: 14px; }
.onb-manual summary { cursor: pointer; color: var(--blue); font-size: 14px; font-weight: 600; list-style: none; text-align: center; }
.onb-manual summary::-webkit-details-marker { display: none; }
.onb-mrow { display: flex; gap: 8px; }
.onboard-skip { display: block; width: 100%; margin-top: 10px; background: none; color: var(--muted); font-size: 14px; font-weight: 600; padding: 8px; }
.onboard-skip:hover { color: var(--ink-2); }
.onboard-pills {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
}
.onboard-pill {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 20px;
  padding: 4px 12px;
}
.onboard-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 0;
  margin-bottom: 16px;
  align-self: flex-start;
}
.onboard-back-btn:hover { color: var(--ink-2); }
.onboard-logout-link {
  display: block;
  width: 100%;
  margin-top: 18px;
  background: none;
  border: none;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 0;
  text-align: center;
  font-weight: 500;
}
.onboard-logout-link:hover { color: var(--ink-2); }
.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrap .form-input {
  width: 100%;
  padding-right: 44px;
}
.password-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s;
}
.password-toggle:hover { color: var(--ink-2); }
.onboard-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 12px;
}
.onboard-divider::before,
.onboard-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-strong);
}
.onboard-token-input {
  text-align: center;
  font-size: 24px;
  letter-spacing: 8px;
  font-weight: 700;
  font-family: monospace;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.onboard-error {
  font-size: 12px;
  color: var(--red);
  min-height: 18px;
  margin-top: 6px;
  text-align: center;
}
.onboard-done-salon {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  margin-top: 12px;
}
.onboard-code-box {
  margin-top: 24px;
  border: 2px solid var(--accent);
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}
.onboard-code-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 10px;
}
.onboard-code-value {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 10px;
  color: var(--accent);
  font-family: monospace;
}
.onboard-code-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.55;
}
.btn-link-muted {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: none;
  display: block;
  width: 100%;
  text-align: center;
  transition: color 0.15s;
}
.btn-link-muted:hover { color: var(--text); }

/* === NUMBER INPUT — remove native spinners (clip digits in narrow 3-col grid) === */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

/* ===== LANGUAGE SWITCH (app shell) ===== */
.lang-switch {
  display: inline-flex;
  gap: 2px;
  background: var(--surface-3);
  border-radius: var(--r-full);
  padding: 2px;
  flex-shrink: 0;
}
.lang-switch .lang-opt {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: var(--r-full);
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.lang-switch .lang-opt.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .lang-switch .lang-opt.active { background: var(--surface-2); color: #fff; }
.lang-switch-sidebar { display: flex; width: 100%; margin-bottom: 10px; }
.lang-switch-sidebar .lang-opt { flex: 1; text-align: center; padding: 8px 0; font-size: 13px; }

/* Launch-offer note — readable, premium, wraps cleanly on mobile */
.plan-offer-note {
  color: var(--accent-dark);
  font-size: 12.5px;
  line-height: 1.45;
  margin: 8px 0 2px;
  font-weight: 600;
}
.plan-offer-note b { color: var(--accent-dark); font-weight: 800; }
[data-theme="dark"] .plan-offer-note,
[data-theme="dark"] .plan-offer-note b { color: var(--accent-glow); }

/* ================================================================
   PREMIUM GLASS SYSTEM — cool semantic visual language
   Final layer: semantic color, cool glass surfaces, graphite dark mode.
   ================================================================ */
:root {
  --zenora-blue: #0A84FF;
  --zenora-blue-dark: #0066D6;
  --zenora-cyan: #64D2FF;
  --attention: #7C3AED;
  --attention-2: #8B5CF6;
  --attention-bg: rgba(124,58,237,0.13);
  --attention-line: rgba(124,58,237,0.28);
  --success-line: rgba(52,199,89,0.30);
  --glass-blur: blur(24px) saturate(175%);

  --bg: #F4F8FF;
  --surface: rgba(255,255,255,0.78);
  --surface-1: rgba(255,255,255,0.82);
  --surface-2: rgba(245,249,255,0.74);
  --surface-3: rgba(230,238,248,0.82);
  --ink: #0F172A;
  --ink-2: rgba(15,23,42,0.76);
  --muted: #667085;
  --line: rgba(15,23,42,0.10);
  --line-strong: rgba(15,23,42,0.18);

  --accent: var(--zenora-blue);
  --accent-dark: var(--zenora-blue-dark);
  --accent-bg: rgba(10,132,255,0.12);
  --accent-glow: rgba(10,132,255,0.24);
  --accent-contrast: #FFFFFF;
  --accent-rgb: 10,132,255;

  --green: #34C759;
  --green-bg: rgba(52,199,89,0.13);
  --orange: var(--attention);
  --orange-bg: var(--attention-bg);
  --blue: var(--zenora-blue);
  --blue-bg: rgba(10,132,255,0.12);
  --red: #FF3B30;
  --red-bg: rgba(255,59,48,0.12);

  --shadow-sm: 0 10px 30px rgba(15,23,42,0.045), inset 0 1px 0 rgba(255,255,255,0.62);
  --shadow: 0 18px 56px rgba(15,23,42,0.075), inset 0 1px 0 rgba(255,255,255,0.68);
  --shadow-lg: 0 26px 78px rgba(15,23,42,0.11), inset 0 1px 0 rgba(255,255,255,0.72);
  --shadow-xl: 0 34px 110px rgba(15,23,42,0.14), inset 0 1px 0 rgba(255,255,255,0.76);
}

[data-theme="dark"] {
  --bg: #09111F;
  --surface: rgba(21,31,48,0.76);
  --surface-1: rgba(24,36,55,0.80);
  --surface-2: rgba(31,45,67,0.70);
  --surface-3: rgba(45,62,88,0.72);
  --ink: #F8FBFF;
  --ink-2: rgba(248,251,255,0.80);
  --muted: rgba(222,232,246,0.58);
  --line: rgba(255,255,255,0.13);
  --line-strong: rgba(255,255,255,0.22);

  --accent: #64D2FF;
  --accent-dark: #D9EFFF;
  --accent-bg: rgba(100,210,255,0.16);
  --accent-glow: rgba(100,210,255,0.20);
  --accent-contrast: #06111F;
  --accent-rgb: 100,210,255;

  --green: #30D158;
  --green-bg: rgba(48,209,88,0.17);
  --attention: #A78BFA;
  --attention-2: #8B5CF6;
  --attention-bg: rgba(167,139,250,0.18);
  --attention-line: rgba(196,181,253,0.34);
  --orange: var(--attention);
  --orange-bg: var(--attention-bg);
  --blue: #64D2FF;
  --blue-bg: rgba(100,210,255,0.16);
  --red: #FF453A;
  --red-bg: rgba(255,69,58,0.16);

  --shadow-sm: 0 12px 34px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.08);
  --shadow: 0 22px 62px rgba(0,0,0,0.26), inset 0 1px 0 rgba(255,255,255,0.10);
  --shadow-lg: 0 30px 90px rgba(0,0,0,0.34), inset 0 1px 0 rgba(255,255,255,0.12);
  --shadow-xl: 0 42px 120px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.14);
}

html,
body {
  background:
    radial-gradient(circle at 8% 0%, rgba(10,132,255,0.16), transparent 32%),
    radial-gradient(circle at 92% 4%, rgba(52,199,89,0.10), transparent 30%),
    radial-gradient(circle at 50% 96%, rgba(100,210,255,0.12), transparent 34%),
    linear-gradient(135deg, #F8FBFF 0%, #EEF5FF 48%, #F9FCFF 100%) !important;
}

html[data-theme="dark"],
html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 8% 0%, rgba(10,132,255,0.24), transparent 34%),
    radial-gradient(circle at 92% 2%, rgba(52,199,89,0.14), transparent 30%),
    radial-gradient(circle at 74% 82%, rgba(100,210,255,0.10), transparent 32%),
    linear-gradient(145deg, #122138 0%, #08111E 52%, #101A2B 100%) !important;
}

.content,
.view,
.page-header,
.client-filters-sticky {
  background: transparent !important;
}

html[data-theme="dark"] .content,
html[data-theme="dark"] .view,
html[data-theme="dark"] .client-filters-sticky {
  background: transparent !important;
}

.topbar,
.sidebar,
.bottom-nav,
.page-header,
.tabs-row,
.card,
.settings-card,
.today-hero,
.today-kpi,
.today-insight-card,
.today-agenda-card,
.plan-card,
.sa-card,
.sa-form,
.modal-sheet,
.overlay-card,
.detail-topbar,
.filter-pill,
.segment-card,
.service-row,
.staff-row,
.client-item,
.appt-item,
.data-action,
.campaign-card,
.salon-menu-item {
  background: var(--surface) !important;
  border-color: var(--line) !important;
  box-shadow: var(--shadow-sm);
}

.topbar,
.bottom-nav,
.detail-topbar {
  box-shadow: 0 1px 0 var(--line), 0 18px 52px rgba(15,23,42,0.08);
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .bottom-nav,
html[data-theme="dark"] .page-header,
html[data-theme="dark"] .tabs-row,
html[data-theme="dark"] .card,
html[data-theme="dark"] .settings-card,
html[data-theme="dark"] .today-hero,
html[data-theme="dark"] .today-kpi,
html[data-theme="dark"] .today-insight-card,
html[data-theme="dark"] .today-agenda-card,
html[data-theme="dark"] .plan-card,
html[data-theme="dark"] .sa-card,
html[data-theme="dark"] .sa-form,
html[data-theme="dark"] .modal-sheet,
html[data-theme="dark"] .overlay-card,
html[data-theme="dark"] .detail-topbar,
html[data-theme="dark"] .filter-pill,
html[data-theme="dark"] .segment-card,
html[data-theme="dark"] .service-row,
html[data-theme="dark"] .staff-row,
html[data-theme="dark"] .client-item,
html[data-theme="dark"] .appt-item,
html[data-theme="dark"] .data-action,
html[data-theme="dark"] .campaign-card,
html[data-theme="dark"] .salon-menu-item {
  background: var(--surface) !important;
  border-color: var(--line) !important;
}

.topbar-logo,
.sidebar-logo {
  background: linear-gradient(145deg, #111827, #030712) !important;
  color: #fff !important;
  box-shadow: 0 12px 28px rgba(15,23,42,0.16), inset 0 1px 0 rgba(255,255,255,0.16) !important;
}

html[data-theme="dark"] .topbar-logo,
html[data-theme="dark"] .sidebar-logo {
  background: rgba(255,255,255,0.94) !important;
  color: #0F172A !important;
  box-shadow: 0 16px 34px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.70) !important;
}

.sidebar-avatar {
  background: linear-gradient(135deg, var(--zenora-blue), #5856D6) !important;
}

.btn-primary,
.sa-btn-primary,
.sa-generate,
.plan-card-pro .plan-select-btn:not(:disabled),
.filter-pill.active,
.sa-chip.active,
.sa-seg button.active {
  background: linear-gradient(135deg, var(--zenora-blue), var(--zenora-blue-dark)) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 16px 36px rgba(10,132,255,0.22) !important;
}

html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .sa-btn-primary,
html[data-theme="dark"] .sa-generate,
html[data-theme="dark"] .plan-card-pro .plan-select-btn:not(:disabled) {
  background: linear-gradient(135deg, #F8FBFF, #D9EFFF) !important;
  color: #06111F !important;
  box-shadow: 0 18px 42px rgba(100,210,255,0.14) !important;
}

.btn-secondary,
.today-appt-action,
.plan-card-start .plan-select-btn:not(:disabled) {
  background: rgba(255,255,255,0.58) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .today-appt-action,
html[data-theme="dark"] .plan-card-start .plan-select-btn:not(:disabled) {
  background: rgba(255,255,255,0.08) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}

.today-appt-action.primary,
#todayInsightCta,
#staffTodayInsightCta,
.insight-card .btn,
.today-insight-card .btn {
  background: linear-gradient(135deg, var(--attention-2), #5B21B6) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 12px 28px rgba(124,58,237,0.26) !important;
}

html[data-theme="dark"] .today-appt-action.primary,
html[data-theme="dark"] #todayInsightCta,
html[data-theme="dark"] #staffTodayInsightCta,
html[data-theme="dark"] .insight-card .btn,
html[data-theme="dark"] .today-insight-card .btn {
  background: linear-gradient(135deg, #A78BFA, #6D28D9) !important;
  box-shadow: 0 14px 32px rgba(124,58,237,0.34) !important;
}

.tag-green,
.sa-badge-active {
  background: var(--green-bg) !important;
  color: #067A31 !important;
  border: 1px solid var(--success-line);
}

html[data-theme="dark"] .tag-green,
html[data-theme="dark"] .sa-badge-active {
  color: #BFF5CF !important;
}

.tag-orange,
.tag-attention,
.chip-orange,
.chip-attention,
.sa-badge-warn,
.history-dot.orange,
.history-dot.attention {
  background: var(--attention-bg) !important;
  color: var(--attention) !important;
  border: 1px solid var(--attention-line);
}

.tag-orange,
.tag-attention {
  box-shadow: 0 8px 20px rgba(124,58,237,0.12);
}

.tag-confirm-needed {
  background: linear-gradient(135deg, var(--attention-2), #5B21B6) !important;
  color: #fff !important;
  border: 1px solid rgba(124,58,237,0.18);
  box-shadow: 0 10px 24px rgba(124,58,237,0.26);
}

html[data-theme="dark"] .tag-orange,
html[data-theme="dark"] .tag-attention,
html[data-theme="dark"] .chip-orange,
html[data-theme="dark"] .chip-attention,
html[data-theme="dark"] .sa-badge-warn {
  color: #DDD6FE !important;
}

html[data-theme="dark"] .tag-confirm-needed {
  background: linear-gradient(135deg, #A78BFA, #6D28D9) !important;
  color: #fff !important;
  border-color: rgba(196,181,253,0.28);
  box-shadow: 0 12px 28px rgba(124,58,237,0.34);
}

.today-kpi-icon--orange,
.today-kpi-icon--attention {
  background: linear-gradient(135deg, var(--attention-2), #5B21B6) !important;
  color: #fff !important;
  box-shadow: 0 12px 26px rgba(124,58,237,0.22);
}

.today-kpi--confirm,
.today-kpi:has(#staffKpiPending) {
  border-color: var(--attention-line) !important;
}

.today-appt-row.needs-confirmation {
  border-color: var(--attention-line) !important;
  box-shadow: 0 16px 44px rgba(124,58,237,0.12), inset 0 1px 0 rgba(255,255,255,0.62);
}

html[data-theme="dark"] .today-appt-row.needs-confirmation {
  box-shadow: 0 18px 48px rgba(124,58,237,0.24), inset 0 1px 0 rgba(255,255,255,0.10);
}

.appt-btn.check {
  background: var(--attention-bg) !important;
  color: var(--attention) !important;
}

.appt-btn.check.done {
  background: var(--green-bg) !important;
  color: var(--green) !important;
}

.appt-item[data-risk="medium"]::before,
.history-dot.orange,
.history-dot.attention {
  background: var(--attention) !important;
}

.kpi-orange .kpi-value,
.client-vip,
.sa-metric.warn .sa-metric-val,
.sa-count.warn {
  color: var(--attention) !important;
}

.hero-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(100,210,255,0.30), transparent 32%),
    linear-gradient(135deg, #0A84FF, #084C9E) !important;
  color: #fff !important;
  box-shadow: 0 24px 70px rgba(10,132,255,0.24) !important;
}

.reminder-banner {
  background: linear-gradient(135deg, #0A84FF, #5856D6) !important;
  color: #fff !important;
  box-shadow: 0 16px 42px rgba(10,132,255,0.22) !important;
}

.insight-card {
  background: linear-gradient(135deg, rgba(10,132,255,0.10), rgba(124,58,237,0.08)) !important;
  border-color: rgba(10,132,255,0.14) !important;
}

.plan-card {
  border-radius: 26px;
}

.plan-card-pro {
  background:
    radial-gradient(circle at 100% 0%, rgba(124,58,237,0.13), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(245,249,255,0.82)) !important;
  border-color: rgba(10,132,255,0.32) !important;
  box-shadow: 0 24px 70px rgba(10,132,255,0.12) !important;
}

html[data-theme="dark"] .plan-card-pro {
  background:
    radial-gradient(circle at 100% 0%, rgba(124,58,237,0.20), transparent 38%),
    linear-gradient(180deg, rgba(24,36,55,0.88), rgba(16,26,43,0.76)) !important;
}

.plan-badge.plan-pro,
.plan-tier-badge.is-pro,
.plan-badge-current,
.plan-offer-badge,
.offer-badge {
  background: linear-gradient(135deg, var(--zenora-blue), #5856D6) !important;
  color: #fff !important;
  box-shadow: 0 12px 28px rgba(10,132,255,0.18) !important;
}

.plan-badge.plan-premium {
  background: linear-gradient(135deg, #5856D6, #7C3AED) !important;
}

.plan-card-pro .plan-capacity,
.plan-value {
  background: linear-gradient(135deg, rgba(10,132,255,0.10), rgba(124,58,237,0.08)) !important;
  border-color: rgba(10,132,255,0.18) !important;
  color: var(--ink) !important;
}

.page-title em {
  color: var(--accent) !important;
  -webkit-text-fill-color: var(--accent) !important;
  text-shadow: 0 0 18px rgba(10,132,255,0.14) !important;
}

.nav-tab.active,
.nav-tab.active svg,
.sidebar-item.active,
.sa-tab.active {
  color: var(--accent) !important;
}

.sidebar-item.active {
  background: var(--accent-bg) !important;
  box-shadow: inset 3px 0 0 var(--accent) !important;
}

.nav-tab.active svg {
  background: var(--accent-bg) !important;
}

html[data-theme="dark"] .nav-tab.active svg {
  background: rgba(100,210,255,0.12) !important;
}

html[data-theme="dark"] .filter-pill.active .filter-count {
  background: rgba(255,255,255,0.92) !important;
  color: #06111F !important;
  border-color: transparent !important;
}

@media (max-width: 640px) {
  .today-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .today-actions .btn:first-child {
    grid-column: 1 / -1;
  }
}

/* ================================================================
   PERFORMANCE LAYER — instant paint, fluid scroll (mobile-first)
   Mesh background moves to a fixed compositor layer (never repaints
   on scroll); list rows get flat-cost shadows; blur stays on chrome
   (topbar/bottomnav/modals) where content actually scrolls beneath.
   ================================================================ */
html { background: #EEF5FF !important; }
html[data-theme="dark"] { background: #09111F !important; }
body, html[data-theme="dark"] body { background: transparent !important; }

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 0%, rgba(10,132,255,0.16), transparent 32%),
    radial-gradient(circle at 92% 4%, rgba(52,199,89,0.10), transparent 30%),
    radial-gradient(circle at 50% 96%, rgba(100,210,255,0.12), transparent 34%),
    linear-gradient(135deg, #F8FBFF 0%, #EEF5FF 48%, #F9FCFF 100%);
}
html[data-theme="dark"] body::before {
  background:
    radial-gradient(circle at 8% 0%, rgba(10,132,255,0.24), transparent 34%),
    radial-gradient(circle at 92% 2%, rgba(52,199,89,0.14), transparent 30%),
    radial-gradient(circle at 74% 82%, rgba(100,210,255,0.10), transparent 32%),
    linear-gradient(145deg, #122138 0%, #08111E 52%, #101A2B 100%);
}

/* List rows: tight, cheap shadows (the 80–110px spreads stay on cards/modals only) */
.client-item, .appt-item, .service-row, .staff-row,
.filter-pill, .segment-card, .data-action, .salon-menu-item, .today-kpi {
  box-shadow: 0 1px 2px rgba(15,23,42,0.06), 0 4px 14px rgba(15,23,42,0.05),
              inset 0 1px 0 rgba(255,255,255,0.55) !important;
}
html[data-theme="dark"] .client-item, html[data-theme="dark"] .appt-item,
html[data-theme="dark"] .service-row, html[data-theme="dark"] .staff-row,
html[data-theme="dark"] .filter-pill, html[data-theme="dark"] .segment-card,
html[data-theme="dark"] .data-action, html[data-theme="dark"] .salon-menu-item,
html[data-theme="dark"] .today-kpi {
  box-shadow: 0 1px 2px rgba(0,0,0,0.30), 0 4px 14px rgba(0,0,0,0.18),
              inset 0 1px 0 rgba(255,255,255,0.07) !important;
}

/* No rubber-band refresh in PWA; instant tap feedback everywhere */
html, body { overscroll-behavior-y: none; }
button, .nav-tab, .sidebar-item, .filter-pill, .sa-tab { touch-action: manipulation; }

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