/* =========================================================================
   ServiceBooking UI — modern SaaS style (neutral surfaces, one accent colour).
   Mobile-first. Large touch targets (44–48px). No inline styles (strict CSP).
   ========================================================================= */

:root {
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --text: #18181b;
  --text-2: #52525b;
  --text-3: #71717a;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;

  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-text: #ffffff;
  --primary-soft: #eef2ff;
  --primary-soft-text: #3730a3;

  --success: #15803d;
  --success-soft: #dcfce7;
  --warning: #a16207;
  --warning-soft: #fef9c3;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --info: #0369a1;
  --info-soft: #e0f2fe;

  --focus: 0 0 0 3px rgba(79, 70, 229, .35);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 32px -8px rgba(16, 24, 40, .18);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --sidebar-w: 264px;
  color-scheme: light;
  --bottom-nav-h: 64px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09090b;
  --surface: #131316;
  --surface-2: #1c1c21;
  --text: #fafafa;
  --text-2: #c4c4cc;
  --text-3: #a1a1aa;
  --border: #27272a;
  --border-strong: #3f3f46;
  --primary: #818cf8;
  --primary-hover: #a5b4fc;
  --primary-text: #0b0b20;
  --primary-soft: #1e1b4b;
  --primary-soft-text: #c7d2fe;
  --success: #4ade80;
  --success-soft: #052e16;
  --warning: #facc15;
  --warning-soft: #2a2205;
  --danger: #f87171;
  --danger-soft: #3b0a0a;
  --info: #38bdf8;
  --info-soft: #082f49;
  --shadow-sm: none;
  --shadow: 0 0 0 1px rgba(255, 255, 255, .02);
  --shadow-lg: 0 12px 32px -8px rgba(0, 0, 0, .6);
}

/* "System" (no data-theme): follow the device setting */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #09090b;
    --surface: #131316;
    --surface-2: #1c1c21;
    --text: #fafafa;
    --text-2: #c4c4cc;
    --text-3: #a1a1aa;
    --border: #27272a;
    --border-strong: #3f3f46;
    --primary: #818cf8;
    --primary-hover: #a5b4fc;
    --primary-text: #0b0b20;
    --primary-soft: #1e1b4b;
    --primary-soft-text: #c7d2fe;
    --success: #4ade80;
    --success-soft: #052e16;
    --warning: #facc15;
    --warning-soft: #2a2205;
    --danger: #f87171;
    --danger-soft: #3b0a0a;
    --info: #38bdf8;
    --info-soft: #082f49;
    --shadow-sm: none;
    --shadow: 0 0 0 1px rgba(255, 255, 255, .02);
    --shadow-lg: 0 12px 32px -8px rgba(0, 0, 0, .6);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 87.5%; -webkit-text-size-adjust: 100%; } /* 14px: compact on computers and tablets */
@media (max-width: 640px) {
  html { font-size: 93.75%; } /* 15px on phones */
  input, select, textarea { font-size: 16px !important; } /* iPhones zoom into fields smaller than 16px */
}
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
[tabindex="-1"]:focus, h1:focus { box-shadow: none; outline: none; }
h1, h2, h3 { letter-spacing: -0.015em; color: var(--text); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0; font-weight: 700; }
h2 { font-size: 1.1rem; line-height: 1.35; margin: 0; font-weight: 650; }
h3 { font-size: 1rem; margin: 0; font-weight: 600; }
p { margin: 0 0 12px; }
ol, ul { margin: 0; }
.muted { color: var(--text-3); }
.small { font-size: .875rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 20px; height: 20px; flex: none; }
.icon--sm { width: 16px; height: 16px; }
.icon--xs { width: 12px; height: 12px; vertical-align: -1px; margin-right: 2px; }
.icon--lg { width: 24px; height: 24px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 12px; z-index: 100; background: var(--surface); padding: 10px 14px; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.js-only { display: none !important; }
.js .js-only { display: inline-flex !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-size: .95rem; font-weight: 600; line-height: 1; white-space: nowrap;
  background: var(--primary); color: var(--primary-text); cursor: pointer; text-decoration: none;
  box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--primary-hover); text-decoration: none; }
.btn--lg { min-height: 52px; padding: 0 24px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn--secondary:hover { background: var(--surface-2); }
.btn--ghost { background: transparent; color: var(--text-2); box-shadow: none; }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn--danger { background: var(--surface); color: var(--danger); border-color: var(--border-strong); }
.btn--danger:hover { background: var(--danger-soft); }
.btn--sm { min-height: 36px; padding: 0 12px; font-size: .875rem; border-radius: 8px; }
.btn--icon { width: 40px; padding: 0; }
.btn--link { background: none; box-shadow: none; color: var(--primary); padding: 0; min-height: auto; font-weight: 600; }
.btn--link:hover { background: none; text-decoration: underline; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.stats > .card, .dash-grid > .card, .features > .card, .howto > .card { margin-top: 0; }
.card__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.card__header p { margin: 4px 0 0; color: var(--text-3); font-size: .9rem; }
.card__body { padding: 20px; }
.card__footer { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.card--pad { padding: 20px; }

/* ---------- Badges / pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill--success { background: var(--success-soft); color: var(--success); }
.pill--warning { background: var(--warning-soft); color: var(--warning); }
.pill--info { background: var(--info-soft); color: var(--info); }
.pill--danger { background: var(--danger-soft); color: var(--danger); }
.pill--plain::before { display: none; }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 500; border: 1px solid transparent; }
.alert p:last-child, .alert ul { margin-bottom: 0; }
.alert ul { padding-left: 18px; }
.alert--success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 20%, transparent); }
.alert--error { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 20%, transparent); }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field > label, .field-label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; color: var(--text); }
.field__hint { color: var(--text-3); font-size: .86rem; margin: -2px 0 8px; }
.field__error { display: flex; gap: 6px; color: var(--danger); font-size: .88rem; margin: 6px 0 0; font-weight: 500; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number],
input[type=date], input[type=time], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px;
  box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover, textarea:hover { border-color: var(--text-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus); }
textarea { min-height: 96px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field--error input, .field--error select, .field--error textarea { border-color: var(--danger); }
.input-group { display: flex; align-items: stretch; }
.input-group__addon { display: flex; align-items: center; padding: 0 12px; background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border-strong); border-right: 0; border-radius: 10px 0 0 10px; font-size: .9rem; white-space: nowrap; }
.input-group input { border-radius: 0 10px 10px 0; min-width: 0; }
.prefix-input { display: flex; align-items: stretch; }
.prefix-input span { display: flex; align-items: center; padding: 0 12px; background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border-strong); border-right: 0; border-radius: 10px 0 0 10px; font-size: .9rem; white-space: nowrap; }
.prefix-input input { border-radius: 0 10px 10px 0; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
legend { font-weight: 600; font-size: .92rem; margin-bottom: 8px; padding: 0; }

/* Checkbox rendered as an iOS-style switch */
.check, .switch { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; font-weight: 500; }
.check input, .switch input {
  appearance: none; flex: none; width: 44px; height: 26px; margin: 0; border-radius: 999px; position: relative; cursor: pointer;
  background: var(--border-strong); transition: background .15s;
}
.check input::after, .switch input::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s;
}
.check input:checked, .switch input:checked { background: var(--primary); }
.check input:checked::after, .switch input:checked::after { transform: translateX(18px); }
.check input:focus-visible, .switch input:focus-visible { box-shadow: var(--focus); }
.field--check { margin-bottom: 12px; }
.field > label.switch, .field > label.check { display: flex; margin-bottom: 0; font-size: 1rem; }

/* Radio cards (pricing method) */
.choices { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .choices { grid-template-columns: 1fr 1fr; } }
.choice { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 14px; cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--text-3); }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary); }
.choice input { appearance: none; flex: none; width: 20px; height: 20px; margin: 2px 0 0; border: 2px solid var(--border-strong); border-radius: 50%; background: var(--surface); }
.choice input:checked { border: 6px solid var(--primary); }
.choice strong { display: block; font-size: .95rem; }
.choice small { display: block; color: var(--text-3); font-size: .85rem; margin-top: 2px; }

/* ---------- Dropdown menu (no JS needed: <details>) ---------- */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu__panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 200px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.menu--up .menu__panel { top: auto; bottom: calc(100% + 6px); left: 0; right: auto; }
.menu__item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 10px; border: 0; border-radius: 8px;
  background: none; font: inherit; font-size: .92rem; color: var(--text); text-align: left; cursor: pointer; text-decoration: none;
}
.menu__item:hover { background: var(--surface-2); text-decoration: none; }
.menu__item--danger { color: var(--danger); }
.menu__sep { height: 1px; background: var(--border); margin: 6px 0; }
.menu__label { padding: 8px 10px 4px; font-size: .8rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; }

/* =========================================================================
   Provider app shell: left sidebar on desktop, top bar + bottom tabs on phones
   ========================================================================= */
.shell { min-height: 100vh; }
.sidebar { display: none; }
.shell__main { padding: 20px 16px calc(var(--bottom-nav-h) + 32px); max-width: 1120px; margin: 0 auto; }

.mobilebar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 56px; padding: 0 12px 0 16px; background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border);
}
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(180%) blur(12px); border-top: 1px solid var(--border);
}
.bottomnav { grid-template-columns: repeat(5, 1fr); }
.bottomnav__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-3); font-size: .72rem; font-weight: 600; text-decoration: none; }
.bottomnav__item:hover { text-decoration: none; color: var(--text); }
.bottomnav__item.active { color: var(--primary); }
.bottomnav__item .icon { width: 22px; height: 22px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand__mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, var(--primary), #7c3aed); color: #fff; }
.brand__mark .icon { width: 18px; height: 18px; }
.brand__mark svg { width: 100%; height: 100%; display: block; }

.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-soft-text); font-weight: 700; font-size: .85rem; flex: none; }
.avatar-btn { display: flex; align-items: center; cursor: pointer; border-radius: 50%; }

@media (min-width: 641px) {
  .mobilebar, .bottomnav { display: none; }
  .shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); } /* minmax: a wide table scrolls in its card instead of pushing the page past the window */
  .sidebar {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 20px 14px;
    background: var(--surface); border-right: 1px solid var(--border);
  }
  .sidebar .brand { padding: 0 8px 18px; }
  .shell__main { padding: 32px 40px 64px; width: 100%; }
}

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__title { padding: 14px 10px 6px; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.nav__item {
  display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 10px; border-radius: 9px;
  color: var(--text-2); font-weight: 550; font-size: .94rem; text-decoration: none;
}
.nav__item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav__item.active { background: var(--primary-soft); color: var(--primary-soft-text); }
.nav__item.active .icon { color: var(--primary); }
.nav__item--disabled { opacity: .55; pointer-events: none; }
.nav__item .pill { margin-left: auto; height: 20px; font-size: .7rem; }

.sidebar__spacer { flex: 1; }
.sidebar__link { padding: 14px; margin: 12px 0; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.sidebar__link-title { display: flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.sidebar__link-url { font-size: .82rem; color: var(--text-3); word-break: break-all; margin-bottom: 10px; }
.sidebar__user { display: flex; align-items: center; gap: 10px; padding: 10px 6px 0; border-top: 1px solid var(--border); }
.sidebar__user-text { min-width: 0; flex: 1; }
.sidebar__user-name { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__user-email { font-size: .8rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Page header ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head__text p { margin: 6px 0 0; color: var(--text-3); }
.page-head__back { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--text-3); margin-bottom: 10px; }
.page-head__back:hover { color: var(--text); text-decoration: none; }

/* ---------- Dashboard ---------- */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin-bottom: 16px; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.stat { padding: 16px; }
.stat__top { display: flex; align-items: center; justify-content: space-between; color: var(--text-3); font-size: .85rem; font-weight: 600; }
.stat__icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); }
.stat__icon .icon { width: 17px; height: 17px; }
.stat__value { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; margin-top: 10px; line-height: 1.1; }
.stat__hint { font-size: .8rem; color: var(--text-3); margin-top: 4px; }

.dash-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .dash-grid { grid-template-columns: 1.6fr 1fr; align-items: start; } }

.linkbox { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--border-strong); font-weight: 600; overflow-wrap: anywhere; }
.linkbox .icon { color: var(--primary); }

.progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 6px 0 14px; }
.progress__bar { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #7c3aed); }
.progress__bar.p-0 { width: 4%; } .progress__bar.p-1 { width: 34%; } .progress__bar.p-2 { width: 67%; } .progress__bar.p-3 { width: 100%; }

.steps { list-style: none; padding: 0; display: grid; gap: 4px; }
.step { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; color: var(--text); text-decoration: none; }
a.step:hover { background: var(--surface-2); text-decoration: none; }
.step__icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border-strong); color: transparent; flex: none; }
.step--done .step__icon { background: var(--success); border-color: var(--success); color: #fff; }
.step--done .step__text { color: var(--text-3); text-decoration: line-through; }
.step .icon--chev { margin-left: auto; color: var(--text-3); }

/* ---------- Lists ---------- */
.items { list-style: none; padding: 0; margin: 0; }
.item { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--border); }
.item:first-child { border-top: 0; }
.item__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); flex: none; }
.item__main { min-width: 0; flex: 1; }
.item__title { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.item__meta { color: var(--text-3); font-size: .88rem; margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.item__meta span { display: inline-flex; align-items: center; gap: 4px; }
.item__side { display: flex; align-items: center; gap: 8px; flex: none; }
.item__price { font-weight: 700; white-space: nowrap; }
.item--muted .item__title, .item--muted .item__price { color: var(--text-3); }
.date-chip { display: grid; place-items: center; width: 48px; height: 52px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-soft-text); flex: none; line-height: 1.05; text-align: center; }
.date-chip__m { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.date-chip__d { font-size: 1.2rem; font-weight: 800; }

.empty { text-align: center; padding: 36px 20px; }
.empty__icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); }
.empty__icon .icon { width: 24px; height: 24px; }
.empty h3 { margin-bottom: 6px; }
.empty p { color: var(--text-3); max-width: 420px; margin: 0 auto 16px; }

/* ---------- Settings layout (title column + fields card) ---------- */
.settings { display: grid; gap: 24px; }
.settings-section { display: grid; gap: 12px; }
.settings-section__head h2 { display: flex; align-items: center; gap: 8px; }
.settings-section__head p { color: var(--text-3); font-size: .9rem; margin: 6px 0 0; }
@media (min-width: 1024px) {
  .settings { gap: 32px; }
  .settings-section { grid-template-columns: 280px 1fr; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
  .settings-section:last-of-type { border-bottom: 0; }
}

.savebar {
  position: sticky; bottom: calc(var(--bottom-nav-h) + 8px); z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 24px; padding: 12px 12px 12px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.savebar p { margin: 0; color: var(--text-3); font-size: .88rem; }
@media (min-width: 641px) { .savebar { bottom: 16px; } }

/* ---------- Ride types form show/hide (no JS) ---------- */
.service-form:has(input[value="QuotePerRequest"]:checked) .if-priced { display: none; }
.service-form:not(:has(input[value="PerUnit"]:checked)) .if-per-unit { display: none; }
.block-form:has(input[name="Block.AllDay"]:checked) .if-timed { display: none; }

/* ---------- Weekly hours ---------- */
.day { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); }
.day:first-of-type { border-top: 0; }
.day__name { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.day__name .switch { font-weight: 600; min-width: 160px; }
.day__times { display: flex; align-items: center; gap: 8px; }
.day__times input { min-height: 42px; }
.day__dash { color: var(--text-3); }
.day__off { color: var(--text-3); font-size: .9rem; display: none; }
.day:not(:has(.switch input:checked)) .day__times { display: none; }
.day:not(:has(.switch input:checked)) .day__off { display: block; }
@media (min-width: 720px) {
  .day { grid-template-columns: 220px 1fr; align-items: center; }
  .day__times { max-width: 360px; }
}

/* =========================================================================
   Auth pages: split screen on desktop
   ========================================================================= */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
.auth__aside { display: none; }
.auth__main { display: flex; flex-direction: column; padding: 20px 16px 40px; }
.auth__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.auth__panel { width: 100%; max-width: 420px; margin: 0 auto; }
.auth__panel h1 { margin-bottom: 8px; }
.auth__panel > .muted { margin-bottom: 24px; }
.auth__alt { text-align: center; color: var(--text-3); margin-top: 20px; font-size: .95rem; }
.auth__form { display: grid; gap: 0; }
.auth__form .btn { margin-top: 8px; }
.auth__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: -4px 0 8px; font-size: .92rem; }
.code-input { font-size: 1.6rem !important; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; }
@media (min-width: 1024px) {
  .auth { grid-template-columns: 1fr 1fr; }
  .auth__aside {
    display: flex; flex-direction: column; justify-content: space-between; padding: 40px 48px; color: #fff;
    background: radial-gradient(1200px 600px at 0% 0%, #6366f1 0%, transparent 60%), radial-gradient(900px 500px at 100% 100%, #7c3aed 0%, transparent 55%), #1e1b4b;
  }
  .auth__aside .brand { color: #fff; }
  .auth__aside .brand__mark { background: rgba(255,255,255,.15); }
  .auth__main { justify-content: center; padding: 40px; }
  .auth__top { position: absolute; top: 24px; right: 40px; margin: 0; }
  .auth__top .brand { display: none; }
}
.auth-quote h2 { color: #fff; font-size: 1.9rem; line-height: 1.2; font-weight: 700; margin-bottom: 18px; }
.auth-benefits { list-style: none; padding: 0; display: grid; gap: 14px; }
.auth-benefits li { display: flex; gap: 12px; align-items: flex-start; color: rgba(255,255,255,.88); }
.auth-benefits .icon { color: #a5b4fc; margin-top: 2px; }
.auth__aside-foot { color: rgba(255,255,255,.6); font-size: .85rem; }

/* =========================================================================
   Public marketing pages
   ========================================================================= */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); }
.site-header__inner { max-width: 1120px; margin: 0 auto; height: 64px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.site-main { padding-bottom: 40px; }
.site-main--narrow { max-width: 640px; margin: 40px auto; padding: 0 16px; }

.hero { display: grid; gap: 40px; padding: 48px 0 32px; align-items: center; }
@media (min-width: 960px) { .hero { grid-template-columns: 1.1fr .9fr; padding: 80px 0 56px; } }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-soft-text); font-weight: 600; font-size: .85rem; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.08; letter-spacing: -0.03em; margin-bottom: 18px; }
.hero__lead { font-size: 1.15rem; color: var(--text-2); max-width: 560px; margin-bottom: 28px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 22px; color: var(--text-3); font-size: .9rem; }
.hero__trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero__trust .icon { color: var(--success); width: 18px; height: 18px; }

.mock { position: relative; max-width: 380px; margin: 0 auto; width: 100%; }
.mock__card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 18px; }
.mock__card + .mock__card { margin-top: 14px; }
.mock__row { display: flex; align-items: center; gap: 12px; }
.mock__title { font-weight: 700; }
.mock__sub { color: var(--text-3); font-size: .85rem; }
.mock__stops { margin: 14px 0; padding-left: 14px; border-left: 2px dashed var(--border-strong); display: grid; gap: 10px; font-size: .9rem; }
.mock__stops div { display: flex; align-items: center; gap: 8px; }
.mock__price { font-size: 1.4rem; font-weight: 800; }
.mock__float { position: absolute; right: -8px; top: -14px; }

.section { padding: 48px 0; }
.section__head { text-align: center; max-width: 620px; margin: 0 auto 32px; }
.section__head p { color: var(--text-3); font-size: 1.05rem; margin-top: 10px; }
.section__head h2 { font-size: 1.7rem; }
.features { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { padding: 22px; }
.feature__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--primary-soft); color: var(--primary); margin-bottom: 14px; }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--text-3); margin: 0; font-size: .95rem; }

.howto { counter-reset: step; display: grid; gap: 16px; grid-template-columns: 1fr; list-style: none; padding: 0; }
@media (min-width: 720px) { .howto { grid-template-columns: repeat(3, 1fr); } }
.howto li { counter-increment: step; padding: 22px; }
.howto li::before { content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--text); color: var(--bg); font-weight: 800; margin-bottom: 12px; }
.howto h3 { margin-bottom: 6px; }
.howto p { color: var(--text-3); margin: 0; font-size: .95rem; }

.cta { text-align: center; padding: 40px 24px; border-radius: var(--radius-lg); color: #fff; background: radial-gradient(800px 400px at 0% 0%, #6366f1, transparent 60%), radial-gradient(700px 400px at 100% 100%, #7c3aed, transparent 55%), #1e1b4b; }
.cta h2 { color: #fff; font-size: 1.6rem; margin-bottom: 10px; }
.cta p { color: rgba(255,255,255,.8); margin-bottom: 22px; }
.cta .btn { background: #fff; color: #1e1b4b; }

.site-footer { border-top: 1px solid var(--border); padding: 24px 0; color: var(--text-3); font-size: .88rem; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

.status-page { text-align: center; padding: 48px 20px; }
.status-page .empty__icon { width: 64px; height: 64px; }

.stats-gap { height: 16px; }
.dash-link-actions { margin-top: 14px; }
.dash-link-note { display: flex; gap: 6px; align-items: center; margin: 14px 0 0; }
.item__link { color: var(--text); }
.item__link:hover { color: var(--primary); }
.services-empty-actions { justify-content: center; }
.route-form { display: grid; gap: 0 12px; grid-template-columns: 1fr; align-items: end; }
.route-form .field { margin-bottom: 12px; }
@media (min-width: 720px) { .route-form { grid-template-columns: 1.6fr 1fr auto; } .route-form .field { margin-bottom: 0; } }
.route-form__submit { padding-bottom: 1px; }
.input-group__addon--end { border-left: 0; border-right: 1px solid var(--border-strong); border-radius: 0 10px 10px 0; }
.input-group input:has(+ .input-group__addon--end), .input-group--narrow input { border-radius: 10px 0 0 10px; }
.input-group--narrow { max-width: 220px; }
.card__footer--actions { display: flex; justify-content: flex-end; }
.card-title { margin-bottom: 14px; }
.status-page.card { padding: 40px 20px; }

/* Phones: rows marked .item--stack put price/status on their own line under the title */
@media (max-width: 639px) {
  .item { padding: 14px 16px; }
  .item--stack { flex-wrap: wrap; }
  .item--stack .item__main { flex-basis: calc(100% - 64px); }
  .item--stack .item__side { width: 100%; padding-left: 62px; justify-content: space-between; }
  .card__header, .card__body, .card--pad { padding-left: 16px; padding-right: 16px; }
  .day { padding: 12px 16px; }
}

/* ---------- Theme switcher (Light / Dark / System) ---------- */
.theme-switch { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.theme-switch__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 36px; height: 32px; padding: 0 8px;
  border: 0; border-radius: 7px; background: transparent; color: var(--text-3); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; text-decoration: none;
}
.theme-switch__btn:hover { color: var(--text); text-decoration: none; }
.theme-switch__btn[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.theme-switch__btn .icon { width: 16px; height: 16px; }
.theme-switch--full { display: flex; }
.theme-switch--full .theme-switch__btn { flex: 1; }
.sidebar__theme { margin-bottom: 10px; }
.menu__theme { padding: 6px 6px 8px; }
.auth__top-actions { display: flex; align-items: center; gap: 8px; }
@media (min-width: 1024px) { .auth__top { display: flex; } }

/* =========================================================================
   Rider-facing pages: public driver profile + request form
   ========================================================================= */
.booking-main { padding: 0 0 48px; }
.booking-wrap { max-width: 720px; margin: 0 auto; padding: 24px 16px 40px; }
.booking-wrap > h1 { margin: 8px 0 6px; }
.booking-intro { margin-bottom: 20px; }

.avatar--xl { width: 88px; height: 88px; font-size: 1.8rem; }
.avatar--hero { width: 112px; height: 112px; font-size: 2.2rem; border: 4px solid var(--surface); box-shadow: var(--shadow-lg); }
.photo { display: block; object-fit: cover; border-radius: 50%; background: var(--surface-2); }
.photo--lg { width: 88px; height: 88px; }
.photo--hero { width: 112px; height: 112px; border: 4px solid var(--surface); box-shadow: var(--shadow-lg); }

/* Public profile */
.pp { max-width: 1040px; margin: 0 auto; padding: 0 16px 96px; }
.pp-hero { margin: 16px 0 20px; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.pp-hero__cover { height: 120px; background: radial-gradient(700px 240px at 0% 0%, #6366f1, transparent 60%), radial-gradient(600px 240px at 100% 100%, #7c3aed, transparent 55%), #1e1b4b; }
.pp-hero__body { display: grid; gap: 14px; padding: 0 20px 22px; }
.pp-hero__body > .photo, .pp-hero__body > .avatar { margin-top: -56px; position: relative; z-index: 1; } /* above the (positioned) cover */
.pp-hero__text h1 { font-size: 1.7rem; }
.pp-hero__role { color: var(--text-3); margin: 2px 0 10px; font-weight: 500; }
.pp-tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pp-tags li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: .85rem; font-weight: 500; }
.pp-tags__ok { background: var(--success-soft) !important; color: var(--success) !important; }
.pp-hero__cta { display: flex; flex-wrap: wrap; gap: 10px; }
.pp-hero__cta .btn--lg:first-child { flex: 1 1 220px; }
@media (min-width: 900px) {
  .pp-hero__cover { height: 150px; }
  .pp-hero__body { grid-template-columns: auto 1fr auto; align-items: end; gap: 20px; padding: 0 28px 26px; }
  .pp-hero__body > .photo, .pp-hero__body > .avatar { margin-top: -48px; }
  .pp-hero__text { padding-top: 16px; }
  .pp-hero__cta .btn--lg:first-child { flex: none; }
}
.pp-alert { margin-bottom: 20px; }
.pp-grid { display: grid; gap: 16px; }
.pp-main, .pp-side { display: grid; gap: 16px; align-content: start; }
.pp-main > .card + .card, .pp-side > .card + .card { margin-top: 0; }
@media (min-width: 900px) { .pp-grid { grid-template-columns: 1fr 320px; gap: 20px; } }
.pp-bio { white-space: pre-line; margin: 0; color: var(--text-2); }
.pp-note { display: flex; gap: 6px; align-items: center; padding: 0 20px 16px; margin: 0; }
.pp-steps { list-style: none; padding: 0; display: grid; gap: 14px; }
.pp-steps li { display: flex; gap: 12px; align-items: flex-start; }
.pp-steps p { margin: 2px 0 0; color: var(--text-3); font-size: .92rem; }
.pp-checks { list-style: none; padding: 0; display: grid; gap: 12px; }
.pp-checks li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: .94rem; }
.pp-checks .icon { color: var(--primary); margin-top: 3px; }
.facts-list { margin: 0; display: grid; gap: 12px; }
.facts-list div { display: grid; gap: 2px; }
.facts-list dt { font-size: .8rem; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.facts-list dd { margin: 0; font-weight: 600; }
.route-chips { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.route-chips li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-size: .9rem; }
.policy { white-space: pre-line; margin: 0; }
.pp-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--border); }
@media (min-width: 900px) { .pp-sticky { display: none; } .pp { padding-bottom: 48px; } }

/* Request form */
.step-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.step-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-soft-text); font-size: .85rem; font-weight: 800; flex: none; }
.booking-form > .card + .card { margin-top: 16px; }
.choices--one { grid-template-columns: 1fr !important; }
.choice__body { flex: 1; }
.choice__price { font-weight: 700; white-space: nowrap; }
.route-select { margin-top: 16px; }
.stop { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 4px; }
.stop:first-of-type { border-top: 0; padding-top: 0; }
.stop legend { float: left; width: 100%; display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 700; margin-bottom: 10px; padding: 0; }
.stop legend + * { clear: both; }
.stop__dot { width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--primary); flex: none; display: inline-block; }
.stop__dot--end { background: var(--primary); }
.stop:has(select) .stop__new { display: none; }
.stop:has(select option[value=""]:checked) .stop__new { display: block; }
.field__hint--after { display: flex; gap: 6px; align-items: center; margin: 6px 0 0; }
.booking-submit p { display: flex; gap: 8px; align-items: flex-start; }
.booking-submit .btn { margin-top: 6px; }
.alert--info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 20%, transparent); }
.alert--info p { margin: 2px 0 0; font-weight: 400; }

/* Request sent */
.sent-hero { text-align: center; padding: 16px 0 24px; }
.sent-hero__icon { background: var(--success-soft); color: var(--success); width: 64px; height: 64px; }
.sent-hero p { max-width: 460px; margin: 8px auto 0; }
.route-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.route-list li { display: flex; gap: 10px; align-items: center; }
.sent-price { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sent-actions { margin-top: 20px; justify-content: center; }

/* Profile settings: photo + dashboard QR */
.settings--photo { margin-bottom: 24px; }
.photo-card { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.photo-card__forms { display: grid; gap: 8px; flex: 1; min-width: 220px; }
.photo-form { display: grid; gap: 8px; justify-items: start; }
.photo-form input[type=file] { font: inherit; font-size: .9rem; max-width: 100%; }
.qr-block { display: flex; gap: 16px; align-items: center; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.qr-block__img { width: 132px; height: 132px; border-radius: 10px; background: #fff; padding: 6px; border: 1px solid var(--border); image-rendering: pixelated; }
.qr-block p { margin: 4px 0 10px; }

/* ---------- Day / time picker ---------- */
.dtp__picker { display: none; }
.js .dtp[data-mode="chips"] .dtp__picker { display: block; }
.js .dtp[data-mode="chips"] .dtp__native { display: none; }
.dtp__days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin: 0 -2px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.dtp__day {
  position: relative; flex: 0 0 68px; display: grid; justify-items: center; gap: 1px; padding: 10px 4px; scroll-snap-align: start;
  border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); cursor: pointer; user-select: none;
  transition: border-color .15s, background .15s;
}
.dtp__day:hover { border-color: var(--text-3); }
.dtp__day input, .dtp__time input { position: absolute; opacity: 0; pointer-events: none; }
.dtp__dow { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-3); }
.dtp__num { font-size: 1.35rem; font-weight: 800; line-height: 1.15; }
.dtp__mon { font-size: .74rem; color: var(--text-3); }
.dtp__day:has(input:checked) { background: var(--primary); border-color: var(--primary); }
.dtp__day:has(input:checked) span { color: var(--primary-text); }
.dtp__day:has(input:focus-visible), .dtp__time:has(input:focus-visible) { box-shadow: var(--focus); }
.dtp__day--off { background: var(--surface-2); }
.dtp__day--off .dtp__num { color: var(--text-3); font-weight: 600; }
.dtp__times { margin-top: 8px; min-height: 60px; }
.dtp__group + .dtp__group { margin-top: 14px; }
.dtp__group-title { font-size: .8rem; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.dtp__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.dtp__time {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 6px;
  border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); font-weight: 600; font-size: .94rem; cursor: pointer;
  font-variant-numeric: tabular-nums; transition: border-color .15s, background .15s;
}
.dtp__time:hover { border-color: var(--primary); color: var(--primary); }
.dtp__time:has(input:checked) { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.dtp__none { display: flex; gap: 8px; align-items: center; color: var(--text-3); padding: 12px 0; margin: 0; }
.dtp__footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.dtp__summary { margin: 0; font-weight: 700; color: var(--text); }
.dtp__summary:empty { display: none; }
.dtp__native .btn--link { margin-top: 4px; }
.dtp__native { margin-top: 4px; }

/* Phones: keep the public header to brand + sign in; the theme switch moves to the footer */
.site-footer .theme-switch { display: none; }
@media (max-width: 639px) {
  .site-header .theme-switch { display: none; }
  .site-footer .theme-switch { display: inline-flex; }
}

/* Photo cards on the profile page */
.photo-cards { display: grid; gap: 16px; }
@media (min-width: 720px) { .photo-cards { grid-template-columns: 1fr 1fr; } .photo-cards .photo-card { flex-direction: column; } }
.photo-cards > .card + .card { margin-top: 0; }
.photo-card h3 { margin-bottom: 4px; }
.photo-card__preview--showcase { width: 100%; }
.photo-wide { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.photo-empty { display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--border-strong); color: var(--text-3); }
.photo-card__preview--showcase .photo-empty, .photo-card__preview--showcase .photo-wide { max-width: 320px; }
@media (min-width: 720px) { .photo-card__preview--showcase .photo-empty, .photo-card__preview--showcase .photo-wide { max-width: none; } }
.showcase { margin: 0 0 16px; }
.showcase .photo-wide { border: 1px solid var(--border); }

/* ---------- Reviews ---------- */
.stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.star { width: 18px; height: 18px; color: var(--border-strong); fill: currentColor; stroke: none; }
.star--on { color: #f59e0b; }
.stars--sm .star { width: 15px; height: 15px; }
.icon--lg.star { width: 28px; height: 28px; }
.pp-rating { display: inline-flex; align-items: center; gap: 6px; margin: -4px 0 10px; color: var(--text); font-size: .92rem; text-decoration: none; }
.pp-rating:hover { text-decoration: none; }
.pp-rating:hover .muted { text-decoration: underline; }

.rating-summary { display: grid; gap: 16px 24px; align-items: center; margin-bottom: 8px; }
@media (min-width: 560px) { .rating-summary { grid-template-columns: auto 1fr; } }
.rating-summary__big { display: grid; justify-items: start; gap: 4px; }
.rating-summary__value { font-size: 2.6rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.rating-bars { list-style: none; padding: 0; display: grid; gap: 6px; }
.rating-bars li { display: grid; grid-template-columns: 36px 1fr 28px; align-items: center; gap: 10px; }
.rating-bars__label { display: inline-flex; align-items: center; gap: 3px; font-size: .85rem; font-weight: 600; }
.rating-bars__label .star { width: 13px; height: 13px; }
.rating-bars__track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.rating-bars__fill { display: block; height: 100%; border-radius: inherit; background: #f59e0b; }
.rating-bars__count { text-align: right; }
.w-0 { width: 0%; } .w-10 { width: 10%; } .w-20 { width: 20%; } .w-30 { width: 30%; } .w-40 { width: 40%; } .w-50 { width: 50%; } .w-60 { width: 60%; } .w-70 { width: 70%; } .w-80 { width: 80%; } .w-90 { width: 90%; } .w-100 { width: 100%; } 

.reviews { list-style: none; padding: 0; margin: 8px 0 0; }
.review { padding: 18px 0; border-top: 1px solid var(--border); }
.review:first-child { border-top: 0; }
.rating-summary + .reviews .review:first-child { border-top: 1px solid var(--border); margin-top: 8px; }
.review__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.review__who { display: grid; flex: 1; min-width: 0; }
.review__text { margin: 10px 0 0; white-space: pre-line; color: var(--text-2); }
.review__reply { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--primary); }
.review__reply-who { display: flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; color: var(--text-2); margin-bottom: 4px; }
.review__reply p { margin: 0; white-space: pre-line; }
.review__tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.avatar--sm { width: 32px; height: 32px; font-size: .8rem; }
.review-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 16px 20px 0; padding: 14px 16px; border-radius: var(--radius); background: var(--warning-soft); }
.review-cta > div { flex: 1; min-width: 180px; }
.review-cta p { margin: 2px 0 0; }
.reply-form { margin-top: 12px; padding: 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.reply-form__actions { margin-top: 10px; }
.reviews-grid { grid-template-columns: 1fr; }
@media (min-width: 1024px) { .reviews-grid { grid-template-columns: 1.6fr 1fr; } }
.reviews-note { display: flex; gap: 6px; align-items: flex-start; margin: 14px 0 0; }
.review-privacy { display: flex; gap: 6px; align-items: center; }

/* Star picker: radios in reverse order; light the chosen star and every star before it */
.star-input { margin: 0 0 18px; }
.star-input__stars { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-input__stars input { position: absolute; opacity: 0; pointer-events: none; }
.star-input__stars label { cursor: pointer; padding: 2px; border-radius: 8px; color: var(--border-strong); }
.star-input__stars label .icon { width: 40px; height: 40px; fill: currentColor; stroke: none; }
.star-input__stars label:hover, .star-input__stars label:hover ~ label,
.star-input__stars input:checked ~ label { color: #f59e0b; }
.star-input__stars input:focus-visible + label { box-shadow: var(--focus); }
.star-input__hint { margin: 4px 0 0; }
.photo-card__forms { align-content: start; }
.photo-card__forms h3 + p { margin-bottom: 4px; }

.dtp__check { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: .94rem; }
.dtp__check--ok { background: var(--success-soft); color: var(--success); }
.dtp__check--ok::before { content: "✓"; font-weight: 800; }
.dtp__check--bad { background: var(--danger-soft); color: var(--danger); }
.dtp__check--bad::before { content: "✕"; font-weight: 800; }
.booking-next { display: flex; gap: 6px; align-items: center; justify-content: center; margin: 10px 0 0; }
.finish-signin { margin-top: 16px; }
.finish-signin > summary { cursor: pointer; list-style: none; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.finish-signin > summary::-webkit-details-marker { display: none; }
.finish-signin > summary::after { content: "›"; margin-left: auto; color: var(--text-3); font-size: 1.3rem; line-height: 1; transition: transform .15s; }
.finish-signin[open] > summary::after { transform: rotate(90deg); }
.finish-signin__form { margin-top: 16px; }

/* Clickable list rows (the link stretches over the whole row) */
.item--link { position: relative; }
.item--link:hover { background: var(--surface-2); }
.stretched::after { content: ""; position: absolute; inset: 0; }
.item__chev { color: var(--text-3); }
.dash-main { display: grid; gap: 16px; align-content: start; }
.dash-main > .card + .card { margin-top: 0; }
.empty--compact { padding: 24px 20px; }

/* Request workflow */
.price-now { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); margin: 4px 0 16px; }
.price-now strong { font-size: 1.4rem; }
.action-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.action-row--secondary { margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--border); }
.action-row--secondary form { display: grid; gap: 8px; justify-items: start; }
.price-form { margin-bottom: 8px; }
.price-form__row { display: flex; gap: 10px; flex-wrap: wrap; }
.price-form__row .input-group { flex: 1 1 160px; max-width: 220px; }
.waiting { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--info-soft); color: var(--info); font-weight: 600; }
.facts-list--grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; margin-bottom: 16px; }
.route-list--detail li { align-items: flex-start; }
.route-list--detail .stop__dot { margin-top: 22px; }
.stop-note { display: flex; gap: 6px; align-items: center; margin-top: 4px; padding: 6px 10px; border-radius: 8px; background: var(--warning-soft); color: var(--warning); font-size: .9rem; font-weight: 600; }
.notes-locked { display: flex; gap: 6px; align-items: center; margin: 12px 0 0; }
.bp__body > .notes-locked { margin: -4px 0 0; }
.rider-note { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.rider-note p { margin: 0; white-space: pre-line; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; border-left: 2px solid var(--border); padding-left: 14px; }
.timeline li { display: grid; gap: 2px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -21px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.offer { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--shadow); }
.offer__price { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.offer__price strong { font-size: 1.8rem; }
.counter { margin-top: 14px; }
.counter > summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.counter .price-form { margin-top: 10px; }
.cancel-form { display: grid; gap: 8px; justify-items: center; text-align: center; }
.sent-hero__icon--info { background: var(--info-soft); color: var(--info); }
.sent-hero__icon--bad { background: var(--danger-soft); color: var(--danger); }
.sent-hero__icon--muted { background: var(--surface-2); color: var(--text-3); }
.sent-actions { flex-direction: column; align-items: center; }

/* Live update toasts */
.toasts { position: fixed; z-index: 50; left: 50%; transform: translateX(-50%); bottom: calc(var(--bottom-nav-h) + 16px); display: grid; gap: 8px; width: min(92vw, 420px); }
@media (min-width: 1024px) { .toasts { bottom: 24px; left: auto; right: 24px; transform: none; } }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--text); color: var(--bg); font-weight: 600; box-shadow: var(--shadow-lg); transition: opacity .5s, transform .5s; }
.toast--hide { opacity: 0; transform: translateY(8px); }

/* ---------- Calendar ---------- */
.cal-head { align-items: center; }
.segmented { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.segmented__item { padding: 6px 14px; border-radius: 7px; font-weight: 600; font-size: .9rem; color: var(--text-2); text-decoration: none; }
.segmented__item:hover { color: var(--text); text-decoration: none; }
.segmented__item[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.cal-nav { gap: 6px; }
.cal-legend { list-style: none; padding: 0; margin: -8px 0 14px; display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--text-3); font-size: .85rem; }
.cal-legend li { display: inline-flex; align-items: center; gap: 6px; }
.cal-swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.cal-swatch--confirmed { background: var(--primary); }
.cal-swatch--pending { background: var(--warning-soft); border: 2px dashed var(--warning); }
.cal-swatch--blocked { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 3px, var(--border-strong) 3px, var(--border-strong) 5px); }
.cal-empty { display: flex; gap: 6px; align-items: center; margin-top: 12px; }

.cal-scroll { overflow-x: auto; }
.cal-grid { --slot-h: 34px; display: grid; min-width: 760px; }
.cal-grid--week { grid-template-columns: 64px repeat(7, 1fr); }
.cal-grid--day { grid-template-columns: 64px 1fr; min-width: 0; }
.cal-corner { border-bottom: 1px solid var(--border); }
.cal-dayhead { display: grid; justify-items: center; padding: 10px 4px; border-bottom: 1px solid var(--border); border-left: 1px solid var(--border); color: var(--text-2); text-decoration: none; }
.cal-dayhead:hover { background: var(--surface-2); text-decoration: none; }
.cal-dayhead__dow { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
.cal-dayhead__num { font-size: 1.2rem; font-weight: 800; }
.cal-dayhead.is-today .cal-dayhead__num { background: var(--primary); color: var(--primary-text); border-radius: 999px; padding: 0 9px; }
.cal-times { display: grid; }
.cal-time { font-size: .72rem; color: var(--text-3); text-align: right; padding: 0 8px; transform: translateY(-7px); }
.cal-col { display: grid; position: relative; border-left: 1px solid var(--border); }
.cal-col.is-today { background: color-mix(in srgb, var(--primary) 4%, transparent); }
.cal-slot { grid-column: 1; border-top: 1px dotted var(--border); }
.cal-slot--hour { border-top-style: solid; }
.cal-slot--off { background: color-mix(in srgb, var(--surface-2) 75%, transparent); }
.cal-block, .cal-item { grid-column: 1; z-index: 1; margin: 1px 3px; border-radius: 7px; overflow: hidden; font-size: .78rem; line-height: 1.25; }
.cal-block { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 6px, var(--border) 6px, var(--border) 9px); color: var(--text-3); padding: 4px 6px; font-weight: 600; }
.cal-item { display: grid; align-content: start; gap: 1px; padding: 4px 6px; text-decoration: none; z-index: 2; }
.cal-item:hover { text-decoration: none; filter: brightness(.96); }
.cal-item strong { font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-item--confirmed { background: var(--primary); color: var(--primary-text); }
.cal-item--pending { background: var(--warning-soft); color: var(--warning); border: 1.5px dashed var(--warning); }
.cal-item__tag { font-weight: 700; font-size: .7rem; }
.lanes-2 { width: calc(50% - 4px); } .lanes-3 { width: calc(33.3% - 4px); }
.lanes-2.lane-1 { margin-left: 50%; } .lanes-3.lane-1 { margin-left: 33.3%; } .lanes-3.lane-2 { margin-left: 66.6%; }
.rs-1{grid-row-start:1}.rs-2{grid-row-start:2}.rs-3{grid-row-start:3}.rs-4{grid-row-start:4}.rs-5{grid-row-start:5}.rs-6{grid-row-start:6}.rs-7{grid-row-start:7}.rs-8{grid-row-start:8}.rs-9{grid-row-start:9}.rs-10{grid-row-start:10}.rs-11{grid-row-start:11}.rs-12{grid-row-start:12}.rs-13{grid-row-start:13}.rs-14{grid-row-start:14}.rs-15{grid-row-start:15}.rs-16{grid-row-start:16}.rs-17{grid-row-start:17}.rs-18{grid-row-start:18}.rs-19{grid-row-start:19}.rs-20{grid-row-start:20}.rs-21{grid-row-start:21}.rs-22{grid-row-start:22}.rs-23{grid-row-start:23}.rs-24{grid-row-start:24}.rs-25{grid-row-start:25}.rs-26{grid-row-start:26}.rs-27{grid-row-start:27}.rs-28{grid-row-start:28}.rs-29{grid-row-start:29}.rs-30{grid-row-start:30}.rs-31{grid-row-start:31}.rs-32{grid-row-start:32}.rs-33{grid-row-start:33}.rs-34{grid-row-start:34}.rs-35{grid-row-start:35}.rs-36{grid-row-start:36}.rs-37{grid-row-start:37}.rs-38{grid-row-start:38}.rs-39{grid-row-start:39}.rs-40{grid-row-start:40}.rs-41{grid-row-start:41}.rs-42{grid-row-start:42}.rs-43{grid-row-start:43}.rs-44{grid-row-start:44}.rs-45{grid-row-start:45}.rs-46{grid-row-start:46}.rs-47{grid-row-start:47}.rs-48{grid-row-start:48}.rs-49{grid-row-start:49}
.sp-1{grid-row-end:span 1}.sp-2{grid-row-end:span 2}.sp-3{grid-row-end:span 3}.sp-4{grid-row-end:span 4}.sp-5{grid-row-end:span 5}.sp-6{grid-row-end:span 6}.sp-7{grid-row-end:span 7}.sp-8{grid-row-end:span 8}.sp-9{grid-row-end:span 9}.sp-10{grid-row-end:span 10}.sp-11{grid-row-end:span 11}.sp-12{grid-row-end:span 12}.sp-13{grid-row-end:span 13}.sp-14{grid-row-end:span 14}.sp-15{grid-row-end:span 15}.sp-16{grid-row-end:span 16}.sp-17{grid-row-end:span 17}.sp-18{grid-row-end:span 18}.sp-19{grid-row-end:span 19}.sp-20{grid-row-end:span 20}.sp-21{grid-row-end:span 21}.sp-22{grid-row-end:span 22}.sp-23{grid-row-end:span 23}.sp-24{grid-row-end:span 24}.sp-25{grid-row-end:span 25}.sp-26{grid-row-end:span 26}.sp-27{grid-row-end:span 27}.sp-28{grid-row-end:span 28}.sp-29{grid-row-end:span 29}.sp-30{grid-row-end:span 30}.sp-31{grid-row-end:span 31}.sp-32{grid-row-end:span 32}.sp-33{grid-row-end:span 33}.sp-34{grid-row-end:span 34}.sp-35{grid-row-end:span 35}.sp-36{grid-row-end:span 36}.sp-37{grid-row-end:span 37}.sp-38{grid-row-end:span 38}.sp-39{grid-row-end:span 39}.sp-40{grid-row-end:span 40}.sp-41{grid-row-end:span 41}.sp-42{grid-row-end:span 42}.sp-43{grid-row-end:span 43}.sp-44{grid-row-end:span 44}.sp-45{grid-row-end:span 45}.sp-46{grid-row-end:span 46}.sp-47{grid-row-end:span 47}.sp-48{grid-row-end:span 48}
.cal-rows-1{grid-template-rows:repeat(1,var(--slot-h))}.cal-rows-2{grid-template-rows:repeat(2,var(--slot-h))}.cal-rows-3{grid-template-rows:repeat(3,var(--slot-h))}.cal-rows-4{grid-template-rows:repeat(4,var(--slot-h))}.cal-rows-5{grid-template-rows:repeat(5,var(--slot-h))}.cal-rows-6{grid-template-rows:repeat(6,var(--slot-h))}.cal-rows-7{grid-template-rows:repeat(7,var(--slot-h))}.cal-rows-8{grid-template-rows:repeat(8,var(--slot-h))}.cal-rows-9{grid-template-rows:repeat(9,var(--slot-h))}.cal-rows-10{grid-template-rows:repeat(10,var(--slot-h))}.cal-rows-11{grid-template-rows:repeat(11,var(--slot-h))}.cal-rows-12{grid-template-rows:repeat(12,var(--slot-h))}.cal-rows-13{grid-template-rows:repeat(13,var(--slot-h))}.cal-rows-14{grid-template-rows:repeat(14,var(--slot-h))}.cal-rows-15{grid-template-rows:repeat(15,var(--slot-h))}.cal-rows-16{grid-template-rows:repeat(16,var(--slot-h))}.cal-rows-17{grid-template-rows:repeat(17,var(--slot-h))}.cal-rows-18{grid-template-rows:repeat(18,var(--slot-h))}.cal-rows-19{grid-template-rows:repeat(19,var(--slot-h))}.cal-rows-20{grid-template-rows:repeat(20,var(--slot-h))}.cal-rows-21{grid-template-rows:repeat(21,var(--slot-h))}.cal-rows-22{grid-template-rows:repeat(22,var(--slot-h))}.cal-rows-23{grid-template-rows:repeat(23,var(--slot-h))}.cal-rows-24{grid-template-rows:repeat(24,var(--slot-h))}.cal-rows-25{grid-template-rows:repeat(25,var(--slot-h))}.cal-rows-26{grid-template-rows:repeat(26,var(--slot-h))}.cal-rows-27{grid-template-rows:repeat(27,var(--slot-h))}.cal-rows-28{grid-template-rows:repeat(28,var(--slot-h))}.cal-rows-29{grid-template-rows:repeat(29,var(--slot-h))}.cal-rows-30{grid-template-rows:repeat(30,var(--slot-h))}.cal-rows-31{grid-template-rows:repeat(31,var(--slot-h))}.cal-rows-32{grid-template-rows:repeat(32,var(--slot-h))}.cal-rows-33{grid-template-rows:repeat(33,var(--slot-h))}.cal-rows-34{grid-template-rows:repeat(34,var(--slot-h))}.cal-rows-35{grid-template-rows:repeat(35,var(--slot-h))}.cal-rows-36{grid-template-rows:repeat(36,var(--slot-h))}.cal-rows-37{grid-template-rows:repeat(37,var(--slot-h))}.cal-rows-38{grid-template-rows:repeat(38,var(--slot-h))}.cal-rows-39{grid-template-rows:repeat(39,var(--slot-h))}.cal-rows-40{grid-template-rows:repeat(40,var(--slot-h))}.cal-rows-41{grid-template-rows:repeat(41,var(--slot-h))}.cal-rows-42{grid-template-rows:repeat(42,var(--slot-h))}.cal-rows-43{grid-template-rows:repeat(43,var(--slot-h))}.cal-rows-44{grid-template-rows:repeat(44,var(--slot-h))}.cal-rows-45{grid-template-rows:repeat(45,var(--slot-h))}.cal-rows-46{grid-template-rows:repeat(46,var(--slot-h))}.cal-rows-47{grid-template-rows:repeat(47,var(--slot-h))}.cal-rows-48{grid-template-rows:repeat(48,var(--slot-h))}

.cal-month { overflow: hidden; }
.cal-month__head, .cal-month__grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-month__head div { padding: 8px; font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--text-3); text-align: center; border-bottom: 1px solid var(--border); }
.cal-month__cell { min-height: 108px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: grid; align-content: start; gap: 3px; min-width: 0; }
.cal-month__cell:nth-child(7n) { border-right: 0; }
.cal-month__cell.is-other { background: var(--surface-2); }
.cal-month__cell.is-other .cal-month__num { color: var(--text-3); }
.cal-month__cell.is-off:not(.is-other) { background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.cal-month__num { font-weight: 700; color: var(--text); text-decoration: none; justify-self: start; padding: 0 6px; border-radius: 999px; }
.cal-month__cell.is-today .cal-month__num { background: var(--primary); color: var(--primary-text); }
.cal-chip { display: block; padding: 2px 6px; border-radius: 6px; font-size: .74rem; font-weight: 600; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-chip:hover { text-decoration: none; }
.cal-chip span { font-weight: 800; }
.cal-chip--confirmed { background: var(--primary-soft); color: var(--primary-soft-text); }
.cal-chip--pending { background: var(--warning-soft); color: var(--warning); }
.cal-chip--blocked { background: var(--surface-2); color: var(--text-3); }
.cal-more { font-size: .74rem; font-weight: 600; padding: 0 6px; }
@media (max-width: 639px) { .cal-month__cell { min-height: 72px; padding: 3px; } .cal-chip { font-size: .66rem; padding: 1px 4px; } .cal-chip span { display: none; } }

.cal-item--short { align-content: center; padding: 0 6px; }
.cal-item--short span { font-size: .76rem; }
.cal-item--short b { font-weight: 800; }

/* ---------- Booking panel (full page + pop-up) ---------- */
.bp { display: flex; flex-direction: column; min-height: 0; }
.bp__head { display: flex; gap: 14px; align-items: flex-start; padding: 20px 20px 16px; border-bottom: 1px solid var(--border); }
.avatar--lg { width: 52px; height: 52px; font-size: 1.05rem; }
.bp__who { min-width: 0; flex: 1; display: grid; gap: 8px; }
.bp__name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding-right: 36px; }
.bp__name h2 { font-size: 1.25rem; }
.bp__contact { display: flex; flex-wrap: wrap; gap: 6px; }
.bp__contact-text { overflow-wrap: anywhere; display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: -4px; }
.bp__body { padding: 16px 20px; display: grid; gap: 14px; overflow: auto; }
.bp__body > .alert { margin: 0; }
.bp__alert p { display: inline; }
.bp__summary { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.bp__cell { background: var(--surface-2); padding: 9px 12px; min-width: 0; display: grid; gap: 1px; align-content: start; }
.bp__cell--wide, .bp__cell:last-child:nth-child(odd) { grid-column: 1 / -1; }
.bp__cell dt { display: flex; align-items: center; gap: 5px; color: var(--text-3); font-size: .78rem; font-weight: 600; line-height: 1.3; }
.bp__cell dt .icon { width: 14px; height: 14px; flex: none; }
.bp__cell dd { margin: 0; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.bp__price { font-size: 1.1rem; font-weight: 800 !important; color: var(--text); }
/* The trip: stops on the left, "Navigate" on the right (under the stops on phones). */
.bp__trip { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.bp__route { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; flex: 1 1 260px; min-width: 0; }
.bp__route li { display: flex; gap: 12px; align-items: flex-start; position: relative; }
.bp__route li > div { min-width: 0; }
.bp__route li .muted.small { font-size: .78rem; font-weight: 600; color: var(--text-3); }
.bp__route .stop__dot { margin-top: 20px; }
/* A line joining the stops, so it reads as one trip. */
.bp__route li:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 35px; bottom: -11px; width: 2px; background: var(--border-strong); }
.bp__navigate { flex: none; }
@media (max-width: 639px) { .bp__navigate { flex: 1 1 100%; } }
.bp__addr { font-weight: 600; }
.bp__note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); white-space: pre-line; }
.bp__note .icon { margin-top: 3px; color: var(--text-3); flex: none; }
.bp__history { padding: 10px 12px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.bp__card-title { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: .78rem; font-weight: 600; color: var(--text-3); }
.bp__timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bp__timeline li { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; padding-left: 22px; }
/* Dots on a line, like the route's stops. */
.bp__timeline li::before { content: ""; position: absolute; left: 1px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.bp__timeline li:not(:last-child)::after { content: ""; position: absolute; left: 5px; top: 18px; bottom: -10px; width: 2px; background: var(--border-strong); }
.bp__timeline-what { font-weight: 600; }
.bp__timeline-when { color: var(--text-3); font-size: .85rem; white-space: nowrap; }
.bp__actions { padding: 14px 20px 18px; border-top: 1px solid var(--border); background: var(--surface); display: grid; gap: 10px; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.bp__body > .waiting { margin: 0; }
.waiting--success { background: var(--success-soft); color: var(--success); }
.bp__primary { flex: 1 1 auto; }
@media (min-width: 640px) { .bp__primary { flex: 0 1 auto; } }
/* Everything else: one row of equal-looking buttons; risky ones open an "are you sure?" box first. */
.bp__secondary { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bp__drop > summary { list-style: none; cursor: pointer; }
.bp__drop > summary::-webkit-details-marker { display: none; }
.bp__drop[open] { flex-basis: 100%; }
.bp__drop[open] > summary { box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 25%, transparent); }
.bp__drop-body { display: grid; gap: 10px; justify-items: start; margin-top: 8px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.bp__drop-body p { margin: 0; }
.bp__drop-body .btn--danger { background: var(--danger); border-color: var(--danger); color: var(--primary-text); }
.bp__drop-body .btn--danger:hover { filter: brightness(.95); background: var(--danger); }
.bp__action-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bp__action-row--minor { gap: 4px 8px; }
.bp__confirm { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bp__price-form { display: flex; gap: 8px; flex: 1 1 260px; }
.bp__price-form .input-group { flex: 1; min-width: 120px; }
.bp__cancel { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bp__danger { color: var(--danger); }
.check--sm { min-height: 36px; font-size: .88rem; }
.check--sm input { width: 36px; height: 22px; }
.check--sm input::after { width: 16px; height: 16px; }
.check--sm input:checked::after { transform: translateX(14px); }
.bp-page { overflow: hidden; }
.bp-page__back { margin-bottom: 12px; }

/* The pop-up: centered card on desktop, bottom sheet on phones */
.modal { border: 0; padding: 0; width: min(680px, 96vw); max-height: 92vh; border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); overflow: hidden; }
.modal[open] { display: flex; flex-direction: column; }
.modal::backdrop { background: rgba(9, 9, 11, .5); backdrop-filter: blur(2px); }
.modal__content { display: flex; flex-direction: column; min-height: 0; overflow: auto; }
.modal__content > .bp { flex: 1; min-height: 0; }
.modal .bp__body { flex: 1; }
.modal__close { position: absolute; top: 14px; right: 14px; z-index: 2; }
.modal__loading { display: grid; place-items: center; min-height: 240px; }
.modal__loading span { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 639px) {
  .modal { width: 100vw; max-width: 100vw; margin: auto 0 0; max-height: 94vh; border-radius: 18px 18px 0 0; }
  .bp__head { padding: 18px 16px 14px; }
  .bp__body, .bp__actions { padding-left: 16px; padding-right: 16px; }
}

/* ---- Repeat bookings (step 11) ---- */
.repeat-pick { margin: 16px 0 0; }

/* Optional settings folded away: a quiet row you tap to open. */
.fold { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.fold__summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; cursor: pointer; list-style: none; font-weight: 600; color: var(--text-2); }
.fold__summary::-webkit-details-marker { display: none; }
.fold__summary:hover { color: var(--text); }
.fold__summary > span { flex: 1; }
.fold__chev { transition: transform .15s ease; color: var(--text-3); }
.fold[open] > .fold__summary .fold__chev { transform: rotate(90deg); }
.fold[open] > .fold__summary { color: var(--text); }
.fold__body { padding: 0 14px 14px; display: grid; gap: 8px; }
.fold__body .seg { margin: 0; }
.fold__body .field__hint { margin: 0; }
.fold--small { border-style: dashed; background: transparent; margin-top: 4px; }
.fold--small > .fold__summary { min-height: 40px; font-size: .9rem; padding: 0 12px; }
.fold--small > .fold__body { padding: 0 12px 12px; }
@media (prefers-reduced-motion: reduce) { .fold__chev { transition: none; } }

/* Where: pickup and drop-off side by side (stacked on phones), joined by an arrow. */
.trip { display: grid; gap: 12px; }
@media (min-width: 640px) { .trip--pair { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; } }
.trip__arrow { display: grid; place-items: center; width: 32px; height: 32px; margin: 0 auto; border-radius: 50%; background: var(--primary-soft); color: var(--primary-soft-text); }
@media (min-width: 640px) { .trip--pair .trip__arrow { margin-top: 56px; } }
@media (max-width: 639px) { .trip__arrow { transform: rotate(90deg); margin: -4px auto; } }
.trip-stop { border: 1px solid var(--border); border-radius: var(--radius); padding: 0; margin: 0; min-width: 0; background: var(--surface); overflow: hidden; }
.trip-stop__head { float: left; width: 100%; display: flex; align-items: center; gap: 8px; padding: 10px 14px; margin: 0; font-weight: 700; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.trip-stop__head + * { clear: both; }
.trip-stop__body { padding: 12px 14px 14px; display: grid; gap: 10px; }
.trip-stop__body .field { margin: 0; }
.trip-stop__body .stop__new { display: grid; gap: 10px; }
.trip-stop:focus-within { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
/* A saved place hides the new-address fields; "Enter a new address" shows them. */
.trip-stop:has(select) .stop__new { display: none; }
.trip-stop:has(select option[value=""]:checked) .stop__new { display: grid; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg__opt { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface); cursor: pointer; font-weight: 600; }
.seg__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg__opt:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-soft-text); }
.seg__opt:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.bp__repeat dd strong { color: var(--primary-soft-text); }
.bp__move-fields { display: flex; flex-wrap: wrap; gap: 8px; }
.bp__move-fields label { display: grid; gap: 2px; }
.bp__move-fields input { min-height: 40px; }
.repeat-tag { display: inline-flex; align-items: center; gap: 4px; color: var(--primary-soft-text); }
.repeat-card { display: flex; align-items: center; gap: 12px; }
.repeat-card .item__icon { flex: none; }

/* ---- Business types (home page + sign-up) ---- */
.industry-icon { display: inline-grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 11px; background: var(--primary-soft); color: var(--primary); }
.industry-icon--LawnCare { background: var(--success-soft); color: var(--success); }
.industry-icon--CarWash { background: var(--info-soft, var(--primary-soft)); color: var(--info, var(--primary)); }
.industries { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .industries { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .industries { grid-template-columns: repeat(4, 1fr); } }
.industry { display: flex; flex-direction: column; gap: 8px; padding: 22px; color: inherit; transition: border-color .15s, transform .15s; }
a.industry:hover { border-color: var(--primary); text-decoration: none; transform: translateY(-2px); }
.industry h3 { margin: 6px 0 0; }
.industry p { margin: 0; color: var(--text-2); }
.industry .industry__examples { color: var(--text-3); font-size: .9rem; }
.industry__go { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--primary); }
.industry--soon { border-style: dashed; box-shadow: none; }
.industry__soon { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; color: var(--text-2); }
.industry__soon li { display: flex; align-items: center; gap: 8px; }
.home-clients { display: flex; gap: 16px; align-items: flex-start; }
.home-clients .feature__icon { flex: none; margin: 0; }
.home-clients h2 { font-size: 1.15rem; margin: 0 0 4px; }
.home-clients p { margin: 0; }

.biz-pick { border: 0; padding: 0; margin: 0 0 8px; min-width: 0; }
.biz-pick legend { padding: 0; margin-bottom: 8px; }
.biz-pick__list { display: grid; gap: 8px; }
.biz-opt { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 64px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.biz-opt:hover { border-color: var(--text-3); }
.biz-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.biz-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary); }
.biz-opt:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.biz-opt__text { display: grid; gap: 2px; min-width: 0; }
.biz-opt__check { margin-left: auto; color: var(--primary); visibility: hidden; flex: none; }
.biz-opt:has(input:checked) .biz-opt__check { visibility: visible; }
.industries > .card { margin-top: 0; }
.mock__card { position: relative; }
@media (min-width: 1024px) { .auth__main { padding-top: 88px; } }

/* ---- Website: menu, footer, pages ---- */
.site-nav { display: none; align-items: center; gap: 4px; margin-right: auto; margin-left: 24px; }
.site-nav__link, .site-nav__group > summary { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 12px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 600; font-size: .95rem; cursor: pointer; list-style: none; }
.site-nav__group > summary::-webkit-details-marker { display: none; }
.site-nav__link:hover, .site-nav__group > summary:hover, .site-nav__group[open] > summary { background: var(--surface-2, var(--primary-soft)); color: var(--text); text-decoration: none; }
.site-nav__group { position: relative; }
.site-nav__menu { position: absolute; top: calc(100% + 6px); left: 0; width: 340px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); display: grid; gap: 2px; z-index: 30; }
.site-nav__item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius-sm); color: var(--text); }
.site-nav__item:hover { background: var(--primary-soft); text-decoration: none; }
.site-nav__item > span:last-child { display: grid; gap: 2px; }
.industry-icon--sm { width: 32px; height: 32px; border-radius: 9px; }
.hero__eyebrow .industry-icon--sm { width: 22px; height: 22px; border-radius: 6px; background: transparent; }
.site-menu { position: relative; }
.site-menu > summary { list-style: none; }
.site-menu > summary::-webkit-details-marker { display: none; }
.site-menu__panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(300px, calc(100vw - 32px)); padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); display: grid; gap: 2px; z-index: 30; }
.site-menu__panel hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
.site-menu__title { padding: 6px 10px; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
@media (max-width: 559px) { .site-header__signin, .site-header__actions .theme-switch { display: none; } }
@media (min-width: 900px) { .site-nav { display: flex; } .site-menu { display: none; } }

.site-footer--full { padding: 40px 0 24px; }
.site-footer--full .footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr 1fr; justify-content: initial; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand p { margin: 10px 0 0; max-width: 320px; }
.footer-grid h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); margin: 0 0 10px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--text-3); }
.footer-grid a:hover { color: var(--text); }
@media (min-width: 720px) { .site-footer--full .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } .footer-brand { grid-column: auto; } }
.footer-legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

.page-hero { text-align: center; max-width: 760px; margin: 0 auto; padding: 56px 0 24px; }
.page-hero .hero__lead { margin-left: auto; margin-right: auto; }
.section--tight { padding-top: 24px; padding-bottom: 8px; }
.section__head--left { text-align: left; margin-left: 0; }
.hero--industry { align-items: center; }
.sample-menu { max-width: 440px; width: 100%; margin: 0 auto; box-shadow: var(--shadow-lg); }
.sample-menu__note { padding: 0 20px 16px; margin: 0; }
.industry-detail { gap: 16px; }
.industry-detail > .card + .card { margin-top: 0; }
.other-industries { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: center; padding: 8px 0 24px; }
.chip-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-weight: 600; }
.chip-link:hover { border-color: var(--primary); text-decoration: none; }
.cta__actions { justify-content: center; }
.faq { display: grid; gap: 10px; max-width: 760px; margin: 0 auto; }
.faq > .card + .card { margin-top: 0; }
.faq__item { padding: 0; }
.faq__item summary { cursor: pointer; padding: 18px 20px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq__item summary::after { content: "+"; color: var(--text-3); font-weight: 400; font-size: 1.3rem; line-height: 1; }
.faq__item[open] summary::after { content: "−"; }
.faq__item p { margin: 0; padding: 0 20px 18px; color: var(--text-2); }
.contact-grid { display: grid; gap: 16px; padding-bottom: 40px; }
.contact-grid > .card + .card, .contact-side > .card + .card { margin-top: 0; }
.contact-side { display: grid; gap: 16px; align-content: start; }
.contact-side .card-title { display: flex; align-items: center; gap: 8px; }
.contact-form { display: grid; gap: 4px; }
.contact-form .grid-2 { gap: 0 16px; }
.contact-topics { margin: 4px 0 14px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1.6fr 1fr; align-items: start; } }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); font-weight: 700; padding: 10px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table__actions { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.table__actions form { margin: 0; }
.row--muted td { color: var(--text-3); }
.row--unpaid td { background: color-mix(in srgb, var(--warning-soft) 55%, transparent); }
.row--unpaid td:first-child { box-shadow: inset 3px 0 0 var(--warning); }
.text-warn { color: var(--warning); font-weight: 600; }
.mono, .receipt__mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
.stat--warn .stat__value { color: var(--warning); }
.stats > a.stat { color: inherit; }
.stats > a.stat:hover { border-color: var(--primary); text-decoration: none; }
.stat__label { color: var(--text-3); font-size: .85rem; font-weight: 600; }
.type-chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

/* ---- Small pop-up inside a page or the booking pop-up ---- */
.subdialog { border: 0; padding: 0; width: min(520px, 94vw); max-height: 92vh; border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.subdialog::backdrop { background: rgba(9, 9, 11, .55); }
.subdialog[open] { display: block; }
.subdialog > form { display: flex; flex-direction: column; max-height: 92vh; }
.subdialog__head { display: flex; justify-content: space-between; gap: 12px; padding: 20px 20px 12px; border-bottom: 1px solid var(--border); }
.subdialog__head h2 { font-size: 1.15rem; margin: 0 0 2px; }
.subdialog__body { padding: 16px 20px; overflow-y: auto; }
.subdialog__foot { padding: 12px 20px 18px; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.subdialog__foot .btn-row { justify-content: flex-end; }
.subdialog__foot p { margin: 0; }
html:not(.js) .subdialog[open] { position: static; width: auto; box-shadow: none; border: 1px solid var(--border); margin-top: 12px; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--text-3); cursor: pointer; }
.icon-btn:hover { background: var(--primary-soft); color: var(--text); }
.pay-amounts { margin-bottom: 4px; }
.pay-paid, .pay-method { border: 0; padding: 0; margin: 12px 0 0; min-width: 0; }
.pay-paid legend, .pay-method legend { margin-bottom: 8px; padding: 0; }
.pay-form:has(input[name="Payment.Paid"][value="false"]:checked) .pay-method { display: none; }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.method-opt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border: 1px solid var(--border-strong); border-radius: var(--radius); cursor: pointer; font-weight: 600; font-size: .9rem; background: var(--surface); }
.method-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.method-opt__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.method-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary); }
.method-opt:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.pay-ref { margin-top: 12px; }
.bp__payment { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: var(--radius); margin: 12px 0; border: 1px solid var(--border); }
.bp__payment--paid { background: color-mix(in srgb, var(--success-soft) 60%, transparent); }
.bp__payment--unpaid { background: color-mix(in srgb, var(--warning-soft) 60%, transparent); }
.bp__payment-main { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bp__payment-actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---- Receipt document (3 styles) ---- */
.receipt { --r-accent: #27272a; background: #fff; color: #18181b; border: 1px solid #e4e4e7; border-radius: 16px; padding: 28px; max-width: 640px; margin: 0 auto; display: grid; gap: 18px; box-shadow: var(--shadow); font-size: .95rem; }
.receipt__muted { color: #71717a; font-size: .88em; }
.receipt__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.receipt__issuer { display: flex; gap: 12px; }
.receipt__mark { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: #f4f4f5; color: var(--r-accent); font-weight: 700; }
.receipt__issuer-name { font-weight: 700; font-size: 1.1rem; }
.receipt__meta { text-align: right; }
.receipt__kind { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: #71717a; font-weight: 700; }
.receipt__number { font-weight: 700; font-size: 1.15rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.receipt__status { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.receipt__status strong { margin-left: auto; font-size: 1.1rem; }
.receipt__status--paid { background: #dcfce7; color: #166534; }
.receipt__status--unpaid { background: #fef9c3; color: #854d0e; }
.receipt__facts, .receipt__payment { display: grid; gap: 8px; margin: 0; }
.receipt__facts > div, .receipt__payment > div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; }
.receipt__facts dt, .receipt__payment dt { color: #71717a; }
.receipt__facts dd, .receipt__payment dd { margin: 0; }
.receipt__route { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; gap: 10px; }
.receipt__route li { display: flex; gap: 12px; align-items: flex-start; }
.receipt__dot { flex: none; width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; border: 3px solid var(--r-accent); }
.receipt__dot--end { background: var(--r-accent); }
.receipt__lines { width: 100%; border-collapse: collapse; }
.receipt__lines th { text-align: left; font-weight: 500; padding: 8px 12px 8px 0; border-top: 1px solid #e4e4e7; overflow-wrap: anywhere; }
.receipt__lines td { text-align: right; padding: 8px 0; border-top: 1px solid #e4e4e7; white-space: nowrap; }
.receipt__lines tfoot th, .receipt__lines tfoot td { font-weight: 700; font-size: 1.15rem; border-top: 2px solid #18181b; color: var(--r-accent); }
.receipt__foot { color: #52525b; font-size: .9rem; display: grid; gap: 4px; }
.receipt__foot p { margin: 0; }
.receipt__note { font-style: italic; color: #18181b; }
/* Classic: centered header, serif title */
.receipt--classic .receipt__head { flex-direction: column; align-items: center; text-align: center; border-bottom: 2px solid #18181b; padding-bottom: 16px; }
.receipt--classic .receipt__issuer { flex-direction: column; align-items: center; }
.receipt--classic .receipt__issuer-name { font-family: Georgia, "Times New Roman", serif; font-size: 1.5rem; }
.receipt--classic .receipt__meta { text-align: center; }
.receipt--classic .receipt__mark { display: none; }
/* Modern: color band */
/* Side padding on the receipt itself (not margins on each part: a 100%-wide table plus margins spilled past the edge);
   the coloured header stretches back out to the edges. */
.receipt--modern { --r-accent: #4f46e5; padding: 0 28px 24px; overflow: hidden; }
.receipt--modern > .receipt__head { margin: 0 -28px; padding: 24px 28px; background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; }
.receipt--modern .receipt__head .receipt__muted, .receipt--modern .receipt__kind { color: #e0e7ff; }
.receipt--modern .receipt__mark { background: rgba(255,255,255,.18); color: #fff; }
/* Compact: narrow slip */
.receipt--compact { --r-accent: #18181b; max-width: 380px; padding: 18px; gap: 12px; font-size: .85rem; border-radius: 6px; border-style: dashed; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.receipt--compact .receipt__head { flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.receipt--compact .receipt__issuer { flex-direction: column; align-items: center; }
.receipt--compact .receipt__meta { text-align: center; }
.receipt--compact .receipt__mark { display: none; }
.receipt--compact .receipt__facts > div, .receipt--compact .receipt__payment > div { grid-template-columns: 90px 1fr; }
.receipt--compact .receipt__status { border-radius: 4px; }
/* Mini (style picker) */
.receipt--mini { font-size: 9px; padding: 14px; gap: 8px; box-shadow: none; pointer-events: none; max-width: none; }
.receipt--mini.receipt--modern { padding: 0 14px 12px; }
.receipt--mini.receipt--modern > .receipt__head { padding: 12px 14px; margin: 0 -14px; }
.receipt--mini .receipt__facts > div, .receipt--mini .receipt__payment > div { grid-template-columns: 70px 1fr; gap: 6px; }
.receipt--mini .receipt__mark { width: 26px; height: 26px; border-radius: 7px; }
.receipt--mini.receipt--compact { max-width: 75%; }
.receipt-page { max-width: 720px; margin: 0 auto; padding: 24px 16px 48px; }
.receipt-page__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.receipt-page__bar .page-head__back { margin: 0; }
@media print {
  .no-print, .site-header, .site-footer, .impersonation, .public-header, .public-footer, header, footer.site-footer { display: none !important; }
  body { background: #fff !important; }
  .receipt { box-shadow: none; border: 0; }
  .receipt-page { padding: 0; }
}

/* ---- Receipts tab: style picker ---- */
.style-picker { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 12px; }
@media (min-width: 900px) { .style-picker { grid-template-columns: repeat(3, 1fr); } }
.style-opt { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--border-strong); border-radius: var(--radius); cursor: pointer; background: var(--surface); }
.style-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.style-opt__name { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.style-opt__check { color: var(--primary); visibility: hidden; }
.style-opt:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.style-opt:has(input:checked) .style-opt__check { visibility: visible; }
.style-opt:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 3px; }
.style-opt__preview { display: block; margin-top: 10px; padding: 12px; border-radius: 10px; background: #f4f4f5; max-height: 420px; overflow: hidden; }

/* ---- Earnings ---- */
.earn-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.earn-filters .field { margin: 0; }

/* ---- Admin ---- */
.admin-badge { display: inline-flex; align-items: center; gap: 6px; margin: 4px 12px 12px; padding: 4px 10px; border-radius: 999px; background: var(--danger-soft); color: var(--danger); font-size: .78rem; font-weight: 700; width: fit-content; }
.admin-search { display: flex; gap: 8px; margin-bottom: 16px; max-width: 520px; }
.admin-search input { flex: 1; }
.admin-tip { margin-top: 16px; }
.impersonation { position: sticky; top: 0; z-index: 50; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 16px; background: #7c2d12; color: #fff; font-size: .92rem; }
.impersonation form { margin: 0 0 0 auto; }
.suspended-banner { margin-bottom: 16px; }
.contact-msg { margin-bottom: 12px; }
.contact-msg--done { opacity: .6; }
.contact-msg__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.contact-msg__body { white-space: pre-wrap; margin: 12px 0 0; }
.msg-group { margin-bottom: 16px; }
.seg--tabs, .seg--mini { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--primary-soft); flex-wrap: nowrap; }
.seg__tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 0; background: transparent; color: var(--text-2); font-weight: 600; font-size: .9rem; cursor: pointer; }
.seg--mini .seg__tab { padding: 5px 10px; font-size: .82rem; }
.seg__tab.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg__tab:hover { text-decoration: none; }
.msg-editor { display: grid; gap: 16px; }
@media (min-width: 1100px) { .msg-editor { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } .msg-editor__preview { position: sticky; top: 16px; } }
.msg-editor__labelrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.msg-source { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; width: 100%; }
.msg-sms { width: 100%; font-size: 1rem; }
.rte { border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.rte__toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--border); background: var(--bg); }
.rte__toolbar button { min-width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; font-size: .95rem; display: inline-grid; place-items: center; }
.rte__toolbar button:hover { background: var(--primary-soft); }
.rte__sep { width: 1px; background: var(--border); margin: 4px 4px; }
.rte__area { min-height: 320px; max-height: 60vh; overflow-y: auto; padding: 16px; background: #fff; color: #18181b; outline: none; }
.rte__area:focus { box-shadow: inset 0 0 0 2px var(--primary); }
.msg-tokens { margin: 16px 0; }
.token-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.token-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); cursor: pointer; font-size: .82rem; }
.token-chip code { color: var(--primary); font-weight: 700; }
.token-chip:hover { border-color: var(--primary); }
.msg-editor__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.msg-reset { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.msg-preview__head { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 8px; }
.msg-preview { width: 100%; height: 640px; border: 1px solid var(--border); border-radius: var(--radius); background: #f4f4f5; }
.msg-preview--sms { height: 520px; }
.item__over { position: relative; z-index: 2; }
.js .rte.js-only { display: block !important; }
.js .rte.js-only[hidden] { display: none !important; }

/* ---- Customers grid, pager, receipt in the pop-up ---- */
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.row-link { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.row-link:hover strong { color: var(--primary); }
.customer-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.customer-head h1 { font-size: 1.5rem; margin: 0 0 4px; }
.customer-head__main { display: grid; gap: 8px; }
.modal .receipt-page { padding: 16px; max-width: none; }
.modal .receipt-page .page-head__back { visibility: hidden; }
.modal .receipt { box-shadow: none; }
@media print {
  body:has(#booking-modal[open]) > *:not(#booking-modal), body:has(#booking-modal[open]) .shell, body:has(#booking-modal[open]) main { display: none !important; }
  #booking-modal[open] { position: static; max-height: none; width: auto; box-shadow: none; }
  #booking-modal .modal__head, #booking-modal [data-modal-close] { display: none !important; }
}

/* ---- Grid toolbar, sorting, numbered pager ---- */
.grid-card { margin-bottom: 16px; }
.grid-toolbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); align-items: center; }
.grid-card > .grid-toolbar:last-child { border-bottom: 0; }
.grid-toolbar__search { position: relative; flex: 1 1 240px; min-width: 0; }
.grid-toolbar__search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.grid-toolbar__search input { width: 100%; padding-left: 36px; }
.grid-toolbar__filter select { min-width: 160px; }
.grid-toolbar__filter select.is-set { border-color: var(--primary); background-color: var(--primary-soft); color: var(--primary-soft-text); font-weight: 600; }
.sort-link { display: inline-flex; align-items: center; gap: 4px; color: inherit; }
.sort-link:hover { color: var(--text); text-decoration: none; }
.sort-link.is-active { color: var(--primary); }
.sort-link__arrow { font-size: .9em; opacity: .55; }
.sort-link.is-active .sort-link__arrow { opacity: 1; }
th.num .sort-link { justify-content: flex-end; }
.pager__pages { display: flex; gap: 4px; align-items: center; }
.pager__btn { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; border-radius: 9px; border: 1px solid var(--border); color: var(--text); background: var(--surface); font-weight: 600; font-size: .9rem; }
.pager__btn:hover { border-color: var(--primary); text-decoration: none; }
.pager__btn.is-active { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.pager__btn.is-disabled { opacity: .4; pointer-events: none; }
.pager__gap { color: var(--text-3); padding: 0 2px; }

/* ---- Status tabs above a grid ---- */
.grid-tabs { display: flex; gap: 4px; padding: 8px 8px 0; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.grid-tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 3px solid transparent; color: var(--text-2); font-weight: 600; white-space: nowrap; margin-bottom: -1px; }
.grid-tab:hover { color: var(--text); text-decoration: none; }
.grid-tab.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.grid-tab__count { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--border); color: var(--text-2); font-size: .78rem; font-weight: 700; }
.grid-tab.is-active .grid-tab__count { background: var(--primary); color: var(--primary-text); }
.grid-tab--awaitingpayment .grid-tab__count { background: var(--warning-soft); color: var(--warning); }
.grid-tab--requests .grid-tab__count { background: var(--info-soft); color: var(--info); }
.grid-tab.is-active.grid-tab--awaitingpayment .grid-tab__count, .grid-tab.is-active.grid-tab--requests .grid-tab__count { background: var(--primary); color: var(--primary-text); }
.modal--pay { width: min(520px, 94vw); }
.modal--pay .modal__close { display: none; } /* the payment form has its own close button */
.pay-only > form { display: flex; flex-direction: column; max-height: 92vh; }
.table td.table__actions { display: table-cell; text-align: right; white-space: nowrap; }
.table td.table__actions > * { display: inline-flex; vertical-align: middle; margin-left: 4px; }

/* ---- Width classes for bars (no inline styles: CSP) ---- */
.bw-0{width:0%}.bw-1{width:1%}.bw-2{width:2%}.bw-3{width:3%}.bw-4{width:4%}.bw-5{width:5%}.bw-6{width:6%}.bw-7{width:7%}.bw-8{width:8%}.bw-9{width:9%}.bw-10{width:10%}.bw-11{width:11%}.bw-12{width:12%}.bw-13{width:13%}.bw-14{width:14%}.bw-15{width:15%}.bw-16{width:16%}.bw-17{width:17%}.bw-18{width:18%}.bw-19{width:19%}.bw-20{width:20%}.bw-21{width:21%}.bw-22{width:22%}.bw-23{width:23%}.bw-24{width:24%}.bw-25{width:25%}.bw-26{width:26%}.bw-27{width:27%}.bw-28{width:28%}.bw-29{width:29%}.bw-30{width:30%}.bw-31{width:31%}.bw-32{width:32%}.bw-33{width:33%}.bw-34{width:34%}.bw-35{width:35%}.bw-36{width:36%}.bw-37{width:37%}.bw-38{width:38%}.bw-39{width:39%}.bw-40{width:40%}.bw-41{width:41%}.bw-42{width:42%}.bw-43{width:43%}.bw-44{width:44%}.bw-45{width:45%}.bw-46{width:46%}.bw-47{width:47%}.bw-48{width:48%}.bw-49{width:49%}.bw-50{width:50%}.bw-51{width:51%}.bw-52{width:52%}.bw-53{width:53%}.bw-54{width:54%}.bw-55{width:55%}.bw-56{width:56%}.bw-57{width:57%}.bw-58{width:58%}.bw-59{width:59%}.bw-60{width:60%}.bw-61{width:61%}.bw-62{width:62%}.bw-63{width:63%}.bw-64{width:64%}.bw-65{width:65%}.bw-66{width:66%}.bw-67{width:67%}.bw-68{width:68%}.bw-69{width:69%}.bw-70{width:70%}.bw-71{width:71%}.bw-72{width:72%}.bw-73{width:73%}.bw-74{width:74%}.bw-75{width:75%}.bw-76{width:76%}.bw-77{width:77%}.bw-78{width:78%}.bw-79{width:79%}.bw-80{width:80%}.bw-81{width:81%}.bw-82{width:82%}.bw-83{width:83%}.bw-84{width:84%}.bw-85{width:85%}.bw-86{width:86%}.bw-87{width:87%}.bw-88{width:88%}.bw-89{width:89%}.bw-90{width:90%}.bw-91{width:91%}.bw-92{width:92%}.bw-93{width:93%}.bw-94{width:94%}.bw-95{width:95%}.bw-96{width:96%}.bw-97{width:97%}.bw-98{width:98%}.bw-99{width:99%}.bw-100{width:100%}

/* ---- Denser layout on larger screens ---- */
@media (min-width: 641px) {
  .table td { padding: 9px 14px; }
  .table th { padding: 8px 14px; }
  .card__header { padding-top: 14px; padding-bottom: 12px; }
  .page-head { margin-bottom: 16px; }
  .shell__main { padding-top: 22px; }
  .card + .card { margin-top: 12px; }
}

/* ---- Chart colors (validated: categorical slots 1–3 light/dark; sequential blue for the heat map) ---- */
:root {
  --viz-1: #2a78d6; --viz-2: #eb6834; --viz-3: #1baf7a;
  --viz-grid: #ececee; --viz-base: #c3c2b7; --viz-ink: #52514e; --viz-muted: #898781;
  --heat-0: #f4f4f5; --heat-1: #cde2fb; --heat-2: #86b6ef; --heat-3: #3987e5; --heat-4: #1c5cab;
  --heat-ink-dark: #0b0b0b; --heat-ink-light: #ffffff;
  --kpi-blue: #2a78d6; --kpi-blue-bg: #e8f1fc; --kpi-violet: #6250d6; --kpi-violet-bg: #efedfc;
  --kpi-green: #0f8a5f; --kpi-green-bg: #e3f6ee; --kpi-amber: #b26a00; --kpi-amber-bg: #fdf3e1; --kpi-rose: #c2385a; --kpi-rose-bg: #fcebef;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    --viz-1: #3987e5; --viz-2: #d95926; --viz-3: #199e70;
    --viz-grid: #26262b; --viz-base: #3a3a40; --viz-ink: #c3c2b7; --viz-muted: #898781;
    --heat-0: #1c1c21; --heat-1: #104281; --heat-2: #1c5cab; --heat-3: #3987e5; --heat-4: #86b6ef;
    --heat-ink-dark: #0b0b0b; --heat-ink-light: #ffffff;
    --kpi-blue: #6da7ec; --kpi-blue-bg: #14243a; --kpi-violet: #9085e9; --kpi-violet-bg: #211d3d;
    --kpi-green: #3cc795; --kpi-green-bg: #0f2a20; --kpi-amber: #f0b44a; --kpi-amber-bg: #2d2210; --kpi-rose: #ef7f9b; --kpi-rose-bg: #321821;
  }
}
:root[data-theme="dark"] {
  --viz-1: #3987e5; --viz-2: #d95926; --viz-3: #199e70;
  --viz-grid: #26262b; --viz-base: #3a3a40; --viz-ink: #c3c2b7; --viz-muted: #898781;
  --heat-0: #1c1c21; --heat-1: #104281; --heat-2: #1c5cab; --heat-3: #3987e5; --heat-4: #86b6ef;
  --kpi-blue: #6da7ec; --kpi-blue-bg: #14243a; --kpi-violet: #9085e9; --kpi-violet-bg: #211d3d;
  --kpi-green: #3cc795; --kpi-green-bg: #0f2a20; --kpi-amber: #f0b44a; --kpi-amber-bg: #2d2210; --kpi-rose: #ef7f9b; --kpi-rose-bg: #321821;
}

/* ---- KPI tiles ---- */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 14px; }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } .kpis--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.kpi { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "icon label" "icon value" "icon hint"; column-gap: 12px; align-items: center;
  padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); box-shadow: var(--shadow); overflow: hidden; }
.kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--kpi-c); }
a.kpi:hover { border-color: var(--kpi-c); text-decoration: none; }
.kpi__icon { grid-area: icon; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--kpi-bg); color: var(--kpi-c); }
.kpi__label { grid-area: label; font-size: .82rem; font-weight: 600; color: var(--text-3); }
.kpi__value { grid-area: value; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.kpi__hint { grid-area: hint; font-size: .78rem; color: var(--text-3); }
.kpi--blue { --kpi-c: var(--kpi-blue); --kpi-bg: var(--kpi-blue-bg); }
.kpi--violet { --kpi-c: var(--kpi-violet); --kpi-bg: var(--kpi-violet-bg); }
.kpi--green { --kpi-c: var(--kpi-green); --kpi-bg: var(--kpi-green-bg); }
.kpi--amber { --kpi-c: var(--kpi-amber); --kpi-bg: var(--kpi-amber-bg); }
.kpi--rose { --kpi-c: var(--kpi-rose); --kpi-bg: var(--kpi-rose-bg); }
.delta { font-weight: 700; }
.delta--up { color: var(--kpi-green); }
.delta--down { color: var(--kpi-rose); }

/* ---- Dashboard grid ---- */
.dash-charts { display: grid; gap: 12px; grid-template-columns: 1fr; margin-bottom: 14px; }
@media (min-width: 1000px) { .dash-charts { grid-template-columns: repeat(3, minmax(0, 1fr)); } .chart-card--wide { grid-column: span 2; } }
.dash-charts > .card + .card { margin-top: 0; }
.chart-card .card__header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.chart-card .card__body { padding-top: 4px; }

/* ---- Column chart ---- */
.chart { margin: 0; }
.chart__svg { width: 100%; height: auto; display: block; max-height: 240px; }
.chart__grid { stroke: var(--viz-grid); stroke-width: 1; }
.chart__grid--base { stroke: var(--viz-base); }
.chart__axis, .chart__sublabel { fill: var(--viz-muted); font-size: 10px; }
.chart__label { fill: var(--viz-ink); font-size: 11px; font-weight: 600; }
.chart__label.is-now { fill: var(--primary); }
.chart__value { fill: var(--viz-ink); font-size: 10.5px; font-weight: 600; }
.chart__hit { fill: transparent; }
.chart__col:hover .chart__hit { fill: var(--viz-grid); opacity: .6; }
.chart__s1 { fill: var(--viz-1); background: var(--viz-1); }
.chart__s2 { fill: var(--viz-2); background: var(--viz-2); }
.chart__s3 { fill: var(--viz-3); background: var(--viz-3); }
.chart__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; font-size: .8rem; color: var(--text-2); }
.chart__legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart__swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.chart__table { margin-top: 6px; font-size: .8rem; }
.chart__table summary { cursor: pointer; color: var(--text-3); }
.chart__table table { margin-top: 6px; }
.chart__empty { margin: 4px 0; }

/* ---- Bar list ---- */
.barlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.barlist__top { display: flex; justify-content: space-between; gap: 8px; font-size: .88rem; }
.barlist__label { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barlist__value { color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.barlist__track { margin-top: 4px; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.barlist__bar { display: block; height: 100%; border-radius: 0 4px 4px 0; min-width: 2px; }
.barlist__note { margin-top: 2px; }

/* ---- Busiest-times heat map ---- */
.heat { display: grid; gap: 4px; font-size: .78rem; }
.heat__row { display: grid; grid-template-columns: 36px repeat(4, minmax(0, 1fr)); gap: 4px; align-items: center; }
.heat__row--head span { color: var(--text-3); text-align: center; font-weight: 600; font-size: .72rem; }
.heat__day { color: var(--text-2); font-weight: 600; }
.heat__cell { display: grid; place-items: center; height: 26px; border-radius: 6px; font-weight: 700; font-variant-numeric: tabular-nums; }
.heat-0 { background: var(--heat-0); }
.heat-1 { background: var(--heat-1); color: var(--heat-ink-dark); }
.heat-2 { background: var(--heat-2); color: var(--heat-ink-dark); }
.heat-3 { background: var(--heat-3); color: var(--heat-ink-light); }
.heat-4 { background: var(--heat-4); color: var(--heat-ink-light); }
.heat__scale { display: flex; align-items: center; gap: 4px; justify-content: flex-end; margin-top: 6px; }
.heat__scale .heat__cell { width: 18px; height: 12px; border-radius: 3px; }

/* ---- Today agenda ---- */
.agenda { list-style: none; margin: 0; padding: 0 8px 8px; }
.agenda__item a { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--text); border-left: 3px solid transparent; }
.agenda__item a:hover { background: var(--surface-2); text-decoration: none; }
.agenda__item--ok a { border-left-color: var(--viz-1); }
.agenda__item--wait a { border-left-color: var(--viz-2); }
.agenda__time { font-weight: 700; font-variant-numeric: tabular-nums; }
.agenda__who { display: grid; min-width: 0; }
.agenda__who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-card .qr-block__img { width: 104px; height: 104px; }

/* ---- Earnings bar ---- */
.earn-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.earn-bar h1 { font-size: 1.4rem; margin-right: 6px; }
.chips { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 10px; background: var(--surface-2); }
.chip { padding: 5px 11px; border-radius: 8px; color: var(--text-2); font-weight: 600; font-size: .84rem; }
.chip:hover { color: var(--text); text-decoration: none; }
.chip.is-active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }
.earn-dates { display: inline-flex; align-items: center; gap: 6px; }
.earn-dates input { min-height: 34px; padding: 4px 8px; width: auto; }
.earn-bar__csv { margin-left: auto; }

/* ---- Photo avatar ---- */
.avatar--photo { object-fit: cover; padding: 0; }
.agenda__side { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); white-space: nowrap; }
.agenda__side .icon { color: var(--kpi-amber); }
.agenda__item a { grid-template-columns: 52px minmax(0, 1fr) auto; }
/* Dark mode: the heat ramp runs dark → light, so the ink flips with it */
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .heat-1, :root:where(:not([data-theme="light"])) .heat-2, :root:where(:not([data-theme="light"])) .heat-3 { color: #ffffff; }
  :root:where(:not([data-theme="light"])) .heat-4 { color: #0b0b0b; }
}
:root[data-theme="dark"] .heat-1, :root[data-theme="dark"] .heat-2, :root[data-theme="dark"] .heat-3 { color: #ffffff; }
:root[data-theme="dark"] .heat-4 { color: #0b0b0b; }
/* The code option only matters when an account isn't required */
.book-rules:has(input[name$="RequireCustomerAccount"]:checked) .book-rules__code { opacity: .5; }
.book-rules__note { margin: 4px 0 0; display: flex; gap: 6px; align-items: flex-start; }
.guest-pill { margin-left: 8px; }
.guest-forget { text-align: center; margin: 4px 0 12px; }
.guest-account { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.guest-account > div { flex: 1; }
.guest-account p { margin: 2px 0 0; }
.finish-account { display: grid; gap: 8px; margin-top: 12px; }
.finish-account h3 { font-size: 1rem; margin: 0 0 6px; }
.entry-form > .card + .card { margin-top: 12px; }
.entry-form .stop + .stop { margin-top: 12px; }
.customer-head__actions { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.customer-note { display: flex; gap: 6px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font-size: .88rem; }
.customer-edit { margin-bottom: 12px; }
.customer-edit summary { cursor: pointer; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.customer-edit__form { margin-top: 12px; }
.places-card { margin-bottom: 12px; }
.place__actions { display: flex; align-items: center; gap: 4px; }
.place__edit > summary { list-style: none; }
.place__edit > summary::-webkit-details-marker { display: none; }
.place__edit[open] { flex-basis: 100%; }
.place-form { display: grid; gap: 8px; margin-top: 8px; }
.place-form--new { grid-template-columns: 1fr; border-top: 1px solid var(--border); }
.place-form__labels { display: flex; gap: 8px; flex-wrap: wrap; }
.place-form__labels .seg__opt { min-height: 36px; }
@media (min-width: 900px) { .place-form--new { grid-template-columns: auto 1fr 1.4fr 1fr auto; align-items: center; } }
.place .item__side { flex-wrap: wrap; justify-content: flex-end; }
.places-theirs { padding: 8px 16px 4px; border-top: 1px solid var(--border); }
.places-theirs .field-label { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.place--theirs .item__icon { background: var(--kpi-violet-bg); color: var(--kpi-violet); }

/* ---- Photo gallery (profile) ---- */
.gallery-card { grid-column: 1 / -1; }
.gallery-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.gallery-card__head h3 { margin: 0 0 4px; }
.gallery-empty { display: flex; align-items: center; gap: 10px; padding: 18px; border: 1px dashed var(--border-strong); border-radius: var(--radius); color: var(--text-3); margin-bottom: 12px; }
.gallery-grid { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.gallery-item { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); display: grid; }
.gallery-item__img { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); }
.gallery-item__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-item__first { position: absolute; left: 8px; top: 8px; }
.gallery-item__caption { display: flex; gap: 4px; padding: 8px 8px 0; }
.gallery-item__caption input { min-height: 34px; padding: 4px 8px; font-size: .85rem; }
.gallery-item__actions { display: flex; gap: 2px; justify-content: flex-end; padding: 4px 8px 8px; }
.gallery-item__actions form { margin: 0; }
.gallery-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gallery-upload .field__hint { flex-basis: 100%; margin: 0; }

/* ---- Slideshow (booking page) ---- */
.pp-gallery { overflow: hidden; padding: 0; }
.slideshow { position: relative; }
.slideshow__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; outline: none; }
.slideshow__track::-webkit-scrollbar { display: none; }
.slideshow__track:focus-visible { box-shadow: inset 0 0 0 3px var(--primary); }
.slideshow__slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; position: relative; background: #0b0b0b; }
.slideshow__slide img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.slideshow__slide figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 16px 12px; color: #fff; font-weight: 600; background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.slideshow__btn { position: absolute; top: calc(50% - 22px); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: #18181b; box-shadow: var(--shadow); cursor: pointer; }
.slideshow__btn:disabled { opacity: .35; cursor: default; }
.slideshow__btn--prev { left: 12px; }
.slideshow__btn--next { right: 12px; }
.slideshow__bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; }
.slideshow__dots { display: inline-flex; gap: 6px; }
.slideshow__dot { width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; background: var(--border-strong); cursor: pointer; }
.slideshow__dot.is-active { background: var(--primary); width: 22px; border-radius: 6px; }
.slideshow__count { color: var(--text-3); font-size: .85rem; font-variant-numeric: tabular-nums; margin-left: auto; }

/* ---- Booking page cover (replaces the dark banner) ---- */
.pp-hero__cover { position: relative; height: 96px; overflow: hidden;
  --cover-a: #e0e7ff; --cover-b: #ede9fe; --cover-dot: rgba(79, 70, 229, .14);
  background: radial-gradient(var(--cover-dot) 1.2px, transparent 1.4px) 0 0 / 18px 18px, linear-gradient(120deg, var(--cover-a), var(--cover-b)); }
.pp-hero__cover--lawncare { --cover-a: #dcfce7; --cover-b: #ecfccb; --cover-dot: rgba(22, 128, 61, .16); }
.pp-hero__cover--carwash { --cover-a: #dbeafe; --cover-b: #e0f2fe; --cover-dot: rgba(37, 99, 235, .15); }
.pp-hero__cover-img { position: absolute; inset: -24px; width: calc(100% + 48px); height: calc(100% + 48px); object-fit: cover; filter: blur(14px) saturate(1.15); transform: scale(1.05); }
.pp-hero__cover--photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.15), rgba(255,255,255,.55)); }
@media (min-width: 720px) { .pp-hero__cover { height: 120px; } }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .pp-hero__cover { --cover-a: #1e1b4b; --cover-b: #2e1065; --cover-dot: rgba(165, 180, 252, .14); }
  :root:where(:not([data-theme="light"])) .pp-hero__cover--lawncare { --cover-a: #052e16; --cover-b: #1a2e05; --cover-dot: rgba(134, 239, 172, .14); }
  :root:where(:not([data-theme="light"])) .pp-hero__cover--carwash { --cover-a: #172554; --cover-b: #0c4a6e; --cover-dot: rgba(147, 197, 253, .14); }
  :root:where(:not([data-theme="light"])) .pp-hero__cover--photo::after { background: linear-gradient(180deg, rgba(19,19,22,.2), rgba(19,19,22,.6)); }
}
:root[data-theme="dark"] .pp-hero__cover { --cover-a: #1e1b4b; --cover-b: #2e1065; --cover-dot: rgba(165, 180, 252, .14); }
:root[data-theme="dark"] .pp-hero__cover--lawncare { --cover-a: #052e16; --cover-b: #1a2e05; --cover-dot: rgba(134, 239, 172, .14); }
:root[data-theme="dark"] .pp-hero__cover--carwash { --cover-a: #172554; --cover-b: #0c4a6e; --cover-dot: rgba(147, 197, 253, .14); }
:root[data-theme="dark"] .pp-hero__cover--photo::after { background: linear-gradient(180deg, rgba(19,19,22,.2), rgba(19,19,22,.6)); }

/* ---- Profile photos: compact layout ---- */
.photo-cards { grid-template-columns: 1fr !important; }
.photo-cards .photo-card { flex-direction: row !important; align-items: center; }
.photo-card__preview--profile { flex: none; }
.photo-card__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.photo-card__actions form { margin: 0; }
.photo-card__rules { margin: 0; }
.photo-pick { display: inline-flex; gap: 8px; align-items: center; }
.photo-pick__btn, .gallery-add__tile { position: relative; cursor: pointer; }
.photo-pick__btn input, .gallery-add__tile input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.photo-pick__btn:focus-within, .gallery-add__tile:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.js .nojs-only { display: none !important; }
.gallery-add { display: flex; }
.gallery-add form { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.gallery-add__tile { flex: 1; min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 16px;
  border: 2px dashed var(--border-strong); border-radius: var(--radius); color: var(--text-2); background: var(--surface-2); transition: border-color .15s, background .15s; }
.gallery-add__tile:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--text); }
.gallery-add__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: var(--primary-text); }
.gallery-add__tile.is-busy { opacity: .6; pointer-events: none; }

/* ---- Left menu: full, or icons only ("rail"). Tablets/narrow windows default to icons; wide screens to full. ---- */
.sidebar__top { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 2px 16px 0; }
.sidebar__top .brand { padding: 0 8px !important; min-width: 0; }
.nav-toggle { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--text-3); cursor: pointer; }
.nav-toggle:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.bottomnav { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-flow: column; overflow: hidden; }
.bottomnav__item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* What the icons-only menu hides and centers */
@media (min-width: 641px) {
  .shell { transition: grid-template-columns .2s ease; }
  .shell--nav-rail { --sidebar-w: 72px; }
  .shell--nav-rail .sidebar { padding: 16px 10px; align-items: center; }
  .shell--nav-rail .sidebar__top { flex-direction: column; padding: 0 0 12px; gap: 10px; }
  .shell--nav-rail .brand { padding: 0 !important; }
  .shell--nav-rail .brand__name, .shell--nav-rail .nav__label, .shell--nav-rail .nav__title, .shell--nav-rail .nav__item .pill,
  .shell--nav-rail .sidebar__link, .shell--nav-rail .sidebar__user-text, .shell--nav-rail .admin-badge { display: none; }
  .shell--nav-rail .nav { width: 100%; }
  .shell--nav-rail .nav__item { justify-content: center; padding: 0; min-height: 44px; }
  .shell--nav-rail .sidebar__theme .theme-switch { flex-direction: column; }
  .shell--nav-rail .sidebar__theme .theme-switch__label, .shell--nav-rail .sidebar__theme span:not(.icon) { display: none; }
  .shell--nav-rail .sidebar__user { flex-direction: column; padding: 10px 0 0; gap: 8px; }
}
/* Automatic (no choice saved yet): icons only below 1100px */
@media (min-width: 641px) and (max-width: 1099px) {
  .shell:not(.shell--nav-full) { --sidebar-w: 72px; }
  .shell:not(.shell--nav-full) .sidebar { padding: 16px 10px; align-items: center; }
  .shell:not(.shell--nav-full) .sidebar__top { flex-direction: column; padding: 0 0 12px; gap: 10px; }
  .shell:not(.shell--nav-full) .brand { padding: 0 !important; }
  .shell:not(.shell--nav-full) .brand__name, .shell:not(.shell--nav-full) .nav__label, .shell:not(.shell--nav-full) .nav__title,
  .shell:not(.shell--nav-full) .nav__item .pill, .shell:not(.shell--nav-full) .sidebar__link, .shell:not(.shell--nav-full) .sidebar__user-text,
  .shell:not(.shell--nav-full) .admin-badge { display: none; }
  .shell:not(.shell--nav-full) .nav { width: 100%; }
  .shell:not(.shell--nav-full) .nav__item { justify-content: center; padding: 0; min-height: 44px; }
  .shell:not(.shell--nav-full) .sidebar__theme .theme-switch { flex-direction: column; }
  .shell:not(.shell--nav-full) .sidebar__theme span:not(.icon) { display: none; }
  .shell:not(.shell--nav-full) .sidebar__user { flex-direction: column; padding: 10px 0 0; gap: 8px; }
  .shell__main { padding: 24px 24px 48px; }
}

/* ---- Phone bottom menu: 4 tabs + More (clearly visible) ---- */
@media (max-width: 640px) {
  :root { --bottom-nav-h: 64px; }
  .bottomnav { grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface); backdrop-filter: none;
    border-top: 1px solid var(--border-strong); box-shadow: 0 -6px 20px rgba(0, 0, 0, .08); padding-top: 4px; }
  .bottomnav__item { gap: 2px; color: var(--text-2); font-size: .74rem; cursor: pointer; list-style: none; height: 100%; }
  .bottomnav__item::-webkit-details-marker { display: none; }
  .bottomnav__icon { display: grid; place-items: center; width: 52px; height: 30px; border-radius: 16px; transition: background .15s; }
  .bottomnav__icon .icon { width: 23px; height: 23px; }
  .bottomnav__item.active { color: var(--primary); font-weight: 700; }
  .bottomnav__item.active .bottomnav__icon { background: var(--primary-soft); }
  .bottomnav__text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .more-menu { display: contents; }
  .more-menu[open] > summary .bottomnav__icon { background: var(--primary-soft); }
  .more-menu__sheet { position: fixed; left: 8px; right: 8px; bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 8px); z-index: 30;
    background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 12px 40px rgba(0, 0, 0, .22); padding: 14px; }
  .more-menu__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .more-menu__item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 14px; color: var(--text); font-size: .82rem; font-weight: 600; text-align: center; }
  .more-menu__item:hover { background: var(--surface-2); text-decoration: none; }
  .more-menu__item.active { background: var(--primary-soft); color: var(--primary-soft-text); }
  .more-menu__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2); color: var(--primary); }
  .more-menu__item.active .more-menu__icon { background: var(--surface); }
  .more-menu__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
}

/* ---- Customer app (signed-in customers): same shell as the business app, 4 tabs on phones ---- */
.shell--client .booking-wrap { padding: 0; max-width: 820px; }
.bottomnav.bottomnav--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.industry-icon--xs { width: 20px; height: 20px; border-radius: 6px; }
.biz-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 820px; }
.biz { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.biz__who { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: var(--text); text-decoration: none; }
.biz__who:hover { text-decoration: none; }
.biz__who:hover strong { color: var(--primary); }
.biz__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.biz__text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.biz__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--text-3); font-size: .85rem; }
.biz__book { flex: none; }
.biz__paused { flex: none; white-space: normal; height: auto; padding: 4px 10px; text-align: center; }
.shell--client .places-card, .shell--client .card--pad { max-width: 820px; }

/* ---- A paused business: view only (the server refuses changes too) ---- */
.is-readonly .shell__main form[method="post"]:not(.ok-when-paused), .bp.is-readonly form[method="post"] { pointer-events: none; opacity: .6; }
.is-readonly .shell__main form[method="post"]:not(.ok-when-paused) :is(button:not([type="button"]), input[type="submit"]),
.bp.is-readonly form[method="post"] :is(button:not([type="button"]), input[type="submit"]),
.is-readonly [data-write], .bp.is-readonly [data-write] { display: none !important; }
.suspended-banner a { font-weight: 600; }
.biz { flex-wrap: wrap; }
.biz__who { flex: 1 1 220px; }
@media (max-width: 640px) { .biz__book, .biz__paused { flex: 1 1 100%; justify-content: center; } }

/* ---- Profile → Language ---- */
.lang-pick { display: flex; flex-direction: column; gap: 10px; }
.lang-pick__opt { font: inherit; font-weight: 600; background: var(--surface); color: var(--text); cursor: pointer; min-width: 120px; justify-content: center; }
.lang-pick__opt.is-current { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-soft-text); }
.lang-pick p { margin: 0; }
.lang-alt { font-weight: 500; font-size: .85em; }

/* ---- Language switch (English / Español) ---- */
.lang-switch__toggle { gap: 6px; }
.lang-switch--full { display: inline-flex; align-items: center; gap: 4px; padding: 3px 3px 3px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text-3); }
.lang-switch__btn { padding: 5px 10px; border-radius: 7px; color: var(--text-2); font-size: .85rem; font-weight: 600; text-decoration: none; }
.lang-switch__btn:hover { color: var(--text); text-decoration: none; }
.lang-switch__btn[aria-current="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.sidebar__lang { padding: 8px 0 0; }
.shell--nav-rail .sidebar__lang { display: none; }
@media (min-width: 641px) and (max-width: 1099px) { .shell:not(.shell--nav-full) .sidebar__lang { display: none; } }
.site-footer .lang-switch--full { margin-right: 8px; }
.site-menu__lang { padding: 6px 4px; }
.more-menu__lang { display: flex; justify-content: center; margin-top: 12px; }
.footer-legal { align-items: center; flex-wrap: wrap; gap: 12px; }
@media (max-width: 640px) { .site-header .site-header__lang { display: none; } }
.more-menu__foot .menu__item { white-space: nowrap; }

/* =========================================================================
   Calendar: one plain background for every column, bookings colour-coded by status
   (same four groups as the bookings page tabs), sized to fit the screen.
   ========================================================================= */
:root { --cat-unpaid: #c2410c; --cat-unpaid-soft: #ffedd5; }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) { --cat-unpaid: #fb923c; --cat-unpaid-soft: #3b1a0a; } }
:root[data-theme="dark"] { --cat-unpaid: #fb923c; --cat-unpaid-soft: #3b1a0a; }
.cal-item--pending, .cal-chip--pending, .cal-swatch--pending { --cat: var(--warning); --cat-soft: var(--warning-soft); }
.cal-item--upcoming, .cal-chip--upcoming, .cal-swatch--upcoming { --cat: var(--primary); --cat-soft: var(--primary-soft); }
.cal-item--unpaid, .cal-chip--unpaid, .cal-swatch--unpaid { --cat: var(--cat-unpaid); --cat-soft: var(--cat-unpaid-soft); }
.cal-item--paid, .cal-chip--paid, .cal-swatch--paid { --cat: var(--success); --cat-soft: var(--success-soft); }

.cal-swatch--pending, .cal-swatch--upcoming, .cal-swatch--unpaid, .cal-swatch--paid { background: var(--cat-soft); border: 0; box-shadow: inset 3px 0 0 var(--cat); }

/* Same white surface everywhere: no grey for days off, other months or hours outside work; today is marked in the header only. */
.cal-col, .cal-col.is-today, .cal-month__cell, .cal-month__cell.is-other, .cal-month__cell.is-off:not(.is-other) { background: var(--surface); }
.cal-month__cell.is-other .cal-month__num { color: var(--text-3); font-weight: 600; opacity: .6; }
.cal-dayhead.is-today { background: color-mix(in srgb, var(--primary) 6%, var(--surface)); }
.cal-slot { border-top-color: color-mix(in srgb, var(--border) 60%, transparent); }
.cal-slot--hour { border-top-color: var(--border); }

/* Booking blocks */
.cal-item { background: var(--cat-soft); color: color-mix(in srgb, var(--cat) 70%, var(--text)); border: 0; border-left: 3px solid var(--cat);
  border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.06); padding: 3px 7px; }
.cal-item:hover { filter: none; box-shadow: 0 2px 8px rgba(0,0,0,.14); }
.cal-item strong { color: var(--text); }
.cal-item__tag { color: var(--cat); }
.cal-item--short { padding: 0 7px; }
.cal-item__line { display: flex; gap: 5px; align-items: baseline; min-width: 0; }
.cal-item__line b { color: var(--cat); flex: none; }
.cal-item__line span { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Month chips */
.cal-chip { display: flex; gap: 5px; align-items: baseline; background: var(--cat-soft, var(--surface-2)); color: var(--text); border-left: 3px solid var(--cat, var(--border-strong)); border-radius: 5px; padding: 2px 6px; }
.cal-chip__time { color: var(--cat); font-weight: 800; flex: none; }
.cal-chip__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cal-chip--blocked { --cat: var(--border-strong); --cat-soft: var(--surface-2); color: var(--text-3); }

/* Fit the screen: the visible hours share the height that's available (with sensible limits). */
.cal-grid { --slot-h: clamp(18px, calc((100vh - 290px) / var(--rows, 24)), 30px); }
.cal-month__cell { min-height: clamp(76px, calc((100vh - 290px) / 6), 118px); }
@media (max-width: 640px) { .cal-grid { --slot-h: 26px; } .cal-month__cell { min-height: 68px; } .cal-chip__time { display: none; } }
.rows-1{--rows:1}.rows-2{--rows:2}.rows-3{--rows:3}.rows-4{--rows:4}.rows-5{--rows:5}.rows-6{--rows:6}.rows-7{--rows:7}.rows-8{--rows:8}.rows-9{--rows:9}.rows-10{--rows:10}.rows-11{--rows:11}.rows-12{--rows:12}.rows-13{--rows:13}.rows-14{--rows:14}.rows-15{--rows:15}.rows-16{--rows:16}.rows-17{--rows:17}.rows-18{--rows:18}.rows-19{--rows:19}.rows-20{--rows:20}.rows-21{--rows:21}.rows-22{--rows:22}.rows-23{--rows:23}.rows-24{--rows:24}.rows-25{--rows:25}.rows-26{--rows:26}.rows-27{--rows:27}.rows-28{--rows:28}.rows-29{--rows:29}.rows-30{--rows:30}.rows-31{--rows:31}.rows-32{--rows:32}.rows-33{--rows:33}.rows-34{--rows:34}.rows-35{--rows:35}.rows-36{--rows:36}.rows-37{--rows:37}.rows-38{--rows:38}.rows-39{--rows:39}.rows-40{--rows:40}.rows-41{--rows:41}.rows-42{--rows:42}.rows-43{--rows:43}.rows-44{--rows:44}.rows-45{--rows:45}.rows-46{--rows:46}.rows-47{--rows:47}.rows-48{--rows:48}

/* ---- Booking panel: Navigate in Google Maps ---- */
.bp__maplink { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: 4px; border-radius: 7px; color: var(--text-3); vertical-align: middle; }
.bp__maplink:hover { background: var(--surface-2); color: var(--primary); }

/* ---- Calendar on phones: 3 days instead of a week (no sideways scrolling) ---- */
.cal-grid--3day { grid-template-columns: 52px repeat(3, 1fr); min-width: 0; }
.segmented__item--3day { display: none; }
@media (max-width: 640px) {
  .segmented__item--3day { display: inline-block; }
  .segmented__item--week { display: none; }
  .cal-grid--day, .cal-grid--3day { --slot-h: 30px; }
  .cal-grid--3day .cal-item { font-size: .72rem; padding: 2px 5px; }
  .cal-head .btn-row { width: 100%; justify-content: space-between; }
}
@media (max-width: 640px) {
  .cal-time { white-space: nowrap; font-size: .62rem; padding: 0 4px; letter-spacing: -.01em; }
  .cal-grid--3day .cal-item__line b { display: none; } /* the time is on the left edge; the name matters more */
}

/* ---- Address suggestions dropdown ---- */
.addr-suggest { position: relative; width: 100%; }
.addr-suggest > input { width: 100%; }
.addr-suggest__list { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .14); padding: 4px; max-height: 280px; overflow-y: auto; }
.addr-suggest__item { padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: .92rem; color: var(--text); display: flex; align-items: center; gap: 8px; }
.addr-suggest__item::before { content: ""; flex: none; width: 14px; height: 14px; background: currentColor; opacity: .45;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") center / contain no-repeat; }
.addr-suggest__item.is-recent::before { opacity: .8; color: var(--primary); }
.addr-suggest__item:hover, .addr-suggest__item[aria-selected="true"] { background: var(--primary-soft); color: var(--primary-soft-text); }
.addr-suggest__credit { padding: 6px 12px 4px; font-size: .7rem; color: var(--text-3); border-top: 1px solid var(--border); margin-top: 4px; }
.addr-suggest__credit a { color: inherit; }

.nowrap { white-space: nowrap; }

@media (max-width: 480px) {
  .receipt { padding: 20px; }
  .receipt--modern { padding: 0 20px 20px; }
  .receipt--modern > .receipt__head { margin: 0 -20px; padding: 20px; }
  .receipt__facts > div, .receipt__payment > div { grid-template-columns: 110px 1fr; gap: 10px; }
}

.bp__body > .bp__payment { margin: 0; }

/* ---------- Notifications: the bell, its list, the Home banner ---------- */
.mobilebar__actions { display: flex; align-items: center; gap: 6px; }
.bell { position: relative; }
.bell__btn { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--text-2); cursor: pointer; list-style: none; }
.bell__btn::-webkit-details-marker { display: none; }
.bell__btn:hover, .bell[open] > .bell__btn { background: var(--surface-2); color: var(--text); }
.bell__btn .icon { width: 20px; height: 20px; }
.bell__badge { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.bell__panel { width: min(380px, calc(100vw - 24px)); padding: 0; overflow: hidden; }
@media (max-width: 640px) { .bell__panel { position: fixed; top: 60px; left: 12px; right: 12px; width: auto; } }
.bell__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.bell__head form { margin: 0; }
.bell__mark { font-size: .85rem; }
.bell__empty { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 16px 14px; }
.bell__all { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 11px; border-top: 1px solid var(--border); font-size: .9rem; font-weight: 600; text-decoration: none; }
.bell__all:hover { background: var(--surface-2); text-decoration: none; }
.bell .inbox-list { max-height: min(420px, 60vh); overflow-y: auto; }

.inbox-list { list-style: none; margin: 0; padding: 0; }
.inbox-list li + li { border-top: 1px solid var(--border); }
.inbox-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; color: var(--text); text-decoration: none; }
.inbox-row:hover { background: var(--surface-2); text-decoration: none; }
.inbox-row.is-new { background: color-mix(in srgb, var(--primary-soft) 45%, transparent); }
.inbox-row.is-new:hover { background: var(--primary-soft); }
.inbox-row__icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; }
.inbox-row__icon--blue { background: var(--primary-soft); color: var(--primary-soft-text); }
.inbox-row__icon--amber { background: var(--warning-soft); color: var(--warning); }
.inbox-row__icon--green { background: var(--success-soft); color: var(--success); }
.inbox-row__icon--red { background: var(--danger-soft); color: var(--danger); }
.inbox-row__icon--grey { background: var(--surface-2); color: var(--text-3); }
.inbox-row__text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.inbox-row__what { font-size: .92rem; line-height: 1.35; }
.inbox-row.is-new .inbox-row__what { font-weight: 700; }
.inbox-row__detail { color: var(--text-3); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-row__when { flex: none; display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: .78rem; white-space: nowrap; padding-top: 2px; }
.inbox-row__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.inbox-list--page .inbox-row { padding: 14px 18px; }

.inbox-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 0 0 20px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border)); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface)); }
.inbox-banner__icon { position: relative; display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--primary); color: var(--primary-text); }
.inbox-banner__count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .72rem; font-weight: 700; line-height: 20px; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.inbox-banner__text { flex: 1 1 260px; min-width: 0; display: grid; gap: 2px; }
.inbox-banner__text h2 { margin: 0; font-size: 1.05rem; }
.inbox-banner__latest { color: var(--text); font-size: .92rem; text-decoration: none; overflow-wrap: anywhere; }
.inbox-banner__latest:hover strong { text-decoration: underline; }
.inbox-banner__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.inbox-banner__actions form { margin: 0; }
@media (max-width: 640px) { .inbox-banner__actions { flex: 1 1 100%; } .inbox-banner__actions .btn:first-child { flex: 1; justify-content: center; } }

/* Tablets and up: the bell sits on the title row ("Hi, Horacio"), top right — no line of its own. The title row and any
   banner above it keep room on the right so nothing ends up under the bell. */
.topbar { display: none; }
@media (min-width: 641px) {
  .topbar { display: block; position: relative; height: 0; z-index: 25; }
  .topbar > .bell { position: absolute; top: -4px; right: 0; }
  .topbar + :is(.page-head, .page-head__back, .bp-page__back) { padding-right: 52px; }
  .topbar + :is(.alert, .impersonation) { margin-right: 52px; }
}

/* ---------- Settings (businesses and customers) ---------- */
.settings-form { display: grid; gap: 16px; }
.settings-form .field { margin: 0; }
.settings-choice { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.settings-choice legend { padding: 0; margin-bottom: 8px; font-weight: 600; font-size: .92rem; }
.settings-choice .seg__opt span { display: inline-flex; align-items: center; gap: 6px; }
.settings-signout { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.settings-signout p { margin: 0; }
.client-settings { margin-top: 24px; }
.client-settings__signout { margin-top: 24px; }

/* ---------- Admin: sent messages, settings ---------- */
.stat--bad .stat__value { color: var(--danger); }
.stat__value--sm { display: flex; align-items: center; gap: 6px; font-size: 1rem; }
.sent-kind { display: inline-flex; align-items: center; gap: 6px; }
.sent-kind .icon { color: var(--text-3); }
.sent-preview { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sent-to { overflow-wrap: anywhere; }
.sent-meta dl { display: grid; gap: 8px; margin: 0 0 12px; }
.sent-meta dl > div { display: grid; grid-template-columns: 160px 1fr; gap: 12px; }
.sent-meta dt { color: var(--text-3); }
.sent-meta dd { margin: 0; overflow-wrap: anywhere; }
.sent-frame-card { overflow: hidden; margin-top: 16px; }
.sent-frame-card .msg-preview { display: block; width: 100%; min-height: 640px; border: 0; background: #fff; }
.sent-text { margin-top: 16px; }
.sent-text summary { cursor: pointer; font-weight: 600; }
.sent-text pre { white-space: pre-wrap; font-size: .88rem; margin: 12px 0 0; }
.sms-bubble { max-width: 360px; padding: 12px 16px; border-radius: 18px; background: var(--surface-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.reminder-settings { display: grid; gap: 16px; max-width: 560px; margin-top: 12px; }
.reminder-row { display: grid; grid-template-columns: 200px minmax(0, 220px); gap: 8px 16px; align-items: start; padding: 12px 0; border-top: 1px solid var(--border); }
.reminder-row .field { margin: 0; }
.reminder-row .check { padding-top: 30px; }
@media (max-width: 640px) { .reminder-row { grid-template-columns: 1fr; } .reminder-row .check { padding-top: 0; } .sent-meta dl > div { grid-template-columns: 1fr; gap: 2px; } }

/* Admin rows: one main button, small links under it. */
.table td.table__actions > .row-actions, .row-actions { display: inline-grid; justify-items: end; gap: 4px; }
.row-actions form { margin: 0; }
.row-actions__minor { display: flex; gap: 12px; font-size: .82rem; white-space: nowrap; }
.row-actions__minor .btn--link { font-size: inherit; font-weight: 600; }
.row-actions__minor a { color: var(--text-2); font-weight: 600; }
/* Less important columns step aside on narrower screens so the actions stay in view. */
@media (max-width: 1239px) { .col-wide-only { display: none; } }

/* ---------- Pricing page ---------- */
.pricing { display: grid; gap: 24px; justify-items: center; padding-bottom: 16px; }
.billing-switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.billing-switch__opt { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 18px; border-radius: 999px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.billing-switch__save { padding: 2px 8px; border-radius: 999px; background: var(--success-soft); color: var(--success); font-size: .75rem; font-weight: 700; }
#bill-monthly:checked ~ .billing-switch .billing-switch__opt--monthly,
#bill-yearly:checked ~ .billing-switch .billing-switch__opt--yearly { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
#bill-monthly:focus-visible ~ .billing-switch .billing-switch__opt--monthly,
#bill-yearly:focus-visible ~ .billing-switch .billing-switch__opt--yearly { outline: 2px solid var(--primary); outline-offset: 2px; }
.pricing:has(#bill-monthly:checked) .plan__price--yearly, .pricing:has(#bill-yearly:checked) .plan__price--monthly { display: none; }
.plans { display: grid; gap: 20px; width: 100%; max-width: 820px; }
@media (min-width: 720px) { .plans--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .plans--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1080px; } }
.plan { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 28px 24px; }
.plan--popular { border: 2px solid var(--primary); box-shadow: var(--shadow-lg); }
.plan__badge { position: absolute; top: -13px; left: 24px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--primary); color: var(--primary-text); font-size: .78rem; font-weight: 700; }
.plan h2 { margin: 0; font-size: 1.35rem; }
.plan__desc { margin: 0; color: var(--text-2); min-height: 3em; }
.plan__price { display: block; }
.plan__amount { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.02em; }
.plan__per { margin-left: 4px; color: var(--text-3); font-weight: 600; }
.plan__note { color: var(--success); font-size: .9rem; font-weight: 600; margin-top: 2px; }
.plan__features { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 10px; }
.plan__features li { display: flex; gap: 10px; align-items: flex-start; }
.plan__features .icon { flex: none; margin-top: 3px; color: var(--success); }
.pricing__notes { display: flex; gap: 8px; align-items: center; max-width: 820px; text-align: center; justify-content: center; font-size: .92rem; }
.cta__actions { justify-content: center; }
.cta__secondary { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); }
.cta__secondary:hover { background: rgba(255,255,255,.2); color: #fff; }

/* ---------- Admin: pricing ---------- */
.pricing-admin__trial { margin-bottom: 20px; }
.pricing-admin__trial-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.pricing-admin__trial-form .field { margin: 0; flex: 0 1 360px; }
.pricing-admin__plans { display: grid; gap: 20px; margin-bottom: 16px; }
.pricing-admin__plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.pricing-admin__plan-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.pricing-admin__form { display: grid; gap: 16px; }
.pricing-admin__form .field { margin: 0; }
.pricing-admin__langs { display: grid; gap: 16px; }
@media (min-width: 900px) { .pricing-admin__langs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pricing-admin__langs fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px 16px; margin: 0; display: grid; gap: 12px; min-width: 0; }
.pricing-admin__langs legend { padding: 0 6px; font-weight: 700; }
.pricing-admin__flags { display: grid; gap: 8px; }
.plans > .card { margin: 0; }
.pricing-admin__saving { margin: -8px 0 0; }

/* ---------- Plan & billing (business) ---------- */
.billing-banner { margin-bottom: 16px; }
.billing-banner a { margin-left: 6px; font-weight: 700; color: inherit; text-decoration: underline; }
.billing-hero { display: grid; gap: 16px 24px; border-left: 4px solid var(--success); }
@media (min-width: 900px) { .billing-hero { grid-template-columns: minmax(0, 1fr) auto; align-items: start; } }
.billing-hero--warn { border-left-color: var(--warning); }
.billing-hero--bad { border-left-color: var(--danger); }
.billing-hero__title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.billing-hero__title h2 { margin: 0; font-size: 1.4rem; }
.billing-hero__price { font-size: 1.8rem; font-weight: 800; margin-top: 6px; }
.billing-hero__price span { font-size: .95rem; font-weight: 600; color: var(--text-3); margin-left: 4px; }
.billing-hero__desc { margin: 8px 0 0; color: var(--text-2); max-width: 640px; }
.billing-hero__link { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; font-weight: 600; }
.billing-hero__link.is-open { color: var(--success); }
.billing-hero__link.is-paused { color: var(--danger); }
.billing-hero__actions { display: grid; gap: 8px; justify-items: stretch; min-width: 220px; }
.billing-hero__actions p { margin: 0; max-width: 260px; }
.billing-hero__test { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; margin: 0; padding: 8px 12px; border-radius: 8px; background: var(--surface-2); color: var(--text-2); }
.billing-usage { margin-top: 20px; }
.billing-usage__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.billing-usage__head h2 { margin: 0; font-size: 1.1rem; }
.billing-usage__grid { display: grid; gap: 16px 32px; }
@media (min-width: 700px) { .billing-usage__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.usage__label { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.usage__label strong { margin-left: auto; }
.usage__bar { display: block; width: 100%; height: 10px; margin-top: 8px; border: 0; border-radius: 999px; background: var(--surface-2); overflow: hidden; appearance: none; -webkit-appearance: none; }
.usage__bar::-webkit-progress-bar { background: var(--surface-2); border-radius: 999px; }
.usage__bar::-webkit-progress-value { background: linear-gradient(90deg, var(--primary), #7c3aed); border-radius: 999px; }
.usage__bar::-moz-progress-bar { background: linear-gradient(90deg, var(--primary), #7c3aed); border-radius: 999px; }
.usage__bar.is-full::-webkit-progress-value { background: var(--danger); }
.usage__bar.is-full::-moz-progress-bar { background: var(--danger); }
.usage__note { margin: 6px 0 0; color: var(--danger); }
.billing-plans { margin-top: 24px; }
.billing-plans h2 { font-size: 1.1rem; margin: 0 0 12px; }
.billing-plans__grid { display: grid; gap: 16px; }
@media (min-width: 700px) { .billing-plans__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.billing-plans__grid > .card { margin: 0; }
.billing-plan { display: grid; gap: 10px; align-content: start; }
.billing-plan.is-mine { border: 2px solid var(--primary); }
.billing-plan__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.billing-plan__head h3 { margin: 0; }
.billing-plan__price { font-size: 1.4rem; font-weight: 800; }
.billing-plan__price > span:first-child { font-size: .9rem; color: var(--text-3); font-weight: 600; }
.billing-plan .btn { justify-self: start; }
.billing-invoices { margin-top: 24px; }
.alert--warning { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }

/* ---------- Admin: test subscription ---------- */
.admin-sub__now dl, .admin-sub__facts { display: grid; gap: 8px; margin: 12px 0 0; }
.admin-sub__facts > div { display: grid; grid-template-columns: 170px 1fr; gap: 12px; }
.admin-sub__facts dt { color: var(--text-3); }
.admin-sub__facts dd { margin: 0; }
.admin-sub__presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.admin-sub__presets form { margin: 0; }
.admin-sub__form { display: grid; gap: 14px; margin-top: 12px; }
.admin-sub__form .field { margin: 0; }
@media (max-width: 640px) { .admin-sub__facts > div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Pay link: options in the business pop-ups ---------- */
.pay-link-opt { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); }
.pay-link-opt .field__hint { margin: 4px 0 0 2px; }
.pay-form:has(input[name="Payment.Paid"][value="true"]:checked) .pay-link-opt { display: none; }
.bp__paylink { flex: 1 1 100%; display: grid; gap: 8px; padding-top: 8px; border-top: 1px dashed color-mix(in srgb, var(--warning) 35%, var(--border)); }
.bp__paylink-reported { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 8px 10px; border-radius: 8px; background: var(--success-soft); color: var(--success); font-weight: 600; }
.bp__paylink-reported form { margin-left: auto; }
.bp__paylink-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.bp__paylink-row > span { margin-right: auto; }
.bp__paylink-row form { margin: 0; }
.bp__paylink-copy { display: flex; gap: 6px; }
.bp__paylink-copy input { flex: 1; min-width: 0; font-size: .85rem; }

/* ---------- Pay page (customer) ---------- */
.pay-page { max-width: 520px; margin: 0 auto; padding: 24px 16px 48px; display: grid; gap: 16px; }
.pay-summary { text-align: center; }
.pay-summary h1 { font-size: 1.4rem; margin: 4px 0 6px; }
.pay-summary__amount { font-size: 2.8rem; font-weight: 800; letter-spacing: -0.02em; }
.pay-summary p { margin: 0; }
.pay-done p { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--success); margin: 0 0 12px; }
.pay-methods { display: grid; gap: 10px; }
.pay-methods h2 { font-size: 1.05rem; margin: 4px 0 2px; }
.paybtn { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 12px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; min-height: 60px; }
a.paybtn:hover { border-color: var(--primary); text-decoration: none; }
.paybtn__name { font-weight: 800; font-size: 1.05rem; }
.paybtn__id { color: var(--text-2); overflow-wrap: anywhere; }
.paybtn__go { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--primary); }
.paybtn--venmo .paybtn__name { color: #008cff; }
.paybtn--cashapp .paybtn__name { color: #00a63e; }
.paybtn--paypal .paybtn__name { color: #1d4ed8; }
.paybtn--zelle .paybtn__name { color: #6d1ed4; }
.paybtn__help { grid-column: 1 / -1; margin: 0; }
.pay-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; color: var(--text-2); }
.pay-told h2 { font-size: 1.05rem; margin: 0 0 12px; }
.pay-told__form { display: grid; gap: 12px; }
.pay-told__form fieldset { border: 0; margin: 0; padding: 0; }
.pay-told__form p { margin: 0; }
.pay-reported { margin: 0; }
.pay-direct { display: flex; gap: 6px; align-items: flex-start; justify-content: center; text-align: center; margin: 0; }
.alert--success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
@media (max-width: 420px) { .paybtn { grid-template-columns: 1fr auto; } .paybtn__id { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- Booking times (profile) ---------- */
.time-mode { display: grid; gap: 16px; }
.time-mode__choice { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.time-mode:has(input[name="Input.TimeMode"][value="ExactTime"]:checked) .time-mode__parts { display: none; }
.day-parts { display: grid; gap: 8px; }
.day-parts__row { display: grid; grid-template-columns: 110px repeat(3, minmax(0, 1fr)); gap: 8px; align-items: center; }
.day-parts__head span { font-size: .78rem; font-weight: 600; color: var(--text-3); }
.day-parts__row input { min-width: 0; }
@media (max-width: 520px) { .day-parts__row { grid-template-columns: 80px repeat(3, minmax(0, 1fr)); gap: 6px; } }

/* ---------- Time-of-day picker (booking form) ---------- */
.dpp { display: grid; gap: 12px; }
.dpp__days { display: grid; gap: 8px; }
.dpp__day { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); }
.dpp__day:first-child { border-top: 0; }
.dpp__date { display: grid; line-height: 1.2; }
.dpp__date span { color: var(--text-3); font-size: .85rem; }
.dpp__parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dpp__part { position: relative; display: grid; gap: 1px; padding: 9px 10px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); cursor: pointer; text-align: center; min-height: 52px; }
.dpp__part input { position: absolute; opacity: 0; pointer-events: none; }
.dpp__name { font-weight: 700; font-size: .92rem; }
.dpp__range { font-size: .75rem; color: var(--text-3); }
.dpp__part:hover { border-color: var(--primary); }
.dpp__part:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary); }
.dpp__part:has(input:checked) .dpp__name { color: var(--primary-soft-text); }
.dpp__part:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.dpp__part.is-off { cursor: not-allowed; background: var(--surface-2); border-style: dashed; opacity: .7; }
.dpp__part.is-off .dpp__name { color: var(--text-3); }
@media (max-width: 520px) { .dpp__day { grid-template-columns: 1fr; gap: 6px; } .dpp__date { grid-auto-flow: column; justify-content: start; gap: 8px; align-items: baseline; } }
.bp__arrival { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.bp__arrival label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; margin-right: auto; }
.bp__arrival input { width: 130px; min-height: 36px; }
.dpp__parts--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dpp__parts--1 { grid-template-columns: minmax(0, 1fr); }
.admin-sub__form .grid-2 { row-gap: 14px; }

/* ---------- Plan limits: "Pro" markers and notes ---------- */
.pro-badge { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-soft-text); font-size: .7rem; font-weight: 800; letter-spacing: .02em; vertical-align: middle; }
.plan-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 0; font-size: .9rem; color: var(--text-2); }
.plan-note a { font-weight: 600; }
.style-opt.is-locked { opacity: .65; cursor: not-allowed; }
.plan-upsell .card__body { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.plan-upsell .card__body > div { flex: 1 1 260px; }
.plan-upsell h2 { margin: 0 0 4px; font-size: 1.05rem; }
.plan-upsell p { margin: 0; }
.plan-upsell__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-soft-text); flex: none; }
.pricing-admin__flags legend { font-weight: 600; font-size: .92rem; margin-bottom: 6px; }

/* "OK to text" agreement: a switch next to a short paragraph */
.check.sms-consent { align-items: flex-start; font-weight: 400; margin: 4px 0 14px; line-height: 1.4; }
.check.sms-consent input { margin-top: 2px; }
.sms-consent__fine { display: block; margin-top: 4px; font-size: .82rem; color: var(--text-2); }

/* Privacy policy / terms */
.legal { max-width: 760px; padding-top: 32px; padding-bottom: 48px; }
.legal__head h1 { margin-bottom: 4px; }
.legal__intro { font-size: 1.05rem; margin-top: 16px; }
.legal__toc { margin: 20px 0 28px; }
.legal__toc h2 { font-size: 1rem; margin: 0 0 8px; }
.legal__toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 24px; }
@media (max-width: 640px) { .legal__toc ol { columns: 1; } }
.legal__toc li { margin: 2px 0; }
.legal__section { scroll-margin-top: 80px; margin-top: 28px; }
.legal__section h2 { font-size: 1.2rem; margin-bottom: 8px; }
.legal__section p, .legal__section li { line-height: 1.6; color: var(--text-1, inherit); }
.legal__section ul { padding-left: 20px; }
.legal__section li { margin: 6px 0; }

/* Admin → Settings → Send a test text */
.test-text input[type="tel"] { max-width: 320px; }

/* Product screenshots in phone / laptop frames (marketing pages) */
.device { margin: 0; }
.device img { display: block; width: 100%; height: auto; }
.device { --frame: linear-gradient(145deg, #f8fafc, #cbd5e1); --frame-edge: rgba(15, 23, 42, .12); }
.device--phone .device__screen { padding: 5px; border-radius: 30px; background: var(--frame); box-shadow: 0 0 0 1px var(--frame-edge), 0 18px 48px -20px rgba(15, 23, 42, .35); }
.device--phone .device__screen img { border-radius: 25px; aspect-ratio: 1000 / 2160; object-fit: cover; object-position: top; }
.device--laptop .device__screen { padding: 5px; border-radius: 12px 12px 3px 3px; background: var(--frame); box-shadow: 0 0 0 1px var(--frame-edge), 0 26px 60px -26px rgba(15, 23, 42, .35); }
.device--laptop .device__screen img { border-radius: 7px; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.device--laptop .device__base { height: 10px; margin: 0 -4%; border-radius: 2px 2px 12px 12px; background: linear-gradient(#e2e8f0, #b8c2d0); box-shadow: 0 0 0 1px var(--frame-edge); }
:root[data-theme="dark"] .device { --frame: linear-gradient(145deg, #64748b, #334155); --frame-edge: rgba(255, 255, 255, .08); }
:root[data-theme="dark"] .device--laptop .device__base { background: linear-gradient(#64748b, #3f4b5d); }
.device figcaption { margin-top: 18px; }

/* Home hero: laptop calendar with the phone booking page in front */
.showcase-hero { position: relative; width: 100%; max-width: 620px; margin: 0 auto; padding: 0 0 30px; }
.showcase-hero .device--laptop { width: 90%; }
.showcase-hero .device--phone { position: absolute; right: 0; bottom: 0; width: 31%; }
@media (max-width: 640px) {
  .showcase-hero { max-width: 280px; padding: 0; }
  .showcase-hero .device--laptop { display: none; }
  .showcase-hero .device--phone { position: static; width: 100%; }
}

/* "From request to confirmed": alternating screenshot + text rows */
.shots { display: grid; gap: 40px; max-width: 980px; margin: 0 auto; }
.shot-row { display: grid; gap: 28px; align-items: center; }
.shot-row .device--phone { width: min(230px, 64%); margin: 0 auto; }
.shot-row .device--laptop { width: 100%; max-width: 640px; margin: 0 auto; }
.shot-row__text { max-width: 460px; }
.shot-row__step { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; margin-bottom: 12px; }
.shot-row__text h3 { font-size: 1.35rem; margin-bottom: 8px; }
.shot-row__text p { color: var(--text-2); font-size: 1.05rem; line-height: 1.55; }
@media (min-width: 860px) {
  .shot-row { grid-template-columns: 1fr 1fr; gap: 48px; }
  .shot-row--flip .device { order: 2; }
}
.shots__note { text-align: center; margin-top: 28px; }

/* Industry page: booking page + calendar side by side */
.industry-shots { display: grid; gap: 40px; align-items: end; }
.industry-shots .device--phone { width: min(260px, 80%); margin: 0 auto; }
.industry-shots figcaption { text-align: center; }
.industry-shots figcaption h3 { margin-bottom: 4px; }
.industry-shots figcaption p { color: var(--text-2); }
@media (min-width: 860px) { .industry-shots { grid-template-columns: 1fr 2fr; } }


/* "How it works": a color per step — 1 indigo (set up), 2 violet (share), 3 green (confirm) */
.howto__step { --step: var(--primary); position: relative; overflow: hidden; border-top: 4px solid var(--step);
  background: linear-gradient(180deg, color-mix(in srgb, var(--step) 7%, var(--surface)), var(--surface) 70%); }
.howto__step--2 { --step: #7c3aed; }
.howto__step--3 { --step: var(--success); }
.howto li.howto__step::before { background: var(--step); color: #fff; box-shadow: 0 6px 14px -6px var(--step); }
.howto__icon { position: absolute; top: 18px; right: 18px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  color: var(--step); background: color-mix(in srgb, var(--step) 12%, var(--surface)); }
.howto__icon .icon { width: 20px; height: 20px; }
:root[data-theme="dark"] .howto__step--2 { --step: #a78bfa; }

/* Keep LAST: grids of cards never get the stacked-card spacing (".card + .card", also redefined for phones
   above), which pushed every card but the first one down. */
:is(.stats, .dash-grid, .features, .howto, .industries, .shots) > .card { margin-top: 0; }
