/* PRIME POS — Navy (trust), Royal Blue (technology), Gold (excellence), White (simplicity) */

:root {
  --navy: #0A1A3F;
  --navy-2: #13285E;
  --navy-3: #1C3577;
  --blue: #2457F5;
  --blue-d: #1A43CC;
  --blue-l: #EAF0FF;
  --gold: #F5BD36;
  --gold-d: #C98E0A;
  --gold-l: #FFF5DA;
  --bg: #F2F4F9;
  --card: #FFFFFF;
  --ink: #0F172A;
  --ink-2: #475569;
  --ink-3: #8A97AD;
  --line: #E3E8F1;
  --green: #11A04F;
  --green-d: #0B8540;
  --green-l: #E6F7EE;
  --red: #E0434A;
  --red-l: #FDECEC;
  --amber: #F29D0B;
  --amber-l: #FFF4DE;
  --r: 14px;
  --r-lg: 20px;
  --sh: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 20px rgba(15, 23, 42, .06);
  --sh-lg: 0 20px 60px rgba(10, 26, 63, .25);
  --top: 60px;
  --side: 232px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p { margin: 0 0 8px; }
kbd { font: 600 10px/1 var(--font); padding: 3px 5px; border-radius: 5px; background: rgba(255, 255, 255, .22); margin-left: 4px; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.center { text-align: center; }
.neg { color: var(--red); }
.pos { color: var(--green-d); }
.warn-text { color: var(--amber); font-weight: 700; }
.danger-text { color: var(--red) !important; }
.err { color: var(--red); font-size: 14px; min-height: 20px; margin: 6px 0; font-weight: 600; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.only-phone { display: none !important; }

/* ---------- boot ---------- */
.boot { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: var(--navy); color: #fff; }
.boot b { font-size: 22px; letter-spacing: .5px; margin-top: 10px; }
.boot small { color: var(--gold); }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-word { display: flex; align-items: baseline; gap: 5px; font-size: 21px; letter-spacing: .4px; }
.logo-word b { font-weight: 800; }
.logo-word i { font-style: normal; font-weight: 800; color: var(--gold); }
.logo-mark { display: block; flex: none; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; overflow-x: clip; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--navy); color: #fff; display: flex; flex-direction: column; padding: 14px 12px; overflow-y: auto; }
.side-logo { padding: 6px 8px 18px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.side-link { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: #C9D4F0; font-weight: 600; }
.side-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side-link.active { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(36, 87, 245, .35); }
.side-link .badge { margin-left: auto; }
.side-foot { display: flex; flex-direction: column; gap: 2px; padding: 12px 8px 4px; color: #8EA0CC; font-size: 12px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--top); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px; background: #fff; border-bottom: 1px solid var(--line); }
.tb-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tb-biz { display: flex; flex-direction: column; min-width: 0; }
.tb-biz b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.net { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; }
.net .ic { width: 14px; height: 14px; }
.net.on { color: var(--green-d); }
.net.off { color: var(--amber); }
.tb-right { display: flex; align-items: center; gap: 8px; }
.tb-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.tb-btn:hover { background: var(--bg); }
.practice-btn.on { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.lock-btn { color: var(--navy); }
.tb-user { display: flex; align-items: center; gap: 8px; padding: 3px 10px 3px 3px; border-radius: 22px; border: 1px solid var(--line); background: #fff; }
.tb-uname { display: flex; flex-direction: column; text-align: left; line-height: 1.15; }
.tb-uname b { font-size: 13px; }
.tb-uname small { font-size: 11px; color: var(--ink-3); }
.avatar { --c: var(--blue); width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--c); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.avatar.lg { width: 42px; height: 42px; font-size: 15px; }
.avatar.xl { width: 64px; height: 64px; font-size: 22px; }

.practice-banner { display: flex; align-items: center; gap: 10px; padding: 8px 18px; background: repeating-linear-gradient(-45deg, var(--gold), var(--gold) 14px, #F7C84F 14px, #F7C84F 28px); color: var(--navy); font-size: 14px; }
.practice-banner span { flex: 1; }
.practice-banner .btn { background: var(--navy); color: #fff; }

.view { flex: 1; min-width: 0; }
.page { max-width: 1180px; margin: 0 auto; padding: 22px 22px 110px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; display: flex; align-items: center; gap: 10px; }
.page-head p { color: var(--ink-2); margin: 4px 0 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.help-dot { width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--blue-l); color: var(--blue); font-weight: 800; font-size: 14px; }

.bottomnav { display: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 12px; border: 1.5px solid transparent; background: var(--blue-l); color: var(--blue-d); font-weight: 700; font-size: 15px; white-space: nowrap; transition: transform .06s, background .15s, box-shadow .15s; user-select: none; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .45; }
.btn.primary { background: var(--blue); color: #fff; box-shadow: 0 4px 14px rgba(36, 87, 245, .28); }
.btn.primary:hover:not(:disabled) { background: var(--blue-d); }
.btn.soft { background: var(--blue-l); color: var(--blue-d); }
.btn.soft:hover:not(:disabled) { background: #DCE6FF; }
.btn.ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn.ghost:hover:not(:disabled) { background: var(--bg); }
.btn.danger { background: var(--red); color: #fff; }
.btn.pay { background: var(--green); color: #fff; box-shadow: 0 6px 16px rgba(17, 160, 79, .3); }
.btn.pay:hover:not(:disabled) { background: var(--green-d); }
.btn.hold { background: var(--amber-l); color: #9A5B00; border-color: #F6D9A0; }
.btn.link { background: none; border: 0; color: var(--blue); padding: 0 4px; height: auto; box-shadow: none; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.xl { height: 58px; font-size: 18px; border-radius: 14px; }
.btn.block { display: flex; width: 100%; }
.btn.icon-only { width: 46px; padding: 0; }
.btn .ic { width: 19px; height: 19px; }
.link { background: none; border: 0; padding: 0; color: var(--blue); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.link:disabled { color: var(--ink-3); }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 0; background: transparent; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.icon-btn:hover { background: var(--bg); }
.row-btns { display: flex; gap: 8px; }
.row-btns > .btn { flex: 1; }
.row-btns.wrap { flex-wrap: wrap; margin: 10px 0; }
.row-btns.wrap > .btn { flex: 1 1 auto; }

.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font: 800 11px/20px var(--font); text-align: center; font-style: normal; }
.badge.zero { background: var(--ink-3); }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 11px; font-weight: 800; letter-spacing: .3px; }
.pill.amber { background: var(--amber-l); color: #9A5B00; }
.pill.red { background: var(--red-l); color: var(--red); }

/* ---------- inputs ---------- */
.lbl { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 14px 0 6px; }
.input { width: 100%; height: 46px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(36, 87, 245, .12); }
.input.lg { height: 52px; font-size: 17px; }
.input.xl { height: 66px; font-size: 30px; font-weight: 800; }
.input.sm { height: 34px; width: auto; font-size: 13px; padding: 0 8px; }
.input.center { text-align: center; }
.input.bad { border-color: var(--red); box-shadow: 0 0 0 4px rgba(224, 67, 74, .12); }
.input.ro { display: flex; align-items: center; gap: 6px; background: var(--bg); }
select.input { appearance: auto; }
.pin-input { letter-spacing: 6px; font-weight: 800; }
.money-input { position: relative; }
.money-input span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 700; }
.money-input .input { padding-left: 30px; font-weight: 700; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.with-btn { display: flex; gap: 6px; }
.search { position: relative; display: flex; align-items: center; flex: 1; min-width: 0; }
.search > .ic { position: absolute; left: 14px; color: var(--ink-3); }
.search input { width: 100%; height: 48px; padding: 0 44px 0 44px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; font-size: 16px; outline: none; }
.search input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(36, 87, 245, .12); }
.search kbd { position: absolute; right: 12px; background: var(--bg); color: var(--ink-3); }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar select.input { width: auto; min-width: 180px; }
.toolbar input[type=date] { width: auto; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; flex-wrap: nowrap; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 38px; padding: 0 16px; border-radius: 19px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; font-size: 14px; color: var(--ink-2); white-space: nowrap; display: inline-flex; align-items: center; }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.chips.static { flex-wrap: wrap; }
.card .chips, .modal .chips { flex-wrap: wrap; }

.seg { display: inline-flex; padding: 4px; background: var(--bg); border-radius: 12px; gap: 4px; margin: 6px 0 4px; }
.seg button { height: 38px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent; font-weight: 700; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--blue-d); box-shadow: var(--sh); }
.seg.sm button { height: 30px; font-size: 13px; padding: 0 12px; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.switch-row:last-of-type { border-bottom: 0; }
.switch-row span { display: flex; flex-direction: column; }
.switch-row b { font-weight: 600; }
.switch-row small { color: var(--ink-3); font-size: 12px; }
.switch { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; flex: none; border-radius: 15px; background: #CBD3E1; position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch:checked { background: var(--green); }
.switch:checked::after { transform: translateX(20px); }
.switch:focus-visible { outline: 3px solid rgba(36, 87, 245, .35); }

/* ---------- cards / lists ---------- */
.card { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--sh); padding: 18px; margin-bottom: 16px; }
.card-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; margin-bottom: 12px; }
.card-title .muted { font-weight: 600; }
.card-title > .link, .card-title > select { margin-left: auto; }
details.card > summary { cursor: pointer; list-style: none; margin: 0; }
details.card > summary::-webkit-details-marker { display: none; }
details.card[open] > summary { margin-bottom: 12px; }
details.card > summary { display: flex; align-items: center; }
details.card > summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .15s; flex: none; }
details.card[open] > summary::after { transform: rotate(-135deg); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid2 > .card { margin-bottom: 16px; }
.grid2.wide-first { grid-template-columns: 1.2fr 1fr; }
.list { display: flex; flex-direction: column; background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh); overflow: hidden; }
.card .list { box-shadow: none; border: 1px solid var(--line); margin-bottom: 12px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; width: 100%; }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: #FAFBFE; }
.list-row.off { opacity: .55; }
.list-row > .ic { color: var(--ink-3); }
.lr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lr-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-main small { color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-num { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.lr-num small { font-size: 12px; color: var(--ink-3); }

.mini-table { display: flex; flex-direction: column; }
.mt-row { display: flex; align-items: center; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.mt-row:last-child { border-bottom: 0; }
.mt-row > span:first-child { color: var(--ink-3); font-size: 12px; min-width: 96px; }
.mt-row > span:nth-child(2) { flex: 1; min-width: 0; }
.mt-row > span:last-child { text-align: right; white-space: nowrap; }
.mt-row > span.mt-text { text-align: left; white-space: normal; }
.mt-row.clickable { cursor: pointer; border-radius: 8px; }
.mt-row.clickable:hover { background: var(--bg); }
.mt-row.struck > span:last-child { text-decoration: line-through; color: var(--ink-3); }
.mt-row .rank { min-width: 26px !important; font-weight: 800; color: var(--blue) !important; font-size: 14px !important; }
.mt-row .icon-btn { width: 30px; height: 30px; }
.sub-h { font-size: 14px; margin: 18px 0 6px; color: var(--ink-2); }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 48px 20px; color: var(--ink-2); }
.empty-ic { width: 46px; height: 46px; color: var(--ink-3); stroke-width: 1.6; }
.empty b { font-size: 17px; color: var(--ink); }
.empty p { max-width: 340px; }

.notice { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--blue-l); border-radius: var(--r); margin-bottom: 12px; font-size: 14px; }
.notice.warn { background: var(--amber-l); }
.notice span { flex: 1; }

/* ---------- home ---------- */
.hello { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.hello h1 { font-size: 28px; }
.hello p { color: var(--ink-2); margin: 4px 0 0; }
.bigbtns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.bigbtn { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px; min-height: 124px; border-radius: var(--r-lg); border: 1.5px solid var(--line); background: #fff; box-shadow: var(--sh); text-align: left; transition: transform .08s, box-shadow .15s; }
.bigbtn:hover { box-shadow: 0 10px 30px rgba(15, 23, 42, .1); }
.bigbtn:active { transform: scale(.98); }
.bigbtn .ic { width: 30px; height: 30px; padding: 6px; box-sizing: content-box; border-radius: 12px; background: var(--blue-l); color: var(--blue); }
.bigbtn b { font-size: 16px; letter-spacing: .3px; margin-top: 4px; }
.bigbtn small { color: var(--ink-2); font-size: 13px; }
.bigbtn.primary { background: linear-gradient(135deg, var(--blue), var(--navy-3)); border-color: transparent; color: #fff; }
.bigbtn.primary .ic { background: rgba(255, 255, 255, .18); color: #fff; }
.bigbtn.primary small { color: #D7E1FF; }
.bigbtn.amber { border-color: #F6D9A0; background: var(--amber-l); }
.bigbtn.amber .ic { background: #fff; color: var(--amber); }
.stats3 { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.stats3 > div { flex: 1; min-width: 100px; display: flex; flex-direction: column; }
.stats3 small { color: var(--ink-3); font-size: 12px; font-weight: 600; }
.stats3 b { font-size: 22px; font-variant-numeric: tabular-nums; }
.progress { height: 8px; border-radius: 4px; background: var(--bg); overflow: hidden; margin-bottom: 12px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--gold)); border-radius: 4px; }
.steps-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.steps-list li { display: flex; align-items: center; gap: 10px; }
.steps-list li > i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.steps-list li.done { color: var(--ink-3); text-decoration: line-through; }
.steps-list li.done .ic { color: var(--green); }
.tutorial-card { display: flex; gap: 16px; align-items: flex-start; background: linear-gradient(135deg, #fff, var(--gold-l)); }
.big-ic { width: 44px; height: 44px; padding: 10px; box-sizing: content-box; border-radius: 16px; background: var(--gold); color: var(--navy); }
.tutorial-card .row-btns { flex-wrap: wrap; margin-top: 8px; }
.tutorial-card .row-btns .btn { flex: 0 1 auto; }

/* ---------- sell ---------- */
.view-sell { display: flex; flex-direction: column; }
.sell { display: grid; grid-template-columns: minmax(0, 1fr) 390px; height: calc(100vh - var(--top)); }
body.practice .sell { height: calc(100vh - var(--top) - 38px); }
.sell-left { min-width: 0; display: flex; flex-direction: column; padding: 16px 18px 0; overflow: hidden; }
.sell-tools { display: flex; gap: 8px; margin-bottom: 10px; }
.pgrid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: min-content; gap: 12px; padding: 2px 2px 24px; align-content: start; }
.pgrid > .empty { grid-column: 1 / -1; }
.ptile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; min-height: 150px; border-radius: var(--r); border: 1.5px solid var(--line); background: #fff; text-align: left; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); transition: transform .06s, border-color .15s, box-shadow .15s; }
.ptile:hover { border-color: #C9D5F5; box-shadow: var(--sh); }
.ptile:active { transform: scale(.97); }
.ptile.pop { animation: pop .25s; }
@keyframes pop { 50% { transform: scale(.95); border-color: var(--blue); } }
.ptile.is-out { opacity: .5; }
.p-ic { --c: var(--blue); width: 46px; height: 46px; flex: none; border-radius: 12px; background: color-mix(in srgb, var(--c) 14%, white); color: var(--c); display: inline-flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; }
.p-ic.lg { width: 64px; height: 64px; font-size: 32px; border-radius: 16px; }
.list-row .p-ic { width: 42px; height: 42px; font-size: 21px; }
.pt-name { font-weight: 700; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pt-price { margin-top: auto; font-weight: 800; font-size: 16px; color: var(--navy); font-variant-numeric: tabular-nums; }
.stk { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.stk.low { color: var(--amber); }
.stk.out { color: var(--red); }
.stk.none { font-weight: 500; }
.pt-qty { position: absolute; top: 8px; right: 8px; min-width: 28px; height: 28px; padding: 0 7px; border-radius: 14px; background: var(--blue); color: #fff; font: 800 13px/28px var(--font); text-align: center; font-style: normal; box-shadow: 0 3px 8px rgba(36, 87, 245, .35); }

.cart { display: flex; flex-direction: column; background: #fff; border-left: 1px solid var(--line); min-height: 0; }
.cart-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.cart-head > div { display: flex; flex-direction: column; flex: 1; line-height: 1.2; }
.cart-head small { color: var(--ink-3); font-size: 12px; font-weight: 600; }
.cart-head b { font-size: 20px; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px 0 12px; border-radius: 19px; border: 1.5px solid #F6D9A0; background: var(--amber-l); color: #9A5B00; font-weight: 700; font-size: 13px; }
.chip-btn .ic { width: 16px; height: 16px; }
.cust-btn { display: flex; align-items: center; gap: 10px; margin: 0 16px 8px; padding: 10px 12px; border-radius: 12px; border: 1.5px dashed var(--line); background: #fff; color: var(--ink-2); text-align: left; font-weight: 600; }
.cust-btn span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cust-btn.on { border-style: solid; border-color: #C9D5F5; background: var(--blue-l); color: var(--navy); }
.cust-btn small { color: var(--red); font-weight: 700; }
.cart-lines { flex: 1; overflow-y: auto; padding: 0 16px; min-height: 80px; }
.cart-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 36px 10px; color: var(--ink-3); }
.cart-empty .ic { width: 40px; height: 40px; stroke-width: 1.5; margin-bottom: 6px; }
.cart-empty b { color: var(--ink-2); }
.line { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main rm" "step total"; gap: 4px 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line-main { grid-area: main; min-width: 0; }
.line-name { font-weight: 700; font-size: 14px; }
.line-sub { font-size: 12px; color: var(--ink-3); }
.line .rm { grid-area: rm; width: 30px; height: 30px; color: var(--ink-3); }
.line .rm:hover { color: var(--red); background: var(--red-l); }
.line-total { grid-area: total; align-self: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.stepper { grid-area: step; display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; width: max-content; }
.stepper button { width: 40px; height: 38px; border: 0; background: #fff; display: inline-flex; align-items: center; justify-content: center; color: var(--blue-d); }
.stepper button:hover { background: var(--blue-l); }
.stepper .qty { width: auto; min-width: 46px; padding: 0 6px; font-weight: 800; font-size: 16px; color: var(--ink); border-left: 1.5px solid var(--line); border-right: 1.5px solid var(--line); }
.cart-foot { padding: 12px 16px 16px; border-top: 1px solid var(--line); background: #FBFCFE; }
.sum-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sum-row .link { font-size: 14px; }
.sum-row .link .ic { width: 16px; height: 16px; }
.sum-row.total { color: var(--ink); font-size: 24px; font-weight: 800; margin: 4px 0 10px; }
.cart-actions { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 8px; }
.cart-actions .btn.pay { height: 56px; font-size: 17px; min-width: 0; overflow: hidden; padding: 0 14px; }
.cart-actions .btn.hold, .cart-actions .btn.ghost { height: 56px; }
.cartbar { display: none; }

/* ---------- held ---------- */
.held-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.held-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh); border-left: 5px solid var(--amber); }
.modal .held-list { grid-template-columns: 1fr; }
.modal .held-card { box-shadow: none; border: 1.5px solid var(--line); border-left: 5px solid var(--amber); }
.held-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.held-top b { font-size: 18px; }
.held-top small { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.held-top small .ic { width: 14px; height: 14px; }
.held-name { align-self: flex-start; font-size: 14px; }
.held-items { font-size: 13px; color: var(--ink-2); }
.held-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.held-bottom > b { font-size: 22px; font-variant-numeric: tabular-nums; }
.held-bottom .row-btns .btn { flex: none; }

/* ---------- modals ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 26, 63, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade .15s; }
.modal-wrap.out { opacity: 0; transition: opacity .15s; pointer-events: none; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: #fff; border-radius: 22px; box-shadow: var(--sh-lg); animation: rise .2s cubic-bezier(.2, .8, .3, 1); }
@keyframes rise { from { transform: translateY(16px) scale(.98); opacity: 0; } }
.modal.sm { max-width: 440px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 6px 22px; }
.modal-head h2 { flex: 1; font-size: 19px; display: flex; align-items: center; gap: 8px; }
.modal-body { padding: 8px 22px 22px; overflow-y: auto; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.modal-actions .btn { min-width: 120px; }
.confirm-text p { margin-bottom: 10px; }
ul.plain { padding-left: 18px; margin: 6px 0 10px; }
ul.plain li { margin: 3px 0; }
.as-drawer { justify-content: flex-end; padding: 0; }
.as-drawer .modal { height: 100%; max-height: 100vh; max-width: 460px; border-radius: 22px 0 0 22px; animation: slide .22s cubic-bezier(.2, .8, .3, 1); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }

.quick-row { display: flex; gap: 8px; margin: 10px 0; }
.quick-row .btn { flex: 1; }

.pay-modal .modal-body { padding-top: 0; }
.pay-total { display: flex; flex-direction: column; align-items: center; padding: 14px; margin-bottom: 12px; border-radius: 16px; background: var(--navy); color: #fff; }
.pay-total small { color: var(--gold); font-weight: 800; letter-spacing: 1px; }
.pay-total b { font-size: 40px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pay-total span { font-size: 12px; color: #B9C6EA; }
.methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
.method { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 64px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.method.on { border-color: var(--blue); background: var(--blue-l); color: var(--blue-d); box-shadow: 0 0 0 3px rgba(36, 87, 245, .12); }
.pay-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; margin: 10px 0; }
.pay-quick .btn { height: 48px; font-size: 16px; }
.change-box { display: flex; flex-direction: column; align-items: center; padding: 12px; border-radius: 16px; background: var(--bg); margin: 8px 0; }
.change-box small { font-weight: 800; letter-spacing: 1px; color: var(--ink-3); }
.change-box b { font-size: 34px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.change-box span { font-size: 13px; font-weight: 600; }
.change-box.ok { background: var(--green-l); }
.change-box.ok b, .change-box.ok span { color: var(--green-d); }
.change-box.bad { background: var(--red-l); }
.change-box.bad b, .change-box.bad span { color: var(--red); }
.utang-box { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--blue-l); margin: 12px 0 8px; }
.utang-box div { display: flex; flex-direction: column; }
.utang-box small { color: var(--ink-2); }
.utang-box.warn { background: var(--amber-l); }

.success { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding-top: 18px; }
.succ-check { width: 76px; height: 76px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; animation: popin .35s cubic-bezier(.2, 1.4, .4, 1); box-shadow: 0 10px 30px rgba(17, 160, 79, .35); }
.succ-check .ic { width: 40px; height: 40px; stroke-width: 3; }
@keyframes popin { from { transform: scale(.4); opacity: 0; } }
.success h2 { font-size: 22px; margin-top: 8px; }
.succ-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin: 8px 0; }
.succ-grid > div { display: flex; flex-direction: column; padding: 10px; border-radius: 12px; background: var(--bg); }
.succ-grid small { font-size: 12px; color: var(--ink-3); font-weight: 700; }
.succ-grid b { font-size: 18px; font-variant-numeric: tabular-nums; }
.succ-change { width: 100%; padding: 12px; border-radius: 16px; background: var(--green-l); color: var(--green-d); display: flex; flex-direction: column; }
.succ-change small { font-weight: 800; letter-spacing: 1px; }
.succ-change b { font-size: 44px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.succ-change.alt { background: var(--blue-l); color: var(--blue-d); }
.success .row-btns { width: 100%; margin: 8px 0; }

.recover-box { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px; background: var(--amber-l); margin: 10px 0; }
.recover-box > div:first-child { display: flex; align-items: center; justify-content: space-between; }
.recover-box b { font-size: 18px; }
.recover-total { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }

.pick-list { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; max-height: 46vh; overflow-y: auto; }
.pick-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; border: 0; background: #fff; text-align: left; }
.pick-row:hover { background: var(--bg); }
.pick-row > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.pick-row small { color: var(--ink-3); }
.owe { font-size: 13px; font-weight: 700; color: var(--red); }
.new-cust { margin: 8px 0; padding: 12px; border-radius: 14px; background: var(--bg); }
.new-cust summary { font-weight: 700; color: var(--blue); cursor: pointer; display: flex; align-items: center; gap: 6px; list-style: none; }
.new-cust summary::-webkit-details-marker { display: none; }
.new-cust .two { margin: 10px 0; }

.pd-top { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.pd-nums { display: flex; gap: 18px; flex-wrap: wrap; }
.pd-nums > div { display: flex; flex-direction: column; }
.pd-nums small { color: var(--ink-3); font-size: 12px; font-weight: 600; }
.pd-nums b { font-size: 20px; }
.look-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.emoji-in { width: 70px; text-align: center; font-size: 22px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 3px solid #fff; background: var(--c); box-shadow: 0 0 0 1.5px var(--line); }
.swatch.on { box-shadow: 0 0 0 3px var(--c); }
.cd-top { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.cd-bal { display: flex; flex-direction: column; margin: 4px 0; }
.cd-bal small { color: var(--ink-3); font-size: 12px; font-weight: 600; }
.cd-bal b { font-size: 28px; }

.scanner { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; margin-bottom: 10px; }
.scanner video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-line { position: absolute; left: 10%; right: 10%; top: 50%; height: 2px; background: var(--red); box-shadow: 0 0 12px var(--red); animation: scan 1.6s ease-in-out infinite alternate; }
@keyframes scan { from { top: 25%; } to { top: 75%; } }

.menu-list { display: flex; flex-direction: column; }
.menu-row { display: flex; align-items: center; gap: 14px; padding: 15px 6px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font-weight: 600; text-align: left; width: 100%; }
.menu-row > span { flex: 1; }
.menu-row > .ic:last-child { color: var(--ink-3); }
.menu-row.active { color: var(--blue); }

/* ---------- receipt ---------- */
.receipt { position: relative; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; background: #fff; border: 1px dashed var(--line); border-radius: 8px; padding: 16px; max-width: 340px; margin: 0 auto; color: #111; }
.r-center { text-align: center; }
.r-biz { font-size: 15px; }
.r-line { border-top: 1px dashed #999; margin: 8px 0; }
.r-row { display: flex; justify-content: space-between; gap: 10px; }
.r-item { margin-bottom: 4px; }
.r-total { font-weight: 800; font-size: 15px; }
.r-small { font-size: 10px; color: #666; margin-top: 4px; }
.r-stamp { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-16deg); border: 3px solid var(--gold-d); color: var(--gold-d); font-weight: 800; font-size: 22px; padding: 2px 10px; border-radius: 8px; opacity: .55; pointer-events: none; }
.r-stamp.red { border-color: var(--red); color: var(--red); }
.print-area { display: none; }

/* ---------- reports ---------- */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi { display: flex; flex-direction: column; padding: 16px 18px; background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh); }
.kpi small { color: var(--ink-3); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.kpi b { font-size: 26px; font-variant-numeric: tabular-nums; margin: 2px 0; }
.kpi span { font-size: 12px; color: var(--ink-2); }
.hours { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: 6px; }
.hour { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.hour i { display: block; width: 100%; max-width: 26px; min-height: 2px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, var(--blue), var(--navy-3)); }
.hour small { font-size: 10px; color: var(--ink-3); }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 10px; font-size: 14px; }
.bar-row > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 10px; border-radius: 5px; background: var(--bg); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 5px; background: var(--blue); }
.big-num { font-size: 32px; font-weight: 800; margin-bottom: 12px; font-variant-numeric: tabular-nums; }

/* ---------- settings ---------- */
.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.settings .card { margin: 0; }
.settings .card > .btn { margin-top: 14px; }
.about-row { display: flex; align-items: center; gap: 14px; }
.about-row > div { display: flex; flex-direction: column; }
.about-row small { color: var(--ink-2); font-size: 12px; }
.tagline { margin: 14px 0 0; font-weight: 700; color: var(--navy); }
.danger-zone { border: 1.5px solid var(--red-l); }

/* ---------- guide ---------- */
.guide-fab { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 20px 0 8px; border-radius: 26px; border: 0; background: var(--navy); color: #fff; font-weight: 800; box-shadow: 0 10px 26px rgba(10, 26, 63, .35); }
.guide-fab span { width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: var(--navy); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
.view-sell ~ .guide-fab, body:has(.view-sell) .guide-fab { right: 410px; }
.guide .modal-body { padding-top: 0; }
.guide-search { margin: 4px 0 8px; }
.guide-lang { margin-bottom: 8px; }
.g-h { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-3); margin: 18px 0 8px; }
.g-topic { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; margin-bottom: 8px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; text-align: left; }
.g-topic:hover { border-color: #C9D5F5; background: #FAFBFE; }
.g-topic > .ic:first-child { width: 22px; height: 22px; padding: 8px; box-sizing: content-box; border-radius: 12px; background: var(--blue-l); color: var(--blue); }
.g-topic > span { flex: 1; display: flex; flex-direction: column; }
.g-topic small { color: var(--ink-2); font-size: 13px; }
.g-topic > .ic:last-child { color: var(--ink-3); }
.g-topic.featured { border-color: var(--gold); background: var(--gold-l); }
.g-topic.featured > .ic:first-child { background: var(--gold); color: var(--navy); }
.g-tours { display: flex; flex-wrap: wrap; gap: 8px; }
.g-article h3 { display: flex; align-items: center; gap: 10px; font-size: 21px; margin: 10px 0 6px; }
.g-steps { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-direction: column; gap: 12px; }
.g-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; }
.g-num { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.g-tips { padding: 12px 14px; border-radius: 14px; background: var(--gold-l); margin-bottom: 16px; }
.g-tips p { display: flex; gap: 8px; margin: 4px 0; font-size: 14px; }
.g-tips .ic { color: var(--gold-d); }
.g-faq { border-bottom: 1px solid var(--line); padding: 12px 2px; }
.g-faq summary { font-weight: 700; cursor: pointer; }
.g-faq p { margin: 8px 0 0; color: var(--ink-2); }

/* ---------- tour ---------- */
.tour { position: fixed; inset: 0; z-index: 300; pointer-events: none; }
.tour-shade { position: fixed; background: rgba(10, 26, 63, .55); pointer-events: auto; }
.tour-ring { position: fixed; border-radius: 14px; border: 3px solid var(--gold); box-shadow: 0 0 0 4px rgba(245, 189, 54, .35); pointer-events: none; animation: ring 1.3s ease-in-out infinite; }
@keyframes ring { 50% { box-shadow: 0 0 0 10px rgba(245, 189, 54, .15); } }
.tour-tip { position: fixed; width: 320px; max-width: calc(100vw - 16px); padding: 16px; border-radius: 18px; background: #fff; box-shadow: var(--sh-lg); pointer-events: auto; animation: rise .2s; }
.tour-step { font-size: 12px; font-weight: 800; color: var(--gold-d); text-transform: uppercase; letter-spacing: .6px; }
.tour-tip b { font-size: 17px; display: block; margin: 2px 0 4px; }
.tour-tip p { color: var(--ink-2); font-size: 15px; }
.tour-progress { height: 5px; border-radius: 3px; background: var(--bg); overflow: hidden; margin: 8px 0 10px; }
.tour-progress i { display: block; height: 100%; background: var(--gold); }
.tour-btns { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tour-hint { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--blue); }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100vw - 24px)); pointer-events: none; }
body.touring .toasts { top: calc(10px + env(safe-area-inset-top, 0px)); bottom: auto; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--navy); color: #fff; box-shadow: var(--sh-lg); font-size: 14px; font-weight: 600; pointer-events: auto; animation: rise .2s; }
.toast.out { opacity: 0; transform: translateY(8px); transition: all .25s; }
.toast-ic { display: inline-flex; width: 28px; height: 28px; flex: none; border-radius: 50%; align-items: center; justify-content: center; background: rgba(255, 255, 255, .14); }
.toast-ic .ic { width: 16px; height: 16px; }
.toast.ok .toast-ic { background: var(--green); }
.toast.warn .toast-ic { background: var(--amber); }
.toast.err .toast-ic { background: var(--red); }
.toast-msg { flex: 1; }
.toast-btn { border: 0; background: var(--gold); color: var(--navy); font-weight: 800; border-radius: 10px; height: 34px; padding: 0 12px; }

/* ---------- lock ---------- */
.lock { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; background: radial-gradient(circle at 20% 0%, var(--navy-3), var(--navy) 60%); }
.lock-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; color: #fff; }
.lock-card.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.lock-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.lock-logo > div { display: flex; flex-direction: column; }
.lock-logo b { font-size: 20px; }
.lock-logo small { color: var(--gold); font-size: 12px; }
.lock-note { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .1); margin-bottom: 14px; color: #DDE5FA; }
.lock-users { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 14px; }
.lock-user { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 26px; border: 1.5px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); color: #fff; text-align: left; }
.lock-user > span:last-child { display: flex; flex-direction: column; line-height: 1.15; }
.lock-user small { color: #9FB0DA; font-size: 11px; }
.lock-user.on { border-color: var(--gold); background: rgba(245, 189, 54, .14); }
.lock-ask { margin: 4px 0 10px; color: #C9D4F0; font-weight: 600; }
.pin-dots { display: flex; gap: 14px; margin-bottom: 8px; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .5); }
.pin-dots i.on { background: var(--gold); border-color: var(--gold); }
.pin-msg { min-height: 22px; font-size: 14px; color: #C9D4F0; margin-bottom: 8px; text-align: center; }
.pin-msg.bad { color: #FFB4B7; font-weight: 700; }
.keypad { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px; }
.keypad button { width: 76px; height: 76px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: #fff; font-size: 28px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; transition: background .12s; }
.keypad button:active { background: rgba(255, 255, 255, .25); }
.keypad button.ok { background: var(--gold); color: var(--navy); }
.keypad button.del { background: transparent; font-size: 24px; }
.keypad .ic { width: 30px; height: 30px; stroke-width: 3; }
.lock-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin-top: 22px; font-size: 12px; color: #9FB0DA; flex-wrap: wrap; }
.lock-foot span { display: inline-flex; align-items: center; gap: 6px; }
.lock-foot .ic { width: 15px; height: 15px; }
.lock-foot .link { color: #DDE5FA; font-size: 13px; }

/* ---------- setup ---------- */
.setup { position: fixed; inset: 0; z-index: 210; display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px; overflow-y: auto; background: radial-gradient(circle at 80% 0%, var(--navy-3), var(--navy) 55%); }
.setup-card { width: 100%; max-width: 560px; margin: auto; padding: 26px; border-radius: 26px; background: #fff; box-shadow: var(--sh-lg); }
.setup-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.setup-top .logo-word { color: var(--navy); }
.steps { display: flex; gap: 6px; }
.steps i { width: 26px; height: 6px; border-radius: 3px; background: var(--line); }
.steps i.on { background: var(--blue); }
.setup-card h1 { font-size: 25px; margin-bottom: 6px; }
.setup-card .btn.xl { margin-top: 18px; }
.setup-card .row-btns .btn { margin-top: 18px; }
.setup-card .btn.block + .btn.block { margin-top: 10px; }
.lang-seg { margin-top: 12px; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.type-btn { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; text-align: left; }
.type-btn span { font-size: 22px; }
.type-btn.on { border-color: var(--blue); background: var(--blue-l); color: var(--blue-d); }
.sample-preview { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 4px; }
.sample-preview span { padding: 6px 10px; border-radius: 10px; background: var(--bg); font-size: 13px; font-weight: 600; }
.setup-foot { text-align: center; color: var(--ink-3); font-size: 12px; margin: 18px 0 0; }

/* ---------- tablet ---------- */
@media (max-width: 1279px) {
  .cart-actions kbd { display: none; }
}
@media (max-width: 1100px) {
  .sell { grid-template-columns: minmax(0, 1fr) 340px; }
  .cart-actions .btn.hold { padding: 0 14px; }
  .cart-actions .btn.pay { flex-direction: column; gap: 0; line-height: 1.15; font-size: 13px; letter-spacing: .04em; }
  .cart-actions .btn.pay b { font-size: 19px; letter-spacing: 0; }
  body:has(.view-sell) .guide-fab { right: 360px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1023px) {
  :root { --side: 78px; }
  .side-logo .logo-word, .side-link span, .side-foot { display: none; }
  .side-logo { padding: 6px 0 18px; display: flex; justify-content: center; }
  .side-link { justify-content: center; padding: 12px 0; }
  .side-link .badge { position: absolute; top: 4px; right: 8px; }
  .bigbtns { grid-template-columns: repeat(2, 1fr); }
  .settings { grid-template-columns: 1fr; }
  .tb-uname { display: none; }
  .tb-user { padding: 3px; }
}

/* ---------- phone ---------- */
@media (max-width: 767px) {
  :root { --top: 56px; }
  .only-phone { display: inline-flex !important; }
  .only-desk { display: none !important; }
  .app { display: block; }
  .sidebar { display: none; }
  .topbar { padding: 0 10px; gap: 6px; }
  .tb-biz b { font-size: 15px; }
  .tb-btn { padding: 0 9px; height: 36px; }
  .tb-btn span { display: none; }
  .practice-btn.on span { display: inline; }
  .lock-btn { display: none; }
  .page { padding: 16px 14px calc(150px + var(--safe-b)); }
  .page-head h1 { font-size: 22px; }
  .hello h1 { font-size: 23px; }
  .hello .btn { display: none; }
  .bigbtns { gap: 10px; }
  .bigbtn { min-height: 112px; padding: 14px; }
  .grid2, .grid2.wide-first, .kpis { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi b { font-size: 20px; }
  .two { grid-template-columns: 1fr; gap: 0; }
  .bar-row { grid-template-columns: 80px 1fr auto; }

  .bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(64px + var(--safe-b)); padding-bottom: var(--safe-b); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 20px rgba(15, 23, 42, .06); }
  .bn-link { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; color: var(--ink-3); font-size: 11px; font-weight: 700; }
  .bn-link .ic { width: 23px; height: 23px; }
  .bn-link.active { color: var(--blue); }
  .bn-link.active .ic { stroke-width: 2.4; }
  .bn-link .badge { position: absolute; top: 6px; left: 50%; margin-left: 4px; }

  .guide-fab { right: 12px; bottom: calc(76px + var(--safe-b)); height: 46px; padding: 0 14px 0 5px; }
  .guide-fab span { width: 34px; height: 34px; }
  body:has(.view-sell) .guide-fab { right: 12px; bottom: calc(76px + var(--safe-b)); }
  body:has(.cartbar.show) .guide-fab { bottom: calc(148px + var(--safe-b)); }
  .guide-fab b { font-size: 13px; }

  .sell { display: block; height: auto; }
  body.practice .sell { height: auto; }
  .sell-left { padding: 12px 12px 0; overflow: visible; }
  .pgrid { overflow: visible; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-bottom: calc(160px + var(--safe-b)); }
  .ptile { min-height: 140px; }
  .cart { display: none; }
  body.cart-open .cart { display: flex; position: fixed; inset: 0; z-index: 60; border: 0; padding-bottom: var(--safe-b); animation: rise .2s; }
  body.cart-open .cart-head { padding-top: 16px; }
  .cart-actions { grid-template-columns: auto auto minmax(0, 1fr); }
  .cartbar { position: fixed; left: 8px; right: 8px; bottom: calc(70px + var(--safe-b)); z-index: 45; display: none; align-items: center; gap: 8px; padding: 8px; border-radius: 18px; background: var(--navy); box-shadow: 0 10px 30px rgba(10, 26, 63, .35); }
  .cartbar.show { display: flex; }
  .cb-open { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; border: 0; background: none; color: #fff; text-align: left; padding: 0 6px; }
  .cb-open > span { display: flex; flex-direction: column; line-height: 1.2; }
  .cb-open small { color: #B9C6EA; font-size: 12px; }
  .cartbar .btn.pay { height: 50px; padding: 0 16px; }
  .cartbar .btn.hold { height: 50px; width: 50px; }

  .modal-wrap { align-items: flex-end; padding: 0; }
  .modal { max-width: none !important; border-radius: 24px 24px 0 0; max-height: 94vh; padding-bottom: var(--safe-b); }
  .as-drawer .modal { border-radius: 24px 24px 0 0; height: auto; max-height: 94vh; }
  .modal-actions .btn { flex: 1; min-width: 0; }
  .held-list { grid-template-columns: 1fr; }
  .mt-row > span:first-child { min-width: 70px; }
  .toasts { bottom: calc(150px + var(--safe-b)); }
  .tour-tip { width: calc(100vw - 16px); }
  .keypad { grid-template-columns: repeat(3, 72px); gap: 12px; }
  .keypad button { width: 72px; height: 72px; }
  .setup-card { padding: 20px; }
  .toolbar select.input { min-width: 0; flex: 1; }
}

@media (max-width: 380px) {
  .bigbtns { grid-template-columns: 1fr 1fr; }
  .bigbtn b { font-size: 14px; }
  .methods { grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)); }
}

/* ---------- print: receipt only ---------- */
@media print {
  @page { margin: 4mm; }
  body { background: #fff; }
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; }
  #print-area .receipt { border: 0; padding: 0; width: 58mm; max-width: none; font-size: 11px; margin: 0; }
}

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