:root {
  --green: #1e7a3c; --green-bg: #e6f4ea; --orange: #c2410c; --orange-bg: #ffedd5; --blue: #1f5fa8; --blue-bg: #e3eefb;
  --purple: #6b3fa0; --purple-bg: #efe7fa; --olive: #5c6b17; --olive-bg: #eef2d4; --red: #b42318; --red-bg: #fde7e4;
  --yellow: #8a6100; --yellow-bg: #fff3c4; --ink: #1a2420; --muted: #5a6760; --line: #d9e0dc; --bg: #f4f7f5; --card: #fff;
  --radius: 10px; --accent: var(--green); --accent-bg: var(--green-bg);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; color: var(--ink); background: var(--bg); } /* font, size and line height: type.css */
h1, h2, h3 { margin: 0 0 .5rem; } /* sizes and font: type.css */
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); }
.muted { color: var(--muted); } .small { font-size: var(--fs-md); } .right { text-align: right; } .nowrap { white-space: nowrap; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; } .row.between { justify-content: space-between; } .grow { flex: 1 1 0; min-width: 0; }
.stack > * + * { margin-top: .75rem; }
.hidden { display: none !important; }

/* shell */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
/* the sidebar does not scroll itself (its nav does), so the collapse button can sit on its edge; above the header (20) */
.side { background: #12261b; color: #e8f1ec; padding: .75rem .6rem; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; z-index: 25; }
.side .nav { flex: 1; min-height: 0; overflow-y: auto; }
.brand { display: flex; gap: .6rem; align-items: center; padding: .4rem .5rem 1rem; font-weight: 700; position: relative; flex: none; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: .6rem; }
.brand .logo { width: 56px; height: 56px; flex: none; }
/* the logo on a white tile: the whole logo, its name included, with a soft edge on any background */
.logo-tile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 3px; box-sizing: border-box; object-fit: contain; box-shadow: 0 2px 8px rgba(16, 40, 30, .12); }
.nav a { display: flex; gap: .6rem; align-items: center; padding: .65rem .7rem; border-radius: 8px; color: #dbe8e1; text-decoration: none; min-height: 44px; border-left: 4px solid transparent; }
.nav a:hover { background: rgba(255,255,255,.07); }
.nav a.active { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; }
.nav a .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.ico { width: 20px; height: 20px; flex: none; }
.nav a .ico { filter: brightness(1.6) saturate(1.2); }
/* Administration dropdown: the button opens its sub-pages with a slide-down; items fade in one after another */
.nav .navgroup { display: flex; gap: .6rem; align-items: center; width: 100%; padding: .65rem .7rem; border-radius: 8px; color: #dbe8e1; background: none; border: 0; border-left: 4px solid transparent; min-height: 44px; font: inherit; text-align: left; cursor: pointer; }
.nav .navgroup:hover { background: rgba(255,255,255,.07); }
.nav .navgroup.active { color: #fff; font-weight: 600; }
.nav .navgroup .ico { filter: brightness(1.6) saturate(1.2); }
.nav .navgroup .chev { transition: transform .25s ease; font-size: var(--fs-base); opacity: .8; }
.nav .navgroup[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav .navsub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s ease; }
.nav .navsub.open { grid-template-rows: 1fr; }
.nav .navsub-in { overflow: hidden; margin-left: 1.45rem; border-left: 1px solid rgba(255,255,255,.16); }
.nav .navsub a { min-height: 38px; padding: .45rem .7rem; margin: 2px 0 2px .45rem; font-size: var(--fs-base); color: #c5d6cc; border-left: 0;
  opacity: 0; transform: translateY(-6px); transition: opacity .2s ease, transform .2s ease, background .15s; }
.nav .navsub.open a { opacity: 1; transform: none; transition-delay: calc(var(--i) * 35ms), calc(var(--i) * 35ms), 0s; }
.nav .navsub a.active { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 #8fd1a8; }
@media (prefers-reduced-motion: reduce) { .nav .navsub, .nav .navsub a, .nav .navgroup .chev { transition: none !important; } }
.nav .sep { font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: .08em; color: #8fa89b; padding: .9rem .7rem .3rem; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; gap: .75rem; align-items: center; padding: .6rem 1rem; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top .title { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content { padding: 1rem; max-width: 1500px; width: 100%; }
.menu-btn { display: none; }
/* Sidebar collapse (desktop): a round ‹ / › button where the logo area's divider meets the sidebar's right edge */
.side-toggle { position: absolute; right: calc(-.6rem - 12px); bottom: -12px; z-index: 2; width: 24px; height: 24px; padding: 0; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid #d5e0da; background: #fff; color: #3b4a43; box-shadow: 0 1px 3px rgba(0,0,0,.2); font: 700 16px/1 var(--font-sans); cursor: pointer; }
.side-toggle:hover { background: #eef5f1; color: #1e7a3c; }
.side-toggle:focus-visible { outline: 2px solid #8fd1a8; outline-offset: 2px; }
@media (min-width: 901px) {
  .shell { transition: grid-template-columns .2s ease; }
  .shell.side-collapsed { grid-template-columns: 68px 1fr; }
  .side-collapsed .side { padding-left: .4rem; padding-right: .4rem; }
  .side-collapsed .brand { justify-content: center; padding-left: 0; padding-right: 0; }
  .side-collapsed .brand .logo { width: 50px; height: 50px; }
  .side-collapsed .side-toggle { right: calc(-.4rem - 12px); }
  .side-collapsed .brand-text, .side-collapsed .nav .lbl, .side-collapsed .nav .navgroup .grow, .side-collapsed .nav .chev, .side-collapsed .nav .navsub { display: none; }
  .side-collapsed .nav a, .side-collapsed .nav .navgroup { justify-content: center; padding-left: 0; padding-right: 0; border-left-width: 0; }
  .side-collapsed .nav .navgroup.active { background: rgba(255,255,255,.14); }
}
@media (prefers-reduced-motion: reduce) { .shell { transition: none; } }
.bell { position: relative; }
.bell .count { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff; border-radius: 999px; font-size: var(--fs-2xs); padding: 0 .35rem; min-width: 1.1rem; text-align: center; }
.panel-pop { position: absolute; right: 0; top: 110%; width: min(420px, 92vw); max-height: 70vh; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.18); z-index: 40; }
.note { padding: .6rem .8rem; border-bottom: 1px solid var(--line); display: flex; gap: .6rem; }
.note.unread { background: #f3faf5; } .note .sev { width: 4px; border-radius: 3px; flex: none; }
.note.note-link { cursor: pointer; align-items: center; } .note.note-link:hover, .note.note-link:focus-visible { background: #e8f4ec; outline: none; } .note .note-go { flex: none; font-size: var(--fs-2xl); color: var(--muted); line-height: 1; }
.sev-info { background: var(--blue); } .sev-success { background: var(--green); } .sev-warning { background: #d99a00; } .sev-danger { background: var(--red); }

/* module accents */
.m-pos { --accent: var(--green); --accent-bg: var(--green-bg); } .m-kitchen { --accent: var(--orange); --accent-bg: var(--orange-bg); }
.m-inventory { --accent: var(--blue); --accent-bg: var(--blue-bg); } .m-purchasing { --accent: var(--purple); --accent-bg: var(--purple-bg); }
.m-reports { --accent: var(--olive); --accent-bg: var(--olive-bg); } .m-admin { --accent: #3b4a43; --accent-bg: #e5ebe8; }
.pagehead { display: flex; gap: .75rem; align-items: center; margin-bottom: .75rem; flex-wrap: wrap; }
.pagehead h1 { margin: 0; border-left: 6px solid var(--accent); padding-left: .6rem; }

/* controls */
.btn { background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: .55rem .9rem; min-height: 40px; cursor: pointer; font-weight: 600; }
.btn:hover { filter: brightness(1.08); } .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); } .btn.danger { background: var(--red); } .btn.sm { min-height: 32px; padding: .25rem .6rem; font-size: var(--fs-md); }
.btn.big { min-height: 54px; font-size: var(--fs-lg); }
input, select, textarea { border: 1px solid #b9c5be; border-radius: 8px; padding: .5rem .6rem; background: #fff; min-height: 40px; max-width: 100%; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid #7fb69a; outline-offset: 1px; }
textarea { width: 100%; min-height: 64px; }
/* amount boxes show "₱ 12,345.67" (lib.js moneyBox) */
.money-in { text-align: right; font-variant-numeric: tabular-nums; }
/* amounts are typed: no up/down arrows on number boxes */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=checkbox], input[type=radio] { width: 1.2rem !important; height: 1.2rem; min-height: 0; padding: 0; flex: none; accent-color: var(--accent); }
label:has(> input[type=checkbox]), label:has(> input[type=radio]) { display: flex; gap: .5rem; align-items: center; cursor: pointer; }
label { display: block; font-size: var(--fs-md); color: var(--muted); font-weight: 600; margin-bottom: .2rem; }
/* label · value rows in a detail view (Expense Requests) */
.kvs { display: grid; margin-bottom: .4rem; }
.kv { display: grid; grid-template-columns: minmax(110px, 160px) 1fr; gap: .75rem; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.kv .k { color: var(--muted); font-size: var(--fs-md); font-weight: 600; }
.kv .v { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { .kv { grid-template-columns: 1fr; gap: .1rem; } }
.field { margin-bottom: .6rem; } .field input, .field select { width: 100%; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; } .grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem; }
.card.accent { border-top: 4px solid var(--accent); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.stat { cursor: pointer; text-align: left; background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--radius); padding: .8rem; }
.stat:hover { box-shadow: 0 2px 10px rgba(0,0,0,.1); } .stat .pct-note { font-size: var(--fs-2xs); font-weight: 700; color: var(--accent, var(--green)); margin-top: .2rem; } .stat .v { font-size: var(--fs-2xl); font-weight: 700; } .stat .l { color: var(--muted); font-size: var(--fs-md); } .stat .d { font-size: var(--fs-sm); }
.up { color: var(--green); } .down { color: var(--red); }
.tabs { display: flex; gap: .25rem; border-bottom: 2px solid var(--line); margin-bottom: .9rem; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: .6rem 1rem; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 4px solid transparent; margin-bottom: -2px; min-height: 44px; white-space: nowrap; }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .55rem; border-radius: 999px; font-size: var(--fs-sm); font-weight: 700; border: 1px solid currentColor; white-space: nowrap; }
.chip.green { color: var(--green); background: var(--green-bg); } .chip.yellow { color: var(--yellow); background: var(--yellow-bg); } .chip.orange { color: var(--orange); background: var(--orange-bg); }
.chip.red { color: var(--red); background: var(--red-bg); } .chip.blue { color: var(--blue); background: var(--blue-bg); } .chip.purple { color: var(--purple); background: var(--purple-bg); } .chip.grey { color: #444; background: #eceeed; }

/* the waiter's and cashier's one-screen layout: no sidebar; pill tabs under the header */
.shell.one-screen { grid-template-columns: 1fr; }
.top-logo { width: 36px; height: 36px; border-radius: 8px; flex: none; }
.pills { display: flex; gap: .45rem; align-items: center; padding: .55rem 1rem; background: #fff; border-bottom: 1px solid var(--line); overflow-x: auto; position: sticky; top: 57px; z-index: 19; scrollbar-width: thin; }
.pills a { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .95rem; border-radius: 999px; border: 1px solid var(--line); background: #f6f8f7; color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; min-height: 40px; }
.pills a:hover { border-color: var(--accent); }
.pills a.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill-count { min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem; border-radius: 999px; background: #c2410c; color: #fff; font-size: var(--fs-sm); display: inline-flex; align-items: center; justify-content: center; }
.pills a.active .pill-count { background: #fff; color: var(--accent); }
/* the waiter's menu: a red + on every dish, "Review order" fixed at the bottom */
.waiter-menu { padding-bottom: 5.5rem; }
.allergen { display: block; font-size: var(--fs-xs); color: #111; font-weight: 600; margin: .1rem 0; }
.item.dish { position: relative; padding-bottom: 2.6rem; }
.item.dish .plus { position: absolute; right: .55rem; bottom: .55rem; width: 2.3rem; height: 2.3rem; border-radius: 50%; background: #e11d2a; color: #fff; font-size: var(--fs-2xl); font-weight: 700; line-height: 1; display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 8px rgba(225, 29, 42, .35); }
.item.dish:hover:not(:disabled) .plus { background: #c0151f; }
.item.dish .in-cart { position: absolute; left: .55rem; bottom: .7rem; background: var(--accent); color: #fff; border-radius: 999px; padding: .1rem .55rem; font-weight: 700; font-size: var(--fs-md); }
.review-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line); display: flex; justify-content: center; }
.review-bar .btn { width: 100%; max-width: 640px; }
.review-order { max-width: 760px; margin: 0 auto; }
.review-order .paypick button { font-size: 1rem; }
/* the day's sales on top of Orders and Bills: pills that also pick which orders are listed */
.sales-wrap { position: sticky; top: 0; z-index: 18; background: var(--bg, #f3f5f4); margin: 0 -.2rem; padding: .3rem .2rem 0; transition: transform .25s ease, opacity .25s ease; }
.sales-wrap.auto-hidden { transform: translateY(-115%); opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .sales-wrap { transition: none; } }
.sales-pills { display: grid; grid-template-columns: repeat(6, minmax(132px, 1fr)); gap: .5rem; overflow-x: auto; padding: .1rem .1rem .6rem; margin-bottom: .4rem; scrollbar-width: thin; }
.sales-pill { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; min-width: 0; overflow: hidden; padding: .45rem .85rem; border-radius: 14px; border: 1px solid var(--line); background: #fff; cursor: pointer; font: inherit; text-align: left; }
.sales-pill:hover { border-color: var(--accent); }
.sales-pill .sp-label { font-size: var(--fs-sm); font-weight: 600; color: var(--muted); white-space: nowrap; }
.sales-pill .sp-amount { font-size: var(--fs-lg); color: var(--ink); }
.sales-pill .sp-sub { font-size: var(--fs-2xs); color: var(--muted); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.sales-pill.due .sp-amount { color: #c2410c; }
.sales-pill .sp-pct { font-size: var(--fs-2xs); font-weight: 700; color: var(--accent); white-space: nowrap; }
.sales-pill.active { background: var(--accent); border-color: var(--accent); }
.sales-pill.active .sp-label, .sales-pill.active .sp-amount, .sales-pill.active .sp-sub, .sales-pill.active .sp-pct { color: #fff; }

/* a new order that just reached the kitchen pulses for a few seconds */
.ticket.fresh { animation: fresh-pulse 1.2s ease-in-out 5; box-shadow: 0 0 0 3px #f59e0b; }
@keyframes fresh-pulse { 50% { box-shadow: 0 0 0 7px rgba(245, 158, 11, .35); } }
@media (prefers-reduced-motion: reduce) { .ticket.fresh { animation: none; } }
.kcols.serve-only { grid-template-columns: minmax(0, 1fr); }
.kcols.serve-only .kcol { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .8rem; align-items: start; }
.kcols.serve-only .kcol > h2, .kcols.serve-only .kcol > details, .kcols.serve-only .kcol > .empty { grid-column: 1 / -1; }
.pill-sound { margin-left: auto; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .35rem .8rem; font: inherit; font-size: var(--fs-md); cursor: pointer; white-space: nowrap; min-height: 36px; }

/* system administrators: role menu under the name in the header */
.role-switch { font: inherit; font-size: var(--fs-sm); color: var(--muted); border: 1px solid transparent; background: transparent; border-radius: 6px; padding: .1rem .2rem; max-width: 190px; cursor: pointer; }
.role-line { display: flex; align-items: center; justify-content: flex-end; gap: .3rem; white-space: nowrap; }
.role-switch:hover, .role-switch:focus { border-color: var(--line); background: #fff; }
.role-switch.acting { color: var(--orange); background: var(--orange-bg); border-color: currentColor; font-weight: 700; }
.acting-note { font-size: var(--fs-xs); color: var(--orange); font-weight: 600; }
/* role cards (ERP style): after signing in and from Switch role */
.role-page { max-width: 980px; margin: 0 auto; padding: 2rem 1rem; }
.role-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.2rem; }
.role-head img { border-radius: 14px; }
.role-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; }
.role-card { position: relative; display: flex; flex-direction: column; gap: .35rem; align-items: flex-start; text-align: left; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 12px; padding: 1rem; cursor: pointer; min-height: 130px; }
.role-card:hover, .role-card:focus-visible { box-shadow: 0 4px 14px rgba(0,0,0,.12); transform: translateY(-1px); }
.role-card.current { outline: 2px solid var(--accent); }
.role-card b { font-size: var(--fs-lg); }
.role-card .rc-tag { font-size: var(--fs-2xs); font-weight: 700; color: var(--accent); border: 1px solid currentColor; border-radius: 999px; padding: 0 .45rem; }
.role-card .rc-tag.now { background: var(--accent); color: #fff; border-color: var(--accent); }

/* tables */
.tw { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: var(--fs-base); }
th, td { text-align: left; padding: .5rem .65rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f0f4f2; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .03em; color: var(--muted); position: sticky; top: 0; cursor: default; }
th.sortable { cursor: pointer; } td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.click { cursor: pointer; } tr.click:hover td { background: #f6faf8; }
.pager { display: flex; gap: .5rem; align-items: center; justify-content: flex-end; padding: .5rem; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 130px; padding: .4rem 0; overflow-x: auto; }
.bar { flex: 1 0 18px; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; cursor: pointer; }
.bar:hover { filter: brightness(1.2); } .barl { font-size: var(--fs-2xs); color: var(--muted); text-align: center; }

/* POS */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1rem; align-items: start; }
.catbar { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .4rem; margin-bottom: .6rem; }
.catbar button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .45rem .9rem; min-height: 40px; cursor: pointer; white-space: nowrap; font-weight: 600; }
.catbar button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.catbar button { display: inline-flex; align-items: center; gap: .4rem; } .catbar button .ico { width: 17px; height: 17px; stroke-width: 1.6; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem; text-align: left; cursor: pointer; min-height: 92px; display: flex; flex-direction: column; justify-content: space-between; gap: .3rem; }
.item:hover:not(:disabled) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-bg); } .item:disabled { opacity: .55; cursor: not-allowed; }
.item .thumb { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 6px; background: #eef2ef; }
.item .n { font-weight: 700; } .item .p { color: var(--accent); font-weight: 700; }
.cart { position: sticky; top: 64px; } .line { display: grid; grid-template-columns: 1fr auto; gap: .2rem .5rem; padding: .5rem 0; border-bottom: 1px dashed var(--line); }
.qty { display: inline-flex; align-items: center; gap: .3rem; } .qty button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: var(--fs-lg); }
.tot { display: flex; justify-content: space-between; padding: .15rem 0; } .tot.grand { font-size: var(--fs-xl); font-weight: 700; border-top: 2px solid var(--ink); margin-top: .3rem; padding-top: .4rem; }

/* kitchen */
.kcols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; align-items: start; }
.kcol h2 { padding: .5rem .7rem; border-radius: 8px; background: var(--accent-bg); color: var(--accent); display: flex; justify-content: space-between; }
/* ---- order cards and kitchen tickets: one fixed size, status colour band, scrolling item list, actions pinned at the bottom ---- */
.s-new { --s: #8a948f; } .s-pending_approval { --s: #d9a400; } .s-confirmed, .s-sent_to_kitchen { --s: var(--blue); } .s-preparing { --s: var(--orange); }
.s-ready { --s: var(--green); } .s-completed { --s: #6f8f7c; } .s-rejected, .s-cancelled, .s-refunded { --s: var(--red); }
/* the cashier's Orders and Bills as a list: one row per order */
.olist { display: grid; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.orow { display: grid; grid-template-columns: 44px minmax(0, 1fr) 118px 88px 60px 104px 104px 132px 276px; gap: .4rem .6rem; align-items: center; padding: .4rem .7rem; border-bottom: 1px solid var(--line); border-left: 4px solid transparent; }
.orow:last-child { border-bottom: 0; }
.orow:hover { background: #f8faf9; }
.orow.s-ready { --s: var(--blue); } .orow.picked { --s: var(--purple); } .orow.s-completed { --s: var(--green); } .orow.s-preparing, .orow.s-ready, .orow.s-completed { border-left-color: var(--s); }
.orow .tbadge { display: block; width: 44px; min-width: 0; height: 40px; padding: 0 .15rem; line-height: 36px; text-align: center; font-size: var(--fs-base); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orow .tbadge.long { display: grid; place-items: center; line-height: 1.05; font-size: var(--fs-2xs); white-space: normal; }
.orow-main { min-width: 0; overflow: hidden; }
/* the server accountable for an unpaid bill */
.srv-chip { display: inline-flex; align-items: center; padding: .1rem .5rem; border-radius: 999px; background: #eef3ff; color: #1f4fa8; border: 1px solid #c9d8f5; font-size: var(--fs-sm); font-weight: 700; white-space: nowrap; }
.srv-chip.none { background: #fff4e5; color: #9a5b00; border-color: #f2d3a2; }
.srv-sum { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .9rem; margin-bottom: .6rem; padding: .45rem .7rem; }
.srv-tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.srv-tab { display: flex; flex-direction: column; align-items: flex-start; gap: .05rem; min-width: 136px; padding: .3rem .7rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font: inherit; text-align: left; }
.srv-tab span { font-size: var(--fs-sm); color: var(--muted); } .srv-tab.on { border-color: #1f4fa8; background: #eef3ff; } .srv-tab.on b { color: #1f4fa8; } .srv-tab.none b { color: #9a5b00; }
.srv-group { margin-bottom: .9rem; }
.srv-head { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; flex-wrap: wrap; padding: .45rem .75rem; margin-bottom: .4rem; border-radius: 8px; background: #eef3ff; color: #1f4fa8; border-left: 4px solid #1f4fa8; }
.srv-head > span:last-child { font-weight: 700; } .srv-head.none { background: #fff4e5; color: #9a5b00; border-left-color: #d98a00; } .srv-head.other { background: #f3f4f6; color: var(--muted); border-left-color: #9ca3af; }
.orow-head { display: flex; gap: .4rem; align-items: center; min-width: 0; } .orow-head .ono, .orow-head .chip { flex: none; } .orow-head .chip:last-child:not(:nth-child(2)) { flex: 0 1 auto; min-width: 0; display: block; overflow: hidden; text-overflow: ellipsis; }
.orow-items { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .1rem; }
.orow .onote { margin-top: .1rem; }
.orow-total { display: grid; justify-items: end; gap: .15rem; white-space: nowrap; }
.orow-total b { font-size: var(--fs-lg); }
.orow-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) 34px; gap: .3rem; align-items: center; }
.orow-actions > .btn { width: 100%; min-width: 0; min-height: 34px; padding-left: .35rem; padding-right: .35rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orow-actions > .omore { grid-column: 3; grid-row: 1; justify-self: end; }
/* the cashier's columns: the serving cells line up under the headings; on a tablet they sit in one labelled line */
.orow-cols { padding-top: .35rem; padding-bottom: .35rem; background: #f4f6f5; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); border-radius: var(--radius) var(--radius) 0 0; }
.orow-cols:hover { background: #f4f6f5; } .orow-cols .orow-total { display: block; text-align: right; }
.orow-serve { display: contents; }
.oc { min-width: 0; font-size: var(--fs-md); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-filter input[type=search] { width: 280px; max-width: 100%; min-height: 38px; } .pos-filter .btn { min-height: 38px; }
.orow-pay { min-width: 0; }
@media (max-width: 1280px) {
  .orow { grid-template-columns: 44px minmax(0, 1fr) 124px 160px; } .orow-cols { display: none; }
  .orow-total { grid-row: 1; grid-column: 3; } .orow-pay { grid-row: 1; grid-column: 4; }
  .orow-serve { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .9rem; grid-row: 2; grid-column: 1 / 3; min-width: 0; }
  .oc[data-l]::before { content: attr(data-l) ': '; font-weight: 500; color: var(--muted); }
  .orow-actions { grid-row: 2; grid-column: 3 / -1; }
}
.orow .omenu { bottom: auto; top: calc(100% + 6px); }
@media (max-width: 760px) {
  .orow { grid-template-columns: auto minmax(0, 1fr); }
  .orow-total, .orow-pay, .orow-serve, .orow-actions { grid-row: auto; }
  .orow-serve { grid-column: 1 / -1; } .orow-pay { grid-column: 1 / -1; }
  .orow-total { grid-column: 2; justify-items: start; grid-auto-flow: column; align-items: center; }
  .orow-actions { grid-column: 1 / -1; }
}
.ocards { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: .8rem; }
:where(.ocard) { --s: var(--line); } :where(.ticket) { --s: var(--orange); } /* zero-specificity defaults so .s-<status> wins */
.ocard, .ticket { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--s);
  border-radius: 12px; padding: .65rem .75rem .6rem; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); transition: box-shadow .15s ease, transform .15s ease; }
.ocard { height: 300px; }
.ocard:hover, .ticket:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, .09); transform: translateY(-1px); }
.ocard.s-ready, .ticket.s-ready { box-shadow: 0 0 0 2px rgba(30, 122, 60, .25); }
.ocard.s-pending_approval { background: linear-gradient(#fffbea, #fff 70px); }
.ocard-head, .ticket-head { display: flex; gap: .55rem; align-items: center; }
.tbadge { flex: none; min-width: 44px; height: 44px; padding: 0 .3rem; border-radius: 11px; display: grid; place-items: center; font-weight: 700; font-size: var(--fs-lg);
  color: var(--s); border: 2px solid var(--s); background: #fff; letter-spacing: -.02em; }
.ocard-head .small, .ticket-head .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ono { font-weight: 700; font-size: var(--fs-base); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ocard-meta { display: flex; gap: .35rem; align-items: center; margin: .45rem 0 .35rem; min-height: 24px; overflow: hidden; white-space: nowrap; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ocard-items, .ticket-items { flex: 1; min-height: 0; overflow-y: auto; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); padding: .25rem .1rem; scrollbar-width: thin;
  background: linear-gradient(#fff 30%, rgba(255, 255, 255, 0)) top / 100% 14px no-repeat local, linear-gradient(rgba(255, 255, 255, 0), #fff 70%) bottom / 100% 14px no-repeat local,
    radial-gradient(farthest-side at 50% 0, rgba(0, 0, 0, .12), transparent) top / 100% 6px no-repeat scroll, radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, .12), transparent) bottom / 100% 6px no-repeat scroll; }
.oline { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .45rem; padding: .2rem 0; font-size: var(--fs-base); align-items: baseline; }
.oline .q, .kline .q { font-weight: 700; color: var(--s); } .oline .p { font-weight: 600; font-variant-numeric: tabular-nums; }
.oline small { display: block; } .oline .each { color: var(--muted); } .oline .ins { font-size: var(--fs-sm); padding: .05rem .4rem; }
.add-banner { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; width: 100%; text-align: left; padding: .65rem .8rem; border: 2px dashed var(--orange); border-radius: 10px; background: color-mix(in srgb, var(--orange) 10%, var(--card, #fff)); color: inherit; font: inherit; cursor: pointer; }
.add-strip { margin: .25rem 0; padding: .2rem .45rem; border-radius: 6px; background: var(--orange); color: #fff; font-size: var(--fs-sm); font-weight: 700; letter-spacing: .02em; overflow-wrap: anywhere; }
.add-banner.on { border-style: solid; cursor: default; }
.oadd { margin-top: .4rem; padding-top: .3rem; border-top: 1px dashed var(--line); } .oadd-head { font-size: var(--fs-sm); font-weight: 700; color: var(--orange); }
.order-ticket .ot-title.ot-add { color: #000; border: 1.5px solid #000; padding: 1cqw 0; }
/* the Receptionist's golfer and walk-in queue */
.q-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .q-grid { grid-template-columns: minmax(0, 1fr); } }
.q-cards { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.q-addrow { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; } .q-addrow > :nth-child(1) { flex: 2 1 220px; } .q-addrow > :nth-child(3) { flex: 1 1 140px; } .q-addrow .paypick { flex-wrap: nowrap; }
.q-addrow .field { margin: 0; } .q-addbtns { gap: .5rem; flex-wrap: nowrap; padding-bottom: 1px; }
/* a narrow card (tablet, or the sidebar open): each queue row becomes a small card of labelled fields */
.q-tb { container-type: inline-size; }
@container (max-width: 780px) {
  .q-tb table.rt thead { display: none; } .q-tb table.rt, .q-tb table.rt tbody { display: block; width: 100%; }
  .q-tb table.rt tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .1rem .9rem; padding: .5rem .2rem; border-bottom: 2px solid var(--line); }
  .q-tb table.rt td { display: flex; justify-content: space-between; align-items: center; gap: .5rem; border: 0; padding: .15rem .45rem; text-align: right; }
  .q-tb table.rt td::before { content: attr(data-label); font-weight: 700; font-size: var(--fs-sm); color: var(--muted); text-align: left; }
  .q-tb table.rt td:last-child { grid-column: 1 / -1; justify-content: flex-start; } .q-tb table.rt td:last-child::before { content: none; }
  .q-tb .row.q-acts { display: flex; flex-wrap: wrap; }
  .q-tb tr:has(.q-near-mark) { background: var(--orange-bg); }
}
.q-grid h2 { font-size: var(--fs-lg); margin: 0 0 .6rem; }
.q-acts .btn, .q-time { white-space: nowrap; } @media (max-width: 1280px) { .row.q-acts { display: grid; grid-template-columns: repeat(2, max-content); } } .q-no { font-size: var(--fs-xl); font-variant-numeric: tabular-nums; }
tr:has(.q-near-mark) td { background: var(--orange-bg, #fff4e5); } .q-soon { color: var(--orange); }
.q-full { margin: .2rem 0 .6rem; padding: .55rem .7rem; border-radius: 8px; background: var(--red-bg); color: var(--red); font-weight: 700; font-size: var(--fs-md); }
.q-found { border: 1px solid var(--line); border-radius: 8px; padding: .4rem .6rem; margin: -.2rem 0 .6rem; }
.q-hit { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .3rem 0; border-top: 1px dashed var(--line); } .q-hit:first-of-type { border-top: 0; }
/* waiter names: the Manager's list, and "Served by" on a ready ticket */
/* Waiter Performance tabs: All waiters, then one per waiter opened */
.wp-tabs { display: flex; gap: .3rem; align-items: flex-end; border-bottom: 2px solid var(--line); margin-bottom: .9rem; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; padding-top: 2px; }
.wp-tab { display: inline-flex; align-items: center; flex: none; border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; background: #f0f4f2; color: var(--muted); font: inherit; font-weight: 700; font-size: var(--fs-base); margin-bottom: -2px; }
button.wp-tab, .wp-tab-name { padding: .5rem .9rem; background: transparent; border: 0; color: inherit; font: inherit; cursor: pointer; } button.wp-tab { background: #f0f4f2; border: 1px solid var(--line); border-bottom: 0; }
.wp-tab.on { background: #fff; color: var(--text, #1f2a24); border-color: var(--line); box-shadow: inset 0 3px 0 var(--accent, var(--green)); padding-bottom: 2px; } button.wp-tab.on { background: #fff; }
.wp-tab-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: .2rem .45rem; margin-right: .3rem; border-radius: 999px; font-size: var(--fs-sm); } .wp-tab-x:hover { background: var(--red-bg); color: var(--red); }
.wn-card { margin-bottom: 1rem; } .wn-card .tw { margin-top: .6rem; } .wn-remove { color: var(--red); } .wp-detail { margin-top: .4rem; padding-top: .8rem; border-top: 2px solid var(--line); } .wp-cards { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } .wn-list { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.wn-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .3rem .25rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--green-bg); font-weight: 600; font-size: var(--fs-base); }
.wn-chip.off { background: #f3f4f6; color: var(--muted); } .wn-x { border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: var(--fs-md); padding: .1rem .35rem; border-radius: 999px; } .wn-x:hover { background: #fff; color: var(--red); }
/* kitchen / bar Ready card: the waiter serving, then Served; notices kept off the cards on the boards */
/* Ready to Serve (waiters): who takes each part; today's counts per waiter */
.who-serves { display: grid; gap: .3rem; text-align: left; } .who-serves > div:first-child { text-align: center; }
.ws-line { display: flex; justify-content: space-between; gap: .5rem; font-size: var(--fs-base); color: var(--text, #1f2a24); background: #fff; border-radius: 6px; padding: .3rem .5rem; } .ws-line b.muted { color: var(--muted); font-weight: 600; }
.waiters-today { grid-column: 1 / -1; padding: .6rem .75rem; } .wt-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .35rem; } .wt-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .35rem .55rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); } .wt-nums { display: flex; gap: .7rem; font-size: var(--fs-md); color: var(--muted); } .wt-nums b { color: var(--text, #1f2a24); } .waiters-today .wt-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .3rem; }
.serve-pick { display: grid; gap: .4rem; } .serve-pick .serve-now { width: 100%; font-weight: 700; padding: .6rem .5rem; }
/* a ready card grows to fit its waiter and Serve (the dish list keeps a few lines, scrolling) */
.ticket.s-ready, .serve-only .ticket { height: auto; min-height: 340px; } .ticket.s-ready .ticket-items, .serve-only .ticket-items { flex: none; max-height: 112px; }
.ready-part, .ticket-done { flex: none; } .ready-part { margin-top: .5rem; display: grid; gap: .4rem; padding: .55rem .6rem; border-radius: 8px; background: var(--green-bg); }
.ready-part .rp-head { color: var(--green); } .ready-part .rp-other { color: var(--muted); font-weight: 600; } .ready-part .rp-pick { font-weight: 700; color: var(--blue); }
/* the waiter's Ready to Serve: who is holding the tablet, then one line per part with its tag and next step */
.me-bar { display: flex; align-items: center; gap: .5rem; margin: 0 0 .6rem; font-weight: 700; } .me-bar:empty { display: none; } .me-bar select { width: auto; min-width: 200px; font-weight: 600; }
.serve-parts { flex: none; display: grid; gap: .35rem; margin-top: .5rem; }
.sp-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .35rem .5rem; align-items: center; padding: .35rem .45rem; border-radius: 8px; background: #f4f6f5; }
.sp-who { min-width: 0; font-size: var(--fs-md); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sp-row .btn { grid-column: 1 / -1; width: 100%; font-weight: 700; }
.board-page #toasts { top: 64px; bottom: auto; right: auto; left: 50%; transform: translateX(-50%); pointer-events: none; }
.board-page #toasts .toast { opacity: .96; }
.serve-by { display: grid; gap: .2rem; margin: .35rem 0; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); } .serve-by select { width: 100%; font-weight: 600; color: var(--text, #1f2a24); }
/* the Bar: a drink line on the waiter's whole-order ticket; the Made at choice on menu categories */
.kbar { display: inline-block; margin-right: .3rem; padding: 0 .35rem; border-radius: 6px; background: var(--purple-bg); color: var(--purple); font-size: var(--fs-2xs); font-weight: 700; }
.station-pick { flex-wrap: nowrap; } .station-pick button { padding: .25rem .6rem; font-size: var(--fs-sm); }
/* Menu History: a change, before → after */
.mh-cards { display: grid; gap: .75rem; } .mh-card { border-left: 4px solid var(--yellow, #d9a400); } .mh-entry { border-left: 4px solid var(--line); }
.mh-before { color: #8a1f17; text-decoration: line-through; text-decoration-color: rgba(180,35,24,.45); } .mh-after { color: var(--green); font-weight: 700; }
.mh-val { white-space: pre-wrap; } .mh-photo { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); vertical-align: middle; }
/* inventory movement: what came in and what went out */
/* Month-end inventory: the actual count and its variance */
/* Daily inventory count: counted → Kitchen Head → Manager */
.dc-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .5rem; margin-bottom: .7rem; }
.dc-step { display: flex; gap: .6rem; align-items: flex-start; padding: .55rem .7rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
.dc-step .btn { margin-top: .35rem; } .dc-step.done { border-color: var(--green); background: var(--green-bg); }
.dc-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: #e5e7eb; color: #374151; }
.dc-step.done .dc-n { background: var(--green); color: #fff; }
.dc-ok b { color: var(--green); white-space: nowrap; }
.me-dec { display: flex; gap: .3rem; margin-top: .3rem; justify-content: flex-end; flex-wrap: wrap; } .me-acts { gap: .5rem; margin-left: auto; }
.me-wait { margin: 0 0 .6rem; padding: .5rem .7rem; border-radius: 8px; background: #fff7e6; color: #9a5b00; font-weight: 700; }
.need-note { border-color: var(--red); background: var(--red-bg); }
.me-act { display: inline-flex; gap: .3rem; align-items: center; } .me-in { width: 110px; } .me-post { margin-top: .7rem; gap: .5rem; flex-wrap: wrap; } .me-post input { flex: 1 1 240px; } .me-cards { margin-bottom: .6rem; }
/* Stock Counts: the adjustment as typed */
.cnt-totals { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin-top: .6rem; padding: .5rem .75rem; border-radius: 8px; background: #f6f7f4; font-size: var(--fs-base); }
/* Table Monitor: a tile per table — in use, paid and waiting to be cleared, or free */
.tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .65rem; }
.tm-tile { display: flex; flex-direction: column; gap: .35rem; padding: .7rem .8rem; border: 1px solid var(--line); border-left: 5px solid var(--green); border-radius: 10px; background: var(--card); }
.tm-tile.in_use { border-left-color: var(--orange); background: #fff8f1; } .tm-tile.to_clear { border-left-color: var(--red); background: #fff3f3; }
.tm-tile .chip { align-self: flex-start; } .tm-tile .btn { align-self: flex-start; margin-top: .2rem; }
.tm-top { display: flex; justify-content: space-between; align-items: baseline; gap: .4rem; } .tm-top b { font-size: var(--fs-lg); }
.tm-info { display: flex; flex-direction: column; gap: .1rem; }
.tm-warn { font-size: var(--fs-sm); font-weight: 700; color: #9a5b00; }
/* Tables and Chairs: what is set up, in use and left */
.tc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .75rem; }
.tc-box { padding: .8rem 1rem; border: 1px solid var(--line); border-left: 5px solid #1f5fa8; border-radius: 10px; background: var(--card); }
.tc-box.full { border-left-color: var(--red); background: #fff3f3; }
.tc-title { font-weight: 700; font-size: var(--fs-lg); margin-bottom: .4rem; }
.tc-nums { display: flex; gap: 1.4rem; flex-wrap: wrap; } .tc-nums span { display: block; font-size: var(--fs-sm); color: var(--muted); } .tc-nums b { font-size: var(--fs-2xl); }
.tc-left b { color: #1f5fa8; } .tc-box.full .tc-left b { color: var(--red); }
.tc-room { margin: 0 0 .75rem; padding: .6rem .8rem; border-radius: 8px; background: #eef3ff; color: #1f4fa8; font-weight: 700; font-size: var(--fs-lg); }
.tc-room.full { background: #fff3f3; color: var(--red); }
/* Walk-in and Golfer History: stacked bars (golfers, walk-ins) per day / hour; they print in colour */
.gh-legend { display: flex; gap: 1rem; font-size: var(--fs-sm); margin-bottom: .3rem; } .gh-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 2px; margin-right: .3rem; vertical-align: -1px; }
.gh-chart { display: flex; align-items: flex-end; gap: 4px; height: 170px; padding-top: .3rem; overflow-x: auto; }
.gh-col { flex: 1 0 26px; max-width: 64px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; }
.gh-stack { display: flex; flex-direction: column; min-height: 0; border-radius: 3px 3px 0 0; overflow: hidden; }
.gh-v { font-size: var(--fs-2xs); font-weight: 700; text-align: center; } .gh-l { font-size: var(--fs-2xs); color: var(--muted); text-align: center; line-height: 1.1; margin-top: 2px; }
.gh-print .gh-chart { height: 130px; overflow: visible; } .gh-print .gh-l { color: #000; }
.gh-chart, .gh-legend i { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
/* take-out packaging: the option on the order screens, and the kitchen's "pack it" strip */
.pack-opt { display: flex; gap: .55rem; align-items: center; margin: .2rem 0 .6rem; padding: .5rem .7rem; border: 1.5px solid #d97706; border-radius: 10px; background: #fff8ec; cursor: pointer; }
.pack-opt input { width: 20px; height: 20px; } .pack-strip { background: #fff3e0; color: #9a5b00; border-color: #d97706; }
.mv-in { color: var(--green); font-weight: 600; } .mv-out { color: var(--red); font-weight: 600; } .mv-in, .mv-out, .mv-qty { white-space: nowrap; }
/* Pricing: the minimum mark-up and prices below it */
.pr-rule { margin: .2rem 0 .8rem; } .pr-rule-row { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; } .pr-rule-row > div:first-child { flex: 1 1 280px; }
.pr-warn { margin-top: .5rem; padding: .45rem .6rem; border-radius: 8px; background: var(--red-bg); color: var(--red); font-weight: 700; font-size: var(--fs-md); }
.pr-bad { color: var(--red); font-weight: 700; } input.pr-below { border-color: var(--red); background: #fff5f4; }
.onote { margin-top: .3rem; font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .onote.bad { color: var(--red); font-weight: 600; } .onote.due { color: var(--orange); font-weight: 700; }
.ocard-total { display: flex; align-items: center; gap: .45rem; margin-top: .4rem; } .ocard-total b { font-size: var(--fs-xl); margin-right: auto; font-variant-numeric: tabular-nums; }
.ocard-actions { display: flex; gap: .35rem; margin-top: .45rem; align-items: center; }
.ocard-actions > .btn { flex: 1; white-space: nowrap; } .ocard-actions > .btn.grow { flex: 1; }
.omore { position: relative; flex: none; } .omore > summary { list-style: none; cursor: pointer; min-width: 38px; font-weight: 700; }
.omore > summary::-webkit-details-marker { display: none; } .omore[open] > summary { background: var(--line); }
.omenu { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 5; display: grid; gap: .3rem; min-width: 160px; padding: .35rem; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .16); }
.omenu .btn { width: 100%; text-align: left; }
.ticket { height: 340px; margin-bottom: .8rem; }
/* the order ticket (waiter): a till slip — not the kitchen .ticket card */
.order-ticket { container-type: inline-size; width: 100%; max-width: 330px; margin: 0 auto; padding: 14px 16px; background: #fff; color: #111; border: 1px solid var(--line); border-radius: 10px; line-height: 1.35; }
/* every size below follows the ticket's width (cqw), so it fits any paper: 58 / 80 mm thermal rolls up to A4 */
.order-ticket .ot-brand { text-align: center; font-weight: 700; font-size: max(4.55cqw, 8pt); }
.order-ticket .ot-title { text-align: center; font-size: max(3.64cqw, 7pt); font-weight: 700; letter-spacing: .18em; color: #555; margin-bottom: 2.4cqw; }
.order-ticket .ot-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2.4cqw; border-top: 1px dashed #999; border-bottom: 1px dashed #999; padding: 2.4cqw 0; }
.order-ticket .ot-label { font-size: max(3.64cqw, 7pt); font-weight: 700; letter-spacing: .12em; color: #555; }
.order-ticket .ot-table { font-size: max(10.30cqw, 16pt); font-weight: 700; line-height: 1; }
.order-ticket .ot-no { font-size: max(3.94cqw, 7.5pt); font-weight: 700; font-variant-numeric: tabular-nums; }
.order-ticket .ot-meta { padding: 1.8cqw 0; border-bottom: 1px dashed #999; }
.order-ticket .ot-kv { display: flex; justify-content: space-between; gap: 2.4cqw; font-size: max(3.94cqw, 7.5pt); } .order-ticket .ot-kv span { color: #555; }
.order-ticket .ot-lines { padding: 1.8cqw 0; border-bottom: 1px dashed #999; }
.order-ticket .ot-line { display: grid; grid-template-columns: 2.4em 1fr auto; gap: 1.8cqw; align-items: baseline; font-size: max(4.85cqw, 9pt); padding: 0.9cqw 0; }
.order-ticket .ot-line small { display: block; font-size: max(3.64cqw, 7pt); color: #555; }
.order-ticket .ot-th { font-size: max(3.64cqw, 7pt); font-weight: 700; letter-spacing: .1em; color: #555; text-transform: uppercase; padding-top: 0; }
.order-ticket .ot-amt { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.order-ticket .ot-total { display: flex; justify-content: space-between; font-size: max(5.76cqw, 10pt); font-weight: 700; padding: 2.4cqw 0 1.2cqw; font-variant-numeric: tabular-nums; }
.order-ticket .ot-note { font-size: max(3.64cqw, 7pt); color: #333; padding-top: 1.2cqw; }
.order-ticket .ot-qr { text-align: center; padding-top: 3cqw; margin-top: 1.8cqw; border-top: 1px dashed #999; font-size: max(3.33cqw, 6.5pt); color: #555; }
.order-ticket .ot-qr svg { display: block; width: 45cqw; height: auto; margin: 0 auto 1.8cqw; }
.ticket.delayed { --s: var(--red); background: #fff7f6; }
.ticket-timer { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .55rem; align-items: center; margin: .45rem 0 .35rem; }
.ticket .big { font-size: var(--fs-2xl); font-weight: 700; font-variant-numeric: tabular-nums; }
.tbar { height: 8px; background: #eef1ef; border-radius: 99px; overflow: hidden; } .tbar span { display: block; height: 100%; background: var(--s); border-radius: 99px; transition: width .6s ease; }
.kline { padding: .3rem 0; border-top: 1px dashed var(--line); } .kline:first-child { border-top: 0; } .ticket .ti { font-size: var(--fs-lg); }
.ticket > .btn.big { width: 100%; margin-top: .5rem; flex: none; }
.ticket-done { margin-top: .5rem; text-align: center; font-weight: 700; color: var(--green); background: var(--green-bg); border-radius: 8px; padding: .55rem; }
@media (prefers-reduced-motion: reduce) { .ocard, .ticket, .tbar span { transition: none; } .ocard:hover, .ticket:hover { transform: none; } }
.mod { color: var(--blue); font-size: var(--fs-md); } .ins { background: var(--yellow-bg); border-left: 4px solid #d99a00; padding: .2rem .5rem; margin-top: .2rem; font-weight: 600; }

/* modal + toast */
.overlay { position: fixed; inset: 0; background: rgba(10,20,15,.55); display: grid; place-items: center; z-index: 60; padding: .75rem; overflow: auto; }
.modal { background: #fff; border-radius: 12px; width: min(720px, 100%); max-height: 94vh; overflow: auto; padding: 1rem 1.1rem; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.modal.wide { width: min(1000px, 100%); } .modal.narrow { width: min(460px, 100%); } .modal h2 { border-bottom: 1px solid var(--line); padding-bottom: .5rem; }
.modal .foot { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1rem; flex-wrap: wrap; }
/* notifications: top right under the header (lib.js sets the top), click-through except the ×, newest first, at most three */
#toasts { position: fixed; top: 12px; right: 12px; display: flex; flex-direction: column; gap: .45rem; z-index: 100; width: min(360px, calc(100vw - 24px)); pointer-events: none; }
.toast { --tc: var(--green); position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: .6rem; pointer-events: none;
  background: #fff; color: var(--ink); padding: .65rem .5rem .75rem .7rem; border: 1px solid var(--line); border-left: 4px solid var(--tc); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(16, 40, 30, .16); font-size: var(--fs-base); line-height: 1.35; animation: toast-in .2s ease-out; transition: opacity .2s, transform .2s; }
.toast.error { --tc: var(--red); } .toast.info { --tc: var(--blue); }
#toasts .toast.warn { --tc: #d97706; background: #fff; color: var(--ink); padding: .65rem .5rem .75rem .7rem; border-radius: 10px; } /* not the page's .warn note */
.toast-ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--tc); color: #fff; font-size: var(--fs-2xs); font-weight: 700; }
.toast-msg { padding-top: 1px; overflow-wrap: anywhere; }
.toast-x { pointer-events: auto; border: 0; background: none; color: var(--muted); font-size: var(--fs-xl); line-height: 1; padding: 0 .25rem; cursor: pointer; border-radius: 6px; }
.toast-x:hover { background: #f0f4f2; color: var(--ink); }
.toast-life { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: var(--tc); opacity: .35; transform-origin: left; animation: toast-life var(--life, 4s) linear forwards; }
.toast.out { opacity: 0; transform: translateX(16px); }
@keyframes toast-in { from { opacity: 0; transform: translateX(16px); } }
@keyframes toast-life { to { transform: scaleX(0); } }
@media (max-width: 600px) { #toasts { left: 8px; right: 8px; width: auto; } }
.empty { padding: 2rem 1rem; text-align: center; color: var(--muted); } .loading { padding: 2rem; text-align: center; color: var(--muted); }
.err { background: var(--red-bg); color: var(--red); padding: .6rem .8rem; border-radius: 8px; font-weight: 600; margin-bottom: .6rem; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: linear-gradient(160deg, #12261b, #1e7a3c); }
.login .card { width: min(400px, 100%); padding: 1.4rem; }
.hint { font-size: var(--fs-sm); color: var(--muted); }
/* login page logo (hover effect lives only here) */
.login-brand { text-align: center; margin-bottom: 1rem; }
.login-logo { display: block; width: 136px; height: 136px; margin: 0 auto .6rem; border-radius: 16px; cursor: default;
  box-shadow: 0 6px 18px rgba(10, 40, 20, .25); transition: transform .35s cubic-bezier(.2, .8, .2, 1.2), box-shadow .35s ease, filter .35s ease; }
.login-logo:hover { transform: translateY(-4px) scale(1.07); box-shadow: 0 0 0 4px rgba(233, 184, 54, .35), 0 14px 30px rgba(10, 40, 20, .35); filter: saturate(1.12) brightness(1.04); }
.login-title { font-size: var(--fs-2xl); font-weight: 700; color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .login-logo, .login-logo:hover { transition: none; transform: none; } }

/* kitchen ticket printing (the slip itself is drawn only on paper) */
@media screen { .print-area.kprint { display: none; } }
.btn.ghost.on { background: var(--green-bg); border-color: var(--green); color: var(--green); }
.ticket > .kact { display: flex; gap: .4rem; margin-top: .5rem; flex: none; }
.ticket > .kact .btn.big { flex: 1; margin: 0; }
.ticket > .kact .kprint-btn { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: .2rem .55rem; font-size: var(--fs-lg); line-height: 1.1; }
.ticket > .kact .kprint-btn span { font-size: var(--fs-2xs); font-weight: 700; }

/* receipt */
.receipt { font-family: "Courier New", monospace; font-size: 13px; width: 300px; max-width: 100%; margin: 0 auto; color: #000; background: #fff; padding: 8px; }
.receipt hr { border: 0; border-top: 1px dashed #000; } .receipt .c { text-align: center; } .receipt .r { display: flex; justify-content: space-between; gap: 8px; }
@media print {
  body * { visibility: hidden !important; }
  .print-area, .print-area * { visibility: visible !important; }
  .print-area { position: absolute; left: 0; top: 0; width: 100%; }
  /* kitchen ticket for a small receipt / thermal printer: one slip per order, no prices */
  .kprint .kp-ticket { width: var(--kp-w, 74mm); margin: 0 3mm; padding: 2mm 0 8mm; font: 11pt/1.3 "Courier New", monospace; color: #000; break-after: page; page-break-after: always; }
  .kprint .kp-ticket:last-child { break-after: auto; page-break-after: auto; }
  .kprint .kp-where { text-align: center; font-size: 17pt; font-weight: 700; margin-top: 1mm; }
  .kprint .kp-no { text-align: center; font-size: 13pt; font-weight: 700; }
  .kprint .kp-item { margin: 1.5mm 0; } .kprint .kp-sub { padding-left: 4mm; }
  .kprint .kp-rule { border-top: 1px dashed #000; margin: 2mm 0; }
  .kprint .kp-c { text-align: center; } .kprint .kp-bold { font-weight: 700; } .kprint .kp-small { font-size: 9pt; }
  .overlay { background: none; } .modal { box-shadow: none; max-height: none; overflow: visible; }
  .order-ticket.print-area { left: 0; right: 0; width: auto; max-width: none; margin: 0 auto; padding: 0 1mm; border: none; border-radius: 0; color: #000; }
  .order-ticket.print-area .ot-title, .order-ticket.print-area .ot-label, .order-ticket.print-area .ot-kv span, .order-ticket.print-area .ot-th, .order-ticket.print-area small, .order-ticket.print-area .ot-qr { color: #000; }
  @page { margin: 6mm; }
  /* a document printed on its own (purchase order, request for quotation): nothing else on the screen takes space */
  body.printing-doc > *:not(.print-area) { display: none !important; }
  body.printing-doc .print-area { position: static; }
}
/* on sheet paper (A4, Letter, short / long bond: wider than 90 mm) the order ticket prints at 58 mm roll size in the top-left
   corner, small, leaving the rest of the sheet; on a thermal roll (58 / 80 mm) it takes the roll's width */
@media print and (min-width: 90mm) { .order-ticket.print-area { right: auto; width: 54mm; max-width: 54mm; margin: 0; } }
/* printed documents: the same layout on screen (preview) and on paper */
.print-doc { padding: 14px; color: #000; background: #fff; font-size: 13px; line-height: 1.35; }
.print-doc table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.print-doc td, .print-doc th { vertical-align: top; overflow-wrap: anywhere; }
.print-doc p { margin: .5rem 0; }
.print-preview { background: #d9dce1; padding: 16px; border-radius: 8px; overflow: auto; max-height: 70vh; }
.print-sheet { background: #fff; width: 210mm; max-width: 100%; min-height: 200mm; margin: 0 auto; box-shadow: 0 2px 10px rgba(0,0,0,.25); }

/* responsive */
@media (max-width: 1100px) { .pos { grid-template-columns: minmax(0, 1fr) 330px; } .kcols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 50; transform: translateX(-105%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
  .menu-btn { display: inline-flex; }
  .side-toggle { display: none; } /* phones and small tablets keep the ☰ drawer */
  .pos { grid-template-columns: minmax(0, 1fr); } .pos > * { min-width: 0; } .cart { position: static; }
  .kcols { grid-template-columns: 1fr; } .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  html { font-size: 15px; } .content { padding: .6rem 1rem; } .top { gap: .4rem; padding: .5rem .6rem; } .top .who { display: none; } .top .who.has-switch { display: block; } .top .who.has-switch .who-name, .top .who .acting-note { display: none; } .role-switch { max-width: 150px; } .grid2, .grid3 { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  table.rt thead { display: none; } table.rt, table.rt tbody, table.rt tr, table.rt td { display: block; width: 100%; }
  table.rt tr { border-bottom: 2px solid var(--line); padding: .4rem 0; }
  table.rt td { border: 0; padding: .2rem .65rem; display: flex; justify-content: space-between; gap: .8rem; text-align: right; }
  table.rt td::before { content: attr(data-label); font-weight: 700; color: var(--muted); text-align: left; flex: none; }
  table.rt td.num { text-align: right; }
  .overlay { align-items: end; padding: 0; } .modal { border-radius: 14px 14px 0 0; max-height: 96vh; }
  .btn { min-height: 44px; }
}

/* menu photo: original vs automatic hero shot */
.hero-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: .4rem 0; }
.hero-pick { margin: 0; border: 2px solid var(--line); border-radius: 10px; padding: .3rem; text-align: center; background: #fff; }
.hero-pick.on { border-color: var(--green); box-shadow: 0 0 0 2px var(--green-bg); }
.hero-pick img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #f3f1ed; border-radius: 7px; display: block; }
.hero-pick figcaption { font-size: var(--fs-sm); font-weight: 700; margin-top: .25rem; }
/* photo framing editor (drag to move, zoom to enlarge) */
.frame-editor { margin: .5rem 0; padding: .6rem; border: 1px solid var(--line); border-radius: 12px; background: #fafbfa; }
.frame-stage { position: relative; width: min(100%, 320px); aspect-ratio: 1; margin: 0 auto; border-radius: 12px; overflow: hidden; cursor: grab; touch-action: none; user-select: none; background: #ddd; outline-offset: 3px; }
.frame-stage.dragging { cursor: grabbing; } .frame-stage:focus-visible { outline: 3px solid var(--accent); }
.frame-canvas { width: 100%; height: 100%; display: block; }

.frame-editor input[type=range] { flex: 1; accent-color: var(--accent); }

/* menu item details (recipe + moderate photo; recipe only for kitchen) */
.idet.with-photo { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 1rem; align-items: start; }
.idet-photo { margin: 0; background: #f4f5f4; border-radius: 12px; overflow: hidden; display: grid; place-items: center; max-height: 340px; }
.idet-photo img { display: block; max-width: 100%; max-height: 340px; width: auto; height: auto; object-fit: contain; }
.idet-nophoto { padding: 3rem 1rem; color: var(--muted); font-weight: 600; text-align: center; }
.idet-table { width: 100%; border-collapse: collapse; font-size: var(--fs-base); } .idet-table th { text-align: left; color: var(--muted); font-size: var(--fs-sm); border-bottom: 1px solid var(--line); padding: .25rem 0; }
.idet-table td { padding: .3rem 0; border-bottom: 1px dashed var(--line); } .idet-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.idet-steps { margin-top: .6rem; } .idet-steps > b { display: block; margin-bottom: .15rem; }
.idet-empty { padding: .7rem; border-radius: 8px; background: #f4f5f4; color: var(--muted); font-weight: 600; }
.idet-trigger { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 6px; }
.idet-trigger:hover b, .idet-trigger:focus-visible b { text-decoration: underline; } .idet-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.item-wrap { position: relative; display: flex; } .item-wrap > .item { flex: 1; min-width: 0; }
.item .thumb.zoomable { cursor: zoom-in; } .item .thumb.zoomable:hover { filter: brightness(1.05); box-shadow: 0 0 0 2px var(--accent-bg); }
.idet-preview .idet-photo { max-height: none; } .idet-preview .idet-photo img { max-height: min(440px, 62vh); }
@media (max-width: 640px) { .idet.with-photo { grid-template-columns: 1fr; } .idet-photo, .idet-photo img { max-height: 240px; } }

/* payment method picker (order form) and payment chip on order cards */
.paypick { display: flex; gap: .4rem; flex-wrap: wrap; }
.paypick button { flex: 1; min-height: 40px; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.paypick button.on { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); }
.paychip { min-width: 0; overflow: hidden; } .paychip .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* Administration → Online payments (owner's PayMongo / Xendit setup) */
.paylogo { font-weight: 700; letter-spacing: -.02em; font-size: var(--fs-2xl); text-transform: lowercase; }
.paylogo.paymongo { color: #1fa37a; } .paylogo.xendit { color: #2464e8; }
.paylogo.big { font-size: 2.2rem; text-align: center; margin: .2rem 0 .6rem; }
.paykeys { display: grid; grid-template-columns: auto 1fr; gap: .25rem .8rem; margin: .7rem 0 .2rem; font-size: var(--fs-base); }
.paykeys dt { color: var(--muted); } .paykeys dd { margin: 0; font-family: ui-monospace, Consolas, monospace; word-break: break-all; } .paykeys dd.plain { font-family: inherit; }
.payhelp { background: #e9f8f1; border: 1px solid #9ed9bf; border-radius: 10px; padding: .6rem .8rem; margin-bottom: .7rem; font-size: var(--fs-md); color: #17402f; }
.payhelp ol { margin: .35rem 0 0; padding-left: 1.2rem; } .payhelp li { margin: .15rem 0; } .payhelp a { color: #0b7a55; font-weight: 700; }
.paysetup .keyrow { display: flex; gap: .35rem; align-items: center; } .paysetup .keyrow input { flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; }
.paysetup .switchrow { display: flex; gap: .5rem; align-items: center; min-height: 40px; color: var(--ink); font-weight: 600; }
.paysetup .switchrow input { width: 22px; height: 22px; accent-color: var(--accent); }
.payhook { margin: .4rem 0 .6rem; border: 1px solid var(--line); border-radius: 10px; padding: .5rem .7rem; } .payhook summary { cursor: pointer; font-weight: 700; }
/* Ready ticket on a waiter's / cashier's kitchen screen: ready time and the Served button */
.ticket-serve { margin-top: .5rem; text-align: center; } .ticket-serve .small { color: var(--green); font-weight: 700; margin-bottom: .35rem; }
.ticket-serve .btn { width: 100%; }

/* accounting statements */
table.fin { width: 100%; border-collapse: collapse; background: var(--card); }
table.fin th, table.fin td { padding: .4rem .6rem; border-bottom: 1px solid var(--line); text-align: left; }
table.fin .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.fin tr.fin-sec td { font-weight: 700; padding-top: .9rem; border-bottom: 2px solid var(--line); }
table.fin tr.fin-sub td { font-weight: 700; color: var(--muted); }
table.fin tr.fin-acc td:first-child { padding-left: 1.5rem; }
table.fin tr.fin-tot td { font-weight: 700; }
table.fin tr.fin-grand td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 3px double var(--ink); }
table.fin tr.click { cursor: pointer; } table.fin tr.click:hover { background: var(--bg); }
/* Profit and loss: compact, half the page wide; wider when another period is compared */
.pl-wrap { max-width: 760px; margin: 0 auto; } .pl-wrap.wide { max-width: 1280px; }
table.fin.pl th, table.fin.pl td { padding: .22rem .6rem; font-size: var(--fs-base); }
table.fin.pl tr.fin-sec td { padding-top: .55rem; } table.fin.pl tr.fin-cat td { font-size: var(--fs-md); }
table.fin.pl .pl-pct { color: var(--muted); font-size: var(--fs-md); } table.fin.pl tr.fin-grand .pl-pct, table.fin.pl tr.fin-tot .pl-pct { color: inherit; }
table.fin.pl .pl-c1 { border-left: 1px solid var(--line); } table.fin.pl .pl-down { color: #b91c1c; }
.pl-cmp { gap: .4rem; align-items: center; }
table.rt tr.fin-tot td { font-weight: 700; border-top: 2px solid var(--line); }
.warn { background: var(--yellow-bg); color: var(--yellow); padding: .45rem .7rem; border-radius: 6px; }

.login-golf { display: grid; gap: .45rem; justify-items: center; margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.login-golf a.btn { text-decoration: none; display: flex; justify-content: center; align-items: center; }

/* recipe card (Menu & Recipes) */
.rcard { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 2fr); gap: 1.2rem; align-items: start; }
.rcard-left h2 { margin: .4rem 0 .2rem; } .rcard-left img { width: 100%; max-width: 240px; aspect-ratio: 1; object-fit: cover; border-radius: 50%; display: block; margin: 0 auto .4rem; }
.rcard-cost { display: grid; gap: .25rem; margin-top: .7rem; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.rcard-cost > div { display: flex; justify-content: space-between; gap: .5rem; font-size: var(--fs-base); }
@media (max-width: 760px) { .rcard { grid-template-columns: 1fr; } }
.modal label.row input[type=checkbox], label.row input[type=checkbox] { width: auto; flex: none; margin: 0; }
label.row { flex-wrap: nowrap; align-items: center; gap: .45rem; }
/* recipe ingredients builder (menu item form, recipe editor) */
.rb-card { padding: .7rem .8rem; margin: .5rem 0; }
.rb-table td { vertical-align: top; }
.rb-table select { min-width: 150px; }
.rb-bad td { background: color-mix(in srgb, var(--red) 7%, transparent); }
.kit-rcp ul { margin: .2rem 0 .3rem; padding-left: 1.1rem; }
.kit-rcp li { margin: .05rem 0; }
.kit-ingr { margin-top: .2rem; font-weight: 700; }
/* unit picker (inventory item forms) */
.form-sec { margin: .9rem 0 .35rem; font-size: var(--fs-base); border-bottom: 1px solid var(--line); padding-bottom: .2rem; }
.unit-fields .grid3 { align-items: start; }
.unit-sum { margin: .3rem 0 .2rem; padding: .45rem .6rem; border-radius: 8px; background: color-mix(in srgb, var(--green) 8%, transparent); font-size: var(--fs-md); }
/* budgets editor (Accounting → Setup) */
.budget-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .4rem; }
/* role and permission matrix */
/* Role and Permission Management: a fixed grid — Function, then View | Edit for each role. Every column has a fixed width
   and every row the same height, so each box sits in the same place; the wrapper scrolls both ways with the role
   headers (top) and the Function column (left) kept in view. */
.rm-wrap { --fn: 340px; --sub: 54px; --row: 48px; overflow: auto; max-height: calc(100vh - 240px); min-height: 320px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overscroll-behavior: contain; scrollbar-gutter: stable; }
.rm { table-layout: fixed; border-collapse: separate; border-spacing: 0; width: calc(var(--fn) + var(--roles) * 2 * var(--sub)); font-size: var(--fs-md); }
.rm col.rm-c-fn { width: var(--fn); } .rm col.rm-c { width: var(--sub); }
.rm th, .rm td { border-bottom: 1px solid var(--line); padding: 0; height: var(--row); vertical-align: middle; background: #fff; }
.rm .rm-alt { background: #f6f9f7; }
.rm .rm-first { border-left: 1px solid var(--line); }
.rm thead th { position: sticky; z-index: 2; color: var(--muted); font-weight: 700; }
.rm tr.rm-h1 th { top: 0; height: 58px; }
.rm tr.rm-h2 th { top: 58px; height: 26px; border-bottom: 2px solid var(--line); }
.rm th.rm-role { border-left: 1px solid var(--line); text-align: center; padding: .3rem .25rem 0; vertical-align: top; color: var(--text, #1f2a24); }
.rm .rm-rname { font-size: var(--fs-xs); line-height: 1.15; letter-spacing: 0; text-transform: none; overflow-wrap: anywhere; height: 2.3em; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.rm .rm-reset { height: 22px; display: flex; align-items: center; justify-content: center; } .rm .rm-reset .btn { min-height: 0; height: 20px; padding: 0 .5rem; font-size: var(--fs-2xs); }
.rm th.rm-sub { text-align: center; font-size: var(--fs-2xs); letter-spacing: .06em; text-transform: uppercase; }
.rm th.rm-fn { position: sticky; left: 0; z-index: 1; text-align: left; font-weight: 500; color: inherit; padding: .2rem .8rem; line-height: 1.3; border-right: 1px solid var(--line); box-shadow: 4px 0 6px -4px rgba(0,0,0,.12); }
.rm thead th.rm-fn { z-index: 3; top: 0; vertical-align: bottom; padding-bottom: .5rem; font-weight: 700; color: var(--muted); border-bottom: 2px solid var(--line); }
.rm tr.rm-group th, .rm tr.rm-group td { background: var(--bg); height: 34px; border-top: 1px solid var(--line); }
.rm tr.rm-group th.rm-fn { font-weight: 700; font-size: var(--fs-sm); letter-spacing: .02em; color: var(--text, #1f2a24); white-space: nowrap; overflow: visible; z-index: 2; }
.rm td.rm-cell { text-align: center; }
.rm tbody th { top: auto; text-transform: none; letter-spacing: normal; font-size: inherit; } /* row names: not the app-wide upper-case header that sticks to the top */
.rm .rm-lbl { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; } /* every row the same height; the full name is in the tooltip */
.rm .rm-box, .rm .rm-mark { display: block; width: 18px; height: 18px; margin: 0 auto; }
.rm .rm-box { accent-color: var(--green); cursor: pointer; } .rm .rm-box:disabled { cursor: progress; }
.rm .rm-box.rm-diff { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 3px; }
.rm .rm-mark { box-sizing: border-box; border: 1.5px solid #c9d3cd; border-radius: 4px; font-size: 12px; line-height: 15px; font-weight: 700; text-align: center; color: #fff; }
.rm .rm-mark.on { background: #8bbf9d; border-color: #8bbf9d; } .rm .rm-mark.half { background: #fff4e5; border-color: #e7b77a; color: #b45309; }
.rm td.rm-na { color: #c3ccc6; font-size: var(--fs-md); }
.rm tbody tr:not(.rm-group):hover th, .rm tbody tr:not(.rm-group):hover td { background: #eef6f1; }
@media (max-width: 640px) { .rm-wrap { --fn: 180px; --sub: 46px; --row: 58px; } .rm .rm-lbl { -webkit-line-clamp: 3; line-clamp: 3; } .rm-wrap { max-height: calc(100vh - 170px); } .rm { font-size: var(--fs-sm); } .rm th.rm-fn { padding: .2rem .5rem; } }
/* purchase request stock review: tidy, evenly spaced, headers on one or two lines */
.stock-review table th { white-space: normal; font-size: var(--fs-2xs); line-height: 1.2; vertical-align: bottom; }
.stock-review table td { vertical-align: top; }
.stock-review table td:nth-child(3), .stock-review table th:nth-child(3), .stock-review table td:nth-child(9), .stock-review table th:nth-child(9) { background: #f4f8f5; }
.rm tr.rm-group td { background: var(--bg); font-weight: 700; }
/* simplified stock levels (Reorder level, Target stock; critical / minimum under More levels) */
.levels .more-levels { margin: .3rem 0 .7rem; }
.levels .more-levels summary { cursor: pointer; color: var(--muted, #667085); }
/* waiter menu: a short note about the dish under its name */
.item .desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: var(--fs-sm); line-height: 1.3; font-weight: 400; }

/* ===== Finance Home: QuickBooks-style flows (pages/finance-home.js) ===== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.fh-tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin: -.2rem 0 1.4rem; }
.fh-tabs button { border: 0; background: none; padding: .55rem .95rem; font: inherit; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; }
.fh-tabs button.on { color: var(--ink); border-bottom-color: #1e7a3c; }
.fh-banner { display: flex; gap: .8rem; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1.3rem; padding: .7rem .9rem; border-radius: var(--radius); background: var(--yellow-bg); color: var(--yellow); border: 1px solid #ecd27a; }
.fh-banner .btn { text-decoration: none; }
.fh { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; align-items: start; }
.fh-main { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 1.3rem 1rem; align-items: start; }
.fh-col { display: grid; gap: 1.4rem; }
.fh-panel { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem .8rem .8rem; --pc: #1f5fa8; --pcbg: #eaf1fb; }
.fh-panel.vendors { --pc: #6b3fa0; --pcbg: #f3edf9; } .fh-panel.customers { --pc: #1f5fa8; --pcbg: #eaf1fb; } .fh-panel.employees { --pc: #1e7a3c; --pcbg: #e8f4ec; }
.fh-panel.company { --pc: #0f766e; --pcbg: #e6f4f2; } .fh-panel.banking { --pc: #8a6100; --pcbg: #fff4d6; } .fh-panel.reports { --pc: #5c6b17; --pcbg: #f1f4e3; }
.fh-tab { position: absolute; top: -.72rem; left: 50%; transform: translateX(-50%); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: .12rem .75rem; font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .08em; color: var(--pc); white-space: nowrap; }
.fh-flow { display: flex; align-items: flex-start; justify-content: space-between; gap: .2rem; }
.fh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .5rem .3rem; justify-items: center; }
.fh-flow + .fh-grid, .fh-conv + .fh-grid { margin-top: .8rem; padding-top: .8rem; border-top: 1px dashed var(--line); }
.fh-node { display: flex; flex-direction: column; align-items: center; gap: .28rem; width: 96px; padding: .45rem .25rem; border-radius: 10px; text-decoration: none; color: var(--ink); text-align: center; flex: none; }
.fh-node:hover { background: var(--pcbg); }
.fh-node:focus-visible { outline: 2px solid var(--pc); outline-offset: 1px; }
.fh-ico { position: relative; width: 48px; height: 48px; display: grid; place-items: center; font-size: var(--fs-2xl); line-height: 1; border-radius: 12px; background: var(--pcbg); box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); }
.fh-node:hover .fh-ico { box-shadow: inset 0 0 0 2px var(--pc); }
.fh-lbl { font-size: var(--fs-md); font-weight: 600; line-height: 1.15; }
.fh-sub { font-size: var(--fs-2xs); color: var(--muted); line-height: 1.15; }
.fh-badge { position: absolute; top: -7px; right: -9px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--pc); color: #fff; font-size: var(--fs-2xs); font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.fh-badge.warn { background: #c2410c; } .fh-badge.bad { background: #b91c1c; }
.fh-arrow { display: block; flex: 1 1 14px; min-width: 14px; max-width: 90px; height: 2px; margin-top: 31px; background: #b8c5be; position: relative; }
.fh-arrow.fh-gap { visibility: hidden; } /* keeps POS Sales in line with Receive Payments, without an arrow */
.fh-arrow::after { content: ''; position: absolute; right: -1px; top: -4px; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent #b8c5be; }
/* customers: invoices → collect, and POS sales below it, both arrow into Record Deposits (spanning the two rows) */
.fh-conv { display: grid; grid-template-columns: auto minmax(14px, 1fr) auto minmax(28px, 1fr); align-items: start; row-gap: .4rem; }
.fh-bill { grid-column: 1; grid-row: 2; }
.fh-main { position: relative; }
.fh-links { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; z-index: 1; }
.fh-arrow.fh-to-bank.linked::after { display: none; } /* the line goes on into Banking */
table.fin tr.fin-cg td { font-weight: 700; background: #f7faf8; }
table.fin tr.fin-cg td:first-child { padding-left: 1.5rem; }
table.fin tr.fin-cg:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cg-chev { display: inline-block; width: 1rem; color: var(--muted); }
table.fin tr.fin-cg-detail > td { padding: .4rem .6rem 1rem 1.5rem; background: #fbfcfb; }
.cg-detail .cg-flow { margin-top: .4rem; }
.bs-head { text-align: center; margin: .6rem 0 .4rem; }
.fh-conv .fh-arrow { max-width: none; }
.fh-dep { grid-column: 5; grid-row: 1 / span 2; align-self: center; }
.fh-pos { grid-column: 3; grid-row: 2; } .fh-pos-arrow { grid-column: 4; grid-row: 2; }
.fh-bal { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); position: sticky; top: 72px; max-height: calc(100vh - 90px); overflow-y: auto; }
.fh-bal h3 { margin: 0; padding: .6rem .8rem; font-size: var(--fs-sm); letter-spacing: .07em; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
.fh-bal .grp { padding: .55rem .8rem .2rem; font-size: var(--fs-2xs); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.fh-bal a { display: flex; justify-content: space-between; gap: .6rem; padding: .42rem .8rem; text-decoration: none; color: var(--ink); border-bottom: 1px solid #eef2ef; font-size: var(--fs-md); }
.fh-bal a:hover { background: #f1f6f3; }
.fh-bal .n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fh-bal .v { font-variant-numeric: tabular-nums; white-space: nowrap; } .fh-bal .neg { color: #b91c1c; }
@media (max-width: 1400px) { .fh { grid-template-columns: 1fr; } .fh-bal { position: static; max-height: none; } }
@media (max-width: 1000px) { .fh-main { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .fh-arrow, .fh-pos-arrow { display: none; }
  .fh-flow, .fh-conv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); justify-items: center; }
  .fh-dep, .fh-pos, .fh-bill { grid-column: auto; grid-row: auto; align-self: start; }
  .fh-node { width: 92px; }
}

/* ===== Customer Payment (Receive Payments, QuickBooks-style) — pages/accounting.js collectForm ===== */
.modal.xl { width: min(1180px, 100%); }
.cp-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr) minmax(0, .8fr); gap: 1rem 1.4rem; align-items: start; }
.cp .field { margin-bottom: .55rem; }
.cp-amount { font-size: var(--fs-xl); font-weight: 700; text-align: right; }
.cp-methods { display: flex; flex-wrap: wrap; gap: .4rem; margin: .1rem 0 .65rem; }
.cp-method { display: flex; flex-direction: column; align-items: center; gap: .15rem; min-width: 84px; padding: .45rem .5rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); cursor: pointer; }
.cp-method:hover { background: #f1f6f3; }
.cp-method.on { border-color: #1e7a3c; background: #e8f4ec; box-shadow: inset 0 0 0 1px #1e7a3c; }
.cp-mico { font-size: var(--fs-xl); line-height: 1; }
.cp-bal { text-align: right; padding: .3rem 0 .7rem; }
.cp-bal-l { font-size: var(--fs-2xs); letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.cp-bal-v { font-size: var(--fs-2xl); font-weight: 700; font-variant-numeric: tabular-nums; }
.cp-ar { text-align: right; } .cp-ar label { text-align: right; }
.cp-warn:empty { display: none; }
.cp-warn { margin: .2rem 0 .5rem; padding: .5rem .7rem; border-radius: 8px; background: #fdecea; color: #8a1c13; border: 1px solid #f3b8b1; font-size: var(--fs-base); }
.cp-tools { display: flex; gap: .4rem; justify-content: flex-end; margin: .3rem 0 .4rem; }
.cp-grid .cp-chk { width: 34px; text-align: center; }
.cp-grid .cp-chk input { width: 18px; height: 18px; }
.cp-grid tr.cp-on td { background: #f2f8f4; }
.cp-grid .cp-pay { width: 130px; text-align: right; }
.cp-grid tfoot td { border-top: 2px solid var(--line); background: #fafcfb; }
.cp-late { font-size: var(--fs-xs); color: #b91c1c; }
.cp-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 1rem; align-items: start; margin-top: .8rem; }
.cp-sum { border: 1px solid var(--line); border-radius: 8px; padding: .5rem .75rem; }
.cp-sum-h { font-size: var(--fs-2xs); letter-spacing: .07em; color: var(--muted); font-weight: 700; margin-bottom: .25rem; }
.cp-sum-r { display: flex; justify-content: space-between; gap: .6rem; padding: .18rem 0; font-variant-numeric: tabular-nums; }
.cp-sum-r.total { border-top: 1px solid var(--line); margin-top: .25rem; padding-top: .35rem; }
@media (max-width: 900px) { .cp-head { grid-template-columns: 1fr 1fr; } .cp-right { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 1rem; } .cp-bal, .cp-ar, .cp-ar label { text-align: left; } }
@media (max-width: 640px) { .cp-head, .cp-foot { grid-template-columns: 1fr; } .cp-right { display: block; } .cp-grid .cp-pay { width: 100px; } }

/* ===== Enter Bills (QuickBooks-style) — pages/accounting.js billForm ===== */
.eb-bill { position: relative; border: 2px solid #b9b3df; border-radius: 6px; padding: .5rem 1rem .4rem; margin-bottom: 1rem;
  background: repeating-linear-gradient(135deg, #f3f2fc 0 14px, #eeedf9 14px 15px); box-shadow: inset 0 0 0 4px #fff; }
.eb-title { font-size: 2.1rem; font-weight: 700; color: #3d3a68; letter-spacing: -.01em; margin-bottom: .2rem; }
.eb-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0 1.6rem; }
.eb-bill .field { margin-bottom: .55rem; }
.eb-bill input, .eb-bill select { background: #fff; }
.eb-addr { min-height: 74px; white-space: pre-line; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: var(--fs-base); color: var(--ink); }
.eb-amount { padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-align: right; font-size: var(--fs-xl); font-weight: 700; font-variant-numeric: tabular-nums; }
.eb-tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); }
.eb-tabs button { display: flex; gap: .9rem; align-items: baseline; padding: .5rem .9rem; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: #f2f4f3; font: inherit; color: var(--muted); cursor: pointer; margin-bottom: -1px; }
.eb-tabs button.on { background: #fff; color: var(--ink); font-weight: 700; }
.eb-tabs button b { font-variant-numeric: tabular-nums; }
.eb-pane { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 8px 8px; padding: .6rem; background: #fff; }
.eb-grid select { width: 100%; min-width: 220px; } .eb-grid td:nth-child(3) input { width: 100%; }
.eb-amt { width: 130px; text-align: right; }
.eb-diff { color: #b45309; font-weight: 600; }
@media (max-width: 760px) { .eb-cols { grid-template-columns: 1fr; } .eb-title { font-size: var(--fs-2xl); } .eb-grid select { min-width: 160px; } .eb-amt { width: 100px; } }

/* ===== Pay Bills (QuickBooks-style) — pages/accounting.js payForm ===== */
.pb-sec { font-size: var(--fs-xs); letter-spacing: .07em; color: var(--muted); font-weight: 700; margin: 0 0 .4rem; }
.pb-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .6rem 2rem; margin-bottom: .6rem; }
.pb-show { display: flex; gap: 1rem; align-items: flex-start; }
.pb-lab { font-weight: 600; padding-top: .45rem; }
.pb-opts { display: flex; flex-direction: column; gap: .35rem; }
.pb-due { display: flex; align-items: center; gap: .6rem; } .pb-due input[type=date] { width: 160px; }
.pb-radio { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; white-space: nowrap; }
.pb-radio input { width: 16px; height: 16px; margin: 0; }
.pb-filt { display: grid; grid-template-columns: minmax(240px, 300px) 170px; gap: .8rem; }
.pb-filt .field { margin-bottom: 0; }
.pb-scroll { max-height: 340px; overflow-y: auto; }
.pb-scroll thead th { position: sticky; top: 0; z-index: 1; }
.pb-scroll tfoot td { position: sticky; bottom: 0; }
.pb-grid tbody tr { cursor: pointer; }
.pb-grid tr.pb-hl td { background: #dcefe3; } .pb-grid tr.pb-hl td:first-child { box-shadow: inset 3px 0 0 #1e7a3c; }
.pb-tools { display: flex; align-items: center; gap: .8rem; margin: .45rem 0 .8rem; }
.pb-note { font-size: var(--fs-md); color: #92400e; }
.pb-bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 1rem; align-items: start; }
.pb-info, .pb-pay { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; }
.pb-info-g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem 1rem; margin-bottom: .6rem; }
.pb-k { font-size: var(--fs-xs); color: var(--muted); } .pb-v { font-weight: 600; overflow-wrap: anywhere; }
.pb-pay-g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .8rem; }
.pb-pay .field { margin-bottom: .5rem; }
.pb-bal { display: flex; justify-content: space-between; gap: .6rem; padding: .15rem 0; font-variant-numeric: tabular-nums; }
.pb-neg { color: #b91c1c; }
.pb-sum { margin: .45rem 0 .2rem; padding-top: .4rem; border-top: 1px solid var(--line); font-weight: 700; }
.pb-hint:empty { display: none; } .pb-hint { margin: -.2rem 0 .4rem; }
@media (max-width: 860px) { .pb-bottom { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .pb-filt, .pb-pay-g, .pb-info-g { grid-template-columns: 1fr; } .pb-show { flex-direction: column; gap: .3rem; } .pb-lab { padding-top: 0; } }

/* ===== Write Checks (QuickBooks-style) — pages/accounting.js expenseForm ===== */
.wc-bank { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .4rem 1.6rem; margin-bottom: .6rem; }
.wc-bank .field { margin-bottom: 0; min-width: min(340px, 100%); }
.wc-bal { display: flex; align-items: baseline; gap: .7rem; padding-bottom: .5rem; font-size: var(--fs-sm); letter-spacing: .05em; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.wc-endbal { font-size: var(--fs-xl); color: var(--ink); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.wc-check { border: 2px solid #9fd0ad; border-radius: 6px; padding: .7rem 1rem .6rem; margin-bottom: 1rem; box-shadow: inset 0 0 0 4px #fff;
  background: repeating-linear-gradient(135deg, #eef8f0 0 14px, #e7f4ea 14px 15px); }
.wc-check input { background: #fff; }
.wc-cap { font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase; color: #3f5f48; font-weight: 700; white-space: nowrap; }
.wc-row1 { display: flex; justify-content: space-between; }
.wc-meta { display: grid; grid-template-columns: auto 180px; gap: .35rem .6rem; align-items: center; } .wc-meta label { font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase; color: #3f5f48; font-weight: 700; text-align: right; }
.wc-row2 { display: grid; grid-template-columns: auto minmax(0, 1fr) 240px; gap: .8rem; align-items: center; margin-top: .5rem; }
.wc-amt { display: flex; align-items: center; gap: .3rem; font-weight: 700; } .wc-amount { width: 100%; text-align: right; font-size: var(--fs-lg); font-weight: 700; }
.wc-row3 { display: flex; align-items: flex-end; gap: .6rem; margin: .55rem 0 .7rem; }
.wc-words { flex: 1; min-height: 1.6rem; border-bottom: 1px solid #5b7a63; padding: 0 .2rem .15rem; font-style: italic; color: var(--ink); }
.wc-row4 { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 1rem; align-items: start; }
.wc-addr { min-height: 66px; margin-top: .25rem; }
.wc-tax { justify-self: end; width: 240px; } .wc-tax .field { margin-bottom: 0; } .wc-tax input { text-align: right; }
.wc-row5 { display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: center; margin-top: .6rem; }
@media (max-width: 760px) { .wc-row2, .wc-row4, .wc-row5 { grid-template-columns: 1fr; gap: .3rem; } .wc-tax { justify-self: stretch; width: auto; } .wc-meta { grid-template-columns: auto 1fr; width: 100%; } .wc-row1 > span { display: none; } }

/* ===== P&L by menu category, Cost of goods sold — pages/accounting.js statements ===== */
table.fin tr.fin-cat td { color: var(--muted); font-size: var(--fs-base); padding-top: .2rem; padding-bottom: .2rem; }
table.fin tr.fin-cat td:first-child { padding-left: 3rem; }
.cg-h { font-size: 1rem; margin: .4rem 0 .4rem; }
.cg-flow { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin: .2rem 0 .9rem; }
.cg-step { display: flex; gap: .5rem; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: .45rem .7rem; }
.cg-n { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #0f766e; color: #fff; font-weight: 700; font-size: var(--fs-sm); flex: none; }
.cg-arrow { color: var(--muted); font-weight: 700; }
.cg-issues { border: 1px solid #f3b8b1; background: #fdecea; color: #8a1c13; border-radius: 8px; padding: .6rem .8rem; margin-bottom: .8rem; }
.cg-issues ul { margin: .3rem 0 0; padding-left: 1.2rem; }
.cg-table tr.cg-cat td { font-weight: 700; background: #f2f6f4; }
.cg-table tr.cg-item td:first-child { padding-left: 1.5rem; }
@media (max-width: 640px) { .cg-arrow { display: none; } .cg-step { flex: 1 1 100%; } }

/* ===== Finance's tabbed workspace — app.js (no sidebar; every screen in a tab beside Home Page) ===== */
.ws-tabs { display: flex; gap: .25rem; align-items: flex-end; padding: .5rem 1rem 0; background: #fff; border-bottom: 1px solid var(--line); overflow-x: auto; position: sticky; top: 57px; z-index: 19; scrollbar-width: thin; }
.ws-tab { display: inline-flex; align-items: center; gap: .35rem; flex: none; max-width: 230px; padding: .45rem .55rem .45rem .9rem; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: #f2f4f3; color: var(--muted); font-weight: 600; cursor: pointer; white-space: nowrap; margin-bottom: -1px; user-select: none; }
.ws-tab:hover { color: var(--ink); }
.ws-tab.on { background: var(--bg); color: var(--ink); box-shadow: inset 0 3px 0 var(--accent); }
.ws-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ws-tab:first-child { padding-right: .9rem; }
.ws-t { overflow: hidden; text-overflow: ellipsis; }
.ws-x { border: 0; background: transparent; color: var(--muted); width: 1.4rem; height: 1.4rem; border-radius: 50%; display: inline-grid; place-items: center; font-size: var(--fs-xs); cursor: pointer; padding: 0; }
.ws-x:hover { background: #e2e8e5; color: var(--ink); }
.ws-pane[hidden], .ws-pane [hidden] { display: none !important; }
.modal.inline-form { width: 100%; max-width: 1180px; max-height: none; overflow: visible; margin: 0 auto; box-shadow: none; border: 1px solid var(--line); }
.modal.inline-form.narrow { max-width: 560px; } .modal.inline-form:not(.wide):not(.xl):not(.narrow) { max-width: 820px; }
@media (max-width: 640px) { .ws-tabs { padding: .4rem .5rem 0; } .ws-tab { max-width: 170px; } }

/* ===== Pricing and Margins — pages/accounting.js pricing ===== */
.pr-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; align-items: stretch; margin-bottom: .6rem; }
.pr-stats .stat { height: 100%; width: 100%; display: flex; flex-direction: column; }
.pr-tg { display: flex; gap: .35rem; align-items: center; flex-wrap: nowrap; } .pr-target { width: 72px; text-align: right; }
@media (max-width: 760px) { .pr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.ask-msg { white-space: pre-line; margin: 0 0 .5rem; } /* lib.js ask / askText */

.rm-date { gap: .6rem; align-items: flex-end; flex-wrap: wrap; margin: .4rem 0; } .rm-date .field { margin: 0; } .rm-days { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }

.rm-due { display: grid; gap: .15rem; padding: .7rem .9rem; margin-bottom: .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.rm-due > span { color: var(--muted); font-size: var(--fs-md); } .rm-due > b { font-size: var(--fs-2xl); } .rm-ok { color: #15803d; font-weight: 700; } .rm-off { color: #b45309; font-weight: 700; }

.ag-days { display: block; font-size: var(--fs-2xs); color: var(--muted); font-weight: 400; } /* aging: age of the oldest document */

.rop-in { width: 6.5rem; text-align: right; } /* Set reorder points */

.rm-recon { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; padding: .5rem .8rem; margin-bottom: .5rem; border: 1px dashed var(--line); border-radius: 8px; font-size: var(--fs-base); } .rm-other { color: #b45309; }

/* ===== Open access start page (app.js openPage): role cards, PAC ERP style ===== */
.oa-page { min-height: 100vh; background: #f4f6f4; padding: 1.2rem clamp(16px, 4vw, 48px) 2rem; }
.oa-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.oa-logo { width: 88px; height: 88px; border-radius: 16px; flex: none; }
.oa-brand { font-weight: 700; letter-spacing: .02em; font-size: var(--fs-xl); } .oa-sub { color: var(--muted); font-size: var(--fs-base); }
.oa-sec { background: #fff; border-radius: 18px; padding: 1.2rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.oa-sec-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .9rem; } .oa-sec-h h2 { margin: 0; font-size: var(--fs-xl); }
.oa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.oa-card { display: flex; flex-direction: column; gap: .7rem; min-height: 170px; padding: 1.1rem 1.2rem; border-radius: 16px; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, #1e7a3c, #135c2b); box-shadow: 0 2px 8px rgba(19,92,43,.25); transition: transform .12s, box-shadow .12s; }
.oa-card:hover, .oa-card:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(19,92,43,.35); }
.oa-top { display: flex; align-items: center; gap: .8rem; } .oa-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: #fff; flex: none; }
.oa-title { font-size: var(--fs-xl); line-height: 1.2; } .oa-what { margin: 0; flex: 1; opacity: .92; font-size: var(--fs-base); } .oa-open { font-weight: 700; }
.oa-foot { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.2rem; }

/* ===== Portal tabs (app.js openPage): Home and one tab per role, like a browser ===== */
.pt-shell { display: flex; flex-direction: column; height: 100vh; }
.pt-bar { display: flex; gap: .3rem; align-items: flex-end; padding: .35rem .5rem 0; background: #0f3d22; overflow: hidden; flex: none; }
/* like browser tabs: they share the width and shrink (names cut short with …) so every tab fits the screen */
.pt-tab { display: inline-flex; align-items: center; gap: .45rem; flex: 0 1 220px; min-width: 52px; max-width: 220px; padding: .5rem .7rem; border: 0; border-radius: 10px 10px 0 0; font: inherit; font-weight: 600;
  color: #e6f0ea; background: transparent; cursor: pointer; white-space: nowrap; }
.pt-tab span { overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; } .pt-tab:first-child { flex: none; min-width: 0; } .pt-tab img, .pt-x { flex: none; } .pt-tab:hover { background: rgba(255,255,255,.08); }
.pt-tab.on { color: #12351f; background: #fff; } .pt-tab svg { width: 18px; height: 18px; }
.pt-tab[draggable] { cursor: grab; } .pt-tab.drag { opacity: .45; } /* dragging a tab to move it */
.pt-x { border: 0; background: none; color: inherit; font-size: var(--fs-lg); line-height: 1; padding: 0 .15rem; cursor: pointer; opacity: .7; } .pt-x:hover { opacity: 1; }
.pt-panes { position: relative; flex: 1; min-height: 0; } .pt-home { height: 100%; overflow: auto; min-height: 0; }
.pt-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.oa-closed { padding: 2rem; text-align: center; color: var(--muted); }

/* ===== Improvement Checklist (portal tab; pages/checklist.js) ===== */
.pt-tab.pt-fixed { flex: none; min-width: 0; font-size: var(--fs-2xs); line-height: 1.05; padding: .3rem .6rem; text-align: left; }
.pt-tab.pt-fixed span { flex: none; overflow: visible; }
.ck-pane { background: #f4f6f4; } .ck-page { max-width: 1100px; margin: 0 auto; padding: 1rem clamp(12px, 3vw, 32px) 2rem; }
.ck-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin: 0 -.5rem .8rem; padding: .7rem .5rem .6rem;
  position: sticky; top: 0; z-index: 5; background: #f4f6f4; box-shadow: 0 6px 8px -8px rgba(0,0,0,.25); } /* frozen while scrolling */
.ck-created { font-size: var(--fs-xs); color: var(--muted); margin-top: .15rem; } .ck-head h2 { margin: 0 0 .3rem; }
.ck-sum { display: flex; align-items: center; gap: .6rem; } .ck-bar { display: block; width: 180px; height: 8px; border-radius: 99px; background: #dfe7e1; overflow: hidden; }
.ck-bar > span { display: block; height: 100%; background: #1e7a3c; } .ck-tools { gap: .5rem; flex-wrap: wrap; }
.ck-sec { background: #fff; border-radius: 14px; padding: .8rem 1rem; margin-bottom: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.ck-sec-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .3rem; } .ck-sec-h h3 { margin: 0; }
.ck-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: .4rem .8rem; align-items: start; padding: .55rem 0; border-top: 1px solid var(--line); }
.ck-row:first-child { border-top: 0; } .ck-check input { width: 20px; height: 20px; margin-top: .15rem; accent-color: #1e7a3c; }
.ck-no { color: #1e7a3c; } .ck-details { white-space: pre-line; color: var(--muted); font-size: var(--fs-md); margin-top: .2rem; }
.ck-row.done .ck-title { text-decoration: line-through; color: var(--muted); }
.ck-meta { display: flex; gap: .5rem; flex-wrap: wrap; } .ck-meta label { display: grid; gap: .1rem; } .ck-meta input { padding: .25rem .4rem; font-size: var(--fs-md); }
.ck-rem input { width: 220px; }
@media (max-width: 760px) { .ck-row { grid-template-columns: auto 1fr; } .ck-meta, .ck-row > .btn { grid-column: 2; } .ck-rem input { width: 100%; } }

/* ===== Goods receipts list — pages/purchasing.js grList ===== */
table.gl td { padding: .35rem .55rem; white-space: nowrap; vertical-align: top; }
table.gl tr.gl-first td { border-top: 2px solid var(--line); }
table.gl .gl-short { color: #b91c1c; font-weight: 700; } table.gl .gl-over { color: #b45309; font-weight: 700; }

/* ===== Receive goods — pages/purchasing.js receiveModal ===== */
.rv-head { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 0 1rem; }
.rv-head.rv-head5 { grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); }
.rv-auto { color: var(--muted); font-style: italic; } .rv-auto-hint { margin: -.35rem 0 0; }
.rv-ro { background: #f2f6f4 !important; color: var(--ink); font-weight: 600; cursor: default; }
.rv-po { width: 110px; text-align: right; }
.rv-usewrap { display: inline-flex; align-items: center; gap: .3rem; }
.rv-use { width: 100px; text-align: right; }
.rv-um { display: inline-grid; place-items: center; min-width: 2.6rem; height: 2.4rem; padding: 0 .4rem; border: 1px solid var(--line); border-radius: 8px; background: #f2f6f4; font-weight: 700; font-size: var(--fs-md); color: var(--muted); }
@media (max-width: 760px) { .rv-head, .rv-head.rv-head5 { grid-template-columns: 1fr 1fr; } }
/* the Receiving Report: stage bar, item table, alerts, totals */
.flow-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .4rem; }
.flow-step { display: flex; align-items: center; gap: .5rem; min-width: 0; padding: .4rem .55rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.flow-step:hover { background: #f4f6f5; } .flow-step.on { border-color: var(--green); background: var(--green-bg); box-shadow: inset 0 -3px 0 var(--green); } .flow-step.wait { border-color: #d9a400; }
.flow-n { flex: none; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #eceeed; font-size: var(--fs-sm); font-weight: 700; } .flow-step.on .flow-n { background: var(--green); color: #fff; }
.flow-t { display: grid; min-width: 0; line-height: 1.2; } .flow-t b { font-size: var(--fs-md); } .flow-t small { color: var(--muted); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-top { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .45rem .9rem; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: #fafbfa; }
.rr-kv { display: grid; gap: .1rem; min-width: 0; justify-items: start; } .rr-kv span:first-child { color: var(--muted); font-size: var(--fs-xs); } .rr-kv b { overflow-wrap: anywhere; } .rr-kv .chip { max-width: 100%; white-space: normal; border-radius: 8px; line-height: 1.2; }
.rr-alert { padding: .45rem .65rem; border-radius: 8px; border: 1px solid var(--line); border-left-width: 4px; }
.rr-alert.good { background: var(--green-bg); border-color: var(--green); } .rr-alert.warn { background: #fff7e0; border-color: #d9a400; } .rr-alert.bad { background: var(--red-bg); border-color: var(--red); }
.rr-table td { vertical-align: middle; } .rr-in { width: 96px; text-align: right; } .rr-status { display: grid; gap: .2rem; min-width: 150px; justify-items: start; } .rr-status .chip { white-space: normal; font-size: var(--fs-2xs); line-height: 1.2; border-radius: 8px; }
.last-price { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; } .last-line { margin-top: .3rem; }
.rr-more[hidden] { display: none !important; } .rr-more td { background: #f7f9f8; } .rr-more-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 .8rem; }
.rr-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); border: 1px solid var(--line); border-radius: 8px; } .rr-sum > div { display: grid; gap: .1rem; padding: .45rem .65rem; border-left: 1px solid var(--line); } .rr-sum > div:first-child { border-left: 0; }
.rr-sum span { color: var(--muted); font-size: var(--fs-xs); } .rr-sum b { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; } .rr-sum > .rr-st { background: #f4f6f5; justify-items: start; } .rr-st .chip { white-space: normal; border-radius: 8px; line-height: 1.2; }
.rr-pending { margin-bottom: .9rem; padding: .5rem .7rem .7rem; border: 2px solid #d9a400; border-radius: 10px; background: #fffaf0; } .rr-pending.fix { border-color: var(--orange); background: var(--orange-bg); } .rr-pending h3 { margin: 0 0 .4rem; }
.rr-count { display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 .35rem; border-radius: 999px; background: var(--red); color: #fff; font-size: var(--fs-sm); }
.linkbtn { padding: 0; border: 0; background: none; color: var(--blue); font: inherit; cursor: pointer; text-decoration: underline; }
@media (max-width: 900px) { .flow-steps { grid-template-columns: 1fr 1fr; } .rr-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rr-sum { grid-template-columns: 1fr 1fr; } .rr-sum > div { border-left: 0; border-top: 1px solid var(--line); } }

/* ===== Customer form — pages/accounting.js customerForm ===== */
.cu-top { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 0 1rem; align-items: start; }
.cu-top .cp-methods { margin: .1rem 0 .4rem; }
.cu-code { background: #f2f6f4 !important; font-weight: 700; letter-spacing: .03em; }
.cu-names { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 90px; gap: 0 1rem; }
.cu-mi { text-transform: uppercase; }
.cu-preview { margin: -.2rem 0 .6rem; color: var(--muted); font-size: var(--fs-base); }
.cu-preview:empty { display: none; }
@media (max-width: 640px) { .cu-top, .cu-names { grid-template-columns: 1fr; } }

/* ===== Cash Remittance — pages/cash-remittance.js ===== */
.rm-h { font-size: var(--fs-lg); margin: 1.4rem 0 .5rem; }
.rm-card { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 1rem 1.1rem; }
.rm-card h2 { margin: 0 0 .2rem; font-size: var(--fs-xl); }
.rm-card-b { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 1.2rem; align-items: start; margin-top: .6rem; }
.rm-side { display: flex; flex-direction: column; gap: .5rem; }
.rm-count { border: 1px solid var(--line); border-radius: 8px; padding: .4rem .6rem; background: #fafcfb; }
.rm-grid { width: 100%; border-collapse: collapse; }
.rm-grid td { padding: .2rem .3rem; } .rm-grid td:nth-child(2) { color: var(--muted); width: 1rem; text-align: center; }
.rm-grid td.num { text-align: right; font-variant-numeric: tabular-nums; min-width: 110px; }
.rm-pcs { width: 90px; text-align: right; }
.rm-sum { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--line); margin-top: .3rem; padding: .45rem .3rem .1rem; font-weight: 600; }
.rm-total { font-size: var(--fs-xl); font-variant-numeric: tabular-nums; }
.rm-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .7rem; }
.rm-stat { border: 1px solid var(--line); border-left: 4px solid #0f766e; border-radius: 8px; background: #fff; padding: .6rem .8rem; }
.rm-stat.warn { border-left-color: #c2410c; } .rm-stat.bad { border-left-color: #b91c1c; }
.rm-stat .v { font-size: var(--fs-2xl); font-weight: 700; } .rm-stat .l { font-size: var(--fs-md); color: var(--muted); } .rm-stat .d { font-weight: 700; font-variant-numeric: tabular-nums; }
.rm-result { border: 1px solid var(--line); border-radius: 8px; padding: .3rem .8rem; }
.rm-result > div { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .3rem 0; font-variant-numeric: tabular-nums; }
.rm-result > div.big { border-top: 1px solid var(--line); margin-top: .2rem; padding-top: .5rem; font-weight: 700; }
.rm-choice { display: grid; gap: .5rem; }
.rm-opt { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: .55rem .7rem; cursor: pointer; }
.rm-opt:has(input:checked) { border-color: #1e7a3c; background: #e8f4ec; }
.rm-opt > span { display: flex; flex-direction: column; gap: .1rem; }
@media (max-width: 760px) { .rm-card-b { grid-template-columns: 1fr; } }

/* ===== Searchable dropdown (lib.js combo) ===== */
.combo { position: relative; display: flex; min-width: 220px; }
.combo-in { flex: 1; min-width: 0; width: 100%; padding-right: 2rem; }
.combo-btn { position: absolute; right: 1px; top: 1px; bottom: 1px; width: 1.9rem; border: 0; border-radius: 0 8px 8px 0; background: transparent; color: var(--muted); font-size: var(--fs-md); cursor: pointer; }
.combo-btn:hover { background: #f1f6f3; color: var(--ink); }
.combo-list { position: fixed; z-index: 80; margin: 0; padding: .25rem 0; list-style: none; max-height: 270px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 28px rgba(0,0,0,.18); }
.combo-opt { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; padding: .45rem .7rem; cursor: pointer; font-size: var(--fs-base); }
.combo-opt:hover { background: #f1f6f3; } .combo-opt.on { background: #dcefe3; }
.combo-opt[aria-selected="true"] .combo-l { font-weight: 700; }
.combo-hint { color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; }
.combo-empty { padding: .55rem .7rem; color: var(--muted); font-size: var(--fs-md); }
.eb-grid .combo { min-width: 260px; }

/* Pricing — clickable cost per serving (pages/accounting.js costBreakdown) */
.pr-cost { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }

/* Cashier Summary Report (pages/cashier-summary.js): KPI cards, money lines, and the 80 mm receipt printout */
.kpi .kv { font-size: var(--fs-2xl); font-weight: 700; margin: .15rem 0; }
/* Day Summary: boxes of one row are the same size and the same height */
.cs-page { display: grid; gap: .6rem; }
.cs-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .6rem; }
.cs-kpis .kpi { margin: 0; padding: .5rem .7rem; min-width: 0; } .cs-kpis .kv { display: block; padding: 0; border: 0; }
.cs-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; align-items: stretch; }
.cs-row4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; align-items: stretch; }
.card.cs-card { margin: 0; padding: .6rem .7rem; min-width: 0; } .cs-card h3 { margin: 0 0 .35rem; font-size: 1rem; }
.cs-card .empty { padding: .5rem; }
@media (max-width: 1100px) { .cs-row3, .cs-row4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cs-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cs-row3, .cs-row4 { grid-template-columns: minmax(0, 1fr); } .cs-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cs-lines { display: grid; gap: .1rem; margin-top: .4rem; }
.cs-line { display: flex; justify-content: space-between; gap: .75rem; padding: .25rem 0; border-bottom: 1px dashed var(--line); }
.cs-line.grand { border-bottom: 0; border-top: 2px solid var(--ink); font-size: var(--fs-lg); } .cs-line.sub { color: var(--muted); font-size: var(--fs-md); } .cs-line.due b { color: var(--red); }
.cs-narrow { padding: 6px 4px; font-size: 11px; } .print-area.cs-roll .print-doc { max-width: 76mm; padding: 0 1mm; }
/* the Manager's dashboard (pages/manager-home.js) */
.mh-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: .8rem; }
.mh-card { margin: 0; } .mh-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .6rem; } .mh-head h2 { margin: 0; font-size: var(--fs-lg); }
.mh-trend { font-size: var(--fs-sm); font-weight: 700; margin-top: .15rem; } .mh-trend.up { color: var(--green); } .mh-trend.down { color: var(--red); }
.mh-todo, .mh-floor, .mh-stock { display: flex; flex-direction: column; }
.mh-todorow, .mh-floorrow, .mh-stockrow { display: grid; align-items: center; gap: .6rem; padding: .5rem .3rem; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.mh-todorow:first-child, .mh-floorrow:first-child, .mh-stockrow:first-child { border-top: 0; } .mh-todorow:hover, .mh-floorrow:hover, .mh-stockrow:hover { background: #f4f7f5; }
.mh-todorow { grid-template-columns: 2.2rem 1fr auto auto; } .mh-floorrow { grid-template-columns: 6.5rem 1fr auto; } .mh-stockrow { grid-template-columns: 1fr auto auto; }
.mh-count { background: #6b3fa0; color: #fff; border-radius: 999px; text-align: center; font-weight: 700; padding: .15rem 0; } .mh-go { color: var(--green); font-weight: 700; font-size: var(--fs-md); } .mh-late { color: var(--red); font-weight: 700; }
.mh-ft { font-weight: 700; } .mh-clear { padding: .8rem; text-align: center; color: var(--green); }
.mh-list { list-style: none; margin: 0; padding: 0; } .mh-list li { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; padding: .4rem .2rem; border-top: 1px solid var(--line); }
.mh-list li:first-child { border-top: 0; } .mh-list li b { white-space: nowrap; } .mh-list li.mh-best { background: #f1f7ea; border-radius: 6px; } .mh-say { margin: 0 0 .5rem; line-height: 1.45; }
.mh-brief { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; } .mh-brief li { display: flex; gap: .6rem; line-height: 1.45; padding: .35rem .5rem; border-radius: 6px; }
.mh-brief li.warn { background: #fff7ed; } .mh-brief li.bad { background: #fef2f2; } .mh-bi { width: 1.4rem; flex: none; text-align: center; }
.mh-list li.mh-warn { background: #fff7ed; border-radius: 6px; } .mh-list li.mh-bad { background: #fef2f2; border-radius: 6px; } .mh-list li.mh-ok b { color: var(--green); }
@media (max-width: 560px) { .mh-todorow { grid-template-columns: 2.2rem 1fr auto; } .mh-todorow .mh-go { display: none; } .mh-floorrow { grid-template-columns: 1fr auto; } .mh-floorrow .mh-ft { grid-column: 1 / -1; } }

/* ---- Space: every screen uses the full width of the window, with tighter gaps, so more fits on one view ---- */
.content { max-width: none; padding: .75rem .9rem; }
.pagehead { margin-bottom: .55rem; gap: .6rem; }
.card { padding: .75rem; }
.cards { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: .55rem; margin-bottom: .75rem; }
.stat { padding: .6rem .7rem; }
.tabs { margin-bottom: .6rem; }
.tabs button { padding: .5rem .85rem; min-height: 40px; }
th, td { padding: .38rem .5rem; }
.pager { padding: .35rem .5rem; }
.field { margin-bottom: .5rem; }
.grid2, .grid3 { gap: .5rem; }
/* pop-up windows open larger, so long forms and tables need less scrolling */
.modal { width: min(820px, 100%); padding: .85rem 1rem; }
.modal.wide { width: min(1180px, 100%); } .modal.xl { width: min(1400px, 100%); } .modal.narrow { width: min(480px, 100%); }
.modal .foot { margin-top: .75rem; }
@media (min-width: 901px) {
  /* the side menu: one line per item where it fits, smaller gaps between items */
  .shell { grid-template-columns: 240px 1fr; }
  .side { padding: .6rem .5rem; } .side-toggle { right: calc(-.5rem - 12px); }
  .brand { padding: .3rem .4rem .7rem; margin-bottom: .4rem; }
  .brand .logo { width: 48px; height: 48px; }
  .nav a, .nav .navgroup { min-height: 38px; padding: .45rem .6rem; font-size: var(--fs-base); line-height: 1.2; }
  .nav .navsub a { min-height: 32px; padding: .32rem .6rem; font-size: var(--fs-md); }
  .nav .navsub-in { margin-left: 1.2rem; }
  .top { padding: .45rem .9rem; }
}

/* ===== Typography: headline font for titles, figures and brand marks (sizes come from type.css) ===== */
.pagehead h1, .modal h2, .card h2, .card h3, .oa-title, .oa-brand, .oa-sec-h h2, .ck-head h2, .role-head h1, .login-title, .brand,
.stat .v, .rm-stat .v, .rm-due > b, .tot.grand, .fh-panel .fh-tab, .pt-tab, .kcol h2 { font-family: var(--font-head); }
.stat .v, .rm-stat .v { letter-spacing: -.02em; }
th { font-weight: 600; letter-spacing: .02em; }
.hint, .muted.small, .small { line-height: 1.45; }
.btn { font-weight: 600; letter-spacing: .005em; }
