/* Arena staff system, Phase 2 clickable mockups.
   Layout: an ivory L-frame (sidebar + top bar) holds one white sheet per screen; one job per screen.
   Single light theme by choice: high contrast for older staff in a bright reception. */
:root {
  color-scheme: light;
  --frame: #F7F4EC;         /* ivory chrome */
  --frame-step: #EFEBE0;    /* hover/active inside the frame */
  --sheet: #FFFFFF;
  --edge: #E4DFD2;          /* sheet and card edge */
  --rule: #EEEAE0;          /* row rules */
  --control: #C9C4B5;       /* input and outlined button edge */
  --ink: #1B1F4B;           /* running text */
  --heading: #06106A;       /* night blue */
  --muted: #545A78;
  --blue: #0000A7;          /* royal blue: the one primary action, selection, main data */
  --blue-press: #00007E;
  --blue-tint: #E9EBFA;
  --blue-tint-2: #D5D9F5;
  --magenta: #AB2372;       /* the pole only */
  --ok: #1B6E3F; --ok-tint: #E5F2EA;
  --warn: #8A5200; --warn-tint: #FBF0DB;
  --danger: #A8231B; --danger-tint: #FBE8E6;
  --white: #FFFFFF;

  --ui: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --brand: "Bodoni Moda", "Bodoni MT", "Didot", Georgia, serif;

  --scale: 1;               /* A− / A+ */
  --fs-body: calc(18px * var(--scale));
  --fs-small: calc(16px * var(--scale));
  --fs-meta: calc(15px * var(--scale));
  --fs-h1: calc(28px * var(--scale));
  --fs-h2: calc(21px * var(--scale));
  --fs-figure: calc(30px * var(--scale));
  --btn-h: calc(52px * var(--scale));
  --field-h: calc(56px * var(--scale));
  --radius: 12px;
  --sheet-radius: 16px;
  --side: 252px;
  --top: 64px;

  /* one spacing scale (4px steps): every gap, padding and margin uses these */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px; --sp-7: 32px; --sp-8: 40px; --sp-9: 48px;
  --gutter: clamp(16px, 1.6vw + 10px, 40px);   /* page side padding: 16px on phones, up to 40px on wide screens */
  --page-max: 1440px;                          /* content width on big screens; the page is centred */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { min-height: 100%; }
img, svg { max-width: 100%; }
body {
  margin: 0;
  background: var(--frame);
  color: var(--ink);
  font-family: var(--ui);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--blue-tint-2); color: var(--heading); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { color: var(--heading); margin: 0; line-height: 1.3; text-wrap: balance; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.latin { direction: ltr; unicode-bidi: isolate; display: inline-block; white-space: nowrap; }
.muted { color: var(--muted); }
.icon { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 18px; height: 18px; }

/* ---------- the pole: brand signature, once per page ---------- */
.pole {
  height: 8px; border-radius: 99px; width: min(240px, 60%);
  background: repeating-linear-gradient(90deg, var(--magenta) 0 30px, var(--white) 30px 60px);
  box-shadow: inset 0 0 0 1.5px var(--heading);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--btn-h); padding: 0 22px; border-radius: var(--radius);
  border: 1.5px solid var(--control); background: var(--white); color: var(--heading);
  font-weight: 600; font-size: var(--fs-body); text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease-out, border-color .15s ease-out, transform .1s ease-out;
}
.btn:hover { background: var(--frame); border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: var(--white); }
.btn.primary:hover { background: var(--blue-press); border-color: var(--blue-press); }
.btn.danger { color: var(--danger); border-color: #E2B4AF; }
.btn.danger:hover { background: var(--danger-tint); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--blue); padding: 0 12px; }
.btn.quiet:hover { background: var(--blue-tint); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn.small { min-height: calc(44px * var(--scale)); font-size: var(--fs-small); padding: 0 16px; }

/* ---------- fields ---------- */
.field { display: grid; gap: 8px; }
.field > label, .label { font-weight: 600; color: var(--heading); font-size: var(--fs-small); }
.input {
  min-height: var(--field-h); width: 100%; padding: 0 16px; border-radius: var(--radius);
  border: 1.5px solid var(--control); background: var(--white); font-size: var(--fs-body);
}
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint-2); }
.input.big { font-size: calc(26px * var(--scale)); font-weight: 600; letter-spacing: .01em; }
.input.error { border-color: var(--danger); }
.hint { font-size: var(--fs-meta); color: var(--muted); }
.err { font-size: var(--fs-small); color: var(--danger); font-weight: 600; display: flex; gap: 8px; align-items: center; }
.with-suffix { position: relative; }
.with-suffix .suffix { position: absolute; inset-block: 0; inset-inline-end: 16px; display: flex; align-items: center; color: var(--muted); font-size: var(--fs-small); pointer-events: none; }
.with-suffix .input { padding-inline-end: 90px; }

/* option tiles: big choice buttons (payment method, slots, coaches) */
.choices { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.choice {
  display: grid; gap: 4px; text-align: start; padding: 16px 18px; min-height: calc(64px * var(--scale));
  border: 1.5px solid var(--control); border-radius: var(--radius); background: var(--white);
  transition: border-color .15s ease-out, background-color .15s ease-out;
}
.choice:hover { border-color: var(--muted); }
.choice[aria-pressed="true"], .choice[aria-checked="true"] { border-color: var(--blue); background: var(--blue-tint); box-shadow: inset 0 0 0 1.5px var(--blue); }
.choice .t { font-weight: 700; color: var(--heading); }
.choice .s { font-size: var(--fs-meta); color: var(--muted); }
.choice[disabled] { background: var(--frame); color: var(--muted); cursor: not-allowed; }
.choice[disabled] .t { color: var(--muted); }

/* pills, beside values only */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 12px; border-radius: 99px; font-size: var(--fs-meta); font-weight: 600; white-space: nowrap; }
.pill.ok { background: var(--ok-tint); color: var(--ok); }
.pill.warn { background: var(--warn-tint); color: var(--warn); }
.pill.danger { background: var(--danger-tint); color: var(--danger); }
.pill.blue { background: var(--blue-tint); color: var(--blue); }
.pill.grey { background: var(--frame); color: var(--muted); }

/* ---------- app shell: ivory L-frame + white sheet ---------- */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); grid-template-rows: var(--top) 1fr; min-height: 100vh; min-height: 100dvh; }
.side { grid-row: 1 / 3; align-self: start; position: sticky; top: 0; height: 100vh; height: 100dvh; padding: 18px 14px 18px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.side .brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 18px; text-decoration: none; }
.side .brand img { width: 46px; height: 46px; }
.side .brand b { font-family: var(--brand); font-weight: 600; font-size: 24px; letter-spacing: .06em; color: var(--blue); line-height: 1; }
.side .brand small { display: block; font-size: 13px; color: var(--muted); letter-spacing: 0; font-family: var(--ui); margin-top: 4px; }
.nav-group { margin-top: 10px; }
.nav-group > h3 { font-size: var(--fs-meta); font-weight: 600; color: var(--muted); padding: 6px 12px; }
.nav-h { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 6px 12px; border: 0; border-radius: var(--radius); background: none; font: inherit; font-size: var(--fs-meta); font-weight: 700; color: var(--muted); cursor: pointer; text-align: start; }
.nav-h:hover { background: var(--frame-step); color: var(--heading); }
.nav-h .count { margin-inline-start: auto; font-size: 13px; font-weight: 700; color: var(--white); background: var(--magenta); border-radius: 99px; min-width: 24px; height: 24px; display: inline-grid; place-items: center; padding: 0 7px; }
.nav-h .icon { margin-inline-start: auto; transform: rotate(-90deg); transition: transform .2s ease; }
.nav-h .count + .icon { margin-inline-start: 0; }
.folded .nav-h .icon { transform: none; }
[dir="ltr"] .folded .nav-h .icon { transform: rotate(180deg); }
.nav-group.folded { margin-top: 2px; }
@media (prefers-reduced-motion: reduce) { .nav-h .icon { transition: none; } }
.nav a {
  display: flex; align-items: center; gap: 12px; min-height: calc(48px * var(--scale)); padding: 0 12px; border-radius: 10px;
  color: var(--ink); text-decoration: none; font-size: var(--fs-small); font-weight: 500;
}
.nav a:hover { background: var(--frame-step); }
.nav a[aria-current="page"] { background: var(--white); color: var(--blue); font-weight: 700; box-shadow: 0 0 0 1px var(--edge); }
.nav a .count { margin-inline-start: auto; font-size: 14px; font-weight: 700; color: var(--white); background: var(--magenta); border-radius: 99px; min-width: 26px; height: 26px; display: inline-grid; place-items: center; padding: 0 8px; }
.side .roles { margin-top: auto; padding: 14px 10px 4px; display: grid; gap: 8px; }
.seg { display: flex; flex-wrap: wrap; background: var(--frame-step); border-radius: 10px; padding: 4px; gap: 4px; }
.seg button { flex: 1 1 auto; padding: 0 14px; border: 0; background: transparent; border-radius: 8px; min-height: 44px; font-size: var(--fs-meta); font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--white); color: var(--heading); box-shadow: 0 1px 2px rgb(6 16 106 / .08); }

.top { display: flex; align-items: center; gap: 12px; padding: 0 20px 0 12px; min-width: 0; }
[dir="rtl"] .top { padding: 0 12px 0 20px; }
.search { flex: 1; max-width: 560px; position: relative; }
.search .icon { position: absolute; inset-inline-start: 14px; top: 50%; translate: 0 -50%; color: var(--muted); }
.search input { min-height: 46px; padding-inline-start: 46px; background: var(--white); border-color: var(--edge); font-size: var(--fs-small); }
.top .spacer { flex: 1; }
.top .tool { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; border-radius: 10px; border: 0; background: transparent; color: var(--heading); font-weight: 600; font-size: var(--fs-small); white-space: nowrap; }
.top .tool:hover { background: var(--frame-step); }
.top .tool .badge { background: var(--magenta); color: var(--white); border-radius: 99px; min-width: 24px; height: 24px; font-size: 13px; display: inline-grid; place-items: center; padding: 0 7px; }
.sizer { display: inline-flex; align-items: center; gap: 2px; padding: 0 6px; border-radius: 10px; }
.sizer span { font-size: var(--fs-meta); color: var(--muted); padding-inline-end: 6px; }
.sizer button { min-width: 46px; min-height: 42px; border: 1.5px solid var(--control); background: var(--white); border-radius: 10px; font-weight: 700; color: var(--heading); }
.sizer button:hover { border-color: var(--muted); }
.top .menu-btn { display: none; }

.sheet {
  background: var(--sheet); border: 1px solid var(--edge); border-radius: var(--sheet-radius);
  margin-inline-end: var(--sp-2); margin-bottom: var(--sp-2); min-width: 0; overflow: clip;
  container: sheet / inline-size;   /* tables and grids adapt to the sheet's width, not the window's */
}
[dir="rtl"] .sheet { border-start-end-radius: var(--sheet-radius); }
.page { padding: var(--sp-7) var(--gutter) var(--sp-9); width: 100%; max-width: var(--page-max); margin-inline: auto; display: grid; gap: var(--sp-7); }
.page > *, .section > *, .cols > * { min-width: 0; }   /* a wide child (chart, long word) never stretches the page past the screen */
.page:has(.step-body) { max-width: 1040px; }   /* step-by-step flows read as one centred column */
.title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
.title-row h1 { font-size: var(--fs-h1); font-weight: 700; display: flex; align-items: center; gap: 12px; }
.title-row .sub { color: var(--muted); font-size: var(--fs-small); margin-top: 4px; }
.title-block { display: grid; gap: 12px; }
.help {
  width: 40px; height: 40px; border-radius: 99px; border: 1.5px solid var(--control); background: var(--white);
  color: var(--muted); font-weight: 700; font-size: 17px; display: inline-grid; place-items: center; flex: none;
}
.help:hover { border-color: var(--blue); color: var(--blue); }
.help-text { background: var(--blue-tint); color: var(--heading); border-radius: var(--radius); padding: 14px 18px; font-size: var(--fs-small); max-width: 70ch; }
.actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.demo-note { font-size: var(--fs-meta); color: var(--muted); }

/* sections inside the sheet: separated by space, cards only where an object needs edges */
.section { display: grid; gap: var(--sp-4); }
.section > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section h2 { font-size: var(--fs-h2); font-weight: 700; }
.card { border: 1px solid var(--edge); border-radius: var(--radius); background: var(--white); }
.cols { display: grid; gap: var(--sp-7); grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }

/* ---------- home ---------- */
.todo { display: grid; }
.todo li { list-style: none; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 20px; padding: 18px 20px; border-top: 1px solid var(--rule); }
.todo li:first-child { border-top: 0; }
.todo { margin: 0; padding: 0; }
.todo .what { font-weight: 700; color: var(--heading); }
.todo .why { font-size: var(--fs-small); color: var(--muted); }
.todo .mark { display: inline-block; width: 12px; height: 12px; border-radius: 99px; margin-inline-end: 10px; background: var(--muted); vertical-align: 1px; }
.todo .mark.danger { background: var(--danger); } .todo .mark.warn { background: #C98A12; } .todo .mark.blue { background: var(--blue); } .todo .mark.ok { background: var(--ok); }
.quick { display: grid; gap: 12px; }
.quick .btn { justify-content: flex-start; min-height: calc(60px * var(--scale)); font-size: var(--fs-body); padding: 0 20px; }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--edge); border-radius: var(--radius); }
.facts > div { padding: 18px 20px; display: grid; gap: 2px; align-content: start; }
.facts > div + div { border-inline-start: 1px solid var(--rule); }
.facts .v { font-size: var(--fs-figure); font-weight: 600; color: var(--heading); font-variant-numeric: tabular-nums; line-height: 1.25; }
.facts .v small { font-size: var(--fs-small); color: var(--muted); font-weight: 500; }
.facts .l { font-weight: 600; color: var(--ink); font-size: var(--fs-small); }
.facts .s { font-size: var(--fs-meta); color: var(--muted); }

/* today's lessons: arenas down the side, hours across */
.timeline { overflow-x: auto; border: 1px solid var(--edge); border-radius: var(--radius); }
.tl { min-width: 1120px; display: grid; grid-template-columns: 160px 1fr; }
.tl .hours { display: grid; grid-template-columns: repeat(var(--hours), 1fr); border-bottom: 1px solid var(--rule); }
.tl .hours span { font-size: var(--fs-meta); color: var(--muted); padding: 10px 6px; border-inline-start: 1px dashed var(--rule); }
.tl .lane-name { padding: 14px 16px; font-weight: 700; color: var(--heading); font-size: var(--fs-small); border-top: 1px solid var(--rule); display: grid; align-content: center; }
.tl .lane-name small { font-weight: 500; color: var(--muted); font-size: var(--fs-meta); }
.tl .lane { position: relative; border-top: 1px solid var(--rule); min-height: calc(92px * var(--scale)); background-image: repeating-linear-gradient(to var(--tl-dir, right), transparent 0 calc(100% / var(--hours) - 1px), var(--rule) calc(100% / var(--hours) - 1px) calc(100% / var(--hours))); }
.tl .corner { border-bottom: 1px solid var(--rule); }
[dir="rtl"] .tl { --tl-dir: left; }
.lesson {
  position: absolute; top: 8px; bottom: 8px; border-radius: 8px; padding: 6px 10px; overflow: hidden;
  background: var(--blue-tint); color: var(--heading); font-size: calc(15px * var(--scale)); line-height: 1.35; border: 1px solid var(--blue-tint-2);
  text-align: start; display: grid; align-content: center; gap: 2px;
}
.lesson b { font-weight: 700; display: block; }
.lesson span { display: block; }
.lesson.full { background: var(--blue); color: var(--white); border-color: var(--blue); }
.lesson.done { background: var(--frame); color: var(--muted); border-color: var(--edge); }
.lesson:hover { box-shadow: 0 0 0 2px var(--blue); }
.now-line { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--magenta); pointer-events: none; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: var(--fs-meta); color: var(--muted); }
.legend i { display: inline-block; width: 18px; height: 12px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; }
.lessons-list { display: none; }

/* ---------- step flow (booking) ---------- */
.steps { display: grid; gap: 12px; }
.steps .now { font-weight: 700; color: var(--heading); font-size: var(--fs-h2); }
.steps .now small { display: block; font-size: var(--fs-small); color: var(--muted); font-weight: 600; }
.pole-steps { display: grid; grid-template-columns: repeat(4, 1fr); height: 16px; border-radius: 99px; overflow: hidden; box-shadow: inset 0 0 0 2px var(--heading); background: var(--white); max-width: 640px; }
.pole-steps span { border-inline-start: 2px solid var(--heading); }
.pole-steps span:first-child { border-inline-start: 0; }
.pole-steps span.on { background: var(--magenta); }
.pole-steps span.cur { background: repeating-linear-gradient(135deg, var(--magenta) 0 8px, #D99ABD 8px 16px); }
.step-names { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 640px; font-size: var(--fs-meta); color: var(--muted); }
.step-names span.cur { color: var(--heading); font-weight: 700; }
.step-body { display: grid; gap: var(--sp-5); max-width: 880px; }
.step-body > *, .field, .people { min-width: 0; }
.step-nav { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; border-top: 1px solid var(--rule); padding-top: 20px; max-width: 880px; }

.people { display: grid; gap: 10px; }
.person { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; text-align: start; padding: 14px 18px; border: 1.5px solid var(--control); border-radius: var(--radius); background: var(--white); }
.person:hover { border-color: var(--muted); }
.person[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-tint); box-shadow: inset 0 0 0 1.5px var(--blue); }
.avatar { width: 48px; height: 48px; border-radius: 99px; background: var(--frame-step); color: var(--heading); font-weight: 700; display: grid; place-items: center; font-size: 19px; }
.person .n { font-weight: 700; color: var(--heading); }
.person .d { font-size: var(--fs-meta); color: var(--muted); }

.cal { border: 1px solid var(--edge); border-radius: var(--radius); padding: 16px; max-width: 560px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-head b { font-size: var(--fs-h2); color: var(--heading); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-grid .dow { text-align: center; font-size: var(--fs-meta); color: var(--muted); font-weight: 600; padding-bottom: 4px; }
.day { min-height: calc(54px * var(--scale)); border-radius: 10px; border: 1.5px solid transparent; background: var(--white); font-size: var(--fs-body); font-weight: 600; color: var(--heading); display: grid; place-items: center; line-height: 1.1; }
.day:hover:not([disabled]) { border-color: var(--control); }
.day.today { box-shadow: inset 0 0 0 1.5px var(--magenta); }
.day.today::after { content: attr(data-today); display: block; font-size: 12px; color: var(--magenta); font-weight: 700; }
.day[aria-pressed="true"] { background: var(--blue); color: var(--white); }
.day[aria-pressed="true"]::after { color: var(--white); }
.day[disabled] { color: #B4B0A6; cursor: not-allowed; background: transparent; }
.split { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: var(--sp-6); align-items: start; }

.summary { display: grid; border: 1px solid var(--edge); border-radius: var(--radius); }
.summary > div { display: grid; grid-template-columns: 190px 1fr; gap: 16px; padding: 16px 20px; border-top: 1px solid var(--rule); align-items: baseline; }
.summary > div:first-child { border-top: 0; }
.summary dt, .summary .k { color: var(--muted); font-size: var(--fs-small); font-weight: 600; }
.summary .v { color: var(--heading); font-weight: 700; }
.summary .v small { display: block; font-weight: 500; color: var(--muted); font-size: var(--fs-meta); }

.done-box { display: grid; gap: 18px; padding: 28px; border-radius: var(--radius); background: var(--ok-tint); max-width: 880px; }
.done-box h2 { color: var(--ok); font-size: calc(26px * var(--scale)); display: flex; align-items: center; gap: 12px; }
.done-box h2 .icon { width: 34px; height: 34px; stroke-width: 2.4; }
.done-box.pending { background: var(--blue-tint); }
.done-box.pending h2 { color: var(--heading); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
th { text-align: start; font-weight: 600; color: var(--muted); font-size: var(--fs-meta); padding: 10px 14px; }
td { padding: 14px; border-top: 1px solid var(--rule); vertical-align: middle; }
td.amt, th.amt { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.total td { font-weight: 700; color: var(--heading); border-top: 2px solid var(--heading); font-size: var(--fs-body); }
.minus { color: var(--danger); }

/* ---------- member ---------- */
.member-head { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; }
.member-head .avatar { width: 72px; height: 72px; font-size: 28px; }
.member-head .meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: var(--fs-small); margin-top: 4px; }
.tabs { display: flex; gap: var(--sp-1); border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); border: 0; background: transparent; min-height: 52px; padding: 0 var(--sp-4); font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: var(--fs-small); }
.tabs button[aria-selected="true"] { color: var(--heading); border-bottom-color: var(--blue); }
.stars { color: var(--magenta); letter-spacing: 2px; font-size: 20px; }
.stars .off { color: #D9D4C8; }

/* ---------- cash closing ---------- */
.diff { border-radius: var(--radius); padding: 18px 20px; font-weight: 700; font-size: calc(22px * var(--scale)); display: flex; align-items: center; gap: 12px; }
.diff.ok { background: var(--ok-tint); color: var(--ok); }
.diff.short { background: var(--danger-tint); color: var(--danger); }
.diff.over { background: var(--warn-tint); color: var(--warn); }
.diff.none { background: var(--frame); color: var(--muted); font-weight: 600; font-size: var(--fs-body); }
.counter { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.counter label { display: grid; gap: 4px; font-size: var(--fs-meta); color: var(--muted); font-weight: 600; }
.counter .input { min-height: 50px; text-align: center; }
details.more { border: 1px solid var(--edge); border-radius: var(--radius); }
details.more > summary { cursor: pointer; padding: 16px 20px; font-weight: 600; color: var(--blue); min-height: 52px; list-style-position: inside; }
details.more[open] > summary { border-bottom: 1px solid var(--rule); }
details.more > div { padding: 18px 20px; display: grid; gap: 16px; }

/* ---------- receipt (follows the printed cash receipt) ----------
   One fixed landscape size, the shape of an A5 receipt sheet (198 × 136 mm inside the margins).
   It never reflows: on a phone the whole receipt is shrunk to fit (fitReceipts in main.js), and it prints on an A5 page. */
.receipt { box-sizing: border-box; width: 640px; height: 440px; flex: none; border: 2px solid var(--heading); border-radius: 6px; padding: 16px 22px; display: flex; flex-direction: column; gap: 8px; background: var(--white); font-size: 15px; line-height: 1.45; }
.receipt .rh { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; border-bottom: 1.5px solid var(--heading); padding-bottom: 8px; }
.receipt .rh img { width: 76px; }
.receipt .rh .ttl { text-align: center; }
.receipt .rh .ttl b { display: block; font-size: 21px; color: var(--heading); }
.receipt .rh .ttl span { font-family: var(--brand); color: var(--muted); }
.receipt .amount { justify-self: end; border: 1.5px solid var(--heading); border-radius: 4px; padding: 4px 14px; text-align: center; font-weight: 700; color: var(--heading); font-size: 19px; }
.receipt .amount small { display: block; font-weight: 600; font-size: 13px; color: var(--muted); }
.receipt .line { display: grid; grid-template-columns: 140px 1fr; gap: 12px; border-bottom: 1.5px dotted var(--heading); padding-bottom: 4px; }
.receipt .line b { color: var(--heading); }
.receipt .foot { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px; margin-top: auto; }
.receipt .r-note { margin: 4px 0 0; padding: 6px 12px; border-radius: 6px; font-size: 14px; line-height: 1.5; text-align: center; }
.receipt .r-note.pending { background: var(--blue-tint); color: var(--heading); }
.receipt .r-note.bad { background: var(--danger-tint); color: var(--danger); border: 1.5px solid var(--danger); }
.receipt .foot img { width: 66px; opacity: .9; }
.receipt-fit { overflow: hidden; max-width: 100%; }

/* ---------- dialog ---------- */
.overlay { position: fixed; inset: 0; background: rgb(6 16 106 / .38); display: grid; place-items: center; padding: var(--sp-5); z-index: 50; overscroll-behavior: contain; }
.dialog { background: var(--white); border-radius: 16px; padding: 28px; width: min(560px, 100%); display: grid; gap: 18px; box-shadow: 0 24px 60px rgb(6 16 106 / .28); }
.dialog h2 { font-size: calc(24px * var(--scale)); }
.dialog .actions { justify-content: flex-start; }
.toast { position: fixed; inset-inline: 0; bottom: max(20px, env(safe-area-inset-bottom, 0px)); margin: 0 auto; width: fit-content; max-width: calc(100% - 32px); background: var(--heading); color: var(--white); padding: 14px 22px; border-radius: 12px; font-weight: 600; z-index: 60; box-shadow: 0 12px 30px rgb(6 16 106 / .3); }

/* ---------- login ---------- */
.login { display: grid; grid-template-columns: 1fr 1fr; min-height: 100%; }
.login .art { background: var(--heading); color: var(--white); display: grid; align-content: center; justify-items: center; gap: 28px; padding: 48px max(16px, env(safe-area-inset-left, 0px)) 48px max(16px, env(safe-area-inset-right, 0px)); position: relative; text-align: center; }
.login .art img { width: min(300px, 60%); }
.login .art .tag { font-family: var(--brand); font-size: clamp(28px, 3vw, 40px); font-style: italic; }
.login .art .tag-ar { font-size: clamp(22px, 2.2vw, 28px); font-weight: 600; margin-top: -14px; }
.login .art .pole { width: min(320px, 70%); box-shadow: inset 0 0 0 1.5px var(--white); }
.login .form-side { background: var(--frame); display: grid; align-content: center; justify-items: center; padding: 48px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); }
.login form { width: min(440px, 100%); display: grid; gap: 20px; }
.login form h1 { font-size: calc(30px * var(--scale)); }
.login .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pw { position: relative; }
.pw .input { padding-inline-end: 112px; }
.pw button { position: absolute; inset-block: 6px; inset-inline-end: 6px; border: 0; border-radius: 8px; background: var(--frame); color: var(--blue); font-weight: 600; padding: 0 14px; font-size: var(--fs-small); }
.check { display: flex; gap: 12px; align-items: center; font-size: var(--fs-small); }
.check input { width: 24px; height: 24px; accent-color: var(--blue); }
.lang-top { justify-self: end; }

/* ---------- responsive ---------- */
@media (min-width: 1600px) {
  :root { --side: 272px; }
}
@media (min-width: 2200px) {
  :root { --page-max: 1640px; }
}
@media (max-width: 1100px) {
  :root { --side: 228px; }
  .cols { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  :root { --top: 60px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .side.open { display: flex; position: fixed; inset: 0; height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; z-index: 40; background: var(--frame); padding: 18px max(16px, env(safe-area-inset-right, 0px)) 18px max(16px, env(safe-area-inset-left, 0px)); }
  .side .close-menu { display: inline-flex; }
  .top .menu-btn { display: inline-flex; }
  .top .hide-sm { display: none; }
  .side .show-sm { display: inline-flex; }
  .top .tool { padding: 0 10px; }
  .sizer button { min-width: 44px; }
  .top { position: sticky; top: 0; z-index: 30; background: var(--frame); box-shadow: 0 1px 0 var(--edge); padding: 0 max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px)); gap: 6px; }
  .top .search, .top .lbl, .sizer span { display: none; }
  .sheet { margin: 0; border-radius: 0; border-inline: 0; border-bottom: 0; }
  .page { padding: var(--sp-6) max(var(--gutter), env(safe-area-inset-left, 0px)) var(--sp-8) max(var(--gutter), env(safe-area-inset-right, 0px)); gap: var(--sp-6); }
  .tabs { margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .facts { grid-template-columns: 1fr; }
  .facts > div + div { border-inline-start: 0; border-top: 1px solid var(--rule); }
  .timeline { display: none; }
  .lessons-list { display: block; }
  .login { grid-template-columns: 1fr; min-height: 100dvh; align-content: start; }
  .login .art { padding-block: 28px 24px; gap: 12px; }
  .login .art img { width: 132px; }
  .login .art .tag-ar { margin-top: -8px; }
  .login .form-side { align-content: start; padding-block: 28px 40px; }
  .login form { gap: 18px; }
  .member-head { grid-template-columns: auto 1fr; }
  .member-head .actions { grid-column: 1 / -1; }
  .summary > div { grid-template-columns: 1fr; gap: 2px; }
  .todo li { grid-template-columns: 1fr; }
  .todo li .btn { justify-self: start; }
  .step-nav .btn { flex: 1; }
}
@media (max-width: 400px) {
  .btn { white-space: normal; max-width: 100%; line-height: 1.3; text-align: center; }
  .top { gap: var(--sp-1); }
  .top .tool { padding: 0 var(--sp-2); gap: 6px; }
  .sizer { padding: 0; }
  .sizer button { min-width: 42px; }
}
@media (max-width: 640px) {
  .title-row > .actions { width: 100%; }
  .title-row > .actions .btn { flex: 1 1 140px; padding: 0 var(--sp-4); }
  .tabs button { flex: 1 0 auto; padding: 0 var(--sp-3); }
  .overlay { place-items: end stretch; padding: 0; }
  .dialog { width: 100%; max-height: 92dvh; border-radius: 20px 20px 0 0; padding-bottom: max(var(--sp-6), env(safe-area-inset-bottom, 0px)); }
  .dialog .actions .btn { flex: 1 1 auto; }
  .choices { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}
.close-menu { display: none; }
.side .show-sm { display: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
