/* studio-bookings: the one stylesheet for every page (booking, manage, signup, owner sign-in and dashboard).
   Light and dark follow the visitor's system setting. Neutral on purpose: many studios share these pages.
   Sections: 1 tokens · 2 base · 3 controls · 4 shared pieces · 5 public pages · 6 owner dashboard · 7 small screens */

/* ---- 1. tokens ------------------------------------------------------------------------------------ */
:root {
  color-scheme: light;
  --bg: #f6f6f7; --surface: #ffffff; --surface-2: #f2f2f4; --text: #111113; --muted: #62626b;
  --line: #e3e3e7; --line-strong: #c9c9d1;
  --accent: #4f46e5; --on-accent: #ffffff; --accent-hover: #4338ca; --focus: #4f46e5;
  --accent-text: #4338ca; --accent-bg: #eef0ff; --accent-line: #c5c9f7; --accent-glow: rgba(79, 70, 229, 0.10);
  --green: #137a3f; --green-bg: #e7f6ed; --green-line: #b6e2c6;
  --red: #b42318; --red-bg: #fdeceb; --red-line: #f4c2bd;
  --amber: #8a5300; --amber-bg: #fff4d9; --amber-line: #f0d595;
  --blue: #1f4fbf; --blue-bg: #e8effd; --blue-line: #bccbf3;
  --shadow: 0 1px 2px rgba(17, 17, 19, 0.04), 0 8px 24px -12px rgba(17, 17, 19, 0.12);
  --radius: 12px; --radius-sm: 8px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #09090b; --surface: #111113; --surface-2: #18181b; --text: #ededef; --muted: #9b9ba4;
    --line: #25252a; --line-strong: #3a3a41;
    --accent: #818cf8; --on-accent: #0b0b1f; --accent-hover: #a5b4fc; --focus: #a5b4fc;
    --accent-text: #a5b4fc; --accent-bg: rgba(129, 140, 248, 0.14); --accent-line: rgba(129, 140, 248, 0.36); --accent-glow: rgba(129, 140, 248, 0.16);
    --green: #4fdc95; --green-bg: rgba(62, 207, 142, 0.12); --green-line: rgba(62, 207, 142, 0.3);
    --red: #ff8b7e; --red-bg: rgba(229, 96, 79, 0.13); --red-line: rgba(229, 96, 79, 0.34);
    --amber: #f3c35b; --amber-bg: rgba(240, 176, 67, 0.12); --amber-line: rgba(240, 176, 67, 0.3);
    --blue: #8fbcff; --blue-bg: rgba(110, 168, 254, 0.12); --blue-line: rgba(110, 168, 254, 0.3);
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09090b; --surface: #111113; --surface-2: #18181b; --text: #ededef; --muted: #9b9ba4;
  --line: #25252a; --line-strong: #3a3a41;
  --accent: #818cf8; --on-accent: #0b0b1f; --accent-hover: #a5b4fc; --focus: #a5b4fc;
  --accent-text: #a5b4fc; --accent-bg: rgba(129, 140, 248, 0.14); --accent-line: rgba(129, 140, 248, 0.36); --accent-glow: rgba(129, 140, 248, 0.16);
  --green: #4fdc95; --green-bg: rgba(62, 207, 142, 0.12); --green-line: rgba(62, 207, 142, 0.3);
  --red: #ff8b7e; --red-bg: rgba(229, 96, 79, 0.13); --red-line: rgba(229, 96, 79, 0.34);
  --amber: #f3c35b; --amber-bg: rgba(240, 176, 67, 0.12); --amber-line: rgba(240, 176, 67, 0.3);
  --blue: #8fbcff; --blue-bg: rgba(110, 168, 254, 0.12); --blue-line: rgba(110, 168, 254, 0.3);
  --shadow: none;
}

/* the light / dark switch, fixed in the corner of every page */
.theme-toggle { position: fixed; right: 14px; bottom: 14px; z-index: 40; width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: 50%; box-shadow: var(--shadow); }
.theme-toggle .icon { width: 18px; height: 18px; }

/* ---- 2. base -------------------------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: radial-gradient(70rem 26rem at 50% -8rem, var(--accent-glow), transparent 70%) no-repeat, var(--bg); color: var(--text); min-height: 100vh; min-height: 100dvh;
  font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.05rem; }
p { margin: 0.5rem 0 0; }
a { color: inherit; text-underline-offset: 3px; }
.public a:not(.opt):not(.primary), .auth a:not(.opt):not(.primary) { color: var(--accent-text); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { flex: none; vertical-align: -0.2em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---- 3. controls ---------------------------------------------------------------------------------- */
label { display: block; margin-top: 1rem; font-size: 0.86rem; font-weight: 500; color: var(--text); }
label + .muted { font-size: 0.82rem; margin-top: 0.15rem; }
input, select {
  display: block; width: 100%; min-height: 42px; margin-top: 0.35rem; padding: 0.5rem 0.75rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
  font: inherit; font-size: 0.95rem;
}
input::placeholder { color: var(--muted); opacity: 0.8; }
input:hover, select:hover { border-color: var(--muted); }
input:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
input[type="time"] { width: auto; min-width: 7.5rem; margin-top: 0; }

button, a.opt, a.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; min-height: 40px; padding: 0.45rem 0.95rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
  font: inherit; font-size: 0.9rem; font-weight: 500; line-height: 1.3; text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color 0.12s, border-color 0.12s;
}
button:hover, a.opt:hover { background: var(--accent-bg); border-color: var(--accent-line); color: var(--accent-text); }
button.primary, a.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; box-shadow: 0 1px 2px rgba(79, 70, 229, 0.25); }
button.primary:hover, a.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
button:disabled, button[aria-disabled="true"] { opacity: 0.55; cursor: progress; }
button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
button[aria-pressed="true"]:hover { background: var(--accent-hover); color: var(--on-accent); }
button.opt small { display: block; color: inherit; opacity: 0.78; font-size: 0.8rem; font-weight: 400; }
@media (pointer: coarse) { button, a.opt, a.primary, input, select { min-height: 44px; } }

.row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.notice, .error {
  margin: 0.9rem 0 0; padding: 0.6rem 0.8rem; border: 1px solid var(--amber-line); border-radius: var(--radius-sm);
  background: var(--amber-bg); color: var(--amber); font-size: 0.88rem;
}
.error { border-color: var(--red-line); background: var(--red-bg); color: var(--red); font-weight: 500; }
.notice:focus, .error:focus { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---- 4. shared pieces ----------------------------------------------------------------------------- */
.card { margin-top: 1rem; padding: 1.1rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > :first-child { margin-top: 0; }
.avatar { flex: none; display: inline-grid; place-items: center; border-radius: 50%; background: var(--accent-bg); border: 1px solid var(--accent-line); color: var(--accent-text); font-weight: 600; letter-spacing: 0; }
.avatar-sm { width: 28px; height: 28px; font-size: 0.7rem; }
.avatar-md { width: 36px; height: 36px; font-size: 0.8rem; }
.avatar-lg { width: 48px; height: 48px; font-size: 1.05rem; }
.badge { display: inline-flex; align-items: center; gap: 0.3rem; padding: 1px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.74rem; font-weight: 500; line-height: 1.6; white-space: nowrap; color: var(--muted); }
.badge.green { color: var(--green); background: var(--green-bg); border-color: var(--green-line); }
.badge.red { color: var(--red); background: var(--red-bg); border-color: var(--red-line); }
.badge.amber { color: var(--amber); background: var(--amber-bg); border-color: var(--amber-line); }
.badge.blue { color: var(--blue); background: var(--blue-bg); border-color: var(--blue-line); }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.25rem; margin: 0; }
dl.kv dt { color: var(--muted); font-size: 0.86rem; }
dl.kv dd { margin: 0; font-weight: 500; }
.loading { display: flex; align-items: center; gap: 0.6rem; color: var(--muted); padding: 1.5rem 0; }
.loading::before { content: ""; width: 16px; height: 16px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading.center { justify-content: center; }
.cf-turnstile, .turnstile { margin-top: 1rem; min-height: 65px; }

textarea { display: block; width: 100%; min-height: 6rem; margin-top: 0.35rem; padding: 0.55rem 0.75rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: 0.95rem; resize: vertical; }
textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.logo { flex: none; object-fit: cover; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); }
.logo-sm { width: 28px; height: 28px; } .logo-md { width: 36px; height: 36px; } .logo-lg { width: 48px; height: 48px; }

/* ---- 5. public pages (booking, manage, signup, sign-in) ------------------------------------------- */
.public { max-width: 40rem; margin: 0 auto; padding: 0 1rem 4rem; }
.topbar { display: flex; align-items: center; gap: 0.75rem; padding: 1.4rem 0 1.1rem; }
.topbar .name { font-weight: 600; font-size: 0.95rem; line-height: 1.2; }
.topbar .sub { display: block; color: var(--muted); font-size: 0.8rem; font-weight: 400; }
.page-title { margin: 0.4rem 0 0.2rem; font-size: 1.75rem; }
.lede { color: var(--muted); margin: 0.3rem 0 0; }

.step { margin-top: 1.25rem; padding: 1.15rem 1.2rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.step-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.85rem; }
.step-head h2 { font-size: 1rem; }
.step-num { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 0.75rem; font-weight: 600; }
.step form, .step .card { margin: 0; padding: 0; border: 0; box-shadow: none; background: none; }

.choices { display: grid; gap: 0.5rem; }
button.choice { justify-content: space-between; align-items: center; width: 100%; min-height: 56px; padding: 0.65rem 0.95rem; text-align: left; border-radius: 10px; }
button.choice .choice-main { font-weight: 600; font-size: 0.95rem; }
button.choice small { margin-top: 0.1rem; }
.choice-text { display: block; }
.choice-end { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-strong); }
button.choice[aria-pressed="true"] .choice-end { border-color: currentColor; }
button.choice:not([aria-pressed="true"]) .choice-end svg { display: none; }
button.person { gap: 0.7rem; justify-content: flex-start; }
button.person .avatar { background: var(--accent-bg); color: var(--accent-text); }
button.person[aria-pressed="true"] .avatar { background: transparent; border-color: currentColor; color: inherit; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
button.chip { min-width: 4.5rem; min-height: 42px; padding: 0.4rem 0.9rem; border-radius: 999px; font-variant-numeric: tabular-nums; }

.summary { display: flex; gap: 0.8rem; align-items: center; padding: 0.8rem 0.95rem; margin-bottom: 0.2rem; background: var(--accent-bg); border: 1px solid var(--accent-line); border-radius: 10px; }
.summary .icon { color: var(--accent-text); }
.summary strong { display: block; }
.summary .muted { font-size: 0.86rem; }
.public .step button.primary, .public button.primary.block { width: 100%; margin-top: 1.1rem; min-height: 46px; font-size: 0.95rem; }
.public button.primary.block { margin-top: 1rem; }
.top-gap { margin-top: 1rem; }
.empty { display: grid; justify-items: center; gap: 0.35rem; padding: 1.4rem 1rem; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 10px; background: transparent; }
.empty .icon { color: var(--muted); width: 22px; height: 22px; }
.empty strong { color: var(--text); font-weight: 600; font-size: 0.92rem; }
.empty p { margin: 0; font-size: 0.88rem; max-width: 30rem; }

.result { text-align: center; padding: 1.6rem 1.2rem; margin-top: 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.result-mark { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: var(--green); background: var(--green-bg); border: 1px solid var(--green-line); }
.result-mark .icon { width: 26px; height: 26px; }
.result h1 { font-size: 1.4rem; margin-top: 0.9rem; }
.result dl.kv { margin: 1.1rem auto 0; text-align: left; max-width: 22rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.result .lede { max-width: 30rem; margin-left: auto; margin-right: auto; }
.result > .row { justify-content: center; margin-top: 1.1rem; }
.manage-appt { display: grid; gap: 0.15rem; padding: 0.9rem 1rem; margin-top: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.manage-appt strong { font-size: 1.05rem; }
.public h2.group { margin: 1.4rem 0 0.6rem; font-size: 0.95rem; }

/* what the studio says about itself, under the booking page's heading */
.about { margin-top: 1rem; padding: 1rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.about p { margin: 0; white-space: pre-line; }
.about ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.about p + ul { margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px solid var(--line); }
.about li { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--muted); font-size: 0.9rem; min-width: 0; overflow-wrap: anywhere; }
.about li a { color: var(--text); }
.logo-preview { display: flex; align-items: center; gap: 0.7rem; margin-top: 0.6rem; color: var(--muted); font-size: 0.84rem; }

/* landing page at the bare address */
.public.landing { max-width: 56rem; }
.signin-wrap { position: relative; margin-left: auto; }
.signin-panel { position: absolute; right: 0; top: calc(100% + 0.5rem); z-index: 30; width: min(22rem, calc(100vw - 2rem)); margin: 0; box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.35); }
.signin-panel .primary { width: 100%; margin-top: 1rem; }
.hero { padding: 3rem 0 2rem; text-align: center; }
.hero h1 { background: linear-gradient(120deg, var(--text) 30%, var(--accent-text)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-size: clamp(1.9rem, 5vw, 2.8rem); line-height: 1.12; letter-spacing: -0.025em; max-width: 18ch; margin: 0 auto; }
.hero .lede { max-width: 38rem; margin: 1rem auto 0; font-size: 1.05rem; }
.hero-actions { justify-content: center; margin-top: 1.6rem; }
.landing a.primary { min-height: 46px; padding: 0.6rem 1.5rem; font-size: 0.98rem; }
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; margin-top: 1rem; }
.feature { padding: 1.15rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.feature-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; margin-bottom: 0.7rem; border-radius: 10px; background: var(--accent-bg); border: 1px solid var(--accent-line); color: var(--accent-text); }
.feature h3 { font-size: 1rem; }
.feature p { color: var(--muted); font-size: 0.92rem; }
.how { margin-top: 3rem; }
.how h2 { font-size: 1.35rem; text-align: center; }
.how ol { list-style: none; margin: 1.3rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
.how li { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.8rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.how li p { margin: 0.2rem 0 0; font-size: 0.9rem; }

/* sign-up and owner sign-in: one centred card */
.auth { display: grid; place-items: start center; min-height: 100vh; min-height: 100dvh; padding: 2rem 1rem 4rem; }
.auth-inner { width: 100%; max-width: 26rem; }
.auth .topbar { justify-content: center; padding-top: 1rem; }
.auth h1.page-title { text-align: center; font-size: 1.5rem; margin-top: 1rem; }
.auth .lede { text-align: center; }
.auth .card { margin-top: 1.4rem; padding: 1.3rem; }
.auth .card .primary { width: 100%; margin-top: 1.1rem; min-height: 46px; }
.auth > .auth-inner > button.opt, .auth > .auth-inner > a.opt { width: 100%; margin-top: 0.8rem; }
.auth .result { margin-top: 1.4rem; }
.auth .result button, .auth .result a.opt { margin-top: 1rem; }

/* the day picker: a month grid where only open days can be pressed */
.cal { max-width: 22rem; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; }
button.cal-nav { width: 36px; min-width: 0; height: 36px; min-height: 36px; padding: 0; font-size: 1.2rem; border-radius: 50%; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { padding: 0.2rem 0; text-align: center; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
.cal-day { display: grid; place-items: center; aspect-ratio: 1; min-height: 0; padding: 0; border-radius: 10px; font-variant-numeric: tabular-nums; }
span.cal-day.off { color: var(--muted); opacity: 0.45; font-size: 0.9rem; }
button.cal-day { font-weight: 600; background: var(--accent-bg); border-color: var(--accent-line); color: var(--accent-text); }
button.cal-day[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
@media (pointer: coarse) { button.cal-day { min-height: 0; } button.cal-nav { min-height: 40px; width: 40px; } }

/* ---- 6. owner dashboard --------------------------------------------------------------------------- */
.dash { font-size: 14px; }
.dash { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.side { position: sticky; top: 0; align-self: start; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 0.9rem; padding: 1rem 0.8rem; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); }
.side-brand { display: flex; align-items: center; gap: 0.65rem; padding: 0.2rem 0.4rem 0.9rem; border-bottom: 1px solid var(--line); min-width: 0; }
.side-brand .who { min-width: 0; }
.side-brand strong { display: block; font-size: 0.92rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-brand small { color: var(--muted); font-size: 0.76rem; }
.side nav { display: grid; gap: 1rem; }
.nav-group { display: grid; gap: 2px; }
.nav-label { padding: 0 0.6rem 0.25rem; color: var(--accent-text); opacity: 0.8; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; }
.side a.nav, .side button.nav { display: flex; align-items: center; justify-content: flex-start; gap: 0.65rem; width: 100%; min-height: 34px; padding: 0.4rem 0.6rem; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 0.9rem; font-weight: 500; text-align: left; text-decoration: none; }
.side a.nav:hover, .side button.nav:hover { background: var(--accent-bg); color: var(--accent-text); border-color: transparent; }
.side a.nav[aria-current="page"] { background: var(--accent-bg); color: var(--accent-text); box-shadow: inset 2px 0 0 var(--accent); }
.nav .count { margin-left: auto; }
.side-foot { margin-top: auto; display: grid; gap: 2px; padding-top: 0.8rem; border-top: 1px solid var(--line); }

.dash-main { min-width: 0; padding: 1.8rem clamp(1rem, 3.5vw, 2.5rem) 5rem; max-width: 62rem; width: 100%; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.8rem 1rem; margin-bottom: 1.4rem; }
.page-head h1 { font-size: 1.55rem; }
.page-head h1:focus { outline: none; }
.page-head p { margin: 0.2rem 0 0; color: var(--muted); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 0.75rem; margin-bottom: 1.6rem; }
.kpi { position: relative; overflow: hidden; display: grid; gap: 0.15rem; padding: 0.9rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.kpi::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-text)); }
.kpi .label { display: flex; align-items: center; gap: 0.4rem; color: var(--accent-text); font-size: 0.8rem; font-weight: 500; }
.kpi strong { font-size: 1.65rem; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); font-size: 0.78rem; }
.kpi.alert { border-color: var(--amber-line); background: var(--amber-bg); }
.kpi.alert::before { background: var(--amber); }
.kpi.alert .label, .kpi.alert strong { color: var(--amber); }

.section { margin-top: 2rem; scroll-margin-top: 1.2rem; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.65rem; }
.section-head h2 { font-size: 1.02rem; }
.section-head .muted { font-size: 0.84rem; }
.sub-head { margin: 1.4rem 0 0.55rem; display: flex; align-items: center; gap: 0.5rem; scroll-margin-top: 1.2rem; }
.sub-head h3 { font-size: 0.9rem; font-weight: 600; }
.section > .sub-head:first-child { margin-top: 0; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel > .item + .item, .panel > .item + .notice { border-top: 1px solid var(--line); }
.panel + .panel, .panel + .card, .card + .panel { margin-top: 0.75rem; }
.panel .empty { border: 0; border-radius: 0; padding: 1.6rem 1rem; }
.item { display: grid; grid-template-columns: 8.2rem minmax(0, 1fr) auto; gap: 0.35rem 1.1rem; align-items: center; padding: 0.8rem 1rem; }
.item .when strong { display: block; font-weight: 600; font-variant-numeric: tabular-nums; }
.item .when span { color: var(--muted); font-size: 0.84rem; font-variant-numeric: tabular-nums; }
.item .main { min-width: 0; }
.item .main strong { font-weight: 600; }
.item .main .meta { color: var(--muted); font-size: 0.84rem; overflow-wrap: anywhere; }
.item .side-end { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 0.5rem; }
.item .item-note { grid-column: 1 / -1; margin: 0.3rem 0 0; }
.item .item-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.35rem; }
.item.person-item { grid-template-columns: auto minmax(0, 1fr) auto; }
.item.svc-item { grid-template-columns: minmax(0, 1fr) auto; }
.item .item-wide { grid-column: 1 / -1; }
.row.tight { gap: 0.4rem; }
.item.problem { border-left: 3px solid var(--red); }
.item.attention { border-left: 3px solid var(--amber); }
.panel .item .error, .panel .item .notice { grid-column: 1 / -1; margin-top: 0.4rem; }
.item-msg { grid-column: 1 / -1; }
.item-msg .error, .item-msg .notice { margin-top: 0.3rem; }
button.sm { min-height: 32px; padding: 0.25rem 0.7rem; font-size: 0.84rem; }
@media (pointer: coarse) { button.sm { min-height: 40px; } }

.checklist { padding: 1.1rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1.6rem; }
.checklist h2 { font-size: 1.05rem; }
.progress { height: 6px; margin: 0.9rem 0 0.2rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-text)); border-radius: 999px; }
.steps { list-style: none; margin: 0.6rem 0 0; padding: 0; counter-reset: step; }
.steps li { position: relative; padding: 0.85rem 0 0.85rem 2.5rem; border-top: 1px solid var(--line); counter-increment: step; }
.steps li:first-child { border-top: 0; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0.85rem; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-strong); color: var(--muted); font-size: 0.74rem; font-weight: 600; }
.steps li.done::before { content: "✓"; background: var(--green-bg); border-color: var(--green-line); color: var(--green); }
.steps li.done { color: var(--muted); }
.steps li.done strong { color: var(--text); font-weight: 500; }
.steps .why { margin: 0.15rem 0 0; color: var(--muted); }
.steps .row { margin-top: 0.55rem; }

.formcard { padding: 1.1rem 1.2rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 0.75rem; }
.formcard > strong { display: block; font-size: 0.95rem; }
.formcard .hint, .edit-form .hint { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.86rem; }
.formcard .primary { margin-top: 1rem; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.fields .wide { grid-column: 1 / -1; }

.edit-form { margin: 0.8rem 0 0; padding: 0.8rem 0.95rem 0.95rem; min-width: 0; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-2); }
fieldset.hours { margin: 0.8rem 0 0; padding: 0.8rem 0.95rem 0.95rem; min-width: 0; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-2); }
fieldset.hours legend { padding: 0 0.35rem; font-weight: 600; }
fieldset.hours legend:focus { outline: none; }
fieldset.hours > p { margin: 0 0 0.3rem; }
.day { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.35rem 0.8rem; align-items: start; padding: 0.55rem 0; border-top: 1px solid var(--line); }
.day:first-of-type { border-top: 0; }
.day > strong { padding-top: 0.45rem; font-weight: 600; }
.day .ranges { display: grid; gap: 0.4rem; }
.range { align-items: center; }
.range .muted { padding: 0 0.1rem; }
.hours-actions { margin-top: 0.9rem; }
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; align-items: start; }
.account-grid .formcard { margin-top: 0; }
.money-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }

/* ---- 7. small screens ----------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; align-items: center; gap: 0.5rem; padding: 0.55rem 0.8rem; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .side-brand { padding: 0; border: 0; flex: none; max-width: 38%; }
  .side-brand small { display: none; }
  .side nav { display: flex; flex: 1; min-width: 0; gap: 0.25rem; overflow-x: auto; scrollbar-width: none; padding: 2px; -webkit-overflow-scrolling: touch; }
  .side nav::-webkit-scrollbar { display: none; }
  .side nav { -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); padding-right: 1.2rem; }
  .nav-group { display: flex; gap: 0.25rem; }
  .nav-label { display: none; }
  .side a.nav, .side button.nav { width: auto; flex: none; white-space: nowrap; padding: 0.4rem 0.7rem; }
  .side a.nav .icon, .side button.nav .icon { display: none; }
  .side-foot { margin: 0; padding: 0; border: 0; flex: none; }
  .side .side-foot a.nav.nav-extra { display: none; }
  .section { scroll-margin-top: 4.6rem; }
  .dash-main { padding-top: 1.2rem; }
}
@media (max-width: 640px) {
  .hero { padding: 2rem 0 1.4rem; }
  .features, .how ol { grid-template-columns: minmax(0, 1fr); }
  .hero-actions a.primary { width: 100%; }
  body { font-size: 15px; }
  input, select { font-size: 16px; }
  h1 { font-size: 1.4rem; }
  .page-title { font-size: 1.5rem; }
  .step { padding: 1rem; }
  .item { grid-template-columns: minmax(0, 1fr); }
  .item .when { display: flex; gap: 0.5rem; align-items: baseline; }
  .item .when strong { display: inline; }
  .item .side-end { justify-content: flex-start; }
  .item.person-item { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .item.person-item .side-end, .item.svc-item .side-end { grid-column: 1 / -1; justify-content: flex-start; }
  .item.svc-item { grid-template-columns: minmax(0, 1fr); }
  .side-brand .who { display: none; }
  .fields, .account-grid, .money-grid { grid-template-columns: minmax(0, 1fr); }
  .day { grid-template-columns: minmax(0, 1fr); }
  .day > strong { padding-top: 0; }
  fieldset.hours { padding: 0.65rem 0.75rem 0.85rem; }
  .range { flex-wrap: nowrap; gap: 0.35rem; }
  .range input[type="time"] { flex: 1 1 0; min-width: 0; padding-left: 0.45rem; padding-right: 0.35rem; }
  .range button { flex: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi strong { font-size: 1.45rem; }
  .side-brand { max-width: 34%; }
}
.signin-panel [role="status"] .opt { margin-top: 0.8rem; }
