/* ============================================================
   Hungry Paddle Café — interface styles
   ============================================================ */

/* Colours come from the Hungry Paddle Café logo: the forest-green ring
   (#283b1d) is the accent, the coffee-brown paddles (#533115) the second
   colour, on warm off-white. */
:root {
  --bg: #f5f4ef;
  --surface: #ffffff;
  --surface-2: #fafaf6;
  --surface-3: #eeefe7;
  --line: #e2e3d9;
  --line-strong: #cfd2c4;
  --ink: #1b2116;
  --ink-2: #414838;
  --muted: #7c8272;
  --accent: #283b1d;
  --accent-ink: #ffffff;
  --accent-soft: #e8eee1;
  --brown: #533115;
  --brown-soft: #f3ebe3;
  --good: #2f7d55;
  --good-soft: #e6f2ea;
  --warn: #96690a;
  --warn-soft: #fbf0d8;
  --bad: #a52f26;
  --bad-soft: #fbe9e7;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(29, 26, 23, .05), 0 8px 24px -12px rgba(29, 26, 23, .18);
  --shadow-lg: 0 24px 60px -20px rgba(29, 26, 23, .35);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11140f;
    --surface: #191d16;
    --surface-2: #1f241b;
    --surface-3: #272d22;
    --line: #30372a;
    --line-strong: #414a3a;
    --ink: #eef1e8;
    --ink-2: #c8cebe;
    --muted: #8e9685;
    --accent: #9cc27f;
    --accent-ink: #10150c;
    --accent-soft: #243021;
    --brown: #d0a47c;
    --brown-soft: #30251c;
    --good: #6bbd8c;
    --good-soft: #1f2f26;
    --warn: #d9b25c;
    --warn-soft: #322a17;
    --bad: #e08a80;
    --bad-soft: #33201e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .7);
  }
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- app frame ---------- */
#app { display: flex; min-height: 100vh; }

.sidebar {
  width: 236px;
  flex: 0 0 236px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
}
.brand-mark {
  width: 42px; height: 42px; flex: 0 0 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  overflow: hidden;
  background: #fff; /* the logo is a white-centred badge — keep it that way in dark mode */
  box-shadow: 0 0 0 1px var(--line);
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.auth-logo { display: block; width: 112px; height: 112px; margin: 0 auto 14px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.brand-name { font-weight: 650; font-size: 14px; line-height: 1.15; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }

.nav { padding: 10px; overflow-y: auto; flex: 1; min-height: 0; } /* min-height lets it scroll on short tablet screens */
.nav-group { font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding: 14px 10px 6px; font-weight: 600; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; margin-bottom: 1px;
  border-radius: var(--radius-sm);
  text-decoration: none; color: var(--ink-2);
  font-weight: 500;
}
.nav a:hover { background: var(--surface-3); color: var(--ink); }
.nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav a .ico { width: 18px; text-align: center; opacity: .85; font-size: 15px; }
.nav a .badge { margin-left: auto; }

.sidebar-foot { padding: 12px 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 17px; }
.topbar .sub { color: var(--muted); font-size: 12.5px; }
.topbar .spacer { flex: 1; }
.topbar .menu-toggle { display: none; }

.content { padding: 22px 24px 60px; flex: 1; }

/* ---------- generic bits ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; border-bottom: 1px solid var(--line);
}
.card-head h3 { font-size: 13.5px; }
.card-head .spacer { flex: 1; }
.card-body { padding: 16px; }
.card-body.tight { padding: 0; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.stack { display: flex; flex-direction: column; gap: 3px; }
.mt { margin-top: 16px; }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .label { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.stat .value { font-size: 24px; font-weight: 650; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .foot { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 7px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px; font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none; /* buttons that are links */
  transition: background .12s, border-color .12s, transform .05s;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn.lg { padding: 11px 18px; font-size: 14.5px; }
.btn.block { width: 100%; }

/* form controls */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: .03em; text-transform: uppercase; }
input:not([type]), input[type=text], input[type=password], input[type=number], input[type=date], input[type=time],
input[type=datetime-local], input[type=search], input[type=email], input[type=tel], select, textarea {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
textarea { resize: vertical; min-height: 64px; }
.form-grid { display: grid; gap: 13px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }

/* tables */
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; padding: 9px 14px;
  border-bottom: 1px solid var(--line); background: var(--surface-2);
  position: sticky; top: 0;
}
table.data td { padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; border-radius: 0 0 var(--radius) var(--radius); }

/* pills */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
  background: var(--surface-3); color: var(--ink-2);
  white-space: nowrap;
}
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad  { background: var(--bad-soft);  color: var(--bad); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.badge { background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 10.5px; font-weight: 700; padding: 1px 7px; }

.empty { padding: 34px 20px; text-align: center; color: var(--muted); }
.empty .big { font-size: 26px; margin-bottom: 6px; opacity: .55; }

/* tabs / segmented control */
.seg { display: inline-flex; background: var(--surface-3); border-radius: var(--radius-sm); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button {
  border: 0; background: transparent; padding: 5px 11px; border-radius: 5px;
  cursor: pointer; font-size: 12.5px; font-weight: 550; color: var(--muted);
}
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* The coffee/drinks/food row is the first thing a barista hits on a tablet,
   so its targets are finger-sized rather than pointer-sized. */
.seg-lg button { padding: 9px 18px; font-size: 14px; }
.seg-lg button.on { color: var(--accent); }

/* ---------- POS ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 10px; }
.menu-card {
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius);
  padding: 11px 12px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 3px;
  min-height: 78px; transition: border-color .12s, transform .06s, box-shadow .12s;
}
.menu-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.menu-card:active { transform: scale(.985); }
.menu-card .name { font-weight: 600; font-size: 13px; line-height: 1.25; }
.menu-card .desc { font-size: 11px; color: var(--muted); line-height: 1.3; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.menu-card .price { font-weight: 650; font-size: 13px; color: var(--brown); font-variant-numeric: tabular-nums; }

.cart { position: sticky; top: 82px; display: flex; flex-direction: column; max-height: calc(100vh - 104px); }
.cart-lines { overflow-y: auto; flex: 1; min-height: 90px; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.cart-line .nm { font-weight: 550; font-size: 13px; }
.cart-line .lt { font-variant-numeric: tabular-nums; font-weight: 600; }
.qty { display: inline-flex; align-items: center; gap: 6px; }
.qty button {
  width: 22px; height: 22px; border-radius: 5px; border: 1px solid var(--line-strong);
  background: var(--surface); cursor: pointer; line-height: 1; display: grid; place-items: center; font-size: 13px;
}
.qty button:hover { background: var(--surface-3); }
.qty .n { min-width: 20px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.totals { padding: 12px 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.totals .line { display: flex; justify-content: space-between; }
.totals .grand { font-size: 19px; font-weight: 700; padding-top: 6px; border-top: 1px dashed var(--line-strong); margin-top: 4px; }

/* ---------- charts ---------- */
.bars { display: flex; align-items: flex-end; gap: 5px; height: 130px; padding: 4px 0; }
.bars .bar { flex: 1; background: var(--brown); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .82; position: relative; }
.bars .bar:hover { opacity: 1; }
.bars .bar[data-today="1"] { background: var(--accent); opacity: 1; }
.axis { display: flex; gap: 5px; margin-top: 5px; }
.axis span { flex: 1; text-align: center; font-size: 9.5px; color: var(--muted); overflow: hidden; }

.meter { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--good); }
.meter > i.low { background: var(--warn); }
.meter > i.out { background: var(--bad); }

/* ---------- reservations grid ---------- */
.res-day { display: grid; gap: 10px; }
.res-table-row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.res-table-row:last-child { border-bottom: 0; }
.res-slots { display: flex; gap: 7px; flex-wrap: wrap; }
.res-chip {
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 5px 9px; font-size: 12px; background: var(--surface-2); cursor: pointer; text-align: left;
}
.res-chip:hover { border-color: var(--accent); }
.res-chip b { display: block; font-size: 12.5px; }
.res-chip.seated { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }
.res-chip.cancelled, .res-chip.no_show { opacity: .5; text-decoration: line-through; }

/* ---------- modal ---------- */
dialog.modal {
  border: 1px solid var(--line); border-radius: 12px; padding: 0;
  background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-lg); width: min(560px, calc(100vw - 32px));
}
dialog.modal::backdrop { background: rgba(20, 16, 12, .45); backdrop-filter: blur(2px); }
dialog.modal .m-head { padding: 15px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
dialog.modal .m-head h3 { font-size: 15px; }
dialog.modal .m-body { padding: 18px; max-height: 66vh; overflow-y: auto; }
dialog.modal .m-foot { padding: 13px 18px; border-top: 1px solid var(--line); display: flex; gap: 9px; justify-content: flex-end; background: var(--surface-2); border-radius: 0 0 12px 12px; }
dialog.modal.wide { width: min(820px, calc(100vw - 32px)); }

/* toast */
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast {
  background: var(--ink); color: var(--bg); padding: 10px 15px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); font-size: 13px; font-weight: 500; max-width: 340px;
  animation: rise .18s ease-out;
}
.toast.bad { background: var(--bad); color: #fff; }
.toast.good { background: var(--good); color: #fff; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* receipt */


[hidden] { display: none !important; }

/* sign-in */
#auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--bg); }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 24px; }
.auth-card input { font-size: 16px; } /* no zoom-on-focus on phones */
#auth-error { color: var(--bad); min-height: 20px; margin: 10px 0 6px; }

/* account box in the sidebar */
.user-line { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.user-name { font-weight: 600; color: var(--ink); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* notices */
.notice {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 14px; margin-bottom: 14px; font-size: 13px;
}
.notice .spacer { flex: 1; }
.notice.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, var(--line)); color: var(--ink); }
.notice.bad  { background: var(--bad-soft);  border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); color: var(--ink); }

/* variance */
.var-ok    { color: var(--good); }
.var-over  { color: var(--warn); font-weight: 600; }
.var-short { color: var(--bad);  font-weight: 600; }
.var-ok, .var-over, .var-short, td.num { white-space: nowrap; }

/* key/value lines */
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: 0; }
.kv.total { font-weight: 650; border-top: 1px solid var(--line-strong); border-bottom: 0; margin-top: 4px; padding-top: 8px; }
.kv-row { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--ink-2); }

/* cash count */
.denoms { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.denom { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.denom input { text-align: right; font-family: var(--mono); }
.count-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
  background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px; }
.big { font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; }

/* time clock */
.clock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.clock-card { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.clock-card.on { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); }

/* schedule grid */
.sched td, .sched th { text-align: center; }
.sched td:first-child, .sched th:first-child { text-align: left; }
.sched .today { background: var(--accent-soft); }
.sched .cell { width: 100%; min-width: 92px; border: 1px dashed var(--line-strong); background: transparent;
  border-radius: var(--radius-sm); padding: 6px 4px; font-size: 11.5px; color: var(--muted); cursor: pointer; }
.sched .cell.set { border-style: solid; background: var(--surface); color: var(--ink); font-weight: 600; }
.sched .cell:hover { border-color: var(--accent); }

/* expense attachments */
.attachments { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.att { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.att img, .att-file { width: 100%; max-width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 5px; background: var(--surface-3); }
.att-file { display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--muted); letter-spacing: .05em; }
.att-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* stock on the POS */
.menu-card.is-out { opacity: .6; }
.stock-badge { font-size: 10.5px; font-weight: 650; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.stock-badge.low { background: var(--warn-soft); color: var(--warn); }
.stock-badge.out { background: var(--bad-soft); color: var(--bad); }

.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.checks label { display: flex; align-items: center; gap: 6px; font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--ink); font-weight: 400; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .pos { grid-template-columns: 1fr; }
  .cart { position: static; max-height: none; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .sidebar {
    position: fixed; z-index: 60; left: 0; top: 0; transform: translateX(-100%);
    transition: transform .18s ease; box-shadow: var(--shadow-lg);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 55; }
  .topbar .menu-toggle { display: inline-flex; }
  .content { padding: 16px 14px 60px; }
  .topbar { padding: 12px 14px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .res-table-row { grid-template-columns: 1fr; }
}

/* the monospace block in the receipt modal */
.receipt {
  font-family: var(--mono); font-size: 12px; line-height: 1.45;
  white-space: pre; overflow-x: auto; margin: 0;
  background: var(--surface-2); border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm); padding: 16px;
}

/* Lifted out of the modal by printer.js so the dialog prints paper-shaped
   output instead of the whole screen. Hidden until that moment. */
.print-receipt { display: none; }

@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  body { background: #fff; }
  .content { padding: 0; }

  /* A receipt print hides the app entirely — a dialog or a half-rendered
     grid behind it would otherwise come out on the roll. */
  body.printing-receipt > *:not(.print-receipt) { display: none !important; }
  body.printing-receipt .print-receipt {
    display: block;
    font-family: var(--mono); font-size: 11px; line-height: 1.4;
    white-space: pre; margin: 0; padding: 0; color: #000;
  }
  /* 58mm roll, less the printer's own margins */
  @page { size: 58mm auto; margin: 3mm; }
}


/* ---------- time clock ---------- */
.tc-wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.tc-card .card-body { text-align: center; padding: 32px 24px; }
.tc-icon { font-size: 44px; line-height: 1; margin-bottom: 10px; color: var(--accent); }
.tc-input { width: 100%; max-width: 360px; font-size: 22px; text-align: center; letter-spacing: .12em; padding: 12px; }
.tc-result { margin-top: 18px; padding: 18px; border-radius: 12px; background: var(--surface-3); }
.tc-result.good { background: var(--good-soft); color: var(--good); }
.tc-result.out { background: var(--accent-soft); color: var(--accent); }
.tc-result.bad { background: var(--bad-soft); color: var(--bad); }
.tc-big { font-size: 26px; font-weight: 800; margin-bottom: 4px; }
.tc-duty { list-style: none; margin: 0; padding: 0; }
.tc-duty li { display: flex; gap: 8px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tc-duty li:last-child { border-bottom: 0; }
.tc-duty .spacer { flex: 1; }
@media (max-width: 760px) { .tc-wrap { grid-template-columns: 1fr; } }

/* ---------- kitchen screen: readable from across the kitchen ---------- */
.kds-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 18px; }
.kds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; align-items: start; }
.kds-ticket {
  background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--accent);
  border-radius: 14px; padding: 14px; display: grid; gap: 10px;
  transition: opacity .25s ease, transform .25s ease;
}
.kds-ticket.web { border-top-color: var(--warn); }
.kds-ticket.leaving { opacity: 0; transform: scale(.96); }
.kds-ticket header { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.kds-code { font-size: 22px; font-weight: 800; letter-spacing: .02em; }
.kds-where { font-size: 14px; color: var(--muted); }
.kds-wait { font-weight: 800; font-size: 16px; padding: 4px 10px; border-radius: 999px; background: var(--good-soft); color: var(--good); white-space: nowrap; }
.kds-wait.slow { background: var(--warn-soft); color: var(--warn); }
.kds-wait.late { background: var(--bad-soft); color: var(--bad); }
.kds-ticket ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.kds-item {
  width: 100%; display: flex; gap: 12px; align-items: baseline; text-align: left;
  font: inherit; font-size: 19px; color: var(--ink); background: var(--surface-3);
  border: 1px solid transparent; border-radius: 10px; padding: 10px 12px; cursor: pointer;
}
.kds-item:disabled { cursor: default; }
.kds-item.done { opacity: .45; }
.kds-item.done .kds-name { text-decoration: line-through; }
.kds-qty { font-weight: 800; min-width: 1.6em; }
.kds-name { font-weight: 650; }
.kds-note { display: block; font-size: 15px; font-weight: 600; color: var(--warn); margin: 2px 0 0; }
.kds-for { margin: 0; font-size: 15px; color: var(--muted); }
.kds-ready { font-size: 18px; padding: 14px; }
.kds-empty { grid-column: 1 / -1; text-align: center; padding: 60px 20px; font-size: 20px; }
.kds-empty .big { font-size: 48px; }
.kds-done { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; }

.seg { display: inline-flex; gap: 4px; flex-wrap: wrap; }
#page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* settings: GCash details beside the QR */
.gcash-grid { display: grid; grid-template-columns: 1fr 200px; gap: 20px; align-items: start; }
.gcash-qr { display: grid; gap: 8px; justify-items: center; }
.gcash-qr-box { width: 180px; height: 180px; border: 1px dashed var(--line); border-radius: 12px; display: grid; place-items: center; background: #fff; overflow: hidden; }
.gcash-qr-box img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 700px) { .gcash-grid { grid-template-columns: 1fr; } }

/* ---------- money: market, remit, advances ---------- */
.mb { margin-bottom: 16px; }
.steps-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; line-height: 1.5; }
.m-body h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.report-frame { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-head { flex-wrap: wrap; row-gap: 6px; }
