/* Layout: fixed left rail, one working surface; the journal grid scrolls inside its own frame. */
:root {
  --bg: #f3f6f5;
  --surface: #ffffff;
  --surface-2: #edf2f0;
  --line: #d6dfdc;
  --line-strong: #b7c5c0;
  --text: #17212b;
  --muted: #55646f;
  --accent: #176b5b;
  --accent-strong: #114e43;
  --accent-soft: #dcefe9;
  --on-accent: #ffffff;
  --focus: #1d4ed8;
  --ok: #1c7447; --ok-soft: #e0f3e7;
  --warn: #87490a; --warn-soft: #fff0d4;
  --danger: #a01f33; --danger-soft: #fde7ea;
  --info: #1d5aa3; --info-soft: #e2edfb;
  --teal-bg: #d9efe9; --teal-line: #2b8f7e;
  --violet-bg: #e9e3f8; --violet-line: #7558c0;
  --amber-bg: #fbecc8; --amber-line: #b98209;
  --rose-bg: #fbe0e6; --rose-line: #c9516f;
  --blue-bg: #dde9fb; --blue-line: #3a72c8;
  --olive-bg: #e8eecf; --olive-line: #778a24;
  --st-pending: #b98209; --st-confirmed: #3a72c8; --st-arrived: #7558c0;
  --st-done: #2a8d5c; --st-no-show: #c2394c; --st-cancelled: #84909a;
  --lvl-1: #1b1512; --lvl-2: #2a1f19; --lvl-3: #3b2a20; --lvl-4: #4f3828; --lvl-5: #694b34;
  --lvl-6: #866446; --lvl-7: #a5825c; --lvl-8: #c2a078; --lvl-9: #dcc097; --lvl-10: #f0dfba;
  --on-dark-swatch: #ffffff; --on-light-swatch: #1b1512;
  --shadow: 0 14px 40px rgba(20, 55, 49, 0.12);
  --backdrop: rgba(16, 28, 26, 0.45);
  --closed: rgba(23, 33, 43, 0.055);
  --font-text: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: Geologica, Inter, ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --radius: 10px;
  --control: 36px;
  --control-sm: 30px;
  --dl-label: 176px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1514; --surface: #172120; --surface-2: #1e2a28; --line: #2b3936; --line-strong: #41534f;
    --text: #e6eeeb; --muted: #9babA6; --accent: #4cbfa5; --accent-strong: #7ad9c2; --accent-soft: #16352e;
    --on-accent: #05221b; --focus: #8ab4ff;
    --ok: #6fd39b; --ok-soft: #143224; --warn: #f0bd6a; --warn-soft: #382b10;
    --danger: #ff8f9d; --danger-soft: #3c1a20; --info: #8fbdf5; --info-soft: #152a44;
    --teal-bg: #163730; --teal-line: #4cbfa5; --violet-bg: #2a2444; --violet-line: #a48cf0;
    --amber-bg: #392d12; --amber-line: #e0b04a; --rose-bg: #3f2029; --rose-line: #f08aa6;
    --blue-bg: #1a2b47; --blue-line: #7fb0f5; --olive-bg: #2b3215; --olive-line: #b5c75a;
    --st-pending: #e0b04a; --st-confirmed: #7fb0f5; --st-arrived: #a48cf0;
    --st-done: #6fd39b; --st-no-show: #ff8f9d; --st-cancelled: #8f9ca3;
    --shadow: 0 14px 40px rgba(0, 0, 0, 0.5); --backdrop: rgba(0, 0, 0, 0.6); --closed: rgba(255, 255, 255, 0.045);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1514; --surface: #172120; --surface-2: #1e2a28; --line: #2b3936; --line-strong: #41534f;
  --text: #e6eeeb; --muted: #9babA6; --accent: #4cbfa5; --accent-strong: #7ad9c2; --accent-soft: #16352e;
  --on-accent: #05221b; --focus: #8ab4ff;
  --ok: #6fd39b; --ok-soft: #143224; --warn: #f0bd6a; --warn-soft: #382b10;
  --danger: #ff8f9d; --danger-soft: #3c1a20; --info: #8fbdf5; --info-soft: #152a44;
  --teal-bg: #163730; --teal-line: #4cbfa5; --violet-bg: #2a2444; --violet-line: #a48cf0;
  --amber-bg: #392d12; --amber-line: #e0b04a; --rose-bg: #3f2029; --rose-line: #f08aa6;
  --blue-bg: #1a2b47; --blue-line: #7fb0f5; --olive-bg: #2b3215; --olive-line: #b5c75a;
  --st-pending: #e0b04a; --st-confirmed: #7fb0f5; --st-arrived: #a48cf0;
  --st-done: #6fd39b; --st-no-show: #ff8f9d; --st-cancelled: #8f9ca3;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.5); --backdrop: rgba(0, 0, 0, 0.6); --closed: rgba(255, 255, 255, 0.045);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.45 var(--font-text); -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: 20px; font-weight: 600; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.icon { flex: none; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.text-danger { color: var(--danger); }
.selectable { user-select: all; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.row { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row--between { display: flex; justify-content: space-between; }
.link { background: none; border: 0; padding: 0; color: var(--accent-strong); font-weight: 600; text-align: left; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.link:hover { text-decoration-color: currentColor; }

/* ── Shell ─────────────────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 212px 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: 18px;
  padding: 18px 12px; background: var(--surface); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.brand__mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--on-accent); }
.brand__text { display: grid; min-width: 0; }
.brand__text strong { font-family: var(--font-display); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand__text small { color: var(--muted); font-size: 12px; }
.nav { display: grid; gap: 2px; }
.nav__item {
  display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border: 0; border-radius: 8px;
  background: none; color: var(--muted); font-weight: 500; text-align: left;
}
.nav__item:hover { background: var(--surface-2); color: var(--text); }
/* The two spaces of the menu: the owner's and the admin's. */
.nav__group { display: block; padding: 14px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.nav__group:first-child { padding-top: 6px; }
.nav__group-short { display: none; }
/* «От мастеров»: a visit, then what the master passed on. */
.from-master { display: grid; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.panel__head + .from-master { border-top: 0; padding-top: 0; }
.net-card { display: grid; gap: 8px; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.net-card__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
.net-card__rating { font-weight: 700; }
.net-card p { margin: 0; }
.net-card__tags { display: grid; gap: 4px; margin: 4px 0 0; padding: 0; list-style: none; }

/* The booking page's legal footer: «Реквизиты» and «Конфиденциальность». */
.book__legal { display: grid; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; }
.book__legal .row { gap: 16px; }
.book__privacy { display: grid; gap: 10px; }
.book__privacy h3 { font-size: 14px; margin: 6px 0 2px; }
.book__privacy p { margin: 0 0 4px; color: var(--muted); }
.book__privacy .book__rules-part { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 15px; }
.book__rules-note { margin: -4px 0 4px 30px; font-size: 13px; }

/* «Поддержка»: the button in the corner and its panel. */
.support { position: fixed; right: max(18px, env(safe-area-inset-right, 0px)); bottom: 18px; z-index: 60; display: grid; justify-items: end; gap: 10px; }
.support__button { position: relative; display: grid; place-items: center; width: 54px; height: 54px; border: 0; border-radius: 50%; background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22); cursor: pointer; }
.support__count { position: absolute; top: -2px; right: -2px; }
.support__panel { width: min(380px, calc(100vw - 32px)); max-height: min(620px, calc(100vh - 110px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2); overflow: hidden; }
.support__head { display: grid; gap: 4px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.support__head strong { font-family: var(--font-display); font-size: 17px; }
.support__body { display: grid; gap: 10px; padding: 12px 16px 16px; overflow-y: auto; }
.support__body h4 { margin: 4px 0 0; }
.support__list { display: grid; gap: 2px; }
.support__item { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 6px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.support__item:hover { background: var(--surface-2); }
.support__avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); }
.support__text { display: grid; min-width: 0; }
.support__text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support__meta { display: grid; justify-items: end; gap: 4px; }
.support__new { display: grid; gap: 8px; }
.support__compose { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.support__msgs { max-height: 300px; }
.support__rate { display: grid; gap: 8px; padding: 10px; border-radius: 10px; background: var(--surface-2); }
@media (max-width: 899px) { .support { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); right: 12px; } .support__button { width: 48px; height: 48px; } }

/* «Надёжность» in the client's card; the booking rules on the booking page. */
.debts, .conducts { display: grid; gap: 10px; }
.debt, .conduct { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.conduct-tags { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; }
.conduct-tags legend { font-weight: 600; margin-bottom: 6px; }
.from-master__visit { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.from-master__visit small { flex-basis: 100%; }
.nav__item.is-active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.nav__badge { margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 12px; font-weight: 700; text-align: center; }
.main { min-width: 0; display: flex; flex-direction: column; gap: 12px; padding-block: 14px 28px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 900px) { .main { padding-left: 22px; padding-right: max(22px, env(safe-area-inset-right, 0px)); } }
.topbar { display: flex; align-items: center; gap: 8px; }
.topbar__spacer { flex: 1; }
.view { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.gsearch { position: relative; flex: 0 1 420px; min-width: 0; }
.gsearch__icon { position: absolute; left: 10px; top: 50%; translate: 0 -50%; color: var(--muted); display: grid; pointer-events: none; }
.gsearch .gsearch__input { width: 100%; padding-left: 34px; }
.gsearch__results { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); box-shadow: var(--shadow); }
.gsearch__none { padding: 10px 12px; }

.status { display: inline-flex; align-items: center; gap: 6px; height: var(--control); padding: 0 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.status--ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.status--warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.status--danger { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.status--neutral { color: var(--muted); }

.banner { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: var(--control); padding: 6px 12px; border-radius: 8px; background: var(--info-soft); color: var(--info); font-size: 13px; }
.banner--danger { background: var(--danger-soft); color: var(--danger); }
.banner .link { color: inherit; text-decoration-color: currentColor; }

/* ── Controls ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: var(--control); padding: 0 13px; line-height: 1.2;
  border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-weight: 600; white-space: nowrap;
}
.btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-strong); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--primary:hover:not(:disabled) { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.btn--danger { background: var(--danger); border-color: var(--danger); color: var(--surface); }
.btn--danger:hover:not(:disabled) { color: var(--surface); border-color: var(--danger); filter: brightness(0.92); }
.btn--danger-ghost { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.btn--danger-ghost:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); }
.btn--sm { min-height: var(--control-sm); padding: 0 10px; font-size: 12.5px; }
.btn--icon { padding: 0; width: var(--control); }
.btn--icon.btn--sm { padding: 0; width: var(--control-sm); }
.input.input--static { display: flex; align-items: center; background: var(--surface-2); font-weight: 600; }
.input {
  width: 100%; height: var(--control); padding: 0 10px; line-height: 1.2; border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text);
}
.input::placeholder { color: var(--muted); opacity: 0.8; }
textarea.input { height: auto; min-height: 64px; padding: 8px 10px; line-height: 1.45; resize: vertical; }
input[type="date"].input, input[type="time"].input { appearance: none; -webkit-appearance: none; }
select.input { width: auto; max-width: 100%; }
.field select.input, .form-grid select.input { width: 100%; }
.input--date { width: auto; }
.input--search { width: 260px; max-width: 100%; }
.input--chip { width: 96px; height: 24px; padding: 0 8px; border-radius: 999px; border-style: dashed; font-size: 12.5px; }
.check { display: inline-flex; align-items: center; gap: 7px; min-height: var(--control); }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.check--pill { min-height: var(--control-sm); padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); }
.check--pill:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.field { display: grid; gap: 4px; min-width: 0; align-content: start; }
.field__label { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.01em; }
.field__hint { color: var(--muted); font-size: 12px; }
.form { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field--wide { grid-column: 1 / -1; }
.form-grid--4 .field--wide, .form-grid--4 .field--half { grid-column: span 2; }
.form-heading { grid-column: 1 / -1; padding-top: 6px; border-top: 1px solid var(--line); }
.form-section { display: grid; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.form-errors { display: grid; gap: 4px; padding: 10px 12px; border-radius: 8px; background: var(--danger-soft); color: var(--danger); font-weight: 500; }
.form-errors:has(.is-warning):not(:has(p:not(.is-warning))) { background: var(--warn-soft); }
.form-errors .is-warning { color: var(--warn); }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form .input { flex: 1 1 150px; width: auto; }
.inline-form .btn, .row--controls .btn { min-height: var(--control); font-size: inherit; padding: 0 13px; }
.inline-form select.input { flex: 0 0 auto; }
.confirm { display: inline-flex; gap: 6px; flex-wrap: wrap; }

.segmented { display: inline-flex; align-items: stretch; height: var(--control); padding: 3px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); }
.segmented__item { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0 12px; border-radius: 6px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.segmented__item:hover { color: var(--text); }
.segmented__item.is-active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px var(--closed); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips--tight { gap: 4px; margin-top: 3px; }
.chips--filters { gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: var(--control-sm); padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 500; font-size: 13px; }
.chip:hover:not(:disabled) { border-color: var(--accent); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip--suggest { border-style: dashed; color: var(--muted); font-size: 12.5px; min-height: 24px; padding: 0 9px; }
.chip--suggest:hover { color: var(--accent-strong); }
.chip--slot { font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 0 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.5; }
.pill--like { background: var(--ok-soft); color: var(--ok); }
.pill--dislike { background: var(--danger-soft); color: var(--danger); }
.pill--warn, .pill--seg-risk, .pill--seg-noshow { background: var(--warn-soft); color: var(--warn); }
.pill--tag { background: var(--surface-2); color: var(--text); }
.pill--seg-vip { background: var(--amber-bg); color: var(--text); box-shadow: inset 0 0 0 1px var(--amber-line); }
.pill--seg-new, .pill--seg-regular { background: var(--info-soft); color: var(--info); }
.pill--seg-sleeping { background: var(--surface-2); color: var(--muted); }
.pill--seg-birthday, .pill--gift { background: var(--rose-bg); color: var(--text); }
.pill--seg-allergy { background: var(--danger-soft); color: var(--danger); }
.pill__x, .callout__x { border: 0; background: none; padding: 0 2px; font-size: 15px; line-height: 1; color: inherit; opacity: 0.7; }
.pill__x:hover, .callout__x:hover { opacity: 1; }
.callout__x { margin-left: auto; font-size: 18px; }

.callout { display: flex; gap: 8px; align-items: flex-start; padding: 8px 11px; border-radius: 8px; background: var(--surface-2); }
.callout .icon { margin-top: 2px; }
.callout--danger { background: var(--danger-soft); color: var(--danger); font-weight: 600; }
.callout--warn { background: var(--warn-soft); color: var(--warn); }
.callout--note { background: var(--info-soft); }
.callout--note > .icon { color: var(--info); }
.callout--formula { background: var(--violet-bg); }
.callout--formula > .icon { color: var(--violet-line); }
.empty { display: grid; gap: 10px; justify-items: start; padding: 14px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); }
.empty--big { justify-items: center; text-align: center; padding: 48px 20px; color: var(--text); }
.empty--big p { color: var(--muted); max-width: 52ch; }
.demo-note { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }

.avatar { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); font-family: var(--font-display); font-weight: 600; font-size: 13px; }
.avatar--sm { width: 28px; height: 28px; font-size: 11px; }
.avatar--lg { width: 56px; height: 56px; font-size: 19px; }
.hue-teal { --hue-bg: var(--teal-bg); --hue-line: var(--teal-line); }
.hue-violet { --hue-bg: var(--violet-bg); --hue-line: var(--violet-line); }
.hue-amber { --hue-bg: var(--amber-bg); --hue-line: var(--amber-line); }
.hue-rose { --hue-bg: var(--rose-bg); --hue-line: var(--rose-line); }
.hue-blue { --hue-bg: var(--blue-bg); --hue-line: var(--blue-line); }
.hue-olive { --hue-bg: var(--olive-bg); --hue-line: var(--olive-line); }
.avatar[class*="hue-"] { background: var(--hue-bg); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--hue-line); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--hue-line); flex: none; }
.st-pending { --st: var(--st-pending); } .st-confirmed { --st: var(--st-confirmed); } .st-arrived { --st: var(--st-arrived); }
.st-done { --st: var(--st-done); } .st-no_show { --st: var(--st-no-show); } .st-cancelled { --st: var(--st-cancelled); }

.picker { display: grid; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.picker__item { display: flex; align-items: center; gap: 10px; padding: 8px 11px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; }
.picker__item:last-child { border-bottom: 0; }
.picker__item:hover, .picker__item:focus-visible { background: var(--surface-2); }
.picker__item--new { color: var(--accent-strong); font-weight: 600; }
.picker__text { display: grid; min-width: 0; flex: 1; }
.picker__text small { color: var(--muted); }

/* ── Toolbar and summary ───────────────────────────────────────────────── */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: var(--control); }
.toolbar__nav, .toolbar__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
/* Filters stay beside the navigation; the main action always sits at the right edge. */
.toolbar__tools { flex: 1 1 auto; justify-content: flex-end; }
.journal .toolbar__tools { justify-content: flex-start; }
.journal .toolbar__tools > .btn--primary { margin-left: auto; }
.toolbar__title { margin: 0; line-height: var(--control); }
.toolbar__nav .btn + .toolbar__title { margin-left: 6px; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { display: grid; gap: 2px; align-content: start; padding: 10px 16px; background: var(--surface); min-width: 0; }
.stat__label { color: var(--muted); font-size: 12px; }
.stat__value { font-family: var(--font-display); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat__sub { color: var(--muted); font-size: 12px; }
.stat--warn .stat__value { color: var(--warn); }
.meter { display: block; height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.meter__fill { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.meter--grey .meter__fill { background: var(--line-strong); }

/* ── Time grid ─────────────────────────────────────────────────────────── */
.grid-wrap { overflow: auto; max-height: max(440px, calc(100dvh - 232px)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overscroll-behavior: contain; }
.grid { display: grid; grid-template-columns: 54px repeat(var(--cols), minmax(168px, 1fr)); min-width: max-content; }
.grid--week { grid-template-columns: 54px repeat(var(--cols), minmax(128px, 1fr)); }
.grid--week.grid--split { grid-template-columns: 54px repeat(var(--cols), minmax(72px, 1fr)); }
.grid--split .grid__head { padding: 6px; gap: 4px; }
.grid--split .grid__head small { font-size: 10.5px; }
.grid__head.is-day-start, .grid__col.is-day-start { border-left: 2px solid var(--line-strong, var(--line)); }
.grid__corner, .grid__head { position: sticky; top: 0; z-index: 6; background: var(--surface); border-bottom: 1px solid var(--line); }
.grid__corner { left: 0; z-index: 8; display: grid; place-items: center; color: var(--muted); border-right: 1px solid var(--line); }
.grid__head { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 8px 10px; border: 0; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: left; min-width: 0; color: var(--text); font: inherit; }
button.grid__head:hover { background: var(--surface-2); }
.grid__head.is-today strong { color: var(--accent-strong); }
.grid__head.is-off { color: var(--muted); }
.grid__head-text { display: grid; min-width: 0; }
.grid__head-text strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid__head-text small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid__axis { position: sticky; left: 0; z-index: 5; background: var(--surface); border-right: 1px solid var(--line); }
.grid__hour { position: absolute; right: 7px; translate: 0 -50%; color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; background: var(--surface); padding-block: 1px; }
.grid__hour:first-child { translate: 0 2px; }
.grid__col {
  position: relative; border-right: 1px solid var(--line); cursor: copy;
  background-image:
    linear-gradient(to bottom, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--line) 45%, transparent) 1px, transparent 1px);
  background-size: 100% var(--hour), 100% calc(var(--hour) / 2);
}
.grid__col.is-off { background-color: var(--closed); }
.grid__closed { position: absolute; left: 0; right: 0; background: var(--closed); pointer-events: none; }
.grid__now { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--danger); z-index: 3; pointer-events: none; }
.grid__now::before { content: ""; position: absolute; left: -1px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.grid__ghost { position: absolute; left: 2px; right: 2px; z-index: 1; display: flex; align-items: center; padding-left: 8px; border-radius: 6px; border: 1px dashed var(--accent); background: var(--accent-soft); color: var(--accent-strong); font-size: 11.5px; font-weight: 600; pointer-events: none; }

.appt {
  position: absolute; z-index: 2; display: flex; flex-direction: column; gap: 1px; align-items: stretch; overflow: hidden;
  padding: 4px 7px 4px 9px; border-radius: 7px; border: 1px solid color-mix(in srgb, var(--hue-line) 45%, transparent);
  border-left: 4px solid var(--st); background: var(--hue-bg); color: var(--text); text-align: left; line-height: 1.25;
  cursor: pointer; touch-action: pan-x pan-y;
}
.appt:hover { box-shadow: 0 3px 10px var(--closed), 0 0 0 1px var(--hue-line); z-index: 4; }
.appt.is-dragging { z-index: 20; opacity: 0.88; box-shadow: var(--shadow); cursor: grabbing; }
.appt__time { display: flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.appt__end { margin-left: -5px; }
.grid--week .appt__end { display: none; }
.appt__client { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appt__services { font-size: 12px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.appt--md .appt__services { -webkit-line-clamp: 1; }
.appt__status { margin-top: auto; font-size: 11px; font-weight: 700; color: var(--st); text-transform: uppercase; letter-spacing: 0.04em; }
.appt__flag { display: inline-grid; color: var(--muted); }
.appt__flag--danger { color: var(--danger); }
.appt__flag--warn { color: var(--warn); }
.appt__new { margin-left: 6px; padding: 0 5px; border-radius: 4px; background: var(--surface); color: var(--info); font-size: 10.5px; font-weight: 700; vertical-align: 1px; }
.appt--xs { flex-direction: row; gap: 6px; padding-block: 0; align-items: center; }
.appt--xs .appt__client { min-width: 0; }
.appt--sm { gap: 0; padding-block: 2px; }
.appt.st-done { filter: saturate(0.6); }
.appt.st-done .appt__client, .appt.st-done .appt__time { color: var(--muted); }
.appt.st-cancelled, .appt.st-no_show { background: var(--surface-2); border-style: dashed; border-left-style: solid; color: var(--muted); }
.appt.st-cancelled .appt__client { text-decoration: line-through; }
.appt.st-pending { background-image: repeating-linear-gradient(135deg, transparent 0 7px, color-mix(in srgb, var(--st) 14%, transparent) 7px 9px); }

.month-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; }
.month__weekday { padding: 6px 8px; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 600; text-align: center; }
.month__cell { display: grid; gap: 4px; align-content: start; justify-items: start; min-height: 92px; padding: 7px 8px; border: 0; background: var(--surface); text-align: left; min-width: 0; }
.month__cell:hover { background: var(--surface-2); }
.month__cell.is-outside { background: var(--bg); color: var(--muted); }
.month__cell .meter { width: 100%; margin-top: auto; }
.month__day { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.month__cell.is-today .month__day { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 5px; border-radius: 13px; background: var(--accent); color: var(--on-accent); }
.month__cell.is-selected { box-shadow: inset 0 0 0 2px var(--accent); }
.month__count { font-size: 12px; font-weight: 600; }
.month__count--none { color: var(--muted); font-weight: 400; }

/* ── Tables, panels ────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel .table-wrap { border: 0; border-radius: 0; }
.table { width: 100%; border-collapse: collapse; }
.table th { padding: 9px 12px; text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th.num { text-align: right; }
.table td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.is-clickable { cursor: pointer; }
.table tr.is-clickable:hover td { background: var(--surface-2); }
.table tr.is-muted td { color: var(--muted); }
.table--clients { min-width: 860px; }
.table--formula td { vertical-align: top; }
/* Fixed column widths: the same column sits on one vertical line in every block of a list. */
.table--services, .table--purchases, .table--formula { table-layout: fixed; }
.table--services td:nth-child(2) { width: 132px; }
.table--services td:nth-child(3) { width: 112px; }
.table--services td:first-child { overflow-wrap: anywhere; }
.table--services td.actions { width: 132px; text-align: right; }
.table--services td.actions .confirm { justify-content: flex-end; }
.table--purchases td:nth-child(1) { width: 112px; }
.table--purchases td:nth-child(3) { width: 112px; }
.table--purchases td:nth-child(4) { width: 132px; }
.table--formula { min-width: 560px; }
.table--formula th:nth-child(1) { width: 128px; }
.table--formula th:nth-child(3), .table--formula th:nth-child(4), .table--formula th:nth-child(5) { width: 104px; }
.client-cell { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.panel { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; align-content: start; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; min-height: var(--control-sm); }
.panel--table { padding: 0; gap: 0; }
.panel--table > .panel__head { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel--table .table td:first-child, .panel--table .table th:first-child { padding-left: 16px; }
.panel--table .table td:last-child, .panel--table .table th:last-child { padding-right: 16px; }
.cols { columns: 1; column-gap: 12px; }
.cols > * { break-inside: avoid; margin-bottom: 12px; }
@media (min-width: 1180px) { .cols { columns: 2; } }
@media (min-width: 1900px) { .cols { columns: 3; } }
.panel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.dl { display: grid; grid-template-columns: var(--dl-label) minmax(0, 1fr); gap: 6px 16px; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.bullets { margin: 4px 0 0; padding-left: 18px; }
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.staff-card { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: left; }
.staff-card:hover { border-color: var(--accent); }
.staff-card.is-muted { opacity: 0.65; }
.staff-card__text { display: grid; gap: 5px; min-width: 0; }
.week { display: flex; gap: 3px; }
.week__day { padding: 1px 5px; border-radius: 4px; font-size: 11.5px; color: var(--muted); background: var(--surface-2); }
.week__day.is-on { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }

/* ── Dialogs ───────────────────────────────────────────────────────────── */
.dialog { width: min(560px, calc(100vw - 20px)); max-height: min(92vh, 92dvh); padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); overflow: hidden; }
.dialog[open] { display: flex; flex-direction: column; }
.dialog::backdrop { background: var(--backdrop); }
.dialog--sm { width: min(420px, calc(100vw - 20px)); }
.dialog--lg { width: min(760px, calc(100vw - 20px)); }
.dialog--xl { width: min(1040px, calc(100vw - 20px)); height: min(92vh, 92dvh); }
.dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line); flex: none; }
.dialog__title { font-size: 16px; }
/* Rows are sized to content: a scrollable child (the tab strip) must not be squeezed to zero. */
.dialog__body { display: grid; grid-auto-rows: max-content; gap: 14px; align-content: start; padding: 16px 18px 18px; overflow: auto; overscroll-behavior: contain; }
.dialog__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 4px; }
.status-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; min-height: var(--control-sm); padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.status-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--st); }
.status-chip.is-active { color: var(--text); border-color: var(--st); background: color-mix(in srgb, var(--st) 14%, var(--surface)); }
button.status-chip:hover { border-color: var(--st); }
.client-brief { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.client-brief__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.client-brief__name { display: grid; flex: 1; min-width: 160px; }
.client-brief__prefs { display: grid; gap: 6px; }
.client-brief__prefs p { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.prefs-label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.prefs-label--like { color: var(--ok); }
.prefs-label--dislike { color: var(--danger); }
.service-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.service-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 11px; border: 1px solid var(--line); border-radius: 8px; }
.service-list small { color: var(--muted); }
.slots { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.slots__label { color: var(--muted); font-size: 12.5px; margin-right: 2px; }

/* ── Client card ───────────────────────────────────────────────────────── */
.card-head { display: grid; gap: 12px; }
.card-head__main { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.card-head__id { display: grid; gap: 5px; flex: 1 1 280px; min-width: 0; }
.card-head__name { font-size: 22px; }
.card-head__contact { display: grid; gap: 3px; justify-items: start; }
.contact { display: flex; align-items: center; gap: 7px; font-weight: 600; font-variant-numeric: tabular-nums; }
.card-head__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.card-head__alerts { display: grid; gap: 6px; }
.stats-row--card { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.tabs { display: flex; gap: 2px; min-height: 40px; overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid var(--line); scrollbar-width: none; position: sticky; top: 0; z-index: 5; background: var(--surface); margin-inline: -18px; padding-inline: 18px; }
.tabs__item { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tabs__item:hover { color: var(--text); }
.tabs__item.is-active { color: var(--accent-strong); border-bottom-color: var(--accent); }
.tabs__count { padding: 0 6px; border-radius: 9px; background: var(--surface-2); font-size: 11.5px; color: var(--muted); }
.tab-panel { display: grid; gap: 12px; align-content: start; }
.visits { display: grid; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.visit { display: grid; grid-template-columns: minmax(110px, 0.7fr) minmax(0, 2fr) auto auto; gap: 12px; align-items: center; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); text-align: left; width: 100%; }
.visits .visit:last-child { border-bottom: 0; }
.panel > .visit { border: 1px solid var(--line); border-radius: 8px; }
.visit:hover { background: var(--surface-2); }
.visit__date, .visit__what { display: grid; min-width: 0; }
.visit small { color: var(--muted); }
.visit__what strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visit__price { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.forecast { display: grid; gap: 8px; justify-items: start; }
.passport { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.passport > div { display: grid; gap: 10px; }
.level-scale { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; max-width: 420px; }
.level-scale__step { display: grid; place-items: center; height: 34px; border-radius: 5px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--on-dark-swatch); }
.lvl-1 { background: var(--lvl-1); } .lvl-2 { background: var(--lvl-2); } .lvl-3 { background: var(--lvl-3); } .lvl-4 { background: var(--lvl-4); } .lvl-5 { background: var(--lvl-5); }
.lvl-6 { background: var(--lvl-6); } .lvl-7 { background: var(--lvl-7); } .lvl-8 { background: var(--lvl-8); } .lvl-9 { background: var(--lvl-9); } .lvl-10 { background: var(--lvl-10); }
.lvl-7, .lvl-8, .lvl-9, .lvl-10 { color: var(--on-light-swatch); }
.level-scale__step.is-current { outline: 3px solid var(--accent); outline-offset: 2px; height: 42px; margin-top: -4px; font-size: 15px; }
.grey { display: grid; gap: 4px; max-width: 420px; }
.formula { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.formula .table-wrap { border: 1px solid var(--line); border-radius: 8px; }
.formula__head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.rating { color: var(--amber-line); letter-spacing: 1px; white-space: nowrap; }
.rating__off { color: var(--line-strong); }
.zone { display: grid; gap: 8px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.zone legend { padding: 0 6px; font-weight: 600; color: var(--muted); font-size: 12px; }
.mix-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) 76px auto; gap: 6px; }
.prefs-cat { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.prefs-cat summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; list-style-position: inside; }
.prefs-cat__name { font-weight: 600; margin-right: auto; }
.prefs-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 4px 12px 12px; }
.prefs-col { display: grid; gap: 8px; align-content: start; }
.note { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.note.is-pinned { border-color: var(--info); background: var(--info-soft); }
.note p { white-space: pre-wrap; overflow-wrap: anywhere; }
.bars { display: grid; gap: 8px; }
.bars__row { display: grid; grid-template-columns: minmax(110px, 180px) minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.bars__track { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.bars__fill { display: block; height: 100%; border-radius: 5px; background: var(--accent); }
.bars__value { font-variant-numeric: tabular-nums; font-weight: 600; }

.toasts { position: fixed; z-index: 100; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); translate: -50% 0; display: grid; gap: 8px; justify-items: center; width: min(520px, calc(100vw - 24px)); pointer-events: none; }
.toast { padding: 9px 14px; border-radius: 9px; background: var(--text); color: var(--bg); font-weight: 500; box-shadow: var(--shadow); }
.toast--error { background: var(--danger); color: var(--surface); }
.toast--warn { background: var(--warn); color: var(--surface); }

a.btn { text-decoration: none; }
.dialog__body > .segmented, .lock__card > .segmented { justify-self: start; }

/* ── Breaks, per-day schedule ────────────────────────────────────────── */
.grid__break {
  position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none; display: flex; align-items: flex-start;
  padding: 3px 8px; border-block: 1px dashed var(--line-strong); color: var(--muted); font-size: 11.5px; font-weight: 600;
  background: repeating-linear-gradient(135deg, var(--closed) 0 6px, transparent 6px 12px);
}
.grid__head-edit { margin-left: auto; color: var(--muted); display: inline-grid; opacity: 0.55; }
button.grid__head:hover .grid__head-edit { opacity: 1; color: var(--accent-strong); }
.grid__head.is-changed .grid__head-text small { color: var(--warn); }
.break-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }

/* ── Waiting list, reminders, contacts ─────────────────────────────────── */
.wait-list { display: grid; gap: 10px; }
.wait { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.wait--active { border-left: 4px solid var(--ok); }
.wait--expired { border-left: 4px solid var(--warn); }
.wait--booked, .wait--closed { opacity: 0.75; }
.wait__head { display: flex; align-items: center; gap: 10px; }
.wait__who { display: grid; flex: 1; min-width: 0; }
.wait__facts { --dl-label: 128px; }
.wait__actions { justify-content: flex-end; }
.contact-row { margin-top: 2px; }
.table--reminders { min-width: 680px; table-layout: fixed; }
.table--reminders td:nth-child(1) { width: 64px; text-align: left; }
.table--reminders td:nth-child(3) { width: 168px; }
.table--reminders td:nth-child(4) { width: 300px; }
.table__actions .row { justify-content: flex-end; flex-wrap: nowrap; }
.pre { white-space: pre-wrap; }

/* ── Analytics ─────────────────────────────────────────────────────────── */
.delta--up { color: var(--ok); }
.delta--down { color: var(--danger); }
.chart { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: stretch; }
.chart__bars { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; height: 180px; align-items: end; border-bottom: 1px solid var(--line); }
.chart__col { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.chart__bar { display: block; width: 100%; max-width: 38px; border-radius: 4px 4px 0 0; background: var(--accent); }
.chart__col.is-future .chart__bar { background: var(--line-strong); }
.chart__col.is-today .chart__bar { background: var(--accent-strong); }
.chart__label { position: absolute; top: calc(100% + 4px); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart__scale { display: flex; flex-direction: column; justify-content: space-between; height: 180px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.analytics .chart { margin-bottom: 16px; }
.analytics__note { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12.5px; }
.table--staff-stats, .table--service-stats, .table--method-stats, .table--source-stats { table-layout: fixed; }
.table--staff-stats th:nth-child(2) { width: 72px; }
.table--staff-stats th:nth-child(3), .table--staff-stats th:nth-child(4) { width: 104px; }
.table--staff-stats th:nth-child(5) { width: 84px; }
.table--service-stats th:nth-child(2) { width: 56px; }
.table--service-stats th:nth-child(3), .table--method-stats th:nth-child(2) { width: 112px; }
.table--method-stats th:nth-child(3), .table--source-stats th:nth-child(2) { width: 84px; }
.table--staff-stats td:first-child, .table--service-stats td:first-child { overflow-wrap: anywhere; }

/* ── Client booking page ───────────────────────────────────────────────── */
.book-body { background: var(--bg); }
.book { max-width: 760px; margin: 0 auto; display: grid; gap: 14px; padding-block: 18px 120px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.book__loading { padding: 40px 0; display: grid; gap: 8px; }
.book__head { display: grid; gap: 8px; }
.book__brand { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.book__switches { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.segmented--lang .segmented__item { min-width: 38px; padding-inline: 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
.link--strong { color: var(--danger, var(--accent-strong)); text-decoration-color: currentColor; }
.check__note, .dl__note { display: block; margin-top: 4px; }
.receipt { display: block; padding: 12px 14px; border-radius: var(--radius, 10px); background: var(--info-soft); }
.receipt p { margin: 4px 0 0; }
.rules-text { overflow: hidden; resize: vertical; min-height: 240px; line-height: 1.55; }
@media print { .book__head, .book__legal, .book__bar, .row--controls { display: none !important; } }
.book__title { font-size: 26px; }
.book__rating { display: inline-flex; align-items: center; gap: 4px; color: var(--text); text-decoration: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.book__facts { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); }
.book__facts > * { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.book__about { color: var(--muted); max-width: 65ch; }
.book__section { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.book__section h2 { font-size: 18px; }
.book__mine { font-size: 13px; }
.book__mine a { color: var(--accent-strong); }
.stars { color: var(--amber-line); letter-spacing: 1px; white-space: nowrap; }
.stars__off { color: var(--line-strong); }
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.stepper__btn { display: flex; align-items: center; gap: 7px; width: 100%; min-height: var(--control); padding: 0 8px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-weight: 600; font-size: 13px; text-align: left; }
button.stepper__btn:hover { background: var(--surface); color: var(--text); }
.stepper__n { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 12px; }
.stepper__item.is-current .stepper__btn { color: var(--accent-strong); }
.stepper__item.is-current .stepper__n { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.stepper__item.is-done .stepper__btn { color: var(--text); }
.chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips--scroll .chip { flex: none; }
.svc-group { display: grid; gap: 6px; }
.svc-group__title { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }
.svc { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-align: left; }
.svc:hover { border-color: var(--accent); }
.svc.is-chosen { border-color: var(--accent); background: var(--accent-soft); }
.svc__text { display: grid; gap: 2px; min-width: 0; }
.svc-wrap { display: grid; gap: 2px; }
.svc__desc { white-space: pre-line; }
.svc__desc.is-clamped { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.svc__more { justify-self: start; margin-left: 12px; font-size: 13px; }
.svc__price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.svc__check { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--line-strong); color: var(--muted); }
.svc.is-chosen .svc__check { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.masters { display: grid; gap: 8px; }
.master { display: flex; gap: 14px; align-items: flex-start; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; }
.master:hover, .master.is-chosen { border-color: var(--accent); }
.master__text { display: grid; gap: 3px; min-width: 0; }
.master__role { color: var(--accent-strong); font-weight: 600; }
.master__bio { white-space: pre-line; }
.master__does { color: var(--text); font-size: 13px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.avatar--any { background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.day { flex: none; display: grid; justify-items: center; gap: 1px; width: 56px; padding: 7px 0; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.day strong { font-family: var(--font-display); font-size: 18px; }
.day small { font-size: 11px; color: var(--muted); }
.day.is-active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.day.is-active small { color: var(--on-accent); }
.day:disabled { opacity: 0.4; }
.times { display: grid; gap: 10px; }
.times__group { display: grid; gap: 6px; }
.times__label { font-size: 12px; font-weight: 600; color: var(--muted); }
.summary { display: grid; gap: 10px; padding: 12px; border-radius: 10px; background: var(--bg); }
.check--top { align-items: flex-start; min-height: 0; }
.check--top input { margin-top: 2px; flex: none; }
.rules-list { margin: 0 0 10px; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; }
.btn--wide { width: 100%; }
.book__bar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px)); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.book__bar-text { display: grid; min-width: 0; }
.book__bar > .btn { flex: 0 1 auto; min-width: 0; white-space: normal; text-align: center; line-height: 1.2; }
.booking__ok { display: flex; align-items: center; gap: 10px; color: var(--ok); }
.booking__ok h2 { color: var(--text); }
.review-form { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.rate { display: flex; gap: 4px; }
.rate__star { border: 0; background: none; font-size: 30px; line-height: 1; color: var(--line-strong); padding: 2px; }
.rate__star.is-on { color: var(--amber-line); }
.reviews { display: grid; gap: 10px; }
.review { display: grid; gap: 4px; padding: 12px; border-radius: 10px; background: var(--bg); }
.review p { white-space: pre-wrap; overflow-wrap: anywhere; }
.review__reply { padding-left: 10px; border-left: 3px solid var(--accent); color: var(--muted); }
@media (max-width: 560px) {
  .stepper__btn { flex-direction: column; justify-content: center; gap: 2px; font-size: 11px; padding: 4px 0; text-align: center; }
  .svc { grid-template-columns: minmax(0, 1fr) auto; }
  .svc__price { grid-row: 1; grid-column: 2; }
  .svc__check { display: none; }
}

/* ── Photos, online page in the journal ───────────────────────────────── */
.photo-field { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.grid__head .avatar--xs { width: 26px; height: 26px; font-size: 10px; flex: none; }
.staff-card__bio { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.link-box { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.link-box .input { flex: 1 1 260px; width: auto; font-family: var(--font-mono); font-size: 12.5px; }
.review-admin { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.review-admin.is-hidden { border-style: dashed; }

/* ── Entry screen ──────────────────────────────────────────────────────── */
.lock { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); position: relative; }
.lock__theme { position: absolute; top: 14px; right: max(16px, env(safe-area-inset-right, 0px)); }
.lock__card { display: grid; gap: 14px; width: min(400px, 100%); padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.lock__card .brand { padding: 0; }
.lock__title { font-size: 20px; }
.lock__submit { width: 100%; }
.lock__forgot { display: grid; gap: 8px; color: var(--muted); }
.lock__forgot summary { cursor: pointer; }
.lock__forgot[open] summary { margin-bottom: 8px; }

/* ── Narrow screens ────────────────────────────────────────────────────── */
@media (max-width: 899px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: auto 0 0 0; z-index: 40; height: auto; flex-direction: row; padding: 4px max(6px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)); border-right: 0; border-top: 1px solid var(--line); }
  .brand { display: none; }
  /* Up to nine sections: each keeps a readable width, the bar scrolls sideways instead of squeezing. */
  .nav { grid-auto-flow: column; grid-auto-columns: minmax(58px, 1fr); width: 100%; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
  .nav::-webkit-scrollbar { display: none; }
  .nav__item { flex-direction: column; gap: 2px; padding: 6px 2px; font-size: 11px; justify-content: center; position: relative; min-width: 0; }
  .nav__item > span:not(.nav__badge) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav__badge { position: absolute; top: 2px; left: calc(50% + 6px); margin: 0; }
  /* On the bottom bar a space is a small marker before its sections. */
  .nav__group, .nav__group:first-child { display: flex; align-items: center; justify-content: center; padding: 0 2px; border-radius: 8px; background: var(--surface-2); color: var(--accent-strong); font-size: 9px; letter-spacing: 0; text-align: center; }
  .nav__group-full { display: none; }
  .nav__group-short { display: inline; }
  .main { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .status span { display: none; }
  .status { padding: 0; width: var(--control); justify-content: center; }
  .segmented--theme .segmented__item span { display: none; }
  .cols { columns: 1; }
  .journal .stats-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .journal .stats-row.stats-row--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .journal .stat { padding: 6px 9px; }
  .journal .stat__value { font-size: 15px; }
  .journal .stat__label { font-size: 11px; }
  .journal .stat .meter { display: none; }
  .toolbar__title, .toolbar__nav .btn + .toolbar__title { order: 5; flex-basis: 100%; margin: 0; }
  .input--date { flex: 1; min-width: 0; }
  .grid-wrap { max-height: max(420px, calc(100dvh - 300px)); }
  .grid { grid-template-columns: 46px repeat(var(--cols), minmax(150px, 1fr)); }
  .panel-grid, .passport, .prefs-cols { grid-template-columns: minmax(0, 1fr); }
  .form-grid, .form-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visit { grid-template-columns: minmax(0, 1fr) auto; }
  .visit__price { justify-self: end; }
  .month__cell { min-height: 70px; padding: 5px; }
  .month__count { font-size: 11px; }
  .month__cell .pill { display: none; }
  .mix-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 60px auto; }
  .dialog, .dialog--lg, .dialog--xl { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0; margin: 0; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .dialog--sm { height: auto; margin: auto; width: calc(100vw - 24px); border-radius: 14px; }
  .toolbar__title { font-size: 17px; }
}
@media (max-width: 520px) {
  .form-grid, .form-grid--4 { grid-template-columns: minmax(0, 1fr); }
  .form-grid--4 .field--wide { grid-column: auto; }
  .dl { grid-template-columns: minmax(0, 1fr); gap: 0 0; }
  .dl dd { margin-bottom: 8px; }
  .bars__row { grid-template-columns: minmax(0, 1fr) auto; }
  .bars__track { grid-column: 1 / -1; order: 3; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .chip, .nav__item, .appt { transition: background-color 0.12s, border-color 0.12s, box-shadow 0.12s; }
}

/* Import of a client base */
.import { display: grid; gap: 14px; }
.import p { margin: 0; }
.import__help { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.import__pick { display: flex; }
.import__file { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.import__file .btn { margin-left: auto; }
.import__map td { vertical-align: middle; }
.import__map select { width: 100%; min-width: 180px; }
.import__samples { color: var(--muted); max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import__preview { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.import__preview li { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.visit--online { grid-template-columns: minmax(96px, auto) minmax(0, 1fr) auto; }
@media (max-width: 899px) { .visit--online { grid-template-columns: max-content minmax(0, 1fr); } .visit--online .visit__date strong { white-space: nowrap; } .visit--online > .row { grid-column: 1 / -1; } }
.visit--online .visit__what small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Booking page: master cards with the nearest times, master links, waiting list, own bookings */
.master { position: relative; }
.master__pick { position: absolute; inset: 0; width: 100%; border: 0; border-radius: inherit; background: transparent; cursor: pointer; }
.master__pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.master > .avatar { pointer-events: none; }
.master__text { flex: 1 1 auto; pointer-events: none; }
.master__text .chips, .master__text .chip { pointer-events: auto; }
.master__name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.master__rating { color: var(--warn); font-weight: 700; font-size: 13px; white-space: nowrap; }
.master__near { display: grid; gap: 6px; margin-top: 6px; }
.master__near .chips { position: relative; z-index: 1; }
.chip--sm { min-height: 30px; padding: 0 10px; }
.chip--slot:hover { border-color: var(--accent); color: var(--accent-strong); }
.locked { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--accent); border-radius: 12px; background: var(--accent-soft); }
.locked__text { display: grid; flex: 1 1 auto; min-width: 0; }
.waitoffer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 14px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.waitoffer > span { display: grid; flex: 1 1 200px; gap: 2px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mine { gap: 8px; }
.mine__item { display: grid; grid-template-columns: max-content minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); text-decoration: none; background: var(--surface); }
.mine__item:hover { border-color: var(--accent); }
.mine__when, .mine__what { display: grid; min-width: 0; }
.mine__what strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .mine__item { grid-template-columns: max-content minmax(0, 1fr); } .mine__item .pill { grid-column: 1 / -1; justify-self: start; } }
.master-links { display: grid; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.master-links h4 { margin: 0; }
.master-links p { margin: 0 0 4px; }
.master-links__row { display: flex; align-items: center; gap: 8px; }
.master-links__row > span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Update notices: the words ОБНОВЛЕНО / ДОСТУПНО ОБНОВЛЕНИЕ in a tag */
.banner--update { background: var(--accent-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.banner--update .link { color: var(--accent-strong); }
.banner--update .btn { margin-left: auto; }
.tag { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; }
.tag--update { background: var(--accent); color: var(--on-accent); }
.release { display: grid; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.release:last-child { border-bottom: 0; margin-bottom: 0; }
.release h3 { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; }
.release ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
/* "ОБНОВЛЕНО 12.11.2026" / "ОБНОВИТЬ": always visible on the journal, its login and the booking page */
.version-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 0 9px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); color: var(--accent-strong); font-size: 11.5px; font-weight: 800; letter-spacing: .05em; white-space: nowrap; }
button.version-chip { cursor: pointer; }
.version-chip--new { background: var(--accent); border-color: var(--accent); color: var(--on-accent); animation: version-pulse 2s ease-in-out 3; }
@keyframes version-pulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); } }
@media (prefers-reduced-motion: reduce) { .version-chip--new { animation: none; } }
.lock__version { margin-left: auto; align-self: center; }
.book__title + .version-chip { margin-top: 6px; }
.topbar .version-chip { min-height: var(--control); padding: 0 11px; border-radius: 8px; flex: none; }
/* Phones: the top bar has no room, so the notice gets its own slim line under it. */
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; }
  .topbar .version-chip { order: 10; flex: 1 1 100%; justify-content: center; min-height: 30px; }
}
/* Master's skills: "+" adds a line, a tick says "делает" */
.skills { display: grid; gap: 8px; }
.skills__cat { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.skills__cat > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: var(--control); padding: 6px 12px; cursor: pointer; list-style-position: inside; }
.skills__cat[open] > summary { border-bottom: 1px solid var(--line); }
.skills__count { font-size: 12.5px; }
.skills__rows { display: grid; gap: 6px; padding: 10px 12px 0; }
.skills__rows:empty { display: none; }
.skills__cat > .btn { margin: 10px 12px 12px; }
.skills__row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.skills__row.is-off .input { color: var(--muted); text-decoration: line-through; }
.skills__tick { min-height: 0; font-size: 12.5px; }
.skills-summary { display: grid; gap: 2px; font-size: 12.5px; }
.skills-summary__line { overflow-wrap: anywhere; }
/* Who is signed in, the bell, the journal of actions, people */
.whoami { display: grid; line-height: 1.15; font-size: 12.5px; text-align: right; flex: none; }
.whoami small { color: var(--muted); }
.bell { position: relative; display: inline-grid; place-items: center; width: var(--control); height: var(--control); flex: none; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); cursor: pointer; }
.bell.has-unread { border-color: var(--accent); color: var(--accent-strong); }
.bell__count { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.alerts { display: grid; gap: 8px; }
.alerts__item { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.alerts__item.is-new { border-color: var(--accent); background: var(--accent-soft); }
.audit { display: grid; gap: 6px; }
.audit__item { display: grid; grid-template-columns: 74px minmax(0, 1fr) minmax(120px, auto); gap: 12px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-align: left; color: var(--text); cursor: pointer; }
.audit__item:hover { border-color: var(--accent); }
.audit__item.is-removed { border-left: 4px solid var(--danger); }
.audit__when, .audit__what, .audit__who { display: grid; gap: 2px; min-width: 0; }
.audit__when small, .audit__who small { color: var(--muted); font-size: 12px; }
.audit__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.audit__who { text-align: right; font-size: 13px; }
.audit__hash { overflow-wrap: anywhere; font-size: 11.5px; }
.audit__doc pre { max-height: 320px; overflow: auto; font-size: 12px; background: var(--surface-2); padding: 10px; border-radius: 8px; }
.audit__change { overflow-wrap: anywhere; }
.table .is-danger { color: var(--danger); font-weight: 700; }
.people { display: grid; gap: 6px; }
.people__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); text-align: left; cursor: pointer; }
.people__row:hover { border-color: var(--accent); }
.people__row.is-muted { opacity: .6; }
.people__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.steps { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; }
@media (max-width: 760px) {
  .whoami { display: none; }
  .audit__item { grid-template-columns: 60px minmax(0, 1fr); }
  .audit__who { grid-column: 2; text-align: left; }
}
/* Prepayment on the booking page */
.prepay-box { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--warn); border-radius: 12px; background: color-mix(in srgb, var(--warn) 8%, var(--surface)); }
.prepay-box h3, .prepay-box p { margin: 0; }
.prepay-box.is-paid { grid-template-columns: auto 1fr; align-items: center; border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.prepay-box.is-paid > div { display: grid; gap: 2px; color: var(--text); }
.prepay-box__line { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.prepay-box__line strong { overflow-wrap: anywhere; }
.prepay-box__bank { display: grid; gap: 6px; }
.prepay .row { flex-wrap: wrap; gap: 6px; }
.appt-origin { display: flex; align-items: center; gap: 4px; margin: 0 0 8px; font-size: 12.5px; }
.pay-btn { flex-direction: column; gap: 2px; min-height: 52px; }
.pay-btn small { font-weight: 500; font-size: 12px; opacity: .85; }
.prepay-box__manual > summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.prepay-box__manual[open] > summary { margin-bottom: 8px; }

/* The platform: catalogue, sign-up, the platform's room */
.market { max-width: 1080px; margin: 0 auto; display: grid; gap: 16px; padding-block: 18px 60px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.market--join { max-width: 760px; }
.market__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.market__brand { display: flex; align-items: center; gap: 12px; }
.market__brand h1 { margin: 0; font-size: 24px; }
.market__brand > div { display: grid; gap: 4px; justify-items: start; }
.market__search { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.market__foot { font-size: 12.5px; text-align: center; }
.salon-list { display: grid; gap: 12px; }
.salon-card { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.salon-card__photo { width: 112px; height: 112px; border-radius: 12px; overflow: hidden; background: var(--accent-soft); display: grid; place-items: center; text-decoration: none; }
.salon-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.salon-card__initials { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--accent-strong); }
.salon-card__body { display: grid; gap: 5px; min-width: 0; }
.salon-card__body p { margin: 0; }
.salon-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.salon-card__head h2 { margin: 0; font-size: 18px; }
.salon-card__head a { color: var(--text); text-decoration: none; }
.salon-card__rating { font-size: 13.5px; }
.salon-card__facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.salon-card__facts span { display: inline-flex; align-items: center; gap: 4px; }
.top-rated { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 6px; background: #b8860b; color: #fff; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; }
.chip--static { cursor: default; min-height: 24px; font-size: 12px; }
.input--narrow { width: 72px; }
.rules ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.market--admin .table td { vertical-align: top; }
.market--admin .lock { min-height: 60vh; }
.book__back { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; color: var(--accent-strong); text-decoration: none; }
@media (max-width: 640px) {
  .salon-card { grid-template-columns: 72px minmax(0, 1fr); }
  .salon-card__photo { width: 72px; height: 72px; }
  .salon-card__go { grid-column: 1 / -1; }
  .market__brand h1 { font-size: 20px; }
}
.market__head .row { flex-wrap: nowrap; align-items: center; }
.market__head input[type="month"] { width: auto; }
.market .table a { color: var(--accent-strong); }
.rules { display: block; }
.rules strong { display: block; }

/* Services on a phone: the name on its own line, duration, price and «Удалить» under it. */
@media (max-width: 560px) {
  .table--with-actions, .table--with-actions tbody { display: block; }
  .table--with-actions tr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; column-gap: 14px; row-gap: 4px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
  .panel--table .table--with-actions td, .panel--table .table--with-actions td:first-child, .panel--table .table--with-actions td:last-child { display: block; width: auto; padding: 0; border: 0; }
  .table--with-actions td:first-child { grid-column: 1 / -1; }
  .table--with-actions td:nth-child(2) { text-align: left; }
}

/* Сверка */
.panel__pad { padding: 12px 16px; margin: 0; }
.reconcile__flags { display: grid; gap: 8px; }
.reconcile__flag { display: grid; gap: 3px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-left-width: 4px; border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.reconcile__flag--danger { border-left-color: var(--danger); }
.reconcile__flag--warn { border-left-color: var(--warn, #b7791f); }
button.reconcile__flag { cursor: pointer; }
button.reconcile__flag:hover { border-color: var(--accent); }
.reconcile__stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.reconcile__panels { display: grid; gap: 14px; }
@media (max-width: 640px) { .reconcile__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.order-list { display: grid; gap: 6px; padding-left: 20px; margin: 0 0 12px; }
.order-list li > span:first-child { display: inline-block; min-width: 120px; }
.order-list li { display: list-item; }
.order-list .row { display: inline-flex; margin-left: 10px; }
.outbox { margin-top: 10px; }
.outbox ul { margin: 6px 0 0; padding-left: 0; list-style: none; display: grid; gap: 4px; font-size: 13px; }
.segmented--wrap { flex-wrap: wrap; max-width: 100%; height: auto; min-height: var(--control); }
.segmented--wrap .segmented__item { min-height: calc(var(--control) - 8px); }
@media (max-width: 640px) { .segmented--wrap { width: 100%; } .segmented--wrap .segmented__item { flex: 1 1 auto; } }

/* Currency plate */
.currency-picker { display: grid; gap: 10px; }
.currency-picker__group { display: grid; gap: 6px; }
.currency-picker__label { font-size: 12px; font-weight: 600; color: var(--muted); }
.currency-picker__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cur-chip { display: inline-flex; align-items: baseline; gap: 5px; min-height: 34px; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.cur-chip small { color: var(--muted); font-size: 11px; }
.cur-chip:hover { border-color: var(--accent); }
.cur-chip[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.cur-chip[aria-checked="true"] small { color: var(--on-accent); opacity: 0.85; }
.reminders { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.reminders h4 { margin: 0; }
.reminders__rows { display: grid; gap: 6px; }
.reminders__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.reminders__row .input--narrow { width: 84px; }
.input.input--unit { width: auto; min-width: 72px; }

/* Кабинет владельца */
.owner-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 14px; }
.owner-card { display: grid; gap: 4px; text-align: left; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.owner-card:hover { border-color: var(--accent); }
.owner-card__title { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 600; }
.owner-card__money { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.owner-card__line { color: var(--muted); font-size: 13px; }
.owner-card__more { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-strong); font-weight: 600; font-size: 13px; margin-top: 4px; }
.owner-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.owner-tile { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.owner-tile:hover { border-color: var(--accent); }
.owner-tile svg { color: var(--accent-strong); }

/* Головной центр */
.hq-tabs { margin: 0 0 14px; }
.hq-salons, .hq-reviews, .hq-decisions { display: grid; gap: 12px; }
/* Счета: the head office's invoices, a salon's invoices in its cabinet. */
.hq-invoices, .bills { display: grid; gap: 12px; }
.hq-invoice .panel__head h3 { overflow-wrap: anywhere; }
.hq-due { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.hq-due ul { margin: 6px 0 10px; padding-left: 18px; }
.bill { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.bill__lines { display: grid; gap: 8px; margin: 4px 0; padding: 0; list-style: none; }
.bill__lines li { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.bill__lines li:last-child { border-bottom: 0; padding-bottom: 0; }
.hq-salon .panel__head small { font-weight: 400; }
.hq-salon .dl { margin-bottom: 10px; }
.hq-rule { display: grid; gap: 8px; padding: 10px; border-radius: 8px; background: var(--surface-2); }
.hq-decision { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.review-admin.is-muted { opacity: 0.75; border-style: dashed; }
.input.input--auto { width: auto; }
.field--inline { display: inline-flex; align-items: center; gap: 6px; }
.field--inline .field__label { margin: 0; }

/* Analytics tables on a phone: one card per row — the name, then the figures with their labels. */
@media (max-width: 640px) {
  .table--stats, .table--stats tbody { display: block; width: 100%; }
  .table--stats thead { display: none; }
  .table--stats tr { display: grid; grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)); gap: 6px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table--stats tr:last-child { border-bottom: 0; }
  .panel--table .table--stats td, .panel--table .table--stats td:first-child, .panel--table .table--stats td:last-child { display: grid; gap: 2px; width: auto; padding: 0; border: 0; text-align: left; }
  .table--stats td:first-child { grid-column: 1 / -1; font-weight: 600; overflow-wrap: normal; }
  .table--stats td:not(:first-child)::before { content: attr(data-label); font-size: 11px; font-weight: 600; color: var(--muted); }
}
.reset-box, .idle-box { display: grid; gap: 6px; margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--surface-2); }
.reset-box p, .idle-box p { margin: 0; }
.reset-box__code { font-size: 18px; font-weight: 700; letter-spacing: 0.06em; padding: 2px 8px; border-radius: 6px; background: var(--surface); user-select: all; }
.idle-box { margin: 10px 0; }
.idle-box__rows { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.idle-box__row { display: inline-flex; align-items: center; gap: 8px; }
.recover { display: grid; gap: 8px; margin-top: 10px; padding: 12px; border-radius: 10px; background: var(--surface-2); }
.recover p { margin: 0; }
.idle-warning { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 1000; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn); font-weight: 600; box-shadow: 0 6px 20px rgb(0 0 0 / 0.15); }
.input.input--city { width: 150px; }

/* Головной центр: кликабельные цифры, связь, продвижение */
.stat--button { text-align: left; border: 0; font: inherit; color: inherit; cursor: pointer; background: var(--surface); }
.stat--button:hover { background: var(--surface-2); }
button.hq-decision { text-align: left; font: inherit; color: var(--text); background: var(--surface); cursor: pointer; }
button.hq-decision:hover { border-color: var(--accent); }
.hq-messages { display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
@media (max-width: 760px) { .hq-messages { grid-template-columns: 1fr; } }
.hq-threads { display: grid; align-content: start; gap: 6px; }
.hq-thread { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.hq-thread.is-active, .hq-thread:hover { border-color: var(--accent); background: var(--accent-soft); }
.hq-thread .bell__count { position: static; }
.hq-chat { display: grid; gap: 10px; align-content: start; }
.msgs { display: grid; gap: 8px; max-height: 420px; overflow-y: auto; padding: 4px; }
.msg { display: grid; gap: 4px; max-width: 85%; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); }
.msg p { margin: 0; }
.msg--out { justify-self: end; background: var(--accent-soft); }
.msg--ann { max-width: 100%; border: 1px solid var(--warn); background: var(--warn-soft); }
.hq-promo { display: grid; gap: 10px; margin-bottom: 14px; }
.hq-promo h4 { margin: 4px 0 0; }
.hq-promo__text { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); }
.hq-promo__code { display: block; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); font-size: 12px; overflow-wrap: anywhere; user-select: all; }
.hq-promo .row .input { flex: 1; min-width: 0; }

/* «Правила посещения»: the check of the salon's text, the common part, the archive. */
.rules-check { display: grid; gap: 8px; margin: 10px 0; }
.rules-check .callout span { display: block; }
.rules-common { margin-top: 12px; }
.rules-common summary { cursor: pointer; font-weight: 600; }
.rules-archive { margin-top: 14px; }
.rules-archive h4 { margin: 0 0 4px; font-size: 14px; }
.plain-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.plain-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; overflow-wrap: anywhere; }

/* The client's rating: a badge in lists and the card, a block on «Надёжность». */
.pill--rating { font-weight: 600; white-space: nowrap; border: 0; cursor: default; }
button.pill--rating { cursor: pointer; }
.pill--muted { background: var(--surface-2, rgba(127, 127, 127, 0.12)); color: var(--muted); }
.pill__mark { font-weight: 800; }
.rating-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.rating-panel__main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.rating-panel__main h3 { margin: 0 0 2px; }
.rating-panel__main p { margin: 0; }
.rating-panel__value { display: grid; place-items: center; min-width: 64px; height: 64px; padding: 0 8px; border-radius: 14px; font-size: 26px; font-weight: 800; background: var(--surface-2, rgba(127, 127, 127, 0.12)); color: var(--muted); }
.rating-panel__value--like { background: var(--ok-soft); color: var(--ok); }
.rating-panel__value--warn { background: var(--warn-soft); color: var(--warn); }
.rating-panel__value--dislike { background: var(--danger-soft); color: var(--danger); }
.star-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.star-pick__row { display: flex; gap: 4px; }
.star-pick__star { width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; font-size: 34px; line-height: 1; color: var(--line); cursor: pointer; }
.star-pick__star.is-on { color: var(--amber-line); }
.star-pick__star:hover, .star-pick__star:focus-visible { background: var(--surface-2, rgba(127, 127, 127, 0.1)); }
.star-pick__word { color: var(--muted); font-size: 14px; }
.input--short { width: 90px; }
.form-section--who { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; }
.visitor-result { display: grid; gap: 8px; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.visitor-result h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 15px; }

/* «Новости сети»: posts of the head office and of partner salons. */
.pill--neutral { background: var(--surface-2, rgba(127, 127, 127, 0.12)); color: var(--muted); }
.news-feed, .news-side { display: grid; gap: 12px; align-content: start; min-width: 0; }
.news-card { display: grid; gap: 8px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow-wrap: anywhere; }
.news-card.is-new { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.news-card--important { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.news-card h3 { margin: 0; font-size: 16px; }
.news-card p { margin: 0; }
.news-card__when { color: var(--text); font-weight: 600; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.news-card__answer { display: grid; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.news-card__answer .input { flex: 1 1 220px; min-width: 0; }
.hq-post-salons { display: grid; gap: 4px; margin-top: 6px; }
.hq-post-salons div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.terms-full summary { cursor: pointer; font-weight: 600; }
.terms-full .book__privacy { margin-top: 8px; max-height: 420px; overflow: auto; padding-right: 6px; }

/* «Готовность к запуску» in the owner's cabinet. */
.ready__list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.ready__item { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.ready__item.is-ok { opacity: 0.75; }
.ready__text { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.ready__mark { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-weight: 800; font-size: 13px; }
.ready__mark--ok { background: var(--ok-soft); color: var(--ok); }
.ready__mark--must { background: var(--danger-soft); color: var(--danger); }
.ready__mark--should { background: var(--warn-soft); color: var(--warn); }
.stack { display: grid; gap: 16px; align-content: start; min-width: 0; }
.terms-text { margin-top: 10px; max-height: 480px; overflow: auto; padding-right: 6px; }
/* «Кто что делает»: services on the left, a column per master */
.board__grid { display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: 16px; align-items: start; }
.board__list { max-height: 70vh; overflow: auto; padding-right: 4px; }
.board__group { margin: 10px 0; }
.board__group-title { display: flex; gap: 6px; align-items: center; padding: 6px 8px; border-radius: 8px; cursor: grab; }
.board__item { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 6px 8px; margin: 3px 0; border: 1px solid var(--line, #ddd); border-radius: 8px; background: var(--surface, #fff); cursor: grab; font-size: 13.5px; }
.board__item.is-orphan { border-color: var(--warn, #c77700); }
.board__item.is-picked, .board__group-title.is-picked { outline: 2px solid var(--accent-strong); }
.board__who { display: flex; gap: 3px; flex: none; }
.board__dot { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft, #e6f2ee); font-size: 10.5px; font-weight: 700; }
.board__none { color: var(--warn, #c77700); }
.board__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.board__col { border: 1.5px dashed var(--line, #ccc); border-radius: 12px; padding: 10px; min-height: 160px; display: flex; flex-direction: column; gap: 8px; }
.board__col.is-over { border-color: var(--accent-strong); background: var(--accent-soft, #e6f2ee); }
.board__col-head { display: flex; gap: 8px; align-items: center; }
.board__chips { display: flex; flex-direction: column; gap: 4px; }
.board__chip { display: flex; justify-content: space-between; gap: 6px; align-items: center; padding: 4px 4px 4px 8px; border-radius: 8px; background: var(--surface-2, #f3f5f4); font-size: 13px; cursor: grab; }
.board__x { border: 0; background: none; font-size: 17px; line-height: 1; padding: 2px 6px; cursor: pointer; color: var(--muted, #667); }
@media (max-width: 760px) { .board__grid { grid-template-columns: 1fr; } .board__list { max-height: 45vh; } }

/* Booking: the stylist's way to the calendar, the nearest times, a month of days */
.master__calendar { justify-self: start; position: relative; z-index: 1; pointer-events: auto; margin-top: 6px; }
.nearest { display: grid; gap: 8px; margin-bottom: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.nearest { min-width: 0; }
.nearest .chips { flex-wrap: wrap; overflow: visible; }
.nearest h3 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 15px; }
.nearest .chip small { color: var(--muted); font-weight: 500; margin-right: 5px; }
.cal__note { margin: 4px 0 8px; }
.cal { display: grid; gap: 8px; max-width: 380px; min-width: 0; }
.cal__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cal__head strong { font-family: var(--font-display); font-size: 16px; text-transform: capitalize; }
.cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal__wd { text-align: center; font-size: 12px; color: var(--muted); padding-bottom: 2px; }
.cal__day { height: 42px; min-width: 0; padding: 0; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 600; font-size: 15px; }
.cal__day.is-free { border-color: var(--line-strong); background: var(--surface); color: var(--text); cursor: pointer; }
.cal__day.is-free:hover { border-color: var(--accent); }
.cal__day.is-today { box-shadow: inset 0 -3px 0 var(--accent); }
.cal__day.is-active { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #fff); }
.cal__day:disabled { opacity: .45; cursor: default; }

/* Booking: the stylists in full, with their services, prices and «Book» */
.segmented--browse { margin-bottom: 12px; }
.profiles { display: grid; gap: 14px; }
.profile { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); min-width: 0; }
.profile__head { display: flex; gap: 14px; align-items: center; }
.profile__who { display: grid; gap: 2px; min-width: 0; }
.profile__who h3 { margin: 0; font-size: 18px; }
.profile__bio { margin: 0; white-space: pre-line; color: var(--text); line-height: 1.5; }
.profile__services { display: grid; gap: 8px; }
.profile__services h4 { margin: 4px 0 0; }
.profile__group { display: grid; gap: 4px; }
.profile__cat { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-top: 4px; }
.profile__svc { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.profile__svc-text { display: grid; gap: 1px; flex: 1 1 auto; min-width: 0; }
.profile__svc .svc__price { white-space: nowrap; }
.profile__svc .btn { flex: none; }

.sync-line { margin: 0 0 10px; }

/* Journal: back, forward and home in the top bar; the salon's name is a button home */
.history-nav { display: inline-flex; gap: 2px; align-items: center; }
button.brand { border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 10px; }
button.brand:hover .brand__mark { filter: brightness(1.08); }
button.brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Booking: ← → beside the steps; the salon's name leads back to the start */
.book__steps { display: flex; align-items: center; gap: 8px; min-width: 0; }
.book__steps .stepper { flex: 1 1 auto; min-width: 0; }
.book__nav { display: inline-flex; gap: 2px; flex: none; }
.book__home { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.book__home:hover { color: var(--accent-strong); }
