* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif; background: #f5f7fa; color: #10203a; line-height: 1.5; font-size: 16px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; background: #0b3fa8; color: #fff; }
.top span { font-size: .85rem; opacity: .9; }
.beta { background: #fff4e5; color: #7a4b00; text-align: center; font-size: .8rem; padding: 3px; }
main { max-width: 560px; margin: 0 auto; padding: 12px; }
h1 { font-size: 1.25rem; margin: 6px 0 10px; } h2 { font-size: 1.05rem; margin: 14px 0 8px; }
.card { background: #fff; border: 1px solid #e3e8ef; border-radius: 12px; padding: 12px; margin-bottom: 10px; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 8px 0 4px; }
input, select, button { font: inherit; }
input, select { width: 100%; padding: 9px 10px; border: 1.5px solid #cfd8e3; border-radius: 10px; background: #fff; }
input:focus, select:focus { outline: 2px solid #0b3fa8; outline-offset: 1px; }
.ltr { direction: ltr; text-align: left; unicode-bidi: isolate; }
.btn { display: block; width: 100%; padding: 11px; margin-top: 10px; border: 0; border-radius: 10px; background: #0b3fa8; color: #fff; font-weight: 700; cursor: pointer; }
.btn.alt { background: #fff; color: #0b3fa8; border: 1.5px solid #0b3fa8; }
.btn.sm { display: inline-block; width: auto; padding: 6px 12px; margin: 0; font-size: .85rem; }
.btn:disabled { opacity: .5; }
.err { color: #b42318; font-weight: 600; margin-top: 8px; }
.muted { color: #667085; font-size: .85rem; }
.code { color: #d92d20; font-size: 1.6rem; font-weight: 800; letter-spacing: .3em; text-align: center; direction: ltr; }
.chips { display: flex; gap: 8px; } .chips button { flex: 1; padding: 9px; border: 1.5px solid #cfd8e3; border-radius: 10px; background: #fff; cursor: pointer; }
.chips button.on { border-color: #0b3fa8; background: #e8efff; font-weight: 700; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 6px 0 10px; } .tabs button { white-space: nowrap; padding: 7px 12px; border-radius: 999px; border: 1px solid #cfd8e3; background: #fff; cursor: pointer; }
.tabs button.on { background: #0b3fa8; color: #fff; border-color: #0b3fa8; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #eef1f5; }
.row:last-child { border-bottom: 0; }
.pill { display: inline-block; font-size: .75rem; padding: 2px 8px; border-radius: 999px; background: #eef1f5; }
.pill.ok { background: #e7f6ec; color: #067647; } .pill.bad { background: #fdecea; color: #b42318; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; direction: ltr; margin-top: 10px; }
.pad button { padding: 16px; font-size: 1.3rem; border-radius: 12px; border: 1px solid #cfd8e3; background: #fff; cursor: pointer; }
.dots { text-align: center; font-size: 1.6rem; letter-spacing: .4em; min-height: 2rem; }
/* ---- install the app (PWA) ---- */
.install-card { margin-top: 18px; text-align: center; background: linear-gradient(180deg, #f2f6ff, #fff); border-color: #c9d8fb; }
.install-card h3 { margin: 2px 0 4px; font-size: 1.05rem; }
.install-card.compact { margin-top: 14px; }
.install-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.install-btn { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 10px; background: #111827; text-align: start; }
.install-btn.primary, .install-card.ready .install-btn:first-child { background: #0b3fa8; }
.install-btn .ib-ico { font-size: 1.6rem; line-height: 1; }
.install-btn small { display: block; font-weight: 400; font-size: .72rem; opacity: .85; }
.install-btn b { display: block; font-size: 1rem; }
.install-steps { list-style: none; padding: 0; margin: 10px 0; text-align: start; display: grid; gap: 8px; }
.install-steps li { display: flex; gap: 10px; align-items: center; background: #f5f7fa; border-radius: 10px; padding: 8px 10px; }
.install-steps .st-ico { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #e8efff; font-size: 1.1rem; }
.install-qr { display: grid; justify-items: center; gap: 4px; margin: 8px 0; }
.install-qr svg { width: 200px; height: 200px; border: 1px solid #e3e8ef; border-radius: 8px; }
/* ---- GATE 3: selling, catalog, stock, reports ---- */
.scanrow { display: flex; gap: 6px; align-items: center; } .scanrow .btn { flex: none; }
.scan { font-size: 1.1rem; padding: 12px; }
.results { display: grid; gap: 4px; margin-top: 6px; }
.res { display: flex; justify-content: space-between; padding: 10px 12px; border: 1px solid #cfd8e3; border-radius: 10px; background: #fff; cursor: pointer; font: inherit; text-align: right; }
.res:hover { background: #f0f4ff; }
.cart { display: grid; gap: 6px; margin-bottom: 8px; }
.line { background: #fff; border: 1px solid #e3e8ef; border-radius: 12px; padding: 8px 10px; }
.line.rowbtn { cursor: pointer; }
.line.rowbtn.on { background: #e7f6ee; border-color: #12805c; box-shadow: inset 4px 0 0 #12805c; }
.line.rowbtn.on .lname b::before { content: "✔ "; color: #12805c; }
.lname b { font-size: 1rem; }
.lctl { display: flex; align-items: center; gap: 6px; margin-top: 6px; justify-content: space-between; }
.qty { display: inline-flex; align-items: center; gap: 4px; }
.qty button { width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid #0b3fa8; background: #fff; color: #0b3fa8; font-size: 1.3rem; font-weight: 800; cursor: pointer; }
.qty b { min-width: 28px; text-align: center; font-size: 1.1rem; }
.qtyin { width: 86px; padding: 7px; }
.x { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #fdecea; color: #b42318; font-size: 1.2rem; cursor: pointer; }
.total { display: flex; justify-content: space-between; align-items: center; background: #10203a; color: #fff; border-radius: 12px; padding: 12px 14px; font-size: 1.05rem; }
.total b { font-size: 1.6rem; }
.btn.pay { background: #067647; font-size: 1.2rem; padding: 14px; }
.btn.danger { color: #b42318; border-color: #b42318; }
a.btn { text-align: center; text-decoration: none; box-sizing: border-box; }
.big { font-size: 1.3rem; }
input.big { font-size: 1.4rem; padding: 12px; }
.change { font-size: 1.3rem; font-weight: 800; color: #067647; margin-top: 8px; text-align: center; }
.shiftbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .85rem; color: #475467; margin-bottom: 8px; }
.ok-banner { background: #e7f6ec; color: #067647; border-radius: 12px; padding: 14px; font-weight: 800; font-size: 1.15rem; text-align: center; margin-bottom: 10px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .two .btn { margin-top: 0; }
.card.two { align-items: end; }
.inl { display: flex; gap: 6px; align-items: center; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; } .check input { width: auto; }
.rowbtn { width: 100%; background: none; border: 0; border-bottom: 1px solid #eef1f5; font: inherit; color: inherit; text-align: right; cursor: pointer; }
.neg { color: #b42318; } .pos { color: #067647; }
.row.big { font-size: 1.1rem; } .row.good b { color: #067647; } .row.warn b { color: #b42318; }
details { margin: 8px 0; } summary { cursor: pointer; font-weight: 700; color: #0b3fa8; padding: 6px 0; }
details input { margin-top: 6px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.kpi { background: #fff; border: 1px solid #e3e8ef; border-radius: 12px; padding: 10px; } .kpi small { display: block; color: #667085; } .kpi b { font-size: 1.3rem; }
.layer { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 12px; z-index: 9; }
.cam { width: 100%; max-height: 60vh; border-radius: 10px; background: #000; }
/* receipt: 80 mm thermal roll via the browser's print dialog */
.receipt { max-width: 76mm; margin: 0 auto; font-size: 13px; color: #000; }
.rc-h { text-align: center; margin-bottom: 6px; } .rc-h b { font-size: 16px; }
.rc-row { display: flex; justify-content: space-between; gap: 6px; } .rc-row.big { font-size: 15px; }
.rc-line { margin: 3px 0; }
.rc-void { text-align: center; font-weight: 800; border: 2px solid #000; margin: 6px 0; padding: 4px; }
.rc-f { text-align: center; margin-top: 6px; font-size: 12px; }
.receipt hr { border: 0; border-top: 1px dashed #000; }
/* printing: the page-size rules live in print-*.css (switched by the app); here only what is printed */
#printroot { display: none; }
@media print {
  body { background: #fff; }
  body > *:not(#printroot) { display: none !important; }
  #printroot { display: block; }
  .print-area { margin: 0; border: 0; padding: 0; }
}
.bc { width: 100%; height: auto; display: block; }
.rc-bc { width: 70%; margin: 6px auto 0; }
.rc-pre { white-space: pre-line; }
textarea { width: 100%; padding: 9px 10px; border: 1.5px solid #cfd8e3; border-radius: 10px; font: inherit; min-height: 60px; }
.labels { display: flex; flex-wrap: wrap; gap: 6px; }
.label { border: 1px dashed #cfd8e3; background: #fff; color: #000; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 1.5mm; text-align: center; }
.label .ln { font-size: 9pt; font-weight: 700; line-height: 1.15; max-height: 2.3em; overflow: hidden; }
.label .lp { font-size: 12pt; font-weight: 800; direction: ltr; }
.label .bc { max-height: 45%; }
.l-38x25 { width: 38mm; height: 25mm; } .l-50x30 { width: 50mm; height: 30mm; } .l-a4-65 { width: 38.1mm; height: 21.2mm; padding: 1mm; }
.l-a4-65 .ln { font-size: 7pt; } .l-a4-65 .lp { font-size: 9pt; }
.chips.wrap { flex-wrap: wrap; } .chips.wrap button { flex: 1 1 40%; }
.rc-qr { display: flex; justify-content: center; margin-top: 6px; } .rc-qr .qr { width: 32mm; height: 32mm; }
.keyshow { display: block; word-break: break-all; background: #f5f7fa; padding: 8px; border-radius: 8px; font-size: .8rem; margin: 6px 0; }
.ipbox { text-align: center; background: #f0f4ff; border-radius: 12px; padding: 10px; margin: 8px 0; } .ipamt { font-size: 1.3rem; font-weight: 800; } .ipa { font-size: 1.15rem; font-weight: 700; color: #0b3fa8; }
.datein { width: 130px; padding: 6px; font-size: .8rem; }
/* ---- v1.5: simple-user interface (home tiles, journeys, popups, net bar, tour) ---- */
main { max-width: 760px; }
.store-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.store-head h1 { margin: 0 0 4px; }
.help { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid #cfd8e3; background: #fff; font-size: 1.2rem; cursor: pointer; }
.net { border-radius: 10px; padding: 7px 12px; font-size: .9rem; font-weight: 600; margin: 6px 0 12px; }
.net.on { background: #e7f6ec; color: #067647; } .net.off { background: #fff4e5; color: #93370d; } .net.sync { background: #e8efff; color: #0b3fa8; }
.home-title { font-size: 1.15rem; color: #344054; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 132px; padding: 14px 8px; border-radius: 18px; border: 0; cursor: pointer; font: inherit; color: #10203a; background: #fff; box-shadow: 0 1px 2px rgba(16,32,58,.08), inset 0 0 0 1.5px #e3e8ef; transition: transform .08s; }
.tile:active { transform: scale(.97); }
.tile:focus-visible { outline: 3px solid #0b3fa8; outline-offset: 2px; }
.tile-ico { font-size: 2.6rem; line-height: 1; }
.tile b { font-size: 1.1rem; } .tile small { color: #667085; font-size: .8rem; text-align: center; }
.c-blue { background: #e8efff; } .c-green { background: #e7f6ec; } .c-purple { background: #f1ebff; } .c-amber { background: #fff4e5; }
.c-teal { background: #e6f7f6; } .c-indigo { background: #eceffe; } .c-gray { background: #f2f4f7; }
.section-head { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; }
.section-head b { font-size: 1.15rem; }
.home-btn { padding: 10px 14px; border-radius: 12px; border: 1.5px solid #0b3fa8; background: #fff; color: #0b3fa8; font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
/* journey */
.journey-head { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid #cfd8e3; background: #fff; font-size: 1.2rem; cursor: pointer; }
.steps { display: flex; list-style: none; padding: 0; margin: 12px 0; gap: 4px; counter-reset: s; }
.steps li { flex: 1; text-align: center; position: relative; color: #98a2b3; }
.steps li span { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; align-items: center; justify-content: center; background: #eef1f5; font-weight: 700; }
.steps li small { display: block; font-size: .75rem; margin-top: 2px; }
.steps li.now { color: #0b3fa8; } .steps li.now span { background: #0b3fa8; color: #fff; }
.steps li.done { color: #067647; } .steps li.done span { background: #12b76a; color: #fff; }
.steps li + li::before { content: ''; position: absolute; top: 17px; right: -50%; left: 50%; height: 3px; background: #eef1f5; z-index: -1; }
.steps li.done + li::before, .steps li.done + li.now::before { background: #12b76a; }
.step-q { font-size: 1.2rem; }
/* popup */
.layer { position: fixed; inset: 0; background: rgba(16,32,58,.45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.pop { background: #fff; border-radius: 20px; padding: 22px 18px 16px; width: min(440px, 100%); text-align: center; animation: pop .18s ease-out; }
@keyframes pop { from { transform: scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.pop-ico { font-size: 3.2rem; line-height: 1; } .pop h2 { margin: 10px 0 4px; font-size: 1.25rem; } .pop p { color: #475467; margin: 0 0 10px; }
.pop-ok { border-top: 6px solid #12b76a; } .pop-warn { border-top: 6px solid #f79009; } .pop-bad { border-top: 6px solid #d92d20; }
.choices { display: grid; gap: 8px; margin-top: 12px; }
.choice { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; border: 1.5px solid #cfd8e3; background: #fff; font: inherit; cursor: pointer; text-align: right; }
.choice.primary { border-color: #0b3fa8; background: #e8efff; }
.choice-ico { font-size: 1.6rem; }
/* toasts */
.toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); display: grid; gap: 6px; z-index: 60; width: min(440px, 92vw); }
.toast { padding: 12px 14px; border-radius: 12px; color: #fff; font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,.15); transition: opacity .3s; }
.t-ok { background: #067647; } .t-warn { background: #b54708; } .t-bad { background: #b42318; } .toast.out { opacity: 0; }
/* tour */
.tour { position: fixed; inset: 0; background: rgba(16,32,58,.35); z-index: 70; }
.tour-on { position: relative; z-index: 71; box-shadow: 0 0 0 4px #fdb022, 0 0 0 9999px rgba(16,32,58,.35); border-radius: 14px; }
.tour-tip { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); width: min(440px, 92vw); background: #fff; border-radius: 16px; padding: 14px; z-index: 72; }
.tour-tip p { margin: 6px 0 10px; font-size: 1.05rem; } .tour-btns { display: flex; justify-content: space-between; gap: 8px; }
/* camera */
.cam-layer .card { width: min(520px, 100%); text-align: center; }
.cam-frame { position: relative; border-radius: 14px; overflow: hidden; background: #000; }
.cam { width: 100%; display: block; }
.cam-line { position: absolute; left: 8%; right: 8%; top: 50%; height: 2px; background: #f04438; box-shadow: 0 0 8px #f04438; animation: scanline 1.6s ease-in-out infinite alternate; }
@keyframes scanline { from { top: 30%; } to { top: 70%; } }
.cam-hint { font-weight: 700; margin: 0 0 8px; }
@media (max-width: 420px) { .tiles { grid-template-columns: 1fr 1fr; gap: 10px; } .tile { min-height: 116px; } .tile-ico { font-size: 2.2rem; } }
.tabs[hidden], [hidden] { display: none !important; }
.xl-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.xl-btn { width: 100%; }
.xl-errs { text-align: right; max-height: 40vh; overflow: auto; margin: 6px 0; padding-inline-start: 18px; color: #b42318; font-size: .92rem; }
.xl-errs li { margin: 4px 0; }

.steps { overflow: hidden; isolation: isolate; }
.journey .lctl { flex-wrap: wrap; }
.journey .datein { min-width: 0; }
main { overflow-x: hidden; }
.sig { width: 100%; height: 160px; border: 2px dashed #cfd8e3; border-radius: 12px; background: #fff; touch-action: none; display: block; margin: 6px 0; }
.card.ok { border-inline-start: 5px solid #1f9d55; background: #f1fbf4; }
.card.warn { border-inline-start: 5px solid #f08c00; background: #fff8ec; }
.card.bad { border-inline-start: 5px solid #d64545; background: #fff1f1; color: #8a1f1f; font-weight: 600; }
.card ul, .card ol { margin: 6px 0; padding-inline-start: 20px; line-height: 1.8; }
.rc-qr { display: flex; flex-direction: column; align-items: center; gap: 4px; } .rc-qr small { text-align: center; font-size: 11px; }
.agbar { display: flex; height: 6px; border-radius: 4px; overflow: hidden; background: #eef2f6; margin-top: 4px; width: 100%; min-width: 160px; }
.agbar .ag { display: block; height: 100%; } .ag.ok { background: #2fb36d; } .ag.y { background: #f2c94c; } .ag.o { background: #f2994a; } .ag.r { background: #eb5757; } .ag.rr { background: #9b1c1c; }
.pop p { white-space: pre-line; }
.denoms { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin: 8px 0; }
.denom { display: flex; flex-direction: column; align-items: center; gap: 4px; background: #fff; border: 1px solid #dfe6ee; border-radius: 12px; padding: 10px 6px; }
.denom .note { font-size: 20px; font-weight: 700; } .denom input { width: 80px; text-align: center; font-size: 18px; }
.agbar.big { height: 12px; margin: 6px 0 12px; }
.stop.done { opacity: .75; } .stop .chips button, .chip-link { font-size: 14px; } .chip-link { padding: 6px 12px; border-radius: 20px; border: 1px solid #cfd8e3; text-decoration: none; }
.tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tbl { aspect-ratio: 1; border-radius: 16px; border: 2px solid; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 15px; background: #fff; position: relative; }
.tbl b { font-size: 24px; } .tbl small { font-size: 12px; color: #4a5a70; }
.tbl.free { border-color: #2fb36d; background: #f0fbf4; } .tbl.busy { border-color: #f2994a; background: #fff6ec; } .tbl.ready { border-color: #eb5757; background: #fff0f0; animation: pulse 1.4s infinite; }
.tbl i { position: absolute; top: 4px; inset-inline-start: 6px; font-style: normal; font-size: 12px; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(235, 87, 87, .2); } }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.menu-item { padding: 14px 8px; border-radius: 12px; border: 1px solid #dfe6ee; background: #fff; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.st { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: #eef2f6; } .st-n { background: #fff3cd; } .st-s, .st-p { background: #dbeafe; } .st-r { background: #fde2e2; font-weight: 700; } .st-d { background: #dcfce7; }
.kds { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ticket { background: #fff; border-radius: 14px; border-top: 6px solid #2fb36d; padding: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.ticket.warn { border-top-color: #f2c94c; } .ticket.late { border-top-color: #eb5757; }
.kitem { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 0; border-bottom: 1px dashed #e3e8ef; font-size: 16px; }
.kitem.k-ready { opacity: .6; } .kitem small { color: #b45309; }
.jl { position: relative; } .jl .x { position: absolute; top: 6px; inset-inline-end: 6px; }
.mic { margin-top: 8px; } .mic.on { background: #fde2e2; border-color: #eb5757; animation: pulse 1.2s infinite; }
/* camera: the guide rectangle is the part that gets read */
.hidden { display: none !important; }
.cam-frame::after { content: ''; position: absolute; left: 7%; right: 7%; top: 20%; bottom: 20%; border: 3px solid rgba(255, 255, 255, .9); border-radius: 10px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); pointer-events: none; }
.cam-tip { font-size: .85rem; text-align: center; margin: 6px 0; }
.cam-tools { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 6px 0; }
.cam-status { font-weight: 700; margin: 8px 0; padding: 10px; border-radius: 10px; }
.cam-status.wait { background: #eef4ff; color: #1f4fb8; } .cam-status.ok { background: #e7f8ee; color: #137a3d; } .cam-status.bad { background: #fdecec; color: #b42318; font-weight: 600; }
.gcard { width: min(440px, 100%); text-align: center; }
.gimg { width: 170px; height: 170px; object-fit: contain; display: block; margin: 8px auto; border-radius: 12px; background: #fff; border: 1px solid #e3e8f0; }
.gnoimg { display: grid; place-items: center; font-size: 3.5rem; }
.gfacts { text-align: start; margin: 8px 0 12px; } .gfacts .row { padding: 4px 0; border-bottom: 1px dashed #e3e8f0; }
.gcard .btn { width: 100%; margin-top: 8px; } .gattr { display: block; margin-top: 10px; font-size: .78rem; }
.picker-card { margin: 10px 0; text-align: center; }
.pwrap { display: flex; justify-content: center; margin: 8px 0; }
.pimg { width: 180px; height: 180px; object-fit: contain; border-radius: 12px; background: #fff; border: 1px solid #e3e8f0; }
.pph { display: grid; place-items: center; font-size: 3rem; color: #9aa4b2; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.chip { border: 1px solid #c9d6f0; background: #eef4ff; color: #1f4fb8; border-radius: 999px; padding: 6px 12px; font: inherit; cursor: pointer; }
.chips > small { flex-basis: 100%; }

.brand-top { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.brand-top img { background: #fff; border-radius: 8px; padding: 2px; flex: none; }
.login-logo { display: block; margin: 8px auto 0; width: 180px; height: auto; aspect-ratio: 240 / 286; }
.foot-logo { vertical-align: middle; border-radius: 4px; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0; }

/* Owner sign-in / password management */
.password-field{display:flex;align-items:center;gap:8px;direction:ltr}.password-field input{flex:1;min-width:0;width:100%}.password-eye{flex:0 0 48px;min-height:44px;border:1px solid #c9d4e2;border-radius:10px;background:#fff;color:#202c3b;font-size:20px;cursor:pointer}.password-eye:focus-visible{outline:2px solid #123da0;outline-offset:2px}.login-help{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;margin-top:12px}.login-powered{text-align:center;margin:16px 0}

.demo-links{position:sticky;bottom:75px;z-index:10;text-align:center;padding:10px;background:#fff3cd;color:#604000;border:1px solid #e5c85a}.demo-links a{color:#123da0;font-weight:600}.receipt::before{content:"نسخة تجريبية — غير صالحة للبيع";display:block;color:#555;text-align:center;font-weight:bold}

/* Fast scanner — local web UI, not the native Google scanner. */
.cam-layer { background:#101822ed; z-index:100; }
.cam-layer .card { max-height:95dvh; overflow:auto; background:#fff; }
.cam-frame { aspect-ratio:4/3; border-radius:20px; }
.cam-frame .cam { width:100%;height:100%;object-fit:contain; }
.cam-frame::after { left:8%;right:8%;top:21%;bottom:21%;border:0;border-radius:38px;box-shadow:0 0 0 999px #0005; }
.cam-color-ring { position:absolute; z-index:1; inset:20% 7%;border-radius:40px;padding:4px;pointer-events:none;background:conic-gradient(#4285f4 0 25%,#34a853 25% 50%,#fbbc05 50% 75%,#ea4335 75%);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude; }
.cam-line { z-index:2;left:12%;right:12%;background:#c7e6ff;box-shadow:0 0 8px #4285f4;animation:none;top:50%;pointer-events:none; }
.cam-layer .cam-hint { font-weight:600; }

/* 3.10.37 unified web camera */
.smart-scan{position:fixed;inset:0;z-index:20000;background:#101010;color:white;overflow:hidden;display:flex;flex-direction:column;isolation:isolate;direction:rtl}
.smart-frame{position:absolute;inset:0;overflow:hidden;display:grid;place-items:center;background:#101010}
.smart-video{width:100%;height:100%;object-fit:contain;transform-origin:center;transition:transform .18s ease}
.smart-z1{transform:scale(1.5)}.smart-z2{transform:scale(2)}.smart-z3{transform:scale(2.5)}
.smart-guide{position:absolute;inset:31% 10%;border-radius:26px;pointer-events:none;background:linear-gradient(#4285f4,#4285f4) top left/32px 4px,linear-gradient(#4285f4,#4285f4) top left/4px 32px,linear-gradient(#fbbc05,#fbbc05) top right/32px 4px,linear-gradient(#fbbc05,#fbbc05) top right/4px 32px,linear-gradient(#34a853,#34a853) bottom left/32px 4px,linear-gradient(#34a853,#34a853) bottom left/4px 32px,linear-gradient(#ea4335,#ea4335) bottom right/32px 4px,linear-gradient(#ea4335,#ea4335) bottom right/4px 32px;background-repeat:no-repeat}
.smart-top,.smart-bottom{position:relative;z-index:1;padding:16px;display:flex;align-items:center;gap:12px;background:#0009;text-align:center}.smart-top{justify-content:space-between;padding-top:max(16px,env(safe-area-inset-top))}.smart-top strong{flex:1;font-size:1rem}.smart-bottom{margin-top:auto;flex-direction:column;padding-bottom:max(18px,env(safe-area-inset-bottom))}.smart-control{width:44px;height:44px;border:0;border-radius:50%;background:white;color:#202124;font-size:26px;display:grid;place-items:center;padding:0}.smart-control[hidden]{display:none}.smart-status,.smart-note{margin:0;color:#fff;font-size:.9rem}.smart-note{color:#ddd;font-size:.78rem}.smart-zoom{font-size:.85rem;padding:4px 12px;border-radius:30px;background:#0009}

.smart-actions{display:flex;gap:8px;justify-content:center}.smart-action{border:1px solid #aaa;border-radius:8px;background:#222;color:white;padding:8px 12px;font:inherit}

.smart-quick-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:8px}.smart-quick-grid .btn{min-height:48px;display:flex;align-items:center;justify-content:center;gap:8px;margin:0}.smart-quick h2{margin:0 0 12px}.smart-quick-grid .sb-ico{width:22px;height:22px}
/* Candidate C — responsive Smart Workspace, scoped to new screens. */
.smart-search-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(130px,210px) auto;gap:8px;align-items:center}
.smart-search-form .btn{margin:0;min-height:44px}.smart-search-group h3{font-size:.92rem;margin:8px 0;color:var(--sb-dark,#10203a)}.smart-search-group{border-top:1px solid #e3e8ef;padding-top:6px}.smart-search-group .rowbtn{gap:12px;min-height:46px;overflow-wrap:anywhere}.search-detail{display:block}.smart-search-results{max-height:420px;overflow:auto}.smart-search-results .pill{flex-shrink:0}
.smart-sale-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,33%);align-items:start;gap:12px}.smart-sale-side{position:sticky;top:calc(var(--mas-shell-height,70px) + 65px)}.smart-sale-layout h2,.smart-sale-search h2{margin-top:0}.smart-sale-lines .line{box-shadow:none}.smart-sale-lines .line .lname{overflow-wrap:anywhere}.smart-pos-breakdown .row{font-size:.9rem}.smart-sale-side .total{margin-top:10px;gap:8px}.smart-sale-side .total b{font-size:1.4rem}.smart-sale-lines .btn.danger{width:auto;margin-inline-start:auto}.smart-cart .lctl{flex-wrap:wrap}
@media(max-width:740px){.smart-sale-layout{grid-template-columns:minmax(0,1fr)}.smart-sale-side{position:static}.smart-search-form{grid-template-columns:minmax(0,1fr) auto}.smart-search-form input{grid-column:1/-1}.smart-search-form select{min-width:0}.smart-search-form .btn{width:auto}.smart-sale-side .total b{font-size:1.6rem}}
.scanner-sample { background: white; color: black; padding: 16px; max-width: 560px; margin: auto; }
.scanner-sample svg { display: block; width: 100%; max-height: 160px; fill: #000; }
#history { white-space: pre-wrap; overflow-wrap: anywhere; }

.ag.unknown { background: #9ca3af; }
