/* Car Care Queue v1.5 – light, minimal: white / sky blue (selection) / green (actions) */
:root {
  --ink: #0F2233;
  --muted: #5B6B7C;
  --line: #E3E9F0;
  --line-strong: #C5D0DC;
  --bg: #F5F8FB;
  --card: #FFFFFF;
  --green: #12805C;        /* actions; white text passes 4.9:1 */
  --green-ink: #0E6B4C;
  --green-soft: #E7F6EF;
  --logo-green: #12805C;
  --blue: #1E6FD9;         /* selected things; white text passes 4.6:1 */
  --blue-ink: #1557AE;
  --blue-soft: #EAF2FD;
  --orange: #C2410C;
  --orange-soft: #FFF1EB;
  --yellow: #1E6FD9;
  --yellow-soft: #EAF2FD;
  --red: #B91C1C;
  --radius: 14px;
  --font: 'IBM Plex Sans Thai', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--ink); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.app { max-width: 560px; margin: 0 auto; min-height: 100dvh; position: relative; padding-bottom: 96px; }
.app.no-nav { padding-bottom: 24px; }

/* header */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 8px;
  background: var(--ink); color: #fff; border-bottom: 3px solid var(--logo-green); }
.top h1 { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.25; }
.top .sub { font-size: 14px; color: #C8C8C8; }
.top .grow { flex: 1; min-width: 0; padding-left: 4px; }
.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px;
  border: 1px solid transparent; background: transparent; color: inherit; cursor: pointer; text-decoration: none; flex-shrink: 0; }
.top .icon-btn.outline { border-color: #4A4A4A; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 12px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pill.yellow { background: var(--yellow); color: var(--ink); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px 16px 0; }
.steps span { height: 4px; border-radius: 2px; background: #D5DBE1; }
.steps span.on { background: var(--green); }

main { padding: 14px 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card.warn { border: 2px solid #F0B44C; }
.card h2 { margin: 0; font-size: 17px; font-weight: 600; }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }
.big { font-size: 22px; font-weight: 700; }
.center { text-align: center; }
.hidden { display: none !important; }

/* forms */
label.f { font-size: 15px; font-weight: 600; display: block; margin-bottom: 6px; }
.field { display: flex; flex-direction: column; }
.input, select.input, textarea.input { width: 100%; min-height: 50px; border-radius: 12px; border: 1px solid var(--line-strong); background: #fff;
  padding: 0 12px; font-size: 17px; }
textarea.input { padding: 10px 12px; min-height: 84px; resize: vertical; }
.input:focus { border-color: var(--green); outline: 2px solid var(--green-soft); }
.plate { border: 2px solid var(--ink); border-radius: 12px; padding: 8px 12px; display: flex; flex-direction: column; align-items: center; background: #fff; }
.plate input { width: 100%; border: none; outline: none; text-align: center; font-size: 32px; font-weight: 700; letter-spacing: 2px; background: transparent; }
.plate select { border: none; background: transparent; font-size: 16px; text-align: center; text-align-last: center; max-width: 100%; }

/* buttons */
.btn { min-height: 52px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: #fff; font-size: 17px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; cursor: pointer; text-decoration: none; color: var(--ink); }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.soft { background: var(--green-soft); border-color: var(--green); color: var(--green-ink); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.line { background: #06C755; border-color: #06C755; color: #04230F; font-weight: 700; }
.btn.danger { color: #991B1B; border-color: var(--red); }
.btn.block { width: 100%; }
.btn.lg { min-height: 58px; font-size: 18px; }
.btn.sm { min-height: 44px; font-size: 15px; padding: 0 14px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.chip { min-height: 44px; padding: 0 12px; border-radius: 22px; border: 1px solid var(--line-strong); background: #fff; display: inline-flex;
  align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.chip.on { border: 2px solid var(--green); background: var(--green-soft); }
.swatch { width: 22px; height: 22px; border-radius: 11px; border: 1px solid #9AA3AE; }
.seg { display: grid; gap: 6px; background: #E4E5E1; padding: 4px; border-radius: 12px; }
.seg button { min-height: 44px; border-radius: 9px; border: none; background: transparent; font-size: 16px; font-weight: 600; cursor: pointer; }
.seg button.on { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.wrap { display: flex; flex-wrap: wrap; gap: 8px; }

/* bottom bar for wizard steps */
.bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line);
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
.bottom .inner { max-width: 528px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }

/* when a screen has both the step bar and the tab bar, stack the step bar above the tabs */
.app.has-tabs .bottom { bottom: calc(72px + env(safe-area-inset-bottom)); padding-bottom: 12px; box-shadow: 0 -4px 12px rgba(0,0,0,.06); }
.app.has-tabs.has-bottom { padding-bottom: 170px; }

/* tab bar */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line);
  padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); }
.tabs .inner { max-width: 560px; margin: 0 auto; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.tabs a { min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 13px;
  color: var(--muted); text-decoration: none; font-weight: 500; }
.tabs a .ic { width: 48px; height: 28px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.tabs a.on { color: var(--green-ink); font-weight: 700; }
.tabs a.on .ic { background: var(--green-soft); }

/* service options */
.opt { text-align: left; width: 100%; padding: 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); display: flex; gap: 12px;
  align-items: flex-start; cursor: pointer; }
.opt.on { border: 2px solid var(--green); }
.box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid #9AA3AE; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; }
.opt.on .box { background: var(--green); border-color: var(--green); }
.price { font-size: 17px; font-weight: 700; white-space: nowrap; }

/* inspection diagram */
.car-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.car { position: relative; width: 240px; height: 440px; }
.car svg { position: absolute; inset: 0; }
.zone { position: absolute; border-radius: 10px; border: 1.5px dashed #B4BCC6; background: rgba(30,123,52,0.05); padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; }
.zone .n { width: 26px; height: 26px; border-radius: 13px; color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center;
  justify-content: center; box-shadow: 0 0 0 2px #fff; }
.side-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.vert { writing-mode: vertical-rl; }
.mark-row { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 10px; border-radius: 10px; background: #F6F8FA; }
.dot { width: 24px; height: 24px; border-radius: 12px; color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.check { min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: 15px; cursor: pointer; }
.check.on { border: 1.5px solid var(--green); background: var(--green-soft); }
.check input { width: 20px; height: 20px; accent-color: var(--green); margin: 0; }
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.photos .ph { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #DDE3E9; }
.photos .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos .ph button { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border-radius: 16px; border: none; background: rgba(0,0,0,.6); color: #fff; }
.photos label.add { aspect-ratio: 1; border-radius: 12px; border: 1.5px dashed var(--green); background: var(--green-soft); color: var(--green-ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 14px; font-weight: 600; cursor: pointer; }
.ok-banner { background: var(--green-soft); border: 1px solid #B7E0C6; border-radius: 14px; padding: 14px 16px; color: var(--green-ink); font-size: 15px; }

/* queue */
.qcard { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.qno { font-size: 26px; font-weight: 700; min-width: 80px; }
.status { padding: 4px 10px; border-radius: 12px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.st-IN_QUEUE { background: #EEF0F3; color: #3A4452; }
.st-IN_PROGRESS { background: var(--yellow-soft); color: #4A3600; }
.st-QC { background: #FFF1DC; color: #7C3A06; }
.st-READY { background: #DCF5E4; color: var(--green-ink); }
.st-DELIVERED, .st-REGISTERED { background: #EEF0EC; color: var(--muted); }
.filter { display: flex; gap: 6px; overflow-x: auto; padding: 0 16px 12px; background: var(--ink); }
.filter button { min-height: 40px; padding: 0 12px; border-radius: 20px; border: 1px solid #5A5A5A; background: transparent; color: #fff;
  font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; flex-shrink: 0; }
.filter button.on { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.fab { position: fixed; right: max(16px, calc(50% - 264px)); bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 25; min-height: 56px; padding: 0 20px; border-radius: 28px;
  background: var(--green); color: #fff; display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; text-decoration: none;
  box-shadow: 0 6px 16px rgba(17,17,17,.25); }

/* ticket */
.ticket-page { background: var(--ink); min-height: 100dvh; }
.ticket { background: #fff; border-radius: 20px; padding: 24px 20px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ticket .no { font-size: 72px; font-weight: 700; line-height: 1.1; letter-spacing: 2px; }
.stats3 { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed #C9D0D8; text-align: center; }

/* tracking */
.hero { border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 6px; color: #fff; background: #3A4452; }
.hero.s-IN_PROGRESS { background: var(--yellow); color: var(--ink); }
.hero.s-QC { background: #9A4A07; }
.hero.s-READY, .hero.s-DELIVERED { background: var(--green); }
.stepper { list-style: none; margin: 0; padding: 0; }
.stepper li { display: flex; gap: 14px; min-height: 64px; }
.stepper .rail { display: flex; flex-direction: column; align-items: center; width: 28px; }
.stepper .b { width: 28px; height: 28px; border-radius: 14px; border: 2px solid #B4BCC6; background: #fff; display: flex; align-items: center;
  justify-content: center; font-size: 13px; font-weight: 700; color: var(--muted); flex-shrink: 0; }
.stepper .l { flex: 1; width: 2px; background: var(--line); margin: 4px 0; }
.stepper li.done .b, .stepper li.now .b { background: var(--green); border-color: var(--green); color: #fff; }
.stepper li.done .l { background: var(--green); }
.stepper li:last-child .l { display: none; }
.stepper li.now .t { font-weight: 700; }

/* report */
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; }
.bars { height: 170px; display: flex; align-items: flex-end; gap: 6px; border-bottom: 1px solid #C9D0D8; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.bars .bar i { display: block; width: 100%; max-width: 32px; border-radius: 6px 6px 0 0; background: #A7D3A0; }
.bars .bar.hi i { background: var(--green); }
.bars .bar b { font-size: 13px; }
.blabels { display: flex; gap: 6px; }
.blabels span { flex: 1; text-align: center; font-size: 13px; color: var(--muted); }
.meter { height: 8px; border-radius: 4px; background: #EEF0EC; }
.meter i { display: block; height: 8px; border-radius: 4px; background: var(--green); }

/* locked (free plan) */
.locked { position: relative; min-height: 60vh; }
.locked .skel { padding: 16px; display: flex; flex-direction: column; gap: 10px; filter: blur(3px); opacity: .75; }
.skel .sk { background: #fff; border: 1px solid var(--line); border-radius: 16px; height: 84px; }
.lockcard { position: absolute; left: 20px; right: 20px; top: 40%; transform: translateY(-50%); background: #fff; border-radius: 20px; padding: 22px 20px;
  box-shadow: 0 10px 30px rgba(17,17,17,.18); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.lockcard .lk { width: 56px; height: 56px; border-radius: 28px; background: var(--ink); color: var(--yellow); display: flex; align-items: center; justify-content: center; }
.quota { padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.quota .meter { height: 10px; border-radius: 5px; }
.quota .meter i { height: 10px; border-radius: 5px; }

/* watermark: faint shop logo over the page; never blocks taps */
.wm { position: fixed; inset: 0; z-index: 15; pointer-events: none; display: flex; align-items: center; justify-content: center; }
.wm img { width: min(92vw, 520px); filter: grayscale(1) invert(1); mix-blend-mode: multiply; }
.wm.dark img { filter: none; mix-blend-mode: screen; }

/* misc */
.toast { position: fixed; left: 50%; bottom: calc(110px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100; max-width: 92vw;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 15px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.toast.err { background: var(--red); }
.sheet-bg { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; background: #fff; border-radius: 20px 20px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 10px; }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp input { height: 58px; border-radius: 12px; border: 1px solid var(--line-strong); text-align: center; font-size: 26px; font-weight: 700; min-width: 0; padding: 0; }
.login-hero { background: var(--ink); height: 240px; display: flex; align-items: center; justify-content: center; border-bottom: 3px solid var(--logo-green); }
.login-hero img { width: 112px; height: 112px; border-radius: 26px; }
.code-input { font-family: ui-monospace, Menlo, monospace; text-transform: uppercase; letter-spacing: 2px; text-align: center; font-size: 22px; font-weight: 700; }
.plan-opt { text-align: left; width: 100%; background: #fff; border-radius: 16px; border: 1px solid var(--line); padding: 14px 16px; display: flex;
  align-items: center; gap: 12px; cursor: pointer; }
.plan-opt.on { border: 2px solid var(--green); }
.radio { width: 24px; height: 24px; border-radius: 12px; border: 2px solid var(--line-strong); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.plan-opt.on .radio { border-color: var(--green); }
.plan-opt.on .radio::after { content: ''; width: 12px; height: 12px; border-radius: 6px; background: var(--green); }
.mono { font-family: ui-monospace, Menlo, monospace; }
.spin { padding: 48px 0; text-align: center; color: var(--muted); }
@media (min-width: 600px) { .app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }

/* ---------------------------------------------------------------- v1.4 */
.st-CANCELLED { background: #FBEBEB; color: #991B1B; }
.hero.s-CANCELLED { background: var(--red); }
.btn.ghost-dark { background: transparent; border-color: #5A5A5A; color: #fff; }
.top .icon-btn.outline-l, .icon-btn.outline-l { border-color: var(--line-strong); }

/* Thai plate box */
.platebox { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 96px; padding: 3px 10px 2px;
  border: 2px solid var(--ink); border-radius: 8px; background: #fff; color: var(--ink); line-height: 1.15; flex-shrink: 0; }
.platebox b { font-size: 19px; font-weight: 700; letter-spacing: 1px; white-space: nowrap; }
.platebox span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.platebox.big { min-width: 190px; padding: 6px 18px 4px; border-width: 3px; border-radius: 12px; margin: 6px 0; }
.platebox.big b { font-size: 36px; letter-spacing: 2px; }
.platebox.big span { font-size: 15px; }

/* staff */
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 700; flex-shrink: 0; }
.staff-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px 0 4px; border-radius: 22px; border: 1px solid #4A4A4A;
  background: transparent; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; max-width: 140px; }
.staff-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-chip { min-height: 84px; border-radius: 14px; border: 1px solid var(--line-strong); background: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; cursor: pointer; padding: 8px 4px; font-size: 15px; }
.staff-chip.on { border: 2px solid var(--green); background: var(--green-soft); }
.color-dot { width: 40px; height: 40px; border-radius: 20px; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; padding: 0; }
.color-dot.on { box-shadow: 0 0 0 3px var(--ink); }
.switch { width: 52px; height: 32px; border-radius: 16px; border: none; background: #C9CFD6; position: relative; cursor: pointer; flex-shrink: 0; padding: 0; }
.switch span { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 13px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s; }
.switch.on { background: var(--green); }
.switch.on span { left: 23px; }
.lk-ic { width: 44px; height: 44px; border-radius: 12px; background: #FFF7E0; color: #4A3600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* search */
.searchbox { display: flex; align-items: center; gap: 8px; border: 2px solid var(--ink); border-radius: 12px; padding: 0 8px 0 12px; background: #fff; min-height: 58px; }
.searchbox input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 22px; font-weight: 700; letter-spacing: 1px; min-height: 52px; }
.searchbox.light { border: none; min-height: 50px; }
.searchbox.light input { font-size: 17px; font-weight: 500; letter-spacing: 0; min-height: 48px; }
.qsearch { background: var(--ink); padding: 0 16px 10px; }
.results { display: flex; flex-direction: column; gap: 8px; }
.result { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; text-decoration: none; color: inherit; font-size: 15px; }
.reward-flag { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: 6px; padding: 4px 10px; border-radius: 10px;
  background: #FFF0B8; color: #4A3600; font-size: 14px; font-weight: 600; }

/* ticket QR */
.qr { width: 132px; aspect-ratio: 1; flex-shrink: 0; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-row { width: 100%; display: flex; align-items: center; gap: 14px; margin-top: 12px; padding-top: 14px; border-top: 1px dashed #C9D0D8; }

/* history / visit */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding: 0 0 14px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li:last-child { padding-bottom: 0; }
.tdot { width: 14px; height: 14px; border-radius: 7px; margin-top: 4px; flex-shrink: 0; position: relative; z-index: 1; }
.car.small-car { transform: scale(.5); transform-origin: top left; width: 120px; height: 220px; flex-shrink: 0; }
.car.small-car svg { width: 240px; height: 440px; }
.photos button.ph { border: none; padding: 0; cursor: zoom-in; }
.viewer { position: fixed; inset: 0; z-index: 95; background: rgba(0,0,0,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 16px; }
.viewer img { max-width: 100%; max-height: 80dvh; border-radius: 8px; }

/* report calendar */
.cal-h, .cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-h span { font-size: 13px; color: var(--muted); font-weight: 600; }
.cal-d { min-height: 44px; border: none; border-radius: 10px; background: transparent; font-size: 16px; cursor: pointer; }
.cal-d.in { background: var(--green-soft); color: var(--green-ink); font-weight: 600; }
.cal-d.edge { background: var(--green); color: #fff; font-weight: 700; }
.cal-d.today { box-shadow: inset 0 0 0 2px var(--yellow); }
.cal-d[disabled] { color: #B4BCC6; cursor: default; }
.kpi-hero { background: var(--ink); color: #fff; border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 2px; }
.hero-n { font-size: 40px; font-weight: 700; line-height: 1.15; }
.print-head { display: none; }

/* promotions & loyalty */
.need-badge { width: 56px; height: 56px; border-radius: 14px; background: var(--ink); color: var(--yellow); display: flex; flex-direction: column;
  align-items: center; justify-content: center; line-height: 1; flex-shrink: 0; }
.need-badge b { font-size: 22px; }
.need-badge span { font-size: 11px; margin-top: 2px; }
.loy-card { background: var(--ink); color: #fff; border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.loy-mini { background: var(--ink); color: #fff; border: none; text-decoration: none; }
.stamps { display: grid; gap: 8px; }
.stamp { aspect-ratio: 1; border-radius: 50%; border: 2px dashed #5A5A5A; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #9A9A9A; }
.stamp.done { border: none; background: var(--yellow); color: var(--ink); }
.stamp.gift { border: 2px solid var(--yellow); color: var(--yellow); font-weight: 700; }

/* super admin */
.su-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 16px 12px; background: var(--ink); }
.su-tabs button { min-height: 44px; border-radius: 12px; border: 1px solid #5A5A5A; background: transparent; color: #fff; font-size: 16px; font-weight: 600; cursor: pointer; }
.su-tabs button.on { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.badge { display: inline-flex; min-width: 22px; height: 22px; border-radius: 11px; background: var(--red); color: #fff; font-size: 13px; align-items: center; justify-content: center; padding: 0 6px; }
.bonus-box { background: #FFF7E0; border: 1px solid #F0B44C; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.fresh-code { background: var(--ink); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.money-in { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 0 12px; min-height: 50px; font-size: 18px; font-weight: 600; }
.money-in input { width: 80px; border: none; outline: none; font-size: 20px; font-weight: 700; text-align: right; background: transparent; }
.otp-big { font-family: ui-monospace, Menlo, monospace; font-size: 40px; font-weight: 700; letter-spacing: 10px; text-align: center; padding: 8px 0; }

/* print: report and ticket print cleanly on white paper */
@media print {
  @page { margin: 12mm; }
  html, body { background: #fff !important; }
  .noprint, .tabs, .bottom, .top, .fab, .wm, .toast { display: none !important; }
  .app { padding: 0 !important; max-width: none; border: none !important; }
  .ticket-page { background: #fff !important; }
  .print-head { display: block; font-size: 18px; margin-bottom: 8px; }
  .card, .kpi, .kpi-hero, .ticket { break-inside: avoid; }
  .kpi-hero { background: #fff !important; color: #111 !important; border: 2px solid #111; }
  .kpi-hero span { color: #111 !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------------------------------------------------------------- v1.5 light theme */
:focus-visible { outline: 3px solid #8FB8EE; }
.top { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); }
.top .sub { color: var(--muted); }
.top .icon-btn.outline { border-color: var(--line); }
.top .logo-sq { width: 38px; height: 38px; border-radius: 11px; background: var(--blue); color: #fff; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; margin-left: 4px; }
.top .logo-sq img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.pill.yellow { background: var(--blue-soft); color: var(--blue-ink); }
.pill.green { background: var(--green-soft); color: var(--green-ink); }
.pill.blue { background: var(--blue-soft); color: var(--blue-ink); }
.pill.orange { background: var(--orange-soft); color: #9A3412; }
.pill.gray { background: #EEF1F4; color: #4A5868; }
.steps span.on { background: var(--blue); }
.input:focus { border-color: var(--blue); outline: 2px solid var(--blue-soft); }
.plate { border-color: var(--ink); }
.chip.on { border: 1px solid var(--blue); background: var(--blue); color: #fff; font-weight: 600; }
.chip.on .swatch { border-color: #fff; }
.seg { background: #EAEFF5; }
.seg button.on { color: var(--blue-ink); box-shadow: 0 1px 3px rgba(15,34,51,.12); }
.tabs a.on { color: var(--blue); }
.tabs a.on .ic { background: var(--blue-soft); }
.opt.on { border: 2px solid var(--blue); }
.opt.on .box { background: var(--blue); border-color: var(--blue); }
.check.on { border-color: var(--blue); background: var(--blue-soft); }
.check input { accent-color: var(--blue); }
.st-IN_QUEUE { background: #EEF1F4; color: #3E4C5A; }
.st-IN_PROGRESS { background: var(--blue-soft); color: var(--blue-ink); }
.st-QC { background: #FFF4E5; color: #8A4B08; }
.st-READY { background: var(--green-soft); color: var(--green-ink); }
.filter, .qsearch, .su-tabs { background: #fff; }
.filter { padding-top: 10px; border-bottom: 1px solid var(--line); }
.filter button { border-color: var(--line-strong); color: var(--ink); background: #fff; }
.filter button.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.qsearch { padding-top: 10px; }
.qsearch .searchbox { border-color: var(--line-strong); }
.su-tabs { padding-top: 10px; }
.su-tabs button { border-color: var(--line-strong); color: var(--ink); background: #fff; }
.su-tabs button.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.ticket-page { background: var(--blue-soft); }
.ticket { border: 1px solid var(--line); }
.hero { background: #3E4C5A; }
.hero.s-IN_PROGRESS { background: var(--blue); color: #fff; }
.hero.s-QC { background: #8A4B08; }
.stepper li.done .b, .stepper li.now .b { background: var(--blue); border-color: var(--blue); }
.stepper li.done .l { background: var(--blue); }
.bars .bar i { background: #A9C8F0; }
.bars .bar.hi i { background: var(--blue); }
.meter { background: var(--blue-soft); }
.meter i { background: var(--blue); }
.lockcard .lk { background: var(--blue-soft); color: var(--blue); }
.login-hero { background: #fff; border-bottom: 1px solid var(--line); height: 200px; }
.btn.ghost-dark { border-color: var(--line-strong); color: var(--ink); }
.staff-pill { border-color: var(--line-strong); color: var(--ink); }
.staff-chip.on { border: 2px solid var(--blue); background: var(--blue-soft); }
.color-dot.on { box-shadow: 0 0 0 3px var(--blue); }
.searchbox { border-color: var(--line-strong); }
.searchbox:focus-within { border-color: var(--blue); }
.reward-flag { background: var(--blue-soft); color: var(--blue-ink); }
.cal-d.in { background: var(--blue-soft); color: var(--blue-ink); }
.cal-d.edge { background: var(--blue); }
.cal-d.today { box-shadow: inset 0 0 0 2px var(--green); }
.kpi-hero { background: var(--green); }
.need-badge { background: var(--blue-soft); color: var(--blue-ink); }
.loy-card { background: var(--blue); }
.stamp { border-color: rgba(255,255,255,.55); color: rgba(255,255,255,.85); }
.stamp.done { background: #fff; color: var(--blue-ink); }
.stamp.gift { border-color: #fff; color: #fff; }
.loy-mini { background: var(--blue); }
.fresh-code { background: var(--blue-soft); color: var(--ink); }
.bonus-box { background: #FFF4E5; border-color: #F3D9A8; }
.lk-ic { background: var(--blue-soft); color: var(--blue-ink); }
.toast { background: var(--ink); }
.fab { box-shadow: 0 6px 16px rgba(15,34,51,.22); }

/* brand + model chips */
.brand-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.brand-grid .chip, .model-wrap .chip { justify-content: center; border-radius: 12px; min-height: 44px; padding: 0 8px; font-size: 15px; }
.chip.ghost { border-style: dashed; color: var(--blue-ink); }
.chip.ghost.on { color: #fff; border-style: solid; }
.model-wrap { display: flex; flex-wrap: wrap; gap: 8px; }

/* history list */
.hitem { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  text-decoration: none; color: inherit; }
.hq { width: 50px; height: 46px; border-radius: 12px; background: var(--blue-soft); color: var(--blue-ink); font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hscroll { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.hscroll button { flex-shrink: 0; }
.datebtn { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: #fff; font-size: 15px; font-weight: 600; cursor: pointer; color: var(--ink); }
.datebtn svg { color: var(--blue); }

/* bell + notifications */
.bell { position: relative; }
.bell .badge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; font-size: 11px; padding: 0 4px; background: var(--orange); }
.nitem { display: flex; gap: 12px; align-items: flex-start; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: inherit; }
.nitem.read { opacity: .72; }
.nic { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nic.NEW { background: var(--blue-soft); color: var(--blue); }
.nic.DELIVERED { background: var(--green-soft); color: var(--green); }
.nic.OVERDUE { background: var(--orange-soft); color: var(--orange); }
.nic.DEVICE { background: #EEF1F4; color: #3E4C5A; }
.udot { width: 8px; height: 8px; border-radius: 4px; background: var(--blue); flex-shrink: 0; margin-top: 6px; }
.ntoast { position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 110; width: min(92vw, 520px);
  background: var(--ink); color: #fff; border-radius: 16px; padding: 12px 14px; display: flex; gap: 12px; align-items: center;
  box-shadow: 0 10px 24px rgba(15,34,51,.25); text-decoration: none; }
.ntoast .nic { background: rgba(255,255,255,.12); color: #fff; }
.ntoast.OVERDUE .nic { background: var(--orange); }
.ntoast small { color: #C9D3DE; }
.qno { white-space: nowrap; min-width: 0; font-size: 24px; }
.qcard.late { border: 2px solid var(--orange); background: #FFFBF8; }
.late-tag { color: #9A3412; font-weight: 700; font-size: 14px; }

/* login */
.auth-wrap { padding: 40px 20px 32px; display: flex; flex-direction: column; gap: 18px; max-width: 440px; margin: 0 auto; }
.auth-logo { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.auth-logo img { width: 80px; height: 80px; border-radius: 20px; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.rule { font-size: 13px; display: flex; gap: 6px; color: var(--muted); }
.rule.ok { color: var(--green-ink); }
.info-blue { background: var(--blue-soft); color: var(--blue-ink); border-radius: 14px; padding: 12px 14px; font-size: 14px; line-height: 1.55; }
.info-orange { background: var(--orange-soft); color: #9A3412; border-radius: 12px; padding: 12px; font-size: 14px; line-height: 1.5; }
.bigcode { font-size: 30px; font-weight: 700; letter-spacing: 6px; color: var(--blue-ink); }
.wait-ic { width: 96px; height: 96px; border-radius: 48px; background: var(--blue-soft); color: var(--blue); display: flex; align-items: center; justify-content: center; }
.pulse { width: 10px; height: 10px; border-radius: 5px; background: var(--blue); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* QR pay + receipt */
.qr-acc { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.qr-acc.def { border: 2px solid var(--blue); padding: 11px; }
.qr-mini { width: 64px; height: 64px; border-radius: 10px; border: 1px solid var(--line); padding: 4px; flex-shrink: 0; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.qr-mini img, .qr-mini svg { width: 100%; height: 100%; object-fit: contain; display: block; }
.qr-big { width: min(72vw, 260px); aspect-ratio: 1; border: 1px solid var(--line); border-radius: 16px; padding: 12px; background: #fff; align-self: center; }
.qr-big img, .qr-big svg { width: 100%; height: 100%; object-fit: contain; display: block; }
.dropzone { min-height: 112px; border: 2px dashed #9DBCE8; border-radius: 14px; background: #F4F8FE; color: var(--blue-ink); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; font-weight: 600; cursor: pointer; text-align: center; padding: 10px; }
.receipt { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 20px 18px; display: flex; flex-direction: column; gap: 9px;
  box-shadow: 0 6px 18px rgba(15,34,51,.06); font-size: 14px; }
.receipt .r { display: flex; justify-content: space-between; gap: 10px; }
.receipt .r > span:first-child { color: var(--muted); }
.receipt .r.item > span:first-child { color: var(--ink); }
.receipt .dash { border-top: 1px dashed #C5D0DC; }
.receipt .tot { font-size: 18px; font-weight: 700; }
.receipt .tot > span:first-child { color: var(--ink); }
.rc-logo { width: 52px; height: 52px; border-radius: 13px; background: var(--blue); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.rc-logo img { width: 100%; height: 100%; object-fit: cover; }
.actbtn { flex: 1; min-height: 58px; border-radius: 14px; border: 1px solid var(--line-strong); background: #fff; font-size: 13px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; color: var(--ink); text-decoration: none; }

/* staff edit / payroll */
.permrow { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.payline { display: flex; justify-content: space-between; font-size: 14px; color: #3E4C5A; }
.sum-green { background: var(--green); color: #fff; border-radius: 16px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.sum-soft { background: #F1F8F5; border: 1px solid #CFE9DD; border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.mini-seg { display: flex; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.mini-seg button { border: 0; background: #fff; min-height: 42px; width: 48px; font-size: 14px; color: var(--muted); cursor: pointer; }
.mini-seg button.on { background: var(--blue); color: #fff; font-weight: 600; }
.num-in { width: 76px; min-height: 42px; border: 1px solid var(--line-strong); border-radius: 10px; font-size: 17px; font-weight: 600; text-align: center; background: #fff; }
.daychips { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.daychips button { min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 13px; cursor: pointer; color: var(--muted); }
.daychips button.on { background: var(--green-soft); border-color: var(--green); color: var(--green-ink); font-weight: 700; }
.daychips button.man { box-shadow: inset 0 -3px 0 var(--blue); }
.usage { height: 8px; border-radius: 4px; background: var(--blue-soft); overflow: hidden; }
.usage i { display: block; height: 8px; background: var(--blue); }
.pk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.pk-grid > div { border: 1px solid var(--line); border-radius: 12px; padding: 10px 4px; }
.pk-grid > div.on { border: 2px solid var(--blue); background: var(--blue-soft); color: var(--blue-ink); padding: 9px 3px; }
.menu-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 0 14px; background: #fff;
  border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); font-size: 15px; font-weight: 500; }
.code-chip { font-family: ui-monospace, Menlo, monospace; letter-spacing: 2px; font-weight: 700; color: var(--blue-ink); }

/* admin codes */
.shoprow { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.lifebar { height: 6px; border-radius: 3px; background: #EEF2F6; overflow: hidden; }
.lifebar i { display: block; height: 6px; }
.grp-h { font-size: 13px; font-weight: 700; color: var(--muted); padding: 6px 2px 0; display: flex; justify-content: space-between; }

@media print {
  .receipt { box-shadow: none; border: none; }
}

/* v1.5.1: slip, line charts, admin staff limits */
.pay-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pay-steps > div { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); text-align: center; }
.pay-steps span { width: 28px; height: 28px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: #EEF1F4; color: #4A5868; }
.pay-steps .done span { background: var(--green); color: #fff; }
.pay-steps .now { color: var(--blue-ink); font-weight: 700; }
.pay-steps .now span { background: var(--blue); color: #fff; }
.slip-prev { background: #2A3644; border-radius: 14px; padding: 10px; display: flex; justify-content: center; }
.slip-prev img { max-width: 100%; max-height: 360px; border-radius: 8px; display: block; }
.slip-thumb { width: 84px; height: 110px; border-radius: 10px; background: #2A3644; overflow: hidden; flex-shrink: 0; display: block; }
.slip-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slip-mini { width: 30px; height: 38px; border-radius: 6px; overflow: hidden; background: #2A3644; flex-shrink: 0; }
.slip-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lchart { position: relative; }
.lchart svg { display: block; width: 100%; overflow: visible; }
.lchart .hit { position: absolute; top: 0; bottom: 0; background: transparent; border: 0; cursor: pointer; padding: 0; }
.lchart .tip { position: absolute; transform: translateX(-50%); background: var(--ink); color: #fff; border-radius: 10px; padding: 5px 10px; font-size: 12px;
  white-space: nowrap; pointer-events: none; line-height: 1.35; text-align: center; }
.lchart .yl { position: absolute; left: 0; font-size: 11px; color: var(--muted); transform: translateY(-50%); }
.xlabels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); padding-left: 34px; }
.xlabels span { flex: 1; text-align: center; min-width: 0; }
.hbar { height: 10px; border-radius: 5px; background: #EEF2F6; overflow: hidden; }
.hbar i { display: block; height: 10px; border-radius: 5px; }
.stack { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: #EEF2F6; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; }
.stepper button { width: 44px; min-height: 44px; border: 0; background: var(--bg); font-size: 20px; color: var(--blue-ink); cursor: pointer; }
.stepper b { min-width: 76px; text-align: center; font-size: 17px; }
.pkcard.dirty { border: 2px solid var(--blue); padding: 13px; }

/* ---------------------------------------------------------------- v1.5.2 professional blue · frosted glass */
:root { --blue: #1A56DB; --blue-ink: #1546B8; --blue-soft: rgba(26,86,219,.10); --bg: #F2F6FC;
  --glass: rgba(255,255,255,.78); --glass-line: rgba(255,255,255,.85); --glass-shadow: 0 8px 28px rgba(30,70,140,.08), inset 0 1px 0 rgba(255,255,255,.9);
  --grad: linear-gradient(135deg, #1A56DB, #2F72F0); --line-g: #06C755; }
html, body { background: radial-gradient(520px 380px at 100% 0%, rgba(96,165,250,.30), rgba(96,165,250,0) 70%),
  radial-gradient(480px 420px at 0% 70%, rgba(147,197,253,.20), rgba(147,197,253,0) 70%), linear-gradient(180deg, #F7FAFE, #EFF4FB) fixed; }
.card, .kpi, .auth-card, article.card { background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow); border-radius: 20px; }
.card.warn { border: 2px solid #F0B44C; }
.top, .tabs, .bottom, .filter, .qsearch, .su-tabs { background: rgba(255,255,255,.80); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); }
.top { border-bottom: 1px solid rgba(255,255,255,.7); box-shadow: 0 4px 18px rgba(30,70,140,.06); }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 18px rgba(26,86,219,.18); }
.btn.primary:disabled { background: #AAB7C6; box-shadow: none; }
.tabs a.on { color: var(--blue); }
.tabs a.on .ic { background: var(--blue-soft); }
.sheet { background: rgba(255,255,255,.92); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.input, select.input, textarea.input { background: rgba(255,255,255,.75); }
.su-tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
.su-tabs button { flex: 1 0 auto; padding: 0 14px; font-size: 15px; }
.icon-btn.lineoa { background: var(--line-g); color: #fff; border-radius: 12px; width: 40px; height: 40px; }
.btn.line, a.btn.line { background: var(--line-g); border-color: var(--line-g); color: #fff; }
.line-card { border-color: rgba(6,199,85,.45) !important; }
.line-msg { background: rgba(6,199,85,.08); border: 1px dashed rgba(6,199,85,.55); border-radius: 14px; padding: 12px; font-size: 14px; line-height: 1.6; white-space: pre-line; }
.req { color: #C0392B; }
.input.bad { border-color: #E0533F; background: rgba(255,240,240,.85); }
.ferr { color: #C0392B; font-size: 13px; margin-top: 4px; }
.otp-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.staff-row { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.icon-btn.soft { border: 1px solid var(--line); background: rgba(255,255,255,.7); }
.icon-btn.danger { border: 1px solid #F3D3D3; background: rgba(255,235,235,.75); color: #C0392B; }
.pill.violet { background: rgba(124,58,237,.12); color: #5B2BB5; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chips button { flex: 0 0 auto; min-height: 38px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.7); font-size: 14px; cursor: pointer; }
.chips button.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.shop-card { flex-direction: row !important; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.sq { width: 44px; height: 44px; border-radius: 14px; color: #fff; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.promo-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.65); border: 1px solid var(--line); }
.tier-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tier-pick button { border: 1px solid var(--line-strong); border-radius: 16px; background: rgba(255,255,255,.75); padding: 10px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; }
.tier-pick button.on { border: 2px solid var(--blue); background: rgba(26,86,219,.06); }
.tier-pick s { font-size: 12px; color: var(--muted); }
.legal h2 { font-size: 16px; margin: 0; }
.legal p, .legal li { font-size: 15px; line-height: 1.65; margin: 0; }

/* ---------------------------------------------------------------- v1.8 settings hub, members, close day, OCR */
.gh { font-size: 13px; font-weight: 700; color: var(--muted); margin: 6px 4px -6px; }
.menu-row2 { display: flex; align-items: center; gap: 12px; min-height: 54px; text-decoration: none; color: inherit; font-size: 15px; }
.mico { flex-shrink: 0; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 84px; border-radius: 16px;
  background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow); font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; text-align: center; padding: 6px; }
.tbadge { position: absolute; top: 8px; right: 8px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--orange); color: #fff; font-size: 12px; display: grid; place-items: center; padding: 0 5px; }
.onb-row { display: flex; align-items: center; gap: 12px; min-height: 50px; border-top: 1px solid var(--line); padding-top: 6px; text-decoration: none; color: inherit; }
.onb-row.done b { color: var(--muted); text-decoration: line-through; font-weight: 500; }
.onb-dot { flex-shrink: 0; width: 26px; height: 26px; border-radius: 13px; border: 2px solid var(--line-strong); display: grid; place-items: center; color: #fff; box-sizing: border-box; }
.onb-row.done .onb-dot { background: var(--green); border-color: var(--green); }
.mcard { display: flex; flex-direction: column; gap: 6px; }
.meter2 { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.meter2 i { display: block; height: 100%; background: var(--blue); }
.stepper2 { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; }
.stepper2 button { width: 42px; min-height: 42px; border: 0; background: var(--bg); font-size: 20px; color: var(--blue-ink); cursor: pointer; font-family: inherit; }
.stepper2 b { min-width: 42px; text-align: center; }
.diff-ok { padding: 10px 12px; border-radius: 12px; font-weight: 700; background: var(--green-soft); color: var(--green-ink); }
.diff-bad { padding: 10px 12px; border-radius: 12px; font-weight: 700; background: #FDECEC; color: #B91C1C; }
.ocr-cam { position: relative; border-radius: 18px; overflow: hidden; background: #111; aspect-ratio: 4 / 3; }
.ocr-cam video, .ocr-cam img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ocr-frame { position: absolute; left: 10%; right: 10%; top: 28%; bottom: 28%; border: 3px solid rgba(255,255,255,.9); border-radius: 12px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.ocr-hint { position: absolute; left: 0; right: 0; top: 10px; text-align: center; color: #fff; font-size: 14px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.ocr-ch { min-width: 28px; height: 42px; display: inline-grid; place-items: center; font-size: 24px; font-weight: 700; border-radius: 8px; background: var(--bg); padding: 0 2px; }
.ocr-ch.unsure { background: var(--orange-soft); color: #9A3412; border-bottom: 3px solid var(--orange); }
#demo-ribbon { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 9999; background: #C2410C; color: #fff; font-size: 11px; font-weight: 700;
  padding: 2px 10px; border-radius: 0 0 8px 8px; pointer-events: none; white-space: nowrap; }
.hwrap { padding: 0 10px 0 0; }
.hlink { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 0 12px 14px; color: inherit; text-decoration: none; }
.slip-btn { position: relative; width: 40px; height: 52px; border: 1px solid var(--line-strong); padding: 0; cursor: pointer; overflow: visible; }
.slip-btn img { border-radius: 6px; }
.slip-zoom { position: absolute; right: -6px; bottom: -6px; width: 20px; height: 20px; border-radius: 10px; background: var(--blue); color: #fff; display: grid; place-items: center; }
.slipv-head { color: #fff; text-align: center; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.slipv-head span { opacity: .8; font-size: 13px; }
.slipv-img { width: min(100%, 420px); max-height: 64dvh; object-fit: contain; border-radius: 10px; cursor: zoom-in; transition: transform .2s; }
.slipv-img.zoom { transform: scale(1.8); cursor: zoom-out; }

/* v1.8.1 live revenue + summary */
.live-hero { border-radius: 24px; padding: 16px; color: #fff; background: linear-gradient(140deg, #0F2E6E, #1A56DB 55%, #3B82F6); box-shadow: 0 14px 30px rgba(26,86,219,.28); display: flex; flex-direction: column; gap: 6px; }
.live-dot-row { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.live-dot { width: 10px; height: 10px; border-radius: 5px; background: #4ADE80; animation: livepulse 1.6s infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.7); } 70% { box-shadow: 0 0 0 8px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.live-big { font-size: 40px; line-height: 1.05; }
.live-goal { border: 0; background: rgba(255,255,255,.12); color: #fff; border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; font: inherit; text-align: left; cursor: pointer; }
.live-goal:disabled { cursor: default; }
.live-bar { display: block; height: 9px; border-radius: 5px; background: rgba(255,255,255,.22); overflow: hidden; }
.live-bar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #A7F3D0, #4ADE80); transition: width .6s; }
.feed-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; border-radius: 10px; }
.feed-row.fresh { animation: feedin 2.4s ease-out; }
@keyframes feedin { 0% { background: #DCFCE7; } 100% { background: transparent; } }
.feed-ic { width: 34px; height: 34px; border-radius: 11px; flex-shrink: 0; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; }
.sum-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 15px; }
.sum-line.total { border-top: 1px dashed var(--line-strong); padding-top: 8px; font-size: 17px; }
.sum-profit { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--green-soft); color: var(--green-ink); }
