/* =====================================================================
   BeautyMate design system
   Tokens → base → layout shells → components → utilities
   ===================================================================== */

:root {
  --bg: #F8F6F8;
  --surface: #FFFFFF;
  --surface-2: #F4EFF2;
  --surface-3: #EAE2E7;
  --border: #E8E1E5;
  --border-strong: #D5CAD0;
  --text: #1A1A1A;
  --text-2: #5C5559;
  --text-3: #8A8287;
  --primary: #5B1E3F;
  --primary-hover: #481630;
  --primary-soft: #F5EAF0;
  --primary-text: #5B1E3F;
  --on-primary: #FFFFFF;
  --accent: #E8CFC6;
  --accent-soft: #F8EEEA;
  --secondary: #A78BFA;
  --secondary-soft: #EFEBFE;
  --success: #1B7A50; --success-soft: #E3F3EA;
  --warning: #9A5B0F; --warning-soft: #FBF0DD;
  --danger:  #B42335; --danger-soft:  #FBE8EA;
  --info:    #2A5FC0; --info-soft:    #E6EDFB;
  --star: #E0A106;
  --sidebar-bg: #151A2B;
  --sidebar-text: #B9BDCC;
  --sidebar-strong: #FFFFFF;
  --sidebar-active: rgba(255, 255, 255, .08);
  --focus: 0 0 0 3px rgba(91, 30, 63, .28);
  --shadow-sm: 0 1px 2px rgba(26, 16, 22, .06);
  --shadow: 0 4px 16px rgba(26, 16, 22, .07), 0 1px 3px rgba(26, 16, 22, .05);
  --shadow-lg: 0 18px 48px rgba(26, 16, 22, .16);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --header-h: 60px;
  --bottom-nav-h: 64px;
  --sidebar-w: 252px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E111B; --surface: #161A28; --surface-2: #1D2233; --surface-3: #262C40;
    --border: #262C3F; --border-strong: #353C54;
    --text: #F1EDF0; --text-2: #B7B0B8; --text-3: #857E89;
    --primary: #9A3F70; --primary-hover: #AE4C82; --primary-soft: rgba(199, 108, 158, .15); --primary-text: #E9A9CB;
    --accent-soft: rgba(232, 207, 198, .1); --secondary-soft: rgba(167, 139, 250, .14);
    --success: #52C48E; --success-soft: rgba(82, 196, 142, .13);
    --warning: #E8A948; --warning-soft: rgba(232, 169, 72, .13);
    --danger: #F07183;  --danger-soft: rgba(240, 113, 131, .13);
    --info: #7FA6F0;    --info-soft: rgba(127, 166, 240, .13);
    --sidebar-bg: #0A0D16;
    --focus: 0 0 0 3px rgba(233, 169, 203, .35);
    --shadow: 0 4px 16px rgba(0, 0, 0, .35); --shadow-lg: 0 18px 48px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E111B; --surface: #161A28; --surface-2: #1D2233; --surface-3: #262C40;
  --border: #262C3F; --border-strong: #353C54;
  --text: #F1EDF0; --text-2: #B7B0B8; --text-3: #857E89;
  --primary: #9A3F70; --primary-hover: #AE4C82; --primary-soft: rgba(199, 108, 158, .15); --primary-text: #E9A9CB;
  --accent-soft: rgba(232, 207, 198, .1); --secondary-soft: rgba(167, 139, 250, .14);
  --success: #52C48E; --success-soft: rgba(82, 196, 142, .13);
  --warning: #E8A948; --warning-soft: rgba(232, 169, 72, .13);
  --danger: #F07183;  --danger-soft: rgba(240, 113, 131, .13);
  --info: #7FA6F0;    --info-soft: rgba(127, 166, 240, .13);
  --sidebar-bg: #0A0D16;
  --focus: 0 0 0 3px rgba(233, 169, 203, .35);
  --shadow: 0 4px 16px rgba(0, 0, 0, .35); --shadow-lg: 0 18px 48px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; } h4 { font-size: .95rem; }
p { margin: 0 0 .8em; }
a { color: var(--primary-text); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
small, .small { font-size: .82rem; }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.display { font-family: var(--font-display); font-weight: 600; letter-spacing: 0; }
.icon { flex-shrink: 0; vertical-align: middle; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
::selection { background: var(--primary-soft); }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; background: var(--primary); color: #F5E1DA;
  display: grid; place-items: center; font: 600 17px/1 var(--font-display); letter-spacing: -1px; position: relative;
}
.brand-mark::after { content: "✦"; position: absolute; top: 3px; right: 5px; font-size: 7px; color: #F5E1DA; }
.brand-name { font: 600 1.25rem/1 var(--font-display); }
.brand-name small { display: block; font: 500 .56rem/1.6 var(--font-sans); letter-spacing: .28em; text-transform: uppercase; color: var(--text-3); margin-top: 2px; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--text); --btn-bd: var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--radius); border: 1px solid var(--btn-bd);
  background: var(--btn-bg); color: var(--btn-fg); font: 600 .92rem/1 var(--font-sans);
  cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn-primary { --btn-bg: var(--primary); --btn-fg: var(--on-primary); --btn-bd: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-soft { --btn-bg: var(--primary-soft); --btn-fg: var(--primary-text); --btn-bd: transparent; }
.btn-soft:hover { background: var(--primary-soft); filter: brightness(.97); }
.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; }
.btn-danger { --btn-bg: var(--danger-soft); --btn-fg: var(--danger); --btn-bd: transparent; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-success { --btn-bg: var(--success-soft); --btn-fg: var(--success); --btn-bd: transparent; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: .84rem; border-radius: 10px; }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 1rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: 42px; min-height: 42px; padding: 0; border-radius: 50%; }
.btn-icon.btn-sm { width: 34px; min-height: 34px; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--btn-fg) transparent var(--btn-fg) transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 16px; }
.form-grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: .84rem; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: .78rem; color: var(--text-3); margin: 0; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: 400 .95rem/1.3 var(--font-sans); transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A8287' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary-text); box-shadow: var(--focus); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .8rem; margin: 0; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group > .icon { position: absolute; left: 14px; color: var(--text-3); pointer-events: none; }
.input-group > .input { padding-left: 42px; }
.input-group > .input-action { position: absolute; right: 6px; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: .92rem; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary); flex-shrink: 0; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 42px; height: 24px; border-radius: 99px; background: var(--surface-3); position: relative; transition: background .15s; flex-shrink: 0; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s; }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: var(--focus); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 650; margin-bottom: 10px; padding: 0; }

/* Radio/checkbox cards (service picker, payment method, etc.) */
.option-list { display: grid; gap: 10px; }
.option-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; position: relative; }
.option-card:hover { border-color: var(--border-strong); }
.option-card input { position: absolute; opacity: 0; pointer-events: none; }
.option-card .radio-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong); flex-shrink: 0; display: grid; place-items: center; }
.option-card .check-box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--border-strong); flex-shrink: 0; display: grid; place-items: center; color: transparent; }
.option-card:has(input:checked) { border-color: var(--primary-text); background: var(--primary-soft); }
.option-card:has(input:checked) .radio-dot { border-color: var(--primary-text); }
.option-card:has(input:checked) .radio-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--primary-text); }
.option-card:has(input:checked) .check-box { background: var(--primary); border-color: var(--primary); color: #fff; }
.option-card:has(input:focus-visible) { box-shadow: var(--focus); }
.option-card:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.option-card .grow { flex: 1; min-width: 0; }
.option-card .title { font-weight: 600; }
.option-card .meta { font-size: .82rem; color: var(--text-2); }
.option-card .price { font-weight: 650; white-space: nowrap; }

/* ---------- Cards & surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-body { padding: 18px; }
.card-header { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-header h2, .card-header h3 { margin: 0; font-size: 1rem; }
.card-footer { padding: 14px 18px; border-top: 1px solid var(--border); }
.card + .card { margin-top: 16px; }
/* …but not between cards laid out side by side in a grid (keeps rows aligned). */
.dash-grid > .card + .card, .grid-2 > .card + .card, .grid-3 > .card + .card, .results-grid > .card + .card, .h-scroll > .card + .card, .stack > .card + .card, .plan-grid > .card + .card, .kpi-grid > .card + .card { margin-top: 0; }
.stack { display: grid; gap: 16px; }
.stack-sm { display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: .92rem; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; text-align: right; font-weight: 550; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Badges, chips, avatars ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: .74rem; font-weight: 600; white-space: nowrap; line-height: 1.4; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-neutral { background: var(--surface-2); color: var(--text-2); }
.badge-primary { background: var(--primary-soft); color: var(--primary-text); }
.verified { display: inline-flex; align-items: center; gap: 3px; color: var(--info); font-size: .78rem; font-weight: 650; }
.verified .icon { color: var(--info); }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: .86rem; font-weight: 550; white-space: nowrap; cursor: pointer; text-decoration: none !important; }
.chip:hover { border-color: var(--border-strong); }
.chip.is-active, .chip:has(input:checked) { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.chip input { display: none; }

.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--surface-2); }
.avatar-initials { display: inline-grid; place-items: center; font-weight: 650; color: hsl(var(--h) 45% 30%); background: hsl(var(--h) 55% 90%); }
:root[data-theme="dark"] .avatar-initials { color: hsl(var(--h) 60% 82%); background: hsl(var(--h) 30% 24%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar-initials { color: hsl(var(--h) 60% 82%); background: hsl(var(--h) 30% 24%); } }
.avatar-xs { width: 24px; height: 24px; font-size: .62rem; }
.avatar-sm { width: 34px; height: 34px; font-size: .75rem; }
.avatar-md { width: 44px; height: 44px; font-size: .9rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.2rem; }
.avatar-xl { width: 88px; height: 88px; font-size: 1.6rem; }
.avatar.square { border-radius: 12px; }

.stars { display: inline-flex; gap: 1px; color: var(--border-strong); }
.stars .star.is-on { color: var(--star); }
.stars .star.is-on .icon { fill: currentColor; }
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: .84rem; font-weight: 600; }
.rating .icon { color: var(--star); fill: var(--star); }
.rating .count { color: var(--text-3); font-weight: 500; }

/* ---------- Alerts, toasts, empty & loading states ---------- */
.alert { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--radius); font-size: .9rem; border: 1px solid transparent; }
.alert .icon { margin-top: 1px; }
.alert-info { background: var(--info-soft); color: var(--info); }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-warning { background: var(--warning-soft); color: var(--warning); }
.alert-danger { background: var(--danger-soft); color: var(--danger); }
.alert-dev { background: repeating-linear-gradient(-45deg, var(--warning-soft), var(--warning-soft) 10px, transparent 10px, transparent 20px); border-color: var(--warning); color: var(--text); }
.alert p { margin: 0; }
.alert strong { color: inherit; }

.toast-stack { position: fixed; z-index: 1000; left: 50%; transform: translateX(-50%); top: 14px; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); font-size: .9rem; animation: toast-in .2s ease-out; }
.toast .icon { margin-top: 1px; }
.toast-success .icon { color: #5DD39E; } .toast-error .icon { color: #FF8A9A; } .toast-warning .icon { color: #F5C26B; } .toast-info .icon { color: #A9C4FF; }
.toast button { margin-left: auto; background: none; border: 0; color: inherit; opacity: .7; cursor: pointer; padding: 0; }
.toast.is-leaving { opacity: 0; transform: translateY(-6px); transition: .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-2); }
.empty-state .empty-icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); }
.empty-state h3 { color: var(--text); margin-bottom: 4px; }
.empty-state p { max-width: 360px; margin: 0 auto 16px; font-size: .92rem; }

.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton-slot { height: 44px; border-radius: 10px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--border-strong); border-top-color: var(--primary-text); animation: spin .7s linear infinite; }
.loading-block { display: grid; place-items: center; padding: 30px; }

/* ---------- Tabs / segmented ---------- */
.segmented { display: flex; padding: 4px; gap: 4px; background: var(--surface-2); border-radius: 12px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }
.segmented a, .segmented button { flex: 1; text-align: center; min-height: 38px; display: grid; place-items: center; border-radius: 9px; border: 0; background: transparent; color: var(--text-2); font: 600 .88rem var(--font-sans); cursor: pointer; text-decoration: none !important; padding: 0 12px; white-space: nowrap; }
.segmented .is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { padding: 12px 0; border: 0; background: none; color: var(--text-2); font: 600 .9rem var(--font-sans); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; cursor: pointer; text-decoration: none !important; }
.tabs .is-active { color: var(--primary-text); border-color: var(--primary-text); }
[data-tab-panel][hidden] { display: none !important; }

/* ---------- Lists ---------- */
.list { display: grid; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: var(--text); text-decoration: none !important; border-bottom: 1px solid var(--border); background: var(--surface); }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { background: var(--surface-2); }
.list-item .li-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex-shrink: 0; }
.list-item .li-title { font-weight: 600; }
.list-item .li-meta { font-size: .82rem; color: var(--text-2); }
.list-item .chev { color: var(--text-3); margin-left: auto; }
.card > .list { border-radius: inherit; overflow: hidden; }

/* ---------- Modal (native <dialog>) & sheet ---------- */
dialog.modal { border: 0; padding: 0; border-radius: var(--radius-xl); background: var(--surface); color: var(--text); width: min(520px, calc(100% - 32px)); max-height: calc(100vh - 48px); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(10, 8, 14, .55); backdrop-filter: blur(2px); }
dialog.modal[open] { animation: modal-in .18s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; }
.modal-header h2 { margin: 0; font-size: 1.1rem; }
.modal-body { padding: 10px 20px 20px; overflow-y: auto; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px 18px; border-top: 1px solid var(--border); }
.modal-wide { width: min(760px, calc(100% - 32px)) !important; }
@media (max-width: 640px) {
  dialog.modal.sheet-mobile { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: 22px 22px 0 0; max-height: 88vh; }
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); font-weight: 650; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
@media (max-width: 720px) {
  .table-responsive thead { display: none; }
  .table-responsive, .table-responsive tbody, .table-responsive tr, .table-responsive td { display: block; width: 100%; }
  .table-responsive tr { padding: 10px 14px; border-bottom: 1px solid var(--border); }
  .table-responsive td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table-responsive td::before { content: attr(data-label); font-weight: 600; color: var(--text-3); font-size: .78rem; text-align: left; }
  .table-responsive td.actions { justify-content: flex-end; padding-top: 8px; }
  .table-responsive td.actions::before { content: none; }
}

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 38px; height: 38px; display: grid; place-items: center; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: .88rem; text-decoration: none !important; }
.pagination .is-current { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.pagination .is-disabled { opacity: .45; }

/* ---------- Dropdown ---------- */
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; display: none; }
.dropdown.is-open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text); font: 500 .9rem var(--font-sans); background: none; border: 0; cursor: pointer; text-align: left; text-decoration: none !important; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-2); }
.dropdown-menu .danger { color: var(--danger); }
.dropdown-menu hr { margin: 6px 0; }

/* =====================================================================
   CUSTOMER APP SHELL — mobile-first with bottom nav, top nav on desktop
   ===================================================================== */
.app-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.app-header-inner { height: var(--header-h); max-width: 1180px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 16px; }
.app-header .brand-name { font-size: 1.15rem; }
.app-nav { display: none; gap: 4px; margin-left: 18px; }
.app-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: .9rem; text-decoration: none !important; }
.app-nav a:hover { background: var(--surface-2); color: var(--text); }
.app-nav a.is-active { color: var(--primary-text); background: var(--primary-soft); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--text); background: transparent; border: 0; cursor: pointer; text-decoration: none !important; }
.icon-btn:hover { background: var(--surface-2); }
.dot-badge { position: absolute; top: 6px; right: 6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--danger); color: #fff; font-size: .62rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.dot-badge[hidden] { display: none; }

.app-main { max-width: 1180px; margin: 0 auto; padding: 18px 16px calc(var(--bottom-nav-h) + 28px); }
.app-main.narrow { max-width: 720px; }

.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(5, 1fr); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-3); font-size: .68rem; font-weight: 600; text-decoration: none !important; position: relative; }
.bottom-nav a.is-active { color: var(--primary-text); }
.bottom-nav a.is-active::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--primary-text); }

@media (min-width: 900px) {
  .app-nav { display: flex; }
  .bottom-nav { display: none; }
  .app-main { padding-bottom: 48px; padding-top: 28px; }
}

.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: 1.45rem; }
.page-head .back { margin-left: -8px; }
.section { margin-top: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 1.08rem; }
.section-head a { font-size: .86rem; font-weight: 600; }

/* Horizontal scrollers */
.h-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 78%); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.h-scroll > * { scroll-snap-align: start; }
@media (min-width: 640px) { .h-scroll { grid-auto-columns: minmax(260px, 40%); } }
@media (min-width: 1000px) { .h-scroll { grid-auto-columns: calc((100% - 42px) / 4); margin: 0; padding-left: 0; padding-right: 0; } }

/* Home hero */
.hero { background: var(--primary); color: #fff; border-radius: var(--radius-xl); padding: 22px 18px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(232, 207, 198, .35), transparent 70%); }
.hero h1 { font-family: var(--font-display); font-weight: 600; font-size: 1.55rem; margin-bottom: 4px; color: #fff; }
.hero p { color: rgba(255, 255, 255, .8); margin-bottom: 14px; }
.hero .search-bar { position: relative; z-index: 1; }
.search-bar { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 4px 4px 4px 14px; box-shadow: var(--shadow-sm); }
.search-bar .icon { color: var(--text-3); }
.search-bar input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: 400 .95rem var(--font-sans); height: 44px; outline: none; }
.location-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; font-weight: 600; color: inherit; background: rgba(255, 255, 255, .14); border: 0; padding: 7px 12px; border-radius: 99px; cursor: pointer; }
.hero .location-pill { color: #fff; margin-bottom: 14px; position: relative; z-index: 1; }

/* Category tiles */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 8px; }
@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 1000px) { .cat-grid { grid-template-columns: repeat(9, 1fr); } }
.cat-tile { display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; color: var(--text); font-size: .76rem; font-weight: 600; text-decoration: none !important; line-height: 1.2; }
.cat-tile .cat-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--primary-text); border: 1px solid var(--border); transition: transform .15s; }
.cat-tile:hover .cat-icon { transform: translateY(-2px); background: var(--primary-soft); }

/* Business cards */
.biz-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); position: relative; }
.biz-card-cover { aspect-ratio: 16 / 9; background: var(--surface-2); position: relative; overflow: hidden; }
.biz-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-fallback { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, hsl(var(--h) 40% 88%), hsl(calc(var(--h) + 40) 45% 80%)); color: hsl(var(--h) 45% 30%); font: 600 2rem var(--font-display); }
:root[data-theme="dark"] .cover-fallback { background: linear-gradient(135deg, hsl(var(--h) 30% 22%), hsl(calc(var(--h) + 40) 30% 16%)); color: hsl(var(--h) 60% 80%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cover-fallback { background: linear-gradient(135deg, hsl(var(--h) 30% 22%), hsl(calc(var(--h) + 40) 30% 16%)); color: hsl(var(--h) 60% 80%); } }
.biz-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.biz-card h3 { margin: 0; font-size: 1rem; display: flex; align-items: center; gap: 6px; }
.biz-card h3 a { color: var(--text); }
.biz-card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.biz-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .82rem; color: var(--text-2); }
.biz-meta .sep { color: var(--text-3); }
.biz-card .price-from { font-size: .84rem; color: var(--text-2); margin-top: 2px; }
.biz-card .price-from strong { color: var(--text); }
.fav-btn { position: absolute; z-index: 2; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: #3a2a33; cursor: pointer; box-shadow: var(--shadow-sm); }
.fav-btn.is-on { color: #C2185B; }
.fav-btn.is-on .icon { fill: currentColor; }
.fav-btn.inline { position: static; background: var(--surface-2); color: var(--text-2); }
.fav-btn.inline.is-on { color: #C2185B; }
.cover-badges { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 6px; z-index: 1; }
.cover-badges .badge { background: rgba(255, 255, 255, .94); color: #2a1f25; }

.biz-row { display: flex; gap: 14px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); position: relative; }
.biz-row-thumb { width: 96px; height: 96px; border-radius: 12px; overflow: hidden; flex-shrink: 0; background: var(--surface-2); }
.biz-row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.biz-row .grow { display: flex; flex-direction: column; gap: 3px; }
.biz-row h3 { margin: 0; font-size: 1rem; }
.biz-row h3 a { color: var(--text); }
.biz-row h3 a::after { content: ""; position: absolute; inset: 0; }
.biz-row .fav-btn { position: relative; top: auto; right: auto; z-index: 2; background: var(--surface-2); }
.results-grid { display: grid; gap: 12px; }
@media (min-width: 760px) { .results-grid { grid-template-columns: 1fr 1fr; } }

/* Explore layout */
.explore-layout { display: grid; gap: 20px; }
@media (min-width: 1000px) { .explore-layout { grid-template-columns: 280px 1fr; align-items: start; } .filters-panel { position: sticky; top: calc(var(--header-h) + 16px); } }
.filters-panel .card-body { display: grid; gap: 18px; }
.filters-panel h3 { font-size: .86rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin-bottom: 8px; }
@media (max-width: 999px) { .filters-panel { display: none; } .filters-panel.is-open { display: block; } }
.map-box { height: 420px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }

/* Business profile */
.profile-cover { position: relative; height: 220px; border-radius: 0 0 var(--radius-xl) var(--radius-xl); overflow: hidden; margin: -18px -16px 0; background: var(--surface-2); }
.profile-cover img { width: 100%; height: 100%; object-fit: cover; }
.profile-cover .cover-actions { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; }
.profile-cover .cover-actions .icon-btn { background: rgba(255, 255, 255, .92); color: #2a1f25; }
@media (min-width: 900px) { .profile-cover { height: 300px; margin: 0; border-radius: var(--radius-xl); } }
.profile-head { display: flex; gap: 14px; align-items: flex-end; margin-top: -36px; position: relative; padding: 0 4px; }
.profile-logo { width: 80px; height: 80px; border-radius: 20px; border: 4px solid var(--bg); background: var(--surface); overflow: hidden; flex-shrink: 0; box-shadow: var(--shadow); }
.profile-logo img, .profile-logo .avatar { width: 100%; height: 100%; border-radius: 0; }
.profile-title h1 { margin: 0; font-size: 1.5rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-layout { display: grid; gap: 22px; margin-top: 18px; }
@media (min-width: 1000px) { .profile-layout { grid-template-columns: 1fr 340px; align-items: start; } .profile-aside { position: sticky; top: calc(var(--header-h) + 16px); } }
.sticky-cta { position: fixed; left: 0; right: 0; bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); padding: 10px 16px; background: var(--surface); border-top: 1px solid var(--border); z-index: 40; display: flex; gap: 10px; align-items: center; }
@media (min-width: 900px) { .sticky-cta { display: none; } }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photo-grid img { aspect-ratio: 1; object-fit: cover; border-radius: 10px; width: 100%; }
.hours-table { width: 100%; font-size: .9rem; }
.hours-table td { padding: 5px 0; }
.hours-table td:last-child { text-align: right; }
.hours-table tr.is-today td { font-weight: 700; color: var(--primary-text); }
.service-item { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.service-item:last-child { border-bottom: 0; }
.service-item .grow h4 { margin: 0 0 2px; font-size: .96rem; }
.service-item .price { font-weight: 650; text-align: right; white-space: nowrap; }
.service-item .price small { display: block; color: var(--text-3); font-weight: 500; }
.staff-chip { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: .82rem; width: 88px; flex-shrink: 0; }
.amenities { display: flex; flex-wrap: wrap; gap: 8px; }
.amenity { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 99px; background: var(--surface-2); font-size: .82rem; }

/* Reviews */
.review { padding: 16px 0; border-bottom: 1px solid var(--border); }
.review:last-child { border-bottom: 0; }
.review-head { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.review-reply { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: .9rem; }
.rating-summary { display: flex; gap: 20px; align-items: center; }
.rating-big { font: 600 2.6rem/1 var(--font-display); }
.rating-bars { flex: 1; display: grid; gap: 4px; font-size: .78rem; }
.rating-bar { display: grid; grid-template-columns: 90px 1fr 30px; align-items: center; gap: 8px; color: var(--text-2); }
.rating-bar .bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.rating-bar .bar span { display: block; height: 100%; background: var(--star); border-radius: inherit; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-input input { position: absolute; opacity: 0; width: 1px; }
.star-input label { cursor: pointer; color: var(--border-strong); }
.star-input label .icon { width: 30px; height: 30px; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--star); }
.star-input input:checked ~ label .icon, .star-input label:hover .icon, .star-input label:hover ~ label .icon { fill: currentColor; }
.star-input input:focus-visible + label { box-shadow: var(--focus); border-radius: 4px; }

/* Booking flow */
.stepper { display: flex; gap: 6px; margin-bottom: 18px; }
.stepper span { flex: 1; height: 4px; border-radius: 99px; background: var(--surface-3); }
.stepper span.is-done { background: var(--primary); }
.booking-layout { display: grid; gap: 20px; }
@media (min-width: 1000px) { .booking-layout { grid-template-columns: 1fr 360px; align-items: start; } .booking-summary { position: sticky; top: calc(var(--header-h) + 16px); } }
.booking-step[hidden] { display: none; }
.step-actions { display: flex; gap: 10px; margin-top: 20px; }
@media (max-width: 899px) {
  .step-actions { position: sticky; bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 8px); background: var(--bg); padding: 10px 0; z-index: 5; }
}
.date-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 58px; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
.date-pill { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 0; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font: inherit; color: var(--text); }
.date-pill .dow { font-size: .7rem; color: var(--text-3); text-transform: uppercase; font-weight: 600; }
.date-pill .day { font-size: 1.1rem; font-weight: 700; }
.date-pill .mon { font-size: .68rem; color: var(--text-3); }
.date-pill.is-active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.date-pill.is-active .dow, .date-pill.is-active .mon { color: rgba(255, 255, 255, .8); }
.date-pill:disabled { opacity: .4; cursor: not-allowed; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slot { min-height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font: 600 .9rem var(--font-sans); color: var(--text); cursor: pointer; }
.slot:hover { border-color: var(--primary-text); }
.slot.is-active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.slot-group-label { font-size: .78rem; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; margin: 14px 0 8px; }
.summary-line { display: flex; justify-content: space-between; gap: 12px; font-size: .92rem; padding: 4px 0; }
.summary-line.total { font-weight: 700; font-size: 1.05rem; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 12px; }
.summary-line.discount { color: var(--success); }

/* Appointment cards */
.appt-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px; display: grid; gap: 10px; }
.appt-when { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--text-2); }
.appt-main { display: flex; gap: 12px; align-items: center; }
.success-hero { text-align: center; padding: 22px 10px 8px; }
.success-hero .check-ring { width: 72px; height: 72px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; margin: 0 auto 14px; }
.success-hero .check-ring.pending { background: var(--warning-soft); color: var(--warning); }

/* Profile menu */
.profile-card { display: flex; align-items: center; gap: 14px; }
.timeline { display: grid; gap: 0; position: relative; }
.timeline-item { display: grid; grid-template-columns: 14px 1fr; gap: 12px; padding-bottom: 14px; position: relative; font-size: .88rem; }
.timeline-item::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--primary-text); margin-top: 5px; z-index: 1; }
.timeline-item::after { content: ""; position: absolute; left: 4px; top: 16px; bottom: 0; width: 2px; background: var(--border); }
.timeline-item:last-child::after { display: none; }

/* Notifications */
.notif { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none !important; background: var(--surface); }
.notif.is-unread { background: var(--primary-soft); }
.notif .n-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--primary-text); flex-shrink: 0; }
.notif .n-title { font-weight: 600; font-size: .92rem; }
.notif .n-body { font-size: .86rem; color: var(--text-2); }
.notif .n-time { font-size: .74rem; color: var(--text-3); white-space: nowrap; margin-left: auto; }

/* Chat */
.chat { display: flex; flex-direction: column; height: calc(100vh - var(--header-h) - var(--bottom-nav-h) - 60px); min-height: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
@media (min-width: 900px) { .chat { height: calc(100vh - var(--header-h) - 120px); } }
.chat-head { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.bubble { max-width: 78%; padding: 9px 13px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); font-size: .92rem; white-space: pre-wrap; word-wrap: break-word; }
.bubble.mine { align-self: flex-end; background: var(--primary); color: var(--on-primary); border-color: var(--primary); border-bottom-right-radius: 4px; }
.bubble.theirs { align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble .b-meta { display: block; font-size: .68rem; opacity: .7; margin-top: 3px; text-align: right; }
.bubble img { border-radius: 10px; margin-bottom: 4px; max-height: 240px; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); align-items: flex-end; }
.chat-form textarea { flex: 1; min-height: 44px; max-height: 120px; resize: none; }

/* Auth screens */
.auth-shell { min-height: 100vh; display: grid; }
@media (min-width: 960px) { .auth-shell { grid-template-columns: 1.05fr 1fr; } }
.auth-aside { display: none; background: var(--primary); color: #fff; padding: 48px; position: relative; overflow: hidden; }
.auth-aside::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; right: -180px; bottom: -200px; background: radial-gradient(circle, rgba(232, 207, 198, .28), transparent 70%); }
@media (min-width: 960px) { .auth-aside { display: flex; flex-direction: column; justify-content: space-between; } }
.auth-aside .brand, .auth-aside .brand-name { color: #fff; }
.auth-aside .brand-mark { background: #fff; color: var(--primary); }
.auth-aside .brand-mark::after { color: var(--primary); }
.auth-aside h2 { font: 600 2.3rem/1.15 var(--font-display); max-width: 440px; }
.auth-aside ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; position: relative; }
.auth-aside li { display: flex; gap: 12px; align-items: center; color: rgba(255, 255, 255, .88); }
.auth-aside li .icon { color: var(--accent); }
.auth-main { display: flex; flex-direction: column; justify-content: center; padding: 28px 20px; max-width: 460px; width: 100%; margin: 0 auto; }
.auth-main h1 { font-size: 1.6rem; }
.auth-foot { margin-top: 22px; text-align: center; font-size: .9rem; color: var(--text-2); }
.or-sep { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: .8rem; margin: 18px 0; }
.or-sep::before, .or-sep::after { content: ""; height: 1px; flex: 1; background: var(--border); }

/* Onboarding */
.onboard { min-height: 100vh; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; padding: 24px 20px; }
.onboard-slide { flex: 1; display: none; flex-direction: column; justify-content: center; text-align: center; gap: 12px; }
.onboard-slide.is-active { display: flex; }
.onboard-art { width: 220px; height: 220px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); position: relative; }
.onboard-art::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1px dashed var(--border-strong); }
.onboard h1 { font: 600 1.9rem/1.2 var(--font-display); }
.dots { display: flex; gap: 6px; justify-content: center; margin: 18px 0; }
.dots span { width: 8px; height: 8px; border-radius: 99px; background: var(--surface-3); transition: width .2s; }
.dots span.is-active { width: 22px; background: var(--primary); }

/* Error pages */
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 40px 20px; }
.error-code { font: 600 5rem/1 var(--font-display); color: var(--primary-text); }

/* Utilities */
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 28px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; }
.p-0 { padding: 0 !important; }
.text-center { text-align: center; } .text-right { text-align: right; }
.w-100 { width: 100%; }
.fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.text-success { color: var(--success); } .text-danger { color: var(--danger); } .text-warning { color: var(--warning); } .text-primary { color: var(--primary-text); }
.nowrap { white-space: nowrap; }
/* Visibility helpers only ever hide — they never override an element's own display (flex buttons etc.). */
@media (max-width: 899px) { .hide-mobile { display: none !important; } }
@media (min-width: 900px) { .hide-desktop { display: none !important; } }
.tag-v2 { display: inline-block; font-size: .66rem; font-weight: 700; letter-spacing: .06em; padding: 2px 7px; border-radius: 99px; background: var(--secondary-soft); color: var(--secondary); text-transform: uppercase; vertical-align: middle; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.slot.is-current { border-style: dashed; border-color: var(--primary-text); color: var(--primary-text); }
/* Grid children must be allowed to shrink below their content (scrollers inside) */
.booking-layout > *, .explore-layout > *, .profile-layout > *, .dash-grid > *, .grid-2 > *, .grid-3 > *, .results-grid > * { min-width: 0; }

/* ---------- Compatibility: iPhone Safari & older Android WebViews ---------- */
/* iOS Safari zooms the page into any input with text under 16px — keep form text at 16px on phones. */
@media (max-width: 899px) { .input, .select, .textarea, .search-bar input { font-size: 16px; } }
/* :has() fallback (iOS < 15.4, Chrome < 105): app.js mirrors the checked/disabled state onto classes. */
.option-card.is-checked { border-color: var(--primary-text); background: var(--primary-soft); }
.option-card.is-checked .radio-dot { border-color: var(--primary-text); }
.option-card.is-checked .radio-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--primary-text); }
.option-card.is-checked .check-box { background: var(--primary); border-color: var(--primary); color: #fff; }
.option-card.is-disabled { opacity: .55; cursor: not-allowed; }
/* color-mix() fallback (iOS < 16.2, Chrome < 111). */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  .app-header { background: var(--bg); }
}

/* Legal pages & web footer */
.legal h2 { font-size: 1.05rem; margin: 10px 0 0; }
.legal p { margin: 0; }
.legal ul, .legal ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.site-foot { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--text-3); font-size: .8rem; display: flex; gap: 6px 16px; flex-wrap: wrap; justify-content: center; }
.site-foot a { color: var(--text-2); }

/* Inside the native app the store listing replaces the web footer. */
.is-native-app .site-foot { display: none; }

/* Price breakdown rows (booking payment, receipts, revenue splits) */
.split-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.split-row:last-child { border-bottom: 0; }
.split-row.total { font-weight: 700; }
.input-group .input-suffix { position: absolute; right: 12px; color: var(--text-3); font-size: .85rem; pointer-events: none; }
.input-group:has(.input-suffix) > .input { padding-left: 14px; padding-right: 52px; }

/* Paid placements are always labelled */
.sponsored-tag { position: absolute; top: 10px; left: 10px; z-index: 2; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; background: rgba(26, 26, 26, .78); color: #fff; }
.sponsored-tag.inline { position: static; vertical-align: middle; background: var(--surface-3); color: var(--text-2); }
.biz-row.is-sponsored { border-color: var(--border-strong); }

/* Continue with Apple / Google (brand-compliant: black Apple button, white Google button) */
.btn-apple { background: #000; color: #fff; border-color: #000; gap: 10px; }
.btn-apple:hover { background: #1f1f1f; color: #fff; }
.btn-google { background: #fff; color: #1f1f1f; border: 1px solid #747775; gap: 10px; }
.btn-google:hover { background: #f8f9fa; color: #1f1f1f; }
.divider-text { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: .85rem; margin: 6px 0; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.settings-heading { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin: 22px 4px 8px; }
