/* Layout: console shell — fixed brown rail (left), breadcrumb top bar, cream canvas with white hairline cards.
   Palette, type and square edges follow dev.hairmeup.pl (hmu-palette.css). */
:root {
  --bg: #fdf4ee;
  --surface: #ffffff;
  --surface-2: #fffaf6;
  --tint: #fff1e8;
  --peach: #ffd5bf;
  --line: #f0e3da;
  --line-2: #e4cfc1;
  --ink: #2c2c2c;
  --ink-2: #4a3c35;
  --muted: #6f5c52;
  --faint: #a8967f;
  --accent: #973f12;
  --accent-2: #7d3210;
  --grad-btn: linear-gradient(100deg, #7d3210, #99461b);
  --focus: rgba(151, 63, 18, .38);
  --rail-1: #401908;
  --rail-2: #5d270b;
  --rail-ink: #ffe9dd;
  --rail-dim: rgba(255, 233, 221, .68);
  --rail-hover: rgba(255, 233, 221, .07);
  --rail-active: rgba(255, 213, 191, .16);
  --rail-line: rgba(255, 233, 221, .12);
  --ok: #2f6a3e; --ok-bg: #e9f2e5; --ok-line: #c2dbb9;
  --bad: #b42318; --bad-bg: #fde9e5; --bad-line: #f1bcb1;
  --warn: #8a5300; --warn-bg: #fdf1da; --warn-line: #ecd29d;
  --salon-0: #973f12; --salon-1: #2f6466; --salon-2: #6a4f8a; --salon-3: #7b6a12;
  --av-s: 52%; --av-l: 90%; --av-ts: 45%; --av-tl: 30%;
  --hatch: rgba(74, 60, 53, .07);
  --shadow: 0 1px 2px rgba(64, 25, 8, .06), 0 12px 32px rgba(64, 25, 8, .12);
  --scrim: rgba(44, 20, 8, .38);

  --f-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --f-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --r: 2px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #150d09; --surface: #1e140f; --surface-2: #221711; --tint: #2b1c14; --peach: #5b2f1b;
    --line: #33241b; --line-2: #4a3427; --ink: #fbeee6; --ink-2: #ecd9cc; --muted: #bda596; --faint: #8f7a6d;
    --accent: #f0a27a; --accent-2: #ffc4a6; --focus: rgba(240, 162, 122, .45);
    --rail-1: #110906; --rail-2: #2b150a;
    --ok: #93d3a3; --ok-bg: #17281b; --ok-line: #2f5236;
    --bad: #ff9d8f; --bad-bg: #321813; --bad-line: #6a2c22;
    --warn: #f1c46f; --warn-bg: #2e2310; --warn-line: #5e4a1d;
    --salon-0: #e98e5d; --salon-1: #7dbcbe; --salon-2: #baa1e2; --salon-3: #d8c25a;
    --av-s: 32%; --av-l: 27%; --av-ts: 60%; --av-tl: 84%;
    --hatch: rgba(255, 233, 221, .06);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px rgba(0, 0, 0, .5);
    --scrim: rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #150d09; --surface: #1e140f; --surface-2: #221711; --tint: #2b1c14; --peach: #5b2f1b;
  --line: #33241b; --line-2: #4a3427; --ink: #fbeee6; --ink-2: #ecd9cc; --muted: #bda596; --faint: #8f7a6d;
  --accent: #f0a27a; --accent-2: #ffc4a6; --focus: rgba(240, 162, 122, .45);
  --rail-1: #110906; --rail-2: #2b150a;
  --ok: #93d3a3; --ok-bg: #17281b; --ok-line: #2f5236;
  --bad: #ff9d8f; --bad-bg: #321813; --bad-line: #6a2c22;
  --warn: #f1c46f; --warn-bg: #2e2310; --warn-line: #5e4a1d;
  --salon-0: #e98e5d; --salon-1: #7dbcbe; --salon-2: #baa1e2; --salon-3: #d8c25a;
  --av-s: 32%; --av-l: 27%; --av-ts: 60%; --av-tl: 84%;
  --hatch: rgba(255, 233, 221, .06);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px rgba(0, 0, 0, .5);
  --scrim: rgba(0, 0, 0, .55);
  color-scheme: dark;
}

/* Reset the sandbox host page used to provide. */
body { margin: 0 }
img { max-width: 100% }
[hidden] { display: none !important }
:root { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom) }

html, body { height: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 14px/1.5 var(--f-ui); -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
svg.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.label { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100%; }
.rail {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
  background: linear-gradient(165deg, var(--rail-2), var(--rail-1) 70%); color: var(--rail-ink);
  padding-block: 18px 14px;
}
.org { display: flex; align-items: center; gap: 12px; padding: 0 18px 18px; border-bottom: 1px solid var(--rail-line); }
.org svg { width: 40px; height: 40px; flex: none; color: var(--rail-ink); }
.org b { display: block; font: 500 21px/1.1 var(--f-display); letter-spacing: .01em; }
.org small { color: var(--rail-dim); font-size: 12px; }
.navgroup { display: flex; flex-direction: column; gap: 2px; padding: 16px 10px 4px; }
.navgroup .glabel { font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--rail-dim); padding: 0 10px 6px; }
.navitem { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 6px 10px; border-radius: var(--r); color: var(--rail-dim); font-weight: 500; }
.navitem:hover { background: var(--rail-hover); color: var(--rail-ink); }
.navitem[aria-current="page"] { background: var(--rail-active); color: var(--rail-ink); box-shadow: inset 2px 0 0 var(--peach); }
.navitem .count { margin-left: auto; font-size: 11.5px; color: var(--rail-dim); font-variant-numeric: tabular-nums; }
.navitem .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px rgba(255, 233, 221, .18); }
.navitem .sub { display: block; font-size: 11.5px; font-weight: 400; color: var(--rail-dim); }
.rail-foot { margin-top: auto; padding: 14px 18px 0; border-top: 1px solid var(--rail-line); display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--rail-dim); }
.langsw { display: inline-flex; border: 1px solid var(--rail-line); border-radius: var(--r); }
.langsw button { padding: 3px 9px; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; color: var(--rail-dim); }
.langsw button[aria-pressed="true"] { background: var(--rail-active); color: var(--rail-ink); }
.footctl { display: inline-flex; align-items: center; gap: 10px; }
.logout { font-size: 12px; color: var(--rail-dim); }
.logout:hover { color: var(--rail-ink); text-decoration: underline; text-underline-offset: 3px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding-inline: 28px; background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.menubtn { display: none; width: 34px; height: 34px; align-items: center; justify-content: center; border: 1px solid var(--line-2); border-radius: var(--r); }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.crumbs b { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.crumbs .sep { color: var(--faint); }
.savestate { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.savestate::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.savestate[data-s="saving"]::before { background: var(--warn); }
.savestate[data-s="error"]::before, .savestate[data-s="local"]::before, .savestate[data-s="readonly"]::before { background: var(--bad); }
.savestate[data-s="loading"]::before { background: var(--faint); }

.content { width: 100%; max-width: 1320px; padding: 28px 28px 64px; display: flex; flex-direction: column; gap: 20px; }
.pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.pagehead h1 { margin: 2px 0 0; font: 500 38px/1.05 var(--f-display); letter-spacing: -.005em; color: var(--ink); text-wrap: balance; }
.pagehead p { margin: 6px 0 0; color: var(--muted); max-width: 62ch; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--ink-2); font-weight: 500; font-size: 13.5px; white-space: nowrap; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--grad-btn); border: 0; color: #fff; padding: 0 18px; letter-spacing: .01em; }
.btn.primary:hover { filter: brightness(1.08); color: #fff; }
.btn.danger { color: var(--bad); border-color: var(--bad-line); }
.btn.danger:hover { background: var(--bad-bg); color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.icon { width: 36px; padding: 0; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.weeknav { display: inline-flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); }
.weeknav button { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 34px; padding: 0 10px; color: var(--ink-2); font-size: 13px; font-weight: 500; }
.weeknav button + button { border-left: 1px solid var(--line); }
.weeknav button:hover { background: var(--tint); color: var(--accent); }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--tint); border-radius: var(--r); }
.seg button { padding: 5px 12px; border-radius: var(--r); font-size: 13px; font-weight: 500; color: var(--muted); }
.seg.wide { display: flex; }
.seg.wide button { flex: 1; text-align: center; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(64, 25, 8, .12); }
input.txt, select.txt { height: 36px; width: 100%; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--ink); }
input.txt::placeholder { color: var(--faint); }
input.txt:focus, select.txt:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.hint { font-size: 12.5px; color: var(--muted); margin: 0; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.cardhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.cardhead h2 { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.cardhead h2 .pill { font-weight: 600; }
.cardbody { padding: 18px; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 11.5px; font-weight: 600; background: var(--tint); color: var(--ink-2); white-space: nowrap; }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }

.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 18px; border: 1px solid var(--peach); background: var(--tint); border-radius: var(--r); }
.banner p { margin: 0; flex: 1 1 340px; color: var(--ink-2); }
.banner.bad { border-color: var(--bad-line); background: var(--bad-bg); }
.banner .actions { gap: 6px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.stat { padding: 16px 18px; min-width: 0; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat .v { display: block; margin-top: 6px; font: 500 34px/1 var(--f-display); color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.stat .v.bad { color: var(--bad); }
.stat .v.ok { color: var(--ok); }
.stat small { display: block; margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.meter { margin-top: 10px; height: 3px; background: var(--line); }
.meter i { display: block; height: 100%; background: var(--accent); }

.issues { list-style: none; margin: 0; padding: 0; }
.issues li { border-top: 1px solid var(--line); }
.issues li:first-child { border-top: 0; }
.issue { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 11px 18px; text-align: left; }
button.issue:hover { background: var(--surface-2); }
.issue svg { margin-top: 2px; }
.issue.bad svg { color: var(--bad); }
.issue.warn svg { color: var(--warn); }
.issue span { flex: 1; min-width: 0; color: var(--ink-2); }
.issue .go { flex: none; color: var(--faint); font-size: 12px; }
.morelink { display: block; width: 100%; padding: 10px 18px; border-top: 1px solid var(--line); color: var(--accent); font-weight: 500; font-size: 13px; }

.emptyplan { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px 28px; padding: 26px 24px; }
.emptyplan h3 { margin: 0; font: 500 26px/1.15 var(--f-display); color: var(--ink); }
.emptyplan p { margin: 6px 0 0; color: var(--muted); max-width: 60ch; }

/* ---------- schedule: by salon ---------- */
.sgrid { display: grid; grid-template-columns: 92px repeat(var(--cols), minmax(0, 1fr)); }
.sg-h { padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.sg-h + .sg-h { border-left: 1px solid var(--line); }
.sg-h b { font: 600 19px/1.1 var(--f-display); color: var(--ink); }
.sg-h small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sdot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; align-self: center; }
.sg-day { padding: 12px 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.sg-day .dnum { font: 500 30px/1 var(--f-display); color: var(--ink); font-variant-numeric: lining-nums; }
.sg-day .dname { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.sg-day .dmon { font-size: 12px; color: var(--muted); }
.sg-day.weekend .dname { color: var(--ink-2); }
.sg-cell { border-top: 1px solid var(--line); border-left: 1px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sg-cell .slabel { display: none; }
.closed { font-size: 12.5px; color: var(--faint); padding: 8px 4px; background: repeating-linear-gradient(135deg, transparent 0 6px, var(--hatch) 6px 7px); }
.slot { display: flex; flex-direction: column; gap: 8px; width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.slot:hover { border-color: var(--line-2); background: var(--tint); }
.slot.is-short { background: var(--bad-bg); border-color: var(--bad-line); }
.slot-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.slot-name { font-weight: 600; font-size: 12.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-hrs { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cov { margin-left: auto; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 10px; background: var(--ok-bg); color: var(--ok); font-variant-numeric: tabular-nums; }
.slot.is-short .cov { background: var(--surface); color: var(--bad); }
.slot.is-over .cov { background: var(--tint); color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.nobody { font-size: 12.5px; color: var(--bad); }
.slot-miss { font-size: 12px; color: var(--bad); font-weight: 500; }
.pc { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 26px; padding: 0 9px 0 3px; border-radius: 13px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink); white-space: nowrap; }
.pc .nm { overflow: hidden; text-overflow: ellipsis; }
.pc svg.i { width: 12px; height: 12px; color: var(--accent); }
.pc.away { border-style: dashed; }
.pc.extra { background: transparent; color: var(--muted); }
.av { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; font-size: 10.5px; font-weight: 600; background: hsl(var(--h) var(--av-s) var(--av-l)); color: hsl(var(--h) var(--av-ts) var(--av-tl)); }
.av.lg { width: 34px; height: 34px; font-size: 14px; }
.av.xl { width: 44px; height: 44px; font-size: 18px; }

/* ---------- schedule: by person ---------- */
.xscroll { overflow-x: auto; }
table.pt { width: 100%; min-width: 880px; border-collapse: separate; border-spacing: 0; }
.pt th, .pt td { border-top: 1px solid var(--line); padding: 0; text-align: left; vertical-align: middle; }
.pt thead th { border-top: 0; background: var(--surface-2); padding: 9px 8px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.pt thead th .dd { display: block; letter-spacing: 0; text-transform: none; font-weight: 500; font-size: 12px; color: var(--ink-2); }
.pt th.who, .pt td.who { position: sticky; left: 0; z-index: 1; background: var(--surface); width: 190px; min-width: 170px; border-right: 1px solid var(--line); }
.pt thead th.who { background: var(--surface-2); padding-left: 18px; }
.pt tr.grp td { background: var(--surface-2); padding: 8px 18px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.pt tr.grp td.who { background: var(--surface-2); }
.who .wp { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 18px; min-width: 0; }
.who .wp b { display: block; font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .wp small { display: block; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt td.c { padding: 4px; }
.pcell { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 1px; width: 100%; min-height: 46px; padding: 5px 8px; border: 1px solid transparent; border-radius: var(--r); font-size: 12px; color: var(--faint); }
.pcell:hover { border-color: var(--line-2); background: var(--tint); }
.pcell.on { background: color-mix(in srgb, var(--c) 9%, var(--surface)); border-color: color-mix(in srgb, var(--c) 24%, var(--surface)); color: var(--ink); }
.pcell .ps { display: flex; align-items: center; gap: 5px; font-weight: 600; font-size: 12px; color: var(--ink); min-width: 0; }
.pcell .ps i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.pcell .ps em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcell .pt2 { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pcell.cant { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--hatch) 6px 7px); color: var(--muted); }
.pcell.dayoff { color: var(--ink-2); font-weight: 500; }
.pcell .lk { position: absolute; top: 4px; right: 4px; color: var(--accent); }
.pcell .lk svg.i { width: 11px; height: 11px; }
.pcell .pm { position: absolute; bottom: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.pcell.wish { border: 1px dashed var(--warn-line); }
.pt td.tot { padding: 0 14px; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 13px; }
.pt td.tot b { font-weight: 600; }
.pt td.tot.bad b { color: var(--bad); }
.pt td.tot.warn b { color: var(--warn); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-hatch { width: 14px; height: 10px; background: repeating-linear-gradient(135deg, transparent 0 3px, var(--faint) 3px 4px); border: 1px solid var(--line-2); }
.lg-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }

/* ---------- team ---------- */
.tlist { display: flex; flex-direction: column; }
.tgroup { padding: 10px 18px; background: var(--surface-2); border-top: 1px solid var(--line); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); display: flex; align-items: center; gap: 8px; }
.tgroup:first-child { border-top: 0; }
.trow { display: grid; grid-template-columns: minmax(180px, 1.3fr) minmax(0, 1fr) minmax(0, 1.2fr) 74px 166px 16px; align-items: center; gap: 16px; width: 100%; padding: 10px 18px; border-top: 1px solid var(--line); }
.trow:hover { background: var(--surface-2); }
.tname { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tname b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tname small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsalons, .ttags { display: flex; flex-wrap: wrap; gap: 4px 10px; min-width: 0; font-size: 12.5px; color: var(--ink-2); }
.tsalons span { display: inline-flex; align-items: center; gap: 6px; }
.tsalons .home { font-weight: 600; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: var(--r); font-size: 12px; color: var(--ink-2); background: var(--surface); white-space: nowrap; }
.tlim { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mweek { display: flex; gap: 3px; }
.mweek span { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; border: 1px solid var(--line); border-radius: var(--r); color: var(--muted); background: var(--surface); }
.mweek .s1 { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.mweek .s2 { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.mweek .s3 { background: repeating-linear-gradient(135deg, var(--surface) 0 3px, var(--line-2) 3px 4px); color: var(--ink-2); }
.tgo { color: var(--faint); }

/* ---------- rules ---------- */
.rgrid { display: flex; flex-direction: column; gap: 20px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
table.st { border-collapse: separate; border-spacing: 0; min-width: 760px; width: 100%; }
.st th { padding: 8px 6px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: left; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.st th:first-child, .st td:first-child { padding-left: 18px; }
.st td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.st td.shn { min-width: 150px; }
.st .daycell { display: flex; flex-direction: column; gap: 4px; min-width: 82px; }
.st input.hrs { height: 30px; font-size: 12px; padding: 0 6px; font-variant-numeric: tabular-nums; }
.st .need { display: flex; align-items: center; gap: 4px; }
.st input.num { height: 30px; width: 48px; padding: 0 6px; font-size: 12.5px; text-align: center; font-variant-numeric: tabular-nums; }
.st .need small { font-size: 11px; color: var(--muted); }
.st tr.off input.hrs { opacity: .55; }
.reqs { display: flex; flex-direction: column; gap: 8px; }
.req { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.req input.num { width: 56px; height: 34px; text-align: center; }
.req select.txt { width: auto; min-width: 160px; }
.taglist { display: flex; flex-direction: column; }
.trule { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.trule:first-child { border-top: 0; }
.trule small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.addrow { display: flex; gap: 8px; margin-top: 12px; }
.confirm { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--bad); }

/* ---------- overlays ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); }
.scrim.enter { animation: fade .16s ease-out; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; z-index: 41; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100% - 32px)); max-height: min(78vh, 760px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.sheet.enter { animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -48%); } }
.sheethead { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.sheethead h3 { margin: 0; font: 500 24px/1.15 var(--f-display); color: var(--ink); }
.sheethead p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.sheethead .x { margin-left: auto; }
.sheetbody { overflow-y: auto; padding: 6px 0 10px; }
.sheetfoot { padding: 12px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.covline { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 18px 4px; }
.sgroup { padding: 12px 18px 6px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.prow { display: flex; align-items: center; gap: 12px; padding: 8px 18px; }
.prow:hover { background: var(--surface-2); }
.prow .pi { flex: 1; min-width: 0; }
.prow .pi b { display: block; font-weight: 500; font-size: 13.5px; }
.prow .pi small { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow.dim .pi b { color: var(--muted); }
.lockbtn { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r); color: var(--faint); border: 1px solid transparent; }
.lockbtn:hover { border-color: var(--line-2); }
.lockbtn[aria-pressed="true"] { color: var(--accent); background: var(--tint); }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 18px; }
.opt:hover { background: var(--surface-2); }
.opt .ob { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; display: inline-flex; align-items: center; justify-content: center; }
.opt[aria-checked="true"] .ob { border-color: var(--accent); }
.opt[aria-checked="true"] .ob::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.opt .oi { flex: 1; min-width: 0; }
.opt .oi b { display: flex; align-items: center; gap: 7px; font-weight: 500; }
.opt .oi small { display: block; color: var(--muted); font-size: 12px; }

.drawer { position: fixed; z-index: 41; top: 0; right: 0; bottom: 0; width: min(460px, 100%); display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow); padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.drawer.enter { animation: slide .2s ease-out; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.dhead { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.dhead h3 { margin: 0; font: 500 26px/1.1 var(--f-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dhead .x { margin-left: auto; }
.dbody { flex: 1; overflow-y: auto; padding: 18px 20px 28px; display: flex; flex-direction: column; gap: 22px; }
.dsec { display: flex; flex-direction: column; gap: 10px; }
.dsec > .label { color: var(--accent); }
.dfoot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.tgl { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r); font-size: 13px; color: var(--ink-2); background: var(--surface); }
.tgl[aria-pressed="true"] { border-color: var(--accent); background: var(--tint); color: var(--accent); font-weight: 500; }
.tgl .sdot { width: 8px; height: 8px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r); }
.stepper button { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); }
.stepper button:hover { color: var(--accent); background: var(--tint); }
.stepper output { min-width: 34px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.steps { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.steps label { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.dweek { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.dweek button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); font-size: 12px; font-weight: 600; color: var(--ink-2); }
.dweek button small { font-size: 10px; font-weight: 500; color: var(--muted); text-align: center; line-height: 1.2; }
.dweek .s1 { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.dweek .s2 { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.dweek .s3 { background: repeating-linear-gradient(135deg, var(--surface) 0 5px, var(--line) 5px 6px); color: var(--ink-2); }
.dweek .s1 small, .dweek .s2 small { color: inherit; }
.switch { display: flex; align-items: flex-start; gap: 12px; text-align: left; }
.switch .tr { width: 36px; height: 20px; border-radius: 10px; background: var(--line-2); position: relative; flex: none; margin-top: 1px; transition: background .15s; }
.switch .tr::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.switch[aria-checked="true"] .tr { background: var(--accent); }
.switch[aria-checked="true"] .tr::after { transform: translateX(16px); }
.switch b { display: block; font-weight: 500; font-size: 13.5px; color: var(--ink); }

.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); max-width: calc(100% - 32px); display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: var(--r); background: var(--ink); color: var(--bg); box-shadow: var(--shadow); font-size: 13.5px; }
.toast.enter { animation: up .2s ease-out; }
.toast svg { color: var(--peach); }
@keyframes up { from { opacity: 0; transform: translate(-50%, 8px); } }

.centerstate { padding: 56px 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; max-width: 640px; }
.centerstate h2 { margin: 0; font: 500 32px/1.1 var(--f-display); }
.centerstate p { margin: 0; color: var(--muted); }
.skel { height: 14px; background: linear-gradient(90deg, var(--line) 0, var(--tint) 50%, var(--line) 100%); background-size: 200% 100%; animation: sh 1.4s linear infinite; border-radius: var(--r); }
@keyframes sh { to { background-position: -200% 0; } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .trow { grid-template-columns: minmax(170px, 1.3fr) minmax(0, 1fr) 70px 166px 16px; }
  .trow .ttags { display: none; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; height: auto; width: 272px; transform: translateX(-102%); transition: transform .2s ease-out; padding-top: calc(18px + env(safe-area-inset-top, 0px)); }
  .rail.open { transform: none; box-shadow: var(--shadow); }
  .menubtn { display: inline-flex; }
  .topbar { padding-inline: 16px; }
  .content { padding: 20px 16px 56px; }
}
@media (max-width: 760px) {
  .pagehead h1 { font-size: 32px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .sgrid { grid-template-columns: minmax(0, 1fr); }
  .sg-h { display: none; }
  .sg-day { flex-direction: row; align-items: baseline; gap: 10px; background: var(--surface-2); padding: 10px 14px; }
  .sg-day .dnum { font-size: 24px; }
  .sg-cell { border-left: 0; border-top: 0; padding: 8px 12px 12px; }
  .sg-cell .slabel { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--ink-2); padding-top: 4px; }
  .trow { grid-template-columns: minmax(0, 1fr) auto 16px; gap: 12px; }
  .trow .tsalons, .trow .tlim { display: none; }
  .mweek span { width: 18px; height: 18px; font-size: 9.5px; }
  .emptyplan { grid-template-columns: minmax(0, 1fr); }
  .two { grid-template-columns: minmax(0, 1fr); }
  .sheet { top: auto; bottom: 0; left: 0; transform: none; width: 100%; max-height: 86vh; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .sheet.enter { animation: rise .2s ease-out; }
  @keyframes rise { from { transform: translateY(24px); opacity: 0; } }
}
@media (max-width: 420px) {
  .mweek { display: none; }
  .trow { grid-template-columns: minmax(0, 1fr) 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
