/* Big buttons, plain words, high contrast — made for cheap Android phones in bright shops. */
:root { --g: #0b6b3a; --g2: #e7f4ec; --r: #b42318; --r2: #fdecea; --y: #fff4d6; --ink: #1d2433; --mut: #667085; --line: #e4e7ec; --bg: #f4f5f7; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.4 system-ui, -apple-system, Roboto, sans-serif; }
header { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; background: var(--g); color: #fff; padding: 10px 12px; }
header h1 { flex: 1; font-size: 19px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back { background: none; border: 0; color: #fff; font-size: 34px; line-height: 1; padding: 0 8px; }
.logo { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 18px; background: var(--g); color: #fff; font-weight: 800; font-size: 28px; }
.logo.sm { width: 34px; height: 34px; font-size: 14px; border-radius: 9px; background: #fff; color: var(--g); }
.syncchip { border: 0; border-radius: 999px; padding: 6px 10px; font: inherit; font-size: 14px; background: rgba(255,255,255,.18); color: #fff; }
.syncchip.error, .syncchip.offline { background: #fbbf24; color: #3b2a00; }
main { padding: 12px; max-width: 640px; margin: 0 auto; padding-bottom: 60px; }
h2 { margin: 8px 0 12px; } h3 { margin: 14px 0 8px; font-size: 18px; }
.center { text-align: center; padding: 28px 16px; max-width: 520px; margin: 0 auto; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 16px; min-height: 100px; font: inherit; font-weight: 600; font-size: 17px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--ink); }
.tile .ic { font-size: 34px; }
.tile:active, .btn:active, .ptile:active { transform: scale(.97); }
.btn { display: block; width: 100%; background: var(--g); color: #fff; border: 0; border-radius: 12px; padding: 14px; font: inherit; font-weight: 600; margin: 8px 0; text-align: center; text-decoration: none; }
.btn.big { padding: 18px; font-size: 19px; }
.btn.ghost { background: #fff; color: var(--g); border: 2px solid var(--g); }
.btn.danger { color: var(--r); border-color: var(--r); }
.btn[disabled] { opacity: .45; }
.btn.wide, input.wide { width: 100%; }
.row { display: flex; gap: 10px; } .row > * { flex: 1; }
label { display: block; font-size: 15px; color: var(--mut); margin: 10px 0; }
input, select { display: block; width: 100%; font: inherit; font-size: 18px; padding: 12px; border: 1.5px solid #cfd4dc; border-radius: 10px; margin-top: 4px; background: #fff; color: var(--ink); }
input:focus, select:focus { outline: 3px solid #9fd6b6; border-color: var(--g); }
.big-input { font-size: 28px; font-weight: 700; padding: 14px; text-align: center; }
.hint { color: var(--mut); font-size: 15px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 10px 0; }
.card.warn { border-color: var(--r); background: var(--r2); }
.alert { display: block; width: 100%; text-align: left; border: 0; border-radius: 12px; padding: 12px 14px; margin: 0 0 8px; font: inherit; font-weight: 600; background: var(--y); color: #6a4a00; }
.alert.good { background: var(--g2); color: var(--g); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chips.three { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.chip { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 10px 14px; font: inherit; font-size: 16px; color: var(--ink); }
.chip.big { border-radius: 14px; padding: 16px 6px; font-weight: 700; }
.chip.on { border-color: var(--g); background: var(--g2); color: var(--g); font-weight: 700; }
.searchbar { display: flex; gap: 8px; } .searchbar input { margin: 0; } .searchbar .btn { width: auto; margin: 0; padding: 0 16px; }
.ptiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; max-height: 42vh; overflow-y: auto; }
.ptile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; min-height: 82px; font: inherit; font-size: 14px; display: flex; flex-direction: column; gap: 2px; color: var(--ink); }
.ptile b { font-size: 15px; line-height: 1.2; } .ptile span { color: var(--g); font-weight: 700; } .ptile small { color: var(--mut); }
.ptile.out { opacity: .55; }
.cart { background: #fff; border-radius: 14px; border: 1px solid var(--line); padding: 8px 12px; }
.cline, .lrow, .rrow { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.cline > span:first-child, .lrow > span:first-child, .rrow > span:first-child { flex: 1; }
.lrow small { color: var(--mut); }
.btnrow { width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 12px; margin: 6px 0; font: inherit; color: var(--ink); text-align: left; }
.mini { min-width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 18px; }
.amt { min-width: 90px; text-align: right; font-weight: 600; }
.crow { display: flex; gap: 6px; } .crow .btn { padding: 10px 4px; font-size: 14px; }
.total { display: flex; justify-content: space-between; font-size: 20px; padding: 10px 0; } .total b { font-size: 26px; }
.paybar { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; } .btn.pay { margin: 0; padding: 18px 4px; font-size: 17px; }
.rrow b { font-variant-numeric: tabular-nums; } .rrow.strong { font-weight: 700; } .rrow.bad b, .bad { color: var(--r); } .rrow.good b, .good { color: var(--g); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; } .kv span { color: var(--mut); }
.plines .pline, .pline { display: grid; grid-template-columns: 1fr 64px 96px; gap: 6px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pline input { margin: 0; padding: 10px 8px; font-size: 16px; }
.plines .pline .amt { grid-column: 1 / 3; text-align: left; color: var(--mut); font-weight: 500; }
.plines .pline .mini { justify-self: end; }
.pline small.new { grid-column: 1 / -1; color: #9a6700; }
.pline > span:first-child { grid-column: 1 / 3; } .pline > span small { color: var(--mut); }
.attach { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.attach img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.attach .btn { width: auto; flex: 1; }
.pill { background: var(--g2); border-radius: 10px; padding: 8px 10px; margin: 6px 0; display: flex; justify-content: space-between; }
.pill button { border: 0; background: none; font-size: 16px; }
.steps { display: flex; gap: 6px; justify-content: center; margin: 14px 0 0; }
.steps span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #e4e7ec; font-size: 14px; }
.steps .on { background: var(--g); color: #fff; } .steps .done { background: var(--g2); color: var(--g); }
.wiz { max-width: 560px; margin: 0 auto; padding: 0 14px 40px; }
.check { width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--g); background: #fff; font-size: 20px; color: #fff; }
.check.on { background: var(--g); }
.code { font-size: 26px; letter-spacing: 4px; }
.receipt.voided { opacity: .6; }
.modal { position: fixed; inset: 0; background: rgba(16,24,40,.5); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: #fff; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 16px 16px 26px; }
.pin-dots { font-size: 34px; letter-spacing: 10px; text-align: center; min-height: 48px; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0; }
.key { height: 66px; border-radius: 14px; border: 1px solid var(--line); background: #f9fafb; font-size: 26px; font-weight: 700; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1d2433; color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 99; font-weight: 600; max-width: 90vw; }
.toast.bad { background: var(--r); }
.scan-overlay { position: fixed; inset: 0; background: #000; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; padding: 16px; }
.scan-overlay video { width: 100%; max-height: 70vh; object-fit: cover; }
.scan-overlay .scan-box { position: absolute; width: 70%; height: 22%; border: 3px solid #4ade80; border-radius: 12px; top: 30%; }
.scan-overlay .card { color: var(--ink); width: 100%; max-width: 420px; }

/* ===== Fix round 1: descriptive text, notices, alerts, counter-PC layout ===== */
.explain { background: #eef6ff; color: #1e3a5f; border-radius: 10px; padding: 10px 12px; font-size: 15px; margin: 4px 0 10px; line-height: 1.45; }
.btn .sub, .chip .sub { display: block; font-weight: 400; font-size: 13px; opacity: .85; margin-top: 3px; line-height: 1.3; }
.fhelp { display: block; color: var(--mut); font-size: 13px; margin: -6px 0 8px; }
.tile small { font-weight: 400; font-size: 12.5px; color: var(--mut); padding: 0 8px; line-height: 1.25; text-align: center; }
.alert.bad { background: var(--r2); color: var(--r); }
p.alert { display: block; }
.notice { background: #fff8e1; border: 2px solid #f5c542; border-radius: 14px; padding: 12px 14px; margin: 0 0 10px; }
.notice p { margin: 6px 0; } .notice small { color: var(--mut); display: block; }
.ticks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } .ticks span { font-size: 13px; padding: 3px 8px; border-radius: 999px; background: #f2f4f7; color: var(--mut); }
.ticks span.on { background: var(--g2); color: var(--g); font-weight: 600; }
.asline { grid-column: 1 / -1; margin: 0; font-size: 13px; } .asline select { font-size: 15px; padding: 8px; }
.carttitle { margin: 4px 0; }

/* Counter computer (Windows PC, mouse + keyboard, USB scanner): wider pages, two-column till */
@media (min-width: 900px) {
  main { max-width: 1180px; }
  .grid { grid-template-columns: repeat(4, 1fr); }
  .sellwrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
  .sellright { position: sticky; top: 70px; }
  .ptiles { grid-template-columns: repeat(4, 1fr); max-height: calc(100vh - 220px); }
  .sheet { border-radius: 18px; margin-bottom: 6vh; }
  .modal { align-items: center; }
  .tile { min-height: 110px; cursor: pointer; } .btn, .ptile, .chip, .key { cursor: pointer; }
}
