/* PantryGo — single stylesheet, styled after the Power Pages site (theme "GREY", the Header/Footer
   templates and the Order Now / Order Confirmation / Operator Dashboard / Pantry Config templates).
   No CDNs: Inter and Poppins (SIL OFL) are self-hosted in /lib/fonts so the strict CSP still holds. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../lib/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../lib/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../lib/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../lib/fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 800; font-display: swap; src: url("../lib/fonts/inter-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../lib/fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../lib/fonts/poppins-latin-700-normal.woff2") format("woff2"); }

:root {
  /* Theme "GREY" variables from the Power Pages export */
  --brand: #335940;          /* $color1: header, footer, buttons, links */
  --brand-dark: #264530;
  --brand-soft: #e6f2ea;
  --sand: #e2d7b5;           /* beige page-title bars */
  --primary: #605e5c;        /* $color2 */
  --ink: #323130;
  --muted: #605e5c;
  --line: #e1dfdd;
  --bg: #ffffff;
  --card: #ffffff;
  --danger: #dc3545;
  --danger-soft: #f8d7da;
  --warn: #856404;
  --warn-soft: #fff3cd;
  --info: #004085;
  --info-soft: #cce5ff;
  --radius: 10px;
  --shadow: 0 1px 4px rgba(0,0,0,.08);
  --font: Arial, "Helvetica Neue", Helvetica, sans-serif;      /* theme font for the staff site */
  --font-app: -apple-system, "Segoe UI", Roboto, sans-serif;   /* dashboard / pantry config templates */
  --font-inter: "Inter", -apple-system, "Segoe UI", sans-serif; /* order now / confirmation templates */
  --font-poppins: "Poppins", "Inter", -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.45; -webkit-text-size-adjust: 100%; }
a { color: var(--brand); }
a:hover { color: #191817; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6rem; font-weight: 400; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.1rem; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt { margin-top: 18px !important; } .mt-s { margin-top: 8px; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .85rem; word-break: break-all; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- Staff/admin shell (Power Pages Header + Footer templates) ---------- */
.staff-body { min-height: 100vh; display: flex; flex-direction: column; }
.nav-container { max-width: 1140px; margin: 0 auto; padding: 0 12px; width: 100%; }
.topnav { background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 50; }
.topnav .nav-container { display: flex; align-items: center; flex-wrap: wrap; min-height: 72px; padding-top: 8px; padding-bottom: 8px; }
.brand { color: #fff; text-decoration: none; display: flex; align-items: center; }
.brand:hover { color: #fff; }
.brand-logo { width: auto; height: 32px; margin: 0 10px; display: block; }
.site-title { font-family: var(--font); font-size: 20px; font-weight: 400; color: #fff; margin-left: 4px; }
.nav-toggle { margin-left: auto; display: none; }
.nav-toggle > summary { list-style: none; cursor: pointer; padding: 4px 12px; border: 1px solid rgba(255,255,255,.35); border-radius: 6px; line-height: 1; }
.nav-toggle > summary::-webkit-details-marker { display: none; }
.nav-toggle-icon { display: inline-block; width: 30px; height: 30px;
  background: linear-gradient(#fff, #fff) center 8px / 22px 2px no-repeat, linear-gradient(#fff, #fff) center 14px / 22px 2px no-repeat, linear-gradient(#fff, #fff) center 20px / 22px 2px no-repeat; opacity: .85; }
.nav-links { display: flex; align-items: center; flex-wrap: wrap; margin-left: auto; gap: 2px; }
.nav-links > a, .nav-links summary, .nav-links .linkbtn { color: #fff; text-decoration: none; padding: 8px 9px; cursor: pointer; display: block; font-family: var(--font); font-size: 20px; font-weight: 400; }
.nav-links > a:hover, .nav-links summary:hover, .nav-links .linkbtn:hover { color: rgba(255,255,255,.75); }
.nav-group { position: relative; }
.nav-group > summary { list-style: none; }
.nav-group > summary::after { content: ""; display: inline-block; margin-left: .45em; vertical-align: .2em; border-top: .3em solid; border-right: .3em solid transparent; border-left: .3em solid transparent; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group[open] > .nav-menu { display: block; }
.nav-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 220px; background: #fff; border: 1px solid rgba(0,0,0,.15); border-radius: 4px; box-shadow: 0 6px 18px rgba(0,0,0,.15); padding: 8px 0; z-index: 60; }
.nav-menu-end { left: auto; right: 0; }
.nav-menu a, .nav-menu .linkbtn { display: block; width: 100%; text-align: left; color: #212529; text-decoration: none; padding: 6px 16px; font-size: 16px; font-family: var(--font); }
.nav-menu a:hover, .nav-menu .linkbtn:hover { background: #e9ecef; color: #1e2125; }
.nav-menu form { margin: 0; }
.nav-user > summary { font-size: 16px; opacity: .9; }
.linkbtn { background: none; border: 0; font: inherit; cursor: pointer; }
.nav-links form { margin: 0; }
@media (max-width: 1199px) {   /* navbar-expand-xl: collapse below 1200px like the source */
  .nav-toggle { display: block; }
  .nav-collapse { display: none; width: 100%; }
  .nav-toggle[open] ~ .nav-collapse { display: flex; }
  .nav-collapse.nav-links { flex-direction: column; align-items: stretch; margin: 8px 0 0; }
  .nav-menu { position: static; box-shadow: none; border: 0; background: rgba(255,255,255,.08); padding: 0 0 6px; }
  .nav-menu a, .nav-menu .linkbtn { color: #fff; padding-left: 24px; }
  .nav-menu a:hover, .nav-menu .linkbtn:hover { background: rgba(255,255,255,.12); color: #fff; }
}
.page { max-width: 1140px; width: 100%; margin: 0 auto; padding: 48px 12px 40px; flex: 1; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }
h1.list-title, .page-head h1 { font-size: 24px; font-weight: 700; color: var(--brand); }
.list-close { text-align: center; margin-top: 4px; }
.footer { background: var(--brand); color: #fff; margin-top: auto; }
.footer-bottom { padding: 20px 0; font-size: 20px; font-family: var(--font); }
.footer-bottom .nav-container { padding-left: 24px; }
@media (max-width: 600px) { .footer-bottom { font-size: 16px; } .page { padding-top: 24px; } }

/* ---------- Components ---------- */
.card { background: var(--card); border-radius: var(--radius); border: 1px solid #e0e0e0; box-shadow: var(--shadow); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.stat { background: var(--card); border-radius: var(--radius); border: 1px solid #e0e0e0; box-shadow: var(--shadow); padding: .9rem 1rem; }
.stat b { display: block; font-size: 1.8rem; color: var(--brand); }
/* "button1" from theme GREY: filled #335940, radius 2px, Arial 600 white, black on hover */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; border: 1px solid var(--brand); border-radius: 2px; padding: .5rem 1rem; font-family: var(--font); font-size: 16px; font-weight: 600; cursor: pointer; text-decoration: none; background: var(--brand); color: #fff; transition: background .15s, border-color .15s; line-height: 1.3; }
.btn:hover { background: #000; border-color: #000; color: #fff; }
.btn:disabled, .btn[aria-disabled="true"] { background: #c8ccc9; border-color: #c8ccc9; color: #fff; cursor: not-allowed; }
.button1 { font-size: 18px; padding: 8px 20px; }
/* "button2": outline */
.btn-secondary { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn-secondary:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: #a71d2a; border-color: #a71d2a; }
.btn-sm { padding: .3rem .65rem; font-size: 14px; }
.btn-block { width: 100%; }
.btn-lg { padding: .8rem 1.2rem; font-size: 18px; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid transparent; }
.alert-success { background: #d4edda; border-color: #c3e6cb; color: #155724; }
.alert-error { background: var(--danger-soft); border-color: #f5c6cb; color: #721c24; }
.alert-warn { background: var(--warn-soft); border-color: #ffe69c; color: var(--warn); }
.alert-info { background: var(--info-soft); color: var(--info); }
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: #eef0ee; color: var(--muted); white-space: nowrap; }
.badge-on { background: #d4edda; color: #155724; }
.badge-off { background: #f1f1f1; color: #888; }
.status-1 { background: #fff3cd; color: #856404; }
.status-2 { background: #cce5ff; color: #004085; }
.status-3 { background: #d4edda; color: #155724; }
.status-4 { background: #f8d7da; color: #721c24; }

/* Tables — the Power Pages "modern" entity list: green border, green header row, soft green glow */
.table-wrap { overflow-x: auto; background: #fff; border: 2px solid var(--brand); box-shadow: 0 0 50px rgba(51,89,64,.55); margin-bottom: 4px; }
table.table { width: 100%; border-collapse: collapse; font-size: 16px; font-family: var(--font); }
.table th, .table td { padding: .6rem .5rem; border-bottom: 1px solid #dee2e6; text-align: left; vertical-align: top; }
.table th { background: var(--brand); color: #fff; font-weight: 600; font-size: 16px; }
.table th a { color: #fff; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #f5f7f5; }
.card .table th { background: #f8f9fa; color: var(--muted); font-size: .85rem; }
.empty { padding: 2rem; text-align: center; color: var(--muted); }

/* Forms */
.form { max-width: 640px; }
.field { margin-bottom: 1rem; }
.field label, .label { display: block; font-weight: 600; margin-bottom: .3rem; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field input[type=date],
.field select, .field textarea, .input { width: 100%; padding: .55rem .7rem; border: 1px solid #ced4da; border-radius: 4px; font: inherit; background: #fff; }
.field input:focus, .field select:focus, .input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.check { display: flex; gap: .5rem; align-items: center; font-weight: 500; margin-bottom: .6rem; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--brand); }
.field-validation-error, .validation-summary-errors, .text-danger { color: var(--danger); font-size: .88rem; }
.validation-summary-errors ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.input-validation-error { border-color: var(--danger) !important; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin-bottom: 1.4rem; }
.filters .field { margin: 0; }
.filters .input, .filters select, .filters input { padding: .45rem .6rem; border: 1px solid #ced4da; border-radius: 4px; font: inherit; background: #fff; }
.pager { display: flex; gap: .4rem; align-items: center; justify-content: flex-end; margin: .8rem 0; }
.meta { font-size: .82rem; color: var(--muted); margin-top: 1rem; }
.login-wrap { max-width: 420px; margin: 1rem auto; }
.thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; background: #eee; }
.block { display: block; margin-top: .3rem; }
.field input[type=file] { display: block; }

/* QR sheet */
.qr-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.qr-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1rem; text-align: center; break-inside: avoid; }
.qr-card svg { width: 100%; height: auto; max-width: 220px; }
.qr-card h3 { margin: .4rem 0 .2rem; font-size: 1.1rem; }
@media print {
  .topnav, .footer, .no-print, .page-head .actions { display: none !important; }
  body { background: #fff; }
  .page { padding: 0; max-width: none; }
  .qr-card { border: 1px solid #999; }
}

/* ---------- Logo band + beige title bar (Power Pages "Mobile Header" + page templates) ---------- */
.brand-band { background: var(--brand); padding: 19px 18px; }
.brand-band-link { display: inline-flex; align-items: center; text-decoration: none; color: #fff; }
.brand-band-link:hover { color: #fff; }
.brand-band .brand-logo { height: 32px; }
.brand-band .site-title { font-size: 20px; margin-left: 0; }
.topbar { background: var(--sand); color: #000; padding: 16px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 6px rgba(0,0,0,.1); }
.topbar h1 { font-family: var(--font-app); font-size: 16px; font-weight: 700; margin: 0; }
.topbar-left .pantry-name { font-size: 12px; opacity: .7; margin-top: 2px; }
.topbar-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.topbar-right-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.current-date { font-size: 12px; font-weight: 700; color: #4a3f22; }
.fullscreen-btn, .refresh-btn, .home-btn { border: none; color: #fff; padding: 7px 12px; border-radius: 6px; font: 600 12px var(--font-app); cursor: pointer; text-decoration: none; display: inline-block; }
.fullscreen-btn { background: var(--brand); } .fullscreen-btn:hover { background: var(--brand-dark); }
.refresh-btn { background: var(--brand); padding: 7px 14px; } .refresh-btn:hover { background: var(--brand-dark); }
.home-btn { background: transparent; color: #4a3f22; border: 1px solid rgba(74,63,34,.4); }
.home-btn:hover { background: rgba(74,63,34,.1); color: #332b17; }
.refresh-countdown { font-size: 11px; color: #555; }
.live { display: inline-flex; align-items: center; gap: 5px; font: 600 11px var(--font-app); color: #4a3f22; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #f0ad4e; }
.live.on::before { background: #28a745; }

/* ---------- Customer ordering (Order Now template) ---------- */
.cust-body { background: #fff; font-family: var(--font-inter); min-height: 100vh; display: flex; flex-direction: column; }
.cust-body > .brand-band { flex-shrink: 0; }
.cust-header { background: var(--sand); color: #000; padding: 20px 16px; box-shadow: 0 2px 12px rgba(0,0,0,.1); font-family: var(--font-poppins); position: sticky; top: 0; z-index: 40; }
.cust-header h1 { margin: 0; font-family: var(--font-poppins); font-size: 20px; font-weight: 600; letter-spacing: -.5px; }
.cust-header .loc { font-size: 13px; margin-top: 4px; opacity: .75; font-family: var(--font-inter); }
.cust-footer { background: var(--brand); color: #fff; padding: 5px; text-align: left; margin-top: auto; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 16px 0; scrollbar-width: none; max-width: 1100px; width: 100%; margin: 0 auto; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; border: 2px solid #eee4c8; background: #fff; border-radius: 999px; padding: 7px 16px; font: 600 15px var(--font-inter); color: #1a1a1a; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 24px 16px; max-width: 1100px; width: 100%; margin: 0 auto; }
.menu-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.08); cursor: pointer; display: flex; flex-direction: column; height: 100%; border: 0; padding: 0; font: inherit; text-align: center; color: inherit; transition: all .3s cubic-bezier(.4,0,.2,1); }
.menu-card:hover, .menu-card:focus-visible { transform: translateY(-6px); box-shadow: 0 12px 24px rgba(0,0,0,.15); outline: none; }
.menu-card:active { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.card-image-wrapper { width: 100%; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.card-image-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.menu-card:hover .card-image-wrapper img { transform: scale(1.08); }
.no-img { height: 100%; width: 100%; background: linear-gradient(135deg, #e8e8e8 0%, #d8d8d8 100%); display: flex; align-items: center; justify-content: center; color: #999; font-size: 12px; }
.card-label { padding: 20px 12px; flex-grow: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.card-label .name { font-weight: 800; font-size: clamp(22px, 3.2vw, 38px); color: #1a1a1a; line-height: 1.25; }
.card-label .desc { color: #666; font-size: 15px; font-weight: 500; }
.cart-spacer { height: 140px; }
@media (max-width: 600px) {
  .cust-header { padding: 14px 12px; }
  .chips { padding: 12px 12px 0; }
  .menu-grid { padding: 12px 0; grid-template-columns: 1fr; gap: 12px; }
  .menu-card { border-radius: 0; box-shadow: 0 2px 5px rgba(0,0,0,.1); }
  .menu-card:hover, .menu-card:focus-visible { transform: none; }
  .card-image-wrapper { aspect-ratio: auto; display: block; }
  .card-image-wrapper img { height: auto; object-fit: contain; display: block; }
  .menu-card:hover .card-image-wrapper img { transform: none; }
  .no-img { min-height: 140px; }
  .card-label { padding: 14px 12px; }
  .card-label .name { font-size: 20px; font-weight: 700; }
  .card-label .desc { font-size: 13px; }
}

.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 10000; display: none; align-items: flex-end; justify-content: center; }
.overlay.active { display: flex; }
.overlay.center { align-items: center; padding: 20px; }
.sheet { background: #fff; width: 100%; max-height: 88vh; border-radius: 24px 24px 0 0; padding: 24px 24px calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; position: relative; overflow: hidden; animation: slideUp .3s cubic-bezier(.4,0,.2,1); font-family: var(--font-inter); }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet h2 { margin: 0 56px 18px 0; font-size: clamp(24px, 4vw, 44px); font-weight: 800; color: #1a1a1a; line-height: 1.2; word-break: break-word; }
.sheet .close { position: absolute; right: 12px; top: 10px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: #f0f0f0; font-size: 36px; line-height: 1; cursor: pointer; color: #666; display: flex; align-items: center; justify-content: center; z-index: 10; }
.sheet .close:hover { color: #333; background: #e0e0e0; }
.sheet-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.mod-group { margin: 0 0 22px; border: 0; padding: 0; min-width: 0; }
.mod-group legend { display: block; font-weight: 800; font-size: clamp(18px, 3vw, 32px); color: #1a1a1a; padding: 0 0 8px; border-bottom: 2px solid #f0f0f0; width: 100%; margin-bottom: 10px; }
.mod-group legend .req { color: var(--danger); font-weight: 600; font-size: .5em; margin-left: .5rem; vertical-align: middle; }
.mod-group legend .opt { color: #888; font-weight: 500; font-size: .5em; margin-left: .5rem; vertical-align: middle; }
.mod-option { display: flex; align-items: center; gap: 14px; margin: 10px 0; padding: 16px 18px; background: #f5f5f5; border: 3px solid transparent; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: clamp(17px, 2.4vw, 26px); color: #222; line-height: 1.3; transition: all .2s; }
.mod-option:hover { background: #e8e8e8; border-color: var(--brand); }
.mod-option:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); color: #1a3d29; font-weight: 800; }
.mod-option input { width: 1.3em; height: 1.3em; accent-color: var(--brand); flex-shrink: 0; margin: 0; }
.mod-option.disabled { opacity: .4; pointer-events: none; }
/* btn-main from the source: full-width, grey until valid, green when ready */
.sheet .btn, .cart #place-btn { margin-top: 16px; width: 100%; padding: 18px; border: none; border-radius: 10px; font: 700 clamp(18px, 2.4vw, 24px) var(--font-inter); letter-spacing: .3px; background: var(--brand); }
.sheet .btn:disabled, .cart #place-btn:disabled { background: #ccc; color: #fff; }
.sheet .btn:hover:not(:disabled), .cart #place-btn:hover:not(:disabled) { background: var(--brand); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(45,80,22,.25); }
@media (max-width: 600px) {
  .sheet { max-height: 90vh; padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); border-radius: 20px 20px 0 0; }
  .sheet .close { width: 40px; height: 40px; font-size: 28px; }
  .sheet h2 { margin: 0 50px 12px 0; }
  .mod-group { margin-bottom: 16px; }
  .mod-option { padding: 12px 14px; margin: 8px 0; border-width: 2px; }
  .sheet .btn, .cart #place-btn { padding: 15px; }
}

.cart { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 2px solid #e8e8e8; box-shadow: 0 -8px 24px rgba(0,0,0,.12); z-index: 9999; padding: 18px 20px calc(18px + env(safe-area-inset-bottom, 0px)); max-height: 85vh; overflow-y: auto; animation: slideUp .3s cubic-bezier(.4,0,.2,1); font-family: var(--font-inter); }
.cart-inner { max-width: 900px; margin: 0 auto; }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid #f0f0f0; margin-bottom: 6px; }
.cart-head b { font-size: 20px; color: #1a1a1a; }
.cart-head .btn-secondary { background: var(--brand); color: #fff; border: 0; border-radius: 8px; font: 600 15px var(--font-inter); padding: 9px 14px; }
.cart-head .btn-secondary:hover { background: #2a483a; }
.count { background: var(--brand); color: #fff; border-radius: 14px; padding: 3px 11px; font-size: 16px; font-weight: 700; margin-left: 4px; }
.cart-toggle { background: none; border: 0; font: inherit; cursor: pointer; color: var(--brand); font-weight: 600; }
.cart-list { max-height: 32vh; overflow-y: auto; }
.cart-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.cart-line b { display: block; font-size: 19px; color: #1a1a1a; margin-bottom: 3px; }
.cart-line small { color: #555; font-size: 15px; }
.qty { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.qty button { width: 36px; height: 36px; border-radius: 8px; border: 0; background: #eef0ee; font-size: 1.2rem; font-weight: 700; cursor: pointer; }
.qty button.minus { background: #ff4757; color: #fff; }
.qty span { min-width: 1.5rem; text-align: center; font-weight: 700; }
.seat-field { margin: 12px 0; }
.seat-field label { font-weight: 700; display: block; margin-bottom: 6px; font-size: 17px; color: #1a1a1a; }
.seat-field input { width: 100%; padding: 12px 14px; font: 600 20px var(--font-inter); border: 2px solid #ddd; border-radius: 10px; background: #f5f5f5; color: #1a1a1a; }
.seat-field input:focus { border-color: var(--brand); background: #fff; outline: none; }
.seat-field input.error { border-color: var(--danger); background: #fff5f5; }
.seat-msg { color: var(--danger); font-weight: 600; font-size: 14px; margin-top: 6px; }
@media (max-width: 600px) {
  .cart { padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px)); }
  .cart-head b { font-size: 17px; }
  .count { font-size: 14px; padding: 3px 10px; }
  .cart-list { max-height: 28vh; }
  .cart-line { padding: 10px 0; }
  .cart-line b { font-size: 17px; }
  .cart-line small { font-size: 14px; }
  .cart-head .btn-secondary { font-size: 14px; padding: 8px 12px; }
}
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); color: #fff; padding: 12px 20px; border-radius: 8px; z-index: 99999; font: 500 14px var(--font-inter); box-shadow: 0 4px 12px rgba(0,0,0,.15); max-width: 90%; text-align: center; display: none; }
.toast.show { display: block; }
.progress-box { background: #fff; border-radius: 16px; padding: 32px; text-align: center; min-width: 260px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.progress-box b { font-size: 18px; color: #1a1a1a; }
.progress-box .muted { color: #999; margin-top: 12px; font-weight: 500; }
.progress-track { margin-top: 16px; height: 6px; background: #eee; border-radius: 3px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--brand); border-radius: 3px; transition: width .4s; }
.cust-message { max-width: 520px; margin: 3rem auto; padding: 0 1rem; text-align: center; }
.cust-message .icon { font-size: 3rem; }
.cust-message h2 { font-family: var(--font-poppins); font-weight: 600; }

/* ---------- Order confirmation (Order Confirmation template) ---------- */
.cust-body .topbar { padding: 16px 24px; }
.cust-body .topbar h1 { font-family: var(--font-poppins); font-size: 22px; font-weight: 700; }
.cust-body:has(.conf-wrap) { background: #f5f5f5; }
.conf-wrap { max-width: 820px; width: 100%; margin: 0 auto; padding: 48px 32px; display: flex; flex-direction: column; gap: 32px; flex: 1; }
.conf-header { background: var(--brand); color: #fff; border-radius: 24px; padding: 72px 40px; text-align: center; box-shadow: 0 8px 28px rgba(51,89,64,.28); }
.conf-header.cancelled { background: #8b2630; box-shadow: 0 8px 28px rgba(139,38,48,.28); }
.conf-header .icon { font-size: 100px; margin-bottom: 22px; line-height: 1; }
.conf-header h1 { font-family: var(--font-poppins); margin: 0 0 12px; font-size: 62px; font-weight: 700; line-height: 1.15; color: #fff; }
.conf-header .num { font-size: 22px; opacity: .9; margin-bottom: 18px; }
.status-pill { display: inline-block; padding: 10px 28px; border-radius: 99px; font-size: 18px; font-weight: 600; background: rgba(255,255,255,.25); color: #fff; }
.countdown { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #fff; border: 1px solid #eee; border-radius: 18px; padding: 30px 26px; }
.countdown-label { font-size: 30px; color: #666; }
.countdown b { font-size: 34px; font-weight: 700; color: #333; white-space: nowrap; }
.countdown b.warn { color: #b7791f; } .countdown b.danger { color: var(--danger); }
.conf-items { background: #fff; border-radius: 18px; padding: 36px 28px; border: 1px solid #eee; box-shadow: none; margin: 0; }
.conf-items h2 { font-family: var(--font-poppins); font-size: 30px; font-weight: 600; color: #333; margin-bottom: 8px; }
.conf-items > p { margin: 0 0 14px; }
.conf-items .item { padding: 22px 0; border-bottom: 1px solid #f5f5f5; }
.conf-items .item:last-child { border-bottom: 0; padding-bottom: 0; }
.conf-items .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.conf-items .item-name { font-size: 34px; font-weight: 600; color: #333; line-height: 1.2; }
.conf-items .item-qty { background: #e8f5e9; color: #2e7d32; font-size: 18px; font-weight: 600; padding: 6px 18px; border-radius: 99px; flex-shrink: 0; }
.conf-items .mods { font-size: 26px; color: #888; margin-top: 8px; line-height: 1.2; }
.conf-actions { display: flex; gap: 16px; }
.conf-actions .btn { flex: 1; padding: 24px; border-radius: 14px; font: 600 20px var(--font-inter); }
.btn-cancel { background: #fff; color: var(--danger); border: 2px solid var(--danger); }
.btn-cancel:hover { background: #fff5f5; color: var(--danger); border-color: var(--danger); }
.btn-cancel:disabled { background: #fff; color: var(--danger); border-color: var(--danger); opacity: .35; }
.btn-close { background: var(--brand); color: #fff; border: 0; }
.btn-close:hover { background: var(--brand-dark); }
.dialog { background: #fff; border-radius: 18px; padding: 28px; max-width: 400px; width: 100%; text-align: center; font-family: var(--font-inter); }
.dialog h3 { font-size: 22px; font-weight: 700; color: #333; margin-bottom: 10px; }
.dialog p { font-size: 16px; color: #666; line-height: 1.5; }
.dialog .actions { display: flex; flex-wrap: nowrap; gap: 12px; margin-top: 14px; }
.dialog .actions .btn { flex: 1; padding: 15px; border-radius: 10px; border: 0; font: 600 16px var(--font-inter); }
.dialog .actions .btn-secondary { background: #f5f5f5; color: #333; }
.dialog .actions .btn-danger { background: var(--danger); }
@media (max-width: 699px) {
  .conf-wrap { padding: 20px 14px 28px; gap: 24px; }
  .conf-header { padding: 64px 28px; }
  .conf-header h1 { font-size: 54px; }
  .conf-items h2 { font-size: 26px; }
  .conf-items .item-name { font-size: 30px; }
  .conf-items .mods { font-size: 24px; }
}
@media (max-width: 600px) {
  .cust-body .topbar { padding: 12px 14px; }
  .cust-body .topbar h1 { font-size: 18px; }
  .conf-wrap { padding: 14px 12px 20px; gap: 14px; }
  .conf-header { padding: 28px 16px; border-radius: 18px; }
  .conf-header .icon { font-size: 52px; margin-bottom: 10px; }
  .conf-header h1 { font-size: 26px; margin-bottom: 6px; }
  .conf-header .num { font-size: 16px; margin-bottom: 12px; }
  .status-pill { font-size: 14px; padding: 6px 18px; }
  .countdown { padding: 14px 16px; border-radius: 14px; }
  .countdown-label { font-size: 15px; }
  .countdown b { font-size: 20px; }
  .conf-items { padding: 18px 16px; border-radius: 14px; }
  .conf-items h2 { font-size: 18px; }
  .conf-items .item { padding: 12px 0; }
  .conf-items .item-name { font-size: 18px; }
  .conf-items .item-qty { font-size: 14px; padding: 4px 12px; }
  .conf-items .mods { font-size: 14px; margin-top: 4px; line-height: 1.3; }
  .conf-actions { gap: 10px; }
  .conf-actions .btn { padding: 15px 10px; font-size: 16px; border-radius: 12px; }
}

/* ---------- Operator dashboard (Operator Dashboard template) ---------- */
.board-body { background: #f0f2f5; font-family: var(--font-app); min-height: 100vh; }
.page-wrap { padding: 12px; max-width: 1200px; margin: 0 auto; }
.columns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 700px) { .columns { grid-template-columns: 1fr; } }
.column-header { padding: 10px 12px; border-radius: 10px 10px 0 0; text-align: center; font-size: 13px; font-weight: 700; }
.col-new .column-header { background: #fff3cd; color: #856404; }
.col-progress .column-header { background: #cce5ff; color: #004085; }
.col-done .column-header { background: #d4edda; color: #155724; }
.column-body { background: #e8eaf0; border-radius: 0 0 10px 10px; padding: 8px; min-height: 200px; }
.order-card { background: #fff; border-radius: 10px; margin-bottom: 10px; border: 1px solid #e0e0e0; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.order-card:last-child { margin-bottom: 0; }
.order-card.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 4px #f0ad4e; } 100% { box-shadow: 0 1px 4px rgba(0,0,0,.08); } }
.card-top { background: #f8f9fa; padding: 10px 12px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.order-id { font-size: 14px; font-weight: 700; color: #333; }
.order-time { font-size: 11px; color: #888; }
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge-1 { background: #fff3cd; color: #856404; }
.badge-2 { background: #cce5ff; color: #004085; }
.badge-3 { background: #d4edda; color: #155724; }
.badge-4 { background: #f8d7da; color: #721c24; }
.card-body { padding: 10px 12px; }
.loc-section, .items-section { margin-bottom: 10px; }
.items-section { margin-bottom: 0; }
.section-title { font-size: 11px; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.loc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.loc-item { background: #f8f9fa; border-radius: 6px; padding: 6px 4px; min-width: 0; }
.loc-label { font-size: 9px; color: #888; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc-value { font-size: 11px; font-weight: 600; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-item { padding: 10px 8px; background: #f8f9fa; border-radius: 8px; margin-bottom: 6px; }
.order-item:last-child { margin-bottom: 0; }
.item-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.item-name { font-size: 13px; font-weight: 600; color: #333; }
.item-qty { background: #e8f5e9; color: #2e7d32; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.item-mods { font-size: 11px; color: #666; margin-top: 6px; padding-top: 6px; border-top: 1px solid #eee; text-align: center; }
.mod-tag { display: inline-block; background: #e3f2fd; color: #1565c0; padding: 1px 7px; border-radius: 99px; font-size: 10px; margin: 2px 2px 0 0; }
.status-section { border-top: 1px solid #f0f0f0; padding: 10px 12px; background: #fafafa; }
.status-label { display: block; font-size: 11px; color: #888; margin-bottom: 6px; font-weight: 600; }
.status-select { width: 100%; padding: 8px 30px 8px 10px; border: 1px solid #ccc; border-radius: 8px; font: 600 13px var(--font-app); cursor: pointer; background: #fff; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #666 50%), linear-gradient(135deg, #666 50%, transparent 50%); background-position: right 15px center, right 10px center; background-size: 5px 5px; background-repeat: no-repeat; }
.status-select:focus { outline: none; border-color: #0078d4; }
.update-btn { width: 100%; margin-top: 8px; padding: 10px; border: none; border-radius: 8px; font: 700 13px var(--font-app); cursor: pointer; background: var(--brand); color: #fff; }
.update-btn:disabled { opacity: .4; cursor: not-allowed; }
.update-btn:active { background: var(--brand-dark); }
.update-btn-final { background: #f0f0f0; color: #2e7d32; opacity: 1 !important; }
.status-select:disabled { background-color: #f5f5f5; color: #999; cursor: not-allowed; }
.col-count { font-size: 11px; font-weight: 400; }
.loading-items { color: #aaa; font-size: 12px; text-align: center; padding: 10px 0; }
.empty-col { text-align: center; padding: 30px 10px; color: #aaa; font-size: 13px; }
.warning-box { background: #fff3cd; border: 1px solid #ffc107; border-radius: 12px; padding: 24px; margin: 20px auto; max-width: 640px; }
.warning-box h2 { font-size: 16px; color: #856404; margin-bottom: 8px; font-weight: 700; text-align: center; }
.warning-box p { font-size: 13px; color: #666; line-height: 1.5; text-align: center; }
.warning-box ul { font-size: 14px; line-height: 1.8; }

/* ---------- Pantry config (Pantry Config template) ---------- */
.config-wrap { max-width: 520px; padding: 24px 16px; }
.config-wrap .page-header { background: var(--brand); color: #fff; border-radius: 16px; padding: 24px 20px; text-align: center; margin-bottom: 24px; }
.config-wrap .page-header .icon { font-size: 40px; margin-bottom: 8px; }
.config-wrap .page-header h1 { font-size: 20px; font-weight: 700; margin-bottom: 4px; color: #fff; }
.config-wrap .page-header p { font-size: 13px; opacity: .85; margin: 0; }
.config-wrap .card { border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.config-wrap .card h2 { font-size: 14px; font-weight: 600; color: #333; margin-bottom: 14px; }
.config-wrap label { font-size: 13px; color: #555; display: block; margin-bottom: 6px; font-weight: 500; }
.config-wrap select { width: 100%; padding: 12px 14px; border: 1px solid #ccc; border-radius: 8px; font: 14px var(--font-app); background: #fff; color: #333; }
.config-wrap select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,120,212,.15); }
.config-wrap select:disabled { background: #f5f5f5; color: #999; }
.url-box { background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 8px; padding: 12px 14px; font-size: 12px; color: #495057; font-family: monospace; word-break: break-all; line-height: 1.6; min-height: 48px; margin-top: 10px; }
.url-box.empty { color: #aaa; font-family: var(--font-app); font-size: 13px; }
.btn-row { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; min-width: 100px; padding: 13px 10px; border: none; border-radius: 10px; font: 600 13px var(--font-app); }
.btn-row .btn:disabled { opacity: .35; }
.btn-configure { background: var(--brand); color: #fff; }
.btn-configure:hover:not(:disabled) { background: #2a4a34; }
.btn-row .btn-copy { background: #9eafa4; color: var(--brand); border: 1.5px solid var(--brand); }
.btn-row .btn-copy:hover:not(:disabled) { background: #85959b; color: var(--brand); border: 1.5px solid var(--brand); }
.btn-open { background: #4a7c59; color: #fff; }
.btn-open:hover:not(:disabled) { background: #3d6649; color: #fff; }
.btn-configure:disabled { background: var(--brand); } .btn-open:disabled { background: #4a7c59; } .btn-row .btn-copy:disabled { background: #9eafa4; }
.instructions { background: #fff8e1; border: 1px solid #ffe082; border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.instructions h3 { font-size: 13px; font-weight: 700; color: #795548; margin-bottom: 10px; }
.instructions ol { padding-left: 18px; margin: 0; }
.instructions li { font-size: 12px; color: #666; margin-bottom: 6px; line-height: 1.5; }
.config-wrap .alert { font-size: 13px; }
.pantry-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #eee; font-size: 14px; }
.pantry-row:last-child { border-bottom: 0; }
.pantry-row-actions { display: flex; gap: 6px; align-items: center; }
.pantry-row-actions form { margin: 0; }

/* ---------- QR code & link page, branded QR images ---------- */
.qr-link { resize: vertical; font-size: 13px; }
.qr-preview { width: 220px; height: 220px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; display: block; }
.qr-branded { width: 100%; max-width: 220px; height: auto; display: block; margin: 0 auto; }
.card .actions form { margin: 0; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li + li { margin-top: 2px; }
