/* Mane London: tokens follow the agreed demo (salon-demo/index.html) */
:root {
  --bg: #F2F5F4;
  --surface: #FFFFFF;
  --surface-2: #E8EEEC;
  --ink: #16201F;
  --muted: #5A6866;
  --line: #D3DCD9;
  --accent: #0E6A62;
  --accent-hover: #0B5852;
  --accent-ink: #FFFFFF;
  --accent-soft: #D5ECE7;
  --good: #24774A;
  --good-soft: #DDF1E5;
  --warn: #A8650F;
  --warn-soft: #FBEBD2;
  --bad: #B8322A;
  --bad-soft: #F8DEDB;
  --focus: #0E6A62;
  --brand-bg: #0E6A62;
  --brand-ink: #FFFFFF;
  --f-display: "Young Serif", Georgia, "Times New Roman", serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --r: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1413;
    --surface: #162020;
    --surface-2: #1E2A29;
    --ink: #E4EDEB;
    --muted: #93A4A1;
    --line: #2A3836;
    --accent: #4DBFB1;
    --accent-hover: #6ACFC2;
    --accent-ink: #06211E;
    --accent-soft: #163B37;
    --good: #5CC88A;
    --good-soft: #17301F;
    --warn: #E3A44A;
    --warn-soft: #33270F;
    --bad: #F07C72;
    --bad-soft: #3A1B18;
    --focus: #4DBFB1;
    --brand-bg: #133A36;
    --brand-ink: #E4EDEB;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2 { font-family: var(--f-display); font-weight: 400; letter-spacing: .005em; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: var(--f-mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Sign-in screens ---------- */
.auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
}
.auth-brand {
  background: var(--brand-bg);
  color: var(--brand-ink);
  padding: 28px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.brand-row { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  background: var(--brand-ink); color: var(--brand-bg);
  font-family: var(--f-display); font-size: 1.25rem;
}
.brand-name { font-family: var(--f-display); font-size: 1.5rem; line-height: 1.1; }
.auth-brand .tag { opacity: .85; font-size: .95rem; margin: 0; }
.auth-brand .address { display: none; }

.auth-main {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 28px 16px 40px;
}
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 1.75rem; margin-bottom: 6px; }
.auth-card .lead { color: var(--muted); margin: 0 0 24px; }

@media (min-width: 860px) {
  .auth { grid-template-columns: minmax(320px, 5fr) 7fr; grid-template-rows: none; }
  .auth-brand { padding: 48px; justify-content: space-between; }
  .auth-brand .tag { font-size: 1.05rem; max-width: 22ch; }
  .brand-mark { width: 48px; height: 48px; font-size: 1.5rem; }
  .brand-name { font-size: 2rem; }
  .auth-brand .address { display: block; opacity: .8; font-size: .9rem; margin: 0; }
  .auth-main { align-items: center; padding: 48px; }
}

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field .hint { color: var(--muted); font-size: .85rem; margin-top: 6px; }
.input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  transition: border-color .15s;
}
.input:hover { border-color: var(--muted); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input[aria-invalid="true"] { border-color: var(--bad); }
.input.code { font-family: var(--f-mono); font-size: 1.4rem; letter-spacing: .35em; text-align: center; }
.field-error { color: var(--bad); font-size: .85rem; margin-top: 6px; }

.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 72px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--accent);
  font-weight: 600; font-size: .85rem; padding: 8px 10px; border-radius: 8px; cursor: pointer;
}
.pw-toggle:hover { background: var(--accent-soft); }

.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.label-row a { font-size: .875rem; font-weight: 500; }

.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 22px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.check span small { display: block; color: var(--muted); font-size: .85rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 18px;
  border: 1px solid transparent; border-radius: var(--r);
  font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); width: 100%; }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .875rem; }

.alert { border-radius: var(--r); padding: 12px 14px; margin-bottom: 20px; font-size: .925rem; }
.alert-bad { background: var(--bad-soft); color: var(--bad); }
.alert-good { background: var(--good-soft); color: var(--good); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert strong { display: block; }

.below { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .925rem; color: var(--muted); }

/* 2FA set-up */
.qr { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 8px; width: 200px; margin: 0 auto 12px; }
.qr svg { display: block; width: 100%; height: auto; }
.secret { text-align: center; font-family: var(--f-mono); font-size: .95rem; letter-spacing: .05em;
  background: var(--surface-2); border-radius: 8px; padding: 8px; margin-bottom: 20px; word-break: break-all; }
.steps { padding-left: 1.2em; margin: 0 0 20px; }
.steps li { margin-bottom: 6px; }

/* ---------- Signed-in app shell ---------- */
.app { min-height: 100vh; }
.rail { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px 12px;
  padding: 10px 16px 0; background: var(--surface); border-bottom: 1px solid var(--line);
}
.topbar .brand-mark, .rail .brand-mark { width: 32px; height: 32px; font-size: 1rem; background: var(--accent); color: var(--accent-ink); }
.topbar .brand-name, .rail .brand-name { font-size: 1.1rem; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.tabs { grid-column: 1 / -1; display: flex; gap: 2px; overflow-x: auto; margin: 0 -16px; padding: 0 10px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 8px 10px 10px; white-space: nowrap; font-weight: 600; font-size: .9rem;
  color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent;
}
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.tab.soon { opacity: .45; cursor: default; }

.av {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: grid; place-items: center; text-decoration: none;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .9rem;
}
.main { padding: 22px 16px 48px; max-width: 1240px; }

@media (min-width: 960px) {
  .app { display: grid; grid-template-columns: 232px minmax(0, 1fr); }
  .topbar { display: none; }
  .rail {
    display: flex; flex-direction: column; gap: 22px;
    position: sticky; top: 0; height: 100vh; overflow: auto;
    padding: 20px 14px; background: var(--surface); border-right: 1px solid var(--line);
  }
  .rail .brand-row { padding: 0 6px; }
  .main { padding: 32px 36px 56px; }
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  color: var(--muted); font-weight: 600; text-decoration: none;
}
.nav-item svg { width: 18px; height: 18px; flex: none; }
a.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--ink); }
.nav-item.soon { opacity: .5; cursor: default; }
.nav-item small { margin-left: auto; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.me { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.me-link { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.me-link:hover, .me-link[aria-current="page"] { background: var(--surface-2); color: var(--ink); }
.me-link b { display: block; font-size: .9rem; }
.me-link small { display: block; color: var(--muted); font-size: .78rem; }
.me form .btn { width: 100%; }

/* ---------- Page bits ---------- */
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.pagehead h1 { font-size: 1.65rem; line-height: 1.2; }
.pagehead p { margin: 4px 0 0; }
.label { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; margin: 0; }
.num { font-variant-numeric: tabular-nums; }

.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; min-width: 0; }
.kpi .v { font-family: var(--f-display); font-size: 1.65rem; line-height: 1.15; margin-top: 6px; }
.kpi .s { color: var(--muted); font-size: .82rem; margin-top: 2px; }

.dash { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .dash { grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); } }
.dash-side { display: grid; gap: 16px; min-width: 0; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; }
.panel.flush { padding: 0; }
.panel h2 { font-family: var(--f-body); font-size: 1rem; font-weight: 700; margin: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.panel-head.plain { padding: 0 0 10px; border-bottom: 0; }
.empty { color: var(--muted); margin: 0; padding: 18px 16px; }
.panel:not(.flush) .empty { padding: 0; }
.foot { margin: 0; padding: 10px 16px 14px; }
.badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--warn); color: #fff; font-size: .75rem; font-weight: 700; display: inline-grid; place-items: center; }

.pill { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.quiet { background: var(--surface-2); color: var(--muted); }

.appts { list-style: none; margin: 0; padding: 0; }
.appt { display: grid; grid-template-columns: 46px 4px minmax(0, 1fr) auto; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); align-items: start; }
.appt:first-child { border-top: 0; }
.appt.done { opacity: .62; }
.appt-time { font-weight: 600; font-size: .95rem; }
.appt-time small { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; }
.appt-bar { width: 4px; height: 100%; min-height: 36px; align-self: stretch; display: block; }
.appt-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.appt-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.appt-tags:empty { display: none; }
.appt-price { font-weight: 600; }

.attn { list-style: none; margin: 0; padding: 0; }
.attn li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line); }
.attn li:first-child { border-top: 0; padding-top: 0; }
.attn li.more { padding-left: 18px; }
.attn small { display: block; color: var(--muted); font-size: .84rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); }

.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 10px 16px 8px; }
.table td { padding: 9px 16px; border-top: 1px solid var(--line); }
.table tfoot td { font-weight: 700; }
.table .r { text-align: right; }
.sw { display: inline-block; width: 10px; height: 10px; margin-right: 8px; vertical-align: -1px; }

.activity { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.activity li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.activity li:first-child { border-top: 0; padding-top: 0; }
.activity small { white-space: nowrap; }

.devices { list-style: none; margin: 0; padding: 0; }
.devices li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.devices li:first-child { border-top: 0; }
.page-narrow { max-width: 720px; }
.secret-hint { text-align: center; margin: 0 0 6px; }
.after-list { margin-top: 12px; }
@media (max-width: 719px) { .kpi .label { letter-spacing: .04em; } .kpi .v { font-size: 1.45rem; } }

/* ---------- Shared bits for the interactive screens ---------- */
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 12px; }
.grid3 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 12px; }
@media (min-width: 520px) { .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.btn-inline { width: auto; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn:disabled { opacity: .55; cursor: progress; }
.input-sm { min-height: 36px; padding: 6px 10px; width: auto; }
select.input { appearance: auto; }
textarea.input { min-height: 0; resize: vertical; font: inherit; }
.field { display: block; }
.flabel { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field .hint { display: block; }
.inline { display: inline-flex; align-items: center; gap: 6px; }
.inline .input { width: 80px; }
.linkbtn { border: 0; background: none; padding: 0 2px; color: var(--accent); font-weight: 600; cursor: pointer; font-size: .82rem; }
.note { padding: 10px 12px; border-radius: 8px; background: var(--accent-soft); font-size: .9rem; margin: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .92rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.tight { margin: 6px 0 8px; padding-left: 1.2em; }
.table.compact td { padding: 7px 0; }
.table.compact tfoot td { border-top: 2px solid var(--line); }
[hidden] { display: none !important; }

.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 140%);
  background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 10px; font-weight: 600; font-size: .92rem;
  max-width: min(92vw, 520px); z-index: 80; transition: transform .2s; box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.toast.show { transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); color: #fff; }
.toast.warn { background: var(--warn); color: #fff; }

.scrim { position: fixed; inset: 0; background: rgba(10, 16, 15, .45); z-index: 50; display: flex; justify-content: flex-end; }
.sheet {
  background: var(--bg); width: min(480px, 100%); height: 100%; overflow: auto;
  padding: 18px 16px calc(30px + env(safe-area-inset-bottom, 0px)); box-shadow: -8px 0 30px rgba(0,0,0,.2);
}
.sheet.wide { width: min(640px, 100%); }
.sheet-head { display: flex; justify-content: space-between; gap: 10px; align-items: start; margin-bottom: 14px; }
.sheet-head h2 { font-size: 1.4rem; }
.sheet-body { display: flex; flex-direction: column; gap: 14px; }
.sheet-body .field { margin-bottom: 0; }
.sheet-body .check { margin: 0; }
.x { border: 0; background: var(--surface-2); width: 36px; height: 36px; border-radius: 50%; font-size: 1.2rem; flex: none; cursor: pointer; }
.panel-sub { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.panel-sub h3 { font-size: .95rem; margin: 0; display: inline; }
.panel-sub > summary { cursor: pointer; }
details.panel-sub:not([open]) { gap: 0; }
.sticky-actions { position: sticky; bottom: -30px; background: var(--bg); padding: 10px 0; }
.hist { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.hist li { padding: 7px 0; border-top: 1px solid var(--line); }
.hist li:first-child { border-top: 0; }
.hist small { display: block; color: var(--muted); }

.picker .results { display: flex; flex-direction: column; margin-top: 6px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.picker .results:empty { display: none; }
.result { text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 9px 12px; cursor: pointer; }
.result:hover, .result:focus-visible { background: var(--surface-2); }
.result small, .picked small { display: block; color: var(--muted); }
.picked { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.newclient { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.newclient .grid2 { gap: 8px; }
.newclient .check { margin: 0; }
.svcpick { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); max-height: 340px; overflow: auto; margin-top: 6px; }
.svcpick details { border-top: 1px solid var(--line); }
.svcpick details:first-child { border-top: 0; }
.svcpick summary { padding: 9px 12px; font-weight: 600; cursor: pointer; }
.svc { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 7px 12px 7px 16px; cursor: pointer; }
.svc:hover { background: var(--surface-2); }
.svc input { width: 18px; height: 18px; accent-color: var(--accent); }
.svc small { display: block; color: var(--muted); font-size: .8rem; }
.chosen { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chosen:empty { display: none; }

/* ---------- Diary ---------- */
.diary .pagehead { flex-wrap: wrap; }
.dtool { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(40px, 1fr)); gap: 4px; flex: 1 1 340px; max-width: 520px; }
.week button { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 5px 2px; display: flex; flex-direction: column; align-items: center; line-height: 1.15; cursor: pointer; }
.week button small { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.week button b { font-family: var(--f-mono); font-size: 1rem; font-weight: 500; }
.week button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.week button.on small { color: inherit; opacity: .85; }
.week button.today:not(.on) { border-color: var(--accent); }
.week button.closed { opacity: .5; }
.working { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-bottom: 12px; font-size: .86rem; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; }
.chip small { font-weight: 400; }
.chip.off { border-style: dashed; color: var(--muted); }
.av-sm { width: 24px; height: 24px; font-size: .7rem; }
.gridwrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); -webkit-overflow-scrolling: touch; }
.dgrid { display: grid; grid-template-columns: 48px repeat(var(--cols), minmax(140px, 1fr)); min-width: max-content; }
.dgrid .head { position: sticky; top: 0; z-index: 6; padding: 10px 8px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; font-weight: 700; background: var(--surface); }
.dgrid .head small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; }
.dgrid .corner { padding: 0; }
.tcol { position: relative; border-right: 1px solid var(--line); }
.tcol span { position: absolute; right: 6px; font-family: var(--f-mono); font-size: .68rem; color: var(--muted); transform: translateY(-50%); }
.tcol span:first-child { transform: none; }
.cbody {
  position: relative; border-right: 1px solid var(--line); cursor: copy;
  background-image:
    repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(to bottom, transparent 0 48px, color-mix(in srgb, var(--line) 50%, transparent) 48px 49px, transparent 49px 96px);
}
.cbody.ro { cursor: default; }
.cbody:last-child { border-right: 0; }
.cbody.drop { background-color: var(--accent-soft); }
.shade { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--muted) 10%, transparent) 0 4px, transparent 4px 10px); }
.offblock { position: absolute; left: 0; right: 0; background: color-mix(in srgb, var(--muted) 18%, var(--surface)); color: var(--muted); font-size: .75rem; font-weight: 600; padding: 4px 8px; pointer-events: none; }
.ap {
  position: absolute; left: 3px; right: 3px; border: 0; border-left: 4px solid var(--c);
  background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: var(--ink); border-radius: 6px;
  padding: 3px 6px; text-align: left; overflow: hidden; display: flex; flex-direction: column; gap: 1px;
  font-size: .76rem; line-height: 1.25; cursor: pointer; z-index: 2; touch-action: pan-x pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.ap:hover { box-shadow: 0 2px 8px rgba(0,0,0,.18); z-index: 3; }
.ap > span:not(.proc) { position: relative; z-index: 1; }
.ap .t { font-family: var(--f-mono); font-size: .68rem; color: var(--muted); }
.ap .n { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap .s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap .ic { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 1px; }
.ap.short { flex-direction: row; align-items: center; gap: 6px; padding-block: 0; }
.ap.short .s, .ap.short .ic { display: none; }
.ap.tiny { font-size: .64rem; }
.ap.tiny .t { display: none; }
.ap.done { opacity: .6; }
.ap.held { border-left-style: dashed; }
.ap.dragging { opacity: .35; }
.ap.lifted { box-shadow: 0 0 0 3px var(--accent); }
.ap.ghost { position: fixed; z-index: 90; pointer-events: none; opacity: .92; box-shadow: 0 10px 28px rgba(0,0,0,.3); height: auto !important; min-height: 40px; }
.ap .proc {
  position: absolute; left: 0; right: 0; z-index: 0;
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 30%, transparent) 0 6px, transparent 6px 12px);
  border-top: 1px dashed var(--c); border-bottom: 1px dashed var(--c);
  font-size: .66rem; color: var(--muted); padding: 2px 6px; display: flex; align-items: flex-end;
}
.mini { display: inline-flex; align-items: center; justify-content: center; height: 16px; min-width: 16px; padding: 0 4px; border-radius: 4px; background: var(--surface); color: var(--ink); font-size: .6rem; font-weight: 700; border: 1px solid var(--line); }
.mini.bad { color: var(--bad); }
.mini.warn { color: var(--warn); }
.nowline { position: absolute; left: 0; right: 0; height: 2px; background: var(--bad); z-index: 4; pointer-events: none; }
.nowline::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: .8rem; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: color-mix(in srgb, var(--c) 22%, var(--surface)); border-left: 3px solid var(--c); vertical-align: -2px; margin-right: 5px; }
.legend .hatch { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--muted) 40%, transparent) 0 4px, transparent 4px 8px); border: 1px dashed var(--muted); }
.closedday { padding: 48px 20px; text-align: center; color: var(--muted); }
.closedday h2 { font-size: 1.3rem; color: var(--ink); }
@media (max-width: 719px) { .dgrid { grid-template-columns: 40px repeat(var(--cols), minmax(124px, 1fr)); } }
.panel-sub > .btn, .panel-sub > .row { align-self: flex-start; }
.panel-sub p { margin: 0; }

/* ---------- Clients ---------- */
.crumbs { margin: 0 0 6px; font-size: .88rem; }
.crumbs a { text-decoration: none; }
.crumbs a::before { content: "‹ "; }
.searchbar { display: flex; gap: 8px; margin-bottom: 8px; max-width: 640px; }
.tablewrap { overflow-x: auto; }
.table.clickable tbody tr:hover td { background: var(--surface-2); }
.rowlink { color: var(--ink); text-decoration: none; }
.rowlink:hover { color: var(--accent); }
.block { display: block; }
.nowrap { white-space: nowrap; }
.between { justify-content: space-between; }
.tagrow { margin-top: 8px; }
.dot.good { background: var(--good); }
.formulas { list-style: none; margin: 0 0 12px; padding: 0; }
.formulas li { padding: 10px 0; border-top: 1px solid var(--line); }
.formulas li:first-child { border-top: 0; padding-top: 0; }
.formula { white-space: pre-wrap; font-family: var(--f-mono); font-size: .86rem; background: var(--surface-2); border-radius: 8px; padding: 8px 10px; margin: 6px 0; }
.addbox > summary { list-style: none; display: inline-flex; }
.addbox > summary::-webkit-details-marker { display: none; }
.addbox[open] > summary { margin-bottom: 12px; }
.panel form .btn-sm { margin-top: 4px; }
.panel > h2 + p, .panel > h2 + form, .panel > h2 + ul { margin-top: 10px; }
.panel textarea.input { margin-bottom: 4px; }
.planrow { padding: 8px 0; border-top: 1px solid var(--line); }
.planrow:first-of-type { border-top: 0; }
.inline-form { display: inline; }
.panel .field label { font-size: .85rem; }

/* ---------- Checkout ---------- */
.checkout .panel { margin-bottom: 14px; }
.checkout h3 { font-size: .9rem; margin: 14px 0 6px; }
.coline { padding: 10px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.coline:first-of-type { border-top: 0; }
.coline .input-sm[type=number] { width: 76px; }
.coline .input-sm:not([type=number]) { flex: 1 1 180px; }
.prodrow, .payrow { padding: 6px 0; }
.prodrow .input-sm, .payrow .input-sm[type=number] { width: 90px; }
.grow { flex: 1 1 160px; }
.co-sum .big { font-family: var(--f-display); font-size: 1.6rem; font-weight: 400; }
.warn-text { color: var(--warn); }
.done-panel h2 { font-family: var(--f-display); font-weight: 400; font-size: 1.4rem; }
.done-panel p { margin: 8px 0 14px; }
.payrow select.input, .prodrow select.input { width: auto; flex: 1 1 200px; }
.payrow .input-sm:not([type=number]) { width: 150px; }

/* ---------- Money ---------- */
.seg { display: inline-flex; gap: 2px; background: var(--surface-2); padding: 3px; border-radius: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.seg a { padding: 7px 14px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .9rem; }
.seg a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.table td.up { color: var(--good); }
.table td.down { color: var(--bad); }
.bars { list-style: none; margin: 10px 0 0; padding: 0; }
.bars li { display: grid; grid-template-columns: 110px minmax(0, 1fr) 40px; gap: 10px; align-items: center; padding: 4px 0; font-size: .9rem; }
.bars meter { width: 100%; height: 12px; }
.bars b { text-align: right; }
.breakdown .table td { vertical-align: top; }
.breakdown tr.cont td { border-top: 1px dashed var(--line); }
.panel.flush + .panel, .panel + .panel.flush, .panel.flush + .panel.flush, .panel + .panel { margin-top: 16px; }

/* ---------- Public booking site ---------- */
.pub-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pub-head .brand-row { text-decoration: none; color: var(--ink); }
.pub-head .brand-mark { width: 34px; height: 34px; font-size: 1.05rem; background: var(--accent); color: var(--accent-ink); }
.pub-head .brand-name { font-size: 1.2rem; }
.pub-nav { display: flex; gap: 4px; }
.pub-nav a { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 600; }
.pub-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); }
.pub-main { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }
.pub-main h1 { font-size: 1.9rem; margin-bottom: 6px; }
.pub-main .lead { color: var(--muted); margin: 0 0 18px; }
.pub-foot { text-align: center; padding: 20px 16px 30px; }
.bsteps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 16px 0 18px; flex-wrap: wrap; counter-reset: s; }
.bsteps li { counter-increment: s; font-size: .82rem; font-weight: 600; color: var(--muted); padding: 4px 10px; border-radius: 99px; background: var(--surface-2); }
.bsteps li::before { content: counter(s) ". "; }
.bsteps li.on { background: var(--accent); color: var(--accent-ink); }
.bsteps li.done { color: var(--accent); background: var(--accent-soft); }
.stage h2 { font-size: 1.35rem; margin: 0 0 14px; outline: none; }
.stage { display: flex; flex-direction: column; gap: 14px; }
.stage .field { margin: 0; }
.choices, .stylists { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; }
.choice:hover, .choice.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.choice b { font-size: 1.05rem; }
.choice span:not(.av) { color: var(--muted); font-size: .9rem; }
.choice .av { width: 42px; height: 42px; margin-bottom: 4px; }
.svcpick.big { max-height: none; }
.bsummary { padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.bsummary p { margin: 4px 0 0; }
.bnav { justify-content: space-between; }
.bnav .btn-primary { width: auto; }
.days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.dbtn { flex: none; width: 58px; display: flex; flex-direction: column; align-items: center; padding: 6px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; line-height: 1.2; }
.dbtn b { font-family: var(--f-mono); font-size: 1.1rem; font-weight: 500; }
.dbtn small { font-size: .7rem; color: var(--muted); text-transform: uppercase; }
.dbtn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.dbtn.on small { color: inherit; }
.dbtn.none { opacity: .4; cursor: default; }
.dayarrow { flex: none; width: 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 1.2rem; cursor: pointer; }
.dayarrow:disabled { opacity: .3; }
.slots h3 { margin: 4px 0 6px; font-size: 1rem; }
.slotgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; margin-bottom: 10px; }
.slot { padding: 10px 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-family: var(--f-mono); cursor: pointer; }
.slot:hover, .slot.on { border-color: var(--accent); background: var(--accent-soft); }
.recap p { margin: 4px 0 0; }
.manage h1 { font-size: 1.7rem; }
.manage .panel { margin-bottom: 14px; }
.manage .btn-primary { margin-bottom: 14px; }
.amounts { border: 0; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.amt input { position: absolute; opacity: 0; }
.amt span { display: inline-block; padding: 10px 18px; border: 1px solid var(--line); border-radius: 10px; font-weight: 700; cursor: pointer; background: var(--surface); }
.amt input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.amt input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Messages */
.msgbody { white-space: pre-wrap; font: inherit; font-size: .875rem; background: var(--surface-2); padding: 10px 12px; border-radius: 10px; margin: 6px 0 0; max-width: 60ch; }

/* Stock */
.table tr.group th { background: var(--surface-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.check.inline { display: inline-flex; margin: 0; }

/* Setup */
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -1px; }
.input.colour { width: 52px; padding: 2px; }
.input.narrow { width: 80px; }
.rota-grid td, .rota-grid th { padding: 6px 8px; }
.rota-grid input[type=time] { width: 110px; }
.setting { display: flex; gap: 12px; align-items: flex-end; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.setting .field { flex: 1; margin: 0; }
