/* OCTASKY POS demos. One layout, five shop themes (set by body[data-store]). */
:root {
  --bg: #f3f6f4; --panel: #fff; --panel-2: #f6f8f7; --text: #15201b; --muted: #5d6b64; --line: #e1e7e3;
  --acc: #16a34a; --acc-ink: #fff; --acc-soft: #e3f6ea; --acc-text: #0f7a37;
  --ok: #15803d; --ok-soft: #dcf5e4; --warn: #b45309; --warn-soft: #fdf0d5; --bad: #c62828; --bad-soft: #fde4e2;
  --radius: 14px; --shadow: 0 10px 30px -18px rgba(20, 40, 30, .35);
  --font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; --font-h: Sora, Inter, system-ui, sans-serif;
  color-scheme: light;
}
body[data-store="restaurant"] {
  --bg: #14110f; --panel: #1e1a17; --panel-2: #28231f; --text: #f6efe8; --muted: #b3a79b; --line: #3a332d;
  --acc: #f59e0b; --acc-ink: #1b1204; --acc-soft: rgba(245, 158, 11, .16); --acc-text: #fbbf24;
  --ok: #4ade80; --ok-soft: rgba(74, 222, 128, .15); --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .15); --bad: #f87171; --bad-soft: rgba(248, 113, 113, .16);
  --shadow: 0 14px 34px -18px rgba(0, 0, 0, .8);
  color-scheme: dark;
}
body[data-store="pharmacy"] {
  --bg: #eef5f8; --panel: #fff; --panel-2: #f3f8fa; --text: #10242c; --muted: #557079; --line: #d9e6eb;
  --acc: #0e7490; --acc-soft: #dff2f7; --acc-text: #0b5c73; --radius: 10px;
}
body[data-store="clothing"] {
  --bg: #f4f1ec; --panel: #fffdfa; --panel-2: #f7f3ed; --text: #1b1917; --muted: #6e665d; --line: #e4ddd2;
  --acc: #1b1917; --acc-soft: #ebe5db; --acc-text: #1b1917; --radius: 4px;
  --font-h: "Playfair Display", Georgia, serif;
}
body[data-store="bakery"] {
  --bg: #fbf3ea; --panel: #fffaf4; --panel-2: #fbeee0; --text: #3a2418; --muted: #8a6d5c; --line: #f0dcc8;
  --acc: #c2410c; --acc-soft: #fde6d6; --acc-text: #a83a0c; --radius: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; }
button:disabled { cursor: not-allowed; opacity: .45; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--font-h); letter-spacing: -.01em; }
small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.ic { width: 18px; height: 18px; flex: none; }
:focus-visible { outline: 2px solid var(--acc-text); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.boot { display: grid; place-items: center; height: 100%; padding: 24px; text-align: center; color: var(--muted); }
.boot a { color: var(--acc-text); font-weight: 600; }

#pos { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }

/* ---------- OCTASKY bar ---------- */
.dbar { flex: none; display: flex; align-items: center; gap: 14px; height: 50px; padding: 0 14px; background: #05060f; color: #f2f4ff; font-size: 14px; }
.dbrand { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; font-family: Sora, sans-serif; font-weight: 800; letter-spacing: .04em; }
.dbrand i { font-style: normal; background: linear-gradient(120deg, #8b6cff, #2ad4f0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dbrand .ic { width: 16px; height: 16px; opacity: .7; }
.dswitch { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #7ee2a8; white-space: nowrap; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: pulse 2s infinite; }
@keyframes pulse { to { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } }
.dswitch select { min-width: 0; height: 34px; padding: 0 30px 0 12px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center / 14px; color: #fff; font-weight: 600; appearance: none; -webkit-appearance: none; cursor: pointer; }
.dswitch select option { color: #111; }
.dtools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.dbtn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 9px; color: #c9d0ee; font-weight: 500; }
.dbtn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.dcta { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 16px; border-radius: 999px; background: linear-gradient(120deg, #8b6cff, #2ad4f0); color: #060914; font-weight: 700; text-decoration: none; white-space: nowrap; }
.dcta .ic { width: 16px; height: 16px; }
.dbar .seg { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); }
.dbar .seg button { color: #c9d0ee; min-width: 36px; padding: 0 10px; height: 26px; }
.dbar .seg button.on { background: #fff; color: #05060f; }

/* ---------- segmented control, buttons, badges ---------- */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.seg button { height: 32px; padding: 0 14px; border-radius: 7px; font-weight: 600; font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.seg button.on { background: var(--acc); color: var(--acc-ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: calc(var(--radius) * .7 + 3px); background: var(--acc); color: var(--acc-ink); font-weight: 700; text-decoration: none; white-space: nowrap; }
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover:not(:disabled) { background: var(--panel-2); filter: none; }
.btn.danger { color: var(--bad); }
.btn.sm { min-height: 36px; padding: 0 13px; font-size: 13.5px; }
.btn.sm .ic { width: 15px; height: 15px; }
.btn.grow { flex: 1; }
.btn.wa { background: #25d366; color: #06310f; }
.link { color: var(--acc-text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.xbtn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--muted); flex: none; }
.xbtn:hover { background: var(--panel-2); color: var(--text); }
.bdg { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: var(--panel-2); color: var(--muted); }
.bdg.low { background: var(--warn-soft); color: var(--warn); }
.bdg.bad { background: var(--bad-soft); color: var(--bad); }
.bdg.fine { background: var(--ok-soft); color: var(--ok); }
.bdg.rx { background: var(--acc-soft); color: var(--acc-text); vertical-align: 1px; }
.empty { padding: 28px 12px; text-align: center; color: var(--muted); }

/* ---------- app frame ---------- */
.app { flex: 1; min-height: 0; display: flex; }
.rail { flex: none; width: 88px; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 10px 8px; background: var(--panel); border-right: 1px solid var(--line); overflow-y: auto; }
.logo { display: grid; place-items: center; height: 54px; margin-bottom: 6px; font-size: 30px; border-radius: var(--radius); background: var(--acc-soft); }
.rbtn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 2px; border-radius: calc(var(--radius) * .7 + 2px); color: var(--muted); font-size: 12px; font-weight: 600; }
.rbtn .ic { width: 22px; height: 22px; }
.rbtn:hover { background: var(--panel-2); color: var(--text); }
.rbtn.on { background: var(--acc); color: var(--acc-ink); }
.rbtn em { position: absolute; top: 5px; right: 12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; font-style: normal; line-height: 18px; text-align: center; }
.rbtn em:empty { display: none; }
.rbtn.last { margin-top: auto; }
.main { flex: 1; min-width: 0; min-height: 0; position: relative; overflow: hidden; }

.vhead { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 14px; }
.vhead > div:first-child { margin-right: auto; min-width: 0; }
.vhead h1 { font-size: 22px; font-weight: 700; }
.vhead p { color: var(--muted); font-size: 13.5px; }
.search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 6px 0 12px; min-width: 250px; flex: 0 1 380px; background: var(--panel); border: 1px solid var(--line); border-radius: calc(var(--radius) * .7 + 3px); color: var(--muted); }
.search:focus-within { border-color: var(--acc-text); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; color: var(--text); }
.sbtn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: calc(var(--radius) * .5 + 2px); background: var(--acc-soft); color: var(--acc-text); font-weight: 700; font-size: 13.5px; }

/* ---------- sale screen ---------- */
.sale { display: grid; grid-template-columns: minmax(0, 1fr) 392px; grid-template-rows: minmax(0, 1fr); height: 100%; }
.catcol { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 16px 18px 0; }
.cats { flex: none; display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: thin; }
.cat { flex: none; height: 36px; padding: 0 15px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: 13.5px; }
.cat.on { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); grid-auto-rows: max-content; gap: 12px; align-content: start; padding: 2px 2px 20px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px; min-height: 148px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); transition: transform .12s, border-color .12s, box-shadow .12s; }
.tile:hover { border-color: var(--acc-text); box-shadow: var(--shadow); transform: translateY(-2px); }
.tile:active { transform: scale(.97); }
.te { display: grid; place-items: center; height: 58px; margin-bottom: 8px; font-size: 34px; border-radius: calc(var(--radius) * .7); background: var(--panel-2); }
.tn { font-weight: 600; line-height: 1.25; }
.ts { font-size: 12.5px; color: var(--muted); }
.tp { margin-top: auto; padding-top: 6px; font-weight: 800; font-size: 16px; color: var(--acc-text); }
.tp small { display: inline; font-weight: 500; }
.tile .bdg { position: absolute; top: 8px; right: 8px; }
.tile.dead, .prow.dead { opacity: .5; }

.plist { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-auto-rows: max-content; align-content: start; gap: 6px; padding: 2px 2px 20px; }
.prow { display: grid; grid-template-columns: 40px minmax(0, 1fr) 150px 104px 92px; align-items: center; gap: 12px; padding: 9px 14px 9px 9px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.prow:hover { border-color: var(--acc-text); box-shadow: var(--shadow); }
.pe { display: grid; place-items: center; width: 40px; height: 40px; font-size: 22px; border-radius: 8px; background: var(--panel-2); }
.pn b { font-weight: 600; }
.pb .warn { color: var(--warn); font-weight: 600; }
.pb .bad { color: var(--bad); font-weight: 700; }
.ps { text-align: right; }
.pp { text-align: right; font-weight: 800; color: var(--acc-text); }

/* ---------- bill ---------- */
.cart { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border-left: 1px solid var(--line); }
.chead { display: flex; align-items: center; gap: 10px; padding: 14px 16px 8px; }
.chead h2 { font-size: 18px; margin-right: auto; }
.types { display: flex; margin: 0 16px 10px; }
.types button { flex: 1; padding: 0 6px; }
.cust { display: flex; gap: 8px; padding: 0 16px 10px; }
.cust input, .fld input, .fld select { width: 100%; height: 42px; padding: 0 12px; border-radius: calc(var(--radius) * .5 + 4px); border: 1px solid var(--line); background: var(--panel-2); outline: none; }
.cust input:focus, .fld input:focus, .fld select:focus { border-color: var(--acc-text); }
.loy { padding: 0 16px 10px; font-size: 12.5px; color: var(--muted); }
.loy b { color: var(--acc-text); }
.lines { flex: 1; min-height: 80px; overflow-y: auto; padding: 0 16px; border-top: 1px solid var(--line); }
.cempty { display: grid; justify-items: center; gap: 2px; padding: 22px 10px 16px; text-align: center; color: var(--muted); }
.cempty b { color: var(--text); font-family: var(--font-h); }
.line { padding: 11px 0; border-bottom: 1px dashed var(--line); animation: pop .22s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
.l1 { display: flex; justify-content: space-between; gap: 10px; }
.lname { font-weight: 600; min-width: 0; }
.lname small i { font-style: normal; color: var(--acc-text); font-weight: 600; }
.l1 > b { white-space: nowrap; }
.l2 { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.l2 > span { margin-right: auto; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.qty button { display: grid; place-items: center; width: 34px; height: 32px; color: var(--text); }
.qty button:hover { background: var(--panel-2); }
.qty .ic { width: 15px; height: 15px; }
.qty span { min-width: 34px; padding: 0 6px; text-align: center; font-weight: 700; color: var(--text); white-space: nowrap; }
.qty.lg button { width: 44px; height: 44px; }
.qty.lg span { min-width: 40px; font-size: 16px; }
.del { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--muted); }
.del:hover { background: var(--bad-soft); color: var(--bad); }
.cfoot { flex: none; padding: 12px 16px 16px; border-top: 1px solid var(--line); background: var(--panel); }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; font-size: 14px; color: var(--muted); }
.row.disc { color: var(--ok); }
.row.total { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); font-family: var(--font-h); font-size: 20px; font-weight: 800; color: var(--text); }
.cact { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.cact button { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 10px; border-radius: calc(var(--radius) * .5 + 3px); background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; white-space: nowrap; }
.cact button:hover:not(:disabled) { border-color: var(--acc-text); }
.cact .ic { width: 15px; height: 15px; }
.pay { width: 100%; height: 56px; border-radius: calc(var(--radius) * .7 + 4px); background: var(--acc); color: var(--acc-ink); font-family: var(--font-h); font-size: 18px; font-weight: 800; text-align: center; }
.pay:hover:not(:disabled) { filter: brightness(1.08); }
.cartbar, .onlym { display: none; }

/* ---------- other screens ---------- */
.page { height: 100%; overflow-y: auto; padding: 16px 18px 28px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { padding: 14px 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.kpi span { display: block; font-size: 13px; color: var(--muted); }
.kpi b { font-family: var(--font-h); font-size: 23px; font-weight: 800; }
.kpi.warn b { color: var(--warn); }
.kpi.bad b { color: var(--bad); }
.kpi.good b { color: var(--ok); }
.tbl { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 14px; text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--panel-2); white-space: nowrap; }
td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.r { text-align: right; }
#bills tr { cursor: pointer; }
#bills tr:hover td { background: var(--panel-2); }
tr.ref td { color: var(--muted); }
tr.ref td:last-child b { text-decoration: line-through; }
.se { float: left; display: grid; place-items: center; width: 36px; height: 36px; margin-right: 10px; font-size: 20px; border-radius: 8px; background: var(--panel-2); }
td .link { text-decoration-style: dotted; color: inherit; }

.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; background: var(--ok); }
.legend i.busy { background: var(--acc); }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.tcard { display: flex; flex-direction: column; gap: 2px; min-height: 132px; padding: 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--ok); }
.tcard:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.tcard b { font-family: var(--font-h); font-size: 18px; }
.tcard.busy { border-top-color: var(--acc); background: var(--acc-soft); }
.tcard.sel { outline: 2px solid var(--acc); outline-offset: 2px; }
.tamt { margin-top: auto; font-family: var(--font-h); font-size: 20px; font-weight: 800; color: var(--acc-text); }
.tmeta { font-size: 12.5px; color: var(--muted); }
.tcard.free .tmeta { margin-top: auto; }

.kboard { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.kcol { padding: 14px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--line); }
.kcol h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 16px; }
.kcol h2 em { padding: 1px 9px; border-radius: 999px; background: var(--acc-soft); color: var(--acc-text); font-size: 13px; font-style: normal; }
.ticket { margin-bottom: 12px; padding: 14px; border-radius: calc(var(--radius) * .8); background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--warn); }
.ticket.ready { border-left-color: var(--ok); }
.ticket header { display: flex; justify-content: space-between; gap: 10px; font-size: 16px; }
.ticket header span { font-size: 13px; color: var(--muted); }
.ticket ul { list-style: none; margin: 10px 0 12px; padding: 0; }
.ticket li { padding: 5px 0; border-top: 1px dashed var(--line); }
.ticket .note { color: var(--bad); font-weight: 600; }

.rgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.panel { padding: 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.panel.wide { grid-column: 1 / -1; }
.panel h2 { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 16px; margin-bottom: 14px; }
.panel .row small, .mbody .row small { display: inline; margin-left: 6px; }
.mbody .row { padding: 7px 0; border-bottom: 1px dashed var(--line); color: var(--text); }
.mbody .row.total { border-bottom: 0; }
.change:not(.ok):not(.short) { background: var(--panel-2); color: var(--text); }
.change .ic { width: 24px; height: 24px; }
.hrow small { margin-top: 2px; }
.bar { display: grid; grid-template-columns: minmax(0, 132px) 1fr auto; align-items: center; gap: 10px; padding: 5px 0; font-size: 13.5px; }
.bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar div { height: 10px; border-radius: 5px; background: var(--panel-2); }
.bar i { display: block; height: 100%; border-radius: 5px; background: var(--acc); }
.bar b { font-size: 13px; white-space: nowrap; }
.hours { display: flex; align-items: flex-end; gap: 8px; height: 170px; }
.hcol { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.hcol i { width: 100%; max-width: 46px; min-height: 3px; border-radius: 6px 6px 2px 2px; background: var(--acc); }
.hcol span { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* ---------- pop-ups ---------- */
.ov { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(10, 14, 20, .58); animation: fade .15s; overflow-y: auto; }
@keyframes fade { from { opacity: 0; } }
.mbox { width: 100%; max-width: 440px; max-height: calc(100dvh - 32px); display: flex; flex-direction: column; border-radius: calc(var(--radius) + 4px); background: var(--panel); border: 1px solid var(--line); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55); animation: rise .2s ease; }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }
.mhead { display: flex; justify-content: space-between; gap: 12px; padding: 16px 16px 8px 20px; }
.mhead h3 { font-size: 19px; }
.mhead p { font-size: 13.5px; color: var(--muted); }
.mbody { padding: 8px 20px 4px; overflow-y: auto; }
.mfoot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 20px 20px; }
.fld { display: block; margin-bottom: 14px; }
.fld > span { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.fld input[type="number"] { font-size: 18px; font-weight: 700; height: 50px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
[hidden] { display: none !important; }
.mbox.wide { max-width: 560px; }
.chk { display: flex; align-items: center; gap: 10px; min-height: 42px; margin-bottom: 14px; font-weight: 600; font-size: 14px; cursor: pointer; }
.chk input { flex: none; width: 20px; height: 20px; accent-color: var(--acc-text); }
.fld .link { margin-left: 6px; font-size: 12.5px; }
.btn.left { margin-right: auto; }
.acts { white-space: nowrap; }
.acts .btn + .btn { margin-left: 6px; }
.vhead > .sbtn { height: 44px; padding: 0 14px; }
.hint { font-size: 13px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chips button { height: 38px; padding: 0 14px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 600; font-size: 13.5px; }
.chips button:hover { border-color: var(--acc-text); color: var(--acc-text); }
.big { font-family: var(--font-h); font-size: 24px; font-weight: 800; color: var(--acc-text); text-align: center; padding: 6px 0 4px; }
.grp { margin: 0 0 14px; padding: 0; border: 0; }
.grp legend { padding: 0; margin-bottom: 8px; font-weight: 700; }
.grp legend small { display: inline; margin-left: 6px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: block; min-width: 62px; padding: 9px 14px; border-radius: calc(var(--radius) * .5 + 4px); border: 1px solid var(--line); background: var(--panel-2); font-weight: 600; text-align: center; cursor: pointer; }
.opt input:checked + span { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.opt input:checked + span small { color: inherit; opacity: .85; }
.opt input:focus-visible + span { outline: 2px solid var(--acc-text); outline-offset: 2px; }
.opt.gone span { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.list { display: flex; flex-direction: column; gap: 8px; padding-bottom: 20px; }
.hrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: calc(var(--radius) * .7); background: var(--panel-2); border: 1px solid var(--line); }
.hrow:hover { border-color: var(--acc-text); }
.emo { display: flex; flex-wrap: wrap; gap: 6px; }
.emo button { width: 40px; height: 40px; font-size: 20px; text-align: center; border-radius: 9px; border: 1px solid var(--line); background: var(--panel-2); }
.emo button.on { border-color: var(--acc-text); background: var(--acc-soft); }

.due { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; color: var(--muted); }
.due b { font-family: var(--font-h); font-size: 30px; font-weight: 800; color: var(--text); }
.methods { display: flex; margin-bottom: 16px; }
.methods button { flex: 1; height: 40px; padding: 0 6px; }
.change { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-radius: calc(var(--radius) * .7); background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.change b { font-family: var(--font-h); font-size: 22px; }
.change.short { background: var(--bad-soft); color: var(--bad); }
.term { display: grid; justify-items: center; gap: 6px; padding: 14px 8px 8px; text-align: center; }
.term p { font-size: 13.5px; color: var(--muted); max-width: 320px; }
.card-ic { position: relative; width: 92px; height: 60px; margin-bottom: 8px; border-radius: 9px; background: linear-gradient(135deg, var(--acc), var(--acc-text)); animation: bob 1.6s ease-in-out infinite; }
.card-ic i { position: absolute; left: 10px; top: 12px; width: 18px; height: 13px; border-radius: 3px; background: rgba(255, 255, 255, .75); }
.card-ic i + i { top: auto; bottom: 10px; width: 46px; height: 5px; background: rgba(255, 255, 255, .45); }
@keyframes bob { 50% { transform: translateY(-5px); } }
.qr { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; width: 128px; height: 128px; padding: 10px; margin-bottom: 8px; border-radius: 12px; background: #fff; }
.qr i { border-radius: 2px; }
.qr i.k { background: #111; }

/* receipt */
.rmod { max-width: 760px; background: transparent; border: 0; box-shadow: none; }
.rwrap { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 16px; align-items: start; overflow-y: auto; }
.receipt { position: relative; padding: 22px 20px 18px; background: #fff; color: #111; font-family: "Courier New", ui-monospace, monospace; font-size: 13px; line-height: 1.4; border-radius: 6px; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .5); }
.receipt small { color: #555; font-size: 11.5px; }
.rtop { display: grid; justify-items: center; gap: 2px; text-align: center; padding-bottom: 12px; border-bottom: 1px dashed #999; }
.rlogo { font-size: 28px; }
.rtop b { font-size: 16px; }
.rmeta { display: grid; gap: 1px; padding: 10px 0; border-bottom: 1px dashed #999; }
.receipt table { margin: 8px 0; }
.receipt td { padding: 5px 0; border: 0; border-bottom: 1px dotted #ccc; vertical-align: top; }
.receipt td:last-child { text-align: right; white-space: nowrap; padding-left: 10px; }
.receipt .row { color: #111; font-size: 13px; }
.receipt .row.total { border-top: 1px dashed #999; font-family: inherit; font-size: 17px; color: #111; }
.rpts { margin-top: 10px; padding: 8px; text-align: center; border: 1px dashed #999; }
.rstamp { position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%) rotate(-14deg); padding: 4px 14px; border: 3px solid #c62828; color: #c62828; font-size: 24px; font-weight: 700; letter-spacing: .1em; opacity: .8; }
.rfoot { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #999; text-align: center; font-size: 12px; }
.barcode { height: 38px; margin: 12px 24px 6px; background: repeating-linear-gradient(90deg, #111 0 2px, #fff 2px 4px, #111 4px 5px, #fff 5px 8px, #111 8px 11px, #fff 11px 12px); }
.rpow { text-align: center; font-size: 11px; color: #666; }
.ract { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: calc(var(--radius) + 4px); background: var(--panel); border: 1px solid var(--line); }
.done { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: calc(var(--radius) * .7); background: var(--ok-soft); color: var(--ok); font-weight: 700; }
.pitch { margin-top: 6px; padding: 16px; border-radius: var(--radius); background: #05060f; color: #f2f4ff; display: grid; gap: 8px; }
.pitch b { font-family: Sora, sans-serif; font-size: 16px; }
.pitch p { font-size: 13.5px; color: #aab2d0; }
.pitch .btn { border-radius: 999px; }
.pitch .btn:first-of-type { background: linear-gradient(120deg, #8b6cff, #2ad4f0); color: #060914; }

/* guide and messages */
.guide { margin: 4px 0 16px; padding: 14px 16px; border-radius: var(--radius); background: var(--acc-soft); font-size: 13.5px; }
.guide b { font-family: var(--font-h); font-size: 14.5px; }
.guide ol { margin: 6px 0 8px; padding-left: 20px; }
.guide li { padding: 3px 0; }
.guide li::marker { color: var(--acc-text); font-weight: 700; }
.guide p { font-size: 12.5px; color: var(--muted); }
#toasts { position: fixed; top: 62px; left: 50%; transform: translateX(-50%); z-index: 80; display: grid; gap: 8px; justify-items: center; width: max-content; max-width: calc(100vw - 24px); pointer-events: none; }
.toast { padding: 11px 16px; border-radius: 12px; background: #111827; color: #fff; font-size: 14px; font-weight: 500; box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .6); animation: rise .2s ease; transition: opacity .3s, transform .3s; }
.toast.ok { background: #166534; }
.toast.err { background: #b91c1c; }
.toast.out { opacity: 0; transform: translateY(-8px); }

/* ---------- tablets and phones ---------- */
@media (max-width: 1100px) {
  .sale { grid-template-columns: minmax(0, 1fr) 340px; }
  .prow { grid-template-columns: 40px minmax(0, 1fr) 104px 84px; }
  .pb { display: none; }
}
@media (max-width: 860px) {
  .dbar { flex-wrap: wrap; height: auto; gap: 8px; padding: 8px 10px; }
  .dbtn span, .dbrand .ic { display: none; }
  .dbtn { padding: 0 7px; }
  .dcta { padding: 0 12px; font-size: 13px; }
  .dcta .ic { display: none; }
  .dswitch { order: 9; flex: 1 1 100%; }
  .dswitch select { flex: 1; }
  #toasts { top: 104px; }
  .vhead p { display: none; }
  .page .vhead p { display: block; }
  .app { flex-direction: column-reverse; }
  .rail { width: auto; flex-direction: row; gap: 2px; padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); overflow-x: auto; }
  .logo { display: none; }
  .rbtn { flex: 1 0 52px; padding: 6px 2px; font-size: 11px; gap: 3px; }
  .rbtn.last { margin-top: 0; }
  .rbtn em { right: 50%; margin-right: -22px; top: 2px; }
  .sale { grid-template-columns: 1fr; }
  .catcol { padding: 12px 12px 0; }
  .vhead h1 { font-size: 19px; }
  .search { flex: 1 1 100%; min-width: 0; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; padding-bottom: 84px; }
  .plist { padding-bottom: 84px; }
  .prow { grid-template-columns: 36px minmax(0, 1fr) 80px; gap: 10px; }
  .ps { display: none; }
  .cart { position: absolute; inset: 0; z-index: 20; border-left: 0; transform: translateY(102%); transition: transform .28s ease; }
  .cart-open .cart { transform: none; }
  .onlym { display: grid; }
  .cartbar { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 10; display: flex; justify-content: space-between; align-items: center; height: 56px; padding: 0 18px; border-radius: calc(var(--radius) * .7 + 6px); background: var(--acc); color: var(--acc-ink); box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .5); }
  .cartbar b { font-family: var(--font-h); font-size: 16px; }
  .cart-open .cartbar { display: none; }
  .page { padding: 12px 12px 24px; }
  .hm { display: none; }
  th, td { padding: 10px; }
  .kboard, .rgrid { grid-template-columns: 1fr; }
  .rwrap { grid-template-columns: 1fr; justify-items: center; }
  .two { grid-template-columns: 1fr; gap: 0; }
  .acts .btn { margin: 2px 0 2px 4px; }
  .receipt { width: 100%; max-width: 340px; }
  .ract { width: 100%; max-width: 340px; }
  .bar { grid-template-columns: minmax(0, 100px) 1fr auto; }
  .hcol span { font-size: 10px; }
  .hours { gap: 4px; }
}

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

@media print {
  body { background: #fff; overflow: visible; }
  .dbar, .app, #toasts, .noprint { display: none !important; }
  #pos { height: auto; display: block; }
  .ov { position: static; display: block; padding: 0; background: none; }
  .mbox, .rwrap { display: block; max-width: none; max-height: none; overflow: visible; }
  .receipt { width: 76mm; margin: 0 auto; box-shadow: none; border-radius: 0; }
}
