/* BAT NAIL — identity and app styles.
   Idea: lacquer. Technicians are nail swatches, tickets are paper slips, pink is the one loud colour. */

@font-face { font-family: 'Be Vietnam Pro'; font-weight: 400; font-display: swap; src: url(fonts/bvp-400-vi.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Be Vietnam Pro'; font-weight: 400; font-display: swap; src: url(fonts/bvp-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Be Vietnam Pro'; font-weight: 500; font-display: swap; src: url(fonts/bvp-500-vi.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Be Vietnam Pro'; font-weight: 500; font-display: swap; src: url(fonts/bvp-500.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Be Vietnam Pro'; font-weight: 600; font-display: swap; src: url(fonts/bvp-600-vi.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Be Vietnam Pro'; font-weight: 600; font-display: swap; src: url(fonts/bvp-600.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 200 800; font-display: swap; src: url(fonts/bricolage-vi.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 200 800; font-display: swap; src: url(fonts/bricolage.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --pink: #E0176E; --pink-deep: #B90F58; --pink-ink: #8C0B43;
  --blush: #FFF1F6; --petal: #FFDCE9; --line: #F3C9DA; --line-soft: #F8E1EA;
  --plum: #2B0F1E; --plum-2: #5C3B4C; --plum-3: #7C5D6C;
  --paper: #FFFFFF; --bg: #FCF7F9;
  --mint: #087A5A; --mint-bg: #E2F5EE; --gold: #F2A51A; --gold-bg: #FFF3D6; --gold-ink: #7A4B00;
  --red: #B3261E; --red-bg: #FCE9E7; --blue: #2A5BD7; --blue-bg: #E8EFFD;
  --r-s: 10px; --r-m: 14px; --r-l: 20px; --r-xl: 28px;
  --float: 0 12px 34px rgba(43, 15, 30, .16), 0 2px 6px rgba(43, 15, 30, .08);
  --font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Bricolage Grotesque', 'Be Vietnam Pro', system-ui, sans-serif;
  --tap: 40px; --rail: 0px; --bar: 62px;
  color-scheme: light;
}
@media (pointer: coarse) { :root { --tap: 46px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-bottom: calc(var(--bar) + env(safe-area-inset-bottom, 0px) + 12px); }
body { margin: 0; background: var(--bg); color: var(--plum); font: 400 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; line-height: 1.15; text-wrap: balance; }
h1 { font-size: 26px; } h2 { font-size: 20px; } h3 { font-size: 16px; }
p { text-wrap: pretty; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; border-radius: 6px; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: -.01em; }
.muted { color: var(--plum-3); } .small { font-size: 13px; } .tiny { font-size: 12px; } .strong { font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
svg.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- shell ---------- */
.shell { min-height: 100dvh; display: flex; flex-direction: column; padding-bottom: calc(var(--bar) + env(safe-area-inset-bottom, 0px)); }
.rail { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: flex; background: var(--paper); border-top: 1px solid var(--line); padding: 4px max(6px, env(safe-area-inset-left, 0px)) max(4px, env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-right, 0px)); }
.rail .brand, .rail .rail-foot { display: none; }
.rail nav { display: flex; flex: 1; justify-content: space-around; }
.rail a { flex: 1; max-width: 96px; min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--plum-3); font-size: 11.5px; font-weight: 500; border-radius: var(--r-m); }
.rail a svg.ic { width: 22px; height: 22px; }
.rail a[aria-current="page"] { color: var(--pink-deep); background: var(--blush); font-weight: 600; }
.rail a.only-wide { display: none; }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 10px; padding: max(8px, env(safe-area-inset-top, 0px)) 14px 8px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-soft); }
.topbar .logo { height: 22px; width: auto; display: block; }
.topbar h1 { font-size: 19px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .tools { display: flex; align-items: center; gap: 6px; }
.net { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); font-size: 12px; font-weight: 600; color: var(--mint); }
.net::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.net.off { color: var(--gold-ink); background: var(--gold-bg); border-color: #F1D48E; }
.net span { display: none; }
.who { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 4px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); font-weight: 600; font-size: 13px; }
.who .dot { width: 26px; height: 26px; border-radius: 50%; background: var(--plum); color: #fff; display: grid; place-items: center; font: 700 12px var(--display); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.page { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.page-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head .grow { flex: 1; min-width: 0; }
.page-head p { color: var(--plum-3); font-size: 13px; }

@media (min-width: 900px) {
  :root { --rail: 92px; --bar: 0px; }
  .shell { flex-direction: row; padding-bottom: 0; }
  .rail { top: 0; right: auto; width: var(--rail); flex-direction: column; border-top: 0; border-right: 1px solid var(--line); padding: 14px 8px; gap: 10px; }
  .rail .brand { display: grid; place-items: center; padding: 2px 0 8px; }
  .rail .brand svg { width: 34px; height: 44px; }
  .rail nav { flex-direction: column; justify-content: flex-start; gap: 4px; overflow-y: auto; }
  .rail a { flex: none; max-width: none; min-height: 58px; font-size: 12px; }
  .rail a.only-wide { display: flex; } .rail a.only-narrow { display: none; }
  .rail .rail-foot { display: grid; gap: 6px; justify-items: center; }
  .main { margin-left: var(--rail); }
  .topbar { padding: 12px 22px; }
  .topbar .logo { display: none; }
  .topbar h1 { font-size: 22px; }
  .net span { display: inline; }
  .page { padding: 18px 22px 22px; gap: 16px; }
}

/* ---------- buttons, chips, fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 16px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--paper); font-weight: 600; font-size: 14.5px; color: var(--plum); text-decoration: none; white-space: nowrap; transition: transform .06s; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--pink); border-color: var(--pink); color: #fff; }
.btn.primary:hover { background: var(--pink-deep); }
.btn.soft { background: var(--blush); border-color: var(--petal); color: var(--pink-ink); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.danger { color: var(--red); border-color: #F2C4BF; background: var(--red-bg); }
.btn.dark { background: var(--plum); border-color: var(--plum); color: #fff; }
.btn.big { min-height: 56px; font-size: 17px; padding: 0 22px; border-radius: var(--r-l); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: var(--r-s); }
.btn.full { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn .num { font-size: 1.05em; }
.iconbtn { position: relative; display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); border-radius: var(--r-m); border: 1px solid transparent; background: transparent; color: var(--plum-2); padding: 0; }
.iconbtn:hover { background: var(--blush); }
.iconbtn.line { border-color: var(--line); background: var(--paper); }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .row.end { justify-content: flex-end; } .row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 10px; min-width: 0; } .grow { flex: 1; min-width: 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin: 0 -14px; padding-inline: 14px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); font-weight: 500; font-size: 14px; white-space: nowrap; }
.chip[aria-pressed="true"], .chip.on { background: var(--plum); border-color: var(--plum); color: #fff; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--blush); color: var(--pink-ink); white-space: nowrap; }
.pill.ok { background: var(--mint-bg); color: var(--mint); } .pill.warn { background: var(--gold-bg); color: var(--gold-ink); } .pill.bad { background: var(--red-bg); color: var(--red); } .pill.info { background: var(--blue-bg); color: var(--blue); } .pill.gray { background: #F1ECEE; color: var(--plum-2); }
.pill.next { background: var(--gold); color: var(--plum); }
.seg { display: flex; background: #F4E9EE; border-radius: var(--r-m); padding: 3px; gap: 2px; }
.seg button { flex: 1; min-height: 36px; border: 0; background: transparent; border-radius: 11px; font-weight: 600; font-size: 13.5px; color: var(--plum-2); padding: 0 10px; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--plum); box-shadow: 0 1px 3px rgba(43, 15, 30, .12); }
.seg.scroll { overflow-x: auto; scrollbar-width: none; } .seg.scroll button { flex: none; }
.field { display: grid; gap: 5px; }
.field > span, .label { font-size: 13px; font-weight: 600; color: var(--plum-2); }
.field small { color: var(--plum-3); font-size: 12.5px; }
.input, select.input, textarea.input { width: 100%; min-height: var(--tap); padding: 8px 12px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--paper); }
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { outline: 2px solid var(--pink); outline-offset: 0; border-color: var(--pink); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.switch { display: flex; align-items: center; gap: 12px; min-height: var(--tap); cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i { flex: none; width: 46px; height: 28px; border-radius: 99px; background: #E4D5DC; position: relative; transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch input:checked + i { background: var(--pink); } .switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 3px solid var(--pink); outline-offset: 2px; }
.searchbox { position: relative; flex: 1; min-width: 160px; }
.searchbox svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--plum-3); }
.searchbox .input { padding-left: 40px; border-radius: 99px; }

/* ---------- surfaces ---------- */
.card { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--r-l); padding: 14px; }
.card.flat { border-color: var(--line); }
.card h3 { margin-bottom: 8px; }
.list { display: grid; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line-soft); min-height: 56px; width: 100%; text-align: left; background: none; border-inline: 0; border-top: 0; }
.item:last-child { border-bottom: 0; }
.item.wrap { flex-wrap: wrap; row-gap: 6px; }
button.item:hover { background: var(--blush); }
.item .t { font-weight: 600; } .item .s { font-size: 13px; color: var(--plum-3); }
.item .end { margin-left: auto; text-align: right; flex: none; }
.empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 26px 14px; color: var(--plum-3); }
.empty svg.ic { width: 30px; height: 30px; color: var(--pink); }
.empty b { color: var(--plum); font-family: var(--display); font-size: 16px; }
.note { background: var(--blush); border: 1px solid var(--petal); border-radius: var(--r-m); padding: 10px 12px; font-size: 13.5px; color: var(--pink-ink); }
.note.gold { background: var(--gold-bg); border-color: #F1D48E; color: var(--gold-ink); }
.note.gray { background: #F6F1F3; border-color: #E9DDE3; color: var(--plum-2); }
.demo-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--plum); color: #fff; font: 700 11px var(--display); letter-spacing: .04em; }

/* nail swatch: the technician's colour */
.swatch { --c: var(--pink); --w: 34px; position: relative; flex: none; width: var(--w); height: calc(var(--w) * 1.32); background: var(--c); border-radius: 50% 50% 46% 46% / 64% 64% 36% 36%; display: grid; place-items: center; color: #fff; font: 700 calc(var(--w) * .42) var(--display); padding-top: calc(var(--w) * .2); }
.swatch::after { content: ""; position: absolute; left: 21%; top: 17%; width: 9%; height: 42%; border-radius: 99px; background: rgba(255, 255, 255, .6); transform: rotate(9deg); }
.swatch.dark-text { color: var(--plum); }
.swatch.s { --w: 24px; } .swatch.l { --w: 46px; } .swatch.xl { --w: 64px; }
.swatch.off { filter: grayscale(1); opacity: .45; }

/* ---------- front desk ---------- */
.lanes { container: lanes / inline-size; display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; }
.lane { display: none; flex-direction: column; gap: 10px; min-width: 0; }
.lane.show { display: flex; }
.lane-head { display: flex; align-items: center; gap: 8px; }
.lane-head h2 { font-size: 17px; } .lane-head .count { font: 700 13px var(--display); background: var(--petal); color: var(--pink-ink); border-radius: 99px; padding: 1px 9px; }
.lane-head .grow { flex: 1; }
@container lanes (inline-size > 780px) {
  .lanes > .seg { display: none; }
  .lanes .lane-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .lane { display: flex; background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--r-xl); padding: 14px; }
}
.wait { display: grid; gap: 8px; padding: 12px; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--paper); }
.wait .top { display: flex; align-items: center; gap: 10px; }
.wait .name { font-weight: 600; font-size: 15.5px; }
.wait .mins { margin-left: auto; font: 700 14px var(--display); color: var(--plum-2); }
.wait .mins.long { color: var(--red); }
.svc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.svc-tags span { font-size: 12.5px; padding: 2px 8px; border-radius: 6px; background: #F6EEF2; color: var(--plum-2); }
.techrow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-l); border: 1px solid var(--line-soft); background: var(--paper); width: 100%; text-align: left; }
.techrow.next { border-color: var(--gold); background: linear-gradient(90deg, var(--gold-bg), #fff 70%); }
.techrow .rank { font: 700 13px var(--display); color: var(--plum-3); width: 16px; text-align: center; }
.techrow .name { font-weight: 600; font-size: 15.5px; }
.techrow .turns { margin-left: auto; text-align: right; }
.techrow .turns b { display: block; font: 700 20px var(--display); line-height: 1; }
.techrow .turns span { font-size: 11.5px; color: var(--plum-3); }
.slip { display: grid; gap: 6px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); width: 100%; text-align: left; position: relative; }
.slip::before { content: ""; position: absolute; left: 12px; right: 12px; top: 0; border-top: 2px dashed var(--line); transform: translateY(-1px); opacity: 0; }
.slip .top { display: flex; align-items: center; gap: 8px; }
.slip .no { font: 700 16px var(--display); }
.slip .amt { margin-left: auto; font: 700 17px var(--display); }
.slip .who2 { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--plum-2); flex-wrap: wrap; }
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-m); background: var(--gold-bg); border: 1px solid #F1D48E; color: var(--gold-ink); font-size: 13.5px; flex-wrap: wrap; }

/* ---------- ticket / checkout ---------- */
.pos { container: pos / inline-size; display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; }
.pos-pane { display: none; flex-direction: column; gap: 12px; min-width: 0; }
.pos-pane.show { display: flex; }
.techstrip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.techstrip button { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 10px 6px; min-width: 64px; border-radius: var(--r-m); border: 2px solid transparent; background: transparent; font-size: 12.5px; font-weight: 600; }
.techstrip button[aria-pressed="true"] { border-color: var(--plum); background: var(--paper); }
.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 8px; }
.svc { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-height: 76px; padding: 10px 12px; text-align: left; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--paper); }
.svc:active { background: var(--blush); border-color: var(--pink); }
.svc b { font-weight: 600; font-size: 14.5px; line-height: 1.2; }
.svc span { font: 700 15px var(--display); color: var(--pink-deep); }
.svc small { font-size: 11.5px; color: var(--plum-3); font-weight: 500; }
.ticketbox { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; display: flex; flex-direction: column; }
.ticketbox .head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 2px dashed var(--line); }
.ticketbox .lines { padding: 4px 14px; }
.tline { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); width: 100%; background: none; border-inline: 0; border-top: 0; text-align: left; min-height: 52px; }
.tline:last-child { border-bottom: 0; }
.tline .nm { font-weight: 600; } .tline .sub { font-size: 12.5px; color: var(--plum-3); }
.tline .pr { margin-left: auto; text-align: right; font: 600 15px var(--display); }
.tline .pr s { display: block; font-size: 12px; color: var(--plum-3); font-weight: 500; }
.totals { padding: 10px 14px; border-top: 2px dashed var(--line); display: grid; gap: 4px; }
.totals .r { display: flex; justify-content: space-between; font-size: 14px; }
.totals .r.big { font: 700 22px var(--display); padding-top: 4px; }
.totals .r.neg span:last-child { color: var(--mint); }
.ticketbox .acts { padding: 12px 14px; display: grid; gap: 8px; background: #FFFAFC; border-top: 1px solid var(--line-soft); }
.paybar { position: sticky; bottom: calc(var(--bar) + env(safe-area-inset-bottom, 0px) + 8px); z-index: 5; }
@container pos (inline-size > 780px) {
  .pos > .seg, .pos .paybar { display: none; }
  .pos .pos-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
  .pos-pane { display: flex; }
  .pos-pane.ticket-pane { position: sticky; top: 76px; }
}

/* ---------- sheets (native dialog) ---------- */
dialog.sheet { border: 0; padding: 0; margin: 0; width: 100%; max-width: 100%; max-height: 92dvh; position: fixed; inset: auto 0 0 0; border-radius: var(--r-xl) var(--r-xl) 0 0; background: var(--paper); color: var(--plum); box-shadow: var(--float); }
dialog.sheet[open] { display: flex; flex-direction: column; }
dialog.sheet:modal { overscroll-behavior: contain; }
dialog.sheet::backdrop { background: rgba(43, 15, 30, .45); overflow: hidden; overscroll-behavior: contain; }
dialog.sheet.full { max-height: 100dvh; height: 100dvh; border-radius: 0; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px 18px; }
.sheet-head h2 { flex: 1; min-width: 0; font-size: 19px; }
.sheet-head p { color: var(--plum-3); font-size: 13px; margin-top: 2px; font-family: var(--font); font-weight: 400; letter-spacing: 0; }
.sheet-body { padding: 4px 18px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; }
.sheet-foot { padding: 10px 18px max(14px, env(safe-area-inset-bottom, 0px)); display: flex; gap: 10px; border-top: 1px solid var(--line-soft); }
.sheet-foot .btn { flex: 1; }
@media (min-width: 700px) {
  dialog.sheet { inset: 0; margin: auto; width: min(520px, 92vw); max-height: 88dvh; border-radius: var(--r-xl); }
  dialog.sheet.wide { width: min(760px, 94vw); }
  dialog.sheet.full { width: min(980px, 96vw); height: min(760px, 94dvh); border-radius: var(--r-xl); }
}
@media (prefers-reduced-motion: no-preference) {
  dialog.sheet[open] { animation: rise .18s ease-out; }
  @keyframes rise { from { transform: translateY(18px); opacity: .6; } }
  .toast { animation: rise .18s ease-out; }
}
.toasts { position: fixed; z-index: 100; left: 0; right: 0; bottom: calc(var(--bar) + env(safe-area-inset-bottom, 0px) + 14px); display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 14px; }
.toast { background: var(--plum); color: #fff; padding: 10px 16px; border-radius: 99px; font-weight: 500; font-size: 14px; box-shadow: var(--float); max-width: 100%; }
.toast.bad { background: var(--red); }

/* keypad */
.pad-display { text-align: center; font: 700 44px/1.1 var(--display); padding: 10px 0 4px; font-variant-numeric: tabular-nums; }
.pad-display.pin { letter-spacing: .3em; min-height: 58px; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pad button { min-height: 58px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--paper); font: 600 22px var(--display); }
.pad button:active { background: var(--blush); }
.pad button.fn { font: 600 14px var(--font); color: var(--plum-2); background: #FBF3F6; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* payment */
.due { text-align: center; padding: 6px 0 2px; }
.due small { display: block; color: var(--plum-3); font-size: 13px; }
.due b { font: 800 46px/1.05 var(--display); font-variant-numeric: tabular-nums; }
.tenders { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tender { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; min-height: 76px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--paper); text-align: left; font-weight: 600; }
.tender svg.ic { color: var(--pink); width: 24px; height: 24px; }
.tender small { font-weight: 400; color: var(--plum-3); font-size: 12px; }
.tipgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; }
.tipbtn { display: grid; gap: 2px; justify-items: center; padding: 10px 6px; min-height: 60px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--paper); font-weight: 600; }
.tipbtn small { font: 600 12.5px var(--display); color: var(--plum-3); }
.tipbtn[aria-pressed="true"] { background: var(--plum); border-color: var(--plum); color: #fff; } .tipbtn[aria-pressed="true"] small { color: #F3D9E4; }
.receipt { font-size: 13.5px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); padding: 16px; display: grid; gap: 4px; }
.receipt .c { text-align: center; } .receipt hr { border: 0; border-top: 1px dashed #C9B5BE; margin: 6px 0; width: 100%; }
.receipt .r { display: flex; justify-content: space-between; gap: 12px; }
.receipt .demo { text-align: center; font-weight: 700; letter-spacing: .08em; color: var(--red); border: 1px dashed var(--red); border-radius: 6px; padding: 4px; margin-top: 6px; font-size: 12px; }

/* terminal simulator */
.term { display: grid; justify-items: center; gap: 12px; }
.term-body { width: 210px; border-radius: 26px; background: #1C1B22; padding: 14px 12px 18px; box-shadow: 0 10px 24px rgba(0, 0, 0, .25), inset 0 0 0 2px #2E2C37; }
.term-screen { background: #fff; border-radius: 12px; min-height: 250px; padding: 14px 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.term-screen .amt { font: 800 30px var(--display); }
.term-screen .st { font-weight: 600; }
.term-screen.ok { background: var(--mint-bg); } .term-screen.no { background: var(--red-bg); }
.term-slot { height: 8px; width: 110px; border-radius: 4px; background: #0C0B10; margin: 12px auto 0; }
.wave { width: 46px; height: 46px; color: var(--pink); }

/* ---------- reports ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kpi { padding: 12px 14px; border-radius: var(--r-l); background: var(--paper); border: 1px solid var(--line-soft); }
.kpi span { font-size: 12.5px; color: var(--plum-3); font-weight: 500; }
.kpi b { display: block; font: 700 24px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.kpi small { font-size: 12px; color: var(--plum-3); } .kpi small.up { color: var(--mint); } .kpi small.down { color: var(--red); }
.kpi.hero { background: var(--pink); border-color: var(--pink); color: #fff; } .kpi.hero span, .kpi.hero small { color: #FFE2EE; }
.tw { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--paper); }
.tw:focus-visible { outline-offset: -3px; }
table.t { border-collapse: collapse; width: 100%; font-size: 13.5px; }
table.t th, table.t td { padding: 8px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line-soft); }
table.t th:first-child, table.t td:first-child { text-align: left; position: sticky; left: 0; background: inherit; }
table.t thead th { background: #FBF0F4; font-weight: 600; color: var(--plum-2); font-size: 12.5px; position: sticky; top: 0; }
table.t tbody tr { background: var(--paper); }
table.t td.num, table.t td { font-variant-numeric: tabular-nums; }
table.t tr.total td, table.t tr.total th { font-weight: 700; background: #FFF6F9; border-top: 2px solid var(--line); }
table.t tr.sec td { background: var(--plum); color: #fff; font-weight: 600; text-align: left; font-size: 12.5px; }
table.t tr.sub td { color: var(--plum-3); font-size: 12.5px; }
table.t td.pos { color: var(--mint); } table.t td.neg { color: var(--red); }
table.t tr.tap { cursor: pointer; } table.t tr.tap:hover td { background: var(--blush); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 110px; }
.bars div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; font-size: 11px; color: var(--plum-3); height: 100%; }
.bars i { display: block; width: 100%; border-radius: 6px 6px 2px 2px; background: var(--petal); min-height: 3px; }
.bars div.today i { background: var(--pink); }
.alert { display: flex; gap: 12px; padding: 12px; border-radius: var(--r-l); border: 1px solid var(--line-soft); background: var(--paper); align-items: flex-start; width: 100%; text-align: left; }
.alert .mark { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-bg); color: var(--gold-ink); }
.alert.high .mark { background: var(--red-bg); color: var(--red); } .alert.ok .mark { background: var(--mint-bg); color: var(--mint); }
.alert b { display: block; font-family: var(--display); font-size: 15.5px; }

/* ---------- lock, kiosk ---------- */
.lock { min-height: 100dvh; display: grid; grid-template-columns: 1fr; background: var(--paper); }
.lock-hero { background: var(--pink); color: #fff; padding: max(26px, env(safe-area-inset-top, 0px)) 24px 26px; display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; }
.lock-hero .logo { height: 34px; width: auto; align-self: flex-start; }
.lock-hero h1 { font-size: clamp(30px, 6vw, 52px); font-weight: 800; line-height: 1.02; max-width: 12ch; }
.lock-hero p { max-width: 44ch; color: #FFE6F0; }
.lock-hero ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.lock-hero li { display: flex; gap: 10px; align-items: flex-start; }
.lock-hero li svg.ic { margin-top: 2px; }
.nails { position: absolute; right: -18px; bottom: -34px; display: flex; gap: 10px; transform: rotate(-14deg); pointer-events: none; }
.nails .swatch { --w: 54px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 6px 0 rgba(140, 11, 67, .35); }
.lock-panel { padding: 22px 24px 30px; display: flex; flex-direction: column; gap: 14px; align-items: stretch; justify-content: center; max-width: 420px; width: 100%; margin: 0 auto; }
@media (min-width: 900px) { .lock { grid-template-columns: 1.1fr 1fr; } .lock-hero { padding: 54px 56px; justify-content: center; } .lock-hero .logo { height: 44px; margin-bottom: 14px; } .nails { right: 30px; bottom: -40px; } .nails .swatch { --w: 88px; } }
.kiosk { min-height: 100dvh; background: var(--blush); display: flex; flex-direction: column; }
.kiosk-top { display: flex; align-items: center; justify-content: space-between; padding: max(16px, env(safe-area-inset-top, 0px)) 20px 10px; }
.kiosk-top .logo { height: 26px; }
.kiosk-main { flex: 1; display: grid; place-items: center; padding: 10px 20px 30px; }
.kiosk-card { width: min(560px, 100%); background: var(--paper); border-radius: var(--r-xl); padding: 26px 22px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 20px 50px rgba(224, 23, 110, .14); }
.kiosk-card h1 { font-size: clamp(28px, 6vw, 40px); font-weight: 800; }
.kiosk-card .lead { font-size: 17px; color: var(--plum-2); }
.pickgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pick { min-height: 58px; padding: 10px 12px; border-radius: var(--r-m); border: 2px solid var(--line); background: var(--paper); font-weight: 600; text-align: left; display: flex; align-items: center; gap: 10px; }
.pick[aria-pressed="true"] { border-color: var(--pink); background: var(--blush); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: var(--plum-2); cursor: pointer; }
.check input { width: 24px; height: 24px; flex: none; accent-color: var(--pink); margin: 0; }

/* settings */
.setnav { display: grid; gap: 8px; }
.setnav button { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-l); border: 1px solid var(--line-soft); background: var(--paper); text-align: left; }
.setnav button svg.ic { color: var(--pink); }
.setnav button b { display: block; } .setnav button span { font-size: 13px; color: var(--plum-3); }
.swatchpick { display: flex; gap: 10px; flex-wrap: wrap; }
.swatchpick button { border: 2px solid transparent; background: none; padding: 4px; border-radius: 12px; }
.swatchpick button[aria-pressed="true"] { border-color: var(--plum); }
.cols2 { display: grid; gap: 14px; }
@media (min-width: 1000px) { .cols2 { grid-template-columns: 1fr 1fr; align-items: start; } }

/* print */
#print-root { display: none; }
@media print {
  body.printing > *:not(#print-root) { display: none !important; }
  body.printing #print-root { display: block; padding: 0; color: #000; font-size: 12px; }
  body.printing .receipt { border: 0; max-width: 300px; margin: 0 auto; }
  body.printing table.t th, body.printing table.t td { padding: 4px 6px; }
}
