/* New Style — Salon CRM design system
   Palette: warm ivory canvas, deep aubergine ink, champagne-gold accent. */
:root {
  --bg: #F6F1EB;
  --surface: #FFFCF8;
  --surface-2: #FAF5EF;
  --line: #E8DED2;
  --line-2: #F0E8DE;
  --ink: #221A1E;
  --ink-2: #5A4F55;
  --ink-3: #8C8186;
  /* Theme: three base colours, everything else is derived (see js/theme.js) */
  --plum: #5E1A33;
  --gold: #9B2C52;
  --side: #1B1117;
  --plum-2: color-mix(in srgb, var(--plum) 82%, white);
  --plum-3: color-mix(in srgb, var(--plum) 62%, #9a7ab0);
  --plum-soft: color-mix(in srgb, var(--plum) 9%, white);
  --gold-2: color-mix(in srgb, var(--gold) 38%, white);
  --gold-soft: color-mix(in srgb, var(--gold) 13%, white);
  --gold-light: color-mix(in srgb, var(--gold) 50%, #fff3dc);
  --gold-h: color-mix(in srgb, var(--gold) 82%, black);
  --gold-ink: color-mix(in srgb, var(--gold) 62%, black);
  --side-2: color-mix(in srgb, var(--side) 85%, var(--plum));
  --sage: #4C7A59;   --sage-soft: #E3EEE5;
  --amber: #A86F18;  --amber-soft: #F8EBD2;
  --rose: #A9454B;   --rose-soft: #F6E0DF;
  --blue: #45617E;   --blue-soft: #E2E9F1;
  --teal: #2D6F6B;   --teal-soft: #DCECEA;
  --violet: #6A4884; --violet-soft: #ECE2F3;
  --grey: #6E6569;   --grey-soft: #EEE9E4;
  --r: 14px;
  --r-sm: 10px;
  --shadow: 0 1px 2px rgba(58, 35, 64, .05), 0 6px 20px -10px rgba(58, 35, 64, .18);
  --shadow-lg: 0 24px 60px -20px rgba(34, 20, 38, .45);
  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Manrope', -apple-system, 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.5 var(--sans); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
body.locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
small { font-size: 12px; color: var(--ink-3); }
.ic { flex: none; display: block; }
::selection { background: var(--gold-2); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: linear-gradient(180deg, var(--side) 0%, var(--side-2) 100%); color: #EDE3EA; padding: 22px 14px 14px; display: flex; flex-direction: column; gap: 18px; }
.logo { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.logo .mark { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #9B2C52; color: #fff; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.logo .mark i { font-style: italic; font-weight: 400; }
.logo .word { font-family: var(--display); font-size: 21px; letter-spacing: -.3px; line-height: 1; }
.logo .word small { display: block; font-family: var(--sans); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #B9A6B4; margin-top: 4px; }
.logo.dark .word { color: var(--ink); }
.logo.dark .word small { color: var(--ink-3); }
nav { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.nav-gl { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #9C8998; padding: 0 10px 6px; }
.nav-i { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; color: #D8CBD4; font-weight: 500; transition: background .15s, color .15s; }
.nav-i:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-i.on { background: color-mix(in srgb, var(--gold) 20%, transparent); color: #F6E9D6; }
.nav-i.on .ic { color: var(--gold-light); }
.nav-i span { flex: 1; }
.nav-b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--gold); color: var(--side); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.side-foot { display: flex; gap: 10px; align-items: center; padding: 12px 8px 4px; border-top: 1px solid rgba(255, 255, 255, .08); }
.side-foot b { display: block; font-weight: 600; font-size: 13px; }
.side-foot small { color: #A794A2; font-size: 11.5px; }

.main { min-width: 0; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 12px 28px; background: rgba(246, 241, 235, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .grow { flex: 1; }
.page { padding: 26px 28px 60px; max-width: 1480px; }

.locsel, .rolesel { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-weight: 600; }
.locsel select, .rolesel select { appearance: none; border: 0; background: transparent; font-weight: 600; padding-right: 18px; cursor: pointer; outline: none; }
.locsel select ~ .ic, .rolesel select ~ .ic { position: absolute; right: 10px; pointer-events: none; color: var(--ink-3); }
.locsel.static { color: var(--ink-2); }
.rolesel { background: var(--plum); color: #F4E9EF; border-color: var(--plum); }
.rolesel span { font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: #C9B3C2; }
.rolesel select { color: #fff; }
.rolesel select option { color: var(--ink); }
.rolesel select ~ .ic { color: #C9B3C2; }

.gsearch { position: relative; width: min(420px, 100%); }
.gsearch-drop { position: absolute; top: 44px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 40; }
.gsearch-drop:empty { display: none; }
.kbd { font-size: 11px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; background: var(--surface-2); }

/* ---------- Primitives ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; background: var(--plum); color: #fff; font-weight: 600; white-space: nowrap; transition: background .15s, transform .05s, box-shadow .15s; }
.btn:hover { background: var(--plum-2); }
.btn:active { transform: translateY(1px); }
.btn.gold { background: var(--gold); color: #fff; }
.btn.gold:hover { background: var(--gold-h); }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--surface-2); border-color: #DCCFBF; }
.btn.danger { background: var(--surface); color: var(--rose); border: 1px solid #ECCFCD; }
.btn.danger:hover { background: var(--rose-soft); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--ink-2); }
.icon-btn:hover { background: var(--grey-soft); color: var(--ink); }
.icon-btn.sm { width: 26px; height: 26px; }
.link { color: var(--plum-2); font-weight: 600; }
.link:hover { text-decoration: underline; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.card-h h3 { font-size: 15px; }
.card-h small { display: block; font-weight: 400; }
.card-b { padding: 16px 20px 20px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g-main { grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.muted { color: var(--ink-3); }
.mt { margin-top: 14px; }
.r { text-align: right; }
.nowrap { white-space: nowrap; }
.eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }

.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.ph h1 { font-family: var(--display); font-weight: 500; font-size: 32px; letter-spacing: -.6px; line-height: 1.1; }
.ph p { color: var(--ink-2); margin-top: 6px; max-width: 620px; }
.ph .row { flex-wrap: wrap; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 16px 18px; }
.kpi .lbl { font-size: 12.5px; color: var(--ink-2); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi .val { font-family: var(--display); font-size: 28px; font-weight: 500; letter-spacing: -.5px; margin-top: 4px; line-height: 1.15; }
.kpi .hint { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.up { color: var(--sage); font-weight: 600; }
.down { color: var(--rose); font-weight: 600; }

.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.nodot::before { display: none; }
.amber { background: var(--amber-soft); color: var(--amber); }
.blue { background: var(--blue-soft); color: var(--blue); }
.teal { background: var(--teal-soft); color: var(--teal); }
.violet { background: var(--violet-soft); color: var(--violet); }
.sage { background: var(--sage-soft); color: var(--sage); }
.rose { background: var(--rose-soft); color: var(--rose); }
.grey { background: var(--grey-soft); color: var(--grey); }
.goldt { background: var(--gold-soft); color: var(--gold-ink); }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }

.av { --h: 300; flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; letter-spacing: .02em; background: hsl(var(--h) 32% 88%); color: hsl(var(--h) 35% 28%); }
.av.sm { width: 28px; height: 28px; font-size: 10.5px; }
.av.lg { width: 56px; height: 56px; font-size: 18px; }
.side-foot .av { background: rgba(255,255,255,.12); color: var(--gold-light); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 13px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 13px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; transition: all .15s; }
.chip:hover { border-color: #D7C7B5; color: var(--ink); }
.chip.on { background: var(--plum); border-color: var(--plum); color: #fff; }
.chip .n { font-size: 11px; opacity: .7; }
.seg { display: inline-flex; padding: 3px; background: var(--grey-soft); border-radius: 10px; gap: 2px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs button { padding: 10px 0 12px; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--ink); border-color: var(--gold); }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .lbl2 { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.inp, select.inp, textarea.inp { height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; outline: none; width: 100%; transition: border-color .15s, box-shadow .15s; }
textarea.inp { height: auto; min-height: 76px; padding: 10px 12px; resize: vertical; }
.inp:focus { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 18%, transparent); }
.inp.sm { height: 32px; font-size: 13px; padding: 0 8px; }
.search-in { position: relative; display: flex; align-items: center; }
.search-in > .ic { position: absolute; left: 12px; color: var(--ink-3); pointer-events: none; }
.search-in input { height: 40px; width: 100%; padding: 0 12px 0 38px; border: 1px solid var(--line); border-radius: 10px; background: #fff; outline: none; }
.search-in input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 18%, transparent); }
.search-in .kbd { position: absolute; right: 10px; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.frow3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.tog { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.tog input { appearance: none; width: 36px; height: 20px; border-radius: 10px; background: #DCD2C8; position: relative; transition: background .15s; flex: none; cursor: pointer; margin: 0; }
.tog input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.tog input:checked { background: var(--sage); }
.tog input:checked::after { left: 18px; }
.tog input:disabled { opacity: .5; cursor: not-allowed; }
.hint { font-size: 12.5px; color: var(--ink-3); padding: 6px 2px; }
.err { background: var(--rose-soft); color: var(--rose); padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.note { background: var(--gold-soft); color: var(--gold-ink); padding: 10px 12px; border-radius: 10px; font-size: 13px; display: flex; gap: 8px; align-items: flex-start; }
.note.ok { background: var(--sage-soft); color: var(--sage); }
.note.bad { background: var(--rose-soft); color: var(--rose); }
.note .ic { margin-top: 1px; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--surface-2); }
.tbl .r { text-align: right; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who b { display: block; font-weight: 600; }
.who small { display: block; }
.tbl-wrap { overflow-x: auto; }

/* list rows */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.li:last-child { border-bottom: 0; }
.li .grow { flex: 1; min-width: 0; }
.li b { font-weight: 600; }
.li small { display: block; }
.li.click { cursor: pointer; border-radius: 8px; }
.li.click:hover { background: var(--surface-2); }
.att { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); cursor: pointer; transition: border-color .15s, background .15s; }
.att:hover { border-color: var(--gold-2); background: #fff; }
.att + .att { margin-top: 8px; }
.att .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; }
.att .grow { flex: 1; }
.att b { font-weight: 600; display: block; }
.att small { display: block; }

/* bars & charts */
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hb { display: grid; grid-template-columns: 120px 1fr 92px; gap: 12px; align-items: center; font-size: 13px; }
.hb[data-act] { cursor: pointer; }
.hb-l { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-t { height: 10px; border-radius: 5px; background: var(--grey-soft); overflow: hidden; }
.hb-t i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--gold-light), var(--gold)); }
.hb-v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.lchart { width: 100%; height: auto; display: block; }
.lchart .ln { fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.lchart .gl { stroke: var(--line); stroke-dasharray: 3 4; }
.lchart text { font-size: 11px; fill: var(--ink-3); font-family: var(--sans); }
.lchart .dot { fill: var(--plum); stroke: #fff; stroke-width: 2; }
.lchart .hit { fill: transparent; }
.lchart .hit:hover { fill: rgba(176, 129, 79, .25); }
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.legend li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend li b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.donut { width: 132px; height: 132px; border-radius: 50%; flex: none; display: grid; place-items: center; }
.donut > div { width: 88px; height: 88px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; font-family: var(--display); font-size: 18px; line-height: 1.1; }
.donut > div small { display: block; font-family: var(--sans); font-size: 10.5px; }
.legend { list-style: none; margin: 0; padding: 0; flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 34px; gap: 8px; align-items: center; font-size: 13px; }
.legend li i { width: 10px; height: 10px; border-radius: 3px; }
.legend li small { text-align: right; }
.meter { height: 6px; background: var(--grey-soft); border-radius: 3px; overflow: hidden; min-width: 70px; }
.meter i { display: block; height: 100%; background: var(--sage); border-radius: 3px; }
.meter.low i { background: var(--amber); }
.meter.out i { background: var(--rose); }

/* ---------- Calendar ---------- */
.cal-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-bar { gap: 12px; }
.cal-date { font-family: var(--display); font-size: 20px; font-weight: 500; letter-spacing: -.2px; }
.cal-nav { height: 38px; align-items: center; }
.cal-date .d-short { display: none; }
.cal-nav button:not(.on) { width: 32px; padding: 0; justify-content: center; }
.cal-nav button:not(.on):hover { background: rgba(255,255,255,.6); }
.locsel { transition: border-color .15s, box-shadow .15s; }
.locsel:hover { border-color: #DCCFBF; }
.locsel:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 14%, transparent); }
.locsel select:focus-visible { outline: none; }
/* Consistent dropdowns everywhere: custom chevron instead of the browser default */
select.inp, .line-main select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238C8186' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 14px;
}
select.inp.sm, .line-main select { padding-right: 28px; background-position: right 8px center; background-size: 12px; }
.cal { overflow: hidden; }
.cal-scroll { overflow-x: auto; }
.cal-head, .cal-body { display: grid; grid-template-columns: 68px repeat(var(--n), minmax(190px, 1fr)); min-width: calc(68px + var(--n) * 190px); }
.cal-head { border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cal-colhead { padding: 12px 14px; display: flex; gap: 10px; align-items: center; border-left: 1px solid var(--line-2); }
.cal-colhead b { display: block; font-weight: 600; font-size: 13.5px; }
.cal-body { position: relative; }
.cal-times { position: relative; }
.cal-times span { position: absolute; right: 10px; font-size: 11px; color: var(--ink-3); transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.cal-col { position: relative; border-left: 1px solid var(--line-2); cursor: copy; background-image: repeating-linear-gradient(to bottom, var(--line-2) 0 1px, transparent 1px calc(var(--hr) / 2), #F6F0E8 calc(var(--hr) / 2) calc(var(--hr) / 2 + 1px), transparent calc(var(--hr) / 2 + 1px) var(--hr)); }
.cal-col:hover { background-color: rgba(246, 236, 223, .35); }
.appt { position: absolute; left: 5px; right: 5px; border-radius: 9px; padding: 6px 9px; overflow: hidden; cursor: pointer; border-left: 3px solid currentColor; font-size: 12px; line-height: 1.3; transition: transform .1s, box-shadow .15s; }
.appt:hover { box-shadow: var(--shadow); transform: translateY(-1px); z-index: 2; }
.appt b { display: block; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt .t { font-weight: 600; font-size: 11px; display: flex; gap: 4px; align-items: center; }
.appt .s { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt.done { opacity: .72; }
.appt.bill { box-shadow: inset 0 0 0 1.5px var(--violet); }
.nowline { position: absolute; left: 68px; right: 0; height: 0; border-top: 2px solid var(--rose); z-index: 3; pointer-events: none; }
.nowline::before { content: ''; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--rose); }
.legend-row { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.legend-row span { display: inline-flex; align-items: center; gap: 6px; }
.legend-row i { width: 10px; height: 10px; border-radius: 3px; }

/* ---------- POS ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr); gap: 18px; align-items: start; }
.pos-cat { padding: 18px; }
.pos-ticket { position: sticky; top: 80px; padding: 0; overflow: hidden; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; margin-top: 14px; }
.tile { text-align: left; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; gap: 4px; min-height: 92px; transition: border-color .15s, box-shadow .15s, transform .05s; position: relative; }
.tile:hover { border-color: var(--gold-2); box-shadow: var(--shadow); }
.tile:active { transform: scale(.98); }
.tile b { font-weight: 600; line-height: 1.3; }
.tile .p { width: 100%; gap: 8px; margin-top: auto; font-weight: 700; font-variant-numeric: tabular-nums; display: flex; justify-content: space-between; align-items: center; }
.tile .p small { font-weight: 500; }
.tile.dis { opacity: .45; pointer-events: none; }
.tile .cov { position: absolute; top: 10px; right: 10px; }
.tk-sec { padding: 16px 18px; border-bottom: 1px solid var(--line-2); }
.tk-sec:last-child { border-bottom: 0; }
.picked { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); }
.picked > div { flex: 1; min-width: 0; }
.picked b { display: block; }
.picked small { display: block; }
.picker-res { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.res { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-align: left; width: 100%; }
.res:hover { background: var(--gold-soft); }
.res span { flex: 1; min-width: 0; }
.res b { display: block; font-weight: 600; }
.res small { display: block; }
.line { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); align-items: flex-start; }
.line:last-child { border-bottom: 0; }
.line-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.line-main b { font-weight: 600; }
.line-main select { height: 30px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; background: #fff; font-size: 12.5px; max-width: 210px; }
.line-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-weight: 700; font-variant-numeric: tabular-nums; }
.line-side s { color: var(--ink-3); font-weight: 500; font-size: 12px; }
.covered { font-size: 11px; color: var(--sage); font-weight: 700; }
.mini-tog { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; width: max-content; }
.qty button { width: 28px; height: 28px; font-weight: 700; color: var(--ink-2); }
.qty span { min-width: 24px; text-align: center; font-weight: 700; }
.sums { display: flex; flex-direction: column; gap: 6px; font-variant-numeric: tabular-nums; }
.sums > div { display: flex; justify-content: space-between; color: var(--ink-2); }
.sums .neg { color: var(--sage); }
.sums .tot { color: var(--ink); font-weight: 700; font-size: 18px; padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--line); }
.sums .tot span:last-child { font-family: var(--display); font-size: 24px; font-weight: 500; }
.paygrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.paygrid button { height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 12.5px; }
.paygrid button.on { border-color: var(--plum); background: var(--plum-soft); color: var(--plum); box-shadow: inset 0 0 0 1px var(--plum); }
.member-card { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; color: #fff; background: linear-gradient(120deg, var(--plum), var(--plum-3)); }
.member-card.tone-gold { background: linear-gradient(120deg, #8C6236, #C89B66 60%, #E2C192); color: #2A1A12; }
.member-card.tone-silver { background: linear-gradient(120deg, #5F6570, #9BA1AB 60%, #C9CDD3); color: #1E2228; }
.member-card b { display: block; font-family: var(--display); font-size: 16px; font-weight: 500; }
.member-card small { color: inherit; opacity: .8; display: block; }
.member-card > div { flex: 1; }
.ent { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.ent-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: 13px; }
.ent-row .meter { grid-column: 1 / -1; }

/* ---------- Overlays ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(30, 18, 30, .42); z-index: 50; backdrop-filter: blur(2px); }
.modal { position: fixed; z-index: 51; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); }
.modal.wide { width: min(780px, calc(100vw - 32px)); }
.drawer { position: fixed; z-index: 51; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); overflow-y: auto; background: var(--surface); box-shadow: var(--shadow-lg); }
.drawer.wide { width: min(640px, 100vw); }
.enter.modal { animation: pop .22s cubic-bezier(.2, .9, .3, 1.2); }
.enter.drawer { animation: slide .26s cubic-bezier(.2, .8, .2, 1); }
.enter + .backdrop, .backdrop.enter { animation: fade .2s; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -47%) scale(.97); } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.m-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 22px 14px; position: sticky; top: 0; background: var(--surface); z-index: 2; border-bottom: 1px solid var(--line-2); }
.m-head h3 { font-family: var(--display); font-weight: 500; font-size: 22px; letter-spacing: -.3px; }
.m-head p { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.m-body { padding: 18px 22px; display: flex; flex-direction: column; gap: 16px; }
.m-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 20px; border-top: 1px solid var(--line-2); position: sticky; bottom: 0; background: var(--surface); }
.m-foot .grow { flex: 1; }
.svc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.svc-chip { padding: 7px 11px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 600; text-align: left; }
.svc-chip small { display: block; font-weight: 500; font-size: 11px; }
.svc-chip.on { border-color: var(--plum); background: var(--plum-soft); color: var(--plum); }
.svc-chip.on small { color: var(--plum-2); }
.svc-group + .svc-group { margin-top: 8px; }
.svc-group .eyebrow { display: block; margin-bottom: 6px; }
.steps { display: flex; gap: 0; }
.steps div { flex: 1; text-align: center; font-size: 11.5px; font-weight: 600; color: var(--ink-3); position: relative; padding-top: 22px; }
.steps div::before { content: ''; position: absolute; top: 6px; left: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--line); transform: translateX(-50%); z-index: 1; }
.steps div::after { content: ''; position: absolute; top: 11px; left: 50%; width: 100%; height: 2px; background: var(--line); }
.steps div:last-child::after { display: none; }
.steps div.on { color: var(--ink); }
.steps div.on::before { background: var(--sage); box-shadow: 0 0 0 3px var(--sage-soft); }
.steps div.on::after { background: var(--sage); }
.steps div.cur::after { background: var(--line); }
.stat4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat4 > div { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; }
.stat4 b { display: block; font-family: var(--display); font-weight: 500; font-size: 18px; }
.stat4 small { font-size: 11.5px; }
.sec-t { font-size: 13px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }

/* toasts */
#toasts { position: fixed; bottom: 22px; right: 22px; z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: center; padding: 11px 16px; border-radius: 12px; background: var(--side); color: #F7ECF1; box-shadow: var(--shadow-lg); font-weight: 500; animation: pop2 .25s; transition: opacity .4s, transform .4s; }
.toast.ok .ic { color: #9BD3A8; }
.toast.warn .ic { color: #F1C27D; }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes pop2 { from { opacity: 0; transform: translateY(10px); } }

/* invoice */
.invoice-doc { padding: 26px 28px; background: #fff; }
.inv-top { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 2px solid var(--ink); }
.inv-top p { font-size: 12px; color: var(--ink-2); margin-top: 10px; }
.inv-meta { text-align: right; display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }
.inv-meta b { font-family: var(--display); font-size: 17px; font-weight: 500; }
.inv-bill { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 16px 0; }
.inv-bill b { display: block; margin-top: 4px; }
.inv-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.inv-tbl th { text-align: left; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line); padding: 8px 6px; }
.inv-tbl td { padding: 9px 6px; border-bottom: 1px solid var(--line-2); }
.inv-tbl .r { text-align: right; }
.inv-sum { margin-left: auto; width: 290px; margin-top: 14px; }
.inv-foot { margin-top: 20px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--ink-3); text-align: center; }
.inv-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 22px 20px; border-top: 1px solid var(--line-2); background: var(--surface); position: sticky; bottom: 0; }

/* denied */
.denied { max-width: 460px; margin: 80px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.denied .ic { color: var(--gold); }
.denied h2 { font-family: var(--display); font-weight: 500; font-size: 26px; }
.denied p { color: var(--ink-2); }

.empty { text-align: center; padding: 36px 20px; color: var(--ink-3); }
.empty .ic { margin: 0 auto 10px; color: var(--gold-2); }

/* salon cards */
.salon-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.salon-card h3 { font-family: var(--display); font-weight: 500; font-size: 21px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-stats div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.mini-stats b { display: block; font-weight: 700; font-variant-numeric: tabular-nums; }
.mini-stats small { font-size: 11px; }
.plan-card { padding: 18px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; }
.plan-card h3 { font-family: var(--display); font-weight: 500; font-size: 20px; }
.plan-card .price { font-family: var(--display); font-size: 26px; }
.plan-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.plan-card.tone-gold::before { background: linear-gradient(90deg, #8C6236, #E2C192); }
.plan-card.tone-silver::before { background: linear-gradient(90deg, #5F6570, #C9CDD3); }
.plan-card.tone-plum::before { background: linear-gradient(90deg, var(--plum), var(--plum-3)); }
.staff-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.perm-tbl td:not(:first-child), .perm-tbl th:not(:first-child) { text-align: center; width: 150px; }
.perm-tbl .tog { justify-content: center; }

/* ---------- Phone demo (stylist + customer) ---------- */
.demo-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: var(--side); color: #EDE3EA; }
.demo-top .grow { flex: 1; color: #B9A6B4; font-size: 13px; }
.demo-stage { display: grid; grid-template-columns: minmax(260px, 380px) auto; gap: 56px; justify-content: center; align-items: center; padding: 24px 28px 40px; min-height: calc(100vh - 62px); }
.demo-copy h1 { font-family: var(--display); font-weight: 500; font-size: 38px; letter-spacing: -.8px; line-height: 1.1; }
.demo-copy p { color: var(--ink-2); margin-top: 12px; font-size: 15px; }
.demo-copy ul { margin: 18px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.demo-copy li { display: flex; gap: 10px; color: var(--ink-2); }
.demo-copy li .ic { color: var(--gold); margin-top: 2px; }
.phone { width: 390px; height: min(800px, calc(100vh - 110px)); min-height: 620px; border-radius: 52px; padding: 12px; background: #19111A; box-shadow: var(--shadow-lg), inset 0 0 0 2px #3A2A38; position: relative; flex: none; }
.phone::before { content: ''; position: absolute; top: 22px; left: 50%; transform: translateX(-50%); width: 110px; height: 30px; border-radius: 16px; background: #000; z-index: 5; }
.screen { width: 100%; height: 100%; border-radius: 40px; overflow: hidden; background: var(--bg); display: flex; flex-direction: column; position: relative; }
.scr-body { flex: 1; overflow-y: auto; padding: 0 18px 24px; }
.scr-status { height: 52px; flex: none; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 30px 6px; font-size: 13px; font-weight: 700; }
.scr-head { padding: 10px 0 16px; }
.scr-head h2 { font-family: var(--display); font-weight: 500; font-size: 26px; letter-spacing: -.4px; }
.scr-nav { flex: none; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); background: var(--surface); padding: 8px 10px 22px; }
.scr-nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--ink-3); padding: 4px; }
.scr-nav button.on { color: var(--plum); }
.scr-nav button.on .ic { color: var(--gold); }
.m-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.m-card + .m-card { margin-top: 10px; }
.hero-card { border-radius: 20px; padding: 18px; color: #fff; background: linear-gradient(135deg, var(--plum) 0%, var(--plum-3) 100%); position: relative; overflow: hidden; }
.hero-card::after { content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(226, 193, 146, .45), transparent 70%); }
.hero-card.gold { background: linear-gradient(135deg, #7E5630, #C89B66 55%, #E8CDA4); color: #2A1A12; }
.hero-card small { color: inherit; opacity: .78; }
.hero-card .big { font-family: var(--display); font-size: 24px; font-weight: 500; margin-top: 2px; }
.otp { display: flex; gap: 10px; justify-content: center; }
.otp input { width: 54px; height: 60px; text-align: center; font-size: 24px; font-weight: 700; border: 1px solid var(--line); border-radius: 14px; background: #fff; outline: none; }
.otp input:focus { border-color: var(--gold); }
.slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot-grid button, .day-chip { height: 40px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 13px; }
.slot-grid button.on, .day-chip.on, .pick-row.on { border-color: var(--plum); background: var(--plum-soft); color: var(--plum); box-shadow: inset 0 0 0 1px var(--plum); }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.day-chip { flex: none; width: 56px; height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; }
.day-chip small { font-size: 10.5px; font-weight: 600; }
.pick-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.pick-row + .pick-row { margin-top: 8px; }
.pick-row .grow { flex: 1; min-width: 0; }
.pick-row b { display: block; font-weight: 600; }
.pick-row small { display: block; }
.back { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ink-2); padding: 6px 0; }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper button { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-weight: 700; }
.stepper input { width: 64px; height: 30px; text-align: center; border: 1px solid var(--line); border-radius: 9px; font-weight: 700; }
.success { text-align: center; padding: 40px 10px; }
.success .ring { width: 72px; height: 72px; border-radius: 50%; background: var(--sage-soft); color: var(--sage); display: grid; place-items: center; margin: 0 auto 16px; }
.success h2 { font-family: var(--display); font-weight: 500; font-size: 24px; }

/* ---------- Responsive ---------- */
.mbar, .nav-scrim, .nav-x { display: none; }
.grid > *, .pos > *, .stack > *, .kpis > * { min-width: 0; }
.paygrid button { min-width: 0; }
.kpi .val, .stat4 b, .mini-stats b { overflow-wrap: anywhere; }
.who > div, .li .grow, .att .grow { min-width: 0; }
.ph > div:first-child { min-width: 0; }
@media (max-width: 1280px) {
  .kpi .val { font-size: 25px; }
  .page { padding: 24px 22px 56px; }
  .top { padding: 12px 22px; }
}
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .g-main, .pos { grid-template-columns: 1fr; }
  .pos-ticket { position: static; }
  .g3 { grid-template-columns: 1fr 1fr; }
  .gsearch { width: auto; flex: 1; }
  .top .grow { display: none; }
}
@media (max-width: 960px) {
  /* off-canvas navigation */
  .layout { display: block; }
  .mbar { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 30; height: 58px; padding: 0 12px 0 16px; background: var(--side); color: #EDE3EA; }
  .mbar .logo .word { font-size: 19px; }
  .mbar .icon-btn { color: #EDE3EA; width: 42px; height: 42px; }
  .mbar .icon-btn:hover { background: rgba(255,255,255,.08); }
  .side { position: fixed; top: 0; left: 0; bottom: 0; width: 280px; height: 100%; z-index: 60; transform: translateX(-100%); transition: transform .25s cubic-bezier(.2,.8,.2,1); box-shadow: var(--shadow-lg); }
  .nav-open .side { transform: none; }
  .nav-x { display: grid; color: #EDE3EA; }
  .nav-x:hover { background: rgba(255,255,255,.08); color: #fff; }
  .nav-scrim { position: fixed; inset: 0; z-index: 55; background: rgba(30,18,30,.45); opacity: 0; pointer-events: none; transition: opacity .2s; display: block; }
  .nav-open .nav-scrim { opacity: 1; pointer-events: auto; }
  .nav-i { padding: 10px 10px; }
  .top { position: static; flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
  .g2, .g3 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 14px; }
  .top .locsel { flex: 1 1 auto; min-width: 0; }
  .top .locsel select { min-width: 0; width: 100%; text-overflow: ellipsis; }
  .top .rolesel { flex: 1 1 auto; min-width: 0; }
  .rolesel span { display: none; }
  .rolesel select { width: 100%; min-width: 0; }
  .top .btn.gold { width: 38px; padding: 0; flex: none; }
  .top .btn .lbl, .demo-top .btn .lbl { display: none; }
  .gsearch { order: 5; flex: 1 1 100%; width: 100%; }
  .kbd { display: none; }
  .page { padding: 18px 14px 48px; }
  .ph { margin-bottom: 16px; gap: 12px; }
  .ph h1 { font-size: 26px; }
  .ph p { font-size: 13.5px; }
  .ph > .row { width: 100%; }
  .ph > .row > .btn, .ph > .row > a.btn { flex: 1 1 auto; }
  .ph > .row > .chips { width: 100%; }
  .kpis { gap: 10px; margin-bottom: 14px; }
  .kpi { padding: 13px 14px; }
  .kpi .val { font-size: 21px; }
  .kpi .lbl { font-size: 12px; }
  .kpi .hint { font-size: 11.5px; }
  .grid, .stack { gap: 14px; }
  .card-h { padding: 14px 16px 0; flex-wrap: wrap; }
  .card-b { padding: 14px 16px 16px; }
  .tbl th, .tbl td { padding: 10px 12px; }
  .tbl td { white-space: nowrap; }
  .tbl td .who b, .tbl td small { white-space: nowrap; }
  .tabs { gap: 18px; overflow-x: auto; scrollbar-width: none; }
  .tabs button { white-space: nowrap; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; max-width: 100%; }
  .chip { flex: none; }
  .row.between.wrap > .search-in { width: 100% !important; }
  .hb { grid-template-columns: 86px 1fr 68px; gap: 8px; font-size: 12.5px; }
  .att { padding: 11px 12px; gap: 12px; }
  /* calendar */
  .cal-bar { gap: 8px; }
  .cal-date { font-size: 18px; min-width: 0; flex: 1; white-space: nowrap; }
  .cal-date .d-long { display: none; }
  .cal-date .d-short { display: inline; }
  .cal-colhead small { display: none; }
  .cal-bar > .cal-salon { width: 100%; order: 4; }
  .cal-bar > .cal-salon select { flex: 1; }
  .legend-row { width: 100%; order: 5; gap: 10px; }
  .cal-head, .cal-body { grid-template-columns: 52px repeat(var(--n), minmax(150px, 1fr)); min-width: calc(52px + var(--n) * 150px); }
  .cal-colhead { padding: 10px; }
  /* checkout */
  .pos-cat { padding: 14px; }
  .pos-cat > .row { gap: 10px; }
  .pos-cat .search-in { max-width: none !important; flex: 1 1 100% !important; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tile { padding: 11px 12px; min-height: 86px; }
  .tile .p { flex-wrap: wrap; gap: 2px 8px; }
  .tk-sec { padding: 14px; }
  .paygrid { grid-template-columns: repeat(3, 1fr); }
  .line-main select { max-width: 100%; }
  /* modals become bottom sheets, drawers go full screen */
  .modal, .modal.wide { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; }
  .enter.modal { animation: sheet .28s cubic-bezier(.2,.8,.2,1); }
  .drawer, .drawer.wide { width: 100%; }
  .m-head { padding: 16px 16px 12px; }
  .m-head h3 { font-size: 20px; }
  .m-body { padding: 16px; gap: 14px; }
  .m-foot { padding: 12px 16px 16px; flex-wrap: wrap; }
  .m-foot .grow { flex: 1 1 100%; }
  .m-foot .btn { flex: 1 1 auto; }
  .frow, .frow3 { grid-template-columns: 1fr; }
  .stat4 { grid-template-columns: 1fr 1fr; }
  .steps div { font-size: 10.5px; }
  .invoice-doc { padding: 18px 16px; }
  .inv-top { flex-direction: column; gap: 12px; }
  .inv-meta { text-align: left; align-items: flex-start; }
  .inv-bill { grid-template-columns: 1fr; gap: 12px; }
  .inv-tbl th:nth-child(2), .inv-tbl td:nth-child(2) { display: none; }
  .inv-sum { width: 100%; }
  .inv-actions { padding: 12px 16px 16px; }
  .inv-actions .btn { flex: 1 1 calc(50% - 8px); }
  .inv-actions > span { display: none; }
  .modal .tbl { display: block; overflow-x: auto; }
  #toasts { left: 12px; right: 12px; top: 12px; bottom: auto; align-items: stretch; }
  .toast { justify-content: center; }
  .denied { margin: 40px auto; padding: 0 8px; }
  /* phone previews: show the app full-bleed, explanation underneath */
  .demo-top { padding: 10px 12px; gap: 8px; }
  .demo-top .logo .word small, .demo-note { display: none; }
  .demo-top .rolesel span { display: none; }
  .demo-top .btn { width: 38px; padding: 0; }
  .demo-stage { display: flex; flex-direction: column; gap: 24px; padding: 0 0 32px; min-height: 0; }
  .phone { order: 1; width: 100%; height: calc(100vh - 58px); height: calc(100dvh - 58px); min-height: 560px; border-radius: 0; padding: 0; background: none; box-shadow: none; }
  .phone::before, .scr-status { display: none; }
  .screen { border-radius: 0; }
  .scr-body { padding-top: 14px; }
  .scr-nav { padding-bottom: 12px; }
  .demo-copy { order: 2; padding: 0 18px; }
  .demo-copy h1 { font-size: 28px; }
}
@media (max-width: 420px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi .val { font-size: 19px; }
  .tiles { grid-template-columns: 1fr; }
  .mini-stats { grid-template-columns: 1fr 1fr 1fr; }
  .mini-stats div { padding: 7px 8px; }
  .donut { width: 112px; height: 112px; }
  .donut > div { width: 74px; height: 74px; font-size: 15px; }
}
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }

/* ---------- Print: invoice only ---------- */
@media print {
  #app, #toasts, .inv-actions, .m-head { display: none !important; }
  body * { visibility: hidden !important; }
  .invoice-doc, .invoice-doc * { visibility: visible !important; }
  .invoice-doc { position: absolute; left: 0; top: 0; width: 100%; padding: 0; }
  .modal { position: static; transform: none; box-shadow: none; max-height: none; overflow: visible; }
  .backdrop { display: none; }
}

/* ---------- Guided tour ---------- */
.tour-block { position: fixed; inset: 0; z-index: 89; }
.tour-block.dim { background: rgba(24, 12, 24, .5); backdrop-filter: blur(2px); animation: fade .2s; }
.tour-spot { position: fixed; z-index: 90; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(24, 12, 24, .55); outline: 2px solid var(--gold); pointer-events: none; transition: top .25s, left .25s, width .25s, height .25s; }
.tour-spot.none { inset: 0; border-radius: 0; box-shadow: none; outline: 0; background: rgba(24, 12, 24, .55); }
.tour-card { position: fixed; z-index: 91; width: min(370px, calc(100vw - 24px)); background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 16px 18px 14px; animation: fade .2s; }
.tour-card.center { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100vw - 24px)); }
.tour-card.docked { left: 10px; right: 10px; bottom: 10px; width: auto; }
.tour-top { display: flex; justify-content: space-between; align-items: center; }
.tour-top .eyebrow { color: var(--gold-ink); }
.tour-card h4 { font-family: var(--display); font-weight: 500; font-size: 21px; letter-spacing: -.3px; margin: 4px 0 6px; }
.tour-card p { color: var(--ink-2); font-size: 13.5px; line-height: 1.55; }
.tour-prog { height: 4px; background: var(--grey-soft); border-radius: 2px; margin: 14px 0 12px; overflow: hidden; }
.tour-prog i { display: block; height: 100%; background: var(--gold); border-radius: 2px; transition: width .25s; }
.tour-foot { display: flex; align-items: center; gap: 8px; }
.tour-foot .btn { gap: 6px; }
.tour-menu { position: fixed; z-index: 91; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(540px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow-y: auto; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); }
.tour-list { display: flex; flex-direction: column; gap: 6px; }
.tour-ch { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: border-color .15s, background .15s; }
.tour-ch:hover { border-color: var(--gold-2); background: var(--gold-soft); }
.tour-ch .grow { flex: 1; min-width: 0; }
.tour-ch b { display: block; font-weight: 600; }
.tour-ch small { display: block; }
.tour-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--plum-soft); color: var(--plum); }
.btn.icon-only { width: 38px; padding: 0; }
@media (max-width: 760px) {
  .tour-menu { top: auto; bottom: 0; left: 0; transform: none; width: 100%; max-height: 90vh; border-radius: 20px 20px 0 0; }
  .tour-card h4 { font-size: 19px; }
  .top .tour-btn { width: 38px; padding: 0; flex: none; }
}

/* ---------- Theme picker ---------- */
.theme-pop { position: fixed; z-index: 86; top: 64px; right: 16px; width: min(340px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 16px; animation: fade .15s; }
.theme-pop h4 { font-family: var(--display); font-weight: 500; font-size: 19px; }
.swatches { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.sw { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 11px; background: #fff; font-size: 12.5px; font-weight: 600; text-align: left; line-height: 1.25; }
.sw:hover { border-color: var(--gold-2); }
.sw.on { border-color: var(--plum); box-shadow: inset 0 0 0 1px var(--plum); }
.sw .dots { display: flex; flex: none; }
.sw .dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; }
.sw .dots i + i { margin-left: -6px; }
.theme-custom { display: flex; gap: 10px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.theme-custom label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.theme-custom input[type=color] { width: 34px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; }
@media (max-width: 760px) { .theme-pop { top: auto; bottom: 0; left: 0; right: 0; width: 100%; border-radius: 20px 20px 0 0; } }

/* ---------- Slot calendar ---------- */
.cal-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.cal-sum-i { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.cal-sum-i b { display: block; font-family: var(--display); font-size: 24px; font-weight: 500; line-height: 1.1; }
.cal-sum-i small { display: block; }
.dot { flex: none; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: currentColor; }
.dot.free { color: transparent; background: color-mix(in srgb, var(--sage) 12%, white); border: 1.5px dashed var(--sage); width: 12px; height: 12px; }
.cal-sum-i .dot { width: 12px; height: 12px; border-radius: 4px; }
.legend-row .dot { margin-right: 2px; }
.sl-head, .sl-grid { display: grid; grid-template-columns: 78px repeat(var(--n), minmax(180px, 1fr)); min-width: calc(78px + var(--n) * 180px); }
.sl-head { background: var(--surface-2); border-bottom: 1px solid var(--line); }
.sl-head > div { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-left: 1px solid var(--line-2); min-width: 0; }
.sl-head > .sl-corner { border-left: 0; justify-content: flex-end; }
.sl-head b { display: block; font-weight: 600; font-size: 13.5px; }
.sl-head small { display: block; }
.sl-grid { position: relative; grid-template-rows: repeat(var(--rows), 28px); padding: 6px 0 10px; background-image: repeating-linear-gradient(to bottom, var(--line-2) 0 1px, transparent 1px 56px); background-position: 0 6px; background-size: 100% 56px; background-repeat: repeat-y; }
.sl-col { grid-row: 1 / -1; border-left: 1px solid var(--line-2); }
.sl-time { grid-column: 1; padding: 0 12px 0 0; text-align: right; font-size: 11.5px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; transform: translateY(-7px); }
.sl-free, .sl-appt { position: relative; z-index: 1; margin: 3px 6px; border-radius: 10px; min-width: 0; text-align: left; }
.sl-free { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 10px; border: 1.5px dashed color-mix(in srgb, var(--sage) 45%, white); background: color-mix(in srgb, var(--sage) 5%, white); color: var(--sage); font-size: 12.5px; font-weight: 600; transition: background .15s, border-color .15s; }
.sl-free span { display: inline-flex; align-items: center; gap: 5px; }
.sl-free small { color: inherit; opacity: .7; font-weight: 600; }
.sl-free:hover { border-style: solid; border-color: var(--sage); background: var(--sage-soft); }
.sl-appt { display: flex; flex-direction: column; justify-content: flex-start; gap: 2px; padding: 6px 10px; overflow: hidden; border-left: 4px solid currentColor; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); transition: box-shadow .15s, transform .1s; }
.sl-appt:hover { box-shadow: var(--shadow); transform: translateY(-1px); z-index: 2; }
.sl-appt .t { display: flex; justify-content: space-between; gap: 6px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.sl-appt .st { padding: 0 6px; border-radius: 6px; background: rgba(255, 255, 255, .7); }
.sl-appt b { color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.sl-appt .s { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-appt.tiny { flex-direction: row; align-items: center; gap: 8px; padding: 0 10px; }
.sl-appt.tiny .t > span:first-child { display: none; }
.sl-appt.tiny b { order: -1; flex: 1; font-size: 12.5px; }
.sl-appt.grey { opacity: .8; }
.sl-appt.bill { box-shadow: inset 0 0 0 1.5px var(--amber); }
.sl-now { position: absolute; left: 78px; right: 0; height: 0; border-top: 2px solid var(--rose); z-index: 3; pointer-events: none; }
.sl-now span { position: absolute; left: -46px; top: -10px; padding: 1px 6px; border-radius: 6px; background: var(--rose); color: #fff; font-size: 10.5px; font-weight: 700; }
@media (max-width: 1180px) { .cal-sum { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .sl-head, .sl-grid { grid-template-columns: 66px 1fr; min-width: 0; }
  .sl-now { left: 66px; }
  .sl-now span { left: -42px; }
  .cal-sum { gap: 8px; }
  .cal-sum-i { padding: 10px 12px; gap: 10px; }
  .cal-sum-i b { font-size: 20px; }
}
.cal-days { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; padding-bottom: 2px; }
.cal-day { flex: 1 0 104px; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; transition: border-color .15s, background .15s; }
.cal-day:hover { border-color: var(--gold-2); }
.cal-day small { font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.cal-day b { font-weight: 700; font-size: 14px; }
.cal-day span { font-size: 12px; font-weight: 600; }
.cal-day.on { background: var(--plum); border-color: var(--plum); color: #fff; }
.cal-day.on small, .cal-day.on span { color: rgba(255, 255, 255, .8); }
.sl-past { z-index: 0; margin: 0 0 0 1px; background: repeating-linear-gradient(135deg, rgba(140, 129, 134, .07) 0 8px, transparent 8px 16px); border-bottom: 1px dashed var(--line); display: flex; align-items: flex-end; justify-content: flex-end; pointer-events: none; }
.sl-past span { margin: 0 10px 4px 0; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
@media (max-width: 760px) { .cal-day { flex: 0 0 92px; } }

/* ---------- Availability grid (day × hour) ---------- */
.av-card { overflow: hidden; }
.av-scroll { overflow-x: auto; }
.av-grid { display: grid; grid-template-columns: 128px repeat(var(--h), minmax(62px, 1fr)); gap: 6px; padding: 14px; min-width: calc(128px + var(--h) * 68px); }
.av-corner { display: flex; align-items: flex-end; padding: 0 4px 4px; }
.av-hour { text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-3); padding: 2px 0 4px; border-radius: 6px; }
.av-hour.sel { color: var(--plum); background: var(--plum-soft); }
.av-day { display: flex; flex-direction: column; justify-content: center; padding: 0 10px; border-radius: 10px; position: sticky; left: 0; z-index: 2; background: var(--surface); }
.av-day b { font-weight: 700; font-size: 13.5px; }
.av-day small { font-size: 11.5px; }
.av-day.sel { background: var(--plum-soft); }
.av-day.sel b { color: var(--plum); }
.av-cell { height: 52px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; border: 1px solid transparent; transition: transform .1s, box-shadow .15s; font-variant-numeric: tabular-nums; }
.av-cell b { font-size: 15px; font-weight: 800; line-height: 1.1; }
.av-cell small { font-size: 10.5px; font-weight: 600; color: inherit; opacity: .8; }
.av-cell:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.av-cell.open { background: color-mix(in srgb, var(--sage) 16%, white); color: var(--sage); border-color: color-mix(in srgb, var(--sage) 30%, white); }
.av-cell.part { background: var(--amber-soft); color: var(--amber); border-color: color-mix(in srgb, var(--amber) 25%, white); }
.av-cell.full { background: var(--rose-soft); color: var(--rose); border-color: color-mix(in srgb, var(--rose) 22%, white); }
.av-cell.past { background: repeating-linear-gradient(135deg, var(--grey-soft) 0 6px, #F5F1EC 6px 12px); color: var(--ink-3); }
.av-cell.past:hover { transform: none; box-shadow: none; }
.av-cell.sel { box-shadow: 0 0 0 2.5px var(--plum); transform: none; }
.av-key { display: inline-block; width: 14px; height: 14px; border-radius: 4px; }
.av-key.open { background: color-mix(in srgb, var(--sage) 22%, white); border: 1px solid var(--sage); }
.av-key.part { background: var(--amber-soft); border: 1px solid var(--amber); }
.av-key.full { background: var(--rose-soft); border: 1px solid var(--rose); }
.av-key.past { background: repeating-linear-gradient(135deg, var(--grey-soft) 0 3px, #fff 3px 6px); border: 1px solid var(--line); }
.cd-staff { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.cd-staff:last-child { border-bottom: 0; }
.cd-staff > .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cd-name { display: flex; align-items: baseline; gap: 8px; }
.cd-name b { font-weight: 700; }
.cd-book, .cd-free { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); }
.cd-book { cursor: pointer; }
.cd-book:hover { border-color: var(--gold-2); background: #fff; }
.cd-book .grow, .cd-free .grow { flex: 1; min-width: 0; }
.cd-book b, .cd-free b { display: block; font-weight: 600; font-size: 13px; }
.cd-book small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-free { background: color-mix(in srgb, var(--sage) 6%, white); border-color: color-mix(in srgb, var(--sage) 25%, white); }
@media (max-width: 760px) {
  .av-grid { grid-template-columns: 92px repeat(var(--h), 56px); gap: 5px; padding: 10px; min-width: 100%; width: max-content; }
  .av-day { padding: 0 6px; box-shadow: 6px 0 8px -6px rgba(0,0,0,.12); }
  .av-day b { font-size: 12.5px; }
  .av-cell { height: 48px; }
  .cal-bar .legend-row { order: 6; }
}
.cal-detail { scroll-margin-top: 72px; }

/* demo data switch (top right) */
.data-btn { gap: 6px; }
.data-btn.is-empty { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
.data-opt + .data-opt { margin-top: 0; }

/* ---------- Setup guide ---------- */
.su-progress { padding: 16px 20px; margin-bottom: 14px; display: grid; gap: 10px; }
.su-progress .meter { height: 8px; }
.su-progress .meter i { background: var(--sage); }
.su-ready { display: flex; align-items: center; gap: 14px; padding: 16px 20px; margin-bottom: 14px; background: var(--sage-soft); border-color: color-mix(in srgb, var(--sage) 35%, white); color: var(--ink); flex-wrap: wrap; }
.su-ready > .ic { color: var(--sage); }
.su-ready b { display: block; font-size: 15px; }
.su-steps { gap: 12px; }
.su-step { padding: 16px 20px; }
.su-step.done { border-color: color-mix(in srgb, var(--sage) 30%, var(--line)); }
.su-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.su-head .grow { flex: 1; min-width: 220px; }
.su-head h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.su-head small { display: block; margin-top: 2px; font-size: 13px; }
.su-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 13px; background: var(--plum-soft); color: var(--plum); }
.su-step.done .su-n { background: var(--sage); color: #fff; }
.su-actions { gap: 8px; }
.su-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.su-item { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); min-width: 0; }
.su-main { flex: 1; min-width: 0; text-align: left; }
.su-main[data-act]:hover b { color: var(--plum); text-decoration: underline; }
.su-main b { display: block; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.su-main small { display: block; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) { .su-step, .su-progress, .su-ready { padding: 14px; } .su-actions { width: 100%; } .su-actions .btn { flex: 1 1 auto; } }
