/* NEXA cashier app — layout */
body { overflow: hidden; }
#app { height: 100vh; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 8px 16px; color: #fff; flex: none; }
.topbar .logo { color: #fff; font-size: 18px; }
.topbar .logo small { color: #9fb6e6; }
.top-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #3fcf8e; box-shadow: 0 0 0 3px rgba(63,207,142,.25); }
.pill.off .dot { background: #ff6b5e; box-shadow: 0 0 0 3px rgba(255,107,94,.25); }
.pill button { background: none; border: 0; color: inherit; cursor: pointer; padding: 0; font: inherit; }
.top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.topbar .btn { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); color: #fff; box-shadow: none; padding: 6px 12px; font-size: 13px; }
.topbar .btn:hover { background: rgba(255,255,255,.2); }

.main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(400px, 36%) 1fr; gap: 14px; padding: 14px; }
.cart-panel { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.scan-row { display: flex; gap: 8px; padding: 12px; border-bottom: 1px solid var(--steel-200); background: var(--steel-50); }
.scan-input { position: relative; flex: 1; }
.scan-input svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--blue-500); }
.scan-input input { padding-left: 42px; font-weight: 600; letter-spacing: .02em; }
.mult-badge { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.cust-strip { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--steel-200); font-size: 13px; }
.cust-strip.has { background: linear-gradient(90deg, var(--blue-50), #fff); }
.cust-strip .grow b { display: block; font-size: 14px; }
.lines { flex: 1; overflow: auto; }
.line { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 14px; border-bottom: 1px solid var(--steel-100); cursor: pointer; }
.line:hover { background: var(--blue-50); }
.line.sel { background: var(--blue-100); }
.line .nm { font-weight: 600; line-height: 1.25; }
.line .sub { grid-column: 1; font-size: 12px; color: var(--steel-600); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.line .amt { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.line .amt s { display: block; font-weight: 500; font-size: 12px; color: var(--steel-500); }
.line .qtyctl { grid-column: 2; display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.qbtn { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--steel-300); background: var(--metal-chrome); font-weight: 700; cursor: pointer; line-height: 1; }
.qbtn:active { transform: scale(.94); }
.line .qv { min-width: 34px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.promo-tag { color: #fff; background: var(--ok); font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.promo-tag.bad { background: var(--bad); }
.cart-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--steel-500); padding: 24px; text-align: center; }
.cart-empty svg { width: 54px; height: 54px; opacity: .5; }

.totals { border-top: 1px solid var(--steel-200); padding: 10px 14px; background: var(--steel-50); font-size: 13.5px; }
.totals .tr { display: flex; justify-content: space-between; padding: 2px 0; font-variant-numeric: tabular-nums; }
.totals .tr.disc { color: var(--ok); font-weight: 600; }
.totals .grand { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; padding-top: 8px; border-top: 2px solid var(--blue-900); }
.totals .grand span { font-weight: 700; font-size: 14px; color: var(--steel-600); letter-spacing: .06em; text-transform: uppercase; }
.totals .grand b { font-family: var(--font-head); font-size: 32px; color: var(--blue-900); font-variant-numeric: tabular-nums; }
.earn { margin-top: 4px; font-size: 12px; color: var(--blue-700); font-weight: 600; }
.cart-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 10px 12px 0; background: var(--steel-50); }
.cart-actions .btn { flex-direction: column; gap: 3px; padding: 8px 4px; font-size: 11.5px; }
.pay-row { padding: 10px 12px 12px; background: var(--steel-50); }
.pay-btn { width: 100%; font-size: 20px; padding: 16px; letter-spacing: .04em; }

.browse { display: flex; flex-direction: column; min-height: 0; gap: 12px; }
.browse-head { display: flex; gap: 10px; align-items: center; }
.cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; flex: none; }
.cat { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--steel-300); background: var(--metal-chrome); font-weight: 600; cursor: pointer; white-space: nowrap; color: var(--blue-900); }
.cat.on { background: var(--metal-blue); color: #fff; border-color: #1d4290; text-shadow: 0 -1px 0 rgba(0,0,0,.25); }
.cat svg { width: 17px; height: 17px; }
.grid { flex: 1; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-content: start; padding: 2px 4px 8px 2px; }
.tile { position: relative; background: #fff; border: 1px solid var(--steel-200); border-radius: 14px; padding: 10px 10px 10px; cursor: pointer; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 6px; min-height: 112px; text-align: left; overflow: hidden; transition: transform .08s, box-shadow .15s; }
.tile::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 5px; background: var(--c, var(--blue-500)); }
.tile:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.tile:active { transform: scale(.98); }
.tile .ti { color: var(--c, var(--blue-500)); margin-top: 4px; }
.tile .tn { font-weight: 600; font-size: 13px; line-height: 1.25; flex: 1; }
.tile .tp { font-family: var(--font-head); font-weight: 700; font-size: 16px; color: var(--blue-900); }
.tile .tp small { font-family: var(--font); font-weight: 600; font-size: 11px; color: var(--steel-500); }
.tile .tg { position: absolute; top: 12px; right: 8px; display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }
.tile.oos { opacity: .55; }
.fnbar { display: flex; gap: 8px; flex-wrap: wrap; flex: none; }
.fnbar .btn { font-size: 12.5px; padding: 8px 12px; }
.fnbar kbd { margin-left: 2px; }

/* payment */
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pay-big { text-align: center; padding: 10px 0 14px; }
.pay-big small { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--steel-600); font-weight: 700; }
.pay-big b { font-family: var(--font-head); font-size: 40px; color: var(--blue-900); }
.tenders { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tenders .btn { padding: 14px 8px; flex-direction: column; font-size: 13px; }
.applied { margin: 10px 0; border: 1px solid var(--steel-200); border-radius: 12px; overflow: hidden; }
.applied div { display: flex; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--steel-100); font-size: 13.5px; align-items: center; }
.applied div:last-child { border: 0; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keypad .btn { padding: 16px 0; font-size: 20px; font-family: var(--font-head); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.chg { margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--blue-50); border: 1px dashed var(--blue-300); text-align: center; }
.chg b { font-family: var(--font-head); font-size: 28px; color: var(--blue-700); }

/* receipt */
.rcpt { width: 300px; margin: 0 auto; background: #fff; color: #000; font-family: 'Courier New', ui-monospace, monospace; font-size: 12px; line-height: 1.35; padding: 14px 12px; border: 1px solid var(--steel-200); }
.rcpt .c { text-align: center; } .rcpt .b { font-weight: 700; } .rcpt hr { border: 0; border-top: 1px dashed #000; margin: 6px 0; }
.rcpt .r { display: flex; justify-content: space-between; gap: 8px; } .rcpt .ind { padding-left: 10px; color: #333; }
.rcpt .big { font-size: 16px; font-weight: 700; }
.rcpt svg { max-width: 100%; height: auto; }

.lock { position: fixed; inset: 0; z-index: 900; }
.pinpad { width: 260px; margin: 8px auto 0; }
.pindots { display: flex; gap: 12px; justify-content: center; margin: 4px 0 14px; height: 18px; }
.pindots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--blue-400); }
.pindots i.on { background: var(--metal-blue); }
.help-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; }
.help-list div { display: flex; justify-content: space-between; }
@media (max-width: 980px) { .main { grid-template-columns: 1fr; overflow: auto; } body { overflow: auto; } #app { height: auto; min-height: 100vh; } .cart-panel { min-height: 560px; } .pay-grid { grid-template-columns: 1fr; } }
