/* ============================================================================
   cloudeDhaba  -  site.css
   ----------------------------------------------------------------------------
   Design system: ESPRESSO & TERRACOTTA — a warm, food-industry palette.

   - Espresso (deep roasted brown) is the structural colour: top bar, secondary
     actions, headings. It reads premium and appetising rather than "corporate".
   - Terracotta is the primary action colour: Add, Place Order, Apply, Save.
   - Muted teal is the one cool note, used for "settled" states (Served / Paid),
     self-order rows and one dashboard tile, so they stay distinguishable.
   - Warm cream canvas, white surfaces.

   Colours that already carry FIXED meaning in this app are left untouched:
     green = veg / ready,  red = non-veg / cancelled,  amber = preparing.
   The brand palette deliberately avoids all three so nothing is ambiguous.

   - Roboto throughout (headings, body, EN + हिंदी), with Noto Sans Devanagari as
     the Devanagari companion face.
   - App shell: espresso top bar + sticky sidebar + STICKY footer + back bar.
   - Fully responsive: the sidebar collapses to an off-canvas drawer < 992px.
   - The 80 mm thermal-receipt print rules are preserved verbatim.

   NOTE: every class name from the original stylesheet is retained, so no view
   markup depends on anything that has been removed.
   ============================================================================ */

/* ----------------------------------------------------------------- Tokens - */
:root {
    /* Brand — espresso + terracotta */
    --espresso:    #1C0F0A;
    --espresso-dk: #120A06;
    --espresso-lt: #3A0D08;
    --cocoa:       #4A1810;
    --cocoa-lt:    #5E1119;

    --terracotta:    #7A1220;
    --terracotta-dk: #5E1119;
    --terracotta-lt: #9A3040;

    --gold: #DCA82C;

    /* One cool accent, for "settled" states — pairs classically with terracotta */
    --teal:      #3E6B66;
    --teal-dk:   #2F5551;
    --teal-soft: #E7EFEE;

    /* Semantic roles */
    --primary:      var(--terracotta);
    --primary-dk:   var(--terracotta-dk);
    --primary-lt:   var(--terracotta-lt);
    --primary-soft: #FBEFC9;
    --primary-tint: #FFFBEF;

    --accent:      var(--cocoa);
    --accent-dk:   var(--espresso);
    --accent-soft: #F1ECE3;

    /* Canvas + ink */
    --bg:        #FFF6E0;
    --cream:     #FFF6E0;      /* legacy alias: the self-order pages set body bg with it */
    --surface:   #FFFFFF;
    --surface-2: #FBF3E0;
    --ink:       #1C0F0A;
    --ink-2:     #4A3F33;
    --muted:     #7D7263;
    --line:      #EADFBE;
    --line-2:    #F0EAE0;

    /* Status — fixed meanings, do not re-map */
    --green:      #3F7D3F;
    --green-dk:   #2E5E2E;
    --green-soft: #E7F0E2;
    --warn:       #C77A0C;
    --warn-dk:    #9A5D06;
    --warn-soft:  #FCF0DC;
    --danger:     #B3261E;
    --danger-dk:  #8E1C16;
    --danger-soft:#FBEAE7;

    /* Food marks */
    --veg:    #3F7D3F;
    --nonveg: #B3261E;

    /* Shape + depth */
    --radius:    14px;
    --radius-sm: 10px;
    --radius-xs: 8px;
    --pill:      999px;
    --shadow-xs: 0 1px 2px rgba(33,26,18,.05);
    --shadow-sm: 0 1px 2px rgba(33,26,18,.05), 0 2px 8px rgba(33,26,18,.05);
    --shadow:    0 10px 30px rgba(33,26,18,.10), 0 2px 8px rgba(33,26,18,.05);
    --shadow-lg: 0 26px 64px rgba(33,26,18,.26);
    --ring:      0 0 0 3px rgba(196,98,45,.20);

    /* Metrics */
    --touch:     44px;
    --topbar-h:  64px;
    --footer-h:  54px;
    --sidebar-w: 252px;
    --gutter:    24px;
    --maxw:      1280px;

    --font-body:    'Roboto', 'Noto Sans Devanagari', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Roboto', 'Noto Sans Devanagari', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ------------------------------------------------------------------ Base -- */
*, *::before, *::after { box-sizing: border-box; }
* { min-width: 0; }                       /* let flex/grid children shrink */
html {
    -webkit-text-size-adjust: 100%;       /* stop iOS inflating text in landscape */
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: rgba(196,98,45,.16);   /* no grey iOS tap flash */
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 15.5px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
/* NOTE: deliberately no `overflow-x: hidden` on <body> — it forces overflow-y to
   `auto`, which creates a scroll container and breaks `position: sticky` for the
   topbar, sidebar, filter strips and footer. Sideways overflow is contained by
   `.content { overflow-x: clip }` plus `* { min-width: 0 }` instead. */

img, svg, video { max-width: 100%; height: auto; }

a { color: var(--primary-dk); text-decoration: none; }
a:hover { color: var(--primary); text-decoration: underline; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; letter-spacing: -.01em; }

.brand__name, .page-title, .menu-head__title, .menu-section__title, .auth-card h1,
.order-card__no, .tile .big, .tile__value, .dhaba-brand, .login-card__title,
.so-top h1, .bill__total, .table-card__no {
    font-family: var(--font-display);
    letter-spacing: -.015em;
}

.muted { color: var(--muted); }

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Slim, unobtrusive scrollbars */
* { scrollbar-width: thin; scrollbar-color: #D6CCBC transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #D6CCBC; border-radius: var(--pill); }
*::-webkit-scrollbar-thumb:hover { background: #C0B3A0; }

/* ------------------------------------------------------------- Top navbar - */
.topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    flex: 0 0 auto;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(18px, env(safe-area-inset-right));
    background: linear-gradient(100deg, var(--espresso-dk) 0%, var(--espresso) 45%, var(--cocoa) 100%);
    color: #fff;
    box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 4px 18px rgba(33,26,18,.24);
}
/* Warm brand rule along the bottom edge */
.topbar::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--terracotta-dk), var(--terracotta) 45%, var(--gold));
}

.topbar__burger {
    display: none;
    flex: 0 0 auto;
    width: 40px; height: 40px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}
.topbar__burger:hover { background: rgba(255,255,255,.24); }

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    color: #fff;
    text-decoration: none;
}
.brand:hover { color: #fff; text-decoration: none; }
.brand__mark {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    padding: 4px;
    background: #fff;
    color: var(--primary);
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 2px 10px rgba(33,26,18,.30);
    overflow: hidden;
}
.brand__mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand__name {
    font-weight: 700;
    font-size: 20px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.topbar__spacer { flex: 1 1 auto; }

.lang-toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: var(--pill);
    padding: 3px;
}
.lang-toggle__btn {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 14px;
    border-radius: var(--pill);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}
.lang-toggle__btn:hover { color: #fff; text-decoration: none; background: rgba(255,255,255,.14); }
.lang-toggle__btn.is-active { background: #fff; color: var(--espresso); box-shadow: var(--shadow-xs); }

.user-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 14.5px;
}
.user-chip form { margin: 0; display: inline-flex; }
.user-chip__name {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}
.btn-logout {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.22);
    color: #fff;
    border-radius: var(--pill);
    padding: 0 16px;
    min-height: 34px;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s ease;
}
.btn-logout:hover { background: rgba(255,255,255,.24); }

/* ----------------------------------------------------------------- Shell -- */
.layout {
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
}

.sidebar {
    flex: 0 0 var(--sidebar-w);
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--line);
    position: sticky;
    top: var(--topbar-h);
    align-self: flex-start;
    height: calc(100vh - var(--topbar-h));
    height: calc(100dvh - var(--topbar-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    /* the footer now lives inside .content, so the rail no longer has to
       reserve room for it */
    padding: 14px 12px 24px;
    padding-left: max(12px, env(safe-area-inset-left));
}
/* Keep the rail quiet until the user actually interacts with it */
.sidebar { scrollbar-color: transparent transparent; }
.sidebar:hover, .sidebar:focus-within { scrollbar-color: #D6CCBC transparent; }
.sidebar::-webkit-scrollbar-thumb { background: transparent; }
.sidebar:hover::-webkit-scrollbar-thumb,
.sidebar:focus-within::-webkit-scrollbar-thumb { background: #D6CCBC; }

.sidebar__group {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--muted);
    padding: 16px 12px 6px;
    font-weight: 700;
}
.sidebar__group:first-child { padding-top: 4px; }

.sidebar__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    margin: 2px 0;
    border-radius: var(--radius-sm);
    color: var(--ink-2);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.3;
    transition: background .14s ease, color .14s ease;
}
.sidebar__link:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.sidebar__link.is-active {
    background: var(--primary-soft);
    color: var(--primary-dk);
}
.sidebar__link.is-active::before {
    content: "";
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 22px;
    border-radius: 0 3px 3px 0;
    background: var(--primary);
}
.sidebar__ico {
    flex: 0 0 auto;
    width: 22px;
    text-align: center;
    font-size: 15px;
    color: var(--muted);
    line-height: 1;
}
.sidebar__link:hover .sidebar__ico { color: var(--ink-2); }
.sidebar__link.is-active .sidebar__ico { color: var(--primary); }

.sidebar-overlay { display: none; }

.content {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
}

/* Back bar — compact and tied to the page gutter */
.backbar { padding: 16px var(--gutter) 0; }
.btn--back {
    min-height: 36px;
    padding: 6px 14px;
    font-size: 14px;
    color: var(--ink-2);
    background: var(--surface);
    border-color: var(--line);
    box-shadow: var(--shadow-xs);
}
.btn--back:hover { background: var(--surface-2); color: var(--primary-dk); }

/* ------------------------------------------------------- Sticky footer ---- */
.footer {
    position: sticky;
    bottom: 0;
    z-index: 40;
    flex: 0 0 auto;
    margin-top: auto;   /* sits at the bottom of .content on short pages */
    border-top: 1px solid var(--line);
    background: var(--surface);
    padding: 14px var(--gutter);
    padding-bottom: max(14px, env(safe-area-inset-bottom));
    color: var(--muted);
    font-size: 13.5px;
    box-shadow: 0 -4px 18px rgba(33,26,18,.06);
}
.footer__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 12px;
    text-align: center;
    line-height: 1.4;
}
.footer__brand { font-weight: 600; color: var(--ink-2); }
.footer__sep { color: var(--line); }
.footer__powered { color: var(--muted); }
.footer__powered strong { color: var(--primary-dk); font-weight: 700; }
.footer__powered a { color: inherit; text-decoration: none; }
.footer__powered a:hover strong { color: var(--primary); text-decoration: underline; }

/* ------------------------------------------------------------------ Page -- */
.dhaba-container { width: 100%; max-width: var(--maxw); margin: 0 auto; }
.page {
    width: 100%;
    max-width: var(--maxw);
    padding: 22px var(--gutter) 48px;
}
.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}
.page-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0;
    color: var(--ink);
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card__pad { padding: 20px; }

.flash {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 15px;
    border: 1px solid transparent;
    border-left-width: 4px;
}
.flash--ok  { background: var(--green-soft);  color: var(--green-dk);  border-color: #C4E8D2; border-left-color: var(--green); }
.flash--err { background: var(--danger-soft); color: var(--danger-dk); border-color: #F2C9C2; border-left-color: var(--danger); }

/* ----------------------------------------------------------------- Forms -- */
.form-grid { display: grid; gap: 16px; }
@media (min-width: 700px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-weight: 600; font-size: 14px; color: var(--ink-2); }

.input, .select, textarea.input, input[type="date"], input[type="number"], input[type="file"] {
    width: 100%;
    min-height: var(--touch);
    padding: 10px 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    /* MUST stay >= 16px: iOS Safari zooms the whole page in when a focused
       field is smaller, and never zooms back out. */
    font-size: 16px;
    font-family: inherit;
    background: #fff;
    color: var(--ink);
    transition: border-color .14s ease, box-shadow .14s ease;
    -webkit-appearance: none;
    appearance: none;
    border-radius: var(--radius-sm);   /* iOS strips radius from native inputs */
}
/* Keep the native pickers usable on iOS — they need their own control styling */
input[type="date"], input[type="file"] { -webkit-appearance: none; }
textarea.input { min-height: 78px; padding-top: 11px; line-height: 1.5; resize: vertical; }
.select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath fill='none' stroke='%237D7263' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}
.input:hover, .select:hover { border-color: #D5C9B7; }
.input:focus, .select:focus, textarea.input:focus,
input[type="date"]:focus, input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--ring);
}
.input::placeholder, textarea.input::placeholder { color: #A99C8B; }
input[type="file"].input { padding: 9px 12px; line-height: 1.5; cursor: pointer; }

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 15px;
    color: var(--ink-2);
    cursor: pointer;
}
.checkbox input { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }

/* --------------------------------------------------------------- Buttons -- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--touch);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    font-family: inherit;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.15;
    white-space: nowrap;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease;
    /* iOS renders unstyled <button>/<a> controls with its own chrome otherwise */
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;   /* removes the 300ms tap delay */
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.btn--primary { background: var(--primary);  color: #fff; box-shadow: 0 1px 2px rgba(165,79,30,.28); }
.btn--primary:hover { background: var(--primary-dk); color: #fff; }
.btn--violet  { background: var(--cocoa);    color: #fff; box-shadow: 0 1px 2px rgba(33,26,18,.28); }
.btn--violet:hover  { background: var(--espresso); color: #fff; }
.btn--ghost   { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn--ghost:hover   { background: var(--surface-2); border-color: #D5C9B7; color: var(--ink); }
.btn--soft    { background: var(--primary-soft); color: var(--primary-dk); }
.btn--soft:hover    { background: #F5DECD; color: var(--primary-dk); }
.btn--ok      { background: var(--green);  color: #fff; }
.btn--ok:hover      { background: var(--green-dk); color: #fff; }
.btn--warn    { background: var(--warn);   color: #fff; }
.btn--warn:hover    { background: var(--warn-dk); color: #fff; }
.btn--danger  { background: var(--danger); color: #fff; }
.btn--danger:hover  { background: var(--danger-dk); color: #fff; }

/* Leading glyph inside a button ("+" etc). Sized and centred so it never sits
   high or wide like the full-width / emoji plus signs it replaced. */
.btn__ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    font-size: 1.2em;
    font-weight: 700;
    line-height: 1;
    margin-right: -2px;
}

.btn--block { width: 100%; }
.btn--lg    { min-height: 50px; font-size: 16px; padding: 13px 26px; border-radius: var(--radius-sm); }
.btn--sm    { min-height: 34px; padding: 6px 13px; font-size: 13.5px; border-radius: var(--radius-xs); }

/* Disabled reads as genuinely inert — a faded brand colour looks broken.
   Declared AFTER the variants so it wins over every one of them. */
.btn:disabled, .btn[disabled] {
    background: var(--surface-2);
    color: #A99C8B;
    border-color: var(--line);
    box-shadow: none;
    opacity: 1;
    cursor: not-allowed;
    transform: none;
}
.btn:disabled:hover, .btn[disabled]:hover { background: var(--surface-2); color: #A99C8B; }

/* ---------------------------------------------------------------- Tables -- */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
}
table.grid { width: 100%; border-collapse: collapse; min-width: 560px; }
table.grid th, table.grid td {
    padding: 13px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line-2);
    font-size: 15px;
    vertical-align: middle;
    /* Data cells stay on one line — a squeezed column used to break
       "Table ground · Table 12" across four lines. The wrapper scrolls instead. */
    white-space: nowrap;
}
table.grid th {
    background: var(--surface-2);
    font-weight: 700;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--ink-2);
    border-bottom: 1px solid var(--line);
}
table.grid tbody tr { transition: background .12s ease; }
table.grid tbody tr:hover { background: var(--primary-tint); }
table.grid tfoot th { background: #fff; color: var(--ink); font-size: 15px; text-transform: none; letter-spacing: 0; }
table.grid tr:last-child td { border-bottom: none; }

/* The injected drill-down panel spans the row and must wrap normally. */
table.grid td.drill-cell { white-space: normal; }
/* The bill slip has NO .table-wrap around it, so nowrap would push the table
   outside the card and get clipped by `.content`. Item names wrap there. */
.print-area table.grid th, .print-area table.grid td { white-space: normal; }

table.grid td form { display: inline-flex; margin: 0; vertical-align: middle; }
table.grid td .btn {
    min-height: 34px;
    padding: 6px 13px;
    font-size: 13.5px;
    border-radius: var(--radius-xs);
    vertical-align: middle;
}
table.grid td .btn + .btn, table.grid td .btn + form, table.grid td form + form,
table.grid td form + .btn { margin-left: 6px; }

/* ------------------------------------------------------------ Food marks -- */
.foodmark {
    --mark: var(--veg);
    display: inline-block;
    width: 16px; height: 16px;
    border: 2px solid var(--mark);
    border-radius: 3px;
    position: relative;
    background: #fff;
    flex: 0 0 auto;
    vertical-align: -2px;
}
.foodmark::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 7px; height: 7px;
    background: var(--mark);
    border-radius: 50%;
}

/* -------------------------------------------------------- Pills & badges -- */
.pref-pill, .tag, .pill {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--pill);
    white-space: nowrap;
    line-height: 1.5;
}
.pref-veg      { background: var(--green-soft);  color: var(--green-dk); }
.pref-nonveg   { background: var(--danger-soft); color: var(--danger-dk); }
.pref-unmarked { background: var(--surface-2);   color: var(--muted); }

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: var(--pill);
    white-space: nowrap;
    line-height: 1.4;
    flex: 0 0 auto;
}
.status-pill::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex: 0 0 auto;
}
.status-prep   { background: var(--warn-soft);   color: var(--warn-dk); }
.status-ready  { background: var(--green-soft);  color: var(--green-dk); }
.status-served { background: var(--teal-soft);   color: var(--teal-dk); }
.status-cancel { background: var(--danger-soft); color: var(--danger-dk); }

.pill--paid { background: var(--green-soft); color: var(--green-dk); }
.pill--open { background: var(--warn-soft);  color: var(--warn-dk); }

.tag--special { background: var(--primary-soft); color: var(--primary-dk); }
.tag--day     { background: #FBF0D8;             color: #8A6415; }
.tag--bev     { background: var(--teal-soft);    color: var(--teal-dk); }

.tag-direct {
    display: inline-block;
    background: var(--cocoa);
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .04em;
    padding: 3px 9px;
    border-radius: var(--pill);
}

/* "Pack it to take away" — the customer ticked Is Parcel on the QR checkout.
   Gold on espresso so it reads at a glance on the kitchen board. */
.tag-parcel {
    display: inline-block;
    background: var(--espresso);
    color: var(--gold);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .04em;
    padding: 3px 9px;
    border-radius: var(--pill);
}

/* ----------------------------------------------------------- Login page --- */
.auth-body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--espresso-dk);
    overflow-x: hidden;
    overflow-y: auto;
}

.login-stage {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 88px 24px 96px;
}
.login-stage__video {
    position: fixed;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
}
.login-stage__overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(120% 120% at 50% 15%, rgba(46,36,25,.32), rgba(20,15,10,.82)),
        linear-gradient(180deg, rgba(46,36,25,.40), rgba(20,15,10,.86));
}

.login-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 410px;
    background: rgba(255,255,255,.98);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.6);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    padding: 34px 30px 30px;
    animation: loginRise .55s cubic-bezier(.2,.7,.2,1) both;
    overflow: hidden;
}
.login-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--terracotta-dk), var(--terracotta) 45%, var(--gold));
}
@keyframes loginRise {
    from { opacity: 0; transform: translateY(18px) scale(.985); }
    to   { opacity: 1; transform: none; }
}
.login-card__brand { display: flex; justify-content: center; margin-bottom: 14px; }
.login-card__mark {
    display: grid;
    place-items: center;
    width: 84px; height: 84px;
    padding: 6px;
    background: #fff;
    color: var(--primary);
    border-radius: 22px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 26px;
    letter-spacing: .5px;
    box-shadow: 0 10px 26px rgba(33,26,18,.18), 0 0 0 1px var(--line-2);
}
.login-card__mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.login-card__eyebrow {
    text-align: center;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 4px;
}
.login-card__title {
    text-align: center;
    font-family: var(--font-display);
    font-size: 29px;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 22px;
}

/* Corner language toggle over the video */
.auth-lang {
    position: fixed;
    top: 18px; right: 18px;
    z-index: 3;
    display: inline-flex;
    gap: 3px;
    background: rgba(33,26,18,.40);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.26);
    border-radius: var(--pill);
    padding: 4px;
}
.auth-lang__btn {
    padding: 7px 15px;
    border-radius: var(--pill);
    color: #fff;
    font-weight: 600;
    font-size: 13.5px;
    text-decoration: none;
    white-space: nowrap;
}
.auth-lang__btn:hover { color: #fff; text-decoration: none; background: rgba(255,255,255,.16); }
.auth-lang__btn.is-active { background: #fff; color: var(--espresso); }

/* Powered-by strip over the login backdrop */
.auth-footer {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 3;
    padding: 14px 16px;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,.80);
    background: linear-gradient(180deg, rgba(20,15,10,0), rgba(20,15,10,.60));
    pointer-events: none;   /* the strip must not block the login card */
}
.auth-footer strong { color: #fff; font-weight: 600; }
/* ...but the company link itself still has to be clickable */
.auth-footer a { color: #fff; text-decoration: none; pointer-events: auto; }
.auth-footer a:hover { color: #fff; text-decoration: underline; }

/* Legacy auth card (kept so nothing that references it breaks) */
.auth-wrap {
    flex: 1 1 auto;
    min-height: calc(100vh - var(--topbar-h) - 60px);
    display: grid;
    place-items: center;
    padding: 24px;
}
.auth-card {
    width: 100%;
    max-width: 410px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
}
.auth-card h1 { text-align: center; margin: 10px 0 2px; font-size: 24px; }
.auth-card .sub { text-align: center; color: var(--muted); margin: 0 0 18px; font-size: 14px; }

/* ------------------------------------------------------------- Menu page -- */
.menu-head { padding: 24px var(--gutter) 8px; max-width: var(--maxw); margin: 0 auto; }
.menu-head__title { font-size: 28px; font-weight: 700; margin: 0; }
.menu-head__tagline { color: var(--muted); margin: 5px 0 0; }
.legend {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 14px;
    padding: 9px 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--pill);
    box-shadow: var(--shadow-xs);
}
.legend__item { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }

/* The sticky shell carries the background/border so the category strip itself
   is free to scroll horizontally inside it. */
.menu-cats-wrap {
    position: sticky;
    top: var(--topbar-h);
    z-index: 20;
    /* FULLY opaque: at 94% the section heading scrolling underneath showed
       through and looked like the text was being sliced in half. */
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 6px 14px -10px rgba(33,26,18,.35);
}
/* Edge fades: the only honest "there is more this way" cue once the
   scrollbar is hidden. Toggled by the menu script. */
.menu-cats-wrap::before, .menu-cats-wrap::after {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    width: 40px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .18s ease;
    z-index: 2;
}
.menu-cats-wrap::before { left: 0;  background: linear-gradient(90deg,  var(--bg) 20%, rgba(250,247,242,0)); }
.menu-cats-wrap::after  { right: 0; background: linear-gradient(270deg, var(--bg) 20%, rgba(250,247,242,0)); }
.menu-cats-wrap.can-left::before  { opacity: 1; }
.menu-cats-wrap.can-right::after  { opacity: 1; }

.menu-cats {
    padding: 12px var(--gutter);
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;   /* iOS momentum scrolling */
    overscroll-behavior-x: contain;      /* don't trigger back-swipe on iOS */
    scroll-behavior: smooth;
    /* the bar's own horizontal scrollbar sat right on top of the heading */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.menu-cats::-webkit-scrollbar { height: 0; width: 0; }
.menu-cats.is-dragging { scroll-behavior: auto; cursor: grabbing; }
.menu-cats.is-dragging a { pointer-events: none; }
.menu-cats a {
    flex: 0 0 auto;
    padding: 8px 15px;
    border: 1.5px solid var(--line);
    border-radius: var(--pill);
    background: #fff;
    color: var(--ink-2);
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}
.menu-cats a:hover {
    background: var(--primary-soft);
    border-color: var(--primary-soft);
    color: var(--primary-dk);
    text-decoration: none;
}
/* Which category you are currently reading (set by the scroll-spy on the menu) */
.menu-cats a.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(165,79,30,.28);
}
.menu-cats a.is-active:hover { background: var(--primary-dk); border-color: var(--primary-dk); color: #fff; }

.menu-body { padding: 20px var(--gutter) 44px; max-width: var(--maxw); margin: 0 auto; }
/* clears the topbar AND the sticky category bar when jumping to an anchor */
.menu-section { margin-bottom: 30px; scroll-margin-top: calc(var(--topbar-h) + 74px); }
.menu-section__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 9px;
    margin-bottom: 14px;
    border-bottom: 2px solid var(--primary-soft);
}
.menu-section__title { font-size: 21px; font-weight: 700; margin: 0; }
.menu-section__count { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* Pinned "Restaurant Special" block */
.menu-section--special {
    background: linear-gradient(180deg, #FFFBF6, var(--primary-soft));
    border: 1.5px solid #EFD3BE;
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: 0 6px 20px rgba(196,98,45,.08);
}
.menu-section--special .menu-section__title { color: var(--primary-dk); }
.menu-section--special .menu-section__head { border-bottom: 2px dashed rgba(196,98,45,.36); }

.item-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 760px)  { .item-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .item-grid { grid-template-columns: repeat(3, 1fr); } }

.item-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .16s ease, transform .16s ease, border-color .16s ease;
}
.item-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #E0D0BC; }
.item-card__head { display: flex; align-items: center; gap: 10px; }
.item-card__name { font-size: 17px; font-weight: 700; margin: 0; }
.item-card__desc { margin: 0; color: var(--muted); font-size: 14.5px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }

.price-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.price-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 6px 12px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-xs);
    background: var(--surface-2);
}
.price-chip__portion { font-size: 12.5px; color: var(--muted); }
.price-chip__amount { font-size: 15.5px; font-weight: 700; color: var(--primary-dk); }

/* ------------------------------------------------------------- Dashboard -- */
.tile-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 560px) { .tile-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .tile-grid { grid-template-columns: repeat(4, 1fr); } }

.tile {
    --tile-accent: var(--primary);
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    padding: 20px 20px 20px 24px;
    text-decoration: none;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .16s ease, transform .16s ease, border-color .16s ease;
}
.tile::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--tile-accent);
}
a.tile:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-2px); border-color: #E0D0BC; }
.tile h3 {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
}
.tile .big { font-size: 28px; font-weight: 700; line-height: 1.15; color: var(--ink); }
.tile--accent { --tile-accent: var(--primary); }
.tile--slate  { --tile-accent: var(--teal); }
.tile--green  { --tile-accent: var(--green); }
.tile--amber  { --tile-accent: var(--gold); }

.quicklinks { display: flex; gap: 12px; flex-wrap: wrap; }
.self-panel { margin-top: 6px; }
.self-panel__empty { text-align: center; }

/* ------------------------------------------------------- Kitchen board ---- */
.board { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 720px)  { .board { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1180px) { .board { grid-template-columns: repeat(3, 1fr); } }

.order-card {
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.order-card.is-new { animation: flash-in .8s ease; }
@keyframes flash-in {
    0%   { box-shadow: 0 0 0 4px var(--primary-soft); }
    100% { box-shadow: var(--shadow-sm); }
}
.order-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 13px 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
}
.order-card__no { font-weight: 700; font-size: 17px; }
.order-card__where { font-size: 13.5px; color: var(--muted); }
.order-card__body { padding: 4px 16px 14px; }
.order-card__note {
    margin: 10px 16px 0;
    padding: 8px 12px;
    background: var(--primary-soft);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-xs);
    font-size: 13.5px;
    color: var(--ink-2);
}

/* Order line rows — wrap instead of letting the pill and button collide */
.oi-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line-2);
}
.oi-row:last-child { border-bottom: none; }
.oi-qty {
    flex: 0 0 auto;
    font-weight: 700;
    min-width: 32px;
    text-align: center;
    background: var(--primary-soft);
    color: var(--primary-dk);
    border-radius: var(--radius-xs);
    padding: 4px 6px;
    font-size: 15px;
}
.oi-name { flex: 1 1 170px; min-width: 0; font-weight: 600; font-size: 15px; }
.oi-actions { flex: 0 0 auto; display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.oi-actions .btn { min-height: 36px; padding: 7px 15px; font-size: 13.5px; border-radius: var(--radius-xs); }
.oi-note { font-size: 12.5px; color: var(--muted); margin-top: 3px; font-weight: 500; }

.oi-info  { flex: 1 1 auto; min-width: 0; }
.oi-title { font-weight: 600; font-size: 15px; line-height: 1.3; word-break: break-word; }
.oi-sub   { font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.oi-price {
    flex: 0 0 auto;
    min-width: 76px;
    margin-left: 4px;
    text-align: right;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------- Order taking - */
.pick-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .pick-grid { grid-template-columns: repeat(2, 1fr); } }

.pick {
    text-align: left;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    transition: border-color .14s ease, box-shadow .14s ease;
}
.pick:hover { border-color: #E0D0BC; box-shadow: var(--shadow-sm); }
.pick__top { display: flex; align-items: center; gap: 10px; }
.pick__name { font-size: 16px; font-weight: 700; }

.variant {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 9px 0;
    border-top: 1px dashed var(--line);
}
.variant:first-of-type { border-top: none; }
.variant__label { font-weight: 600; font-size: 14.5px; color: var(--ink-2); }
.variant__rate  { color: var(--primary-dk); font-weight: 700; }

.pref-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }

.cart { margin-top: 12px; }
.cart-total-bar { position: sticky; bottom: 0; }
.book-cart { align-self: start; }
.book-cart .oi-row { border-bottom: 1px dashed var(--line); padding: 10px 0; }
.cart .oi-row, .book-cart .oi-row { align-items: center; }
.cart .oi-row .stepper, .book-cart .oi-row .stepper { flex: 0 0 auto; }

/* -------------------------------------------- Booking cart panel rhythm ---
   The submit button sat flush against the field above it on BOTH booking
   screens — the note box on Book Order, the waiter dropdown on Table Booking.
   `.book-cart` is only on those two; Add Items uses a bare `.cart`, so it is
   untouched. `.page-book` is only on Views/Order/Book.cshtml. */
.page-book .cart > .menu-section__title { margin: 0 0 12px; }
.page-book .cart .bill__total, .book-cart .bill__total { margin-top: 16px; }
.page-book .cart .field,       .book-cart .field       { margin-top: 16px; }
.page-book .cart .btn--block,  .book-cart .btn--block   { margin-top: 18px; }
.page-book .menu-section--special { margin-top: 4px; }

/* ------------------------------------------------ Booking screens: header -
   Page title, order details and the search box grouped as one block. It scrolls
   with the page like everything else - nothing here is pinned. */
.booking-head {
    border-bottom: 1px solid var(--line);
    margin-bottom: 18px;
}
/* the block already carries the rule, so drop the inner one */
.booking-head .page-head {
    margin-bottom: 12px;
    padding-bottom: 0;
    border-bottom: none;
}
.booking-head .flash { margin-bottom: 12px; }
/* the order-details card, kept compact so the pinned area stays shallow */
.booking-head__card { margin-bottom: 12px; padding: 14px 16px; }
.booking-head__card .form-grid { gap: 12px; }
/* the search box that closes the pinned block */
.booking-head__search { margin-bottom: 14px; }
/* preference + search share one row (Table Booking) */
.booking-head__filters {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding-bottom: 14px;
}
.booking-head__filters .field { flex: 0 0 auto; }
.booking-head__filters .input { flex: 1 1 260px; width: auto; min-width: 200px; }

@media (max-width: 767.98px) {
    .booking-head { margin-bottom: 14px; }
    .booking-head .page-head { margin-bottom: 8px; }
    .booking-head .page-title { font-size: 19px; }
    .booking-head__filters { gap: 8px 14px; padding-bottom: 10px; }
    .booking-head__card { padding: 12px 14px; margin-bottom: 10px; }
    .booking-head__search { margin-bottom: 10px; }
}

/* Booking layout: menu + cart side by side on wide screens.
   Nothing is pinned - the whole page scrolls normally. */
@media (min-width: 1024px) {
    .book-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 350px;
        gap: 22px;
        align-items: start;
    }
}

/* -------------------------------------------------------- Quantity stepper */
.stepper {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--line);
    border-radius: var(--pill);
    background: #fff;
    overflow: hidden;
}
.stepper form { margin: 0; display: inline-flex; }
.stepper__btn {
    width: 34px; height: 34px;
    min-height: 34px;
    border: none;
    background: #fff;
    color: var(--ink-2);
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: grid;
    place-items: center;
    transition: background .12s ease;
}
.stepper__btn:hover { background: var(--surface-2); }
.stepper__btn:disabled { color: #D6CCBC; cursor: default; background: #fff; }
.stepper__btn--plus { color: var(--primary); }
.stepper__btn--plus:hover { background: var(--primary-soft); }
.stepper__qty { min-width: 32px; text-align: center; font-weight: 700; font-size: 15.5px; font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------- Billing -- */
.bill { max-width: 560px; }
.bill__line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line-2);
}
.bill__line > span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bill__total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 24px;
    padding: 14px 0 4px;
    font-weight: 700;
    font-size: 21px;
    border-top: 2px solid var(--line);   /* was a harsh 2px black rule */
    margin-top: 8px;
    color: var(--ink);
}
.bill__total > span:last-child { font-variant-numeric: tabular-nums; color: var(--primary-dk); }
.bill__slogan { text-align: center; color: var(--muted); font-style: italic; margin-top: 16px; }

.qr-box { text-align: center; padding: 16px; }
.qr-box img {
    max-width: 220px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.proof-preview {
    max-width: 220px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    margin-top: 10px;
}
.reprint-mark {
    text-align: center;
    font-weight: 700;
    letter-spacing: 3px;
    border: 2px dashed var(--ink);
    border-radius: var(--radius-xs);
    padding: 6px 8px;
    margin: 0 0 12px;
    color: var(--ink);
    background: #fff;
}

/* ---------------------------------------------------- Table booking board - */
/* Floor header: name on the left, live free/occupied counts on the right, and
   a full-width rule with a short brand accent under the name. */
.floor-section { margin-bottom: 28px; }
.floor-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    flex-wrap: wrap;
    padding-bottom: 10px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--line);
}
.floor-head::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 58px;
    height: 2px;
    border-radius: 2px;
    background: var(--primary);
}
.floor-head__name {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -.015em;
    margin: 0;
}
.floor-head__meta { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.floor-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: var(--pill);
    white-space: nowrap;
    line-height: 1.4;
}
.floor-stat::before {
    content: "";
    width: 7px; height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex: 0 0 auto;
}
.floor-stat--free { background: var(--green-soft);   color: var(--green-dk); }
.floor-stat--busy { background: var(--primary-soft); color: var(--primary-dk); }

@media (max-width: 640px) {
    .floor-head__name { font-size: 17px; }
    .floor-stat { font-size: 11.5px; padding: 3px 9px; }
}

.table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
    gap: 14px;
}
.table-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 112px;
    padding: 16px 12px;
    border-radius: var(--radius);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: transform .12s ease, box-shadow .16s ease, border-color .16s ease;
}
.table-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }

/* Free = calm white card; occupied = solid terracotta so a busy floor reads
   at a glance from across the room. */
.table-card--free {
    background: #fff;
    border: 1.5px solid var(--line);
    color: var(--ink-2);
}
.table-card--free:hover { border-color: var(--primary-lt); color: var(--ink-2); }
.table-card--free .table-card__no  { color: var(--ink); }
.table-card--free .table-card__tag { color: var(--green-dk); }

.table-card--busy {
    background: linear-gradient(150deg, var(--terracotta-lt), var(--terracotta) 55%, var(--terracotta-dk));
    border: 1.5px solid transparent;
    color: #fff;
}
.table-card--busy:hover { color: #fff; }
.table-card--busy .table-card__no  { color: #fff; }
.table-card--busy .table-card__tag { color: rgba(255,255,255,.95); }

.table-card__no { font-size: 32px; font-weight: 700; line-height: 1.05; }
.table-card__tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.table-card__items { font-size: 12px; opacity: .92; }

/* -------------------------------------------------------- Sub-option popup */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20,15,10,.58);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 80;
    padding: 16px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.modal-backdrop.is-open { display: flex; }
.modal {
    background: #fff;
    border-radius: 18px;
    max-width: 400px;
    width: 100%;
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: loginRise .28s cubic-bezier(.2,.7,.2,1) both;
}
.modal h2 { margin: 0 0 6px; font-size: 21px; }
.modal h3 { font-size: 18px; }
.modal .qrwrap { display: inline-block; margin: 12px 0; }
.modal .amount { font-size: 30px; font-weight: 700; color: var(--primary-dk); font-family: var(--font-display); }

.opt-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 8px;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: border-color .14s ease, background .14s ease;
}
.opt-choice:hover { border-color: #D5C9B7; }
.opt-choice:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary-dk);
}
.opt-choice input { accent-color: var(--primary); width: 18px; height: 18px; flex: 0 0 auto; }
.option-row .input { min-width: 0; }

/* ---------------------------------------- Self-order (customer, no layout) - */
.so-shell { max-width: 760px; margin: 0 auto; padding: 0 16px 130px; }
.so-top {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 16px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    background: linear-gradient(100deg, var(--espresso-dk), var(--espresso) 45%, var(--cocoa));
    color: #fff;
    box-shadow: 0 4px 18px rgba(33,26,18,.24);
}
.so-top::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--terracotta-dk), var(--terracotta) 45%, var(--gold));
}
.so-top .brand__mark { background: #fff; color: var(--primary); width: 38px; height: 38px; }
.so-top h1 { font-size: 19px; margin: 0; font-weight: 700; color: #fff; }

.so-bar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 40;
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 24px rgba(33,26,18,.12);
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    gap: 12px;
}
.so-bar .so-total { font-weight: 700; font-size: 19px; font-family: var(--font-display); }
.so-bar .btn { flex: 1 1 auto; }

/* Powered-by strip for the standalone customer pages */
.so-footer {
    text-align: center;
    padding: 18px 16px 24px;
    color: var(--muted);
    font-size: 12.5px;
}
.so-footer strong { color: var(--primary-dk); font-weight: 700; }
.so-footer a { color: inherit; text-decoration: none; }
.so-footer a:hover strong { color: var(--primary); text-decoration: underline; }

/* ------------------------------------------------- Self-order report rows - */
table.grid--self thead th { background: var(--teal-soft); color: var(--teal-dk); }
.self-row { background: #F6FAF9; }
.self-row:hover { background: #ECF4F3; }
.self-row td { border-left: 0; }
.self-row td:first-child { box-shadow: inset 4px 0 0 var(--teal); }

/* ------------------------------------------------------------ Drill-down -- */
tr.drill-row { cursor: pointer; }
tr.drill-row.drill-open td:first-child { font-weight: 700; }
tr.drill-row.drill-open { background: var(--primary-tint); }
tr.drill-detail td.drill-cell { background: var(--primary-tint); padding: 12px 16px; }
.drill-box { border: 1px dashed var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
table.drill-table { width: 100%; border-collapse: collapse; min-width: 0; }
table.drill-table th, table.drill-table td {
    padding: 9px 13px;
    font-size: 13.5px;
    text-align: left;
    border-bottom: 1px solid var(--line-2);
}
table.drill-table th {
    background: var(--surface-2);
    color: var(--ink-2);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
table.drill-table td.num, table.drill-table th.num { text-align: right; }
table.drill-table tr:last-child td { border-bottom: none; }
.drill-sum td { background: #fff; }
/* Action bar at the foot of the panel. `.drill-box` has overflow:hidden, so
   without padding the button sat hard against the right and bottom borders.
   The 13px inline matches the drill-table cell padding, so the button's right
   edge lines up with the TOTAL / STATUS columns above it. */
.drill-actions { padding: 2px 13px 12px; }

/* ============================================================================
   Responsive
   ============================================================================ */

/* Tablet & below: sidebar becomes an off-canvas drawer */
@media (max-width: 991.98px) {
    :root { --gutter: 18px; }

    .topbar__burger { display: inline-flex; }

    .sidebar {
        position: fixed;
        top: var(--topbar-h);
        left: 0;
        z-index: 55;
        width: min(84vw, 300px);
        flex-basis: min(84vw, 300px);
        height: calc(100vh - var(--topbar-h));
        height: calc(100dvh - var(--topbar-h));
        transform: translateX(-100%);
        transition: transform .24s cubic-bezier(.2,.7,.2,1);
        box-shadow: var(--shadow);
        will-change: transform;
    }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar-overlay.is-open {
        display: block;
        position: fixed;
        inset: var(--topbar-h) 0 0 0;
        background: rgba(20,15,10,.48);
        z-index: 54;
    }

    .page-title { font-size: 23px; }
    .menu-head__title { font-size: 24px; }
}

/* Small tablets / large phones */
@media (max-width: 767.98px) {
    body { font-size: 15px; }
    :root { --gutter: 16px; --topbar-h: 60px; --footer-h: 64px; }

    .page { padding: 16px var(--gutter) 40px; }
    .page-head { margin-bottom: 16px; padding-bottom: 12px; }
    .backbar { padding: 12px var(--gutter) 0; }
    .card__pad { padding: 16px; }

    .quicklinks .btn { flex: 1 1 auto; }
    .btn--lg { min-height: 46px; font-size: 15.5px; padding: 11px 18px; }

    .bill__total { font-size: 19px; }
    .footer { padding: 10px var(--gutter); font-size: 12.5px; }
    .footer__inner { flex-direction: column; gap: 2px; }
    .footer__sep { display: none; }
}

/* Phones: keep every topbar control visible and tappable */
@media (max-width: 640px) {
    .topbar { gap: 8px; padding: 0 12px; }
    .brand__mark { width: 36px; height: 36px; border-radius: 10px; }
    .brand__name { font-size: 17px; max-width: 34vw; }
    .lang-toggle__btn { padding: 0 11px; font-size: 13px; min-height: 30px; }
    .btn-logout { padding: 0 12px; font-size: 13px; min-height: 32px; }
    .topbar__burger { width: 38px; height: 38px; }
    .user-chip__name { display: none; }

    .table-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
    .table-card { min-height: 94px; padding: 12px 8px; }
    .table-card__no { font-size: 27px; }

    .book-cart, .cart { position: static; }
    .modal { padding: 20px; border-radius: 16px; }
    .login-card { padding: 26px 20px 22px; border-radius: 16px; }
    .login-card__title { font-size: 25px; }
    .login-card__mark { width: 72px; height: 72px; border-radius: 18px; }
    .login-stage { padding: 76px 16px 86px; }
    .auth-lang { top: 12px; right: 12px; }
}

@media (max-width: 400px) {
    .brand__name { display: none; }
    .lang-toggle__btn { padding: 0 9px; }
    .btn-logout { padding: 0 10px; }
    .page-title { font-size: 21px; }
    .oi-actions { width: 100%; margin-left: 0; }
    .oi-actions .btn { flex: 1 1 auto; }
}

/* ============================================================================
   Print — 80 mm thermal receipt (unchanged behaviour)
   ============================================================================ */
@media print {
    /* Narrow receipt roll; margin:0 removes the browser's date/URL/page footers. */
    @page { size: 80mm auto; margin: 0; }
    html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; }

    .topbar, .sidebar, .sidebar-overlay, .footer, .backbar, .no-print { display: none !important; }
    .layout, .content, .page { display: block !important; padding: 0 !important; margin: 0 !important; max-width: none !important; }

    /* The slip itself (~72mm printable on 80mm paper) */
    .print-area {
        width: 72mm !important; max-width: 72mm !important;
        margin: 0 auto !important; padding: 4mm 3mm !important;
        box-shadow: none !important; border: none !important; border-radius: 0 !important;
        background: #fff !important; color: #000 !important;
        font-family: 'Courier New', ui-monospace, monospace !important;
        font-size: 11px !important; line-height: 1.35 !important;
    }
    .print-area * { color: #000 !important; }
    .print-area h2 { font-size: 15px !important; margin: 0 0 2px !important; }
    .print-area .muted { color: #000 !important; }

    /* Compact itemised table — item names MUST wrap on a 72mm slip */
    .print-area table.grid { width: 100% !important; border-collapse: collapse !important; font-size: 11px !important; }
    .print-area table.grid th,
    .print-area table.grid td { padding: 2px 0 !important; border: none !important; background: none !important; white-space: normal !important; }
    .print-area table.grid thead th { border-bottom: 1px dashed #000 !important; text-transform: none !important; font-size: 10px !important; letter-spacing: 0 !important; }
    .print-area table.grid tbody tr { border-bottom: 1px dotted #999 !important; }
    .print-area table.grid tbody tr:hover { background: none !important; }

    /* Totals */
    .print-area .bill__line { padding: 2px 0 !important; border-bottom: 1px dotted #999 !important; gap: 8px !important; font-size: 11px !important; }
    .print-area .bill__total { font-size: 13px !important; padding: 5px 0 2px !important; border-top: 1px dashed #000 !important; border-bottom: none !important; gap: 8px !important; }
    .print-area .bill__total > span:last-child { color: #000 !important; }
    .print-area .bill__slogan { font-size: 10px !important; margin-top: 8px !important; }

    /* Smaller QR for the slip width */
    .print-area .qr-box { margin-top: 8px !important; }
    .print-area .qr-box img { max-width: 36mm !important; height: auto !important; }
    .print-area .qr-box p { font-size: 10px !important; }

    .print-area .reprint-mark { border: 1.5px dashed #000 !important; color: #000 !important; font-size: 12px !important; letter-spacing: 2px !important; padding: 3px !important; margin: 0 0 8px !important; }
}

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

/* Inactive menu items on booking pages: dimmed, crossed, not orderable */
.pick--off { opacity: .55; position: relative; filter: saturate(.55); }
.pick--off .so-add { pointer-events: none; opacity: .5; }
.pick--off::after {
    content: "\2715";
    position: absolute; top: 10px; right: 12px;
    width: 26px; height: 26px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--nonveg); color: #fff; font-weight: 800; font-size: 13px;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
}

/* Unavailable sub-option in the booking popup */
.opt-choice--off { opacity: .5; cursor: not-allowed; }
.opt-choice--off s { text-decoration: line-through; }

/* Bawarchi Tola brand accents */
.brand__name, .brand-name { color: var(--gold) !important; font-family: var(--font-display); }
.page-title, .menu-section__title { font-family: var(--font-display); }


/* ============================================================================
   Owner Console (Dashboard)
   ----------------------------------------------------------------------------
   Espresso bar on top, cream cards, one maroon "revenue" card, a dark alert
   stack. Laid out as [main | 380px side] on desktop and collapsed to a single
   stacked column from 1080px down, so the console works on a counter tablet
   and on a phone without any sideways scrolling.
   ============================================================================ */
.oc { max-width: 1560px; }
.oc-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.oc-card--dark { background: var(--espresso); border-color: rgba(242,199,92,.22); }
.oc-pad { padding: 16px; }

/* ---- Top bar ---- */
.oc-bar {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 14px 18px; margin-bottom: 16px;
    border-radius: 18px; color: #fff;
    background: linear-gradient(100deg, var(--espresso), var(--cocoa));
}
.oc-bar__id { display: flex; align-items: center; gap: 11px; min-width: 0; }
.oc-bar__mark {
    flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center;
    background: linear-gradient(160deg, #F7DE9B, var(--gold));
    border: 1.5px solid #C8961E; color: var(--terracotta-dk);
    font-family: var(--font-display); font-weight: 900; font-size: 16px;
}
.oc-bar__txt { min-width: 0; }
.oc-bar__name { font-family: var(--font-display); font-weight: 900; font-size: 17px; color: var(--gold); line-height: 1.1; letter-spacing: .3px; }
.oc-bar__sub { font-size: 11.5px; color: rgba(255,246,224,.62); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-bar__gap { flex: 1 1 auto; }
.oc-bar__clock { text-align: right; flex: 0 0 auto; }
.oc-bar__clock b { display: block; font-size: 15px; color: #FFF6E0; }
.oc-bar__clock span { font-size: 11px; color: rgba(255,246,224,.55); }
.oc-bar__form { margin: 0; }

.oc-badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: var(--pill); font-size: 11.5px; font-weight: 800; letter-spacing: 1px; }
.oc-badge--live { background: rgba(119,198,110,.14); border: 1px solid rgba(119,198,110,.35); color: #9BE092; }
.oc-badge--live i { width: 7px; height: 7px; border-radius: 50%; background: #77C66E; animation: ocglow 1.7s infinite; }
@keyframes ocglow { 0%,100% { opacity: .4 } 50% { opacity: 1 } }

.oc-switchpill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 14px; border: 0; border-radius: 11px;
    font: 800 12px/1 var(--font-body); cursor: pointer; white-space: nowrap;
}
.oc-switchpill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.oc-switchpill.is-on  { background: var(--gold); color: var(--espresso-lt); }
.oc-switchpill.is-off { background: rgba(179,38,30,.22); color: #FFC7BF; border: 1px solid rgba(179,38,30,.55); }
span.oc-switchpill { cursor: default; }

/* ---- Breach strip ---- */
.oc-breach {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 12px 16px; margin-bottom: 16px; border-radius: 14px;
    background: linear-gradient(100deg, #B3261E, var(--terracotta));
}
.oc-breach__ico { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #FFF6E0; color: #B3261E; font-weight: 900; animation: ocpulse 1.8s infinite; }
@keyframes ocpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,246,224,.55) } 50% { box-shadow: 0 0 0 9px rgba(255,246,224,0) } }
.oc-breach__txt { flex: 1 1 220px; color: #FFF6E0; font-size: 13.5px; }
.oc-breach__cta { flex: 0 0 auto; padding: 8px 14px; border-radius: 9px; background: #FFF6E0; color: #B3261E; font-weight: 800; font-size: 12px; text-decoration: none; }
.oc-breach__cta:hover { text-decoration: none; color: #B3261E; }
.oc-breach__cta--ghost { background: transparent; border: 1px solid rgba(255,246,224,.55); color: #FFF6E0; }
.oc-breach__cta--ghost:hover { color: #FFF6E0; }

/* ---- Layout ---- */
.oc-grid { display: grid; grid-template-columns: minmax(0,1fr) 380px; gap: 16px; align-items: start; }
.oc-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.oc-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.oc-split { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); gap: 16px; }

/* ---- Shared bits ---- */
.oc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.oc-eyebrow { font-size: 9.5px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--primary); }
.oc-eyebrow--gold { color: var(--gold); }
.oc-eyebrow--sm { display: block; letter-spacing: 1.4px; color: var(--muted); margin-top: 14px; }
.oc-h2 { font-family: var(--font-display); font-size: 17px; color: var(--ink); margin: 3px 0 0; }
.oc-note { font-size: 11.5px; color: var(--muted); }
.oc-link { font-size: 11.5px; font-weight: 700; color: var(--primary); }
.oc-empty { text-align: center; color: var(--muted); font-size: 12.5px; padding: 18px 8px; }
.oc-empty--dark { color: rgba(255,246,224,.45); }
.oc-delta { padding: 3px 7px; border-radius: 6px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.oc-delta--up { background: rgba(63,125,63,.16); color: #2E5E2E; }
.oc-delta--down { background: rgba(179,38,30,.14); color: #B3261E; }

/* ---- KPI cards ---- */
.oc-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.oc-kpi { padding: 15px; }
.oc-kpi__top { display: flex; align-items: center; justify-content: space-between; }
.oc-kpi__top span { font-size: 9px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase; color: var(--primary); }
.oc-pip { width: 7px; height: 7px; border-radius: 50%; background: #77C66E; animation: ocglow 1.9s infinite; }
.oc-kpi__num { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 12px; font-family: var(--font-display); font-weight: 900; font-size: 34px; line-height: 1; color: var(--ink); }
.oc-kpi__num .oc-delta { margin-bottom: 4px; font-family: var(--font-body); }
.oc-kpi__sub { font-size: 10.5px; color: var(--muted); margin-top: 8px; }
.oc-spark { display: flex; align-items: flex-end; gap: 3px; height: 26px; margin-top: 10px; }
.oc-spark span { flex: 1; border-radius: 2px; background: rgba(122,18,32,.2); }
.oc-spark span:last-child { background: rgba(122,18,32,.65); }
.oc-kpi--dark { background: linear-gradient(150deg, var(--terracotta), #4E0E16); border-color: rgba(242,199,92,.3); }
.oc-kpi--dark .oc-kpi__top span { color: var(--gold); }
.oc-kpi--dark .oc-kpi__num { color: #FFF6E0; }
.oc-kpi--dark .oc-kpi__sub { color: rgba(255,246,224,.6); }
.oc-kpi--dark .oc-delta--up { background: rgba(155,224,146,.18); color: #9BE092; }
.oc-kpi--dark .oc-delta--down { background: rgba(255,199,191,.18); color: #FFC7BF; }
.oc-spark--dark span { background: rgba(255,246,224,.22); }
.oc-spark--dark span:last-child { background: var(--gold); }

/* ---- KOT board ---- */
.oc-kot { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 14px; }
.oc-kotcol { background: var(--primary-tint); border: 1px solid var(--line); border-radius: 14px; padding: 11px; }
.oc-kotcol__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 10px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; padding: 7px 9px; border-radius: 9px; color: #fff; }
.oc-kotcol__head b { background: rgba(255,255,255,.24); border-radius: 6px; padding: 1px 7px; }
.oc-kotcol__head--placed { background: #8A5510; }
.oc-kotcol__head--fire   { background: #B3261E; }
.oc-kotcol__head--done   { background: #3F7D3F; }
.oc-kotcol__body { display: flex; flex-direction: column; gap: 9px; margin-top: 11px; max-height: 420px; overflow-y: auto; }

.oc-tkt { display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 11px; color: var(--ink); text-decoration: none; }
.oc-tkt:hover { text-decoration: none; color: var(--ink); border-color: var(--primary-lt); }
.oc-tkt.is-warn   { border-color: rgba(224,139,42,.6); }
.oc-tkt.is-breach { border-color: #B3261E; box-shadow: 0 0 0 3px rgba(179,38,30,.12); }
.oc-tkt__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13.5px; font-weight: 800; }
.oc-tkt__min { padding: 3px 8px; border-radius: 7px; background: rgba(28,15,10,.07); color: var(--muted); font-size: 10.5px; font-weight: 700; }
.oc-tkt__min.is-warn { background: rgba(224,139,42,.18); color: #8A5510; }
.oc-tkt__min.is-breach { background: #B3261E; color: #FFF6E0; animation: ocpulse 2s infinite; }
.oc-tkt__where { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.oc-tkt__lines { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; }
.oc-tkt__lines span { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: rgba(28,15,10,.72); }
.oc-tkt__note { margin-top: 7px; padding: 4px 7px; border-radius: 6px; background: rgba(220,168,44,.18); font-size: 10.5px; font-weight: 700; color: #8A6A1C; }
.oc-tkt__bar { margin-top: 8px; height: 3px; border-radius: 99px; background: rgba(28,15,10,.08); overflow: hidden; }
.oc-tkt__bar i { display: block; height: 100%; border-radius: 99px; }

/* ---- Sales chart ---- */
.oc-money { display: flex; align-items: flex-end; gap: 9px; flex-wrap: wrap; margin-top: 5px; font-family: var(--font-display); font-weight: 900; font-size: 29px; line-height: 1; color: var(--ink); }
.oc-money .oc-delta { font-family: var(--font-body); }
.oc-chart { margin-top: 14px; }
.oc-chart svg { display: block; width: 100%; height: 150px; }
.oc-chart__x { display: flex; justify-content: space-between; margin-top: 6px; }
.oc-chart__x span { font-size: 9.5px; color: var(--muted); }
.oc-peaks { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-top: 12px; }
.oc-peaks div { padding: 10px 11px; border-radius: 12px; background: var(--primary-tint); border: 1px solid var(--line); }
.oc-peaks span { display: block; font-size: 8.5px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.oc-peaks b { display: block; font-size: 13px; color: var(--ink); margin-top: 5px; }

/* ---- Movers + mix ---- */
.oc-movers { display: flex; flex-direction: column; gap: 11px; margin-top: 13px; }
.oc-mover { display: flex; align-items: center; gap: 10px; }
.oc-mover__txt { flex: 1 1 auto; min-width: 0; }
.oc-mover__name { display: block; font-size: 12px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-mover__bar { flex: 0 0 64px; height: 6px; border-radius: 99px; background: rgba(28,15,10,.08); overflow: hidden; }
.oc-mover__bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--terracotta), var(--gold)); }
.oc-mix { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.oc-mix__row { display: flex; align-items: center; gap: 14px; margin-top: 11px; }
.oc-donut { flex: 0 0 auto; width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center;
            background: conic-gradient(var(--terracotta) 0 var(--qr), var(--gold) var(--qr) 100%); }
.oc-donut__hole { width: 52px; height: 52px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; line-height: 1.2; }
.oc-donut__hole b { font-size: 15px; color: var(--ink); }
.oc-donut__hole span { font-size: 7.5px; color: var(--muted); }
.oc-mix__legend { flex: 1 1 auto; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.oc-mix__legend div { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.oc-mix__legend i { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 2px; }
.oc-mix__legend span { flex: 1 1 auto; }
.oc-mix__legend b { color: var(--ink); }

/* ---- Alerts (dark) ---- */
.oc-count { padding: 2px 8px; border-radius: 7px; background: rgba(242,199,92,.2); color: var(--gold); font-size: 10.5px; font-weight: 800; }
.oc-count.is-hot { background: #B3261E; color: #FFF6E0; }
.oc-alerts { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; max-height: 380px; overflow-y: auto; }
.oc-alert { border-radius: 13px; padding: 12px; }
.oc-alert--2 { background: rgba(179,38,30,.16); border: 1px solid rgba(179,38,30,.6); }
.oc-alert--1 { background: rgba(224,139,42,.13); border: 1px solid rgba(224,139,42,.4); }
.oc-alert--0 { background: rgba(255,246,224,.06); border: 1px solid rgba(242,199,92,.22); }
.oc-alert__top { display: flex; align-items: center; gap: 8px; }
.oc-alert__ico { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 10px; font-weight: 800; background: rgba(242,199,92,.25); color: var(--gold); }
.oc-alert--2 .oc-alert__ico { background: #B3261E; color: #FFF6E0; }
.oc-alert--1 .oc-alert__ico { background: #E08B2A; color: #2A1405; }
.oc-alert__title { flex: 1 1 auto; font-size: 11.5px; font-weight: 700; color: #FFF6E0; }
.oc-alert__body { font-size: 10.5px; line-height: 1.5; color: rgba(255,246,224,.6); margin-top: 6px; }
.oc-alert__acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.oc-alert__acts form { margin: 0; }
.oc-alert__acts a, .oc-alert__acts button {
    display: inline-block; padding: 6px 10px; border-radius: 8px; cursor: pointer;
    background: rgba(255,246,224,.12); border: 1px solid rgba(255,246,224,.25);
    font: 700 10px/1.2 var(--font-body); color: #FFF6E0; text-decoration: none;
}
.oc-alert__acts a:hover, .oc-alert__acts button:hover { background: rgba(255,246,224,.22); color: #FFF6E0; text-decoration: none; }

/* ---- Selling today ---- */
.oc-stock { display: flex; flex-direction: column; gap: 11px; margin-top: 13px; }
.oc-stock__row.is-out .oc-stock__name { color: var(--muted); }
.oc-stock__top { display: flex; align-items: center; gap: 8px; }
.oc-stock__top form { margin: 0; }
.oc-stock__name { flex: 1 1 auto; min-width: 0; font-size: 11.5px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-stock__top b { font-size: 11px; color: var(--muted); }
.oc-tag { display: inline-block; padding: 2px 7px; border-radius: 6px; border: 0; font: 800 8.5px/1.5 var(--font-body); letter-spacing: .6px; }
button.oc-tag { cursor: pointer; }
span.oc-tag { cursor: default; }
.oc-tag--ok  { background: rgba(63,125,63,.13); color: #2E5E2E; }
.oc-tag--out { background: #B3261E; color: #FFF6E0; }
.oc-stock__bar { margin-top: 6px; height: 5px; border-radius: 99px; background: rgba(28,15,10,.08); overflow: hidden; }
.oc-stock__bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--terracotta), var(--gold)); }
.oc-stock__row.is-out .oc-stock__bar i { background: #B3261E; }

/* ---- Remote controls ---- */
.oc-switches { display: flex; flex-direction: column; margin-top: 12px; }
.oc-switch { margin: 0; }
.oc-switch__btn {
    width: 100%; display: flex; align-items: center; gap: 11px;
    padding: 10px 0; background: none; border: 0; border-bottom: 1px solid var(--line);
    text-align: left; cursor: pointer; font-family: inherit;
}
.oc-switch__btn:disabled { cursor: default; opacity: .75; }
.oc-switch__txt { flex: 1 1 auto; min-width: 0; }
.oc-switch__txt b { display: block; font-size: 12px; font-weight: 500; color: var(--ink); }
.oc-switch__txt span { display: block; font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.oc-track { flex: 0 0 auto; width: 42px; height: 24px; border-radius: var(--pill); padding: 3px; background: rgba(28,15,10,.16); transition: background .2s; }
.oc-track i { display: block; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.oc-track.is-on { background: #3F7D3F; }
.oc-track.is-on i { transform: translateX(18px); }

.oc-buffers { display: flex; gap: 6px; margin-top: 8px; }
.oc-buffers form { flex: 1 1 0; margin: 0; }
.oc-buf { width: 100%; padding: 9px 6px; border: 0; border-radius: 9px; background: rgba(28,15,10,.06); color: var(--muted); font: 700 11px/1.2 var(--font-body); cursor: pointer; }
.oc-buf:disabled { cursor: default; }
.oc-buf.is-on { background: var(--espresso); color: var(--gold); }
.oc-actions { display: flex; flex-direction: column; gap: 7px; margin-top: 14px; }

/* ============================================================================
   Owner Console - responsive
   ============================================================================ */
@media (max-width: 1280px) {
    .oc-grid { grid-template-columns: minmax(0,1fr) 330px; }
    .oc-split { grid-template-columns: 1fr; }
}
@media (max-width: 1080px) {
    .oc-grid { grid-template-columns: 1fr; }
    .oc-side { flex-direction: row; flex-wrap: wrap; }
    .oc-side > section { flex: 1 1 320px; }
    .oc-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 860px) {
    .oc-kot { grid-template-columns: 1fr; }
    .oc-kotcol__body { max-height: none; }
    .oc-side { flex-direction: column; }
    .oc-side > section { flex: 1 1 auto; }
}
@media (max-width: 640px) {
    .oc-pad { padding: 13px; }
    .oc-card { border-radius: 15px; }

    /* Top bar stacks: identity on its own row, clock + kitchen switch below */
    .oc-bar { padding: 12px 13px; gap: 10px; border-radius: 15px; }
    .oc-bar__id { flex: 1 1 100%; }
    .oc-bar__gap { display: none; }
    .oc-bar__clock { text-align: left; }
    .oc-bar__clock b { display: inline; }
    .oc-bar__clock span { margin-left: 6px; }
    .oc-bar__form, .oc-switchpill { margin-left: auto; }

    .oc-breach { padding: 11px 13px; gap: 9px; }
    .oc-breach__txt { flex: 1 1 100%; font-size: 13px; }
    .oc-breach__cta { flex: 1 1 0; text-align: center; }

    .oc-kpi__num { font-size: 28px; }
    .oc-money { font-size: 25px; }
    .oc-peaks { grid-template-columns: 1fr; }
    .oc-chart svg { height: 128px; }
    /* Only the first and last hour labels survive a phone width */
    .oc-chart__x span { display: none; }
    .oc-chart__x span:first-child,
    .oc-chart__x span:last-child { display: inline; }

    .oc-mix__row { gap: 11px; }
    .oc-alerts { max-height: none; }
}
@media (max-width: 420px) {
    .oc-kpis { grid-template-columns: 1fr; }
    .oc-bar__name { font-size: 16px; }
    .oc-kpi__num { font-size: 26px; }
    .oc-donut { width: 66px; height: 66px; }
    .oc-donut__hole { width: 44px; height: 44px; }
}

/* ------------------------------------------------- Tables on phones ------ */
/*  A 560px-wide grid inside a 390px screen means the operator has to discover
    a sideways swipe to see the amount or the buttons.  On phones every row
    becomes its own card and each cell prints "HEADER   value" - the header
    text is stamped onto the cells by stampTableLabels() in _Layout.          */
@media (max-width: 560px) {
    .table-wrap {
        overflow-x: visible;
        border: none;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .table-wrap table.grid { display: block; width: 100%; min-width: 0; }
    .table-wrap table.grid thead { display: none; }
    .table-wrap table.grid tbody,
    .table-wrap table.grid tfoot { display: block; }

    .table-wrap table.grid tr {
        display: block;
        margin: 0 0 10px;
        padding: 2px 0;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow-sm);
    }
    .table-wrap table.grid tbody tr:hover { background: #fff; }

    .table-wrap table.grid td,
    .table-wrap table.grid tfoot th {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 12px;
        padding: 9px 13px;
        text-align: right;
        white-space: normal;
        font-size: 14.5px;
        border-bottom: 1px dashed var(--line-2);
    }
    .table-wrap table.grid tr td:last-child,
    .table-wrap table.grid tfoot tr th:last-child { border-bottom: none; }

    .table-wrap table.grid td[data-label]::before,
    .table-wrap table.grid tfoot th[data-label]::before {
        content: attr(data-label);
        flex: 0 0 auto;
        margin-right: auto;
        text-align: left;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .05em;
        color: var(--ink-2);
    }
    .table-wrap table.grid td[data-label=""]::before { content: none; }

    /*  "No records", drill-down panels and anything spanning the row stay as
        plain full-width blocks - a label would be meaningless there.          */
    .table-wrap table.grid td[colspan],
    .table-wrap table.grid td.drill-cell {
        display: block;
        text-align: left;
    }
    .table-wrap table.grid td[colspan]::before,
    .table-wrap table.grid td.drill-cell::before { content: none; }

    /*  Action buttons get a row of their own and fill the width of the card.  */
    .table-wrap table.grid td .btn { min-height: 36px; }
    .table-wrap table.grid td form { margin: 0; }
}

/* ------------------------------------------------ Pay-at-counter queue --- */
/*  One queue, three screens: kitchen board, billing and the owner console.  */
.pq { display: flex; flex-direction: column; gap: 10px; }
.pq__empty { padding: 14px 2px; margin: 0; font-size: 13.5px; }
.pq__card {
    background: #fff;
    border: 1px solid var(--line, #E6DCC8);
    border-left: 4px solid #E08B2A;
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 2px 8px -5px rgba(28, 15, 10, .3);
}
.pq__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pq__no { font-weight: 900; font-size: 15px; color: var(--espresso, #1C0F0A); }
.pq__tag {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(220, 168, 44, .2);
    color: #8A6A1C;
    font-size: 11px;
    font-weight: 700;
}
.pq__tag--parcel { background: #3A0D08; color: #F2C75C; }
.pq__amt { font-weight: 900; font-size: 17px; color: var(--terracotta, #7A1220); white-space: nowrap; }
.pq__meta { display: flex; align-items: center; gap: 12px; margin-top: 6px; font-size: 12.5px; }
.pq__phone { font-weight: 700; color: var(--terracotta, #7A1220); text-decoration: none; }
.pq__at { color: #8a7a5c; }
.pq__lines { list-style: none; margin: 9px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.pq__lines li { display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
.pq__lines li i { margin-left: auto; font-style: normal; font-weight: 700; }
.pq__note {
    margin-top: 9px;
    padding: 7px 9px;
    border-radius: 8px;
    background: rgba(122, 18, 32, .06);
    font-size: 12.5px;
    color: #7A1220;
}
.pq__acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 11px; }

@media (max-width: 560px) {
    .pq__acts { flex-direction: column-reverse; }
    .pq__acts .btn { width: 100%; }
    .pq__amt { font-size: 16px; }
}

/* ---------------------------------------------------------------------------
   Kitchen stock board - out of stock / available, one tap per item.
   Built for a tablet propped up in the kitchen: big targets, no table.
   --------------------------------------------------------------------------- */
.stock-grid { display:grid; gap:12px; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); }

.stock-card {
    background:var(--surface,#fff); border:1px solid var(--line,#e6e1d8); border-radius:14px;
    padding:14px; display:flex; flex-direction:column; gap:12px;
    transition:opacity .15s ease, border-color .15s ease;
}
.stock-card.is-out { opacity:.62; border-color:#e0b4b4; background:#fdf6f6; }

.stock-card__top { display:flex; align-items:flex-start; gap:9px; }
.stock-card__name { flex:1 1 auto; font-weight:600; line-height:1.25; min-width:0; }
.stock-card__name small { display:block; font-weight:400; font-size:12px; margin-top:2px; }

.stock-card__pill {
    flex:0 0 auto; font-size:11px; font-weight:700; letter-spacing:.02em;
    padding:3px 9px; border-radius:999px; background:#e8f3e8; color:#2b6b34; white-space:nowrap;
}
.stock-card.is-out .stock-card__pill { background:#fae5e5; color:#9b2c2c; }

.stock-card__btn { width:100%; min-height:44px; }

@media (max-width:560px) {
    .stock-grid { grid-template-columns:1fr; }
}

/* ---------------------------------------------------------------------------
   Owner console - "Online payments" card.
   A five-column ledger on a desktop; on a phone each payment folds into a
   two-line block, because a five-column table at 360px is unreadable.
   --------------------------------------------------------------------------- */
.oc-op__sum { text-align: right; line-height: 1.25; }
.oc-op__sum b { display: block; font-size: 19px; color: var(--espresso, #2B1A10); }

.oc-op { margin-top: 12px; display: flex; flex-direction: column; }

.oc-op__row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr .8fr .9fr;
    align-items: center; gap: 10px;
    padding: 9px 6px; border-radius: 9px;
    border-bottom: 1px solid var(--line);
    color: inherit; text-decoration: none; font-size: 13px;
}
.oc-op__row:last-child { border-bottom: 0; }
a.oc-op__row:hover { background: rgba(0,0,0,.035); }

.oc-op__row--head {
    font: 800 8.5px/1.5 var(--font-body); letter-spacing: .6px;
    text-transform: uppercase; color: var(--muted);
    border-bottom: 1px solid var(--line); padding-bottom: 6px;
}
.oc-op__row--head:hover { background: none; }

.oc-op__mob { font-weight: 600; min-width: 0; }
.oc-op__mob small { display: block; font-weight: 400; font-size: 10.5px; word-break: break-all; }
.oc-op__no { font-variant-numeric: tabular-nums; }
.oc-op__dt { color: var(--muted); font-size: 12px; }
.oc-op__amt { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.oc-op__st  { text-align: right; }

.oc-pay {
    display: inline-block; font-style: normal;
    padding: 2px 8px; border-radius: 999px;
    font: 800 9px/1.6 var(--font-body); letter-spacing: .5px; white-space: nowrap;
}
.oc-pay--paid    { background: rgba(63,125,63,.14); color: #2E5E2E; }
.oc-pay--pending { background: rgba(214,158,46,.18); color: #7A5A12; }
.oc-pay--failed  { background: rgba(179,38,30,.13); color: #8E2018; }
.oc-pay--unpaid  { background: rgba(0,0,0,.07);     color: var(--muted); }

@media (max-width: 720px) {
    /* Mobile + status on the first line, order / time / amount on the second. */
    .oc-op__row { grid-template-columns: 1fr auto; gap: 4px 10px; padding: 11px 4px; }
    .oc-op__row--head { display: none; }
    .oc-op__mob { grid-column: 1; grid-row: 1; }
    .oc-op__st  { grid-column: 2; grid-row: 1; }
    .oc-op__no  { grid-column: 1; grid-row: 2; color: var(--muted); font-size: 12px; }
    .oc-op__dt  { grid-column: 1; grid-row: 3; }
    .oc-op__amt { grid-column: 2; grid-row: 2 / span 2; align-self: center; font-size: 15px; }
}

/* ---------------------------------------------------------------------------
   Restaurant logo (wwwroot/images/logo.*) standing in for the wordmark.
   The mark is a wide arched badge, so it is sized by HEIGHT and allowed to
   find its own width - fixing the width instead would squash it on a phone.
   --------------------------------------------------------------------------- */
.brand--logo { gap: 0; padding: 2px 0; }
.brand__logo {
    display: block;
    height: 36px;
    width: auto;
    max-width: min(52vw, 260px);   /* never crowds the language toggle */
    object-fit: contain;
}

/* The topbar is dark; a logo exported on white would show as a pale slab, so
   nothing is painted behind it - the file itself must be transparent. */
@media (max-width: 900px) {
    .brand__logo { height: 33px; max-width: min(48vw, 190px); }
}
@media (max-width: 420px) {
    .brand__logo { height: 29px; max-width: 46vw; }
}

/* ---- Login card ---------------------------------------------------------- */
.login-card__brand--logo { display: flex; justify-content: center; margin-bottom: 10px; }
.login-card__logo {
    display: block;
    width: min(66%, 236px);
    height: auto;
    object-fit: contain;
}
@media (max-width: 420px) {
    .login-card__logo { width: min(74%, 200px); }
}
