/* The booking pages: the customer's page and the salon's own pages. Our own CSS, no library. Calm and premium:
   a quiet tinted page, white cards with a soft lift, one accent (the salon's colour, --accent), a serif for the
   salon's name and big titles, a clean sans for everything you read and click. Light and dark. */

@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 100 1000; font-display: swap; src: url(fonts/dm-sans-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 100 1000; font-display: swap; src: url(fonts/dm-sans-latin-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/instrument-serif-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/instrument-serif-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  --accent: #2f5d62;
  --accent-text: var(--accent);
  --on-accent: #fff;
  --page: oklch(0.966 0.007 205);
  --surface: #fff;
  --surface-2: oklch(0.983 0.004 205);
  --ink: oklch(0.25 0.02 230);
  --muted: oklch(0.47 0.015 230);
  --line: oklch(0.9 0.008 215);
  --line-strong: oklch(0.82 0.01 215);
  --soft: color-mix(in oklch, var(--accent) 9%, var(--surface));
  --soft-2: color-mix(in oklch, var(--accent) 16%, var(--surface));
  --hatch: color-mix(in oklch, var(--ink) 8%, transparent);
  --danger: oklch(0.5 0.15 25);
  --warn: oklch(0.55 0.11 70);
  --shadow: 0 1px 2px oklch(0.3 0.02 230 / 0.05), 0 10px 30px -14px oklch(0.3 0.03 230 / 0.18);
  --shadow-lg: 0 2px 6px oklch(0.3 0.02 230 / 0.06), 0 30px 60px -20px oklch(0.25 0.03 230 / 0.3);
  --r: 16px; --r-sm: 11px;
  --f-ui: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  --f-display: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --gutter: clamp(16px, 4vw, 32px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --accent-text: color-mix(in oklch, var(--accent) 45%, white);
    --page: oklch(0.18 0.012 225); --surface: oklch(0.225 0.013 225); --surface-2: oklch(0.205 0.012 225);
    --ink: oklch(0.94 0.006 220); --muted: oklch(0.74 0.012 220); --line: oklch(0.32 0.013 225); --line-strong: oklch(0.42 0.014 225);
    --soft: color-mix(in oklch, var(--accent) 22%, var(--surface)); --soft-2: color-mix(in oklch, var(--accent) 34%, var(--surface));
    --hatch: oklch(1 0 0 / 0.04); --danger: oklch(0.72 0.14 25); --warn: oklch(0.8 0.11 75);
    --shadow: 0 1px 2px oklch(0 0 0 / 0.3), 0 10px 30px -14px oklch(0 0 0 / 0.5); --shadow-lg: 0 30px 60px -20px oklch(0 0 0 / 0.6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --accent-text: color-mix(in oklch, var(--accent) 45%, white);
  --page: oklch(0.18 0.012 225); --surface: oklch(0.225 0.013 225); --surface-2: oklch(0.205 0.012 225);
  --ink: oklch(0.94 0.006 220); --muted: oklch(0.74 0.012 220); --line: oklch(0.32 0.013 225); --line-strong: oklch(0.42 0.014 225);
  --soft: color-mix(in oklch, var(--accent) 22%, var(--surface)); --soft-2: color-mix(in oklch, var(--accent) 34%, var(--surface));
  --hatch: oklch(1 0 0 / 0.04); --danger: oklch(0.72 0.14 25); --warn: oklch(0.8 0.11 75);
  --shadow: 0 1px 2px oklch(0 0 0 / 0.3), 0 10px 30px -14px oklch(0 0 0 / 0.5); --shadow-lg: 0 30px 60px -20px oklch(0 0 0 / 0.6);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 16px/1.5 var(--f-ui); font-feature-settings: 'ss01'; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-text); text-underline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; text-align: right; }

/* ---- shared parts ---- */
.brand { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.brand-name { font: 400 30px/1 var(--f-display); letter-spacing: -0.01em; white-space: nowrap; }
.brand-city { color: var(--muted); font-size: 14px; }
.langs { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.lang { border: 0; background: none; border-radius: 999px; padding: 5px 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); min-height: 32px; min-width: 40px; }
.lang[aria-pressed="true"] { background: var(--ink); color: var(--page); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent; font-weight: 600; font-size: 15px; text-decoration: none; transition: background-color .15s, box-shadow .15s, transform .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn-main { background: var(--accent); color: var(--on-accent); box-shadow: 0 1px 0 oklch(1 0 0 / 0.15) inset, 0 6px 16px -8px color-mix(in oklch, var(--accent) 70%, transparent); }
.btn-main:hover { background: color-mix(in oklch, var(--accent) 88%, black); }
.btn-main:disabled { opacity: .55; cursor: default; }
.btn-quiet { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-quiet:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-quiet { background: transparent; color: var(--danger); border-color: color-mix(in oklch, var(--danger) 40%, transparent); }
.btn-wide { width: 100%; }
.btn.is-today { border-color: var(--accent-text); color: var(--accent-text); }
.link { border: 0; background: none; padding: 6px 2px; color: var(--accent-text); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-danger { color: var(--danger); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); flex: none; }
.icon-btn:hover:not(:disabled) { background: var(--surface-2); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.mono { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--soft); color: var(--accent-text); font: 400 22px/1 var(--f-display); flex: none; }
.mono-sm { width: 30px; height: 30px; font-size: 16px; }
.mono-any { color: var(--accent-text); }
.tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.tag-approved { background: var(--soft); color: var(--accent-text); box-shadow: none; }
.tag-asked { background: color-mix(in oklch, var(--warn) 14%, var(--surface)); color: color-mix(in oklch, var(--warn) 70%, var(--ink)); box-shadow: none; }
.tag-declined, .tag-off { background: var(--surface-2); color: var(--muted); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 700; margin-left: 6px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-sm); background: var(--soft); color: var(--ink); font-size: 14.5px; margin: 0 0 16px; }
.notice svg { flex: none; margin-top: 2px; color: var(--accent-text); }
.notice-off { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 22px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-color: transparent !important; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } .btn, .toast { transition: none; } }

/* form */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .langset legend { font-size: 14px; font-weight: 600; }
.opt { font-weight: 400; color: var(--muted); }
.hint { font-size: 13px; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 11px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 16px; }
textarea { resize: vertical; min-height: 72px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 0; border-color: transparent; }
input[type=color] { width: 64px; height: 48px; padding: 4px; border-radius: 11px; border: 1px solid var(--line-strong); background: var(--surface); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.unit { display: flex; align-items: center; gap: 10px; }
.unit input { max-width: 110px; }
.unit span { color: var(--muted); font-size: 14px; }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; min-height: 40px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.checks-col { flex-direction: column; justify-content: end; }
.langset { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.langset legend { padding: 0; margin-bottom: 8px; }
.langrow { display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 10px; }
.langtag { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); justify-self: start; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 8px 14px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--muted); }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 2px solid var(--accent-text); }
.form-error { color: var(--danger); font-weight: 600; font-size: 14.5px; }
.fine { font-size: 13px; color: var(--muted); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---- the customer's page ---- */
.bk { max-width: 1140px; margin: 0 auto; padding: 0 var(--gutter); min-height: 100vh; display: flex; flex-direction: column; }
.bk-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.bk-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; padding: 40px 0 72px; flex: 1; }
.bk-single { grid-template-columns: minmax(0, 580px); justify-content: center; }
.bk-title { font: 400 clamp(36px, 5vw, 52px)/1.05 var(--f-display); letter-spacing: -0.015em; margin: 0 0 24px; }
.bk-side { position: sticky; top: 24px; }
.bk-foot { display: flex; flex-wrap: wrap; gap: 6px 24px; padding: 22px 0 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.bk-foot span:first-child { color: var(--ink); font-weight: 600; }
.bk-fail { max-width: 560px; margin: 80px auto; padding: 0 var(--gutter); font-size: 18px; }

.step { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 12px; transition: box-shadow .2s; }
.step[data-state="later"] { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.step[data-state="later"] .step-head { color: var(--muted); }
.step-head { display: flex; align-items: center; gap: 14px; padding: 18px 22px; min-height: 68px; }
.step-n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 14px; font-weight: 700; flex: none; box-shadow: inset 0 0 0 1.5px var(--line-strong); font-variant-numeric: tabular-nums; }
.step[data-state="open"] .step-n { background: var(--ink); color: var(--page); box-shadow: none; }
.step[data-state="done"] .step-n { background: var(--soft); color: var(--accent-text); box-shadow: none; }
.step-title { flex: 1; min-width: 0; }
.step-title h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.005em; outline: none; }
.step-chosen { color: var(--muted); font-size: 15px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-body { padding: 0 22px 24px 66px; }
.group { font-size: 13.5px; font-weight: 600; color: var(--muted); margin: 6px 0 8px; }
.svc-group + .svc-group { margin-top: 18px; }
.svc-list li + li { border-top: 1px solid var(--line); }
.svc { display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; align-items: start; min-height: 64px; gap: 16px; width: 100%; padding: 14px 12px; margin: 0 -12px; width: calc(100% + 24px); border: 0; background: none; border-radius: 12px; text-align: left; }
.svc:hover, .svc.on { background: var(--soft); }
.svc-text { display: grid; gap: 2px; min-width: 0; }
.svc-name { font-weight: 600; font-size: 16px; }
.svc-about { color: var(--muted); font-size: 14px; }
.svc-meta { display: grid; justify-items: end; gap: 1px; }
.svc-price { font-weight: 600; font-variant-numeric: tabular-nums; }
.svc-dur { color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.chev { color: var(--muted); display: inline-grid; align-self: center; }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.who { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-align: left; min-height: 76px; transition: border-color .15s, background-color .15s; }
.who:hover { border-color: var(--line-strong); background: var(--surface-2); }
.who.on { border-color: var(--accent-text); background: var(--soft); }
.who-text { display: grid; min-width: 0; }
.who-name { font-weight: 600; }
.who-title { color: var(--muted); font-size: 14px; }
.who-any { background: var(--surface-2); }

.days-wrap { display: flex; align-items: center; gap: 8px; margin: 0 -4px; min-width: 0; }
.days { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px; flex: 1; min-width: 0; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.days::-webkit-scrollbar { display: none; }
.day { display: grid; justify-items: center; gap: 1px; width: 62px; padding: 9px 0 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); scroll-snap-align: start; flex: none; min-height: 78px; }
.day:hover:not(:disabled) { border-color: var(--line-strong); }
.day.on { background: var(--ink); color: var(--page); border-color: var(--ink); }
.day:disabled { background: transparent; color: var(--muted); cursor: default; border-style: dashed; opacity: .6; }
.day.skeleton { height: 78px; }
.day-wd { font-size: 12.5px; font-weight: 600; }
.day-n { font-size: 22px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.day-m { font-size: 12px; color: inherit; opacity: .75; }
.day-title { margin: 18px 0 2px; font-weight: 600; }
.slots { min-height: 120px; }
.part { margin-top: 14px; }
.times, .times-loading { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.times-loading { margin-top: 18px; }
.time { width: 100%; min-height: 46px; border-radius: 11px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; transition: background-color .12s, border-color .12s; }
.time:hover { border-color: var(--accent-text); color: var(--accent-text); }
.time.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
span.time { display: block; }
.empty { display: grid; gap: 12px; justify-items: start; padding: 18px 0 4px; color: var(--muted); }

.sum { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 24px; display: grid; gap: 16px; }
.sum-title { font: 400 26px/1.1 var(--f-display); }
.sum-rows { margin: 0; display: grid; gap: 12px; }
.sum-rows > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.sum-rows dt { color: var(--muted); font-size: 14px; }
.sum-rows dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.sum-salon { display: grid; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.sum-salon p { display: flex; gap: 8px; align-items: flex-start; }
.sum-salon svg { flex: none; margin-top: 2px; }

.done { display: grid; gap: 18px; justify-items: stretch; min-width: 0; }
.done > * { min-width: 0; }
.actions-stack .link { margin-left: 4px; }
.done-mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--soft); color: var(--accent-text); justify-self: start; }
.done-title { font: 400 clamp(36px, 6vw, 48px)/1.05 var(--f-display); letter-spacing: -0.015em; outline: none; }
.done-when { font-size: 18px; font-weight: 600; margin-top: -8px; }
.copy-row { display: flex; gap: 8px; }
.copy-link { font-size: 14px !important; color: var(--muted); }
.move { min-width: 0; display: grid; gap: 14px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 22px; }
.move h2 { font-size: 18px; font-weight: 600; }

/* ---- the salon's pages ---- */
.st { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); min-height: 100vh; }
.st-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0 14px; }
.st-me { display: flex; align-items: center; gap: 12px; min-width: 0; }
.st-who { display: grid; line-height: 1.25; }
.st-name { font-weight: 600; font-size: 15px; }
.st-role { color: var(--muted); font-size: 13px; }
.st-tabs { border-bottom: 1px solid var(--line); margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); overflow-x: auto; scrollbar-width: none; scroll-behavior: auto; }
.st-tabs::-webkit-scrollbar { display: none; }
.st-tabs ul { display: flex; gap: 4px; }
.tab { border: 0; background: none; padding: 12px 12px 13px; font-weight: 600; font-size: 15px; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; min-height: 48px; }
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent-text); }
.st-main { padding: 24px 0 64px; }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.view-title { font: 400 34px/1.1 var(--f-display); letter-spacing: -0.01em; margin-bottom: 18px; }
.view-head .view-title { margin-bottom: 0; }
.sub { font-size: 16px; font-weight: 600; margin: 28px 0 10px; }
.cols-2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.cols-2 > .card h2, .cols-2 > form h2 { font-size: 20px; font-weight: 600; }
.more { display: flex; justify-content: center; padding: 18px 0 0; }
.cards { display: grid; gap: 12px; }
.req { display: grid; gap: 16px; }
.req-head { display: flex; gap: 14px; align-items: flex-start; }
.req-who { font-weight: 600; }
.req-when { margin-top: 2px; }
.empty-line { display: flex; gap: 8px; align-items: center; color: var(--muted); padding: 18px 0; }
.rows { display: grid; }
.row { display: flex; align-items: center; gap: 14px; padding: 12px 2px; border-top: 1px solid var(--line); }
.row:last-child { border-bottom: 1px solid var(--line); }
.rows-big .row { padding: 16px 4px; }
.row-main { display: grid; flex: 1; min-width: 0; gap: 1px; }
.row-main > span { font-size: 14.5px; }
.row-price { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
.row-off { opacity: .6; }

/* agenda */
.ag-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 18px; }
.ag-nav, .ag-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ag-date { position: relative; display: inline-flex; align-items: center; margin-left: 8px; cursor: pointer; }
.ag-day { font: 400 30px/1.1 var(--f-display); letter-spacing: -0.01em; }
.ag-date input { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; }
.ag-tools .check { font-size: 14px; color: var(--muted); }
.ag-count { font-size: 14px; margin-right: 6px; }
.ag-grid { --head: 62px; display: grid; grid-template-columns: 52px minmax(0, 1fr); background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.ag-axis-wrap { border-right: 1px solid var(--line); }
.ag-axis { position: relative; }
.ag-hour { position: absolute; right: 8px; transform: translateY(-50%); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ag-hour:first-child { transform: none; }
.ag-cols { position: relative; display: grid; grid-template-columns: repeat(var(--cols), minmax(170px, 1fr)); overflow-x: auto; }
.ag-person + .ag-person { border-left: 1px solid var(--line); }
.ag-head { height: var(--head); display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; align-content: center; row-gap: 0; }
.ag-head-blank { padding: 0; }
.ag-head-name { font-weight: 600; }
.ag-head-hours { color: var(--muted); font-size: 12.5px; flex-basis: 100%; padding-left: 40px; margin-top: -4px; font-variant-numeric: tabular-nums; }
.ag-col { position: relative; background: repeating-linear-gradient(135deg, var(--hatch) 0 6px, transparent 6px 12px), var(--surface-2); }
.ag-work { position: absolute; left: 0; right: 0; background: var(--surface); }
.ag-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); z-index: 1; pointer-events: none; opacity: .7; }
.ag-off { position: absolute; left: 6px; right: 6px; z-index: 2; border-radius: 9px; background: repeating-linear-gradient(135deg, color-mix(in oklch, var(--ink) 7%, transparent) 0 7px, transparent 7px 14px), var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong); display: flex; align-items: flex-start; padding: 8px 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ag-asked { box-shadow: inset 0 0 0 1.5px color-mix(in oklch, var(--warn) 60%, transparent); background: color-mix(in oklch, var(--warn) 8%, var(--surface)); border-style: dashed; }
.ag-b { position: absolute; left: 6px; right: 6px; z-index: 3; display: grid; align-content: start; gap: 0; text-align: left; padding: 6px 10px 6px 12px; border: 0; border-radius: 9px; background: color-mix(in oklch, var(--accent) 13%, var(--surface)); color: var(--ink); overflow: hidden; box-shadow: inset 3px 0 0 var(--accent), inset 0 0 0 1px color-mix(in oklch, var(--accent) 24%, transparent); font-size: 13px; line-height: 1.3; transition: box-shadow .15s, background-color .15s; }
.ag-b::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: var(--tail, 0); }
.ag-b:hover { background: var(--soft-2); box-shadow: inset 3px 0 0 var(--accent), inset 0 0 0 1px color-mix(in oklch, var(--accent) 35%, transparent), var(--shadow); z-index: 4; }
.ag-gap { position: absolute; left: 0; right: 0; z-index: 1; display: flex; align-items: center; padding: 0 12px; font-size: 12px; font-weight: 600; color: var(--muted); overflow: hidden; }
.ag-b-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ag-b-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-b-svc { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-b-short { padding-top: 3px; grid-template-columns: auto auto minmax(0, 1fr); column-gap: 8px; align-items: baseline; }
.ag-b-off { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--line-strong); opacity: .75; }
.ag-b-off .ag-b-name { text-decoration: line-through; }
.ag-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 5; pointer-events: none; }
.ag-now::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }

.ag-list { display: grid; gap: 14px; }
.ag-l-person { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 6px 0; }
.ag-l-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 16px; font-weight: 600; padding: 12px 16px; }
.ag-l-head .ag-head-hours { padding-left: 40px; margin-top: -8px; }
.ag-l-off { margin: 0 16px 8px; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted); background: repeating-linear-gradient(135deg, var(--hatch) 0 6px, transparent 6px 12px), var(--surface-2); }
.ag-l-list li + li .ag-l-b { border-top: 1px solid var(--line); }
.ag-l-b { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 12px 16px; border: 0; background: none; text-align: left; }
.ag-l-b:hover { background: var(--surface-2); }
.ag-l-time { display: grid; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.25; }
.ag-l-time small { color: var(--muted); font-weight: 400; font-size: 13px; }
.ag-l-text { display: grid; min-width: 0; }
.ag-l-empty { padding: 4px 16px 14px; font-size: 14px; }

/* week, team */
.week { display: grid; }
.week.card { padding: 6px 20px; }
.week-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 9px 0; font-variant-numeric: tabular-nums; font-size: 15px; }
.week-row + .week-row { border-top: 1px solid var(--line); }
.week-day { font-weight: 600; text-transform: capitalize; }
.week-off { color: var(--muted); }
.week-off .week-day { font-weight: 500; }
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 18px; }
.member { display: grid; gap: 12px; align-content: start; }
.member-head { display: flex; align-items: center; gap: 12px; }
.member-head > div { flex: 1; min-width: 0; }
.member-name { font-weight: 600; font-size: 17px; }
.member .week-row { grid-template-columns: 96px 1fr; font-size: 14px; padding: 6px 0; }
.member-mail { display: flex; gap: 8px; align-items: center; font-size: 14px; overflow-wrap: anywhere; }
.week-edit { display: grid; }
.we-row { display: grid; grid-template-columns: 104px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.we-slots { display: flex; flex-wrap: wrap; gap: 8px; }
.we-slot { display: inline-flex; align-items: center; gap: 6px; }
.we-slot select { width: auto; min-height: 40px; padding: 6px 8px; }
.we-slot .icon-btn { width: 34px; height: 34px; }

/* customers */
.search { position: relative; max-width: 460px; margin-bottom: 18px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 42px; }
.table-wrap { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table td:last-child { text-align: right; }

/* e-mails */
.mails { display: grid; gap: 10px; }
.mail { background: var(--surface); border-radius: var(--r-sm); box-shadow: var(--shadow); }
.mail summary { display: flex; gap: 14px; align-items: center; padding: 14px 16px; cursor: pointer; list-style: none; }
.mail summary::-webkit-details-marker { display: none; }
.mail-main { display: grid; flex: 1; min-width: 0; gap: 2px; }
.mail-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-main .muted { font-size: 13.5px; }
.mail-body { margin: 0; padding: 16px 18px 20px; border-top: 1px solid var(--line); white-space: pre-wrap; font: 400 14.5px/1.6 var(--f-ui); color: var(--ink); }

/* dialog and notice */
.dlg { border: 0; padding: 0; border-radius: 18px; width: min(540px, calc(100vw - 24px)); max-height: min(88vh, 860px); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
.dlg-wide { width: min(720px, calc(100vw - 24px)); }
.dlg::backdrop { background: oklch(0.2 0.02 230 / 0.42); backdrop-filter: blur(2px); }
.dlg[open] { display: flex; flex-direction: column; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 6px 24px; }
.dlg-head h2 { font: 400 28px/1.15 var(--f-display); }
.dlg-head .icon-btn { border: 0; }
.dlg-body { padding: 10px 24px 20px; overflow-y: auto; display: grid; gap: 16px; }
.dlg-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 14px 24px max(20px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 50; display: flex; align-items: center; gap: 8px; padding: 12px 18px; max-width: calc(100vw - 32px); border-radius: 12px; background: var(--ink); color: var(--page); font-weight: 600; font-size: 14.5px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast[data-kind="err"] { background: var(--danger); color: #fff; }
.toast[data-kind="warn"] { background: var(--warn); color: oklch(0.2 0.02 70); }

/* ---- phones and tablets ---- */
@media (max-width: 960px) {
  .bk-main { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .bk-side { display: none; }
  .bk-single .bk-side, .done .sum { display: grid; }
  .cols-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .brand-name { font-size: 26px; }
  .brand-city { display: none; }
  .bk-top { padding: 16px 0; }
  .bk-main { padding: 26px 0 48px; }
  .bk-title { margin-bottom: 18px; }
  .step-head { padding: 16px; gap: 12px; min-height: 62px; }
  .step-body { padding: 0 16px 20px; }
  .svc { gap: 12px; }
  .chev { display: none; }
  .svc { grid-template-columns: minmax(0, 1fr) auto; }
  .people { grid-template-columns: minmax(0, 1fr); }
  .days-wrap .icon-btn { display: none; }
  .days-wrap { margin: 0 -16px; }
  .move .days-wrap { margin: 0 -22px; }
  .move .days { padding: 4px 22px; }
  .days { padding: 4px 16px; scroll-padding-left: 16px; }
  .times, .times-loading { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .row2, .row3 { grid-template-columns: minmax(0, 1fr); }
  .sum-rows > div { grid-template-columns: 84px minmax(0, 1fr); }
  .st-top { padding: 14px 0 10px; }
  .st-who, .st-me > .mono { display: none; }
  .st-tabs { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .opt-col { display: none !important; }
  .table tr { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; }
  .table td[data-l]::before { display: none; }
  .table td:first-child { grid-column: 1; }
  .table td:last-child { grid-column: 1 / -1; justify-content: flex-start; }
  .actions-stack { flex-direction: column; align-items: stretch; }
  .actions-stack .link { align-self: center; }
  .card .actions .btn, .card .actions .btn-main { flex: 1; }
  .row { flex-wrap: wrap; }
  .row .row-main { flex-basis: calc(100% - 60px); }
  .ag-day { font-size: 24px; }
  .ag-bar { gap: 10px; }
  .ag-tools { width: 100%; justify-content: space-between; }
  .ag-count { display: none; }
  .view-title { font-size: 30px; }
  .week-row { grid-template-columns: 104px 1fr; }
  .we-row { grid-template-columns: 1fr; gap: 6px; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table td { padding: 2px 0; border: 0; text-align: left !important; display: flex; gap: 12px; }
  .table td[data-l]::before { content: attr(data-l); color: var(--muted); min-width: 104px; font-size: 13.5px; }
  .dlg { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .dlg-foot { justify-content: stretch; }
  .dlg-foot .btn { flex: 1; }
  .copy-row { flex-direction: column; }
}

/* flow pass 2026-10-20: hints under the times, the salon's free-time picker, the "More" sheet on phones */
.slots-hint { margin-top: 14px; font-size: 14px; }
.tp { display: grid; gap: 10px; }
.tp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tp-head h3 { font-size: 14px; font-weight: 600; color: var(--muted); }
.tp .times { max-height: 232px; overflow-y: auto; padding: 2px; }
.tp .empty { padding: 4px 0; }
.more-list { display: grid; gap: 8px; }
.more-list .btn { justify-content: flex-start; width: 100%; min-height: 52px; font-size: 16px; }
.ag-col { cursor: pointer; }
@media (max-width: 960px) { .cols-flip > :last-child { order: -1; } }
.mail-main strong { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mail[open] summary .chev { transform: rotate(180deg); }
.sub-sm { font-size: 16px; font-weight: 600; margin-top: 12px; }
.mine-note { margin-top: 12px; }
@media (max-width: 859px) { .st-tabs { overflow-x: visible; } .st-tabs ul { justify-content: space-between; } }

/* one question per screen (2026-10-20) */
.bk-wizard { grid-template-columns: minmax(0, 640px); }
.q { display: grid; gap: 18px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 22px 28px 30px; }
.q-top { display: flex; align-items: center; justify-content: space-between; min-height: 36px; }
.q-back { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 6px 10px 6px 4px; margin-left: -4px; border-radius: 10px; font-weight: 600; color: var(--accent-text); }
.q-back:hover { background: var(--soft); }
.q-count { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.q-bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: -8px; }
.q-bar span { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .3s ease; }
.q-title { font: 400 clamp(32px, 4.6vw, 44px)/1.08 var(--f-display); letter-spacing: -0.01em; outline: none; margin-top: 4px; }
.q-body { display: grid; gap: 14px; }
.q-body .svc-group + .svc-group { margin-top: 10px; }
.picked { display: grid; border-radius: 12px; background: var(--soft); overflow: hidden; }
.picked li + li { border-top: 1px solid color-mix(in oklch, var(--accent) 14%, transparent); }
.picked-row { display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; width: 100%; padding: 11px 14px; border: 0; background: none; text-align: left; }
.picked-row:hover .picked-edit { text-decoration: underline; }
.picked-k { color: var(--muted); font-size: 14px; }
.picked-v { font-weight: 600; overflow-wrap: anywhere; }
.picked-edit { color: var(--accent-text); font-size: 14px; font-weight: 600; }
.filter { display: grid; gap: 8px; }
.filter-k { color: var(--muted); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; font-size: 15px; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--page); }
.who-any .mono-any { background: var(--soft); color: var(--accent-text); }
@media (max-width: 640px) {
  .q { padding: 16px 16px 24px; border-radius: 0; box-shadow: none; background: transparent; margin: 0 -4px; }
  .bk-wizard { padding-top: 12px; }
  .picked-row { grid-template-columns: 72px minmax(0, 1fr) auto; padding: 10px 12px; }
}

/* the agenda, calmer (2026-10-20): solid off-hours, half-hour lines, one colour per treatment group */
.tone-0 { --tone: var(--accent); }
.tone-1 { --tone: oklch(0.66 0.12 65); }
.tone-2 { --tone: oklch(0.62 0.1 155); }
.tone-3 { --tone: oklch(0.62 0.12 15); }
.tone-4 { --tone: oklch(0.58 0.1 295); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--tone); flex: none; }
.ag-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: -4px 0 14px; font-size: 13.5px; color: var(--muted); }
.ag-legend li { display: inline-flex; align-items: center; gap: 7px; }
.ag-people { margin: -4px 0 14px; }
.ag-head { gap: 10px; }
.ag-head-text { display: grid; min-width: 0; }
.ag-head .ag-head-hours { flex-basis: auto; padding-left: 0; margin-top: 0; }
.ag-person-off .ag-head-name { color: var(--muted); }
.ag-col { background: color-mix(in oklch, var(--ink) 6%, var(--surface)); }
.ag-col-off { background: color-mix(in oklch, var(--ink) 4%, var(--surface)); }
.ag-line { border-top: 1px solid var(--line); opacity: 1; }
.ag-half { border-top: 1px dashed color-mix(in oklch, var(--line) 70%, transparent); }
.ag-hour { font-size: 12.5px; }
.ag-gap { justify-content: center; background: color-mix(in oklch, var(--ink) 6%, var(--surface)); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.ag-b { background: color-mix(in oklch, var(--tone) 15%, var(--surface)); box-shadow: inset 4px 0 0 var(--tone); color: var(--ink); padding: 6px 10px 6px 14px; gap: 1px; border-radius: 8px; }
.ag-b:hover { background: color-mix(in oklch, var(--tone) 24%, var(--surface)); box-shadow: inset 4px 0 0 var(--tone), var(--shadow); }
.ag-b::after { height: var(--tail, 0); border-radius: 0 0 8px 8px; background: repeating-linear-gradient(135deg, color-mix(in oklch, var(--tone) 18%, transparent) 0 4px, transparent 4px 8px); }
.ag-b-name { font-size: 14.5px; line-height: 1.25; }
.ag-b-meta { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-b-meta .ag-b-svc { color: inherit; }
.ag-b-short { grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; align-items: baseline; padding-top: 3px; }
/* done today: greyed by colour, not by opacity, so the text stays readable */
.ag-b-past { background: var(--surface-2); box-shadow: inset 4px 0 0 color-mix(in oklch, var(--tone) 40%, var(--surface-2)); }
.ag-b-past .ag-b-name { color: var(--muted); }
.ag-l-b.ag-b-past { background: var(--surface-2); }
.ag-now-t { position: absolute; right: 6px; top: -9px; padding: 1px 6px; border-radius: 6px; background: var(--danger); color: #fff; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ag-l-b { box-shadow: inset 4px 0 0 var(--tone); }
.ag-l-free, .ag-l-gap { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 9px 16px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }
.ag-l-free { color: var(--accent-text); }
.ag-l-free .ag-l-time, .ag-l-gap .ag-l-time { font-weight: 500; }
.ag-l-gap { background: var(--surface-2); }
.ag-l-list > li:first-child, .ag-l-list > li:first-child .ag-l-b { border-top: 0; }
.ag-l-list > li + li .ag-l-b { border-top: 1px solid var(--line); }

/* review round 2026-10-20 */
.bk-wizard .people { grid-template-columns: minmax(0, 1fr); }
.bk-wizard .who .chev { display: inline-grid; margin-left: auto; }
.picked-row { padding: 9px 14px; font-size: 14px; }
.picked-v { overflow-wrap: anywhere; }
.q-title { margin-bottom: -4px; }
:root { --tone-mix: 16%; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tone-mix: 30%; } }
:root[data-theme="dark"] { --tone-mix: 30%; }
.tone-2 { --tone: oklch(0.66 0.13 135); }
/* mixed in sRGB: in OKLCH an amber over a blue-grey card swings through green */
.ag-b { background: color-mix(in srgb, var(--tone) var(--tone-mix), var(--surface)); }
.ag-b:hover { background: color-mix(in srgb, var(--tone) calc(var(--tone-mix) + 8%), var(--surface)); }
/* not working: hatched; the break: flat with its label; working: the plain card colour */
.ag-col, .ag-col-off { background: repeating-linear-gradient(135deg, color-mix(in oklch, var(--ink) 7%, transparent) 0 5px, transparent 5px 11px), color-mix(in oklch, var(--ink) 3%, var(--surface)); }
.ag-gap { background: color-mix(in oklch, var(--ink) 7%, var(--surface)); }
.ag-b-meta { font-size: 13px; color: color-mix(in oklch, var(--ink) 72%, var(--surface)); }
.ag-grid-one { max-width: 760px; }
