/* Thai Tea POS v1 — mobile-first */
:root {
  --bg: #f6f3ec; --card: #fff; --ink: #2b2118; --muted: #8a7a66;
  --brand: #c97b2d; --brand-d: #a86420; --green: #2e7d4f; --red: #c0392b;
  --line: #e8dfd0; --radius: 12px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { margin: 0; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 16px; }
header.top { background: var(--brand); color: #fff; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 10; }
header.top h1 { font-size: 18px; margin: 0; }
header.top .sub { font-size: 12px; opacity: .9; }
main { padding: 12px 12px 90px; max-width: 720px; margin: 0 auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin-bottom: 12px; }
.card h3 { margin: 0 0 10px; font-size: 16px; }
.muted { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 8px; align-items: center; }
.grow { flex: 1; }
button, .btn { font-size: 16px; border: none; border-radius: 10px; padding: 14px 16px;
  cursor: pointer; background: var(--brand); color: #fff; font-weight: 600; min-height: 52px; }
button:active { transform: scale(.98); }
button.secondary { background: #efe7d8; color: var(--ink); }
button.danger { background: var(--red); }
button.green { background: var(--green); }
button.small { padding: 8px 12px; min-height: 40px; font-size: 14px; }
button:disabled { opacity: .5; }
input, select, textarea { font-size: 16px; padding: 12px; border: 1px solid var(--line);
  border-radius: 10px; width: 100%; margin: 4px 0 10px; background: #fff; color: var(--ink); }
label { font-size: 13px; color: var(--muted); font-weight: 600; }
.menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.menu-btn { background: var(--card); border: 2px solid var(--line); color: var(--ink);
  border-radius: var(--radius); padding: 16px 8px; text-align: center; min-height: 84px; }
.menu-btn .nm { font-weight: 700; font-size: 15px; display: block; }
.menu-btn .pr { color: var(--brand-d); font-weight: 700; }
.cart-item { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.qty-btn { width: 44px; height: 44px; min-height: 44px; padding: 0; font-size: 20px; border-radius: 8px; }
.total-bar { position: sticky; bottom: 70px; background: var(--ink); color: #fff;
  border-radius: var(--radius); padding: 12px 16px; display: flex;
  justify-content: space-between; align-items: center; margin-top: 12px; }
.total-bar .t { font-size: 22px; font-weight: 800; }
nav.bottom { position: fixed; bottom: 0; left: 0; right: 0; background: var(--card);
  border-top: 1px solid var(--line); display: flex; z-index: 10; }
nav.bottom a { flex: 1; text-align: center; padding: 12px 4px 14px; color: var(--muted);
  text-decoration: none; font-size: 12px; font-weight: 600; }
nav.bottom a.on { color: var(--brand-d); }
nav.bottom .ic { font-size: 20px; display: block; }
.badge { background: var(--red); color: #fff; border-radius: 999px; font-size: 11px;
  padding: 2px 8px; margin-left: 6px; }
.prog { height: 10px; background: #eee; border-radius: 99px; overflow: hidden; margin: 6px 0; }
.prog > div { height: 100%; background: var(--green); }
.prog.low > div { background: var(--brand); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
table.tbl th { color: var(--muted); font-size: 12px; }
.low-stock { color: var(--red); font-weight: 700; }
.receipt { background: #fff; border: 1px dashed var(--muted); border-radius: 8px;
  padding: 16px; font-family: monospace; font-size: 14px; }
.receipt h4 { text-align: center; margin: 0 0 8px; font-family: inherit; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; }
.tabs button { white-space: nowrap; }
.alert { background: #fdecea; border: 1px solid #f5c6c0; color: #a93226;
  padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; font-size: 14px; }
.okmsg { background: #e8f5e9; border: 1px solid #a5d6a7; color: #2e7d4f;
  padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; font-size: 14px; }
.bar-chart { display: flex; align-items: flex-end; gap: 2px; height: 90px; margin-top: 8px; }
.bar-chart .b { flex: 1; background: var(--brand); border-radius: 3px 3px 0 0; min-height: 2px; }
.pin-input { font-size: 28px !important; text-align: center; letter-spacing: 8px; }
.center { text-align: center; }
.qr-img { max-width: 260px; width: 100%; display: block; margin: 10px auto; border: 1px solid var(--line); border-radius: 8px; }
.kv { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: none; }
