/* Theme – Kayden 18 Nov 2026: colours after the Le'Pak Pitstop logo sheet (dark espresso brown, cream lettering,
   copper highlights). Every colour is a token here; printing switches back to black on white. */
:root {
  color-scheme: dark;
  --bg: #140c08;            /* page: near-black espresso */
  --surface: #1d120c;       /* bars, sheet headers */
  --card: #251710;          /* cards */
  --field: #1a100a;         /* inputs */
  --ink: #f3e2c0;           /* cream text */
  --muted: #b89f80;
  --line: #3f2b1e;
  --brand: #c9783c;         /* copper */
  --brand-ink: #1a0f08;     /* dark text on copper */
  --head-a: #24130a; --head-b: #5b3018;   /* header gradient */
  --ok: #2f8a4c; --info: #3567cf; --warn: #e0a040; --bad: #ff8f7e;
  --chip: #33261b; --chip-ink: #d9c6a6;
  --ordered-bg: #4a3410; --ordered-ink: #f6c76e;
  --preparing-bg: #1b2f55; --preparing-ink: #a6c6ff;
  --done-bg: #173a21; --done-ink: #8fdfa3;
  --req-bg: #4a1c17; --req-ink: #ffa697;
  --note-bg: #3a2812; --sug-bg: #2d1b10; --ph: #2c1c13;   /* note, suggestion strip, picture placeholder */
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: #e8b57c; }
header.top { background: linear-gradient(115deg, var(--head-a), var(--head-b)); color: var(--ink); border-bottom: 1px solid var(--line); padding: 14px 16px; position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
header.top h1 { margin: 0; font-size: 19px; letter-spacing: .02em; }
header.top .sub { font-size: 14px; opacity: .85; }
header.top a { color: var(--ink); font-size: 14px; }
main { padding: 12px 16px 110px; max-width: 760px; margin: 0 auto; }
h2 { font-size: 16px; margin: 18px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.muted { color: var(--muted); font-size: 14px; }
.big { font-size: 22px; font-weight: 700; }
button, .btn { font: inherit; border: 0; border-radius: 10px; padding: 12px 16px; background: var(--brand); color: var(--brand-ink); font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block; text-align: center; }
button.ghost, .btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); font-weight: 600; }
button.ok { background: var(--ok); color: #fff; }
button.info { background: var(--info); color: #fff; }
button.bad { background: transparent; color: var(--bad); border: 1px solid var(--bad); font-weight: 600; }
button.small { padding: 7px 11px; font-size: 14px; }
button.wide { width: 100%; padding: 15px; font-size: 18px; }
button:disabled { opacity: .45; }
input, select, textarea { font: inherit; width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); color: var(--ink); }
input::placeholder, textarea::placeholder { color: #8a765f; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
label { display: block; font-size: 14px; color: var(--muted); margin: 10px 0 4px; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--chip); color: var(--chip-ink); }
.chip.ordered { background: var(--ordered-bg); color: var(--ordered-ink); }
.chip.preparing { background: var(--preparing-bg); color: var(--preparing-ink); }
.chip.done { background: var(--done-bg); color: var(--done-ink); }
.chip.paid { background: var(--chip); color: var(--chip-ink); }
img.dish { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; background: var(--ph); }
.qty { flex: none; display: flex; align-items: center; gap: 8px; }
.qty button { width: 38px; height: 38px; padding: 0; border-radius: 50%; font-size: 20px; }
.qty span { min-width: 20px; text-align: center; font-weight: 700; }
.bar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); z-index: 6; }
.bar .inner { max-width: 760px; margin: 0 auto; }
.err { color: var(--bad); font-size: 14px; min-height: 20px; margin-top: 6px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 52px; z-index: 4; }
.tabs button { background: transparent; color: var(--ink); border: 1px solid var(--line); padding: 8px 14px; white-space: nowrap; font-weight: 600; }
.tabs button.on { background: var(--ink); color: var(--brand-ink); border-color: var(--ink); }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th, table.list td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); }
table.list th { color: var(--muted); }
table.list td.num, table.list th.num { text-align: right; white-space: nowrap; }
ul.items { list-style: none; margin: 8px 0; padding: 0; }
ul.items li { padding: 3px 0; font-size: 17px; }
ul.items li b { display: inline-block; min-width: 34px; }
.note { background: var(--note-bg); border-left: 3px solid var(--warn); padding: 6px 8px; font-size: 14px; margin: 6px 0; border-radius: 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qrgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.qrcard { text-align: center; }
.qrcard img { width: 170px; height: 170px; border-radius: 6px; }   /* the QR image keeps its own white background */

/* ----- order page: category bar, item rows, item page, cart ----- */
.orderpage header.top { height: 60px; }
.cats { position: sticky; top: 60px; z-index: 4; display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats button { flex: none; background: transparent; color: var(--muted); border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 8px 10px; font-weight: 600; white-space: nowrap; }
.cats button.on { color: var(--ink); border-bottom-color: var(--brand); }
#menu h2 .count { background: var(--chip); color: var(--chip-ink); border-radius: 999px; padding: 1px 8px; font-size: 12px; }
#menu h2 .hours { float: right; text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 400; }
button.item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; color: var(--ink); background: var(--card); font-weight: 400; }
button.item .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
button.item .desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; }
button.item .plus { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-size: 22px; font-weight: 700; line-height: 36px; text-align: center; }
button.item.off { opacity: .5; }
button.item img.dish { width: 76px; height: 76px; }
body.lock { overflow: hidden; }
.sheet { position: fixed; inset: 0; z-index: 20; background: var(--bg); display: flex; flex-direction: column; }
.sheethead { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: linear-gradient(115deg, var(--head-a), var(--head-b)); border-bottom: 1px solid var(--line); font-size: 17px; }
.sheethead b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheethead .x { flex: none; width: 40px; height: 40px; padding: 0; border-radius: 50%; font-size: 18px; border-color: #7a563c; }
.sheetbody { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; max-width: 760px; width: 100%; margin: 0 auto; }
.sheetfoot { background: var(--surface); border-top: 1px solid var(--line); padding: 8px 16px calc(12px + env(safe-area-inset-bottom)); }
.sheetfoot > * { max-width: 728px; margin-left: auto; margin-right: auto; }
.sheetfoot .err { min-height: 18px; margin: 0 auto 6px; }
.sheetfoot .qty button { width: 42px; height: 42px; }
img.hero { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--ph); }
.pad { padding: 14px 16px; background: var(--card); }
.group { background: var(--card); margin-top: 8px; padding: 14px 16px; }
.grouphead { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.chip.req { background: var(--req-bg); color: var(--req-ink); }
label.choice { display: flex; align-items: center; gap: 12px; margin: 0; padding: 13px 0; font-size: 16px; color: var(--ink); border-bottom: 1px solid var(--line); }
label.choice:last-child { border-bottom: 0; }
label.choice input { width: 22px; height: 22px; flex: none; padding: 0; accent-color: var(--brand); }
label.choice span:nth-of-type(1) { flex: 1; }
.group.sug { background: var(--sug-bg); }
.sugrow { display: flex; gap: 10px; overflow-x: auto; padding-top: 10px; scrollbar-width: none; }
.sugrow::-webkit-scrollbar { display: none; }
.sugcard { flex: none; width: 136px; padding: 0 0 8px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; gap: 3px; text-align: left; font-weight: 400; }
.sugcard img, .sugcard .noimg { width: 100%; height: 96px; object-fit: cover; background: var(--ph); display: flex; align-items: center; justify-content: center; font-size: 34px; }
.sugcard b, .sugcard .muted, .sugcard .add { padding: 0 8px; font-size: 14px; }
.sugcard .add { color: var(--brand); font-weight: 700; margin-top: auto; }
.group textarea { margin-top: 8px; resize: none; }
.cartline { padding: 12px 0; border-bottom: 1px solid var(--line); }
ul.items .sub2 { padding-left: 38px; font-size: 14px; }

/* ----- cashier: item tick boxes (Temporarily Unavailable / Sold Out / Coming Soon) ----- */
.stockrow.hiddenitem { opacity: .55; }
.stockrow.marked { border-color: var(--req-ink); }
.stockboxes { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 6px; margin-top: 10px; }
.stockbox { display: flex; align-items: center; gap: 6px; padding: 9px 8px; min-width: 0; background: transparent; color: var(--ink); border: 1px solid var(--line); font-weight: 600; font-size: 13px; line-height: 1.2; text-align: left; }
.stockbox .box { flex: none; width: 22px; height: 22px; border: 2px solid var(--muted); border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 900; line-height: 1; }
.stockbox.on { background: var(--req-bg); border-color: var(--req-ink); color: var(--req-ink); }
.stockbox.on .box { border-color: var(--req-ink); background: var(--req-ink); color: #2a0d09; }
/* customer menu: an item that cannot be ordered */
.chip.na { background: var(--req-bg); color: var(--req-ink); align-self: flex-start; margin-top: 2px; }
button.item.na .plus { background: var(--chip); color: var(--muted); }
img.hero.na { filter: grayscale(1) brightness(.6); }

/* ----- cashier: cash payment screen ----- */
.cashquick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cashquick button { flex: 1 1 28%; padding: 12px 6px; }
.cashchange { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding: 16px; border-radius: 12px; background: var(--field); border: 1px solid var(--line); }
.cashchange b { font-size: 30px; }
.cashchange.ok { background: var(--done-bg); border-color: var(--done-bg); color: var(--done-ink); }
.cashchange.short { background: var(--req-bg); border-color: var(--req-bg); color: var(--req-ink); }

.alertbar { background: #c62828; color: #fff; font-weight: 700; font-size: 18px; text-align: center; padding: 14px; border-radius: 12px; margin-bottom: 10px; animation: lkflash 1s steps(2, start) infinite; }
@keyframes lkflash { to { background: #f59e0b; color: #1f2328; } }
.hide { display: none !important; }

/* Paper: black on white, whatever the screen theme is. */
@media print {
  :root {
    color-scheme: light;
    --bg: #fff; --surface: #fff; --card: #fff; --field: #fff; --ink: #111; --muted: #555; --line: #ccc;
    --chip: #eee; --chip-ink: #333; --note-bg: #f5f5f5; --ph: #eee;
  }
  a { color: #111; }
  header.top, .tabs, .noprint, .bar { display: none !important; }
  body { background: #fff; }
  main { padding: 0; max-width: none; }
  .card { break-inside: avoid; }
}

/* ----- cashier: discount screen (20 Nov 2026) ----- */
.discrow { display: grid; grid-template-columns: 1fr 84px 96px; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.discrow select, .discrow input { width: 100%; margin: 0; }
.discrow input { text-align: right; }
.discsum { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--field); border: 1px solid var(--line); }
.discsum .row { padding: 3px 0; }
.discnote { color: var(--done-ink); background: var(--done-bg); border-radius: 8px; padding: 4px 8px; margin-top: 6px; font-size: 14px; display: inline-block; }

/* ----- Dine In / Take Away (20 Nov 2026) ----- */
.typepick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.typepick button { padding: 14px 6px; font-size: 17px; background: var(--field); color: var(--ink); border: 2px solid var(--line); }
.typepick button.on { border-color: var(--accent, #c98a4b); background: var(--req-bg); color: var(--req-ink); }
.takeaway { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: var(--req-bg); color: var(--req-ink); font-weight: 800; font-size: 20px; text-align: center; }
.takeaway.small { display: inline-block; font-size: 14px; padding: 3px 10px; margin: 4px 0; }

/* ----- cashier: split bill (20 Nov 2026) ----- */
.splitperson { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 10px; text-align: left; margin-top: 8px; padding: 12px 14px; background: var(--field); color: var(--ink); border: 2px solid var(--line); }
.splitperson.on { border-color: #c98a4b; background: var(--done-bg); color: var(--done-ink); }
.splitperson small { font-weight: 400; opacity: .85; }

/* Kitchen: one Done button per food item (24 Nov 2026) */
ul.items li.itemrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
ul.items li.itemrow .itemtxt { flex: 1; }
ul.items li.itemrow button.itemdone { flex: none; min-width: 84px; padding: 10px 14px; font-size: 16px; }
