/* Sure web: the same palette and shapes as the apps (DesignSystem/DS.swift, lib/ui/ds.dart). */
/* "Calm service" palette (DESIGN_SYSTEM_PLAN.md §2): text colors keep WCAG AA (4.5:1) in both themes. */
:root {
  color-scheme: light dark;
  /* Status text on its own tint: darker in the light theme to keep WCAG AA. */
  --badge-ink: 85%;
  --accent: #c2255c; --accent-fill: #c2255c; --accent-soft: #fce8ef; --bronze: #8c5a2b; --button: var(--accent-fill);
  --text: #16141f; --muted: #625e6c; --faint: #6f6b7b;
  --bg: #f7f6f9; --card: #ffffff; --line: #ddd9e3; --line-strong: #8e8999; --muted-bg: #f1eff4;
  --success: #237a35; --warning: #a35100; --danger: #c92a2a; --danger-fill: #c92a2a; --info: #1971c2; --star: #b07800;
  --shadow: 0 6px 18px rgb(22 20 31 / 8%);
  --violet: var(--info);
  /* Radii: badges, fields and buttons, cards, sheets. */
  --radius-xs: 8px; --radius-s: 12px; --radius: 16px; --radius-l: 24px;
  /* Spacing on a 4px grid. */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  /* Motion: three durations for the whole app. */
  --fast: 120ms; --standard: 220ms; --emphasized: 320ms; --ease: cubic-bezier(.2, .8, .2, 1);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
/* The system's theme until the visitor picks one with the button in the header. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --badge-ink: 100%; --accent: #f06595; --accent-fill: #d6336c; --accent-soft: #3a1d29; --bronze: #d9a066;
    --text: #f4f2f7; --muted: #aba6b6; --faint: #8d8899;
    --bg: #111015; --card: #1c1a21; --line: #34303c; --line-strong: #6a6575; --muted-bg: #26232d;
    --success: #51cf66; --warning: #ffa94d; --danger: #ff8787; --danger-fill: #c92a2a; --info: #74c0fc; --star: #fcc419; }
}
:root[data-theme="dark"] { --badge-ink: 100%; --accent: #f06595; --accent-fill: #d6336c; --accent-soft: #3a1d29; --bronze: #d9a066;
    --text: #f4f2f7; --muted: #aba6b6; --faint: #8d8899;
    --bg: #111015; --card: #1c1a21; --line: #34303c; --line-strong: #6a6575; --muted-bg: #26232d;
    --success: #51cf66; --warning: #ffa94d; --danger: #ff8787; --danger-fill: #c92a2a; --info: #74c0fc; --star: #fcc419; }
/* Less motion when the system asks for it: movement becomes a short fade. */
@media (prefers-reduced-motion: reduce) {
  :root { --fast: 100ms; --standard: 100ms; --emphasized: 100ms; }
  *, *::before, *::after { scroll-behavior: auto !important; }
  .salon:hover { transform: none; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
/* Visible keyboard focus everywhere. */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tabular, .time, .price { font-variant-numeric: tabular-nums; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 12px max(16px, calc((100% - 960px) / 2));
  background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; color: var(--text); }
.logo { width: 34px; height: 34px; border-radius: 9px; display: block; }
#nav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
#nav a { padding: 8px 12px; border-radius: 999px; color: var(--text); font-weight: 600; font-size: 14px; }
#nav a.active { background: var(--accent-soft); color: var(--accent); }
main { max-width: 960px; margin: 0 auto; padding: 20px 16px 64px; }
h1 { font-size: 30px; margin: 4px 0 6px; } h2 { font-size: 20px; margin: 28px 0 12px; }
.muted { color: var(--muted); } .faint { color: var(--faint); font-size: 13px; }
.row { display: flex; gap: 12px; align-items: center; } .grow { flex: 1; min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.list > * + * { border-top: 1px solid var(--line); }
.list .item { padding: 12px 0; color: var(--text); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.salon { overflow: hidden; padding: 0; cursor: pointer; transition: transform var(--standard) var(--ease); color: var(--text); } .salon:hover { transform: translateY(-2px); }
.cover { height: 140px; background: linear-gradient(135deg, var(--accent), var(--bronze)) center/cover; position: relative; }
.cover .avatar { position: absolute; left: 14px; bottom: -22px; border: 3px solid var(--card); }
.avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff;
  background: var(--accent-fill) center/cover; flex: none; }
.salon .body { padding: 30px 16px 16px; }
.price { color: var(--accent); font-weight: 700; }
.search { display: flex; gap: 8px; margin: 16px 0; } .search input, .search select { padding: 12px 14px; border-radius: var(--radius-s); border: 1px solid var(--line-strong); background: var(--card); }
.search input { flex: 1; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.chip { padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); cursor: pointer; white-space: nowrap; font-weight: 600;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease); }
.chip.off { opacity: .4; cursor: default; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; padding: 12px 18px; border-radius: var(--radius-s); border: 0; cursor: pointer; font-weight: 700; background: var(--accent-fill); color: #fff;
  transition: transform var(--fast) var(--ease), filter var(--fast) var(--ease); }
.button:active:not(:disabled) { transform: scale(.97); filter: brightness(.94); }
.button.secondary { background: var(--accent-soft); color: var(--accent); }
.button.ghost { background: transparent; color: var(--danger); }
.button.danger { background: var(--danger-fill); color: #fff; }
.button.wide { width: 100%; }
/* Disabled is grey rather than faded, so it stays legible in both themes. */
.button:disabled { background: var(--muted-bg); color: var(--faint); cursor: default; }
.button.ghost:disabled { background: transparent; }
/* Busy: a spinner in place of the title, same size. */
.button[aria-busy="true"] { position: relative; color: transparent !important; background: var(--accent-fill); }
.button.secondary[aria-busy="true"] { background: var(--accent-soft); }
.button[aria-busy="true"]::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #fff; border-right-color: transparent; animation: spin .7s linear infinite; }
.button.secondary[aria-busy="true"]::after { border-color: var(--accent); border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .button[aria-busy="true"]::after { animation-duration: 2s; } }
.icon { flex: none; vertical-align: -0.15em; }

/* Form fields: label above, hint or error under, "optional" mark. */
.form-field { margin: 14px 0; }
.form-field label { display: block; font-size: 14px; font-weight: 600; margin: 0 2px 6px; }
.form-field .optional { font-weight: 400; color: var(--faint); }
.form-field .field { margin: 0; }
.form-field__note { font-size: 13px; color: var(--muted); margin: 6px 2px 0; min-height: 0; }
.form-field__note:empty { display: none; }
.form-field__note.is-error { color: var(--danger); display: flex; gap: 4px; align-items: center; }
.field[aria-invalid] { border-color: var(--danger); border-width: 2px; }
.step { display: flex; align-items: center; gap: 8px; margin: 24px 0 12px; font-weight: 700; font-size: 18px; }
.step b { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-fill); color: #fff; display: grid; place-items: center; font-size: 13px; }
.check { display: flex; align-items: center; gap: 12px; padding: 12px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent-fill); }
.slots { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
.slots .chip { text-align: center; }
.field { display: block; width: 100%; padding: 14px; border-radius: var(--radius-s); border: 1px solid var(--line-strong); background: var(--card); margin: 8px 0; font-size: 17px; }
.field:focus { border-color: var(--accent); }
.field.code { font-size: 24px; font-weight: 700; letter-spacing: 8px; font-variant-numeric: tabular-nums; }
.narrow { max-width: 420px; margin: 24px auto; }
.narrow.wide-ish { max-width: 640px; }
.form-field .label { display: block; font-size: 14px; font-weight: 600; margin: 0 2px 8px; }
/* Steps: a three-part progress bar. */
.progress { display: flex; gap: 4px; margin: 4px 0 20px; }
.progress span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); transition: background var(--standard) var(--ease); }
.progress span.on { background: var(--accent); }
.step-body { animation: step-in var(--standard) var(--ease); }
@keyframes step-in { from { opacity: 0; transform: translateX(12px); } }
@media (prefers-reduced-motion: reduce) { @keyframes step-in { from { opacity: 0; } } }
/* Option tiles (the industry). */
.tiles { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.tile { min-height: 52px; padding: 10px 12px; text-align: left; border-radius: var(--radius-s); border: 1px solid var(--line-strong); background: var(--card); cursor: pointer; font-weight: 600;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease); }
.tile.on { background: var(--accent-fill); color: #fff; border-color: transparent; }
.chip.on { background: var(--accent-fill); color: #fff; border-color: transparent; }
.field:disabled { background: var(--muted-bg); color: var(--muted); border-color: var(--line); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--muted-bg); color: var(--muted); }
/* Status badges: 12% of the status color over the card, so they follow the theme. */
.badge.pendingApproval { background: color-mix(in srgb, var(--warning) 12%, var(--card)); color: color-mix(in srgb, var(--warning) var(--badge-ink), #000); }
.badge.booked, .badge.moved { background: color-mix(in srgb, var(--success) 12%, var(--card)); color: color-mix(in srgb, var(--success) var(--badge-ink), #000); }
.badge.inProgress, .badge.readyForPayment { background: color-mix(in srgb, var(--info) 12%, var(--card)); color: color-mix(in srgb, var(--info) var(--badge-ink), #000); }
.badge.canceled, .badge.noShow { background: color-mix(in srgb, var(--danger) 12%, var(--card)); color: color-mix(in srgb, var(--danger) var(--badge-ink), #000); }
.request { border-color: color-mix(in srgb, var(--warning) 60%, transparent); background: color-mix(in srgb, var(--warning) 6%, var(--card)); }
/* A bar of buttons at the bottom of the screen: solid, so the page never shows through it. */
.sticky { position: sticky; bottom: 0; z-index: 3; margin-top: 20px; padding-block: var(--space-3); background: var(--bg); }
.sticky > .button { flex: 1 1 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; z-index: 20;
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: var(--radius-s); font-weight: 600; max-width: 90vw;
  animation: toast-in var(--emphasized) var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }
@media (prefers-reduced-motion: reduce) { @keyframes toast-in { from { opacity: 0; } } }
.toast[hidden] { display: none; }
.toast--success .icon { color: #51cf66; } .toast--error .icon { color: #ff8787; } .toast--info .icon { color: #74c0fc; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .toast--success .icon { color: #237a35; } :root:not([data-theme="light"]) .toast--error .icon { color: #c92a2a; } :root:not([data-theme="light"]) .toast--info .icon { color: #1971c2; }
}
:root[data-theme="dark"] .toast--success .icon { color: #237a35; } :root[data-theme="dark"] .toast--error .icon { color: #c92a2a; } :root[data-theme="dark"] .toast--info .icon { color: #1971c2; }

/* Empty states: why it's empty and the next step. */
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty__icon { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.empty h3 { margin: 0 0 6px; color: var(--text); font-size: 17px; }
.empty p { margin: 0 auto 14px; max-width: 320px; }

/* Loading placeholders in the shape of the content. */
.skeleton { display: block; height: 12px; margin: 6px 0; border-radius: 6px; background: var(--muted-bg); animation: pulse 1.8s ease-in-out infinite; }
.skeleton--circle { width: 44px; height: 44px; border-radius: 50%; margin: 0; flex: none; }
@keyframes pulse { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* Confirmation dialog in the page's style. */
.dialog { border: 0; border-radius: var(--radius-l); padding: 24px; max-width: min(420px, calc(100vw - 32px)); background: var(--card); color: var(--text);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .25); animation: dialog-in var(--emphasized) var(--ease); }
.dialog::backdrop { background: rgba(10, 8, 14, .45); animation: fade-in var(--standard) var(--ease); }
.dialog p { margin: 0 0 20px; font-size: 17px; line-height: 1.45; }
.dialog__actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes fade-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { @keyframes dialog-in { from { opacity: 0; } } }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.day { min-width: 58px; padding: 8px; border-radius: var(--radius-s); border: 1px solid var(--line-strong); background: var(--card); text-align: center; cursor: pointer; }
.day.on { background: var(--accent-fill); color: #fff; border-color: transparent; }
.day small { display: block; font-size: 11px; opacity: .8; text-transform: uppercase; } .day strong { font-size: 18px; }
.time { width: 56px; font-weight: 700; } .time small { display: block; color: var(--faint); font-weight: 500; }
@media (max-width: 600px) { h1 { font-size: 26px; } }

/* Explore, place page, booking (stage 3b). */
.row.wrap { flex-wrap: wrap; } .full { width: 100%; } .accent { color: var(--accent); }
.stack { margin-bottom: 10px; } .note { margin: 8px 0 0; } .button.compact { min-height: 44px; padding: 8px 14px; font-size: 14px; } .button.plain.compact { padding: 6px 0; }
.rating { white-space: nowrap; } .stars { color: var(--star); white-space: nowrap; }
.cover.hero { height: 220px; border-radius: var(--radius); }
.hero-title { margin-top: 34px; }
.staff { display: flex; flex-wrap: wrap; gap: 20px; }
.staff__item { text-align: center; width: 96px; color: inherit; }
.staff__item strong { display: block; margin-top: 6px; }
.photos { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.cover.photo { height: 140px; border-radius: var(--radius-s); }
.list .item .plus { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-fill); color: #fff; font-weight: 700; flex: none; }
h2.step { font-size: 18px; margin: 24px 0 12px; }
.option { width: 100%; text-align: left; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; min-height: 52px; }
.radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; }
.radio.on { border: 6px solid var(--accent-fill); }
.day.off { background: var(--muted-bg); color: var(--faint); }
.day-skeleton { width: 58px; height: 68px; border-radius: var(--radius-s); margin: 0; flex: none; }
.slot-skeleton { height: 44px; border-radius: var(--radius-s); margin: 0; }
.slots .chip { min-height: 44px; }
.row.promo { align-items: flex-start; margin-top: 16px; } .row.promo .form-field { flex: 1; margin: 0; }
.row.promo .button { margin-top: 26px; }
.field.upper { text-transform: uppercase; }
.form-field__note:not(.is-error) .icon { color: var(--success); }

/* Schedule and bookings (stage 3c). */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.field.compact { width: auto; padding: 8px 12px; font-size: 15px; }
.day__note { min-height: 1.2em; font-variant-numeric: tabular-nums; }
.day:not(.on) .day__note { color: var(--accent); opacity: 1; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 16px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px; min-width: 0; }
.stat strong { display: block; font-size: 22px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat span { font-size: 13px; color: var(--muted); }
.history { font-size: 13px; font-weight: 700; margin-top: 2px; } .history.is-danger { color: var(--danger); } .history.is-success { color: var(--success); }
.item__actions { margin-top: 10px; } .item__actions.indent { margin-left: 68px; }
@media (max-width: 600px) { .item__actions.indent { margin-left: 0; } }
/* A visit that is over: a muted background rather than fading, so the text keeps its contrast. */
.list .item.is-over { background: var(--muted-bg); margin: 0 -16px; padding: 12px 16px; }
.card.booking.is-over { background: var(--muted-bg); }
.request { transition: opacity var(--standard) var(--ease); }
h2.row { gap: 8px; } h2 .icon { color: var(--warning); }

/* Team, services, subscription, payroll, reports (stage 3d). */
.contact { gap: 8px; } .contact .button { padding: 8px 14px; }

/* Profile and settings (stage 3e). */
.work { margin: 0; } .work figcaption { margin: 6px 0 2px; }
.danger-text { color: var(--danger); }
.stack-top { margin-top: 12px; } .note-top { margin-top: 0; }

/* Rest of the web and the admin panel (stage 3f). */
/* A quiet action next to content (report, don't apply): accent text, no fill, full tap target. */
.button.plain { background: transparent; color: var(--accent); padding: 8px 4px; }
.dialog .form-field { margin: 0 0 20px; }
.dialog form { margin: 0; }
.grid.works { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.cover.work-photo { height: 160px; border-radius: var(--radius); }
.card.pro { padding: 16px; }
.inline-fields { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.inline-fields .form-field { margin: 0; flex: 1 1 180px; }
.inline-fields .button { flex: none; }
.field.auto { width: auto; }
.badge.danger { background: color-mix(in srgb, var(--danger) 12%, var(--card)); color: color-mix(in srgb, var(--danger) var(--badge-ink), #000); }
.badge.success { background: color-mix(in srgb, var(--success) 12%, var(--card)); color: color-mix(in srgb, var(--success) var(--badge-ink), #000); }
.badge.warning { background: color-mix(in srgb, var(--warning) 12%, var(--card)); color: color-mix(in srgb, var(--warning) var(--badge-ink), #000); }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin: 12px 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.doc-row { gap: 8px; flex-wrap: wrap; }
.empty__icon.small { width: 40px; height: 40px; margin: 0; flex: none; }
.flush { margin: 0; } .note-6 { margin-top: 6px; }
.report .cover.work-photo, .work.note .cover.work-photo { max-width: 240px; }
#apCustom { margin: 0; }
.tabs .chip { color: var(--text); display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.tabs .chip.on { color: #fff; }
/* Fields side by side: labels get the same height, so the inputs line up whatever wraps or errs below. */
.inline-fields { align-items: flex-start; }
.inline-fields .form-field label { min-height: 2.9em; display: flex; flex-wrap: wrap; align-content: flex-end; gap: 0 4px; }
.inline-fields > .button { margin-top: calc(2.9em * 14 / 16 + 6px); }
@media (max-width: 600px) {
  .inline-fields .form-field { flex-basis: 100%; }
  .inline-fields .form-field label { min-height: 0; }
  .inline-fields > .button { margin-top: 0; width: 100%; }
}

/* Navigation (stage 4): side panel on wide screens, "≡" menu on phones. */
.menu-button { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: var(--radius-s); background: transparent; color: var(--text); cursor: pointer; place-items: center; }
.menu-button:hover { background: var(--muted-bg); }
#nav a:hover:not(.active) { background: var(--muted-bg); }
#nav a.active { font-weight: 700; }
#nav a .icon { flex: none; }
.nav-group + .nav-group { margin-top: 12px; }
.nav-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; padding: 4px 12px; }
.nav-count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent-fill); color: #fff; font-size: 12px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }

@media (max-width: 899px) {
  .menu-button { display: grid; }
  #nav { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 8px 16px 16px; background: var(--card); border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(0, 0, 0, .12); max-height: calc(100vh - 64px); overflow-y: auto; }
  body.menu-open #nav { display: flex; animation: menu-in var(--standard) var(--ease); }
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { @keyframes menu-in { from { opacity: 0; } } }
/* A booking row on a phone: the status goes under the client and service instead of squeezing them. */
@media (max-width: 600px) {
  .agenda > .row { flex-wrap: wrap; row-gap: 6px; }
  .agenda > .row > .grow { flex: 1 1 calc(100% - 68px); }
  .agenda > .row > .badge { margin-left: 68px; }
}

/* Motion (stage 5): page entry and the toast's exit, with reduced-motion fallbacks. */
.page-in { animation: page-in var(--standard) var(--ease); }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }
.toast--out { animation: toast-out var(--standard) var(--ease) forwards; }
@keyframes toast-out { to { opacity: 0; transform: translate(-50%, 12px); } }
@media (prefers-reduced-motion: reduce) {
  @keyframes page-in { from { opacity: 0; } }
  @keyframes toast-out { to { opacity: 0; transform: translate(-50%, 0); } }
}

/* Keyboard (stage 6): the skip link shows only when focused; the page itself takes focus without a ring. */
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 30; padding: 10px 16px; border-radius: var(--radius-s); background: var(--accent-fill); color: #fff; font-weight: 700; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
#app:focus { outline: none; }

/* Client pages: the catalog, a place, booking, chats. */
[hidden] { display: none !important; }
main { max-width: 1120px; }
.between { justify-content: space-between; }
.clip { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clip-box { min-width: 0; display: flex; flex-direction: column; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.hero-search { margin-bottom: var(--space-4); }
.hero-search h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.02em; margin: 2px 0 var(--space-4); }
.searchbar { display: flex; align-items: center; gap: var(--space-3); min-height: 60px; padding: 6px 6px 6px var(--space-4);
  background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 8px 24px rgb(20 16 30 / 8%); }
.searchbar:focus-within { border-color: var(--accent); }
.searchbar input { flex: 1; min-width: 0; min-height: 46px; border: 0; background: none; outline: none; font-size: 17px; }
.searchbar select { min-height: 46px; max-width: 42%; padding: 0 var(--space-3); border: 0; border-left: 1px solid var(--line); background: none; }
#industries { margin-bottom: var(--space-2); }
.chips { scrollbar-width: none; } .chips::-webkit-scrollbar { display: none; }
.section-head { margin-top: var(--space-6); } .section-head h2 { margin: 0; }
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--muted-bg); }
.segmented button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: none; font-weight: 600; cursor: pointer; }
.segmented [aria-pressed="true"] { background: var(--card); box-shadow: 0 1px 3px rgb(20 16 30 / 18%); }
.grid { margin-top: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 300px); gap: var(--space-4); overflow-x: auto; padding-bottom: var(--space-2); scroll-snap-type: x proximity; scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; }
.place { display: flex; flex-direction: column; overflow: hidden; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  transition: box-shadow var(--standard) var(--ease), transform var(--standard) var(--ease); }
.place:hover { box-shadow: 0 10px 28px rgb(20 16 30 / 14%); transform: translateY(-2px); }
.place__cover { position: relative; aspect-ratio: 16 / 9; }
.cover__photo, .cover__tone { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover__tone { display: grid; place-items: center; color: rgb(255 255 255 / 70%); }
.place__cover .round-button { position: absolute; top: var(--space-2); right: var(--space-2); }
.place__body { padding: var(--space-3) var(--space-4) var(--space-4); }
.place__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
.place__meta { font-size: 14px; }
.round-button { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--text); cursor: pointer; box-shadow: 0 2px 6px rgb(20 16 30 / 14%); }
.round-button.on { color: var(--accent); } .round-button.on svg { fill: currentColor; }
.place-hero { position: relative; height: clamp(180px, 28vw, 300px); overflow: hidden; border-radius: var(--radius-l); }
.place-hero .round-button { position: absolute; top: var(--space-3); right: var(--space-3); }
.place-layout, .booking-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space-6); align-items: start; }
.place-title { align-items: center; margin-top: var(--space-4); } .place-title h1 { margin: 0 0 2px; }
.book-card, .booking-summary { position: sticky; top: 16px; display: grid; gap: var(--space-3); margin-top: var(--space-4); padding: var(--space-4); }
.book-card__price { display: flex; justify-content: space-between; align-items: baseline; } .book-card__price .price { font-size: 20px; }
.book-card__main { width: 100%; }
.book-card__links { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.book-card__links .button { padding-inline: 6px; font-size: 14px; }
.booking-summary__title { margin: 0; font-size: 17px; }
.booking-summary__lines { display: grid; gap: 4px; } .booking-summary .button { width: 100%; }
.gallery { display: grid; gap: var(--space-2); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.gallery img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-s); }
.plus { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-fill); color: #fff; }
.safety { margin-top: var(--space-5); }
.contacts-narrow { display: none; margin-top: var(--space-3); }
@media (max-width: 899px) { .contacts-narrow { display: block; } .contacts-narrow .book-card__links { grid-template-columns: repeat(2, 1fr); } }
.check { padding: var(--space-3); border-radius: var(--radius-s); cursor: pointer; }
.check:has(input:checked) { background: var(--accent-soft); }
.map, #mapBox { position: relative; } .map { height: min(68vh, 620px); margin-top: var(--space-4); border-radius: var(--radius); overflow: hidden; z-index: 0; }
.map__controls { position: absolute; right: var(--space-3); bottom: 34px; display: grid; gap: var(--space-2); z-index: 1; }
.map__notice { position: absolute; top: var(--space-3); left: var(--space-3); right: var(--space-3); z-index: 1; padding: var(--space-3); border-radius: var(--radius-s); background: var(--card); border: 1px solid var(--line); }
.pin { display: grid; place-items: center; border-radius: 50%; background: var(--accent-fill); color: #fff; border: 2px solid #fff; box-shadow: 0 2px 8px rgb(0 0 0 / 35%); }
.pin-card { display: grid; gap: 2px; color: #16141f; }
.chat { display: flex; flex-direction: column; height: calc(100dvh - 120px); max-width: 760px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.chat__head { padding: var(--space-3); border-bottom: 1px solid var(--line); }
.chat__list { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: var(--space-4); overflow-y: auto; }
.chat__input { padding: var(--space-3); border-top: 1px solid var(--line); } .chat__input .field { margin: 0; }
.chat__input label { cursor: pointer; }
.bubble { align-self: flex-start; display: grid; gap: 2px; max-width: 78%; padding: 8px 12px; border-radius: 16px 16px 16px 4px; background: var(--muted-bg); overflow-wrap: anywhere; }
.bubble.mine { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: var(--accent-fill); color: #fff; }
.bubble small { justify-self: end; opacity: .75; font-size: 11px; } .bubble img { max-width: 100%; border-radius: 10px; }
@media (max-width: 899px) {
  .place-layout, .booking-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .book-card, .booking-summary { position: sticky; top: auto; bottom: 8px; z-index: 3; box-shadow: 0 -6px 24px rgb(20 16 30 / 14%); }
  .booking-summary__title, .booking-summary__place, .contacts-wide { display: none; }
  .book-card { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } .book-card__main { width: auto; white-space: nowrap; }
  .book-card__price { display: grid; justify-content: start; gap: 0; } .book-card__price .faint { font-size: 13px; } .book-card__price .price { font-size: 17px; white-space: nowrap; }
  /* The phone's booking bar: what is chosen on the left, the button on the right. */
  .booking-summary { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .booking-summary .button { width: auto; white-space: nowrap; }
  .booking-summary__lines > strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .place-main .place-title { flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .searchbar { flex-wrap: wrap; padding: var(--space-2) var(--space-3); } .searchbar select { max-width: none; width: 100%; border-left: 0; border-top: 1px solid var(--line); }
  .chat { height: calc(100dvh - 92px); border-radius: 0; } .chat__head .button { display: none; }
}
@media (prefers-reduced-motion: reduce) { .place:hover { transform: none; } }

/* Work pages. */
.searchbar--small { min-height: 48px; box-shadow: none; }
.service-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 120px auto; gap: var(--space-3); align-items: end; padding: var(--space-3) 0; }
.service-row .form-field { margin: 0; } form.card.service-row { padding: var(--space-4); }
.gallery__item { position: relative; } .gallery__item .round-button { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; }
.sticky-save { position: sticky; bottom: 0; z-index: 3; margin-top: var(--space-5); padding-block: var(--space-3); display: flex; justify-content: flex-end; background: var(--bg); }
@media (max-width: 720px) { .service-row { grid-template-columns: 1fr 1fr; } .service-row .form-field:first-child { grid-column: 1 / -1; } .service-row > .row, .service-row > .button { grid-column: 1 / -1; } }

/* A website: header, footer, wide pages; the business has its own zone with tabs. */
body { display: flex; flex-direction: column; min-height: 100dvh; }
main { flex: 1; width: 100%; max-width: 1200px; padding: var(--space-6) var(--space-4) 64px; }
.page-wide main { max-width: none; padding: 0 0 var(--space-6); }
.wrap:not(.row) { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--space-4); }
.topbar { display: block; padding: 0; background: var(--card); backdrop-filter: none; border-bottom: 1px solid var(--line); z-index: 20; }
.topbar__inner { display: flex; align-items: center; gap: var(--space-6); min-height: 68px; max-width: 1200px; margin-inline: auto; padding-inline: var(--space-4); }
#nav { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: var(--space-1); margin: 0; flex: 1; }
#nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-3); border-radius: var(--radius-s); color: var(--text); font-size: 15px; font-weight: 600; background: none; }
#nav a:hover { color: var(--accent); background: none; } #nav a.active { color: var(--accent); background: none; }
.nav-account { display: none; }
.topbar__actions { display: flex; align-items: center; gap: var(--space-2); }
.theme-button { margin-left: auto; }
.topbar__actions .round-button { box-shadow: none; }
.account-menu { position: relative; } .account-menu summary { list-style: none; cursor: pointer; border-radius: 50%; } .account-menu summary::-webkit-details-marker { display: none; }
.account-menu__list { position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px; display: grid; padding: var(--space-2); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 32px rgb(20 16 30 / 16%); z-index: 30; }
.account-menu__list a { display: flex; align-items: center; min-height: 44px; padding: 0 var(--space-3); border-radius: var(--radius-xs); color: var(--text); font-weight: 500; }
.account-menu__list a:hover, .account-menu__list a.active { background: var(--muted-bg); }
.cabinet-nav { background: var(--card); border-bottom: 1px solid var(--line); }
.cabinet-nav__inner { display: flex; gap: var(--space-1); max-width: 1200px; margin-inline: auto; padding-inline: var(--space-4); overflow-x: auto; scrollbar-width: none; }
.cabinet-nav a { flex: none; display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--space-3); border-bottom: 2px solid transparent; color: var(--muted); font-size: 15px; font-weight: 600; }
.cabinet-nav a.active { color: var(--accent); border-color: var(--accent); }
/* The tabs that don't fit fade at the edge instead of being cut through a word. */
@media (max-width: 1023px) { .cabinet-nav__inner { padding-right: var(--space-10); -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); } }
.home-hero { padding: clamp(40px, 7vw, 88px) 0; background: linear-gradient(180deg, var(--accent-soft), var(--bg)); }
.home-hero h1 { max-width: 760px; margin: 6px 0 var(--space-3); font-size: clamp(32px, 5vw, 54px); line-height: 1.08; letter-spacing: -.025em; }
.home-hero__eyebrow { margin: 0; color: var(--accent); font-weight: 700; }
.home-hero__lead { max-width: 600px; margin: 0 0 var(--space-6); color: var(--muted); font-size: clamp(17px, 2vw, 20px); }
.hero-form { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: var(--space-2); max-width: 820px; padding: var(--space-2); background: var(--card); border-radius: var(--radius); box-shadow: 0 16px 40px rgb(20 16 30 / 12%); }
.hero-form__field { display: flex; align-items: center; gap: var(--space-2); padding-inline: var(--space-3); color: var(--muted); }
.hero-form__field + .hero-form__field { border-left: 1px solid var(--line); }
.hero-form input, .hero-form select { flex: 1; width: 100%; min-height: 48px; border: 0; background: none; outline: none; color: var(--text); font-size: 16px; }
.home-hero__popular { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-4); color: var(--muted); font-size: 14px; }
.link-chip { min-height: 36px; padding: 0 var(--space-3); border: 1px solid var(--line-strong); border-radius: 999px; background: var(--card); cursor: pointer; font-size: 14px; }
.home-section { margin-top: clamp(40px, 6vw, 72px); } .home-section h2 { margin: 0 0 var(--space-4); font-size: clamp(22px, 3vw, 30px); letter-spacing: -.01em; }
.home-section .row.between h2 { margin: 0; } .home-section .grid { margin-top: var(--space-4); }
.tiles-grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.topic { display: grid; gap: 2px; min-height: 84px; padding: var(--space-4); text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: border-color var(--fast) var(--ease); }
.topic:hover { border-color: var(--accent); }
.steps { display: grid; gap: var(--space-4); grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { display: grid; gap: var(--space-1); counter-increment: step; color: var(--muted); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: var(--space-2); border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.steps strong { color: var(--text); font-size: 18px; }
.business-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); padding: clamp(24px, 4vw, 40px); border-radius: var(--radius-l); background: var(--accent-fill); color: #fff; }
.business-band h2 { margin: 0 0 var(--space-1); } .business-band p { margin: 0; opacity: .92; }
.business-band .button { background: #fff; color: #a61e4d; }
.feature-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.feature { display: grid; gap: var(--space-2); padding: var(--space-5); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); }
.feature .icon { color: var(--accent); } .feature strong { color: var(--text); font-size: 17px; }
.catalog { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--space-6); align-items: start; margin-top: var(--space-5); }
.catalog__filters { position: sticky; top: 84px; max-height: calc(100dvh - 100px); overflow-y: auto; }
.catalog__filters h2 { margin: var(--space-5) 0 var(--space-2); font-size: 15px; } .catalog__filters .form-field { margin-top: 0; }
.catalog__filters .chips { flex-wrap: wrap; overflow: visible; }
.catalog__results .grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.book-card, .booking-summary { top: 84px; }
.chat { height: calc(100dvh - 160px); }
.site-footer { margin-top: auto; padding: var(--space-6) 0; background: var(--card); border-top: 1px solid var(--line); }
.site-footer__grid { display: grid; gap: var(--space-5); grid-template-columns: 1.4fr repeat(3, 1fr); }
.site-footer__grid > div { display: grid; align-content: start; gap: var(--space-2); }
.site-footer__grid a:not(.brand) { color: var(--muted); font-size: 15px; } .site-footer__grid a:not(.brand):hover { color: var(--accent); }
.site-footer__legal { margin-top: var(--space-5); }
@media (max-width: 899px) {
  .topbar__inner { gap: var(--space-2); min-height: 60px; }
  .topbar__actions .round-button, .account-menu { display: none; }
  #nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: var(--space-2) var(--space-4) var(--space-4); }
  body.menu-open #nav { display: flex; }
  .nav-account { display: grid; margin-top: var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--line); }
  .topbar__actions .button { display: none; } .menu-button { margin-left: 0; }
  .hero-form { grid-template-columns: 1fr; } .hero-form__field + .hero-form__field { border-left: 0; border-top: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr; }
  .catalog { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
  .catalog__filters { position: static; max-height: none; overflow: visible; }
  .catalog__filters h2 { display: none; } .catalog__filters .chips { flex-wrap: nowrap; overflow-x: auto; margin-bottom: var(--space-2); }
  .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__grid > :first-child { grid-column: 1 / -1; }
  .book-card, .booking-summary { top: auto; }
}
.step { scroll-margin-top: 84px; } #submit { scroll-margin-bottom: 16px; }

.chat-tabs { display: inline-flex; margin-bottom: var(--space-4); }
.segmented a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-4); border-radius: 999px; color: var(--text); font-weight: 600; }
.segmented a[aria-current="page"] { background: var(--card); box-shadow: 0 1px 3px rgb(30 34 32 / 18%); }
.chat--team { height: calc(100dvh - 260px); min-height: 360px; } .bubble b { font-size: 12px; color: var(--accent); }
.bubble.mine { background: var(--accent-fill); }
.week-nav { margin: var(--space-3) 0; } .flip svg { transform: scaleX(-1); }
.week { display: grid; grid-template-columns: repeat(7, minmax(132px, 1fr)); gap: var(--space-2); overflow-x: auto; padding-bottom: var(--space-2); }
.week__day { display: grid; align-content: start; gap: 6px; min-height: 220px; padding: var(--space-2); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-s); }
.week__day.is-today { border-color: var(--accent); }
.week__head { display: flex; align-items: baseline; gap: 6px; min-height: 36px; padding: 0 4px; border: 0; background: none; cursor: pointer; color: var(--text); }
.week__head small { color: var(--muted); text-transform: capitalize; }
.week__item { display: grid; gap: 1px; width: 100%; min-width: 0; padding: 6px 8px; text-align: left; font-size: 13px; line-height: 1.3; border: 0; border-left: 3px solid var(--accent); border-radius: var(--radius-xs); background: var(--muted-bg); color: var(--text); cursor: pointer; }
.week__item.pendingApproval { border-left-color: var(--warning); } .week__item.completed, .week__item.noShow { opacity: .65; }
.week__empty { padding: 4px; font-size: 12px; }

/* Calm surface: quiet chips, soft shadows, less weight. */
body { line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-weight: 650; }
.home-hero { background: var(--bg); border-bottom: 1px solid var(--line); }
.chip { border-color: var(--line); background: var(--card); font-weight: 500; }
.button { border-radius: var(--radius-s); font-weight: 600; }
.card, .place, .topic, .feature { box-shadow: none; }
.place:hover { box-shadow: var(--shadow); }
.searchbar, .hero-form { box-shadow: 0 4px 14px rgb(22 20 31 / 6%); }
.business-band { background: var(--accent-soft); color: var(--text); }
.business-band .button { background: var(--accent-fill); color: #fff; }

/* Nothing squeezes on a narrow screen: a row's text keeps a readable width, and what doesn't fit
   goes to the next line instead of over its neighbor. */
.row.wrap > .grow { flex-basis: min(220px, 100%); }
.row.between { flex-wrap: wrap; }
.segmented { max-width: 100%; }
input[type="file"] { max-width: 100%; }
h1, h2, h3, strong { overflow-wrap: break-word; }
@media (max-width: 400px) {
  .book-card { gap: var(--space-2); padding: var(--space-3); }
  .book-card__main { padding-inline: var(--space-3); } .book-card__main .icon { display: none; }
}
@media (max-width: 600px) {
  .row:has(> .contact) { flex-wrap: wrap; } .row:has(> .contact) > .grow { flex-basis: calc(100% - 60px); }
  .contact { width: 100%; } .contact .button { flex: 1 1 0; }
  .booking > .row:first-child { flex-wrap: wrap; row-gap: 6px; } .booking > .row:first-child > .grow { flex: 1 1 calc(100% - 60px); } .booking > .row:first-child > .badge { margin-left: 56px; }
}
@media (max-width: 480px) {
  form.search { flex-wrap: wrap; } form.search > .field, form.search > input, form.search > select { flex: 1 1 100%; min-width: 0; } form.search > .button { flex: 1 1 100%; }
}

/* Free windows: the whole place first, then each master. */
.free__card { display: grid; gap: 0; padding: 0; overflow: hidden; }
.free__row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-3); align-items: center; padding: var(--space-3) var(--space-4); }
.free__row + .free__row { border-top: 1px solid var(--line); }
.free__row--all { background: var(--accent-soft); }
.free__who { display: grid; gap: 2px; min-width: 0; } .free__who .faint { font-size: 13px; }
.free__list { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.free-chip { display: inline-grid; justify-items: start; align-content: center; min-height: 44px; padding: 6px 12px; border: 1px solid color-mix(in srgb, var(--success) 45%, var(--line)); border-radius: var(--radius-s); background: color-mix(in srgb, var(--success) 9%, var(--card)); color: var(--text); font-size: 14px; }
.free-chip:hover { border-color: var(--success); } .free-chip small { color: var(--muted); font-size: 12px; }
@media (max-width: 720px) { .free__row { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); } }

/* The day's board: a time rail and a column per master, scrolling sideways on narrow screens. */
.board { position: relative; display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(150px, 1fr)); overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.board__corner, .board__times { position: sticky; left: 0; z-index: 2; background: var(--card); }
.board__corner { border-bottom: 1px solid var(--line); }
.board__head { display: grid; gap: 1px; min-width: 0; padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); } .board__head .faint { font-size: 13px; }
.board__times { position: sticky; } .board__times span { position: absolute; right: 8px; transform: translateY(-50%); color: var(--muted); font-size: 12px; } .board__times span:first-child { transform: none; }
.board__col { position: relative; border-left: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px var(--hour)); }
.board__break { position: absolute; left: 0; right: 0; display: grid; place-items: center; background: repeating-linear-gradient(135deg, var(--muted-bg) 0 6px, transparent 6px 12px); color: var(--muted); font-size: 12px; }
.board__free { position: absolute; left: 2px; right: 2px; display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; gap: 0 8px; padding: 3px 8px; overflow: hidden; border: 1px dashed color-mix(in srgb, var(--success) 55%, var(--line)); border-radius: var(--radius-xs); background: color-mix(in srgb, var(--success) 7%, transparent); color: var(--success); font-size: 13px; font-weight: 600; }
.board__free span { display: inline-flex; align-items: center; gap: 4px; } .board__free small { color: var(--muted); font-weight: 500; }
.board__free:hover { background: color-mix(in srgb, var(--success) 15%, transparent); }
.board__visit { position: absolute; z-index: 1; display: grid; align-content: start; gap: 0; min-width: 0; padding: 3px 8px; overflow: hidden; border: 0; border-left: 3px solid var(--accent); border-radius: var(--radius-xs); background: var(--accent-soft); color: var(--text); font: inherit; font-size: 13px; line-height: 1.3; text-align: left; cursor: pointer; }
.board__visit.pendingApproval { border-left-color: var(--warning); background: color-mix(in srgb, var(--warning) 14%, var(--card)); }
.board__visit.inProgress { border-left-color: var(--success); background: color-mix(in srgb, var(--success) 14%, var(--card)); }
.board__visit.is-over { opacity: .6; }
.board__now { position: absolute; left: 0; right: 0; z-index: 2; height: 2px; background: var(--danger); pointer-events: none; }
.week__free { display: grid; gap: 1px; width: 100%; margin-top: auto; padding: 6px 8px; border: 1px dashed color-mix(in srgb, var(--success) 55%, var(--line)); border-radius: var(--radius-xs); background: color-mix(in srgb, var(--success) 7%, transparent); color: var(--success); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.week__free small { color: var(--muted); font-size: 12px; } .week__free.is-closed { border-style: solid; border-color: var(--line); background: none; color: var(--muted); cursor: default; }
.is-found { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--radius-xs); }
.chip small { font-weight: 500; opacity: .75; }

/* Schedule desk: the date and tools on one bar, the board right under them, windows at its side. */
.desk-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.desk-date { display: flex; align-items: center; gap: var(--space-2); min-width: 0; position: relative; }
.desk-date h1 { margin: 0 var(--space-1); font-size: 24px; }
.desk-date__input { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.desk-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.desk-tools .field { width: auto; }
.desk-filter { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); margin: var(--space-3) 0; }
.desk-filter .chips { margin: 0; min-width: 0; }
.desk-sum { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin: 0; color: var(--muted); font-size: 14px; } .desk-sum b { color: var(--text); }
.desk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space-4); align-items: start; }
.desk-layout.is-week { grid-template-columns: minmax(0, 1fr); }
.desk-main { min-width: 0; }
.desk-side { display: grid; gap: var(--space-4); min-width: 0; position: sticky; top: 84px; max-height: calc(100dvh - 100px); overflow-y: auto; }
.desk-side h2 { margin: 0 0 var(--space-2); font-size: 18px; }
.desk-side .free__row { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
.free > summary, .desk-team > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 44px; list-style: none; cursor: pointer; }
.free > summary::-webkit-details-marker, .desk-team > summary::-webkit-details-marker { display: none; }
.free > summary h2, .desk-team > summary h2 { margin: 0; }
.desk-team { margin-top: var(--space-5); }
.board-skeleton { height: 420px; border-radius: var(--radius); }
.board { max-height: calc(100dvh - 120px); overflow: auto; align-items: start; }
.board__corner, .board__head { position: sticky; top: 0; background: var(--card); }
.board__corner { left: 0; z-index: 5; } .board__head { z-index: 4; } .board__times { z-index: 3; }
.board__visit.can-move { cursor: grab; touch-action: pan-y; }
.board__visit.is-late { border-left-color: var(--danger); }
.board__visit.is-dragging { z-index: 6; cursor: grabbing; box-shadow: 0 8px 20px rgb(22 20 31 / 25%); opacity: .95; }
.board__visit.is-dragging::after { content: attr(data-hint); position: absolute; right: 6px; top: 3px; padding: 0 6px; border-radius: 6px; background: var(--accent-fill); color: #fff; font-size: 12px; }
.board__free[data-hint]::after { content: attr(data-hint); position: absolute; left: 6px; top: var(--hint-y, 0); transform: translateY(-50%); padding: 2px 8px; border-radius: 6px; background: var(--success); color: var(--card); font-size: 12px; white-space: nowrap; pointer-events: none; }
.dialog.visit { width: min(460px, calc(100vw - 32px)); max-width: none; }
.visit__head { margin-bottom: var(--space-3); align-items: flex-start; } .visit__head .round-button { box-shadow: none; }
.visit__status { gap: var(--space-2); margin-bottom: var(--space-2); }
.visit__facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-1) var(--space-4); margin: var(--space-3) 0; }
.visit__facts dt { color: var(--muted); } .visit__facts dd { margin: 0; font-weight: 600; }
.visit__links .button { flex: 1 1 0; } .visit__actions { margin-top: var(--space-3); gap: var(--space-2); } .visit__actions .button:not(.plain) { flex: 1 1 0; }
.visit__move { margin-top: var(--space-3); padding-top: var(--space-2); border-top: 1px solid var(--line); } .visit__move summary { min-height: 44px; display: flex; align-items: center; color: var(--accent); font-weight: 600; cursor: pointer; }
@media (max-width: 1099px) {
  .desk-layout { grid-template-columns: minmax(0, 1fr); }
  .desk-side { order: -1; position: static; max-height: none; overflow: visible; }
}
@media (max-width: 600px) {
  .desk-date h1 { font-size: 20px; } .desk-tools { width: 100%; } .desk-tools .segmented { flex: 1 1 100%; } .desk-tools .segmented button { flex: 1 1 0; justify-content: center; }
  .desk-tools .button { flex: 1 1 100%; } .desk-tools .field { flex: 1 1 100%; width: 100%; }
  .board { max-height: calc(100dvh - 90px); }
}
.page-desk main { max-width: 1600px; }
.page-desk .days { scrollbar-width: none; } .page-desk .days::-webkit-scrollbar { display: none; }
.page-desk .day { min-width: 52px; padding: 5px 6px; }

/* Reports: one measure, so a single color and no legend; the bar's value shows on hover. */
.report-head h1 { margin: 0; } .report-head { margin: 0 0 var(--space-4); }
.report-main { display: grid; gap: var(--space-2); padding: var(--space-5); margin-bottom: var(--space-4); }
.report-total { flex-wrap: wrap; align-items: baseline; } .report-total strong { font-size: 32px; }
.report-change { font-size: 14px; font-weight: 600; } .report-change.is-up { color: var(--success); } .report-change.is-down { color: var(--danger); }
.report-empty { display: grid; place-items: center; min-height: 120px; margin: 0; border-radius: var(--radius-s); background: var(--muted-bg); color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 160px; margin-top: var(--space-2); border-bottom: 1px solid var(--line); }
.bars__item { position: relative; flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; }
.bars__item i { display: block; width: 100%; max-width: 40px; margin-inline: auto; border-radius: 4px 4px 0 0; background: var(--accent-fill); }
.bars__item:hover i { filter: brightness(1.15); }
.bars__item:hover::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 4px); z-index: 4; transform: translateX(-50%); padding: 4px 8px; border-radius: 6px; background: var(--text); color: var(--bg); font-size: 12px; white-space: nowrap; pointer-events: none; }
.bars__item:first-child:hover::after, .bars__item:nth-child(2):hover::after { left: 0; transform: none; }
.bars__item:last-child:hover::after, .bars__item:nth-last-child(2):hover::after { left: auto; right: 0; transform: none; }
.bars__axis { display: flex; justify-content: space-between; font-size: 12px; }
.report-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-4); align-items: start; }
.meter { height: 6px; margin: var(--space-1) 0; border-radius: 3px; background: var(--muted-bg); overflow: hidden; } .meter i { display: block; height: 100%; border-radius: 3px; background: var(--accent-fill); }

/* Clients. */
.client-sort { margin-top: var(--space-3); }
.client-row { width: 100%; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.client-row:hover { background: var(--muted-bg); }
.client-row__sum { display: grid; justify-items: end; flex: none; font-size: 14px; }
.client-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: var(--space-3) 0; } .client-stats .stat { min-width: 0; }
.client-history { margin: var(--space-4) 0 var(--space-2); font-size: 16px; }
.client-visits { display: grid; gap: var(--space-2); max-height: 260px; overflow-y: auto; }
.payroll-month { margin-bottom: var(--space-4); } .payroll-month strong { min-width: 150px; text-align: center; } .payroll-month strong::first-letter { text-transform: uppercase; } .round-button:disabled { opacity: .4; cursor: default; }

/* Ways in. */
.login-or { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-4) 0; color: var(--muted); font-size: 14px; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
#loginForm > .button + .button, #loginForm > .button + .login-google { margin-top: var(--space-2); }
.login-apple { background: var(--text); color: var(--bg); }
.login-google { display: flex; justify-content: center; min-height: 44px; }
.telegram-open { margin-bottom: var(--space-3); }
.connect .button { margin-top: var(--space-2); }
