/* SalonBook — mobile design system
   One accent (wine), warm-neutral canvas, money colours: green = money in, red = to collect. */
:root {
  --bg: #F5F2EF;
  --card: #FFFFFF;
  --card-2: #FAF8F6;
  --line: #ECE6E1;
  --line-2: #F3EFEB;
  --ink: #1D1418;
  --ink-2: #5E5459;
  --ink-3: #8F858A;
  --brand: #8E2450;
  --brand-d: #5E1A33;
  --brand-soft: #F9ECF1;
  --brand-2: #E9A7BD;
  --green: #17804F;  --green-soft: #E4F4EB;
  --red: #C23A3F;    --red-soft: #FCEAEA;
  --amber: #A9670A;  --amber-soft: #FFF2DB;
  --blue: #2D5F91;   --blue-soft: #E5EEF8;
  --r: 18px; --r-sm: 12px;
  --sh: 0 1px 2px rgba(40, 20, 30, .04), 0 4px 16px -8px rgba(40, 20, 30, .12);
  --sh-lg: 0 -10px 40px -12px rgba(30, 10, 20, .3);
  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.45 var(--font); color: var(--ink); background: #E9E3DE; -webkit-font-smoothing: antialiased; font-feature-settings: 'tnum' 1; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
.ic { display: block; flex: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Stage: phone frame on desktop, full screen on phones ---------- */
.stage { min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 56px; padding: 28px; }
.device { position: relative; width: 390px; height: min(844px, calc(100vh - 56px)); background: var(--bg); border-radius: 46px; overflow: hidden; box-shadow: 0 0 0 10px #1B1216, 0 0 0 11px #3a2b31, 0 40px 80px -20px rgba(40, 10, 25, .45); isolation: isolate; }
.device::before { content: ''; position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 112px; height: 32px; border-radius: 20px; background: #1B1216; z-index: 100; pointer-events: none; }
#app { position: absolute; inset: 0; display: flex; flex-direction: column; }
.panel { width: 360px; color: var(--ink); }
.panel .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.panel h1 { font-size: 30px; line-height: 1.12; letter-spacing: -.6px; font-weight: 750; }
.panel h1 em { font-style: normal; color: var(--brand); }
.panel p.lead { color: var(--ink-2); margin: 12px 0 22px; font-size: 15.5px; }
.panel .try { display: grid; gap: 8px; }
.panel .try button { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 14px; text-align: left; font-weight: 600; transition: background .15s, transform .15s; }
.panel .try button:hover { background: #fff; transform: translateX(3px); }
.panel .try button .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 12.5px; font-weight: 800; flex: none; }
.panel .try button small { display: block; color: var(--ink-3); font-weight: 500; font-size: 12.5px; }
.panel .ctl { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.panel .ctl button, .panel .ctl select { height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 13px; }
.panel .foot { margin-top: 18px; font-size: 12.5px; color: var(--ink-3); }
@media (max-width: 860px) { .panel { display: none; } .stage { padding: 0; } }
@media (max-width: 500px), (max-height: 640px) {
  body { background: var(--bg); }
  .stage { padding: 0; display: block; }
  .device { width: 100%; height: 100vh; height: 100dvh; border-radius: 0; box-shadow: none; }
  .device::before { display: none; }
}
.device.framed .top, .device.framed .auth { padding-top: 52px; }

/* ---------- App chrome ---------- */
.top { flex: none; display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; background: var(--bg); position: relative; z-index: 5; }
.top h2 { font-size: 20px; font-weight: 750; letter-spacing: -.3px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .sub { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.top .grow { flex: 1; min-width: 0; }
.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding: 4px 16px 110px; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }
.scroll.pad-b { padding-bottom: 150px; }
.page-enter { animation: pageIn .22s ease-out; }
@keyframes pageIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

.store-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: 14px; max-width: 200px; }
.store-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-btn .ic { color: var(--brand); }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); position: relative; flex: none; }
.icon-btn.ghost { background: none; border-color: transparent; }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 2px solid var(--card); }

.tabbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; padding: 6px 8px calc(10px + var(--safe-b)); background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.device.framed .tabbar { padding-bottom: 22px; }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 2px; color: var(--ink-3); font-size: 11.5px; font-weight: 650; min-height: 48px; }
.tab.on { color: var(--brand); }
.tab.on .ic { stroke-width: 2.1; }
.tab-fab { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; color: var(--brand); }
.tab-fab .b { width: 54px; height: 54px; border-radius: 18px; background: var(--brand); color: #fff; display: grid; place-items: center; margin-top: -24px; box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--brand) 70%, transparent), 0 0 0 5px var(--bg); transition: transform .15s; }
.tab-fab:active .b { transform: scale(.94); }

/* ---------- Building blocks ---------- */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); border: 1px solid var(--line-2); }
.pad { padding: 16px; }
.sec { margin-top: 22px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 10px; }
.sec-h h3 { font-size: 16px; font-weight: 750; letter-spacing: -.2px; }
.sec-h button, .link { color: var(--brand); font-weight: 700; font-size: 13.5px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.b { font-weight: 700; }
.green { color: var(--green); } .red { color: var(--red); } .amber { color: var(--amber); }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.hr { height: 1px; background: var(--line); margin: 12px 0; }

/* Hero money card */
.hero { position: relative; overflow: hidden; border-radius: 22px; padding: 18px 18px 16px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #B23A68 0%, var(--brand) 38%, var(--brand-d) 100%); box-shadow: 0 18px 36px -18px color-mix(in srgb, var(--brand-d) 80%, transparent); }
.hero::after { content: ''; position: absolute; right: -40px; bottom: -60px; width: 180px; height: 180px; border-radius: 50%; border: 28px solid rgba(255,255,255,.06); }
.hero .lbl { font-size: 13px; font-weight: 600; opacity: .82; display: flex; align-items: center; gap: 6px; }
.hero .amt { font-size: 36px; font-weight: 800; letter-spacing: -1px; margin: 4px 0 2px; }
.hero .delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; padding: 3px 8px; border-radius: 20px; background: rgba(255,255,255,.16); }
.hero .split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; position: relative; z-index: 1; }
.hero .split div { background: rgba(255,255,255,.12); border-radius: 12px; padding: 8px 10px; }
.hero .split small { display: block; font-size: 11.5px; opacity: .78; font-weight: 600; }
.hero .split b { font-size: 15px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { padding: 12px; text-align: left; }
.stat .v { font-size: 19px; font-weight: 800; letter-spacing: -.4px; }
.stat .l { font-size: 12px; color: var(--ink-3); font-weight: 600; }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.qa { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 4px 10px; font-size: 12px; font-weight: 700; color: var(--ink-2); text-align: center; line-height: 1.2; }
.qa .i { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.qa .i.g { background: var(--green-soft); color: var(--green); }
.qa .i.r { background: var(--red-soft); color: var(--red); }
.qa .i.b { background: var(--blue-soft); color: var(--blue); }
.qa .i.a { background: var(--amber-soft); color: var(--amber); }

/* Lists */
.list { overflow: hidden; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 60px; width: 100%; text-align: left; border-bottom: 1px solid var(--line-2); background: var(--card); }
.li:last-child { border-bottom: 0; }
button.li:active, .li.tap:active { background: var(--card-2); }
.li .t { font-weight: 700; font-size: 15px; }
.li .s { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.li .r { text-align: right; flex: none; }
.li .r .t { font-size: 15px; }
.li .chev { color: #C9BFC4; }
.ii { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--card-2); color: var(--ink-2); flex: none; }
.ii.brand, .ii.br { background: var(--brand-soft); color: var(--brand); }
.ii.g { background: var(--green-soft); color: var(--green); }
.ii.r { background: var(--red-soft); color: var(--red); }
.ii.a { background: var(--amber-soft); color: var(--amber); }
.ii.b { background: var(--blue-soft); color: var(--blue); }
.group-l { font-size: 12px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 18px 4px 8px; }

.av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 750; font-size: 14px; flex: none; color: hsl(var(--h) 45% 32%); background: hsl(var(--h) 55% 92%); }
.av.sm { width: 30px; height: 30px; font-size: 11.5px; }
.av.lg { width: 64px; height: 64px; font-size: 22px; }

.pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 20px; font-size: 11.5px; font-weight: 750; white-space: nowrap; }
.pill.g { background: var(--green-soft); color: var(--green); }
.pill.r { background: var(--red-soft); color: var(--red); }
.pill.a { background: var(--amber-soft); color: var(--amber); }
.pill.b { background: var(--blue-soft); color: var(--blue); }
.pill.br { background: var(--brand-soft); color: var(--brand); }
.pill.n { background: var(--line-2); color: var(--ink-2); }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); font-weight: 650; font-size: 13.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .c { font-size: 11.5px; opacity: .7; }

.search { position: relative; }
.search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search input { width: 100%; height: 46px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); padding: 0 14px 0 42px; font-size: 15px; outline: none; }
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* Buttons */
.btn { height: 50px; padding: 0 18px; border-radius: 14px; font-weight: 750; font-size: 15.5px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--brand); color: #fff; transition: transform .12s, background .15s, opacity .15s; }
.btn:active { transform: scale(.98); }
.btn.full { width: 100%; }
.btn.sec { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn.soft { background: var(--brand-soft); color: var(--brand); }
.btn.green { background: var(--green); color: #fff; }
.btn.wa { background: #1FA855; color: #fff; }
.btn.danger { background: var(--red-soft); color: var(--red); }
.btn.sm { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btns.three { grid-template-columns: repeat(3, 1fr); }

/* Forms */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 0 2px 6px; }
.inp { width: 100%; height: 50px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); padding: 0 14px; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.inp { height: 84px; padding: 12px 14px; resize: none; }
select.inp { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238F858A' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.inp:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.money-in { display: flex; align-items: center; gap: 4px; justify-content: center; padding: 18px 0 6px; }
.money-in span { font-size: 30px; margin-top: 4px; font-weight: 800; color: var(--ink-3); }
.money-in input { width: 3ch; min-width: 1.4ch; max-width: 80%; field-sizing: content; border: 0; outline: none; background: none; font-size: 42px; font-weight: 800; letter-spacing: -1px; text-align: center; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--line-2); }
.seg button { height: 42px; border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.seg.sm button { height: 34px; font-size: 13px; }
.switch { position: relative; width: 48px; height: 28px; border-radius: 20px; background: #D9D1CC; flex: none; transition: background .2s; }
.switch::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,.2); transition: transform .2s; }
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(20px); }
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 650; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.pick.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.pick[disabled] { opacity: .35; text-decoration: line-through; }

/* Bottom sheet */
.scrim { position: absolute; inset: 0; z-index: 60; background: rgba(20, 8, 14, .42); animation: fade .2s; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 61; max-height: 92%; display: flex; flex-direction: column; background: var(--bg); border-radius: 26px 26px 0 0; box-shadow: var(--sh-lg); animation: up .26s cubic-bezier(.2, .9, .3, 1); }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: #D5CCC7; margin: 8px auto 2px; flex: none; }
.sheet .sh-h { display: flex; align-items: center; gap: 10px; padding: 8px 18px 10px; flex: none; }
.sheet .sh-h h3 { font-size: 18px; font-weight: 800; letter-spacing: -.3px; flex: 1; }
.sheet .sh-h p { font-size: 13px; color: var(--ink-3); }
.sheet .sh-b { overflow-y: auto; padding: 4px 18px 18px; }
.sheet .sh-f { flex: none; padding: 12px 18px calc(16px + var(--safe-b)); background: var(--bg); border-top: 1px solid var(--line); }
.device.framed .sheet .sh-f { padding-bottom: 26px; }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Toast */
#toasts { position: absolute; left: 16px; right: 16px; top: 58px; z-index: 90; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 650; font-size: 14px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.4); animation: drop .25s ease-out; }
.toast .ic { color: #7BE0A9; }
.toast.err .ic { color: #FF9A9A; }
.toast.out { opacity: 0; transform: translateY(-8px); transition: .3s; }
@keyframes drop { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

/* Empty */
.empty { text-align: center; padding: 34px 20px; color: var(--ink-3); }
.empty .ei { width: 56px; height: 56px; border-radius: 18px; background: var(--card); display: grid; place-items: center; margin: 0 auto 10px; color: var(--ink-3); border: 1px solid var(--line); }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

/* Banner */
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; font-size: 13.5px; font-weight: 600; }
.banner.a { background: var(--amber-soft); color: #6E4300; }
.banner.r { background: var(--red-soft); color: #8A1F24; }
.banner.br { background: var(--brand-soft); color: var(--brand-d); }
.banner.g { background: var(--green-soft); color: #0F5A36; }
.banner .ic { flex: none; }
.banner b { font-weight: 800; }

/* Bookings */
.dates { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none; }
.dates::-webkit-scrollbar { display: none; }
.dte { flex: none; width: 52px; padding: 8px 0 7px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-align: center; }
.dte small { display: block; font-size: 11px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.dte b { display: block; font-size: 18px; font-weight: 800; margin: 1px 0; }
.dte i { display: block; width: 5px; height: 5px; border-radius: 50%; margin: 0 auto; background: transparent; }
.dte i.has { background: var(--brand); }
.dte.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.dte.on small { color: rgba(255,255,255,.7); }
.dte.on i.has { background: var(--brand-2); }
.appt { display: flex; gap: 12px; padding: 12px 14px; width: 100%; text-align: left; align-items: stretch; }
.appt .tm { width: 62px; flex: none; }
.appt .tm b { display: block; font-size: 14.5px; font-weight: 800; white-space: nowrap; }
.appt .tm small { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.appt .bar { width: 4px; border-radius: 4px; background: var(--brand); flex: none; }
.appt .bar.Arrived { background: var(--amber); } .appt .bar.Done { background: var(--green); } .appt .bar.No-show, .appt .bar.Cancelled { background: #CFC6C1; }
.appt.dim { opacity: .62; }
.now-line { display: flex; align-items: center; gap: 8px; margin: 6px 2px; color: var(--red); font-size: 12px; font-weight: 800; }
.now-line::after { content: ''; flex: 1; height: 2px; background: var(--red); border-radius: 2px; opacity: .5; }

/* Bill screen */
.cust-pick { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; text-align: left; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { position: relative; padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-align: left; min-height: 72px; display: flex; flex-direction: column; justify-content: space-between; transition: border-color .12s, background .12s; }
.tile .n { font-weight: 700; font-size: 14px; line-height: 1.25; }
.tile .p { font-weight: 800; font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.tile.in { border-color: var(--brand); background: var(--brand-soft); }
.tile .q { position: absolute; top: 8px; right: 8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.tile.pk::after { content: 'PACK'; position: absolute; bottom: 10px; right: 10px; font-size: 10px; font-weight: 800; color: var(--green); letter-spacing: .05em; }
.line { padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.line:last-child { border-bottom: 0; }
.line .meta { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.mini { height: 30px; padding: 0 10px; border-radius: 9px; background: var(--card-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); }
.mini.on { background: var(--green-soft); color: var(--green); border-color: transparent; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; height: 30px; }
.qty button { width: 30px; height: 28px; display: grid; place-items: center; }
.qty b { min-width: 18px; text-align: center; font-size: 13px; }
.sumrow { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; color: var(--ink-2); }
.sumrow.t { font-size: 17px; font-weight: 800; color: var(--ink); padding-top: 8px; }
.paybar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 25; padding: 12px 16px calc(14px + var(--safe-b)); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.device.framed .paybar { padding-bottom: 26px; }
.paybar .tot small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 650; }
.paybar .tot b { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.paybar .btn { flex: 1; }
.modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mode { height: 64px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12.5px; font-weight: 750; color: var(--ink-2); }
.mode.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }

/* Receipt */
.receipt { background: var(--card); border-radius: 20px; padding: 20px 18px; box-shadow: var(--sh); position: relative; }
.receipt::after { content: ''; position: absolute; left: 0; right: 0; bottom: -8px; height: 16px; background: radial-gradient(circle at 8px 0, transparent 7px, var(--card) 7.5px) repeat-x; background-size: 16px 16px; transform: rotate(180deg); }
.receipt .rl { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 4px 0; }
.dash { border-top: 1.5px dashed var(--line); margin: 12px 0; }
.ok-badge { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; margin: 6px auto 12px; box-shadow: 0 0 0 10px var(--green-soft); animation: pop .4s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.qr { width: 190px; height: 190px; margin: 6px auto; padding: 10px; background: #fff; border-radius: 16px; border: 1px solid var(--line); }

/* Bars */
.bars { display: grid; gap: 12px; }
.bar-r .top-l { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 650; margin-bottom: 6px; }
.bar-r .track { height: 8px; border-radius: 6px; background: var(--line-2); overflow: hidden; }
.bar-r .fill { height: 100%; border-radius: 6px; background: var(--brand); }
.spark { display: flex; align-items: flex-end; gap: 4px; height: 90px; }
.spark div { flex: 1; border-radius: 5px 5px 2px 2px; background: color-mix(in srgb, var(--brand) 22%, white); min-height: 3px; position: relative; }
.spark div.hi { background: var(--brand); }
.spark-l { display: flex; gap: 4px; margin-top: 6px; }
.spark-l span { flex: 1; text-align: center; font-size: 10.5px; color: var(--ink-3); font-weight: 700; }

/* Attendance */
.att { display: inline-flex; gap: 4px; }
.att button { width: 36px; height: 34px; border-radius: 10px; border: 1px solid var(--line); font-weight: 800; font-size: 13px; color: var(--ink-3); background: var(--card); }
.att button.on.P { background: var(--green); color: #fff; border-color: var(--green); }
.att button.on.H { background: var(--amber); color: #fff; border-color: var(--amber); }
.att button.on.A { background: var(--red); color: #fff; border-color: var(--red); }

/* Plans */
.plan { position: relative; padding: 16px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--card); text-align: left; width: 100%; display: block; }
.plan.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.plan .pr { font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.plan .pr small { font-size: 13px; color: var(--ink-3); font-weight: 600; letter-spacing: 0; }
.plan .tagp { position: absolute; top: -10px; right: 14px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 10px; }
.plan ul { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13.5px; color: var(--ink-2); }
.plan li { display: flex; gap: 8px; align-items: center; }
.plan li .ic { color: var(--green); }

/* Auth / onboarding */
.auth { flex: 1; display: flex; flex-direction: column; padding: 20px 22px 26px; overflow-y: auto; background: var(--bg); }
.auth-hero { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 20px 0; }
.logo-mark { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--brand); }
.auth h1 { font-size: 32px; line-height: 1.1; font-weight: 800; letter-spacing: -.8px; margin-top: 22px; }
.auth h1 em { font-style: normal; color: var(--brand); }
.auth .lead { color: var(--ink-2); font-size: 15.5px; margin-top: 10px; }
.feat { display: grid; gap: 10px; margin-top: 24px; }
.feat div { display: flex; align-items: center; gap: 12px; font-weight: 650; font-size: 14.5px; }
.feat .ii { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--card); color: var(--brand); border: 1px solid var(--line); flex: none; }
.phone-in { display: flex; align-items: center; height: 56px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); padding: 0 16px; gap: 10px; font-size: 18px; font-weight: 700; }
.phone-in input { border: 0; outline: none; background: none; flex: 1; font-size: 18px; font-weight: 700; letter-spacing: .5px; min-width: 0; }
.otp { display: flex; gap: 10px; justify-content: center; margin: 18px 0 6px; }
.otp input { width: 56px; height: 62px; text-align: center; font-size: 26px; font-weight: 800; border-radius: 16px; border: 1px solid var(--line); background: var(--card); outline: none; }
.otp input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.steps { display: flex; gap: 6px; margin-bottom: 18px; }
.steps i { flex: 1; height: 4px; border-radius: 3px; background: var(--line); }
.steps i.on { background: var(--brand); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.wa-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #1FA855; color: #fff; flex: none; }
.wa-ic.soft { background: var(--brand-soft); color: var(--brand); }
.show-done { width: 100%; margin-top: 10px; padding: 12px; border-radius: 14px; border: 1px dashed var(--line); color: var(--ink-2); font-weight: 700; font-size: 13.5px; display: flex; align-items: center; justify-content: center; gap: 6px; }

/* ---------- Member Pass ---------- */
.track { height: 8px; border-radius: 6px; background: var(--line-2); overflow: hidden; }
.track .fill, .fill { height: 100%; border-radius: 6px; background: var(--brand); }
.banner.b { background: var(--blue-soft); color: #1C4170; }
.member-search { display: flex; align-items: center; gap: 10px; width: 100%; height: 48px; padding: 0 14px; margin-bottom: 12px; border-radius: 14px; background: var(--card); border: 1.5px solid color-mix(in srgb, var(--brand) 30%, var(--line)); color: var(--ink-3); font-weight: 600; font-size: 14.5px; text-align: left; box-shadow: var(--sh); }
.member-search .ic { color: var(--brand); position: static; transform: none; }
.mcard { position: relative; overflow: hidden; border-radius: 22px; padding: 18px; color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 18px 34px -18px var(--c2); }
.mcard::before { content: ''; position: absolute; inset: 0; background: radial-gradient(90% 70% at 85% 0%, rgba(255,255,255,.28), transparent 60%), repeating-linear-gradient(115deg, rgba(255,255,255,.05) 0 2px, transparent 2px 14px); pointer-events: none; }
.mcard > * { position: relative; }
.mcard b { font-weight: 800; letter-spacing: .2px; }
.mc-st { font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 20px; background: rgba(255,255,255,.2); }
.mc-name { font-size: 22px; font-weight: 800; letter-spacing: -.4px; }
.mc-sub { font-size: 12.5px; opacity: .85; font-weight: 600; letter-spacing: .04em; }
.mc-ring { position: relative; width: 58px; height: 58px; flex: none; }
.mc-ring span { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; line-height: 1; }
.mc-ring b { font-size: 16px; } .mc-ring small { font-size: 9.5px; opacity: .85; font-weight: 700; }
.mc-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.22); font-size: 12px; font-weight: 600; opacity: .92; }
.member-mini { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px 12px 12px; text-align: left; margin-bottom: 8px; color: var(--ink); }
.member-mini .ic { color: var(--ink-3); }
.mm-bar { width: 6px; align-self: stretch; border-radius: 6px; flex: none; }
.value-bar { display: flex; height: 12px; border-radius: 8px; background: var(--line-2); overflow: hidden; }
.value-bar > div { height: 100%; background: var(--green); }
.value-bar .vb-un { background: repeating-linear-gradient(45deg, #F2C27A 0 5px, #F7D9A8 5px 10px); }
.mgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mgrid button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 16px; background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--sh); font-size: 12px; font-weight: 750; color: var(--ink-2); }
.mgrid button .ic { color: var(--brand); }
.mgrid button[disabled] { opacity: .4; }
.perk { border-bottom: 1px solid var(--line-2); }
.perk:last-child { border-bottom: 0; }
.perk-h { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left; }
.perk-h .t { font-weight: 700; font-size: 15px; } .perk-h .s { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.perk-h .r { text-align: right; flex: none; } .perk-h .r .t { font-size: 18px; font-weight: 800; } .perk-h .r .s { font-size: 11.5px; }
.perk-b { padding: 0 14px 12px 66px; animation: fade .2s; }
.dots { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.dots i { width: 14px; height: 6px; border-radius: 4px; background: var(--line); }
.dots i.on { background: var(--brand); }
.pend { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-d); font-weight: 750; font-size: 13px; }
.pend.sm { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 9px; background: var(--card-2); color: var(--ink-2); border: 1px solid var(--line-2); }
.plan-row { display: flex; gap: 12px; width: 100%; padding: 14px; text-align: left; align-items: flex-start; }
.pr-chip { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; }
button.pill { border: 0; cursor: pointer; }
