/* ==========================================================================
   Voila UI: 90s grunge / xerox zine system (see DESIGN.md)
   Courier New, 8px base radius, paper + faded black, texture used with restraint.
   Operational screens stay high-contrast; character lives in headers, empty
   states, accents and the landing page.
   ========================================================================== */

/* ---- Tokens ------------------------------------------------------------- */
:root {
  /* DESIGN.md palette */
  --ink: #2E2E2E;            /* faded black */
  --yellow: #B5A642;         /* dirty yellow */
  --red: #8C2727;            /* muted red */
  --paper: #E9E1D4;          /* off-white */
  --olive: #6B8E23;          /* olive drab */
  --denim: #3B5998;          /* denim blue */
  --grey: #7A7A7A;           /* concrete grey */
  --orange: #A84700;         /* burnt orange */

  /* Derived for contrast (AA on paper / on ink) */
  --ink-soft: #565656;       /* secondary text on paper, 5.9:1 */
  --paper-2: #F5F0E6;        /* card surface */
  --paper-3: #DDD3C2;        /* sunken / hover / skeleton */
  --field: #FBF8F2;          /* input surface */
  --line: #C4B9A6;           /* hairlines */
  --olive-dk: #4F6B1A;       /* olive as a fill under paper text */
  --on-ink-soft: #BDB4A4;    /* secondary text on ink */

  --brand: #2E2E2E;          /* overridden per tenant */
  --on-brand: #F5F0E6;

  --r: 8px;
  --shadow: 0 2px 12px rgba(46, 46, 46, .08);
  --shadow-lift: 0 6px 18px rgba(46, 46, 46, .16);
  --font: "Courier New", Courier, "Liberation Mono", monospace;

  --z-sticky: 100; --z-overlay: 200; --z-modal: 300; --z-toast: 500;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .18 0 0 0 0 .18 0 0 0 0 .18 0 0 0 .9 -.38'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .91 0 0 0 0 .88 0 0 0 0 .83 0 0 0 .9 -.42'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  /* Bootstrap re-skin */
  --bs-body-font-family: var(--font);
  --bs-body-font-size: 1rem;
  --bs-body-line-height: 1.6;
  --bs-body-color: #2E2E2E;
  --bs-body-color-rgb: 46, 46, 46;
  --bs-body-bg: #E9E1D4;
  --bs-body-bg-rgb: 233, 225, 212;
  --bs-border-color: #C4B9A6;
  --bs-border-radius: 8px;
  --bs-border-radius-sm: 6px;
  --bs-border-radius-lg: 8px;
  --bs-link-color: #3B5998;
  --bs-link-color-rgb: 59, 89, 152;
  --bs-link-hover-color: #2E2E2E;
  --bs-link-hover-color-rgb: 46, 46, 46;
  --bs-secondary-color: #565656;
  --bs-primary-rgb: 46, 46, 46;
  --bs-secondary-rgb: 86, 86, 86;
  --bs-success-rgb: 79, 107, 26;
  --bs-danger-rgb: 140, 39, 39;
  --bs-warning-rgb: 181, 166, 66;
  --bs-info-rgb: 59, 89, 152;
  --bs-light-rgb: 221, 211, 194;
}
@supports (color: oklch(from red l c h)) {
  :root { --on-brand: oklch(from var(--brand) clamp(0.3, (0.6 - l) * 1000, 0.95) 0 0); }
}

/* ---- Base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--grain), var(--paper);
  min-height: 100dvh;
  animation: fade .2s ease-out both;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font); font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
a { color: var(--denim); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
code { font-family: var(--font); color: var(--ink); background: var(--paper-3); padding: .1rem .35rem; border-radius: 4px; font-size: .85em; word-break: break-all; }
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 2px solid var(--denim); outline-offset: 2px; }
.sidebar :focus-visible, .lp-nav :focus-visible, .lp-hero :focus-visible, .lp-cta-band :focus-visible,
.auth-side :focus-visible, .cart-bar :focus-visible, .admin-bar :focus-visible, .topbar :focus-visible { outline-color: var(--yellow); }

.muted { color: var(--ink-soft); }
.mono { font-variant-numeric: tabular-nums; }
.grow { flex: 1 1 auto; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.text-secondary { color: var(--ink-soft) !important; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: var(--z-toast); background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: var(--r); }
.skip-link:focus { top: 8px; color: var(--paper); }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes pulse { from { opacity: .55; transform: scale(1); } to { opacity: 0; transform: scale(1.9); } }
@keyframes grow-x { from { transform: scaleX(0); } }
.rise { animation: rise .42s ease-out both; animation-delay: calc(var(--i, 0) * 80ms); }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  --bs-btn-border-radius: var(--r);
  --bs-btn-font-weight: 700;
  --bs-btn-padding-x: 1rem; --bs-btn-padding-y: .55rem;
  --bs-btn-font-size: .95rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; border-width: 1.5px; font-family: var(--font); letter-spacing: .01em; line-height: 1.2;
  transition: background-color .2s ease-out, box-shadow .2s ease-out, color .2s ease-out, border-color .2s ease-out, transform .2s ease-out;
}
.btn-sm { --bs-btn-padding-y: .3rem; --bs-btn-padding-x: .7rem; --bs-btn-font-size: .85rem; min-height: 36px; }
.btn-lg { --bs-btn-padding-y: .75rem; --bs-btn-padding-x: 1.4rem; --bs-btn-font-size: 1.05rem; min-height: 52px; }
.btn:focus-visible { outline: 2px solid var(--denim); outline-offset: 2px; box-shadow: none; }
.btn:not(:disabled):hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.btn:not(:disabled):active { transform: translateY(0); box-shadow: none; }
.btn:disabled, .btn.disabled { opacity: .5; }

.btn-primary {
  --bs-btn-color: var(--paper-2); --bs-btn-bg: var(--ink); --bs-btn-border-color: var(--ink);
  --bs-btn-hover-color: var(--paper-2); --bs-btn-hover-bg: #262626; --bs-btn-hover-border-color: #262626;
  --bs-btn-active-color: var(--paper-2); --bs-btn-active-bg: #262626; --bs-btn-active-border-color: #262626;
  --bs-btn-disabled-color: var(--paper-2); --bs-btn-disabled-bg: var(--ink); --bs-btn-disabled-border-color: var(--ink);
}
.customer .btn-primary {
  --bs-btn-color: var(--on-brand); --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-color: var(--on-brand); --bs-btn-hover-bg: color-mix(in srgb, var(--brand) 92%, var(--ink)); --bs-btn-hover-border-color: color-mix(in srgb, var(--brand) 92%, var(--ink));
  --bs-btn-active-color: var(--on-brand); --bs-btn-active-bg: color-mix(in srgb, var(--brand) 88%, var(--ink)); --bs-btn-active-border-color: color-mix(in srgb, var(--brand) 88%, var(--ink));
  --bs-btn-disabled-color: var(--on-brand); --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand);
}
.btn-outline-secondary {
  --bs-btn-color: var(--ink); --bs-btn-border-color: var(--grey); --bs-btn-bg: transparent;
  --bs-btn-hover-color: var(--ink); --bs-btn-hover-bg: var(--paper-3); --bs-btn-hover-border-color: var(--ink);
  --bs-btn-active-color: var(--ink); --bs-btn-active-bg: var(--paper-3); --bs-btn-active-border-color: var(--ink);
  --bs-btn-disabled-color: var(--ink); --bs-btn-disabled-border-color: var(--grey);
}
.btn-outline-primary {
  --bs-btn-color: var(--ink); --bs-btn-border-color: var(--ink); --bs-btn-bg: transparent;
  --bs-btn-hover-color: var(--paper-2); --bs-btn-hover-bg: var(--ink); --bs-btn-hover-border-color: var(--ink);
  --bs-btn-active-color: var(--paper-2); --bs-btn-active-bg: var(--ink); --bs-btn-active-border-color: var(--ink);
}
.btn-outline-danger {
  --bs-btn-color: var(--red); --bs-btn-border-color: var(--red); --bs-btn-bg: transparent;
  --bs-btn-hover-color: var(--paper-2); --bs-btn-hover-bg: var(--red); --bs-btn-hover-border-color: var(--red);
  --bs-btn-active-color: var(--paper-2); --bs-btn-active-bg: var(--red); --bs-btn-active-border-color: var(--red);
}
.btn-outline-danger.armed { background: var(--red); color: var(--paper-2); }
.btn-link { --bs-btn-color: var(--denim); --bs-btn-hover-color: var(--ink); text-decoration: underline; min-height: 0; font-weight: 600; }
.btn-link:not(:disabled):hover, .btn-link:not(:disabled):active { transform: none; box-shadow: none; }
.btn-hot {
  --bs-btn-color: var(--paper-2); --bs-btn-bg: var(--orange); --bs-btn-border-color: var(--orange);
  --bs-btn-hover-color: var(--paper-2); --bs-btn-hover-bg: #963f00; --bs-btn-hover-border-color: #963f00;
  --bs-btn-active-color: var(--paper-2); --bs-btn-active-bg: #963f00; --bs-btn-active-border-color: #963f00;
}
.btn-paper {
  --bs-btn-color: var(--ink); --bs-btn-bg: var(--paper); --bs-btn-border-color: var(--paper);
  --bs-btn-hover-color: var(--ink); --bs-btn-hover-bg: #F5F0E6; --bs-btn-hover-border-color: #F5F0E6;
  --bs-btn-active-color: var(--ink); --bs-btn-active-bg: #F5F0E6;
}
.btn-ghost-light {
  --bs-btn-color: var(--paper); --bs-btn-bg: transparent; --bs-btn-border-color: rgba(233, 225, 212, .55);
  --bs-btn-hover-color: var(--paper); --bs-btn-hover-bg: rgba(233, 225, 212, .12); --bs-btn-hover-border-color: var(--paper);
  --bs-btn-active-color: var(--paper); --bs-btn-active-bg: rgba(233, 225, 212, .18);
}
button.link-danger { background: none; border: 0; padding: 0; font: inherit; font-size: .85rem; font-weight: 600; text-decoration: underline; cursor: pointer; }
.link-danger { color: var(--red) !important; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1.5px solid currentColor; border-radius: var(--r); background: transparent; color: inherit; }
.icon-btn .icon { width: 1.3rem; height: 1.3rem; }

/* ---- Forms -------------------------------------------------------------- */
.field { margin-bottom: 1rem; min-width: 0; }
.form-label { font-size: .875rem; font-weight: 700; letter-spacing: .02em; margin-bottom: .35rem; color: var(--ink); }
.form-label .req { color: var(--red); }
.opt { font-weight: 400; font-size: .8rem; color: var(--ink-soft); margin-left: .35rem; letter-spacing: 0; }
.form-control, .form-select {
  font-family: var(--font); font-size: 1rem; color: var(--ink);
  background-color: var(--field); border: 1px solid var(--grey); border-radius: var(--r);
  min-height: 44px; padding: .55rem .75rem;
  transition: border-color .2s ease-out, box-shadow .2s ease-out;
}
.form-control-sm, .form-select-sm { min-height: 36px; padding: .3rem .6rem; font-size: .9rem; }
.form-control::placeholder { color: #6E6E6E; opacity: 1; }
.form-control:focus, .form-select:focus { background-color: var(--field); color: var(--ink); border-color: var(--ink); outline: 2px solid var(--denim); outline-offset: 2px; box-shadow: none; }
.form-control:disabled { background: var(--paper-3); }
.pw-wrap { position: relative; }
.pw-wrap .form-control { padding-right: 4.5rem; }
.pw-toggle { position: absolute; top: 50%; right: .4rem; transform: translateY(-50%); background: none; border: 0; padding: .35rem .5rem; font: inherit; font-size: .8rem; font-weight: 700; color: var(--ink); text-decoration: underline; cursor: pointer; }
.pw-toggle:focus-visible { outline: 2px solid var(--denim); outline-offset: 2px; }
.form-control-color { width: 4.5rem; padding: .3rem; }
.form-text { color: var(--ink-soft); font-size: .8rem; }
.form-check-input { background-color: var(--field); border: 1.5px solid var(--ink); width: 1.15em; height: 1.15em; }
.form-check-input:checked { background-color: var(--ink); border-color: var(--ink); }
.customer .form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { box-shadow: none; border-color: var(--ink); outline: 2px solid var(--denim); outline-offset: 2px; }
.form-switch .form-check-input { width: 2.4em; height: 1.3em; }
.form-check-label { cursor: pointer; }
.form-row, .loc-grid, .staff-grid { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.form-row > .field, .loc-grid > .field, .staff-grid > .field { flex: 1 1 180px; margin-bottom: 0; }
.form-row > .field-btn, .loc-grid > .field-btn, .staff-grid > .field-btn { flex: 0 0 auto; }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.inline-form .form-control { flex: 1 1 140px; width: auto; }
.inline-form .form-control.narrow { flex: 0 0 96px; }
.filter-form { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.filter-form .field { margin-bottom: 0; }
@media (max-width: 575.98px) {
  .form-row > .field-btn, .loc-grid > .field-btn, .staff-grid > .field-btn { flex: 1 1 100%; }
  .field-btn .btn { width: 100%; }
}

/* ---- Surfaces ----------------------------------------------------------- */
.panel { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 1.25rem; min-width: 0; }
.panel.p-0 { overflow: hidden; }
.narrow-panel { max-width: 640px; }
.photo-field { display: flex; gap: .75rem; align-items: flex-start; }
.photo-field > div { flex: 1 1 auto; min-width: 0; }
.photo-thumb { width: 64px; height: 64px; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; flex: 0 0 auto; background: var(--paper-3); }
.panel-title { font-size: 1.05rem; margin: 0 0 1rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.subpanel { background: var(--field); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; margin-bottom: 1rem; }
.subpanel-title { font-size: .95rem; margin: 0; letter-spacing: .04em; text-transform: uppercase; }
.card { background: var(--paper-2); border: 1px solid var(--line); box-shadow: var(--shadow); }
.line-row { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px dashed var(--line); }
.line-row:last-child { border-bottom: 0; }
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.25rem; align-items: start; }
.split-rev { grid-template-columns: 1fr 1.4fr; }
.stack { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
@media (max-width: 991.98px) { .split, .split-rev { grid-template-columns: 1fr; } }

.stat-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 1.25rem; margin-bottom: 1.25rem; }
.stat { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 1.1rem 1.25rem; min-width: 0; }
.stat-label { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.stat-value { font-size: 1.9rem; font-weight: 700; line-height: 1.2; margin-top: .25rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-lead { background: var(--grain-light), var(--ink); border-color: var(--ink); color: var(--paper); }
.stat-lead .stat-label { color: var(--on-ink-soft); }
.stat-lead .stat-value { font-size: 3rem; color: var(--paper); }
@media (max-width: 767.98px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .stat-lead { grid-column: 1 / -1; }
  .stat-value { font-size: 1.5rem; }
  .stat-lead .stat-value { font-size: 2.5rem; }
}
.plan-line { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.plan-name { font-size: 1.4rem; }

.bar-row { display: grid; grid-template-columns: minmax(80px, 1.2fr) 3fr auto; gap: .75rem; align-items: center; padding: .4rem 0; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.bar-track { height: 12px; background: var(--paper-3); border-radius: 4px; overflow: hidden; }
.bar-track span { display: block; height: 100%; width: 100%; background: var(--ink); transform-origin: left; transform: scaleX(var(--w, 0)); animation: grow-x .6s ease-out both; }
.bar-val { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; }
@media (max-width: 575.98px) { .bar-row { grid-template-columns: 1fr auto; } .bar-track { grid-column: 1 / -1; order: 3; } }

.meter { height: 10px; background: var(--paper-3); border-radius: 4px; overflow: hidden; margin-top: .35rem; }
.meter span { display: block; height: 100%; width: 100%; background: var(--olive-dk); transform-origin: left; transform: scaleX(var(--w, 0)); animation: grow-x .6s ease-out both; }
.meter span.full { background: var(--orange); }
.usage-row { padding: .6rem 0; border-bottom: 1px dashed var(--line); }
.usage-row:last-child { border-bottom: 0; }
.usage-top { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.25rem; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 1.25rem; }
.plan.is-current { border: 2px solid var(--ink); }
.plan-flag { position: absolute; top: -12px; right: 14px; background: var(--yellow); color: var(--ink); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .15rem .6rem; border-radius: 4px; transform: rotate(2deg); }
.plan-title { font-size: 1.25rem; margin: 0; }
.plan-price { font-size: 2rem; font-weight: 700; margin: .5rem 0 1rem; }
.plan-price span { font-size: .85rem; font-weight: 400; color: var(--ink-soft); }
.plan-list { list-style: none; padding: 0; margin: 0 0 1.25rem; flex: 1; font-size: .9rem; }
.plan-list li { display: flex; gap: .5rem; padding: .25rem 0; align-items: baseline; }
.plan-list .icon { color: var(--olive-dk); }

.note { padding: .6rem 0 .6rem .9rem; border-bottom: 1px dashed var(--line); border-left: 3px solid transparent; }
.note:last-child { border-bottom: 0; }
.note.unread { border-left-color: var(--yellow); font-weight: 700; }
.note-title { line-height: 1.35; }
.note-body { font-size: .85rem; color: var(--ink-soft); font-weight: 400; }

/* ---- Tables ------------------------------------------------------------- */
.table {
  --bs-table-bg: transparent; --bs-table-color: var(--ink); --bs-table-border-color: var(--line);
  --bs-table-hover-bg: rgba(221, 211, 194, .45); --bs-table-hover-color: var(--ink);
  font-size: .95rem; margin-bottom: 0;
}
.table > thead > tr > th {
  background: var(--paper-3); color: var(--ink); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
  border-bottom: 2px solid var(--ink); padding: .75rem 1rem; white-space: nowrap;
}
.table > tbody > tr > td { padding: .8rem 1rem; }
.table-responsive { -webkit-overflow-scrolling: touch; }
.row-actions { display: inline-flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.row-actions.nowrap { flex-wrap: nowrap; }
.link-cell { display: flex; align-items: center; gap: .5rem; white-space: nowrap; }
.link-cell code { white-space: nowrap; word-break: normal; }

/* ---- Tags / status kinds ------------------------------------------------ */
.k-new   { --k: #B5A642; --k-ink: #2E2E2E; --k-line: #B5A642; }
.k-info  { --k: #3B5998; --k-ink: #F5F0E6; --k-line: #3B5998; }
.k-warn  { --k: #A84700; --k-ink: #F5F0E6; --k-line: #A84700; }
.k-ok    { --k: #4F6B1A; --k-ink: #F5F0E6; --k-line: #6B8E23; }
.k-bad   { --k: #8C2727; --k-ink: #F5F0E6; --k-line: #8C2727; }
.k-muted { --k: #DDD3C2; --k-ink: #2E2E2E; --k-line: #7A7A7A; }
.tag { display: inline-flex; align-items: center; gap: .3rem; background: var(--k); color: var(--k-ink); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1; padding: .35rem .55rem; border-radius: 4px; border: 1px solid color-mix(in srgb, var(--k) 70%, var(--ink)); white-space: nowrap; }
.tag .icon { width: 1em; height: 1em; }
.badge { font-family: var(--font); font-weight: 700; border-radius: 4px; }
.text-bg-primary, .text-bg-secondary, .text-bg-danger, .text-bg-warning, .text-bg-light { background-color: var(--paper-3) !important; color: var(--ink) !important; }

/* ---- Alerts, toasts, inline errors ------------------------------------- */
.alert {
  --bs-alert-border-radius: var(--r);
  display: flex; align-items: flex-start; gap: .75rem; background: var(--paper-2); color: var(--ink);
  border: 1px solid var(--line); border-left: 6px solid var(--grey); padding: .8rem 1rem; margin-bottom: 1rem; box-shadow: var(--shadow);
}
.alert .alert-icon { margin-top: .15rem; }
.alert-body { flex: 1; min-width: 0; }
.alert-success { border-left-color: var(--olive); } .alert-success .alert-icon { color: var(--olive-dk); }
.alert-danger { border-left-color: var(--red); } .alert-danger .alert-icon { color: var(--red); }
.alert-warning { border-left-color: var(--yellow); } .alert-warning .alert-icon { color: #6F6523; }
.alert-info { border-left-color: var(--denim); } .alert-info .alert-icon { color: var(--denim); }
.alert-dismissible { padding-right: 1rem; }
.alert-dismissible .btn-close, .btn-close { position: static; flex: none; padding: 0; width: 28px; height: 28px; opacity: .75; background: currentColor !important; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center / 16px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center / 16px no-repeat; }
.btn-close:hover { opacity: 1; }
.inline-error { display: flex; gap: .5rem; align-items: flex-start; color: var(--red); background: color-mix(in srgb, var(--red) 8%, var(--paper-2)); border: 1px solid color-mix(in srgb, var(--red) 40%, var(--paper-2)); border-radius: var(--r); padding: .6rem .8rem; font-weight: 700; font-size: .9rem; }
.inline-error .icon { margin-top: .15rem; }
.inline-error.d-none { display: none !important; }

.toast-stack { position: fixed; right: 1rem; bottom: 1rem; z-index: var(--z-toast); display: flex; flex-direction: column; gap: .5rem; width: min(380px, calc(100vw - 2rem)); pointer-events: none; padding-bottom: env(safe-area-inset-bottom); }
.customer .toast-stack { bottom: 5.5rem; right: 50%; transform: translateX(50%); }
.toast-item { display: flex; gap: .6rem; align-items: flex-start; background: var(--ink); color: var(--paper); border-radius: var(--r); border-left: 5px solid var(--yellow); padding: .75rem 1rem; box-shadow: var(--shadow-lift); font-weight: 700; font-size: .9rem; pointer-events: auto; animation: rise .3s ease-out both; transition: opacity .25s ease-out; }
.toast-item.toast-success { border-left-color: var(--olive); }
.toast-item.toast-danger { border-left-color: #C25A5A; }
.toast-item.out { opacity: 0; }
.toast-item .icon { margin-top: .15rem; }

.conn-banner { display: flex; gap: .6rem; align-items: center; background: var(--yellow); color: var(--ink); border-radius: var(--r); padding: .6rem 1rem; font-weight: 700; margin-bottom: 1rem; }
.conn-banner.d-none { display: none !important; }
.conn-note { display: flex; gap: .4rem; justify-content: center; align-items: center; font-size: .85rem; color: var(--red); font-weight: 700; margin: .75rem 0 0; }
.conn-note.d-none { display: none !important; }

/* ---- Empty states and skeletons ---------------------------------------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 2.5rem 1rem; gap: .35rem; }
.empty h2 { font-size: 1.15rem; margin: .5rem 0 0; }
.empty p { color: var(--ink-soft); max-width: 44ch; margin: 0; }
.empty-icon { display: grid; place-items: center; width: 60px; height: 60px; border: 1.5px dashed var(--ink); border-radius: var(--r); background: var(--paper-3); transform: rotate(-3deg); }
.empty-icon .icon { width: 28px; height: 28px; }
.empty-action { margin-top: .75rem; }
.empty-sm { padding: 1rem; }
.empty-sm .empty-icon { width: 44px; height: 44px; }
.empty-sm .empty-icon .icon { width: 22px; height: 22px; }
.grid-all { grid-column: 1 / -1; }

.skel { display: block; height: 14px; border-radius: 4px; background: var(--paper-3); position: relative; overflow: hidden; margin-bottom: .65rem; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(251, 248, 242, .7), transparent); animation: shimmer 1.4s ease-in-out infinite; }
.skel.w-60 { width: 60%; } .skel.w-40 { width: 40%; } .skel.h-lg { height: 44px; margin-top: 1rem; margin-bottom: 0; }
.skeleton-card { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem; }
.skel-list { padding: .25rem 0; }

/* ---- Dashboard shell ---------------------------------------------------- */
.app-shell { display: flex; min-height: 100dvh; }
.sidebar {
  --bs-offcanvas-width: 288px; --bs-offcanvas-bg: var(--ink); --bs-offcanvas-color: var(--paper);
  --bs-offcanvas-border-width: 0; --bs-offcanvas-zindex: 210;
  background: var(--grain-light), var(--ink); color: var(--paper); display: flex; flex-direction: column;
}
.sidebar-brand { display: flex; align-items: center; gap: .75rem; padding: 1.1rem 1rem; border-bottom: 1px dashed rgba(233, 225, 212, .3); }
.brand-chip { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: var(--r); background: var(--brand); color: var(--on-brand); font-weight: 700; font-size: 1.1rem; border: 1.5px solid rgba(233, 225, 212, .55); overflow: hidden; transform: rotate(-3deg); }
.brand-chip img { width: 100%; height: 100%; object-fit: contain; }
.brand-name { font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; flex: 1; }
.sidebar-close { margin-left: auto; width: 40px; height: 40px; display: grid; place-items: center; background: none; border: 1.5px solid rgba(233, 225, 212, .45); color: var(--paper); border-radius: var(--r); }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: .75rem .5rem; flex: 1; overflow-y: auto; }
.side-link { display: flex; align-items: center; gap: .75rem; min-height: 44px; padding: .55rem .8rem; border-radius: var(--r); color: var(--paper); text-decoration: none; font-weight: 400; background: none; border: 0; font-family: var(--font); font-size: 1rem; transition: background-color .2s ease-out; }
.side-link:hover { background: rgba(233, 225, 212, .1); color: var(--paper); }
.side-link.active { background: rgba(233, 225, 212, .14); font-weight: 700; box-shadow: inset 4px 0 0 var(--yellow); }
.side-link-sm { min-height: 40px; font-size: .9rem; color: var(--on-ink-soft); }
.side-badge { margin-left: auto; min-width: 1.6rem; padding: .15rem .45rem; border-radius: 999px; background: var(--yellow); color: var(--ink); font-size: .8rem; font-weight: 700; line-height: 1.3; text-align: center; animation: badge-pulse 1.6s ease-in-out infinite; }
@keyframes badge-pulse { 50% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .side-badge { animation: none; } }
.sidebar-foot { padding: .75rem .5rem 1rem; border-top: 1px dashed rgba(233, 225, 212, .3); }
.who { padding: 0 .8rem .6rem; display: flex; flex-direction: column; font-size: .9rem; }
.who span { color: var(--on-ink-soft); font-size: .8rem; text-transform: capitalize; }
.content { flex: 1; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: var(--z-sticky); display: flex; align-items: center; gap: .75rem; padding: .5rem 1rem; background: var(--ink); color: var(--paper); border-bottom: 3px solid var(--brand); }
.topbar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page { padding: 1.25rem 1rem 3rem; max-width: 1280px; margin: 0 auto; }
@media (min-width: 992px) {
  .app-shell .sidebar { position: sticky !important; top: 0; height: 100dvh !important; width: 268px !important; flex: 0 0 268px; display: flex; flex-direction: column; background: var(--grain-light), var(--ink) !important; color: var(--paper) !important; overflow-y: auto; }
  .page { padding: 2rem 2rem 4rem; }
}
.offcanvas-backdrop, .modal-backdrop { --bs-backdrop-bg: #2E2E2E; --bs-backdrop-opacity: .6; }
.offcanvas-backdrop { --bs-backdrop-zindex: var(--z-overlay); }
.modal-backdrop { --bs-backdrop-zindex: 250; }

.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.5rem; }
.page-head h1 { font-size: 1.75rem; margin: 0; line-height: 1.2; }
.page-head h1::after { content: ""; display: block; width: 56px; height: 5px; margin-top: .55rem; background: var(--yellow); transform: rotate(-1.5deg); transform-origin: left; }
.page-head p { margin: .6rem 0 0; color: var(--ink-soft); max-width: 60ch; }
.page-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

.seg { display: inline-flex; border: 1.5px solid var(--ink); border-radius: var(--r); overflow: hidden; background: var(--paper-2); }
.seg button { min-height: 44px; padding: .5rem 1rem; background: none; border: 0; font-family: var(--font); font-weight: 700; color: var(--ink); transition: background-color .2s ease-out, color .2s ease-out; }
.seg button + button { border-left: 1.5px solid var(--ink); }
.seg button:hover { background: var(--paper-3); }
.seg button.active { background: var(--ink); color: var(--paper-2); }

/* Product editor */
.product { border-top: 1px solid var(--line); }
.product summary { display: flex; align-items: center; gap: .75rem; padding: .8rem .25rem; cursor: pointer; list-style: none; min-height: 48px; }
.product summary::-webkit-details-marker { display: none; }
.product-name { flex: 1; font-weight: 700; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.product-price { font-variant-numeric: tabular-nums; font-weight: 700; }
.product-chev { transition: transform .2s ease-out; }
.product[open] .product-chev { transform: rotate(90deg); }
.product-body { padding: .5rem .25rem 1rem; }
.mods { margin-top: 1.25rem; }
.mods-title { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: .75rem; }
.mod { border-left: 3px solid var(--yellow); padding: .25rem 0 .25rem .85rem; margin-bottom: 1rem; }
.mod-head { display: flex; gap: .75rem; align-items: baseline; flex-wrap: wrap; }
.mod-options { list-style: none; padding: 0; margin: .4rem 0 .6rem; font-size: .9rem; }
.mod-options li { display: flex; gap: .75rem; align-items: center; justify-content: space-between; max-width: 420px; padding: .15rem 0; }
.add-row { margin-top: .75rem; }

/* ---- Order board -------------------------------------------------------- */
.board-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.meta-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .7rem; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--paper-2); font-weight: 700; font-size: .85rem; color: var(--ink-soft); }
.meta-chip.on { color: var(--ink); border-color: var(--ink); box-shadow: inset 0 -4px 0 var(--k-line); }
.order-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr)); gap: 1rem; align-items: start; }
.order { display: flex; flex-direction: column; gap: .75rem; background: var(--paper-2); border: 1.5px solid var(--ink); border-top: 10px solid var(--k-line, var(--grey)); border-radius: var(--r); padding: 1rem; box-shadow: var(--shadow); }
.order.skeleton-card { border-top-color: var(--paper-3); }
.order.k-new { background: color-mix(in srgb, var(--yellow) 16%, var(--paper-2)); }
.order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.order-no { font-size: 1.6rem; font-weight: 700; line-height: 1.1; letter-spacing: .02em; }
.order-where { font-size: .95rem; color: var(--ink-soft); font-weight: 700; margin-top: .15rem; }
.order-time { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; font-size: .9rem; font-weight: 700; }
.order-time.late { color: var(--red); }
.order-items { list-style: none; padding: .75rem 0; margin: 0; border-top: 1px dashed var(--grey); border-bottom: 1px dashed var(--grey); display: flex; flex-direction: column; gap: .5rem; font-size: 1.05rem; }
.order-items li { display: flex; gap: .6rem; align-items: baseline; }
.qty { font-weight: 700; min-width: 2.2ch; font-variant-numeric: tabular-nums; }
.item-name { font-weight: 700; display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.item-sub { font-weight: 400; font-size: .9rem; color: var(--ink-soft); }
.item-note { font-weight: 700; font-size: .9rem; color: var(--orange); display: flex; gap: .35rem; align-items: baseline; }
.order-notes { display: flex; gap: .5rem; align-items: flex-start; background: color-mix(in srgb, var(--yellow) 30%, var(--paper-2)); border: 1px solid var(--yellow); border-radius: var(--r); padding: .55rem .75rem; font-weight: 700; font-size: .95rem; overflow-wrap: anywhere; }
.order-foot { display: flex; flex-direction: column; gap: .75rem; }
.order-total { font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.order-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.order-actions .btn-lg { flex: 1 1 60%; }
.order .is-busy { opacity: .6; }

/* ---- Customer ordering -------------------------------------------------- */
.shell { max-width: 720px; margin: 0 auto; padding: 0 1rem; }
.customer { background: var(--grain), var(--paper); }
.menu-hero { position: relative; background: var(--grain-light), var(--brand); color: var(--on-brand); padding: 1.6rem 0 3rem; }
.menu-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 22px; background: var(--paper); clip-path: polygon(0 62%, 4% 22%, 8% 56%, 12% 14%, 17% 50%, 21% 26%, 26% 60%, 30% 18%, 35% 52%, 39% 22%, 44% 58%, 48% 14%, 53% 50%, 57% 24%, 62% 60%, 66% 16%, 71% 54%, 75% 26%, 80% 58%, 84% 18%, 89% 52%, 93% 22%, 97% 56%, 100% 30%, 100% 100%, 0 100%); }
.menu-hero h1 { color: var(--on-brand); font-size: clamp(1.6rem, 5vw, 2.25rem); margin: 0; line-height: 1.15; }
.hero-logo { display: block; margin-bottom: .6rem; max-width: 160px; object-fit: contain; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .6rem; font-weight: 700; font-size: .95rem; }
.hero-meta .dot { width: 4px; height: 4px; background: currentColor; margin: 0 .35rem; border-radius: 1px; }
.customer-main { padding-top: 1rem; padding-bottom: 7rem; }
.cat-nav { position: sticky; top: 0; z-index: var(--z-sticky); background: var(--paper); border-bottom: 1.5px solid var(--ink); }
.cat-nav-inner { display: flex; gap: .5rem; overflow-x: auto; padding-top: .6rem; padding-bottom: .6rem; scrollbar-width: none; }
.cat-nav-inner::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: .35rem .85rem; border: 1.5px solid var(--ink); border-radius: var(--r); color: var(--ink); background: var(--paper-2); font-weight: 700; text-decoration: none; transition: background-color .2s ease-out, color .2s ease-out; }
.chip.active { background: var(--ink); color: var(--paper-2); }
.menu-cat { scroll-margin-top: 4.5rem; margin-bottom: 1.5rem; }
.cat-title { font-size: 1.3rem; margin: 1.25rem 0 .75rem; display: flex; align-items: center; gap: .75rem; }
.cat-title::after { content: ""; flex: 1; border-top: 2px dashed var(--grey); }
.dish { display: flex; gap: .85rem; align-items: flex-start; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r); padding: .9rem; margin-bottom: .6rem; box-shadow: var(--shadow); }
.dish-main { flex: 1; min-width: 0; }
.dish-name { font-size: 1.05rem; margin: 0; }
.dish-desc { margin: .2rem 0 0; font-size: .9rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.dish-price { margin-top: .4rem; font-weight: 700; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.dish-img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line); flex: none; }
.add-btn { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--r); background: var(--brand); color: var(--on-brand); transition: background-color .2s ease-out, box-shadow .2s ease-out, transform .2s ease-out; }
.add-btn:not(:disabled):hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.add-btn:not(:disabled):active { transform: translateY(0); }
.add-btn:disabled { background: var(--paper-3); color: var(--ink-soft); }
.skel-menu .dish { align-items: center; }
.skel-col { flex: 1; } .skel-img { width: 84px; height: 84px; margin: 0; flex: none; }

.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sticky); background: var(--ink); color: var(--paper); padding: .75rem 0 calc(.75rem + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(46, 46, 46, .25); }
.cart-bar.d-none { display: none !important; }
.cart-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.cart-sum { display: flex; align-items: center; gap: .6rem; }
.cart-total { font-size: 1.15rem; margin-left: .4rem; }
.cart-bar .btn-primary { border-color: var(--paper); }

.modal { --bs-modal-bg: var(--paper-2); --bs-modal-color: var(--ink); --bs-modal-border-color: var(--ink); --bs-modal-border-width: 1.5px; --bs-modal-border-radius: var(--r); --bs-modal-inner-border-radius: 6px; --bs-modal-header-border-color: var(--line); --bs-modal-footer-border-color: var(--line); --bs-modal-zindex: var(--z-modal); --bs-modal-box-shadow: 0 12px 40px rgba(46, 46, 46, .35); }
.modal-title { font-size: 1.15rem; }
.modal-header, .modal-footer { border-style: dashed; }
.modal-footer { gap: .75rem; flex-wrap: nowrap; }
.modal-footer > * { margin: 0; }
@media (max-width: 575.98px) {
  .sheet .modal-dialog { margin: 0; min-height: 100%; display: flex; align-items: flex-end; max-width: none; }
  .sheet .modal-content { border-radius: var(--r) var(--r) 0 0; max-height: 88dvh; }
  .sheet.modal-dialog-scrollable .modal-content { max-height: 88dvh; }
}
.opt-group { border: 0; padding: 0; margin: 0 0 1.25rem; min-width: 0; }
.opt-group legend { float: none; width: auto; font-size: 1rem; font-weight: 700; margin-bottom: .5rem; padding: 0; }
.choice { display: flex; align-items: center; gap: .75rem; min-height: 48px; padding: .6rem .8rem; border: 1.5px solid var(--line); border-radius: var(--r); margin-bottom: .4rem; background: var(--field); cursor: pointer; transition: border-color .2s ease-out, background-color .2s ease-out; }
.choice:has(input:checked) { border-color: var(--ink); background: var(--paper-3); }
.choice input { margin: 0; flex: none; width: 1.25rem; height: 1.25rem; }
.choice-name { flex: 1; }
.choice-price { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--ink); border-radius: var(--r); background: var(--field); }
.step-btn { display: grid; place-items: center; width: 44px; height: 44px; background: none; border: 0; color: var(--ink); }
.stepper .form-control { width: 52px; min-height: 44px; padding: 0; border: 0; text-align: center; background: transparent; font-weight: 700; box-shadow: none; outline: 0; -moz-appearance: textfield; }
.stepper .form-control::-webkit-outer-spin-button, .stepper .form-control::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart-line { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px dashed var(--grey); }
.cart-line-name { font-weight: 700; overflow-wrap: anywhere; }
.cart-line-sub { font-size: .85rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.cart-line-side { text-align: right; flex: none; font-weight: 700; }
.cart-total-row { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.15rem; padding-top: .75rem; }

.ticket { background: var(--paper-2); border: 1.5px solid var(--ink); border-radius: var(--r); box-shadow: 6px 6px 0 rgba(46, 46, 46, .18); }
.ticket-top { text-align: center; padding: 1.5rem 1rem 1rem; }
.ticket-label { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; }
.ticket-no { font-size: clamp(3rem, 14vw, 4.5rem); font-weight: 700; letter-spacing: .04em; line-height: 1.1; margin: .25rem 0 .6rem; }
.ticket-text { margin: .75rem 0 0; font-weight: 700; }
.ticket .tag { font-size: .85rem; padding: .45rem .75rem; }
.steps { display: flex; list-style: none; margin: 0; padding: 0 .75rem 1.25rem; }
.steps.d-none { display: none !important; }
.steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .4rem; position: relative; text-align: center; font-size: .75rem; font-weight: 700; color: var(--ink-soft); }
.steps li::before { content: ""; position: absolute; top: 17px; right: 50%; width: 100%; height: 3px; background: var(--paper-3); }
.steps li:first-child::before { display: none; }
.steps li.done::before, .steps li.current::before { background: var(--ink); }
.step-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border: 1.5px solid var(--grey); border-radius: var(--r); background: var(--paper-2); }
.steps li.done { color: var(--ink); }
.steps li.done .step-dot { background: var(--olive-dk); border-color: var(--olive-dk); color: var(--paper-2); }
.steps li.current { color: var(--ink); }
.steps li.current .step-dot { background: var(--brand); border-color: var(--ink); color: var(--on-brand); }
.steps li.current .step-dot::after { content: ""; position: absolute; inset: -2px; border: 2px solid var(--brand); border-radius: var(--r); animation: pulse 1.6s ease-out infinite; }
.ticket-rip { position: relative; border-top: 2px dashed var(--grey); margin: 0 1rem; }
.ticket-items { padding: 1rem 1.25rem 1.25rem; }
.receipt-line { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; }

/* ---- Auth, narrow pages, wizard, admin ---------------------------------- */
.wordmark { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.2rem; text-decoration: none; letter-spacing: .02em; }
.wordmark-light, .wordmark-light:hover { color: var(--paper); }
.wordmark-dark, .wordmark-dark:hover { color: var(--ink); }
.wordmark .icon { width: 1.4rem; height: 1.4rem; }
.auth-wrap { min-height: 100dvh; display: grid; grid-template-columns: minmax(300px, 5fr) 7fr; }
.auth-side { background: var(--grain-light), var(--ink); color: var(--paper); padding: 2rem; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; overflow: hidden; }
.auth-side .wordmark { color: var(--paper); }
.auth-flyer { position: relative; align-self: center; width: min(340px, 100%); background: var(--paper-2); color: var(--ink); border: 1.5px solid var(--ink); padding: 2rem 1.75rem 1.5rem; transform: rotate(-2deg); box-shadow: 8px 8px 0 rgba(181, 166, 66, .5); margin-bottom: 3rem; }
.flyer-kicker { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--red); margin: 0 0 .5rem; }
.flyer-big { font-size: 3.2rem; font-weight: 700; line-height: 1; margin: 0 0 1rem; letter-spacing: -.02em; }
.flyer-small { margin: 0; font-size: .95rem; }
.tape { position: absolute; width: 96px; height: 26px; top: -13px; left: 28px; background: rgba(181, 166, 66, .8); transform: rotate(-4deg); border-left: 2px dotted rgba(46, 46, 46, .25); border-right: 2px dotted rgba(46, 46, 46, .25); }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem; padding: 2rem 1rem; }
.auth-card { width: min(440px, 100%); background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 1.75rem; }
.auth-title { font-size: 1.6rem; margin: 0 0 .25rem; }
.auth-sub { color: var(--ink-soft); margin: 0 0 1.5rem; }
.auth-links { margin: 1.25rem 0 0; font-size: .9rem; }
.auth-foot { margin: 0; color: var(--ink-soft); font-size: .85rem; }
.site-foot { text-align: center; padding: 1.25rem 1rem 1.5rem; font-size: .8rem; color: var(--ink-soft); }
.site-foot p { margin: 0; }
.site-foot a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.site-foot a:hover { color: var(--ink); }
.lp-foot-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.legal-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px dashed var(--line); }
.legal-bar nav { display: flex; gap: 1rem; font-size: .9rem; }
.legal { max-width: 760px; margin: 0 auto; padding: 2rem 1rem 1rem; }
.legal h1 { font-size: 2rem; margin-bottom: .25rem; }
.legal h2 { font-size: 1.15rem; margin: 1.75rem 0 .5rem; }
.legal p, .legal li { line-height: 1.7; max-width: 72ch; }
.legal-contact { margin-top: 2rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
@media (max-width: 767.98px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } .auth-main { justify-content: flex-start; padding-top: 2.5rem; } }

.narrow-page { max-width: 560px; margin: 0 auto; padding: 2.5rem 1rem 3rem; display: flex; flex-direction: column; gap: 1rem; }
.narrow-page.wide { max-width: 720px; }
.narrow-title { font-size: 1.75rem; margin: .5rem 0; }
.error-code { font-size: clamp(5rem, 24vw, 9rem); font-weight: 700; line-height: 1; color: var(--ink); text-shadow: 4px 4px 0 rgba(140, 39, 39, .35); }
.pick-list { display: flex; flex-direction: column; gap: .6rem; }
.pick { display: flex; align-items: center; gap: .85rem; width: 100%; min-height: 64px; padding: .75rem 1rem; background: var(--paper-2); border: 1.5px solid var(--ink); border-radius: var(--r); color: var(--ink); font-family: var(--font); text-align: left; transition: box-shadow .2s ease-out, transform .2s ease-out; }
.pick:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.pick-name { flex: 1; font-weight: 700; }
.wiz-steps { display: flex; list-style: none; margin: 0; padding: 0; gap: .25rem; }
.wiz-steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .35rem; position: relative; font-size: .72rem; font-weight: 700; color: var(--ink-soft); text-align: center; }
.wiz-steps li::before { content: ""; position: absolute; top: 15px; right: 50%; width: 100%; height: 3px; background: var(--paper-3); }
.wiz-steps li:first-child::before { display: none; }
.wiz-steps li.done::before, .wiz-steps li.current::before { background: var(--ink); }
.wiz-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border: 1.5px solid var(--grey); border-radius: var(--r); background: var(--paper-2); }
.wiz-steps li.done .wiz-dot { background: var(--olive-dk); border-color: var(--olive-dk); color: var(--paper-2); }
.wiz-steps li.current { color: var(--ink); }
.wiz-steps li.current .wiz-dot { background: var(--ink); border-color: var(--ink); color: var(--paper-2); }
@media (max-width: 575.98px) { .wiz-name { display: none; } .wiz-steps li.current .wiz-name { display: block; } }
.wiz-title { font-size: 1.5rem; margin-bottom: 1.25rem; }
.url-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.url-list li { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .5rem 0; border-bottom: 1px dashed var(--line); }

.admin-bar { background: var(--grain-light), var(--ink); color: var(--paper); border-bottom: 3px solid var(--yellow); }
.admin-bar-in { max-width: 1280px; margin: 0 auto; padding: .75rem 1rem; display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.admin-nav { display: flex; gap: .25rem; flex: 1; }
.admin-nav a { color: var(--paper); text-decoration: none; padding: .45rem .8rem; border-radius: var(--r); font-weight: 700; }
.admin-nav a:hover { background: rgba(233, 225, 212, .1); color: var(--paper); }
.admin-nav a.active { background: rgba(233, 225, 212, .16); box-shadow: inset 0 -3px 0 var(--yellow); }
.admin-page { padding-top: 1.5rem; }

/* ---- Landing ------------------------------------------------------------ */
.landing { background: var(--ink); }
.lp-wrap { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.lp-nav { background: var(--grain-light), var(--ink); position: sticky; top: 0; z-index: var(--z-sticky); }
.lp-nav-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .8rem; padding-bottom: .8rem; }
.lp-nav-actions { display: flex; gap: .5rem; }
.lp-hero { position: relative; background: var(--grain-light), var(--ink); color: var(--paper); padding: clamp(2rem, 6vw, 5rem) 0 clamp(4rem, 8vw, 7rem); }
.lp-hero-grid { display: grid; grid-template-columns: 1.3fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.lp-kicker { display: inline-block; background: var(--yellow); color: var(--ink); font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; padding: .3rem .7rem; transform: rotate(-1.5deg); margin: 0 0 1.25rem; }
.lp-title { color: var(--paper); font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.05; letter-spacing: -.03em; margin: 0 0 1.5rem; }
.xerox { color: var(--yellow); text-shadow: 3px 3px 0 rgba(140, 39, 39, .8), -1px -1px 0 rgba(59, 89, 152, .5); }
.lp-lead { font-size: 1.1rem; max-width: 56ch; color: #D9D1C2; margin-bottom: 2rem; }
.lp-cta { display: flex; flex-wrap: wrap; gap: .75rem; }
.lp-flyer-wrap { position: relative; justify-self: center; width: min(360px, 100%); padding: 1rem 0 1.5rem; }
.lp-flyer { position: relative; background: var(--paper-2); color: var(--ink); border: 1.5px solid var(--ink); padding: 1.75rem 1.5rem 1.4rem; transform: rotate(2.5deg); box-shadow: 10px 10px 0 rgba(181, 166, 66, .45); }
.lp-flyer .tape-a { left: 24px; }
.lp-flyer .tape-b { left: auto; right: 22px; transform: rotate(5deg); }
.flyer-row { display: flex; justify-content: space-between; align-items: center; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.flyer-tag { color: var(--red); }
.flyer-no { font-size: 3.5rem; font-weight: 700; line-height: 1.1; margin-top: .5rem; letter-spacing: .03em; }
.flyer-where { font-weight: 700; color: var(--ink-soft); margin-bottom: .75rem; }
.flyer-items { list-style: none; margin: 0; padding: .75rem 0; border-top: 1px dashed var(--grey); border-bottom: 1px dashed var(--grey); font-weight: 700; }
.flyer-items li { padding: .15rem 0; }
.flyer-items span { display: inline-block; min-width: 2.4ch; }
.flyer-items em { display: block; margin-left: 2.4ch; font-weight: 400; font-style: normal; font-size: .85rem; color: var(--orange); }
.flyer-steps { display: flex; gap: 4px; margin: 1rem 0 .5rem; }
.flyer-steps i { flex: 1; height: 8px; background: var(--paper-3); border-radius: 2px; }
.flyer-steps i.on { background: var(--olive-dk); }
.flyer-steps i.cur { background: var(--orange); }
.flyer-status { font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: var(--orange); }
.lp-sticker { position: absolute; left: -1.25rem; bottom: -.25rem; background: var(--red); color: var(--paper-2); font-weight: 700; padding: .7rem 1rem; border-radius: var(--r); transform: rotate(-6deg); line-height: 1.25; border: 1.5px solid var(--paper-2); }
.torn { position: absolute; left: 0; right: 0; height: 24px; pointer-events: none; clip-path: polygon(0 60%, 4% 20%, 8% 55%, 12% 15%, 17% 50%, 21% 25%, 26% 60%, 30% 18%, 35% 52%, 39% 22%, 44% 58%, 48% 14%, 53% 50%, 57% 24%, 62% 60%, 66% 16%, 71% 54%, 75% 26%, 80% 58%, 84% 18%, 89% 52%, 93% 22%, 97% 56%, 100% 30%, 100% 100%, 0 100%); }
.torn-bottom { bottom: -1px; background: var(--paper); }
.torn-top { top: -1px; background: var(--paper-3); transform: scaleY(-1); }
.lp-section { background: var(--grain), var(--paper); padding: clamp(3rem, 7vw, 6rem) 0; }
.lp-section-head { max-width: 62ch; margin-bottom: 2rem; }
.lp-section-head h2, .lp-how-title { font-size: clamp(1.75rem, 3.5vw, 2.5rem); margin-bottom: .6rem; }
.lp-section-head p { color: var(--ink-soft); font-size: 1.05rem; }
.lp-bento { display: grid; grid-template-columns: 1.5fr 1fr; grid-template-areas: "big board" "big menu" "wide wide"; gap: 1.25rem; }
.bento { background: var(--paper-2); border: 1.5px solid var(--ink); border-radius: var(--r); padding: 1.5rem; box-shadow: var(--shadow); }
.bento h3 { font-size: 1.2rem; margin: .9rem 0 .5rem; }
.bento p { margin: 0 0 .75rem; }
.bento-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border: 1.5px dashed currentColor; border-radius: var(--r); transform: rotate(-3deg); }
.bento-icon .icon { width: 24px; height: 24px; }
.bento-note { font-size: .9rem; color: var(--ink-soft); }
.b-big { grid-area: big; padding: clamp(1.5rem, 3vw, 2.5rem); }
.b-big h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.15; }
.b-big p { font-size: 1.05rem; max-width: 52ch; }
.b-board { grid-area: board; background: var(--grain-light), var(--ink); color: var(--paper); transform: rotate(.6deg); }
.b-board h3 { color: var(--paper); }
.b-menu { grid-area: menu; background: var(--yellow); transform: rotate(-.6deg); }
.b-wide { grid-area: wide; display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; align-items: center; }
.b-wide-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; font-weight: 700; }
.b-wide-list li { display: flex; gap: .5rem; align-items: center; padding: .6rem .75rem; border: 1px dashed var(--grey); border-radius: var(--r); background: var(--field); }
.lp-how { background: var(--grain), var(--paper-3); }
.zig { list-style: none; margin: 2rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 2rem; counter-reset: z; }
.zig-step { display: flex; gap: 1.5rem; align-items: flex-start; max-width: 640px; }
.zig-left { margin-right: auto; }
.zig-right { margin-left: auto; flex-direction: row-reverse; text-align: right; }
.zig-no { font-size: clamp(3rem, 8vw, 5rem); font-weight: 700; line-height: .9; color: var(--red); text-shadow: 3px 3px 0 rgba(46, 46, 46, .15); flex: none; }
.zig-step h3 { font-size: 1.3rem; margin-bottom: .4rem; }
.zig-step p { margin: 0; color: var(--ink-soft); }
.lp-cta-band { position: relative; background: var(--grain-light), var(--ink); color: var(--paper); padding: clamp(4rem, 8vw, 6.5rem) 0; }
.lp-cta-in { max-width: 720px; }
.lp-cta-band h2 { color: var(--paper); font-size: clamp(1.9rem, 4vw, 3rem); }
.lp-cta-band p { color: #D9D1C2; margin-bottom: 1.5rem; max-width: 56ch; }
.lp-foot { background: var(--ink); color: var(--on-ink-soft); padding: 1.25rem 0 2rem; font-size: .85rem; }
.lp-foot .lp-wrap { display: flex; justify-content: space-between; gap: 1rem; }
.lp-foot a { color: var(--paper); }
@media (max-width: 991.98px) {
  .lp-hero-grid { grid-template-columns: 1fr; }
  .lp-flyer-wrap { justify-self: start; margin-left: .75rem; }
  .lp-bento { grid-template-columns: 1fr 1fr; grid-template-areas: "big big" "board menu" "wide wide"; }
}
@media (max-width: 639.98px) {
  .lp-bento { grid-template-columns: 1fr; grid-template-areas: "big" "board" "menu" "wide"; }
  .b-wide { grid-template-columns: 1fr; }
  .zig-right { flex-direction: row; text-align: left; }
  .lp-nav-actions .btn-ghost-light { display: none; }
}

/* ---- Print sheet -------------------------------------------------------- */
.print-wrap { max-width: 1000px; margin: 0 auto; padding: 1rem; }
.print-bar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.qr-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.qr-tile { break-inside: avoid; text-align: center; border: 2px dashed var(--ink); border-radius: var(--r); padding: 1rem; background: var(--paper-2); }
.qr-tile img { width: 100%; height: auto; display: block; }
.qr-name { font-size: 1.3rem; font-weight: 700; margin-top: .5rem; }
.qr-loc { color: var(--ink-soft); }
.qr-cta { margin-top: .4rem; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
/* ---- Mobile and touch ----------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button, summary, label, .btn, .chip { -webkit-tap-highlight-color: rgba(181, 166, 66, .3); }
button, .btn, summary, .chip, select, input[type="checkbox"], input[type="radio"] { touch-action: manipulation; }

.topbar { padding-top: calc(.5rem + env(safe-area-inset-top)); padding-left: calc(1rem + env(safe-area-inset-left)); padding-right: calc(1rem + env(safe-area-inset-right)); }
.page { padding-left: calc(1rem + env(safe-area-inset-left)); padding-right: calc(1rem + env(safe-area-inset-right)); padding-bottom: calc(3rem + env(safe-area-inset-bottom)); }
.sidebar { padding-left: env(safe-area-inset-left); }
.toast-stack { right: calc(1rem + env(safe-area-inset-right)); bottom: calc(1rem + env(safe-area-inset-bottom)); }
.cart-bar { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.sheet .modal-footer { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }

.icon-btn.has-badge { position: relative; }
.topbar-badge { position: absolute; top: -6px; right: -6px; min-width: 1.4rem; padding: .1rem .35rem; border-radius: 999px; background: var(--yellow); color: var(--ink); border: 2px solid var(--ink); font-size: .75rem; font-weight: 700; line-height: 1.3; text-align: center; }

/* Lift-on-hover only where there is a real hover; touch screens keep taps still. */
@media (hover: none) { .btn:hover, .pick:hover, .add-btn:hover { transform: none; } }

/* Touch targets and iOS zoom: applies to phones, tablets and any touch screen. */
@media (max-width: 991.98px), (pointer: coarse) {
  .btn-sm { min-height: 44px; --bs-btn-padding-x: .9rem; }
  .form-control-sm, .form-select-sm { min-height: 44px; }
  input, select, textarea, .form-control-sm, .form-select-sm { font-size: 16px; }
  .chip { min-height: 44px; }
  .pw-toggle { min-height: 44px; min-width: 44px; }
  .btn-link.link-danger { min-height: 44px; padding: .5rem .75rem !important; }
  .btn-close { width: 44px; height: 44px; background-size: 1rem; }
  .form-check-input { width: 1.4em; height: 1.4em; }
}

/* Order board: pinned controls, fixed column counts, big actions. */
.board-bar { position: sticky; top: 0; z-index: var(--z-sticky); background: var(--paper); border-bottom: 1px dashed var(--line); margin: 0 -.5rem 1rem; padding: .6rem .5rem .5rem; }
.board-controls { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.board-controls .seg { flex: 1 1 auto; }
.board-controls .seg button { flex: 1 1 0; min-height: 48px; }
.board-controls > .btn { min-height: 48px; flex: 0 0 auto; }
.board-bar .board-meta { margin: .6rem 0 0; }
.board-bar .conn-banner { margin: .6rem 0 0; }
.order-grid { grid-template-columns: 1fr; }
@media (min-width: 768px) { .order-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .order-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.order-actions .btn-lg { flex: 1 1 100%; min-height: 64px; font-size: 1.15rem; }
.order-actions .btn:not(.btn-lg) { flex: 1 1 auto; min-height: 48px; }
.order-cancel { padding-top: .75rem; border-top: 1px dashed var(--grey); }
.order-cancel .btn { width: 100%; min-height: 48px; }
@media (max-width: 991.98px) { .board-bar { top: calc(67px + env(safe-area-inset-top)); } }
@media (max-width: 575.98px) {
  .board-bar .board-meta { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: .15rem; }
  .board-bar .board-meta::-webkit-scrollbar { display: none; }
  .board-bar .meta-chip { flex: 0 0 auto; }
  .board-controls > .btn { flex: 1 1 100%; }
}

/* Tables become stacked cards on phones. */
@media (max-width: 767.98px) {
  .table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .table-stack, .table-stack > tbody, .table-stack > tbody > tr { display: block; width: 100%; }
  .table-stack > tbody > tr { padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
  .table-stack > tbody > tr:last-child { border-bottom: 0; }
  .table-stack > tbody > tr > td { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .35rem 0; border: 0; text-align: right; overflow-wrap: anywhere; }
  .table-stack > tbody > tr > td[data-label]::before { content: attr(data-label); flex: 0 0 auto; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); text-align: left; }
  .table-stack > tbody > tr > td:not([data-label]) { display: block; padding-top: .6rem; text-align: left; }
  .table-stack .row-actions, .table-stack .row-actions.nowrap { display: flex; flex-wrap: wrap; justify-content: stretch; width: 100%; }
  .table-stack .row-actions > * { flex: 1 1 auto; }
  .table-stack .row-actions form { display: flex !important; }
  .table-stack .row-actions .btn { width: 100%; justify-content: center; }
  .table-stack details { width: 100%; }
  .table-stack summary.btn { display: flex !important; justify-content: center; width: 100%; }
  .table-stack td > form.mt-1 { margin-top: .5rem !important; }
  .link-cell { flex-wrap: wrap; white-space: normal; justify-content: flex-end; }
}
.pay-form { min-width: 220px; }
@media (max-width: 767.98px) { .pay-form { min-width: 0; width: 100%; } }

/* Forms and menu editor on phones. */
@media (max-width: 575.98px) {
  .inline-form { flex-direction: column; align-items: stretch; }
  .inline-form .form-control, .inline-form .form-control.narrow, .inline-form .form-select, .inline-form .btn { flex: 1 1 auto; width: 100%; }
  .inline-form .form-check { align-self: flex-start; }
  .page-actions { width: 100%; }
  .page-actions > .btn { flex: 1 1 auto; }
  .panel { padding: 1rem; }
}
@media (max-width: 767.98px) {
  .product > summary { min-height: 56px; }
  .photo-thumb { width: 80px; height: 80px; }
  .product-body form .btn-primary.ms-auto { flex: 1 1 100%; margin-left: 0 !important; min-height: 48px; }
  .product-body .text-end.mt-3 form, .product-body .text-end.mt-3 .btn { display: block; width: 100%; }
  .mod-options li { flex-wrap: wrap; gap: .25rem .75rem; }
  .legal-bar, .lp-foot .lp-wrap { flex-wrap: wrap; }
}

@media print {
  body { background: #fff !important; animation: none; }
  .no-print, .toast-stack { display: none !important; }
  .print-wrap { padding: 0; max-width: none; }
  .qr-sheet { grid-template-columns: repeat(3, 1fr); }
  .qr-tile { background: #fff; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
