/* The UAE dirham sign (U+20C3) is newer than the fonts on the venue PC, so the app
   carries a one-glyph font for it. unicode-range keeps every other character on Segoe. */
@font-face {
    font-family: 'Dirham';
    src: url('fonts/dirham-sans.woff2') format('woff2'), url('fonts/dirham-sans.woff') format('woff');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+20C3;
}

html, body {
    margin: 0;
    font-family: 'Dirham', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Terminals are touch screens on a shop floor: never let a stray drag select text
   or a double-tap zoom the till out of alignment mid-order. */
body {
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
    overscroll-behavior: none;
}

input, textarea {
    -webkit-user-select: text;
    user-select: text;
}

/* ── Login (static server-rendered, so it cannot rely on MudBlazor interactivity) ──
   One screen, no scroll on a 1366×768 till: header and footer strips, the hero text on
   the left, the card in the middle, the floor photo behind everything. */

.login-page {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 440px) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas: "top top top" "hero centre right" "bottom bottom bottom";
    column-gap: 24px;
    padding: 14px 28px 12px;
    box-sizing: border-box;
    color: #e8eef9;
    background:
        radial-gradient(900px 500px at 50% 40%, rgba(37, 99, 235, 0.18), transparent 70%),
        linear-gradient(180deg, rgba(5, 11, 30, 0.78), rgba(4, 9, 24, 0.9)),
        url("img/login/floor.webp") center / cover no-repeat #060c1f;
    overflow: hidden;
}

.lp-top { grid-area: top; display: flex; align-items: center; justify-content: space-between; }
.lp-brand { display: flex; align-items: center; gap: 10px; }
.lp-wordmark { font-size: 1.35rem; font-weight: 800; letter-spacing: 0.08em; line-height: 1; color: #fff; }
.lp-wordmark span, .login-title span { color: #3b82f6; }
.lp-tag { font-size: 0.58rem; letter-spacing: 0.32em; color: #8da2c0; margin-top: 3px; }
.lp-topright { display: flex; align-items: center; gap: 18px; }
.lp-region { display: flex; align-items: center; gap: 6px; color: #dbe6f7; font-weight: 600; font-size: 0.9rem; padding-right: 18px; border-right: 1px solid rgba(148, 163, 184, 0.35); }
.lp-region svg { color: #3b82f6; }
.lp-clock { text-align: right; }
.lp-time { font-size: 0.95rem; font-weight: 600; line-height: 1.1; }
.lp-date { font-size: 0.72rem; color: #8da2c0; }

.lp-hero { grid-area: hero; align-self: center; padding-left: 28px; }
.lp-hero-title { margin: 0; font-size: 2.6rem; line-height: 1.05; font-weight: 800; letter-spacing: -0.01em; color: #fff; }
.lp-hero-title span { color: #3b82f6; }
.lp-hero-rule { width: 48px; height: 3px; background: #3b82f6; border-radius: 2px; margin: 18px 0 14px; }
.lp-hero-line { font-size: 0.66rem; letter-spacing: 0.28em; color: #b7c5de; margin-top: 6px; }

.lp-centre { grid-area: centre; display: flex; align-items: center; justify-content: center; min-height: 0; }

.lp-neon {
    grid-area: right; align-self: center; justify-self: end; margin-right: 6%;
    font-size: 2.2rem; font-weight: 800; line-height: 1.05; letter-spacing: 0.04em; color: #60a5fa;
    text-shadow: 0 0 12px rgba(96, 165, 250, 0.7), 0 0 28px rgba(59, 130, 246, 0.45);
    opacity: 0.75; pointer-events: none;
}

.lp-bottom { grid-area: bottom; display: flex; align-items: flex-end; justify-content: space-between; margin-top: 6px; }
.lp-trusted { display: flex; align-items: center; gap: 10px; }
.lp-trusted-title { font-size: 0.82rem; color: #e8eef9; }
.lp-trusted-sub { font-size: 0.7rem; color: #8da2c0; letter-spacing: 0.06em; margin-top: 2px; }
.lp-built { display: flex; align-items: flex-end; gap: 16px; }
.lp-skyline { height: 88px; width: auto; opacity: 0.45; filter: brightness(1.6) drop-shadow(0 0 10px rgba(59, 130, 246, 0.5)); }
.lp-built-tag { display: flex; align-items: center; gap: 8px; font-size: 0.6rem; letter-spacing: 0.22em; color: #b7c5de; text-align: right; line-height: 1.4; padding-bottom: 4px; }
.lp-built-tag img { height: 20px; width: auto; border-radius: 2px; }

.login-card {
    width: 100%;
    background: linear-gradient(180deg, rgba(15, 27, 51, 0.88), rgba(11, 20, 40, 0.92));
    border: 1px solid rgba(59, 130, 246, 0.28);
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(15, 27, 51, 0.6) inset;
    backdrop-filter: blur(6px);
    padding: 18px 26px 16px;
    text-align: center;
}

.lp-card-brand { display: flex; align-items: center; justify-content: center; gap: 10px; }
.login-title { margin: 0; font-size: 1.6rem; font-weight: 800; letter-spacing: 0.08em; color: #ffffff; line-height: 1; }
.login-tag { margin: 4px 0 10px; font-size: 0.62rem; letter-spacing: 0.32em; color: #8da2c0; }
.login-headline { margin: 0; font-size: 0.98rem; font-weight: 600; color: #dbe6f7; }
.login-subtitle { margin: 3px 0 12px; font-size: 0.76rem; color: #8da2c0; }

.login-card form { text-align: left; }
.login-label { display: block; margin-bottom: 4px; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: #8da2c0; }
.login-field { position: relative; margin-bottom: 10px; }
.login-field svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: #60a5fa; pointer-events: none; }

.login-input {
    width: 100%;
    box-sizing: border-box;
    height: 42px;
    padding: 0 12px 0 40px;
    font-size: 0.98rem;
    background: rgba(6, 12, 31, 0.85);
    border: 1px solid #2b3c5e;
    border-radius: 10px;
    color: #ffffff;
}
.login-input::placeholder { color: #6b7f9e; }
.login-input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }

.login-button {
    width: 100%;
    height: 44px;
    margin-top: 2px;
    font-size: 0.98rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.login-button:hover { background: linear-gradient(90deg, #1d4ed8, #2563eb); }

/* Sign in, and beside it the clock: same code and PIN, nobody signed in. */
.login-actions { display: grid; grid-template-columns: 3fr 2fr; gap: 8px; margin-top: 2px; }
.login-actions .login-button { margin-top: 0; }
.login-clock {
    height: 44px; font: inherit; font-size: 0.82rem; font-weight: 700; color: #dbe6f7; cursor: pointer;
    background: transparent; border: 1px solid rgba(148, 163, 184, 0.45); border-radius: 8px;
}
.login-clock:hover { border-color: #60a5fa; color: #fff; }
.login-notice {
    padding: 8px 10px; margin-bottom: 10px; font-size: 0.8rem; color: #a7f3d0;
    background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.4); border-radius: 8px;
}

.login-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-size: 0.68rem; color: #8da2c0; }
.login-foot::before, .login-foot::after { content: ""; flex: 1; height: 1px; background: rgba(148, 163, 184, 0.25); }

.login-error {
    padding: 8px 10px;
    margin-bottom: 10px;
    font-size: 0.8rem;
    color: #ff8a80;
    background: rgba(244, 67, 54, 0.12);
    border: 1px solid rgba(244, 67, 54, 0.4);
    border-radius: 8px;
}

.login-validation { display: block; margin: -6px 0 8px; font-size: 0.72rem; color: #ff8a80; }

/* Keypad: a thumb still lands cleanly at 42px, and no hover state — this is a touch
   screen, and a hover that lingers after a tap looks like a stuck key. */
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 2px 0 10px; }
.key { height: 42px; font-size: 1.1rem; font-weight: 700; color: #ffffff; background: rgba(22, 35, 63, 0.9); border: 1px solid #2b3c5e; border-radius: 10px; cursor: pointer; }
.key:active { background: #2b3c5e; }
.key-muted { color: #b7c5de; font-size: 1rem; }

@media (max-width: 1100px) { .lp-hero, .lp-neon, .lp-skyline { display: none; } .login-page { grid-template-columns: minmax(0, 1fr) minmax(320px, 440px) minmax(0, 1fr); } }
@media (max-width: 720px) {
    .login-page { grid-template-columns: 1fr; grid-template-areas: "top" "centre" "bottom"; padding: 12px 16px; overflow: auto; }
    .lp-trusted-title { font-size: 0.72rem; }
}
@media (max-height: 640px) { .login-page { min-height: 0; height: auto; overflow: auto; } }

/* ── Blazor error / reconnect ── */

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.75rem 1.25rem;
    background: #ffb900;
    color: #000;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
}

#blazor-error-ui .dismiss {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    cursor: pointer;
}

/* ── Floor map ──
   Tiles are sized for a finger on a tablet, not a mouse on a desktop: minimum 150px
   wide and ~92px tall keeps them comfortably above the ~44px touch-target floor even
   with a glove or a wet hand. */

.floor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.floor-tile {
    border: 2px solid;
    border-radius: 8px;
    padding: 12px;
    min-height: 92px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    transition: transform 80ms ease, box-shadow 80ms ease;
}

.floor-tile:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

.floor-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.floor-tile:active {
    transform: translateY(0);
}

.floor-tile-head {
    display: flex;
    align-items: center;
    gap: 6px;
}

.floor-tile-code {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.floor-tile-name {
    font-size: 0.8rem;
    opacity: 0.75;
    margin: 4px 0;
}

.floor-tile-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    opacity: 0.9;
}



/* Live session tiles */

.floor-tile-badge {
    margin-left: auto;
    font-size: 0.7rem;
    opacity: 0.6;
}

.floor-tile-timer {
    font-variant-numeric: tabular-nums;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin: 2px 0;
}

.floor-tile-timer.paused {
    font-size: 1.05rem;
    opacity: 0.7;
}

.floor-tile-players {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    opacity: 0.8;
}

.floor-tile-status {
    justify-content: space-between;
}

/* Reports: headline numbers, then a CSS bar chart. No charting library for a dozen bars. */

.report-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 140px;
    overflow-x: auto;
}

.bar {
    flex: 1 1 0;
    min-width: 18px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
}

.bar-fill {
    width: 100%;
    background: var(--mud-palette-primary);
    border-radius: 3px 3px 0 0;
    min-height: 0;
}

.bar-label {
    font-size: 0.65rem;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
}

/* -- Open bills -- */

.bill-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bill-h1 { margin: 0 8px 0 0; font-size: 1.7rem; font-weight: 800; letter-spacing: -0.01em; }
.pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px; border-radius: 10px; border: 1px solid; font-weight: 600; font-size: 0.95rem;
}
.pill .mud-icon-root { font-size: 20px; }
.pill.blue { color: #60a5fa; border-color: rgba(59, 130, 246, 0.45); background: rgba(59, 130, 246, 0.12); }
.pill.red { color: #f87171; border-color: rgba(248, 113, 113, 0.45); background: rgba(248, 113, 113, 0.12); }
.pill.amber { color: #fbbf24; border-color: rgba(251, 191, 36, 0.45); background: rgba(251, 191, 36, 0.12); }
.bill-refresh.mud-button-root { border-color: var(--gp-line); border-radius: 10px; width: 44px; height: 44px; }

/* Six to a row on the 1366px screen; the cards are a size down for it. */
.bill-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1150px) { .bill-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 820px) { .bill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .bill-grid { grid-template-columns: 1fr; } }

.bill-card {
    background: #0c1730; border: 1px solid var(--gp-line); border-radius: 10px; padding: 10px 11px 11px;
    display: flex; flex-direction: column; gap: 5px; min-width: 0;
    transition: transform 80ms ease, border-color 80ms ease;
}
.bill-card:hover { transform: translateY(-2px); border-color: rgba(96, 165, 250, 0.45); }
.bill-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.bill-no { font-size: 1rem; font-weight: 800; white-space: nowrap; display: flex; flex-direction: column; line-height: 1.15; }
.bill-no small { font-size: 0.66rem; font-weight: 600; color: #93c5fd; letter-spacing: 0.03em; font-variant-numeric: tabular-nums; }
.bill-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 8px; border-radius: 999px; font-size: 0.66rem; font-weight: 600; border: 1px solid; white-space: nowrap;
}
.bill-chip .mud-icon-root { font-size: 12px; }
.bill-chip.open { color: #34d399; border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.12); }
.bill-chip.running { color: #f59e0b; border-color: rgba(245, 158, 11, 0.4); background: rgba(245, 158, 11, 0.12); }
.bill-chip.ready { color: #fbbf24; border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.12); }
.bill-station { display: flex; align-items: center; gap: 6px; color: var(--gp-blue-2); font-size: 0.78rem; font-weight: 500; white-space: nowrap; overflow: hidden; }
.bill-station span:last-child { overflow: hidden; text-overflow: ellipsis; }
.bill-station i { width: 4px; height: 4px; border-radius: 50%; background: var(--gp-blue-2); display: inline-block; }
.bill-row { display: flex; align-items: center; gap: 6px; color: #c7d2e5; font-size: 0.78rem; white-space: nowrap; overflow: hidden; }
.bill-row span { overflow: hidden; text-overflow: ellipsis; }
.bill-row .mud-icon-root { font-size: 15px; color: var(--gp-muted); flex: 0 0 auto; }
.bill-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin-top: 2px; padding-top: 7px; border-top: 1px solid var(--gp-line);
}
.bill-items { display: inline-flex; align-items: center; gap: 5px; color: #c7d2e5; font-size: 0.75rem; white-space: nowrap; }
.bill-items .mud-icon-root { font-size: 14px; color: var(--gp-muted); }
.bill-amount { color: #fbbf24; font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bill-open.mud-button-root { min-height: 30px; font-weight: 700; text-transform: none; font-size: 0.8rem; margin-top: 1px; padding: 4px 8px; }

/* Order screen: item buttons sized for a finger, not a mouse. */

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.menu-tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 68px;
    padding: 10px;
    border: 1px solid #3d3d3d;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 80ms ease;
}

.menu-tile:hover:not(:disabled) {
    background: rgba(76, 175, 80, 0.14);
    border-color: #4caf50;
}

.menu-tile:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.menu-tile-variant {
    border-style: dashed;
}

.menu-tile-name {
    font-size: 0.85rem;
    line-height: 1.2;
}

.menu-tile-price {
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 4px;
}

.menu-tile-out {
    font-size: 0.7rem;
    color: #ff8a80;
}

/* -- Kitchen display --
   Read across a hot pass at arm's length: the number and the timer are the big things,
   the card's top edge is its status, the timer's colour is its age. */

.kds-h1 { margin: 0 0 12px; font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; }
.kds-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kds-bar .search { flex: 1 1 220px; min-width: 180px; }
.kds-bar .mud-input-control { margin: 0; }
.kds-pills { display: flex; gap: 6px; }
.kds-pill {
    padding: 7px 16px; border-radius: 999px; border: 1px solid var(--gp-line); background: #0c1730;
    color: #e8eef9; font: inherit; font-weight: 600; font-size: 0.85rem; cursor: pointer;
}
.kds-pill:hover { border-color: rgba(96, 165, 250, 0.5); }
.kds-pill.on { background: var(--gp-blue); border-color: var(--gp-blue); color: #fff; }

.kds-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
@media (max-width: 1200px) { .kds-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 950px) { .kds-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 680px) { .kds-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 440px) { .kds-grid { grid-template-columns: 1fr; } }

.kds-card {
    background: #0c1730; border: 1px solid var(--gp-line); border-top: 3px solid #fbbf24; border-radius: 10px;
    padding: 9px 11px 11px; display: flex; flex-direction: column; gap: 6px; min-width: 0;
}
.kds-card.preparing { border-top-color: #60a5fa; }
.kds-card.ready { border-top-color: #34d399; }

.kds-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kds-number { font-size: 1.15rem; font-weight: 800; white-space: nowrap; }
.kds-table { color: #c7d2e5; font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kds-chip {
    margin-left: auto; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
    padding: 2px 8px; border-radius: 999px; font-size: 0.66rem; font-weight: 600; border: 1px solid;
}
.kds-chip .mud-icon-root { font-size: 11px; }
.kds-chip.new { color: #fbbf24; border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.12); }
.kds-chip.preparing { color: #60a5fa; border-color: rgba(59, 130, 246, 0.4); background: rgba(59, 130, 246, 0.12); }
.kds-chip.ready { color: #34d399; border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.12); }

.kds-meta { display: flex; align-items: center; gap: 6px; color: var(--gp-muted); font-size: 0.74rem; white-space: nowrap; overflow: hidden; }
.kds-meta span { display: inline-flex; align-items: center; gap: 4px; overflow: hidden; text-overflow: ellipsis; }
.kds-meta .mud-icon-root { font-size: 14px; flex: 0 0 auto; }
.kds-meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--gp-muted); flex: 0 0 auto; }

.kds-age { display: flex; align-items: center; gap: 8px; font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; padding-bottom: 7px; border-bottom: 1px solid var(--gp-line); }
.kds-age .mud-icon-root { font-size: 20px; }
.kds-age.fresh { color: #34d399; }
.kds-age.warm { color: #fbbf24; }
.kds-age.late { color: #f87171; }

/* Lines grow, so every card in a row is the same height and the buttons line up along the bottom. */
.kds-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; flex: 1; min-height: 48px; }
.kds-line { display: flex; align-items: baseline; gap: 6px; font-size: 0.92rem; line-height: 1.3; }
.kds-line b { font-weight: 800; min-width: 12px; text-align: right; }
.kds-line .x { color: var(--gp-muted); font-size: 0.8rem; }
.kds-note {
    display: flex; align-items: center; gap: 6px; margin-top: 4px; padding: 4px 8px; border-radius: 6px;
    background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.3); color: #fca5a5; font-size: 0.74rem;
}
.kds-note .mud-icon-root { font-size: 14px; flex: 0 0 auto; }

.kds-actions { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 4px; }
.kds-actions .mud-button-root { flex: 1; min-height: 32px; font-weight: 700; text-transform: none; font-size: 0.85rem; }
.kds-actions .mud-icon-button { flex: 0 0 auto; width: 34px; height: 32px; border-radius: 8px; border-color: var(--gp-line); }

/* ── Shell ──
   A fixed navy sidebar, a page header the pages fill in, and the content. The look is
   one palette throughout: deep navy ground, slightly lighter panels, blue for anything
   that means "look here". */

:root {
    --gp-bg: #0b1327;
    --gp-panel: #111d35;
    --gp-panel-2: #0f1b33;
    --gp-line: #1e2d4d;
    --gp-text: #e8eef9;
    --gp-muted: #8da2c0;
    --gp-blue: #3b82f6;
    --gp-blue-2: #60a5fa;
    --mud-typography-default-family: 'Dirham', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body { background: var(--gp-bg); color: var(--gp-text); }

.shell { display: flex; min-height: 100vh; background: var(--gp-bg); }

/* The sidebar is a drawer at every width: closed on load, opened from the menu button,
   closed again the moment a link is followed. The floor and the bill get the whole screen. */
.sidebar {
    width: 232px;
    background: linear-gradient(180deg, #0f1c36 0%, #0a1428 100%);
    border-right: 1px solid var(--gp-line);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1200;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}
.sidebar.open { transform: translateX(0); }

.brand { padding: 24px 16px 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.brand-mark { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.6rem; letter-spacing: 0.06em; color: #fff; }
.brand-mark .p2 { color: var(--gp-blue); }
.brand-icon { font-size: 28px; color: var(--gp-blue-2); }
.brand-tag { font-size: 0.62rem; letter-spacing: 0.3em; color: var(--gp-muted); }

.nav { padding: 8px 12px; flex: 1; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: #c7d2e6;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.nav-link .mud-icon-root { font-size: 22px; opacity: 0.9; }
.nav-link:hover { background: rgba(59, 130, 246, 0.10); color: #fff; }

.nav-link.active {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.38), rgba(37, 99, 235, 0.14));
    border-color: rgba(96, 165, 250, 0.45);
    color: #fff;
}

.nav-section { margin: 10px 14px 2px; font-size: 0.62rem; letter-spacing: 0.2em; color: #4f6489; text-transform: uppercase; }

.sidebar-foot { padding: 10px 16px 12px; border-top: 1px solid var(--gp-line); }
.user-card { display: flex; align-items: center; gap: 10px; }
.avatar {
    width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: #fff; font-size: 0.9rem;
}
.user-name { font-weight: 600; font-size: 0.95rem; }
.user-role { font-size: 0.75rem; color: var(--gp-muted); }

.logout-btn {
    margin-top: 10px; display: flex; align-items: center; gap: 10px;
    background: none; border: none; color: #c7d2e6; font: inherit; cursor: pointer; padding: 6px 4px;
}
.logout-btn:hover { color: #fff; }

/* The clock in the sidebar. */
.clock-row { display: flex; align-items: center; gap: 4px; margin-top: 10px; }
.clock-btn {
    flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 6px 8px;
    font: inherit; font-size: 0.82rem; color: #c7d2e6; cursor: pointer; text-align: left;
    background: none; border: 1px solid rgba(148, 163, 184, 0.3); border-radius: 8px;
}
.clock-btn:hover { color: #fff; border-color: #60a5fa; }
.clock-btn.in { color: #6ee7b7; border-color: rgba(52, 211, 153, 0.5); }
.clock-other { color: #c7d2e6 !important; }
.clock-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.clock-input {
    width: 100%; min-width: 0; height: 42px; padding: 0 10px; font: inherit; color: inherit; cursor: pointer;
    background: transparent; border: 1px solid rgba(148, 163, 184, 0.4); border-radius: 8px;
}
.clock-input.on { border-color: #3b82f6; box-shadow: 0 0 0 1px #3b82f6; }

.shell-backdrop { display: none; }
.shell-backdrop.open { display: block; position: fixed; inset: 0; background: rgba(7, 13, 26, 0.6); z-index: 1100; }

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

/* Slim: one line of title and venue, small chips, so the pages below get the screen's height. */
.topbar { display: flex; align-items: center; gap: 10px; padding: 8px 24px 4px; flex-wrap: wrap; }
.topbar-titles { min-width: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.topbar-title { font-size: 1.3rem; font-weight: 700; margin: 0; line-height: 1.2; }
/* After every navigation Blazor moves focus to the page heading so a screen reader announces
   the new page. Some browsers draw a focus ring on a programmatically focused heading, which
   on a till looks like a selection box around the title. The heading is not interactive, so
   the ring says nothing useful; keep the focus, drop the ring. */
h1:focus, h1:focus-visible, .tk-h1:focus, .topbar-title:focus { outline: none; box-shadow: none; }
.topbar-sub { color: var(--gp-muted); font-size: 0.85rem; }
.topbar-venue { font-size: 1.05rem; font-weight: 700; color: var(--gp-muted); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* Plain until touched: a filled box here read as "selected" on every page load. */
.menu-toggle.mud-button-root { width: 36px; height: 36px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #c7d2e6; }
.menu-toggle.mud-button-root:hover, .menu-toggle.mud-button-root:focus-visible { background: var(--gp-panel); border-color: var(--gp-line); color: #fff; }
.menu-toggle.mud-button-root.on { background: rgba(37, 99, 235, 0.22); border-color: rgba(96, 165, 250, 0.45); color: #fff; }
.topbar-brand { display: flex; align-items: center; gap: 6px; font-weight: 800; letter-spacing: 0.06em; color: #fff; font-size: 1.05rem; margin-right: 6px; }
.topbar-brand .p2 { color: var(--gp-blue); }
.topbar-brand .mud-icon-root { font-size: 22px; color: var(--gp-blue-2); }

.chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 12px; border-radius: 9px;
    background: var(--gp-panel); border: 1px solid var(--gp-line);
    font-size: 0.8rem; color: #dce5f5; white-space: nowrap;
}
.bell { position: relative; cursor: pointer; padding: 5px 9px; }
.bell-badge {
    position: absolute; top: -6px; right: -6px;
    background: #ef4444; color: #fff; font-size: 0.62rem; font-weight: 700;
    border-radius: 9px; padding: 1px 5px; min-width: 16px; text-align: center;
}

.page { padding: 8px 24px 20px; flex: 1; }

@media (max-width: 960px) {
    .topbar-brand span { display: none; }
    .topbar { padding: 8px 16px 4px; }
    .page { padding: 6px 16px 20px; }
    .topbar-title { font-size: 1.15rem; }
}

/* MudBlazor surfaces take the panel look so every page matches without a rewrite. */
.mud-paper-outlined, .mud-table, .mud-dialog, .mud-menu-list, .mud-popover .mud-list, .mud-alert {
    background: linear-gradient(180deg, #121f3a, #0f1b33);
    border-color: var(--gp-line) !important;
}
.mud-paper-outlined, .mud-table { border-radius: 14px !important; }
.mud-alert-outlined-info { color: #93c5fd; }
.mud-breadcrumbs { font-size: 0.85rem; }

/* ── Panels ── */

.panel {
    background: linear-gradient(180deg, #121f3a, #0f1b33);
    border: 1px solid var(--gp-line);
    border-radius: 14px;
    padding: 18px 20px;
    height: 100%;
}
.panel-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.panel-head .right { margin-left: auto; }
.panel-title { font-size: 1.05rem; font-weight: 700; }
.panel-title.mb-2, .panel-title.mb-3 { margin-bottom: 10px; }
.panel-sub { color: var(--gp-muted); font-size: 0.8rem; margin-top: 2px; }

.range-select { min-width: 160px; }
.range-select .mud-input-control { margin: 0; }

/* ── Headline cards ── */

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }

.stat {
    background: linear-gradient(135deg, #132242, #0f1b33);
    border: 1px solid var(--gp-line);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
    min-height: 108px;
}
.stat-icon {
    width: 58px; height: 58px; border-radius: 14px; flex: 0 0 auto;
    background: rgba(59, 130, 246, 0.16);
    display: flex; align-items: center; justify-content: center;
    color: var(--gp-blue-2);
}
.stat-icon .mud-icon-root { font-size: 30px; }
.stat-body { min-width: 0; flex: 1; }
.stat-value { font-size: 1.6rem; font-weight: 800; line-height: 1.1; letter-spacing: 0.01em; }
.stat-label { color: #b7c5de; font-size: 0.85rem; margin-top: 2px; }
.stat-change { font-size: 0.75rem; margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.stat-change .mud-icon-root { font-size: 14px; }
.stat-change.up { color: #34d399; }
.stat-change.down { color: #f87171; }
.stat-change span { color: var(--gp-muted); }
.stat-hint { font-size: 0.75rem; color: var(--gp-muted); margin-top: 6px; }
/* The trend strip is a flex sibling, not an overlay: on a narrow card the text wraps
   beside it instead of running underneath it. */
.spark { flex: 0 0 auto; align-self: flex-end; display: flex; align-items: flex-end; gap: 3px; height: 34px; margin-left: 4px; }
@media (max-width: 1150px) { .spark { display: none; } }
.spark i { width: 6px; background: var(--gp-blue); border-radius: 2px; opacity: 0.85; }
.spark i:last-child { background: var(--gp-blue-2); opacity: 1; }

.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.quick-actions .mud-button-root { min-height: 56px; }

/* ── Line chart ── */

.linechart-wrap { display: flex; gap: 6px; position: relative; margin-top: 26px; }
.linechart-yaxis { display: flex; flex-direction: column; justify-content: space-between; font-size: 0.7rem; color: var(--gp-muted); padding: 6px 0 4px; text-align: right; min-width: 34px; }
.linechart { width: 100%; height: 200px; flex: 1; }
.linechart .grid { stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; }
.linechart .series { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.linechart .dot { stroke: #0f1b33; stroke-width: 1.5; }
.linechart-tag {
    position: absolute; transform: translate(-50%, -140%);
    background: #1e2d4d; border: 1px solid #2b3c5e; color: #fff;
    font-size: 0.75rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; white-space: nowrap;
}
.linechart-axis { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--gp-muted); padding: 4px 6px 0 40px; }
.linechart-legend { display: flex; gap: 16px; justify-content: flex-end; font-size: 0.75rem; margin-bottom: 4px; color: var(--gp-muted); }
.linechart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

/* ── Donut ── */

.donut { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut svg { width: 190px; height: 190px; flex: 0 0 auto; transform: rotate(-90deg); }
.donut-track { fill: none; stroke: rgba(255, 255, 255, 0.05); stroke-width: 18; }
.donut-slice { fill: none; stroke-width: 18; }
.donut text { transform: rotate(90deg); transform-origin: 60px 60px; text-anchor: middle; fill: currentColor; }
.donut-centre-value { font-size: 11px; font-weight: 800; }
.donut-centre-label { font-size: 6.5px; opacity: 0.65; }
.donut-legend { flex: 1 1 160px; display: flex; flex-direction: column; gap: 8px; font-size: 0.85rem; }
.donut-row { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 10px; align-items: center; }
.donut-row.compact { grid-template-columns: 12px 1fr auto; }
.donut-row i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.donut-pct { font-weight: 700; font-variant-numeric: tabular-nums; }
.donut-amt { color: var(--gp-muted); font-variant-numeric: tabular-nums; }

/* ── Column chart ── */

.bars { display: flex; align-items: stretch; gap: 14px; height: 190px; padding-top: 18px; }
.bars-yaxis { display: flex; flex-direction: column; justify-content: space-between; font-size: 0.7rem; color: var(--gp-muted); padding-bottom: 22px; text-align: right; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.bar-track { flex: 1; width: 100%; max-width: 64px; position: relative; display: flex; align-items: flex-end; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.bar-fill { width: 100%; background: linear-gradient(180deg, #60a5fa, #2563eb); border-radius: 6px 6px 0 0; }
.bar-value { position: absolute; left: 0; right: 0; text-align: center; transform: translateY(-4px); font-size: 0.8rem; font-weight: 700; margin-bottom: 4px; }
.bar-label { font-size: 0.75rem; color: var(--gp-muted); margin-top: 6px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ── Best sellers ── */

.seller { display: grid; grid-template-columns: 24px 1fr 2fr 44px; gap: 10px; align-items: center; margin: 10px 0; font-size: 0.85rem; }
.seller-rank { width: 22px; height: 22px; border-radius: 50%; background: rgba(59, 130, 246, 0.25); color: #93c5fd; font-size: 0.7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.seller-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seller-bar { height: 10px; background: rgba(255, 255, 255, 0.06); border-radius: 5px; overflow: hidden; }
.seller-bar > div { height: 100%; background: linear-gradient(90deg, #2563eb, #60a5fa); border-radius: 5px; }
.seller-qty { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ── Heatmap ── */

.heatmap { display: grid; gap: 4px; align-items: center; }
.heat-head { text-align: center; font-size: 0.72rem; color: var(--gp-muted); padding-bottom: 4px; }
.heat-hour { font-size: 0.72rem; color: var(--gp-muted); text-align: right; padding-right: 8px; }
.heat-cell { height: 20px; border-radius: 4px; background: rgba(255, 255, 255, 0.04); }
.heat-1 { background: #16305f; }
.heat-2 { background: #1d4ed8; }
.heat-3 { background: #2563eb; }
.heat-4 { background: #3b82f6; }
.heat-5 { background: #93c5fd; }
.heat-scale { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 10px; font-size: 0.7rem; color: var(--gp-muted); }
.heat-scale i { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }
.heat-scale span { margin: 0 4px; }

/* ── Customer insights ── */

.insight-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.insight { background: rgba(59, 130, 246, 0.08); border: 1px solid rgba(96, 165, 250, 0.18); border-radius: 12px; padding: 14px 12px; text-align: center; }
.insight .mud-icon-root { color: var(--gp-blue-2); font-size: 26px; }
.insight-value { font-size: 1.35rem; font-weight: 800; margin-top: 4px; }
.insight-label { font-size: 0.72rem; color: var(--gp-muted); margin-top: 2px; }

/* ── Goal-style progress rows (leakage today, targets when they exist) ── */

.goal { margin: 10px 0 14px; }
.goal-head { display: flex; align-items: baseline; gap: 10px; font-size: 0.85rem; margin-bottom: 6px; }
.goal-name { flex: 0 0 auto; }
.goal-figure { margin-left: auto; font-variant-numeric: tabular-nums; }
.goal-pct { font-weight: 700; min-width: 40px; text-align: right; }
.goal-bar { height: 8px; background: rgba(255, 255, 255, 0.06); border-radius: 4px; overflow: hidden; }
.goal-bar > div { height: 100%; background: linear-gradient(90deg, #2563eb, #60a5fa); border-radius: 4px; }

/* ── Stations (shift view) ── */

.station-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.station-card { border: 1px solid var(--gp-line); border-radius: 12px; padding: 12px; background: rgba(59, 130, 246, 0.06); }
.station-kind { font-size: 0.8rem; color: var(--gp-muted); }
.station-count { font-size: 1.4rem; font-weight: 700; margin: 2px 0 6px; }
.station-count span { font-size: 0.9rem; font-weight: 400; opacity: 0.6; }
.station-bar { height: 6px; background: rgba(255, 255, 255, 0.08); border-radius: 3px; overflow: hidden; }
.station-bar > div { height: 100%; background: linear-gradient(90deg, #2563eb, #60a5fa); }
.station-oos { font-size: 0.7rem; color: #f87171; margin-top: 4px; }

/* ── Activity feed ── */

.activity { display: flex; flex-direction: column; gap: 10px; }
.activity-row { display: grid; grid-template-columns: 10px 128px 1fr auto; gap: 12px; align-items: center; font-size: 0.85rem; }
.activity-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.activity-dot.ok { background: #34d399; }
.activity-dot.info { background: #60a5fa; }
.activity-dot.bad { background: #f87171; }
.activity-dot.warn { background: #fbbf24; }
.activity-dot.muted { background: #64748b; }
.activity-time { color: var(--gp-blue-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.activity-amount { font-variant-numeric: tabular-nums; font-weight: 600; }

/* Legacy tinted cards still referenced by a couple of pages. */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { border-radius: 12px; padding: 14px 16px; border: 1px solid var(--gp-line); background: linear-gradient(135deg, #132242, #0f1b33); }
.kpi-label { font-size: 0.8rem; color: var(--gp-muted); }
.kpi-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }

/* Relay boards: one cell per channel, lit when the coil is on. */
.relay-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.relay-cell { border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; padding: 6px 8px; display: flex; flex-direction: column; gap: 4px; }
.relay-cell.held { border-style: dashed; }
.relay-top { display: flex; align-items: center; gap: 6px; }
.relay-ctl { display: flex; gap: 4px; }
.relay-ctl .mud-button-root { min-width: 0; padding: 2px 8px; font-size: 0.7rem; min-height: 26px; flex: 1; }
.relay-cell.on { border-color: #ffa726; background: rgba(255,167,38,0.12); }
.relay-cell.off { opacity: 0.75; }
.relay-num { font-weight: 700; min-width: 20px; }
.relay-res { flex: 1; font-size: 0.8rem; color: var(--mud-palette-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.floor-tile-relay { opacity: 0.9; }


/* -- Stations (floor) --
   Cards a cashier can read across a counter: kind, status, price, who is on it. */

.stat-icon.green { background: rgba(52, 211, 153, 0.16); color: #34d399; }
.stat-icon.red { background: rgba(248, 113, 113, 0.16); color: #f87171; }
.stat-icon.amber { background: rgba(251, 191, 36, 0.16); color: #fbbf24; }
.stat-icon.orange { background: rgba(245, 158, 11, 0.16); color: #f59e0b; }

.station-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.station-toolbar .search { flex: 1 1 260px; }
.station-toolbar .pick { flex: 0 1 200px; min-width: 160px; }
.station-toolbar .mud-input-control { margin: 0; }
.view-toggle { display: inline-flex; border: 1px solid var(--gp-line); border-radius: 10px; overflow: hidden; }
.view-toggle .mud-button-root { border-radius: 0; min-width: 44px; }
.view-toggle .on { background: var(--gp-blue); color: #fff; }

.floor-layout { display: block; }
.floor-aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 12px; }

.zone { background: linear-gradient(180deg, #121f3a, #0f1b33); border: 1px solid var(--gp-line); border-radius: 14px; padding: 14px 16px 16px; margin-bottom: 16px; }
.zone-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.zone-head .mud-icon-root { color: var(--gp-blue-2); }
.zone-name { font-weight: 700; font-size: 1.05rem; }
.zone-count { color: var(--gp-blue-2); font-size: 0.85rem; }
.zone-head .right { margin-left: auto; font-size: 0.85rem; cursor: pointer; }

/* Zone strip: one small card per zone, the open one lit. */
/* One line each: the zone's name and its count side by side, so the strip takes little height above the stations. */
.zone-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.zone-card {
    display: flex; align-items: center; gap: 8px; padding: 4px 12px; min-height: 34px;
    border: 1px solid var(--gp-line); border-radius: 10px; background: #0c1730; color: inherit; font: inherit; text-align: left; cursor: pointer;
    transition: border-color 80ms ease, background 80ms ease;
}
.zone-card > div { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.zone-card:hover { border-color: rgba(96, 165, 250, 0.5); }
.zone-card.on { border-color: var(--gp-blue); background: rgba(59, 130, 246, 0.14); box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35) inset; }
.zone-card .mud-icon-root { color: var(--gp-blue-2); font-size: 18px; }
.zone-card b { font-size: 0.88rem; line-height: 1.2; }
.zone-card span { color: var(--gp-muted); font-size: 0.75rem; }
.zone-card .live { color: #f59e0b; font-style: normal; font-weight: 600; }

/* Four a row on a desktop screen, whatever the browser zoom; fewer as the window narrows. */
/* Seven to a row on the 1366px floor screen: the cards are a size down for it. */
.station-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1150px) { .station-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 820px) { .station-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .station-grid { grid-template-columns: 1fr; } }

.station-card {
    background: #0c1730;
    border: 1px solid var(--gp-line);
    border-radius: 10px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: transform 80ms ease, border-color 80ms ease;
}
.station-card:hover { transform: translateY(-2px); border-color: rgba(96, 165, 250, 0.45); }
.station-card.inactive { opacity: 0.5; }
.station-card.occupied { border-color: rgba(245, 158, 11, 0.5); }

.station-img {
    position: relative; height: 72px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1e3a8a, #0f2a5f);
}
.station-img .mud-icon-root { font-size: 40px; color: rgba(255, 255, 255, 0.85); }
.station-img.kind-snooker, .station-img.kind-billiards, .station-img.kind-pool { background: linear-gradient(135deg, #14532d, #052e16); }
.station-img.kind-pc { background: linear-gradient(135deg, #1e3a8a, #312e81); }
.station-img.kind-console { background: linear-gradient(135deg, #1d4ed8, #0c4a6e); }
.station-img.kind-tabletennis { background: linear-gradient(135deg, #9a3412, #7c2d12); }
.station-img.kind-boardgame { background: linear-gradient(135deg, #7e22ce, #4c1d95); }
.station-img.kind-room { background: linear-gradient(135deg, #334155, #1e293b); }

.station-chip {
    position: absolute; top: 6px; right: 6px;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 7px; border-radius: 999px; font-size: 0.64rem; font-weight: 600;
    background: rgba(7, 13, 26, 0.75); border: 1px solid rgba(255, 255, 255, 0.12);
}
.station-chip i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.station-chip.available { color: #34d399; } .station-chip.available i { background: #34d399; }
.station-chip.occupied { color: #f59e0b; } .station-chip.occupied i { background: #f59e0b; }
.station-chip.reserved { color: #60a5fa; } .station-chip.reserved i { background: #60a5fa; }
.station-chip.cleaning { color: #38bdf8; } .station-chip.cleaning i { background: #38bdf8; }
.station-chip.outofservice { color: #fbbf24; } .station-chip.outofservice i { background: #fbbf24; }

/* Code and menu on one line, the name underneath: at seven across there is no room for both. */
.station-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0 6px; margin-top: 2px; min-width: 0; }
.station-code { font-weight: 700; font-size: 0.88rem; line-height: 1.2; white-space: nowrap; order: 0; }
.station-head > .mud-icon-root { order: 1; }
.station-menu { order: 2; margin: -6px -8px -6px auto; }
.station-name { order: 3; flex: 1 0 100%; color: var(--gp-muted); font-size: 0.7rem; line-height: 1.2; margin: 2px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.station-menu .mud-button-root { width: 28px; height: 28px; }
.station-rate { font-weight: 700; font-size: 0.82rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.station-rate.none { color: var(--gp-muted); font-weight: 400; font-size: 0.72rem; }
.station-live { display: flex; align-items: baseline; justify-content: space-between; }
.station-live .timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 0.9rem; line-height: 1.2; }
.station-live .timer.paused { color: #fbbf24; font-size: 0.8rem; }
.station-live .timer.soon, .sd-timer.soon { color: #fbbf24; }
.station-live .timer.over, .sd-timer.over { color: #f87171; }
.station-live .money { font-size: 0.85rem; }
.station-live .money { color: #f87171; font-weight: 700; }
.station-meta { display: flex; align-items: center; gap: 8px; font-size: 0.68rem; line-height: 1.2; color: var(--gp-muted); }
.station-meta span { display: inline-flex; align-items: center; gap: 4px; }
.station-meta .mud-icon-root { font-size: 13px; }
.station-meta .util { color: #34d399; margin-left: auto; }
.station-actions { display: flex; gap: 6px; margin-top: 1px; }
.station-actions .mud-button-root { flex: 1 1 auto; min-width: 0; padding: 4px 6px; font-size: 0.74rem; text-transform: none; white-space: nowrap; min-height: 30px; line-height: 1.2; }
.station-actions .mud-button-root:nth-child(2) { flex: 1.6 1 auto; }

.top-station { display: flex; gap: 12px; align-items: center; }
.top-station .station-img { width: 110px; height: 72px; flex: 0 0 auto; }
.top-station .station-img .mud-icon-root { font-size: 32px; }
.top-station-code { font-weight: 700; }
.top-station-net { font-size: 1.35rem; font-weight: 800; margin-top: 4px; }


/* -- Station dialog --
   One dialog for both states. Available: players and a big green start. Occupied: the
   session as a panel, then the actions in the order a cashier reaches for them. */

.sd { display: flex; flex-direction: column; gap: 10px; padding-top: 2px; }
.sd-head { display: flex; gap: 14px; align-items: flex-start; position: relative; padding-right: 36px; }
.sd-head .station-img { width: 120px; height: 84px; flex: 0 0 auto; }
.sd-head .station-img .mud-icon-root { font-size: 38px; }
.sd-code-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sd-code { font-size: 1.35rem; font-weight: 800; line-height: 1.1; }
.sd-name { font-size: 1rem; margin-top: 2px; }
.sd-sub { color: var(--gp-blue-2); font-size: 0.85rem; }
.sd-close { position: absolute !important; right: -6px; top: -6px; }

.sd-session {
    display: grid; grid-template-columns: 1fr auto; gap: 16px;
    background: #0c1730; border: 1px solid var(--gp-line); border-radius: 12px; padding: 10px 14px;
}
.sd-session-label { color: var(--gp-blue-2); font-size: 0.85rem; }
.sd-timer { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.15; margin: 2px 0; }
.sd-session-right { border-left: 1px solid var(--gp-line); padding-left: 16px; min-width: 150px; }
.sd-running { display: flex; align-items: center; gap: 6px; color: #f87171; font-weight: 600; }
.sd-running.paused { color: #38bdf8; }
.sd-money { font-size: 1.35rem; font-weight: 800; color: #f87171; line-height: 1.1; }

.sd-actions { display: flex; flex-direction: column; gap: 8px; }
.sd-actions .mud-button-root, .sd-start.mud-button-root { min-height: 40px; font-weight: 700; letter-spacing: 0.02em; font-size: 0.85rem; }
.sd-start.mud-button-root { min-height: 46px; font-size: 0.95rem; }
.sd-row { display: flex; gap: 10px; }
.sd-row .mud-button-root { flex: 1; min-height: 38px; font-weight: 700; font-size: 0.85rem; }
.sd-detail .mud-button-label { display: flex; align-items: center; justify-content: space-between; width: 100%; }

.sd-field { display: flex; gap: 10px; align-items: flex-start; }
.sd-field .mud-button-root { min-height: 38px; font-size: 0.85rem; }
.sd-field > .mud-icon-root { margin-top: 3px; }
.sd-field-body { flex: 1; min-width: 0; }
.sd-field-body .mud-input-control { margin: 0; }
.sd-field-label { font-weight: 600; margin-bottom: 6px; font-size: 0.95rem; }
.sd-foot { display: flex; justify-content: flex-end; }
.sd-overrun { color: #f87171; font-size: 0.78rem; font-weight: 600; margin-top: 2px; }

/* Open vs fixed hours, and the block picker. */
.sd-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sd-mode {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--gp-line);
    background: #0c1730; color: #e8eef9; font: inherit; text-align: left; cursor: pointer;
}
.sd-mode .mud-icon-root { font-size: 22px; color: var(--gp-blue-2); flex: 0 0 auto; }
.sd-mode b { display: block; font-size: 0.88rem; }
.sd-mode span { color: var(--gp-muted); font-size: 0.72rem; }
.sd-mode:hover { border-color: rgba(96, 165, 250, 0.5); }
.sd-mode.on { border-color: var(--gp-blue); background: rgba(59, 130, 246, 0.14); }
.sd-mode.on .mud-icon-root { color: #60a5fa; }
.sd-mode:disabled { opacity: 0.5; cursor: not-allowed; }
.sd-mode:disabled:hover { border-color: var(--gp-line); }
.sd-durations { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.sd-duration {
    padding: 7px 8px; border-radius: 8px; border: 1px solid var(--gp-line); background: #0c1730; color: #e8eef9;
    font: inherit; text-align: center; cursor: pointer; min-width: 0;
}
.sd-duration b { display: block; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-duration span { display: block; color: var(--gp-muted); font-size: 0.7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-duration span.sd-duration-name { font-size: 0.66rem; }
.sd-duration:hover { border-color: rgba(96, 165, 250, 0.5); }
.sd-duration.on { border-color: var(--gp-blue); background: rgba(59, 130, 246, 0.16); }
.sd-duration.on span { color: #93c5fd; }

/* Seats on the start and players dialogs: P1, P2... each with a customer picker. */
.sd-seats { display: flex; flex-direction: column; gap: 6px; }
.sd-seat { display: grid; grid-template-columns: 32px 1fr 34px; gap: 8px; align-items: center; }
.sd-seat-add.mud-button-root { width: 34px; height: 34px; border: 1px dashed rgba(96, 165, 250, 0.45); border-radius: 8px; color: #93c5fd; }
.sd-seat-add.mud-button-root:hover { background: rgba(59, 130, 246, 0.14); border-style: solid; }
.sd-seat-no { font-weight: 800; font-size: 0.8rem; color: var(--gp-blue-2); }
.sd-hint { color: var(--gp-muted); font-size: 0.75rem; margin-top: 6px; }
.sd-hint.warn { color: #fbbf24; }
.sd-hint.ok { color: #34d399; }
.sd-players { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; font-size: 0.85rem; }
.sd-player b { color: var(--gp-blue-2); font-size: 0.75rem; margin-right: 2px; }
.sd-player.walkin { color: var(--gp-muted); }
.sd-foot .mud-link { font-weight: 600; }


/* -- Station pictures -- */

.station-img { overflow: hidden; }
.station-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.station-img .station-chip { z-index: 1; }

.pic-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; max-height: 300px; overflow-y: auto; padding: 2px; }
.pic { position: relative; aspect-ratio: 2 / 1; border-radius: 8px; overflow: hidden; border: 2px solid transparent; cursor: pointer; background: #0c1730; }
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pic:hover { border-color: rgba(96, 165, 250, 0.5); }
.pic.on { border-color: var(--gp-blue); box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35); }
.pic-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 6px; font-size: 0.68rem; background: linear-gradient(transparent, rgba(7, 13, 26, 0.85)); color: #e8eef9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pic-del { position: absolute !important; top: 2px; right: 2px; background: rgba(7, 13, 26, 0.7) !important; }


/* Station insights: ranked stations. */
.rank-row { display: grid; grid-template-columns: 24px 70px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--gp-line); font-size: 0.9rem; }
.rank-row:last-child { border-bottom: none; }
.rank-code { font-weight: 700; }
.rank-name { color: var(--gp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-net { font-weight: 700; font-variant-numeric: tabular-nums; }


/* -- Customers -- */

/* Panels stretch to fill a grid cell; one sitting directly on the page must not. */
.page > .panel, .page > div > .panel:only-child { height: auto; }
/* One row at 1366px: the search takes whatever the pickers and buttons leave. */
.cust-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; padding: 10px 14px; height: auto; }
.cust-toolbar .search { flex: 1 1 150px; min-width: 140px; }
.cust-toolbar .pick { flex: 0 1 124px; min-width: 110px; }
.cust-toolbar .pick .mud-input { font-size: 0.85rem; }
.cust-toolbar .search .mud-input { font-size: 0.85rem; }
.cust-toolbar .mud-checkbox { white-space: nowrap; flex: 0 0 auto; }
.cust-toolbar .mud-checkbox .mud-typography { font-size: 0.82rem; }
.cust-toolbar .mud-checkbox .mud-button-root { padding: 4px; }
.cust-toolbar .mud-button-root { white-space: nowrap; flex: 0 0 auto; padding: 6px 10px; font-size: 0.76rem; min-width: 0; }
.cust-toolbar .mud-button-root .mud-button-icon-start { margin-right: 6px; margin-left: -2px; }
@media (max-width: 1100px) { .cust-toolbar { flex-wrap: wrap; } }
.cust-toolbar .mud-input-control { margin: 0; }
.cust-toolbar .mud-checkbox { margin: 0; }

.cust-table .mud-table-cell { padding: 10px 12px; }
.cust-cell { display: flex; align-items: center; gap: 10px; }
.cust-avatar {
    width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; color: #fff; font-size: 0.95rem;
}
.cust-avatar.lg { width: 60px; height: 60px; font-size: 1.6rem; }
.cust-avatar.sm { width: 28px; height: 28px; font-size: 0.8rem; }
.cust-name { font-weight: 600; }

.tier-chip { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; background: rgba(148, 163, 184, 0.18); color: #cbd5e1; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.status-chip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-chip.active { background: rgba(52, 211, 153, 0.14); color: #34d399; } .status-chip.active i { background: #34d399; }
.status-chip.account { background: rgba(96, 165, 250, 0.16); color: #93c5fd; } .status-chip.account i { background: #60a5fa; }
.status-chip.credit { background: rgba(34, 211, 238, 0.14); color: #67e8f9; } .status-chip.credit i { background: #22d3ee; }
.imp-steps { display: grid; gap: 8px; }
.imp-step { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.imp-row.imp-error td { color: #fca5a5; }
.imp-row.imp-unchanged td { opacity: .6; }
.imp-problem { color: #fca5a5; }

/* Data migration */
.mig-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; }
@media (max-width: 960px) { .mig-grid { grid-template-columns: minmax(0, 1fr); } }
.mig-title { font-weight: 700; }
.mig-setup { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mig-setup .mig-switch { flex: 0 1 190px; }
.mig-setup .mig-old-system { flex: 1 1 200px; }
.mig-file { font-size: 0.8rem; margin-left: 8px; }
.mig-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.mig-steps li { padding-left: 2px; }
.mig-steps li > span:first-child { margin-right: 6px; }
.mig-steps .mud-button-root { vertical-align: middle; }
.mig-verdict { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; margin: 10px 0 6px; }
.mig-verdict.ready { background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.35); }
.mig-verdict.ready > .mud-icon-root { color: #34d399; }
.mig-verdict.not-ready { background: rgba(248, 113, 113, 0.10); border: 1px solid rgba(248, 113, 113, 0.35); }
.mig-verdict.not-ready > .mud-icon-root { color: #f87171; }
.mig-verdict-sub { font-size: 0.8rem; }
.mig-issues td, .mig-totals td, .mig-days td { font-size: 0.82rem; vertical-align: top; }
.mig-issue-sheet { white-space: nowrap; }
.mig-issue-rows { white-space: nowrap; color: var(--gp-muted); }
.mig-totals td.num, .mig-totals th.num, .mig-days td.num, .mig-days th.num { text-align: right; font-variant-numeric: tabular-nums; }
.mig-totals tr.off td { color: #f87171; font-weight: 600; }
.mig-batch-table td { font-size: 0.82rem; }

/* Old records */
.old-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.old-filters .old-search { flex: 1 1 280px; }
.old-filters .old-date { flex: 0 1 170px; }
.old-filters .old-batch { flex: 0 1 200px; }
.old-summary { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 0.85rem; }
.old-figure b { font-variant-numeric: tabular-nums; margin-left: 4px; }
.old-figure.owed b, .old-table td.owed, .old-history-figures .owed b, .old-owed b { color: #f87171; }
.old-paging { display: inline-flex; align-items: center; gap: 2px; font-size: 0.8rem; }
.old-scroll { overflow: auto; max-height: calc(100vh - 300px); }
.old-table td, .old-lines td, .old-payments td, .old-purchase-lines td, .old-history-table td { font-size: 0.82rem; }
.old-table td.num, .old-table th.num, .old-lines .num, .old-payments .num, .old-purchase-lines .num, .old-history-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.old-table .nowrap, .old-lines .nowrap, .old-payments .nowrap, .old-history-table .nowrap { white-space: nowrap; }
.old-link { font-weight: 600; }
.old-history-figures { display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.85rem; }
.old-history-scroll { overflow: auto; max-height: 320px; }
.report-both { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-radius: 10px;
    border: 1px solid rgba(96, 165, 250, 0.35); background: rgba(96, 165, 250, 0.08); font-size: 0.88rem; }
.old-report-table td { font-size: 0.82rem; }
.old-report-table td.num, .old-report-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.old-report-table td.owed { color: #f87171; }
.old-report-scroll { overflow: auto; max-height: 360px; }
.dash-last-year b { margin-left: 4px; }
.dash-last-year .up { color: #34d399; font-weight: 600; margin-left: 6px; }
.dash-last-year .down { color: #f87171; font-weight: 600; margin-left: 6px; }
.mig-batch-check-table td.num, .mig-batch-check-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.mig-batch-table td.num, .mig-batch-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.mig-lines td, .mig-match-table td { font-size: 0.82rem; }
.mig-match-table td.num, .mig-match-table th.num { text-align: right; }
/* Opening balances (data migration step 6). */
.mig-open-tabs td, .mig-openings-kept td { font-size: 0.82rem; }
.mig-open-tabs td.num, .mig-open-tabs th.num, .mig-openings-kept td.num, .mig-openings-kept th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cp-tab-opening, .pending-opening { font-weight: 600; color: var(--mud-palette-text-secondary); white-space: nowrap; }
.pcr-short { margin: 6px 0 2px; padding: 6px 10px; border-radius: 8px; background: rgba(248, 113, 113, 0.14); color: #fca5a5; font-size: 13px; }
/* An order line the counter unticked: it stays off the bill. */
.pcr-pick { width: 20px; height: 20px; margin: 0 8px 0 0; flex: none; accent-color: var(--mud-palette-success); cursor: pointer; align-self: center; }
.kds-line.pcr-left-out > b, .kds-line.pcr-left-out > span, span.pcr-left-out { text-decoration: line-through; opacity: .5; }

.pcr-at-counter { margin: 6px 0 2px; padding: 4px 10px; border-radius: 8px; background: rgba(251, 191, 36, 0.14); color: #fde68a; font-size: 13px; font-weight: 600; }
.pcr-short b { color: #fecaca; }
.pcr-short-hint { font-size: 11px; opacity: .8; margin-top: 2px; }
.status-chip.restricted { background: rgba(248, 113, 113, 0.16); color: #fca5a5; } .status-chip.restricted i { background: #f87171; }
.wl-split { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 8px; font-size: 0.85rem; color: #c7d2e6; }
.wl-split b { color: #93c5fd; }
.status-chip.deactivated { background: rgba(248, 113, 113, 0.14); color: #f87171; } .status-chip.deactivated i { background: #f87171; }
.status-chip.warn { background: rgba(251, 191, 36, 0.14); color: #fbbf24; } .status-chip.warn i { background: #fbbf24; }
.status-chip.running { background: rgba(245, 158, 11, 0.16); color: #f59e0b; } .status-chip.running i { background: #f59e0b; }

/* Details dialog */
.cd { display: flex; flex-direction: column; gap: 8px; }
.cd-head { display: flex; align-items: center; }
.cd-top { display: grid; grid-template-columns: 1fr 250px; gap: 10px; }
@media (max-width: 700px) { .cd-top { grid-template-columns: 1fr; } }
.cd-identity { display: flex; gap: 12px; align-items: center; background: #0c1730; border: 1px solid var(--gp-line); border-radius: 10px; padding: 10px 12px; }
.cd-name { font-size: 1.15rem; font-weight: 800; }
.cd-since { color: var(--gp-muted); font-size: 0.78rem; margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.cd-actions { display: flex; flex-direction: column; gap: 6px; }
.cd-actions .mud-button-root { white-space: nowrap; font-size: 0.75rem; min-height: 32px; padding: 4px 10px; }
.cd-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 14px; background: #0c1730; border: 1px solid var(--gp-line); border-radius: 10px; padding: 8px 12px; }
.cd-stats.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 700px) { .cd-stats, .cd-stats.two { grid-template-columns: 1fr; } }
.cd-stat { display: flex; gap: 8px; align-items: flex-start; }
.cd-stat > .mud-icon-root { color: var(--gp-blue-2); margin-top: 1px; font-size: 18px; }
.cd-label { color: var(--gp-muted); font-size: 0.7rem; }
.cd-value { font-weight: 600; font-size: 0.88rem; }
.cd-notes { display: grid; grid-template-columns: 20px 50px 1fr; gap: 8px; align-items: center; }
.cd-notes > .mud-icon-root { color: var(--gp-blue-2); }
.cd-notes-box { background: #0c1730; border: 1px solid var(--gp-line); border-radius: 8px; padding: 6px 10px; white-space: pre-wrap; min-height: 32px; font-size: 0.85rem; }
.cd-activity { display: flex; flex-direction: column; gap: 4px; }
.cd-activity-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; font-size: 0.8rem; }
.cd-activity-row > .mud-icon-root { color: var(--gp-blue-2); }

/* Slide-in panel from the right */
.side-backdrop { display: none; position: fixed; inset: 0; background: rgba(7, 13, 26, 0.6); z-index: 1250; }
.side-backdrop.open { display: block; }
.side-panel {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100vw);
    background: linear-gradient(180deg, #121f3a, #0f1b33); border-left: 1px solid var(--gp-line);
    z-index: 1260; display: flex; flex-direction: column;
    transform: translateX(100%); transition: transform 0.22s ease;
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.45);
}
.side-panel.open { transform: translateX(0); }
.side-head { display: flex; align-items: flex-start; padding: 22px 24px 12px; }
.side-body { flex: 1; overflow-y: auto; padding: 8px 24px; display: flex; flex-direction: column; gap: 16px; }
.side-field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.95rem; }
.side-field .req { color: #f87171; }
.side-field .mud-input-control { margin: 0; }
.side-counter { text-align: right; font-size: 0.72rem; color: var(--gp-muted); margin-top: 2px; }
.side-foot { display: flex; gap: 10px; padding: 16px 24px 22px; border-top: 1px solid var(--gp-line); }
.side-foot .mud-button-root { min-height: 46px; }

/* Six headline cards on one line: a fixed six-column grid, each card a size down so the
   dirham amounts still fit at 1366px. Below tablet width they fall to three, then two. */
.stat-row.six { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.stat-row.six .stat { padding: 14px; gap: 10px; min-height: 92px; }
.stat-row.six .stat-icon { width: 46px; height: 46px; border-radius: 12px; }
.stat-row.six .stat-icon .mud-icon-root { font-size: 24px; }
.stat-row.six .stat-value { font-size: 1.3rem; }
.stat-row.six .stat-label { font-size: 0.78rem; line-height: 1.2; }
.stat-row.six .stat-change, .stat-row.six .stat-hint { font-size: 0.7rem; margin-top: 4px; }
@media (max-width: 1280px) { .stat-row.six { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .stat-row.six { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mini-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.mini-table th { text-align: left; color: var(--gp-muted); font-weight: 500; font-size: 0.75rem; padding: 4px 6px; border-bottom: 1px solid var(--gp-line); }
.mini-table td { padding: 7px 6px; border-bottom: 1px solid rgba(30, 45, 77, 0.6); }
.mini-table tr:last-child td { border-bottom: none; }

.cd .tier-chip { padding: 2px 10px; font-size: 0.7rem; }
.cd .status-chip { padding: 3px 10px; font-size: 0.72rem; }
.cd .panel-head .panel-title { font-size: 0.95rem; }
.cd-dialog-content.mud-dialog-content { padding: 14px 18px 12px; }


/* -- Bill detail -- */

.tk-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.tk-h1 { margin: 0; font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; }
.tk-tag {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 8px;
    border: 1px solid var(--gp-line); background: #0c1730; color: #e8eef9; font: inherit; font-weight: 600; font-size: 0.82rem;
}
.tk-tag.inv { color: #93c5fd; border-color: rgba(96, 165, 250, 0.35); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.tk-tag.btn { cursor: pointer; }
.tk-tag.btn:hover { border-color: rgba(96, 165, 250, 0.5); }
.tk-tag .mud-icon-root { font-size: 17px; }
.tk-top .ml-auto { margin-left: auto; }
.bill-chip.settled { color: #60a5fa; border-color: rgba(59, 130, 246, 0.4); background: rgba(59, 130, 246, 0.12); }
.bill-chip.voided { color: #f87171; border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.12); }
.bill-chip.lg { padding: 5px 12px; font-size: 0.82rem; }
.bill-chip.lg .mud-icon-root { font-size: 15px; }

.tk-strip {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    background: #0c1730; border: 1px solid var(--gp-line); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px;
}
.tk-cell { display: flex; gap: 10px; align-items: flex-start; padding: 0 14px; border-left: 1px solid var(--gp-line); min-width: 0; }
.tk-cell:first-child { border-left: none; padding-left: 0; }
.tk-cell > .mud-icon-root { font-size: 24px; color: #c7d2e5; margin-top: 2px; }
.tk-cell-label { color: var(--gp-muted); font-size: 0.75rem; }
.tk-cell-value { font-weight: 700; font-size: 0.92rem; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-cell-sub { color: var(--gp-muted); font-size: 0.75rem; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { .tk-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; } .tk-cell:nth-child(3) { border-left: none; padding-left: 0; } }

/* The bill fills the window: header and strip on top, then the Order and Total cards share
   the remaining height, the order lines scrolling inside their card. No page scroll. */
.tk-page { display: flex; flex-direction: column; height: calc(100vh - 86px); min-height: 520px; }
.tk-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: stretch; flex: 1; min-height: 0; }
@media (max-width: 1100px) { .tk-page { height: auto; } .tk-main { grid-template-columns: 1fr; } }
.tk-main .panel { height: auto; }
.tk-col { display: flex; flex-direction: column; min-height: 0; }
.tk-col > .panel:first-child { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: auto; }
.tk-col > .panel:first-child > .tk-lines { flex: 1; min-height: 0; max-height: none; }
.tk-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.tk-head .panel-title { font-size: 1.05rem; }
.tk-head .grow { flex: 1; }
.tk-head .mud-button-root { min-height: 34px; text-transform: none; font-weight: 600; font-size: 0.8rem; padding: 4px 12px; }

/* The order list scrolls inside its panel so the totals column and the page header stay put on a long bill. */
.tk-lines { overflow: auto; max-height: calc(100vh - 362px); min-height: 220px; }
.tk-lines .tk-table thead th { position: sticky; top: 0; z-index: 1; background: var(--gp-panel); }
.tk-table { width: 100%; border-collapse: collapse; }
.tk-table th { text-align: left; color: #c7d2e5; font-weight: 600; font-size: 0.78rem; padding: 7px 10px; border-bottom: 1px solid var(--gp-line); }
.tk-table td { padding: 8px 10px; border-bottom: 1px solid rgba(30, 45, 77, 0.6); vertical-align: middle; font-size: 0.85rem; }
.tk-table tr:last-child td { border-bottom: none; }
.tk-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.tk-table .ctr { text-align: center; }
.tk-table tr.void td { opacity: 0.45; text-decoration: line-through; }
.tk-line-name { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.tk-line-sub { color: var(--gp-muted); font-size: 0.74rem; margin-top: 1px; }
.tk-line-time { font-size: 0.74rem; margin-top: 1px; font-variant-numeric: tabular-nums; }
.tk-kind { padding: 1px 8px; border-radius: 999px; font-size: 0.66rem; font-weight: 600; }
.tk-kind.time { background: rgba(59, 130, 246, 0.18); color: #60a5fa; }
.tk-kind.fnb { background: rgba(167, 139, 250, 0.18); color: #a78bfa; }
.tk-kind.pay-counter { background: rgba(251, 191, 36, 0.16); color: #fbbf24; }
.tk-kind.counter { background: rgba(148, 163, 184, 0.18); color: #cbd5e1; }
.tk-empty { color: var(--gp-muted); padding: 24px 0; text-align: center; }

.tk-total-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.tk-row { display: flex; justify-content: space-between; align-items: baseline; padding: 3px 0; font-size: 0.88rem; }
.tk-row .v { font-variant-numeric: tabular-nums; }
.tk-row.muted { color: var(--gp-muted); }
.tk-row.good { color: #34d399; }
.tk-row.roundoff { color: #60a5fa; }
.tk-grand { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0 4px; border-top: 1px solid var(--gp-line); margin-top: 4px; }
.tk-grand .l { font-size: 1.05rem; font-weight: 700; }
.tk-grand .v { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.tk-grand .v.due { color: #fbbf24; }
.tk-grand .v.ok { color: #34d399; }
.tk-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.tk-actions .mud-button-root { min-height: 36px; font-weight: 700; letter-spacing: 0.02em; font-size: 0.82rem; }
.tk-actions-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tk-actions-row .mud-button-root { padding: 4px 6px; font-size: 0.76rem; white-space: nowrap; }
.tk-actions-row .mud-button-root .mud-button-icon-start { margin-right: 4px; }
.tk-actions .mud-button-root.tk-settle { min-height: 44px; font-size: 0.95rem; }
.tk-actions .tk-void.mud-button-root { min-height: 32px; }
.tk-danger-row { display: flex; gap: 6px; }
.tk-danger-row .mud-button-root { flex: 1; min-height: 32px; font-size: 0.74rem; line-height: 1.15; }
.tk-danger-row .tk-merge.mud-button-root { color: #93c5fd; }
.tk-merge-list { display: flex; flex-direction: column; gap: 6px; }
.tk-merge-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; text-align: left; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(30, 45, 77, 0.9); background: rgba(15, 23, 42, 0.6); color: inherit; cursor: pointer; font: inherit; }
.tk-merge-row:hover { border-color: rgba(96, 165, 250, 0.5); }
.tk-merge-row.on { border-color: #60a5fa; background: rgba(96, 165, 250, 0.12); }
.tk-merge-row .n { font-weight: 700; }
.tk-merge-row .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--gp-muted, #94a3b8); font-size: 0.8rem; }
.tk-merge-row .st { font-size: 0.72rem; color: #60a5fa; white-space: nowrap; }
.tk-merge-row .amt { font-weight: 700; font-variant-numeric: tabular-nums; }

/* -- Add items -- */

.mi-left, .mi-right { min-height: 0; overflow: hidden; }
.mi-left { padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; border-right: 1px solid var(--gp-line); }
.mi-head { display: flex; align-items: flex-start; gap: 16px; }
.mi-title { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; }
.mi-sub { color: var(--gp-muted); margin-top: 2px; font-size: 0.85rem; }
.mi-bill { margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 6px 12px; font-size: 0.85rem; border: 1px solid var(--gp-line); border-radius: 10px; background: #0c1730; white-space: nowrap; }
.mi-bill .mud-icon-root { font-size: 22px; }
.mi-bill b { display: block; }
.mi-bill span { color: var(--gp-blue-2); font-size: 0.85rem; }
.mi-search .mud-input-control { margin: 0; }
.mi-left > .mud-input-control { flex: 0 0 auto; margin: 0; }
.mi-cats { display: flex; gap: 10px; flex-wrap: wrap; }
.mi-cat {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 8px;
    border: 1px solid var(--gp-line); background: #0c1730; color: #e8eef9; font: inherit; font-weight: 600; font-size: 0.82rem; cursor: pointer;
}
.mi-cat .mud-icon-root { font-size: 17px; }
.mi-cat:hover { border-color: rgba(96, 165, 250, 0.5); }
.mi-cat.on { background: var(--gp-blue); border-color: var(--gp-blue); color: #fff; }
.mi-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-right: 6px; display: flex; flex-direction: column; gap: 12px; }
.mi-sec-title { font-size: 0.95rem; font-weight: 700; color: #60a5fa; display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.mi-sec-title span { font-weight: 500; }
.mi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px; }
.mi-card { display: flex; gap: 8px; padding: 7px; border: 1px solid var(--gp-line); border-radius: 10px; background: #0c1730; }
.mi-card.out { opacity: 0.45; }
.mi-img {
    width: 50px; height: 50px; border-radius: 8px; flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center; background: rgba(59, 130, 246, 0.16);
}
.mi-img .mud-icon-root { font-size: 26px; color: #fff; opacity: 0.9; }
.mi-img.has-pic { overflow: hidden; }
.mi-img.has-pic > img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.mi-img.sm { width: 40px; height: 40px; }
.mi-img.sm .mud-icon-root { font-size: 20px; }
.mi-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mi-name { font-weight: 600; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-catname { color: var(--gp-blue-2); font-size: 0.72rem; }
.mi-price-row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 3px; }
.mi-price { color: #60a5fa; font-weight: 700; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.mi-add.mud-button-root { background: var(--gp-blue); color: #fff; width: 26px; height: 26px; }
.mi-add.mud-button-root:hover { background: #2563eb; }
.mi-add.mud-button-root .mud-icon-root { font-size: 17px; }
.mi-variants { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.mi-var { font: inherit; font-size: 0.72rem; padding: 2px 8px; border-radius: 999px; border: 1px dashed rgba(96, 165, 250, 0.5); background: transparent; color: #cbd5e1; cursor: pointer; }
.mi-var:hover { background: rgba(59, 130, 246, 0.16); }
.mi-out { font-size: 0.72rem; color: #f87171; }

.mi-right { padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 8px; position: relative; background: #0a1226; }
.mi-close { position: absolute !important; top: 14px; right: 14px; }
.mi-cart { border: 1px solid var(--gp-line); border-radius: 10px; padding: 10px; background: #0c1730; display: flex; flex-direction: column; gap: 8px; margin-top: 30px; flex: 1; min-height: 0; }
.mi-cart-head { display: flex; align-items: center; justify-content: space-between; font-size: 0.95rem; font-weight: 700; }
.mi-count { padding: 2px 10px; border-radius: 999px; background: rgba(59, 130, 246, 0.18); color: #60a5fa; font-size: 0.75rem; font-weight: 600; }
.mi-lines { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.mi-line { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding-bottom: 6px; border-bottom: 1px solid rgba(30, 45, 77, 0.6); }
.mi-line:last-child { border-bottom: none; padding-bottom: 0; }
.mi-line-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.mi-qty { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--gp-line); border-radius: 8px; }
.mi-qty .mud-button-root { width: 24px; height: 24px; }
.mi-qty .mud-button-root .mud-icon-root { font-size: 14px; }
.mi-qty span { min-width: 20px; text-align: center; font-weight: 700; font-size: 0.85rem; }
.mi-line-amt { color: #60a5fa; font-weight: 700; font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.mi-line-del.mud-button-root { width: 26px; height: 26px; color: #f87171; }
.mi-line-del.mud-button-root .mud-icon-root { font-size: 16px; }
.mi-empty { color: var(--gp-muted); text-align: center; padding: 30px 10px; font-size: 0.9rem; }
.mi-sum { border-top: 1px solid var(--gp-line); padding-top: 8px; }
.mi-sum .tk-row { padding: 3px 0; font-size: 0.9rem; }
.mi-sum-total { display: flex; justify-content: space-between; align-items: baseline; padding: 7px 10px; margin-top: 4px; border-radius: 10px; background: #0a1226; border: 1px solid var(--gp-line); }
.mi-sum-total .l { font-weight: 700; font-size: 0.92rem; }
.mi-sum-total .v { font-weight: 800; font-size: 1.15rem; color: #60a5fa; font-variant-numeric: tabular-nums; }
.mi-kitchen {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 14px; border-radius: 10px; border: none;
    background: linear-gradient(90deg, #16a34a, #22c55e); color: #fff; font: inherit; text-align: left; cursor: pointer;
}
.mi-kitchen:disabled { opacity: 0.4; cursor: not-allowed; }
.mi-kitchen .mud-icon-root { font-size: 24px; }
.mi-kitchen b { display: block; font-size: 0.95rem; }
.mi-kitchen span { font-size: 0.75rem; opacity: 0.9; }
.mi-kitchen .chev { margin-left: auto; }
.mi-right .mud-button-root { min-height: 38px; font-weight: 700; text-transform: none; font-size: 0.88rem; }
.mi-note { display: flex; align-items: center; gap: 6px; color: var(--gp-muted); font-size: 0.72rem; }
.mi-note .mud-icon-root { font-size: 18px; color: var(--gp-blue-2); }
@media (max-width: 1000px) { .mi { grid-template-columns: 1fr; height: auto; } .mi-left { border-right: none; } .mi-right { padding-top: 48px; } .mi-scroll { max-height: 50vh; } }


/* -- Venue settings -- */

.vs-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 1500px) { .vs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.vs-actions { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
@media (max-width: 1150px) { .vs-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .vs-grid { grid-template-columns: 1fr; } }
.vs-grid .panel { height: auto; }
.vs-grid .panel-head .mud-icon-root { font-size: 26px; }
.vs-radios { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 12px; }
.vs-radios .mud-radio { align-items: flex-start; }
.vs-hint { color: var(--gp-muted); font-size: 0.78rem; margin-top: 2px; line-height: 1.35; }
.vs-kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(30, 45, 77, 0.6); font-size: 0.9rem; }
.vs-kv span { color: var(--gp-muted); }
.vs-links { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; }


/* -- Drawer -- */

.dr-main { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 14px; align-items: start; }
@media (max-width: 1100px) { .dr-main { grid-template-columns: 1fr; } }
.dr-left, .dr-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.dr-main .panel { height: auto; }

.dr-hero { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.dr-hero-icon { width: 46px; height: 46px; border-radius: 50%; background: rgba(59, 130, 246, 0.16); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.dr-hero-icon .mud-icon-root { font-size: 24px; color: #60a5fa; }
.dr-hero-icon.small { width: 38px; height: 38px; }
.dr-hero-icon.small .mud-icon-root { font-size: 20px; }
.dr-hero-title { font-size: 1.25rem; font-weight: 800; line-height: 1.2; }
.dr-hero-sub { color: var(--gp-blue-2); font-size: 0.85rem; margin-top: 4px; line-height: 1.4; }
.dr-field-label { font-size: 0.85rem; font-weight: 600; margin: 8px 0 4px; }
.dr-field-label span { color: #f87171; }
.dr-field-label .opt { color: var(--gp-muted); font-weight: 400; }
.dr-input.mud-input-control { margin: 0; }
.dr-static { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--gp-line); border-radius: 8px; background: #0c1730; font-size: 0.9rem; }
.dr-static .mud-icon-root { font-size: 18px; color: var(--gp-muted); }
.dr-last { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--gp-line); border-radius: 10px; background: #0c1730; padding: 10px 12px; margin-top: 14px; }
.dr-last-cell { display: flex; gap: 8px; align-items: flex-start; padding: 0 10px; border-left: 1px solid var(--gp-line); min-width: 0; }
.dr-last-cell:first-child { border-left: none; padding-left: 0; }
.dr-last-cell .mud-icon-root { font-size: 18px; color: var(--gp-blue-2); margin-top: 2px; }
.dr-last-label { color: var(--gp-muted); font-size: 0.72rem; }
.dr-last-value { font-weight: 700; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-last-value.ok { color: #34d399; }
.dr-last-value.bad { color: #f87171; }
.dr-open.mud-button-root { min-height: 42px; font-weight: 700; text-transform: none; font-size: 0.95rem; margin-top: 12px; }

.dr-shift-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.dr-shift-head .ml-auto { margin-left: auto; }
.dr-shift-title { font-size: 1.1rem; font-weight: 800; line-height: 1.2; }
.dr-shift-sub { color: var(--gp-muted); font-size: 0.8rem; }
.dr-rows { border-top: 1px solid var(--gp-line); padding-top: 4px; }
.tk-row.warn { color: #fbbf24; }
.dr-hint { color: var(--gp-muted); font-size: 0.8rem; margin-top: 4px; line-height: 1.4; }
.dr-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.dr-actions .mud-button-root { flex: 1 1 auto; min-height: 34px; text-transform: none; font-weight: 600; font-size: 0.8rem; padding: 4px 10px; }

.dr-panel-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.dr-panel-head .mud-icon-root { font-size: 22px; }
.dr-panel-date { margin-left: auto; color: var(--gp-muted); font-size: 0.8rem; }
.dr-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dr-tile { display: block; padding: 12px 14px; border: 1px solid var(--gp-line); border-radius: 10px; background: #0c1730; color: inherit; text-decoration: none; }
.dr-tile:hover { border-color: rgba(96, 165, 250, 0.5); }
.dr-tile .mud-icon-root { font-size: 24px; }
.dr-tile-label { color: #c7d2e5; font-size: 0.85rem; margin-top: 6px; }
.dr-tile-value { font-size: 1.5rem; font-weight: 800; line-height: 1.1; margin-top: 2px; }
.dr-checks { display: flex; flex-direction: column; gap: 6px; }
.dr-check { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; }
.dr-check .mud-icon-root { font-size: 20px; }
.dr-check.ok .mud-icon-root { color: #34d399; }
.dr-check.warn .mud-icon-root { color: #fbbf24; }
.dr-check.info .mud-icon-root { color: #60a5fa; }
.dr-note { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px; border-radius: 8px; background: #0c1730; border: 1px solid var(--gp-line); color: var(--gp-muted); font-size: 0.78rem; }
.dr-note .mud-icon-root { font-size: 16px; color: var(--gp-blue-2); flex: 0 0 auto; }
.dr-close-day.mud-button-root { min-height: 40px; font-weight: 700; text-transform: none; margin-top: 10px; }
.dr-table th, .dr-table td { padding: 6px 8px; font-size: 0.8rem; white-space: nowrap; }
.dr-table td.ok { color: #34d399; }
.dr-table td.bad { color: #f87171; }

.dr-history.mud-button-root { min-height: 40px; border-color: var(--gp-line); border-radius: 10px; text-transform: none; font-weight: 600; }
.pill.green { color: #34d399; border-color: rgba(52, 211, 153, 0.45); background: rgba(52, 211, 153, 0.12); }
.dh-table th, .dh-table td { white-space: nowrap; padding: 8px 10px; font-size: 0.85rem; }
.dh-row { cursor: pointer; }
.dh-row:hover td { background: rgba(59, 130, 246, 0.06); }
.dh-table td.ok { color: #34d399; }
.dh-table td.bad { color: #f87171; font-weight: 700; }


/* -- Settle dialog -- */

.mud-dialog.st-dialog { max-width: 720px; border-radius: 14px; }
.st-content.mud-dialog-content { padding: 16px 18px 14px; }
.st { display: flex; flex-direction: column; gap: 10px; }
.st-head { display: flex; align-items: center; gap: 10px; }
.st-head .ml-auto { margin-left: auto; }
.st-title { font-size: 1.25rem; font-weight: 800; }
.st-due { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 10px; background: #0c1730; border: 1px solid var(--gp-line); }
.st-due-label { font-weight: 700; font-size: 1rem; }
.st-due-sub { color: var(--gp-muted); font-size: 0.78rem; }
.st-due-value { font-size: 1.6rem; font-weight: 800; color: #60a5fa; font-variant-numeric: tabular-nums; }
.tk-needs-customer { color: #fbbf24; font-weight: 600; }
.st-warn { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(251, 191, 36, 0.45); background: rgba(251, 191, 36, 0.1); font-size: 0.82rem; }
.st-warn > .mud-icon-root { color: #fbbf24; font-size: 22px; flex: 0 0 auto; }
.st-warn b { color: #fbbf24; display: block; }
.st-warn div div { color: #c7d2e5; }
.st-warn .mud-button-root { min-height: 32px; text-transform: none; font-weight: 600; font-size: 0.78rem; border-color: rgba(96, 165, 250, 0.5); color: #60a5fa; white-space: nowrap; flex: 0 0 auto; }
.st-section { font-weight: 700; font-size: 0.92rem; margin-top: 2px; }
.st-way-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; }
.st-many-ways { cursor: pointer; font: inherit; font-size: 0.78rem; font-weight: 600; color: #e8eef9; }
.st-tenders { display: flex; flex-direction: column; gap: 8px; }
.st-tender { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--gp-line); background: #0c1730; }
.st-tender.on { border-color: var(--gp-blue); }
.st-tender.off { opacity: 0.55; }
.st-tender-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; font-size: 0.85rem; }
.st-tender-name .mud-icon-root { font-size: 20px; color: var(--gp-blue-2); flex: 0 0 auto; }
.st-tender-ref { grid-column: 1 / -1; }
.st-tender-rest:disabled { opacity: 0.45; cursor: default; }
.st-tender-sum { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-top: 8px; font-size: 0.85rem; }
.st-tender-sum .good { color: #34d399; }
.st-tender-sum .left { color: #fbbf24; }

/* Invoices → Record payment: a box per method, and the bills whose players still need a name. */
.inv-tenders { display: flex; flex-direction: column; gap: 6px; }
.inv-tender { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 10px; border: 1px solid var(--gp-line); background: #0c1730; }
.inv-tender.on { border-color: var(--gp-blue); }
.inv-tender-name { font-weight: 600; font-size: 0.85rem; }
.inv-tender-ref { grid-column: 1 / -1; }
.inv-tender .mud-input-control { margin: 0; }
.inv-who { border: 1px solid rgba(251, 191, 36, 0.45); background: rgba(251, 191, 36, 0.08); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; }
.inv-who-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: #fde68a; }
.inv-who-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.inv-people { border: 1px solid rgba(96, 165, 250, 0.45); background: rgba(59, 130, 246, 0.08); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; }
.inv-people-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: #bfdbfe; margin-bottom: 2px; }
.inv-people-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.inv-people:not(.many) { border-color: var(--gp-line); background: #0c1730; }
.inv-people-bills { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: -2px 0 4px; }
.inv-bill-change { background: none; border: 0; padding: 0; color: #93c5fd; font: inherit; font-size: 0.78rem; cursor: pointer; }
.inv-bill-change:hover u { color: #bfdbfe; }
.st-paidby { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--gp-line); background: #0c1730; margin: 8px 0; }
.st-paidby > .mud-icon-root { color: var(--gp-blue-2); font-size: 22px; }
.st-paidby-label { color: var(--gp-muted); font-size: 0.8rem; }
.st-paidby-name { font-size: 0.95rem; }
.st-paidby-sub { color: var(--gp-muted); font-size: 0.75rem; }
.inv-first { border: 1px solid rgba(251, 191, 36, 0.45); background: rgba(251, 191, 36, 0.06); border-radius: 10px; padding: 8px 10px; }
.st-methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.st-method {
    display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--gp-line);
    background: #0c1730; color: #e8eef9; font: inherit; font-weight: 600; font-size: 0.85rem; cursor: pointer; text-align: left;
}
.st-method .mud-icon-root { font-size: 20px; color: var(--gp-blue-2); }
.st-method:hover:not(:disabled) { border-color: rgba(96, 165, 250, 0.5); }
.st-method.on { background: var(--gp-blue); border-color: var(--gp-blue); color: #fff; }
.st-method.on .mud-icon-root { color: #fff; }
.st-method:disabled { opacity: 0.4; cursor: not-allowed; }
.st-body { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; align-items: start; }
@media (max-width: 640px) { .st-body { grid-template-columns: 1fr; } .st-methods { grid-template-columns: 1fr 1fr; } }
.st-details .dr-field-label { margin-top: 6px; }
.st-summary { border-left: 1px solid var(--gp-line); padding-left: 16px; }
.st-summary .st-section { margin-bottom: 4px; }
.st-summary .tk-row { padding: 3px 0; font-size: 0.85rem; }
.st-summary .tk-grand { padding: 8px 0 0; margin-top: 4px; }
.st-summary .tk-grand .l { font-size: 0.95rem; }
.st-summary .tk-grand .v { font-size: 1.3rem; }
.st-shortcuts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.st-chip { font: inherit; font-size: 0.78rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--gp-line); background: #0c1730; color: #e8eef9; cursor: pointer; }
.st-chip:hover { border-color: rgba(96, 165, 250, 0.5); }
.st-chip.on { background: rgba(59, 130, 246, 0.2); border-color: var(--gp-blue); color: #60a5fa; }
.st-note { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 10px; border-radius: 8px; background: #0c1730; border: 1px solid var(--gp-line); color: var(--gp-muted); font-size: 0.78rem; }
.st-note .mud-icon-root { font-size: 16px; flex: 0 0 auto; }
.st-note.good { color: #34d399; border-color: rgba(52, 211, 153, 0.35); }
.st-note.warn { color: #fbbf24; border-color: rgba(251, 191, 36, 0.35); }
.st-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 10px; border-top: 1px solid var(--gp-line); }
.st-foot .mud-button-root { min-height: 40px; text-transform: none; font-weight: 700; font-size: 0.9rem; padding: 6px 18px; }


/* -- Station insights: open vs fixed hours -- */
.mix { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 700px) { .mix { grid-template-columns: 1fr; } }
.mix-side { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; }
.mix-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 3px 0; }
.mix-row span { display: flex; align-items: center; gap: 8px; color: #c7d2e5; }
.mix-row span i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.mix-row b { font-variant-numeric: tabular-nums; }
.mix-row small { grid-column: 1 / -1; color: var(--gp-muted); font-size: 0.72rem; margin-top: -3px; }
.mix-sub { margin: 2px 0 6px 17px; padding-left: 10px; border-left: 1px solid var(--gp-line); color: var(--gp-muted); font-size: 0.8rem; }
.mix-sub .mix-row span { color: var(--gp-muted); }
.mix-title { font-weight: 700; font-size: 0.8rem; margin-top: 6px; color: #c4b5fd; }


/* -- Split bill -- */
.mud-dialog.sp-dialog { max-width: 1100px; border-radius: 14px; }
.sp-due { color: var(--gp-muted); font-size: 0.85rem; }
.sp-due b { color: #fbbf24; font-size: 1rem; margin-left: 4px; }
.sp-modes { display: flex; align-items: center; gap: 6px; }
.sp-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; align-items: start; }
.sp-col { border: 1px solid var(--gp-line); border-radius: 10px; background: #0c1730; display: flex; flex-direction: column; min-width: 0; }
.sp-col.left { opacity: 0.75; }
.sp-col.settled { border-color: rgba(52, 211, 153, 0.4); }
.sp-col-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--gp-line); }
.sp-col-head .mud-menu { margin-left: auto; }
.sp-name { font-weight: 700; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-lines { padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; min-height: 60px; }
.sp-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; align-items: center; font-size: 0.82rem; }
.sp-line-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #c7d2e5; }
.sp-line-amt { font-variant-numeric: tabular-nums; }
.sp-line .mud-button-root { width: 22px; height: 22px; }
.sp-line .mud-button-root .mud-icon-root { font-size: 14px; color: var(--gp-muted); }
.sp-empty { color: var(--gp-muted); font-size: 0.8rem; padding: 10px 0; text-align: center; }
.sp-col-foot { padding: 6px 10px 10px; border-top: 1px solid var(--gp-line); }
.sp-col-foot .tk-row { padding: 2px 0; font-size: 0.8rem; }
.sp-col-due { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0 8px; font-weight: 700; }
.sp-col-due b { font-size: 1.1rem; color: #fbbf24; font-variant-numeric: tabular-nums; }
.sp-col-foot .mud-button-root { min-height: 32px; text-transform: none; font-weight: 700; font-size: 0.82rem; }
.sp-equal { display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.sp-equal .mud-button-root { min-height: 40px; text-transform: none; font-weight: 700; align-self: flex-start; }
.sp-leaving { display: flex; align-items: center; gap: 4px; font-size: 0.85rem; color: #c7d2e5; }
.sp-leaving .mud-checkbox { margin: 0; }
.tk-kind.who { background: rgba(52, 211, 153, 0.16); color: #34d399; }
/* ── Order page: the menu on the left, the cart on the right, both using the full height ── */
.op { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; height: calc(100vh - 76px); min-height: 520px; }
.op-left, .op-right { min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.op-left { min-width: 0; }
.op-head { display: flex; align-items: center; gap: 8px; }
.op-head .mi-title { font-size: 1.15rem; }
.op-tags { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.op-tools { display: flex; flex-direction: column; gap: 8px; }
.op-tools .mud-input-control { margin: 0; }
.op-scroll { padding-right: 8px; }
.op-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.mi-card.picked { border-color: rgba(96, 165, 250, 0.6); box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.25) inset; }
.mi-img { position: relative; }
.op-badge { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #22c55e; color: #052e16; font-size: 0.7rem; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid #0c1730; }
.op-cart { margin-top: 0; }
.op-right .mud-button-root { min-height: 38px; font-weight: 700; text-transform: none; font-size: 0.88rem; }
.op-cart .mi-lines { gap: 4px; }
.op-line { display: flex; flex-direction: column; gap: 3px; padding: 4px 0 5px; border-bottom: 1px solid rgba(30, 45, 77, 0.6); }
.op-line:last-child { border-bottom: none; }
.op-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 64px 22px; gap: 6px; align-items: center; }
.op-dot { width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.op-dot .mud-icon-root { font-size: 14px; color: #fff; opacity: 0.9; }
.op-name { font-weight: 600; font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-qty { display: inline-flex; align-items: center; border: 1px solid var(--gp-line); border-radius: 6px; height: 22px; }
.op-qty button { font: inherit; font-size: 0.9rem; line-height: 1; width: 22px; height: 20px; border: none; background: transparent; color: #cbd5e1; cursor: pointer; }
.op-qty button:hover { color: #fff; background: rgba(96, 165, 250, 0.16); }
.op-qty b { min-width: 18px; text-align: center; font-size: 0.8rem; }
.op-amt { color: #60a5fa; font-weight: 700; font-size: 0.8rem; font-variant-numeric: tabular-nums; text-align: right; }
.op-del { border: none; background: transparent; color: #f87171; cursor: pointer; padding: 0; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 6px; }
.op-del:hover { background: rgba(248, 113, 113, 0.14); }
.op-del .mud-icon-root { font-size: 15px; }
.op-who { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; padding-left: 28px; }
.op-chip { font: inherit; font-size: 0.64rem; font-weight: 600; padding: 1px 7px; border-radius: 999px; border: 1px solid rgba(96, 165, 250, 0.35); background: transparent; color: #93c5fd; cursor: pointer; line-height: 1.4; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-chip:hover { border-color: rgba(96, 165, 250, 0.7); }
.op-chip.on { background: var(--gp-blue); border-color: var(--gp-blue); color: #fff; }
.op-chip.add { border-style: dashed; padding: 1px 6px; }
.op-who-note { font-size: 0.62rem; color: var(--gp-muted); margin-left: 2px; }
.op-cart .mi-sum { padding-top: 6px; }
.op-cart .mi-sum .tk-row { padding: 1px 0; font-size: 0.82rem; }
.op-cart .mi-sum-total { padding: 5px 10px; margin-top: 3px; }
.op-cart .mi-sum-total .v { font-size: 1.05rem; }
.op-cart .mi-cart-head { font-size: 0.88rem; }
.op-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.op-kitchen, .op-addbill { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 6px 10px; border-radius: 10px; border: none; font: inherit; font-weight: 700; font-size: 0.86rem; color: #fff; cursor: pointer; }
.op-kitchen { background: linear-gradient(90deg, #16a34a, #22c55e); }
.op-addbill { background: var(--gp-blue); }
.op-addbill:hover { background: #2563eb; }
.op-kitchen:disabled, .op-addbill:disabled { opacity: 0.4; cursor: not-allowed; }
.op-kitchen .mud-icon-root, .op-addbill .mud-icon-root { font-size: 20px; }
@media (max-width: 1100px) { .op { grid-template-columns: minmax(0, 1fr) 300px; } }

/* ── Dashboards at the compact scale used everywhere else ───────────────── */
.dash .mb-4 { margin-bottom: 12px !important; }
.dash .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dash .stat { padding: 11px 14px; gap: 10px; min-height: 80px; }
.dash .stat-icon { width: 42px; height: 42px; border-radius: 11px; }
.dash .stat-icon .mud-icon-root { font-size: 22px; }
.dash .stat-value { font-size: 1.25rem; }
.dash .stat-label { font-size: 0.76rem; line-height: 1.2; }
.dash .stat-change, .dash .stat-hint { font-size: 0.68rem; margin-top: 3px; }
@media (max-width: 1150px) {
    .dash .stat-row { gap: 8px; }
    .dash .stat { padding: 10px 12px; gap: 8px; }
    .dash .stat-icon { width: 38px; height: 38px; }
    .dash .stat-value { font-size: 1.15rem; }
    .dash .stat-label { font-size: 0.72rem; }
}
.dash .quick-actions { gap: 10px; }
.dash .quick-actions .mud-button-root { min-height: 42px; font-size: 0.84rem; }
.dash .panel { padding: 14px 16px; }
.dash .panel-head { margin-bottom: 10px; }
.dash .panel-title { font-size: 0.95rem; }
.dash .panel-title.mb-2, .dash .panel-title.mb-3 { margin-bottom: 8px; }
.dash .panel-sub { font-size: 0.74rem; }
.dash .linechart { height: 150px; }
.dash .linechart-wrap { margin-top: 18px; }
.dash .linechart-legend { font-size: 0.7rem; }
.dash .donut { gap: 16px; }
.dash .donut svg { width: 150px; height: 150px; }
.dash .donut-legend { font-size: 0.78rem; gap: 6px; }
.dash .bars { height: 150px; padding-top: 16px; }
.dash .bar-value { font-size: 0.72rem; }
.dash .bar-label { font-size: 0.7rem; }
.dash .insight { padding: 10px 8px; }
.dash .insight .mud-icon-root { font-size: 22px; }
.dash .insight-value { font-size: 1.15rem; margin-top: 2px; }
.dash .insight-label { font-size: 0.68rem; }
.dash .goal { margin: 7px 0 10px; }
.dash .goal-head { font-size: 0.8rem; margin-bottom: 4px; }
.dash .goal-bar { height: 6px; }
.dash .seller { margin: 7px 0; font-size: 0.8rem; }
.dash .seller-bar { height: 8px; }
.dash .activity { gap: 7px; }
.dash .mini-table th { padding: 3px 6px; font-size: 0.7rem; }
.dash .mini-table td { padding: 5px 6px; font-size: 0.8rem; }
.dash .station-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.dash .station-card { padding: 10px 12px; min-height: 0; }
.dash .station-kind { font-size: 0.74rem; }
.dash .station-count { font-size: 1.2rem; margin: 1px 0 5px; }
.dash .station-count span { font-size: 0.8rem; }
.dash .mud-grid { margin-top: -6px; }
.dash .mud-grid > .mud-grid-item { padding-top: 12px; }

.dr-blind { display: inline-flex; align-items: center; gap: 6px; color: var(--gp-muted); font-size: 0.82rem; font-weight: 600; }
.dr-blind .mud-icon-root { font-size: 18px; }

.st-method.credit { border-color: rgba(34, 211, 238, 0.45); color: #67e8f9; }
.st-method.credit.on { background: rgba(34, 211, 238, 0.16); border-color: #22d3ee; }
.st-hint { font-size: 0.78rem; color: var(--gp-muted); margin: -2px 0 8px; }

.dr-held { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 7px 10px; border-radius: 8px; border: 1px solid rgba(34, 211, 238, 0.35); background: rgba(34, 211, 238, 0.08); color: #c7d2e6; text-decoration: none; font-size: 0.8rem; }
.dr-held .mud-icon-root { font-size: 18px; color: #67e8f9; }
.dr-held b { margin-left: auto; color: #67e8f9; font-variant-numeric: tabular-nums; }

.tk-kind.member { background: rgba(167, 139, 250, 0.18); color: #c4b5fd; }
.tier-chip.member { background: rgba(167, 139, 250, 0.2); color: #ddd6fe; }

/* -- Bookings -- */

.bk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.bk-bar .mud-button-root { text-transform: none; font-weight: 700; min-height: 34px; }
.bk-days { display: flex; gap: 4px; flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; }
.bk-day {
    display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 64px; padding: 5px 8px;
    border: 1px solid var(--gp-line); border-radius: 10px; background: rgba(15, 23, 42, 0.5); color: #c7d2e5; cursor: pointer; font: inherit;
}
.bk-day:hover { border-color: rgba(96, 165, 250, 0.5); }
.bk-day.today .bk-day-name { color: #60a5fa; }
.bk-day.on { background: var(--gp-blue); border-color: var(--gp-blue); color: #fff; }
.bk-day.on .bk-day-name { color: #fff; }
.bk-day-name { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.bk-day-date { font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
.bk-modes { display: flex; gap: 6px; }
.bk-modes .kds-pill { display: inline-flex; align-items: center; gap: 5px; }
.bk-modes .kds-pill .mud-icon-root { font-size: 16px; }

.bk-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.bk-legend { margin-left: auto; display: inline-flex; align-items: center; gap: 4px 6px; color: var(--gp-muted); font-size: 0.74rem; }
.bk-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.bk-legend i.booked { background: #fbbf24; }
.bk-legend i.confirmed { background: #60a5fa; }
.bk-legend i.arrived { background: #34d399; }

.bk-panel { height: auto; padding: 0; overflow: auto; max-height: calc(100vh - 224px); }
.bk-timeline {
    display: grid; grid-template-columns: 128px repeat(var(--bk-cols), minmax(46px, 1fr));
    grid-auto-rows: minmax(38px, auto); min-width: 100%; position: relative;
}
.bk-corner, .bk-hour {
    position: sticky; top: 0; z-index: 3; background: #101a2f; border-bottom: 1px solid var(--gp-line);
    padding: 7px 8px; font-size: 0.72rem; color: var(--gp-muted); font-weight: 600;
}
.bk-corner { left: 0; z-index: 4; }
.bk-hour { border-left: 1px solid rgba(30, 45, 77, 0.6); font-variant-numeric: tabular-nums; }
.bk-station {
    grid-column: 1; position: sticky; left: 0; z-index: 2; background: #101a2f; border-bottom: 1px solid rgba(30, 45, 77, 0.6);
    padding: 5px 10px; display: flex; flex-direction: column; justify-content: center; line-height: 1.15; min-width: 0;
}
.bk-station b { font-size: 0.82rem; }
.bk-station small { color: var(--gp-muted); font-size: 0.68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-station.group { background: rgba(30, 45, 77, 0.35); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: #7f93b5; min-height: 26px; }
.bk-lane {
    grid-column: 2 / -1; position: relative; border-bottom: 1px solid rgba(30, 45, 77, 0.6);
    background-image: linear-gradient(to right, rgba(30, 45, 77, 0.6) 1px, transparent 1px);
    background-size: calc(100% / var(--bk-cols)) 100%;
}
.bk-lane.can { cursor: copy; }
.bk-lane.can:hover { background-color: rgba(59, 130, 246, 0.05); }
.bk-lane.group { background: rgba(30, 45, 77, 0.35); cursor: default; min-height: 26px; }
.bk-block {
    position: absolute; top: 4px; bottom: 4px; border-radius: 7px; padding: 3px 7px; overflow: hidden; cursor: pointer;
    display: flex; align-items: center; gap: 6px; font-size: 0.74rem; line-height: 1.1; white-space: nowrap;
    border: 1px solid transparent; color: #0b1220; font-weight: 600;
}
.bk-block.open-hours { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right-style: dashed; border-right-color: rgba(11, 18, 32, 0.6); }
.bk-open-hint { margin-top: 8px; }
.bk-noshows { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin: 0 0 10px; padding: 6px 10px; border-radius: 10px; border: 1px solid rgba(251, 191, 36, 0.45); background: rgba(251, 191, 36, 0.08); }
.bk-noshows-label { display: inline-flex; align-items: center; gap: 4px; font-size: 0.78rem; font-weight: 700; color: #fbbf24; }
.bk-noshow { font: inherit; font-size: 0.78rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--gp-line); background: #0c1730; color: #e8eef9; cursor: pointer; }
.bk-noshow:hover { border-color: rgba(96, 165, 250, 0.5); }
.bk-noshow-options { margin-top: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(251, 191, 36, 0.45); background: rgba(251, 191, 36, 0.08); }
.bk-block-time { font-variant-numeric: tabular-nums; opacity: 0.8; }
.bk-block-name { overflow: hidden; text-overflow: ellipsis; font-weight: 800; }
.bk-block-n { margin-left: auto; opacity: 0.75; }
.bk-block.booked { background: #fbbf24; }
.bk-block.confirmed { background: #60a5fa; }
.bk-block.arrived { background: #34d399; }
.bk-block:hover { filter: brightness(1.08); }
.bk-now { position: absolute; top: 0; bottom: 0; width: 2px; background: #f87171; z-index: 1; pointer-events: none; }

.bk-table td small, .bk-table td b + small { display: block; color: var(--gp-muted); font-size: 0.72rem; }
.bk-table tr.muted td { opacity: 0.55; }
.bk-table .bk-note { max-width: 260px; color: #c7d2e5; }
.bk-table .bk-actions { text-align: right; white-space: nowrap; }
.bk-table .bk-actions .mud-button-root { text-transform: none; min-height: 26px; padding: 0 10px; margin-right: 4px; }
.status-chip.booked { background: rgba(251, 191, 36, 0.14); color: #fbbf24; } .status-chip.booked i { background: #fbbf24; }
.status-chip.confirmed { background: rgba(96, 165, 250, 0.16); color: #93c5fd; } .status-chip.confirmed i { background: #60a5fa; }
.status-chip.arrived { background: rgba(52, 211, 153, 0.14); color: #34d399; } .status-chip.arrived i { background: #34d399; }
.status-chip.done { background: rgba(148, 163, 184, 0.16); color: #cbd5e1; } .status-chip.done i { background: #94a3b8; }
.status-chip.noshow { background: rgba(248, 113, 113, 0.14); color: #f87171; } .status-chip.noshow i { background: #f87171; }
.status-chip.cancelled { background: rgba(148, 163, 184, 0.12); color: #94a3b8; } .status-chip.cancelled i { background: #64748b; }

.bk-form-status { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bk-form-meta { color: var(--gp-muted); font-size: 0.75rem; }
.bk-form-who { display: flex; align-items: flex-start; gap: 6px; }
.bk-form-who .mud-input-control { flex: 1; }
.bk-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Bookings on the floor */
.station-booked { display: flex; align-items: center; gap: 4px; font-size: 0.74rem; font-weight: 700; color: #93c5fd; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.station-booked .mud-icon-root { font-size: 14px; flex: 0 0 auto; }
.station-booked.now { color: #60a5fa; }
.station-card:has(.station-booked.now) { border-color: rgba(96, 165, 250, 0.55); }
.sd-bookings { display: flex; flex-direction: column; gap: 6px; }
.sd-booking {
    display: grid; grid-template-columns: 48px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: left;
    padding: 6px 10px; border: 1px solid var(--gp-line); border-radius: 8px; background: rgba(15, 23, 42, 0.5); color: #e2e8f0; cursor: pointer; font: inherit;
}
.sd-booking b { grid-row: 1 / 3; font-size: 0.95rem; font-variant-numeric: tabular-nums; color: #93c5fd; }
.sd-booking span { font-weight: 700; font-size: 0.85rem; }
.sd-booking small { color: var(--gp-muted); font-size: 0.72rem; }
.sd-booking:hover { border-color: rgba(96, 165, 250, 0.5); }
.sd-booking.on { border-color: var(--gp-blue); background: rgba(59, 130, 246, 0.16); }
.sd-booking.late b { color: #fbbf24; }

/* Booking deposits */
.bk-block-dep { font-size: 12px !important; opacity: 0.8; margin-left: 2px; }
.bk-dep { display: inline-flex; align-items: center; gap: 4px; font-size: 0.78rem; font-weight: 700; color: #67e8f9; white-space: nowrap; }
.bk-dep .mud-icon-root { font-size: 14px; }
.bk-dep.kept { color: #fbbf24; }
.bk-deposit { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(34, 211, 238, 0.35); background: rgba(34, 211, 238, 0.08); }
.bk-deposit .mud-icon-root { font-size: 22px; color: #67e8f9; }
.bk-deposit b { display: block; font-size: 0.88rem; color: #cffafe; }
.bk-deposit small { color: var(--gp-muted); font-size: 0.74rem; }
.bk-deposit.kept { border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.08); }
.bk-deposit.kept .mud-icon-root { color: #fbbf24; }
.bk-deposit.kept b { color: #fde68a; }

/* Bookings pulse on the dashboards and the day close */
.bk-pulse { display: flex; align-items: center; gap: 14px; height: auto; padding: 12px 16px; }
.bk-pulse > .mud-icon-root { font-size: 28px; flex: 0 0 auto; }
.bk-pulse-body { flex: 1 1 auto; min-width: 0; }
.bk-pulse-line { font-size: 0.85rem; color: #c7d2e5; }
.bk-pulse-line b { color: #fff; }
.bk-pulse-warn { color: #fbbf24; font-weight: 600; }
.bk-pulse-next { display: flex; flex-direction: column; line-height: 1.15; padding: 0 14px; border-left: 1px solid var(--gp-line); }
.bk-pulse-next small { color: var(--gp-muted); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; }
.bk-pulse-next b { font-size: 1.1rem; color: #93c5fd; font-variant-numeric: tabular-nums; }
.bk-pulse-next span { font-size: 0.78rem; color: #c7d2e5; }
.bk-pulse .mud-button-root { text-transform: none; font-weight: 700; white-space: nowrap; }
@media (max-width: 900px) { .bk-pulse { flex-wrap: wrap; } .bk-pulse-next { border-left: 0; padding: 0; } }

/* -- Inventory -- */
.inv-search { min-width: 220px; }
.inv-search .mud-input-control { margin: 0; }
.inv-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inv-item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inv-code { font-family: ui-monospace, Consolas, monospace; font-size: 0.74rem; color: var(--gp-blue-2); background: rgba(59, 130, 246, 0.12); padding: 1px 6px; border-radius: 5px; }
.inv-item .status-chip { padding: 2px 9px; font-size: 0.7rem; }
.inv-onhand { font-weight: 700; font-variant-numeric: tabular-nums; }
.inv-onhand.low { color: #fbbf24 !important; }
.inv-onhand.out { color: #f87171 !important; }
.inv-order { font-size: 0.72rem; color: #fbbf24; }
.inv-ledger td.neg { color: #f87171; font-variant-numeric: tabular-nums; }
.inv-ledger td.pos { color: #34d399; font-variant-numeric: tabular-nums; }
.inv-kind { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; background: rgba(148, 163, 184, 0.16); color: #cbd5e1; }
.inv-kind.purchase { background: rgba(52, 211, 153, 0.14); color: #34d399; }
.inv-kind.sale { background: rgba(96, 165, 250, 0.16); color: #93c5fd; }
.inv-kind.waste { background: rgba(251, 191, 36, 0.14); color: #fbbf24; }

/* Stock on the menu and the order page */
.mi-low { font-size: 0.72rem; color: #fbbf24; }
.mi-margin { font-size: 0.7rem; color: #34d399; white-space: nowrap; }
.mi-margin.thin { color: #fbbf24; }

/* Stock counts */
.sc-meta { color: var(--gp-muted); font-size: 0.82rem; }
.sc-meta b { color: #e2e8f0; }
.sc-table td { font-size: 0.9rem; }
.sc-table .sc-count { width: 160px; }
.sc-table .sc-input { max-width: 150px; margin-left: auto; }
.sc-table .sc-input input { text-align: right; font-weight: 700; font-size: 1rem; }
.sc-table tr.sc-blank td { opacity: 0.85; }
.sc-table tr.sc-short td:last-child, .sc-table tr.sc-short td:nth-last-child(2), td.sc-short { color: #f87171; font-weight: 700; }
.sc-table tr.sc-over td:last-child, .sc-table tr.sc-over td:nth-last-child(2) { color: #fbbf24; font-weight: 700; }

/* Stock on the dashboards */
.st-pulse .st-out { color: #f87171; font-weight: 700; }
.st-order { border: 1px solid var(--gp-line); border-radius: 10px; padding: 10px 12px; }
.st-order-head { display: flex; align-items: center; justify-content: space-between; font-size: 0.8rem; font-weight: 700; color: #c7d2e5; margin-bottom: 6px; }
.st-order-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; padding: 4px 0; border-top: 1px solid rgba(30, 45, 77, 0.6); font-size: 0.84rem; align-items: baseline; }
.st-order-name { font-weight: 600; }
.st-order-have { color: #fbbf24; font-size: 0.76rem; }
.st-order-row.out .st-order-have { color: #f87171; }
.st-order-row b { font-variant-numeric: tabular-nums; color: #93c5fd; }

/* -- Expenses -- */
.ex-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.ex-cat { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--gp-line); background: rgba(15, 23, 42, 0.5); font-size: 0.78rem; color: #c7d2e5; }
.ex-cat span { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.ex-chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; background: rgba(96, 165, 250, 0.16); color: #93c5fd; }
.ex-chip.cogs { background: rgba(251, 191, 36, 0.14); color: #fbbf24; }
.ex-table tr.muted td { opacity: 0.55; }
.ex-table td .mud-icon-root { font-size: 16px; vertical-align: -3px; }

/* Owed to suppliers */
.ex-owed { height: auto; }
.ex-owed-group { border-top: 1px solid rgba(30, 45, 77, 0.6); padding: 6px 0; }
.ex-owed-head, .ex-owed-row { display: flex; align-items: center; gap: 6px; font-size: 0.86rem; }
.ex-owed-row { padding-left: 22px; color: #c7d2e5; font-size: 0.8rem; }
.ex-owed-total { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; color: #fbbf24; }
.ex-owed .mud-checkbox { margin: 0; }

/* Due expenses */
.ex-due-row { padding-left: 0; }
.ex-due-when { min-width: 120px; font-size: 0.74rem; font-weight: 700; color: #93c5fd; text-transform: uppercase; letter-spacing: 0.04em; }
.ex-due-row.overdue .ex-due-when { color: #f87171; }
.ex-due .mud-button-root { text-transform: none; min-height: 26px; padding: 0 10px; margin-left: 8px; }

/* Profit & loss */
.dash .stat-row { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.pl-table td:nth-child(2), .pl-table td:nth-child(3) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl-table td:nth-child(3) { color: var(--gp-muted); }
.pl-table tr.pl-sub td { font-size: 0.8rem; padding-left: 22px; color: #c7d2e5; }
.pl-table tr.pl-neg td:nth-child(2) { color: #fbbf24; }
.pl-table tr.pl-total td { font-weight: 800; border-top: 1px solid var(--gp-line); }
.pl-table tr.pl-net td:nth-child(2) { color: #34d399; font-size: 1.05rem; }
.pl-table tr.pl-net.loss td:nth-child(2) { color: #f87171; }

/* Receipts */
.ex-attach { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; color: var(--gp-muted); padding: 4px; border-radius: 6px; }
.ex-attach:hover { color: #93c5fd; background: rgba(59, 130, 246, 0.12); }
.ex-attach input[type=file] { display: none; }
.ex-attach-btn { border: 1px solid var(--gp-line); padding: 4px 10px; font-size: 0.8rem; font-weight: 700; color: #c7d2e5; margin-right: 6px; }
.ex-receipt { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 8px; }

/* Loyalty points */
.pts-chip { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; background: rgba(251, 191, 36, 0.14); color: #fbbf24; white-space: nowrap; }

/* Loyalty tiers */
.tier-chip.silver { background: rgba(203, 213, 225, 0.22); color: #e2e8f0; margin-left: 6px; }
.tier-chip.gold { background: rgba(251, 191, 36, 0.18); color: #fbbf24; margin-left: 6px; }
.tier-chip.bronze { background: rgba(180, 120, 60, 0.22); color: #e9b98a; }
.vs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.vs-sub { font-weight: 700; font-size: 0.85rem; letter-spacing: 0.02em; margin-bottom: 4px; }

/* Owner dashboard: even rows of panels; the optional ones share a row of their own */
.dash-optional { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 12px; }
.dash-optional .insight-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.dash-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dash-pair > .panel { height: 100%; }
a.insight.link { display: block; color: inherit; text-decoration: none; transition: border-color 0.15s; }
a.insight.link:hover { border-color: rgba(96, 165, 250, 0.55); }
.seller.money { grid-template-columns: 24px minmax(54px, 0.8fr) 1.4fr minmax(84px, auto); }
.goal.pf-out .goal-bar > div { background: linear-gradient(90deg, #b45309, #fbbf24); }
.goal.pf-sum .goal-bar > div { background: linear-gradient(90deg, #059669, #34d399); }
.goal.pf-sum .goal-name { font-weight: 700; }
.goal.neg .goal-bar > div { background: linear-gradient(90deg, #b91c1c, #f87171); }
.goal.neg .goal-figure, .goal.neg .goal-pct { color: #f87171; }
@media (max-width: 700px) { .dash-pair { grid-template-columns: 1fr; } }

/* KDS: who an item is for */
.kds-for { display: flex; align-items: center; gap: 4px; margin: 1px 0 2px 24px; font-size: 0.8rem; font-weight: 700; color: #fbbf24; }
.kds-for .mud-icon-root { font-size: 14px; flex: 0 0 auto; }
.kds-customer { color: #cbd5e1; font-weight: 600; }
.kds-bill { display: block; margin-top: 1px; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.02em; color: var(--gp-muted); font-variant-numeric: tabular-nums; }
a.tk-kind.link { text-decoration: none; cursor: pointer; }
a.tk-kind.link:hover { filter: brightness(1.25); text-decoration: underline; }

/* Floor: a table being cleaned, counting down to lights off */
.station-cleaning { display: flex; align-items: center; gap: 5px; font-size: 0.8rem; font-weight: 600; line-height: 1.2; color: #fbbf24; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.station-cleaning .mud-icon-root { font-size: 15px; flex: 0 0 auto; }
.station-cleaning b { font-variant-numeric: tabular-nums; font-weight: 800; }
.station-cleaning.dark { color: var(--gp-muted); font-weight: 500; }
.station-actions .mud-button-root.station-more { flex: 0 0 auto; padding-left: 10px; padding-right: 10px; }

/* Admin → Devices: PC agents */
.agent-code { font-family: Consolas, "Cascadia Mono", monospace; font-weight: 800; letter-spacing: 0.08em; color: #fbbf24; }
/* The Guard on a PC (Devices). */
.guard-facts { display: grid; gap: 4px; font-size: 0.86rem; }
.guard-facts .guard-down { color: #fbbf24; }
.guard-mode .on { font-weight: 700; background: rgba(59, 130, 246, 0.14); }
.guard-log td { font-size: 0.8rem; vertical-align: top; }
.guard-log td.nowrap { white-space: nowrap; }
.guard-log tr.warn td { color: #fbbf24; }
.guard-warning { display: block; margin-top: 4px; color: #fbbf24; font-weight: 600; }
.agents-table .mud-button-root { text-transform: none; }

/* Customers: the PC sign-in username beside the name */
.cust-user { margin-left: 6px; font-size: 0.74rem; font-weight: 600; color: #93c5fd; }

/* Time on account */
.time-chip { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; background: rgba(56, 189, 248, 0.14); color: #7dd3fc; white-space: nowrap; }
.time-balance { font-variant-numeric: tabular-nums; }
.pass-list { display: flex; flex-direction: column; gap: 8px; }
.pass-option { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--gp-line); background: rgba(59, 130, 246, 0.06); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pass-option:hover { border-color: rgba(96, 165, 250, 0.55); }
.pass-option.on { border-color: #3b82f6; background: rgba(59, 130, 246, 0.2); }
.pass-name { font-weight: 700; }
.pass-time { color: #7dd3fc; font-weight: 600; font-variant-numeric: tabular-nums; }
.pass-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.passes-table .mud-button-root { text-transform: none; }

/* ── PC launcher tiles (Admin) ── */
.tile-swatch { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-right: 8px; border-radius: 6px; color: #fff; font-weight: 800; font-size: 0.8rem; vertical-align: middle; }
.tile-command { font-size: 0.78rem; color: #9fb3d1; word-break: break-all; }
.launcher-table .mud-button-root { text-transform: none; }

/* ── Controlling a station PC ── */
.pc-icon-btn { order: 1; display: inline-flex; align-items: center; padding: 1px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; line-height: 0; }
.pc-icon-btn:hover { background: rgba(148, 163, 184, 0.18); }
.pc-state { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pc-state-text { font-size: 0.82rem; color: #9fb3d1; }
.pc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-actions .mud-button-root, .pc-send, .pc-confirm { text-transform: none; }

/* ── Customer details: the PC sign-in line ── */
.cd-pc { display: flex; align-items: center; gap: 8px; background: #0c1730; border: 1px solid var(--gp-line); border-radius: 10px; padding: 8px 12px; }
.cd-pc > .mud-icon-root { color: var(--gp-blue-2); font-size: 18px; }
.cd-pc-text { flex: 1; min-width: 0; }
.cd-pc-btn { text-transform: none; white-space: nowrap; }

/* ── The customer's page: figures across the top, a rail for the person, ledgers two abreast ── */
.cp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.cp-kpi.mud-paper { padding: 12px 16px; min-width: 0; }
.cp-kpi-label { color: var(--gp-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.cp-kpi-value { font-size: 1.6rem; font-weight: 700; line-height: 1.25; margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-kpi-value.cp-small { font-size: 1.25rem; line-height: 1.6; }
.cp-kpi-value.cp-good { color: #34d399; }
.cp-kpi-value.cp-warn { color: #fbbf24; }
.cp-kpi-value.cp-info { color: #7dd3fc; }
.cp-kpi-value.cp-amber { color: #fbbf24; }
.cp-kpi-sub { color: var(--gp-muted); font-size: 0.78rem; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.cp-rail { display: grid; gap: 16px; min-width: 0; }
.cp-main { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); gap: 16px; align-items: start; min-width: 0; }
.cp-main > .mud-paper { min-width: 0; overflow-x: auto; }
.cp-wide { grid-column: 1 / -1; }
/* A date and a name are read whole or not at all; the description is the column that gives. */
.cp-main td:first-child, .cp-main td:nth-child(3), .cp-main td:last-child, .cp-main th { white-space: nowrap; }
.cp-signin { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
.cp-signin .mud-button-root { text-transform: none; white-space: nowrap; flex-shrink: 0; }
@media (min-width: 1100px) {
    .cp-body { grid-template-columns: 340px minmax(0, 1fr); }
    /* The person and what can be done for them stay in view while the ledgers scroll. */
    .cp-rail { position: sticky; top: 16px; }
}

/* ── Recharge: prepaid time sold and paid for in one dialog ── */
.rc-label { margin: 14px 0 6px; color: var(--gp-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.rc-methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.rc-method { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--gp-line); background: #0c1730; color: inherit; font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.rc-method:hover:not(:disabled) { border-color: #3b82f6; }
.rc-method.on { border-color: #3b82f6; background: rgba(59, 130, 246, 0.2); }
.rc-method:disabled { opacity: 0.45; cursor: not-allowed; }
.rc-method-sub { font-size: 0.72rem; font-weight: 500; color: var(--gp-muted); }
.rc-change { margin-top: 6px; font-size: 0.88rem; color: #fbbf24; }
.rc-summary { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 9px 12px; border-radius: 10px; background: rgba(56, 189, 248, 0.1); font-size: 0.88rem; }
.cd-recharge.mud-button-root { text-transform: none; }

/* ── Blocked programs (Admin → PC launcher) ── */
.blocked-add { display: grid; grid-template-columns: minmax(180px, 280px) minmax(180px, 1fr) auto; gap: 10px; align-items: start; max-width: 860px; }
.blocked-add .blocked-add-btn { text-transform: none; height: 40px; margin-top: 4px; }
@media (max-width: 700px) { .blocked-add { grid-template-columns: 1fr; } }
.windows-tools { max-width: 860px; }
.pc-taskbar-panel .tb-parts { padding-left: 12px; border-left: 2px solid var(--mud-palette-lines-default); margin: 4px 0 8px; }
.pc-taskbar-panel .tb-parts.off { opacity: .55; }
.windows-tools-list { display: flex; flex-wrap: wrap; gap: 6px; }
.windows-tool { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8rem;
    background: rgba(239, 68, 68, .12); border: 1px solid rgba(239, 68, 68, .35); }
.windows-tool code { font-size: .75rem; opacity: .85; }
.windows-tool.off { background: transparent; border-color: var(--mud-palette-lines-default); opacity: .55; text-decoration: line-through; }

/* ── PC requests: what the station PCs ask the counter for ── */
.pc-bell { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.pc-bell-label { font-weight: 700; font-size: 0.8rem; letter-spacing: 0.04em; }
.pc-bell.ringing { border-color: rgba(251, 191, 36, 0.6); color: #fbbf24; }
.pc-bell.ringing .mud-icon-root { animation: pc-ring 1.6s ease-in-out infinite; transform-origin: 50% 20%; }
@keyframes pc-ring {
    0%, 55%, 100% { transform: rotate(0); }
    60% { transform: rotate(-14deg); } 68% { transform: rotate(12deg); } 76% { transform: rotate(-9deg); } 84% { transform: rotate(6deg); } 92% { transform: rotate(-3deg); }
}
@media (prefers-reduced-motion: reduce) { .pc-bell.ringing .mud-icon-root, .pc-ask.calling .mud-icon-root { animation: none; } }

.pcr-spacer { flex: 1 1 auto; }
.pcr-empty { gap: 6px; text-align: center; }
.pcr-empty > .mud-icon-root { font-size: 40px; color: var(--gp-muted); }
.pcr-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1200px) { .pcr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .pcr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pcr-grid { grid-template-columns: 1fr; } }
.pcr-card.calling { border-top-color: #f87171; box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.25); }
.kds-chip.calling { color: #f87171; border-color: rgba(248, 113, 113, 0.45); background: rgba(248, 113, 113, 0.12); }
.pcr-card .kds-table { flex: 1 1 auto; }
.pcr-card .kds-chip { flex: 0 0 auto; white-space: nowrap; }
.pcr-price { margin-left: auto; padding-left: 8px; color: var(--gp-muted); font-size: 0.8rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pcr-total { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-top: 6px; border-top: 1px solid var(--gp-line); font-size: 0.74rem; color: var(--gp-muted); }
.pcr-total b { font-size: 1rem; color: #e8eef9; white-space: nowrap; }
.pcr-call { display: flex; align-items: center; gap: 10px; flex: 1; min-height: 48px; }
.pcr-call > .mud-icon-root { font-size: 30px; color: #f87171; }
.pcr-card.preparing .pcr-call > .mud-icon-root { color: #60a5fa; }
.pcr-call b { display: block; font-size: 0.95rem; }
.pcr-call span { font-size: 0.76rem; color: var(--gp-muted); }
.pcr-cannot { font-size: 0.78rem; color: var(--gp-muted); }
.pcr-h2 { margin: 22px 0 8px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gp-muted); }
.pcr-recent { background: #0c1730; border: 1px solid var(--gp-line); border-radius: 10px; overflow: hidden; }
.pcr-recent td:nth-child(4) span { display: inline-block; max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.pcr-recent td:first-child, .pcr-recent td:nth-child(2), .pcr-recent td:last-child { white-space: nowrap; }
.pcr-outcome { font-weight: 700; font-size: 0.8rem; }
.pcr-outcome.good { color: #34d399; }
.pcr-outcome.bad { color: #f87171; }
.pcr-outcome.quiet { color: var(--gp-muted); }
.pcr-reason { margin-left: 6px; font-size: 0.78rem; color: var(--gp-muted); }
.pcr-reasons { display: flex; flex-wrap: wrap; gap: 6px; }

/* On the Stations page: the tile of a PC that is asking for something. */
.pc-ask { order: 1; display: inline-flex; align-items: center; padding: 1px 3px; border-radius: 6px; line-height: 0; text-decoration: none; }
.pc-ask.calling { color: #fff; background: #ef4444; }
.pc-ask.calling .mud-icon-root { animation: pc-ring 1.6s ease-in-out infinite; transform-origin: 50% 20%; }
.pc-ask.order { color: #0b1327; background: #fbbf24; }
.pc-ask.answered { color: #60a5fa; background: rgba(59, 130, 246, 0.18); }

/* ── Settings: the PC lock screen's picture ── */
.lock-preview { position: relative; aspect-ratio: 16 / 9; max-width: 420px; border-radius: 10px; overflow: hidden; border: 1px solid var(--gp-line); background: #0b1326; }
.lock-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lock-preview-dim { position: absolute; inset: 0; background: #000; pointer-events: none; }
.lock-preview-box { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 10px 26px; border-radius: 10px; background: rgba(11, 19, 38, 0.8); border: 1px solid #2a3b5f; color: #e8eef9; font-weight: 700; font-size: 0.85rem; }
.lock-file { margin-top: 6px; font-size: 0.78rem; color: var(--gp-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lock-none { padding: 18px 14px; border: 1px dashed var(--gp-line); border-radius: 10px; color: var(--gp-muted); font-size: 0.85rem; }
.lock-panel .mud-button-root { text-transform: none; }

/* ── Membership plans: unlimited play ── */
.plan-play { border: 1px solid var(--gp-line); border-radius: 10px; padding: 10px 12px 4px; margin-top: 4px; background: #0c1730; }
.plan-play-label { margin: 4px 0 6px; color: var(--gp-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.plan-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }

/* ── Happy hours on the floor ── */
.hh-strip { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 14px; }
.hh-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
    background: rgba(251, 191, 36, 0.14); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.35); }

/* -- Reports: the sales ledger, one row per item. Kept on one line each and scrolled sideways,
      so a long night reads like the venue's own sheet rather than a wall of wrapped cells. -- */
.ledger-table th, .ledger-table td { white-space: nowrap; }
.ledger-table td .mud-typography-caption { display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

/* -- Reports: the month summary, block by block, as on the venue's sheet. -- */
.summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; align-items: start; }
.summary-line { padding: 5px 0; border-bottom: 1px solid rgba(148, 163, 184, 0.08); }
.summary-line:last-child { border-bottom: 0; }
.summary-hint { display: block; line-height: 1.3; }
.summary-strong { font-weight: 700 !important; }

/* -- Admin: report groups -- */
.rg-table td { vertical-align: middle; }

/* ── Invoices: the list beside the receive panel, stacked on a narrow screen ── */
@media (max-width: 1100px) { .inv-body { grid-template-columns: 1fr; } .inv-receive { position: static; } }
.inv-split { border-top: 1px solid rgba(148, 163, 184, 0.25); padding-top: 6px; }
.inv-part { color: #fbbf24; }

/* ── Bills: every bill in one compact list, sized to fit 1366 wide beside the sidebar ── */
.bl-sub { color: #94a3b8; font-size: 0.85rem; margin-top: 2px; }

/* Reports on paper: the report on screen, black on white, every row, nothing to press. */
.report-print-head { display: none; }

@media print {
    html:has(.report-page), body:has(.report-page), .shell:has(.report-page), .shell-main:has(.report-page), .shell-main:has(.report-page) > * {
        display: block !important; height: auto !important; min-height: 0 !important; max-height: none !important;
        overflow: visible !important; background: #fff !important; padding: 0 !important; margin: 0 !important;
    }
    .shell:has(.report-page) .sidebar, .shell:has(.report-page) .topbar, .shell:has(.report-page) .shell-backdrop,
    .mud-snackbar-provider, #mud-snackbar-container, #components-reconnect-modal { display: none !important; }

    .report-page, .report-page * {
        color: #000 !important; background: transparent !important; box-shadow: none !important;
        border-color: #bbb !important; text-shadow: none !important;
    }
    .report-page svg text { fill: #000 !important; }

    /* Charts keep their shape: a bar with no colour is not there. */
    .report-page .bar-fill { background: #555 !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }

    .report-print-head { display: block; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 2px solid #000 !important; font-size: 10pt; }
    .report-print-title { font-size: 15pt; font-weight: 700; }
    .report-print-filters { font-weight: 600; }

    /* What is for pressing stays on the screen. */
    .report-page .report-controls, .report-page .mud-tabs-tabbar, .report-page .mud-table-pagination,
    .report-page .mud-button-root, .report-page .mud-input-control, .report-page .mud-select { display: none !important; }

    /* Nothing scrolls on paper: a box that scrolls would cut the rows off at its edge. */
    .report-page .mud-table-container, .report-page .mud-tabs, .report-page .mud-tabs-panels, .report-page [style*="max-height"], .report-page [style*="overflow"] {
        overflow: visible !important; height: auto !important; max-height: none !important;
    }

    .report-page table { width: 100% !important; }
    .report-page th, .report-page td { padding: 2px 4px !important; font-size: 8pt !important; line-height: 1.2 !important; white-space: normal !important; }

    /* A chip or a tag in a cell is the size of the cell's writing, or one row takes the space of three. */
    .report-page th *, .report-page td * { font-size: inherit !important; line-height: inherit !important; padding: 0 !important; min-height: 0 !important; height: auto !important; }
    .report-page thead { display: table-header-group; }
    .report-page .items-total td { border-top: 2px solid #000 !important; }
    .report-page tfoot { display: table-row-group; }
    .report-page thead th { position: static !important; }
    .report-page tr { break-inside: avoid; }

    /* The widest report: nineteen columns have to fit the width of the sheet. */
    .report-page .ledger-table th, .report-page .ledger-table td,
    .report-page .customers-list-table th, .report-page .customers-list-table td { padding: 1px 2px !important; font-size: 7pt !important; }

    /* The paper has margins of its own. */
    .report-page .mud-paper, .report-page .panel { padding: 6px !important; }
    .report-page .report-cards { gap: 6px; }
    .report-page .report-cards > * { break-inside: avoid; }
    .report-page .mud-grid-item { padding: 4px !important; }

    /* A chart across a long period: bars side by side, with no room left for a label under each. */
    .report-page .bars { gap: 1px; break-inside: avoid; }
    .report-page .bars:has(.bar:nth-child(33)) .bar-label, .report-page .bars:has(.bar:nth-child(33)) .bar-value { display: none; }
}

/* Staff performance: every figure in one row, so it can be sorted by any of them. */
.sp-scroll { overflow-x: auto; }
.sp-table th, .sp-table td { padding: 6px 8px !important; font-size: 0.8rem; white-space: nowrap; }
.sp-table th { font-weight: 600; color: #94a3b8; }
.sp-table th.num, .sp-table td.num { text-align: right; }
.sp-table .sp-sort { all: unset; cursor: pointer; }
.sp-table .sp-sort:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.sp-table .sp-sort.on { color: var(--mud-palette-primary); }
.sp-table .sp-person { all: unset; cursor: pointer; font-weight: 600; color: var(--mud-palette-primary); }
.sp-table .sp-person:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.sp-table .sp-role { display: block; font-size: 0.7rem; font-weight: 400; color: #94a3b8; }
.sp-table .sp-away { color: #fbbf24; }
.sp-table .sp-short { color: #f87171; font-weight: 600; }
.sp-table .sp-over { color: #fbbf24; }
.sp-table .sp-apart td { color: #94a3b8; }
.sp-table .sp-apart .sp-person { color: inherit; }
.sp-table tfoot td { font-weight: 700; border-top: 2px solid var(--mud-palette-table-lines); }
.sp-note { color: #94a3b8; font-size: 0.75rem; }
.sp-table .sp-met { color: #34d399; font-weight: 600; }
.sp-table .sp-under { color: #fbbf24; font-weight: 600; }

/* My numbers and the leaderboard. */
.my-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.my-pills { display: flex; gap: 6px; }
.my-board .my-row td { font-weight: 700; color: var(--mud-palette-primary); }

/* Staff settings: a row of small boxes per role. */
.ss-targets td { min-width: 110px; }
.ss-targets .mud-input-control { margin-top: 0; }

/* Attendance. */
.att-missing { border-color: rgba(251, 191, 36, 0.5) !important; }
.att-missing-one {
    font: inherit; font-size: 0.8rem; color: #fbbf24; cursor: pointer; padding: 4px 10px;
    background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.4); border-radius: 999px;
}
.att-in { color: #34d399; font-weight: 600; }
.att-why { max-width: 320px; overflow: hidden; text-overflow: ellipsis; color: #94a3b8; }
.iv-table .bl-older { margin-left: 6px; font-size: 0.68rem; color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.4); border-radius: 999px; padding: 0 6px; }
.bl-two { display: flex; flex-direction: column; line-height: 1.2; }
.bl-two .sub { font-size: 0.72rem; color: #64748b; }
.bl-tab-of { font-size: 0.72rem; color: #fbbf24; margin-top: 2px; }
.bl-tab-of .mud-link { font-size: inherit; color: inherit; text-decoration: underline; }
.bl-tab-of .amt { margin-left: 4px; font-weight: 600; }
.bl-host { font-size: 0.72rem; color: #c4b5fd; margin-top: 2px; }
.hs-over { color: #fbbf24; font-weight: 700; }
.og-over { display: block; font-size: 0.72rem; color: #fbbf24; font-weight: 600; }
.tk-tag.tk-loser { background: rgba(251, 191, 36, 0.16); color: #fbbf24; }
.sp-loser { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 12px; margin: 8px 0 12px; border: 1px dashed rgba(251, 191, 36, 0.45); border-radius: 10px; font-size: 0.85rem; }
.sp-loser .sp-loser-icon { color: #fbbf24; }
.sp-loser .sp-loser-label { font-weight: 600; }
.sp-loser .sp-loser-who { max-width: 200px; }
.sp-loser .sp-loser-scope:disabled { opacity: 0.45; }
.bet-row { padding: 8px 10px; border: 1px solid rgba(251, 191, 36, 0.3); border-radius: 10px; }
.bet-row .bet-who { font-weight: 600; margin-bottom: 6px; }
.cp-owed { color: #f87171; font-weight: 600; }
.cp-tab-scroll { overflow-x: auto; }
.cp-tab-table { width: 100%; min-width: 820px; font-size: 0.8rem; }
.cp-tab-table th, .cp-tab-table td { padding: 6px 5px !important; }
.cp-tab-table td.t { white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.cp-tab-table th.r, .cp-tab-table td.r { text-align: right; white-space: nowrap; }
.cp-tab-row { cursor: pointer; }
.cp-tab-row:hover, .cp-tab-row.open { background: rgba(148, 163, 184, 0.08); }
.cp-share { margin-left: 6px; padding: 1px 6px; border-radius: 6px; font-size: 0.7rem; background: rgba(96, 165, 250, 0.18); color: #93c5fd; }
.cp-tab-status { padding: 2px 8px; border-radius: 6px; font-size: 0.72rem; font-weight: 600; }
.cp-tab-status.unpaid { background: rgba(248, 113, 113, 0.16); color: #f87171; }
.cp-tab-status.part-paid { background: rgba(251, 191, 36, 0.16); color: #fbbf24; }
.cp-tab-status.paid { background: rgba(52, 211, 153, 0.16); color: #6ee7b7; }
.cp-tab-detail td { padding-top: 0 !important; }
.cp-tab-items { display: grid; gap: 2px; padding: 6px 0; }
.cp-tab-item { display: flex; gap: 10px; align-items: baseline; }
.cp-tab-item .k { min-width: 46px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.cp-tab-item .k.game { color: #c4b5fd; }
.cp-tab-item .k.food { color: #6ee7b7; }
.cp-tab-item .k.other { color: #94a3b8; }
.cp-tab-item .n { flex: 1; }
.cp-tab-item .a { white-space: nowrap; }
.cp-tab-paid { padding: 4px 0 8px; font-size: 0.78rem; color: #6ee7b7; }
.cp-tab-cleared { font-size: 0.68rem; color: #94a3b8; margin-top: 2px; }
.cp-statement { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 12px; padding: 8px 10px; border: 1px dashed rgba(148, 163, 184, 0.35); border-radius: 10px; }
.cp-statement .mud-input-control { max-width: 170px; }
.inv-packs { font-size: 0.72rem; color: #94a3b8; }
.inv-usable { font-size: 0.72rem; color: #fbbf24; }
.inv-prep { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.inv-prep-chip { font-size: 0.68rem; font-weight: 600; padding: 1px 6px; border-radius: 6px; background: rgba(52, 211, 153, 0.16); color: #6ee7b7; }
.inv-useby { font-size: 0.7rem; color: #94a3b8; }
.inv-useby.past { color: #f87171; font-weight: 600; }
.inv-prep-box { border: 1px dashed rgba(148, 163, 184, 0.35); border-radius: 10px; padding: 10px; }
.inv-batch-lines { display: grid; gap: 2px; }
.inv-batch-line { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; font-size: 0.85rem; }
.inv-batch-line.short span:nth-child(2) { color: #f87171; }
/* A menu item's picture, in its edit dialog. */
.mn-picture { display: flex; gap: 14px; align-items: flex-start; padding: 10px; border: 1px solid var(--gp-line); border-radius: 10px; }
.mn-picture-box { flex: none; width: 120px; height: 84px; border-radius: 8px; overflow: hidden; background: var(--mud-palette-background-gray); display: grid; place-items: center; color: var(--gp-muted); }
.mn-picture-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mn-picture-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 0.85rem; }
.mn-picture-text > span { color: var(--gp-muted); font-size: 0.8rem; }
.mn-picture-text > .mn-picture-later { color: var(--mud-palette-warning); }
.mn-picture-actions { display: flex; gap: 8px; align-items: center; margin-top: 4px; }

/* Picking programs from what runs on a PC (PC launcher lists). */
.pick-list { max-height: 52vh; overflow-y: auto; border: 1px solid var(--gp-line); border-radius: 10px; }
.pick-row { display: flex; gap: 10px; align-items: flex-start; padding: 7px 10px; border-bottom: 1px solid var(--gp-line); cursor: pointer; }
.pick-row:last-child { border-bottom: 0; }
.pick-row:hover { background: rgba(59, 130, 246, 0.06); }
.pick-row.on { background: rgba(59, 130, 246, 0.14); }
.pick-row input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--mud-palette-primary); }
.pick-main { display: flex; flex-direction: column; min-width: 0; font-size: 0.85rem; }
.pick-count { color: var(--gp-muted); font-weight: 400; }
.pick-title { color: var(--gp-text, #e8eef9); font-size: 0.8rem; }
.pick-path { color: var(--gp-muted); font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mn-addon-picks { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.mn-addon-pick small { opacity: 0.75; }
.mn-group { border: 1px solid rgba(148, 163, 184, 0.25); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.mn-group.off { opacity: 0.55; }
.mn-group-head { display: flex; align-items: center; gap: 6px; }
.mn-group-choices { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.mn-choice { font-size: 0.78rem; padding: 2px 8px; border-radius: 8px; background: rgba(148, 163, 184, 0.14); }
.mi-addons { font-size: 0.7rem; color: #93c5fd; margin-left: 6px; }
.rv-pcs { display: flex; flex-wrap: wrap; gap: 8px; }
.rv-pc { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 120px; padding: 8px 12px; border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.25); background: rgba(148, 163, 184, 0.06); color: inherit; cursor: pointer; text-align: left; }
.rv-pc span { font-size: 0.78rem; opacity: 0.8; }
.rv-pc.free { border-color: rgba(52, 211, 153, 0.45); }
.rv-pc.busy { border-color: rgba(96, 165, 250, 0.45); }
.rv-pc.held { border-color: rgba(167, 139, 250, 0.6); background: rgba(139, 92, 246, 0.1); }
.rv-pc:disabled { cursor: default; opacity: 0.75; }
.status-chip.rv-scheduled { color: #c4b5fd; }
.status-chip.rv-awaiting { color: #fde68a; }
.status-chip.rv-attended { color: #34d399; }
.status-chip.rv-completed { color: #94a3b8; }
.status-chip.rv-noshow { color: #f87171; }
.status-chip.rv-cancelled { color: #94a3b8; }
.station-reservation { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; margin: 6px 0 0; padding: 3px 8px; border-radius: 8px; font-size: 0.78rem;
    line-height: 1.3; color: #c4b5fd; background: rgba(139, 92, 246, 0.12); text-decoration: none; }
.station-reservation.now { color: #fde68a; background: rgba(251, 191, 36, 0.14); }
.station-bill { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; margin: 6px 0 0; padding: 3px 8px; border-radius: 8px; font-size: 0.78rem;
    line-height: 1.3; color: #fde68a; background: rgba(251, 191, 36, 0.14); text-decoration: none; }
.sd-last-bill { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0 0 12px; padding: 10px 12px; border-radius: 10px;
    border: 1px solid rgba(251, 191, 36, 0.45); background: rgba(251, 191, 36, 0.08); }
.sd-last-bill-text { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sd-last-bill-text span { font-size: 0.78rem; color: var(--gp-muted); }
.sd-last-bill-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.pr-offers { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; }
.pr-offer { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; border: 1px dashed rgba(52, 211, 153, 0.55); background: rgba(52, 211, 153, 0.07); flex-wrap: wrap; }
.pr-offer.used { border-style: solid; }
.pr-offer-icon { color: #34d399; }
.pr-offer-text { flex: 1 1 260px; min-width: 0; }
.pr-offer-left { display: block; font-size: 0.8rem; opacity: 0.75; }
.op-pick-group { margin-bottom: 12px; padding: 6px 8px; border-radius: 10px; }
.op-pick-group.needed { outline: 1px dashed rgba(251, 191, 36, 0.6); }
.op-pick-head { font-weight: 600; margin-bottom: 6px; }
.op-pick-req { font-weight: 400; font-size: 0.75rem; color: #94a3b8; margin-left: 6px; }
.op-pick-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.op-pick-total { text-align: right; font-weight: 700; font-size: 1.05rem; }
.sc-packs { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.sc-packs .sc-input { max-width: 96px; }
.sc-packs .sc-plus { color: #94a3b8; font-weight: 700; }
.sc-total { font-size: 0.72rem; color: #94a3b8; margin-top: 2px; }
.cp-tab-total td { font-weight: 700; border-top: 1px solid rgba(148, 163, 184, 0.3); }
.bl-station { display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; }
.bl-station.cue { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.bl-station.gaming { background: rgba(167, 139, 250, 0.2); color: #c4b5fd; }
.bl-station.other { background: rgba(52, 211, 153, 0.16); color: #6ee7b7; }
.bl-station.counter { background: rgba(148, 163, 184, 0.14); color: #cbd5e1; }
.status-chip.ready { background: rgba(167, 139, 250, 0.16); color: #c4b5fd; } .status-chip.ready i { background: #a78bfa; }

/* ── Dining tables: the bill at a table, in the floor's station dialog ── */
.station-live.dining .timer { font-size: 0.95rem; }
.dn-panel { padding-top: 12px; }
.dn-bill { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 12px; margin-bottom: 12px; border-radius: 10px; border: 1px solid rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.07); }
.dn-label { font-size: 0.78rem; color: #94a3b8; }
.dn-who { font-weight: 700; }
.dn-sub { font-size: 0.78rem; color: #94a3b8; }
.dn-total { font-size: 1.3rem; font-weight: 800; color: #fbbf24; white-space: nowrap; }
.dn-row { display: flex; align-items: center; gap: 8px; }
.dn-row .mud-input-control { flex: 1 1 auto; }

/* ── "Add as a new customer" inside a customer search list ── */
.sd-add-new { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; border: 0; background: transparent; color: #60a5fa; font: inherit; font-size: 0.85rem; text-align: left; cursor: pointer; }
.sd-add-new:hover { background: rgba(96, 165, 250, 0.1); }
.dn-new { padding: 10px; border-radius: 8px; border: 1px solid rgba(96, 165, 250, 0.35); background: rgba(96, 165, 250, 0.06); }

/* ── Order page: the whole item card adds; a line of several splits into one each ── */
.mi-card.op-tap { cursor: pointer; transition: transform 0.08s ease, border-color 0.15s ease; user-select: none; }
.mi-card.op-tap:hover { border-color: rgba(96, 165, 250, 0.6); }
.mi-card.op-tap:active { transform: scale(0.97); }
.mi-card.op-tap.out { cursor: not-allowed; }
.mi-card.op-tap.out:active { transform: none; }
.op-split { display: inline-flex; align-items: center; gap: 4px; margin: 2px 0 0 30px; padding: 2px 8px; border: 1px dashed rgba(96, 165, 250, 0.5); border-radius: 999px; background: transparent; color: #93c5fd; font: inherit; font-size: 0.72rem; cursor: pointer; }
.op-split .mud-icon-root { font-size: 14px; }
.st-tab-switch { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* ── Checkout at the table ─────────────────────────────────────────── */
.panel-head + .co-step { border-top: 1px solid var(--gp-line); padding-top: 10px; }
.sp-invno { font-size: 0.72rem; color: #93c5fd; font-variant-numeric: tabular-nums; }
.tc-label { font-size: 0.8rem; color: var(--gp-muted); }
.sp-progress { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; margin: 8px 0 12px; border: 1px solid var(--gp-line); border-radius: 10px; }
.sp-progress-bar { width: 160px; height: 8px; border-radius: 4px; background: rgba(148, 163, 184, 0.2); overflow: hidden; }
.sp-progress-bar span { display: block; height: 100%; background: #34d399; }
.sp-progress-text { font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.sp-done { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px; margin: 8px 0 12px; border: 1px solid rgba(52, 211, 153, 0.45); border-radius: 10px; background: rgba(52, 211, 153, 0.08); }
.sp-done-icon { color: #34d399; font-size: 2rem !important; }
.sp-done-text { display: flex; flex-direction: column; }
.sp-done-text span { color: var(--gp-muted); font-size: 0.85rem; }
.vs-logo { border-top: 1px solid var(--gp-line); padding-top: 12px; }
.vs-logo-label { font-size: 0.8rem; font-weight: 700; color: var(--gp-muted); margin-bottom: 6px; }
.vs-logo-paper { background: #fff; border-radius: 6px; padding: 10px; display: flex; justify-content: center; max-width: 320px; }
.vs-logo-img { max-width: 100%; height: auto; image-rendering: pixelated; }
.sp-own-bill { display: block; font-size: 0.85rem; }
.tk-cut { color: #fbbf24; }

/* ── A count with − and + (players at a table) ── */
.count-stepper { display: flex; align-items: center; gap: 12px; }
.count-stepper .mud-icon-button { width: 44px; height: 44px; border-radius: 10px; }
.count-stepper .cs-value { min-width: 2ch; text-align: center; font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.count-stepper .cs-hint { color: var(--gp-muted); font-size: 0.8rem; margin-left: 4px; }

/* ── Invoices: filters, a card per kind, and a dense list that fits a screen ── */
.iv-filters { padding: 10px 12px; height: auto; }
.iv-presets { display: flex; gap: 6px; }
.iv-preset { height: 40px; padding: 0 12px; white-space: nowrap; border-radius: 8px; border: 1px solid var(--gp-line); background: transparent; color: var(--gp-text); font: inherit; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; cursor: pointer; }
.iv-preset:hover { border-color: rgba(96, 165, 250, 0.5); }
.iv-preset.on { background: var(--gp-blue); border-color: var(--gp-blue); color: #fff; }
.iv-preset:disabled { opacity: 0.6; cursor: default; }
/* Row 1: presets, From, To, Customer, Contact, older; row 2: Invoice No. under the presets, Station,
   Status, Payment Method, and Search across the last two. */
.iv-grid { display: grid; grid-template-columns: auto repeat(4, minmax(0, 1fr)) minmax(190px, 0.9fr); gap: 10px 10px; align-items: center; }
.iv-grid .iv-field, .iv-grid .iv-field.mud-input-control { margin: 0 !important; min-width: 0; }
.iv-grid .iv-go { grid-column: span 2; }
.iv-go .mud-button-root { height: 40px; }

.iv-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 10px; }
.iv-card { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 7px 12px; border-radius: 12px; border: 1px solid var(--gp-line);
           background: linear-gradient(180deg, #121f3a, #0f1b33); color: var(--gp-text); font: inherit; text-align: left; cursor: pointer; }
.iv-card:hover { border-color: rgba(96, 165, 250, 0.5); }
.iv-card.on { border-color: #3b82f6; box-shadow: 0 0 0 1px #3b82f6 inset; }
.iv-card .ic { flex: none; width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.iv-card .ic .mud-icon-root { font-size: 22px; }
.iv-card .txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.iv-card .lbl { font-size: 0.8rem; color: var(--gp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iv-card .num { font-size: 1.25rem; font-weight: 800; }
.iv-card .amt { font-size: 0.85rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iv-card.all .ic { background: #2563eb; }      .iv-card.all .amt { color: #60a5fa; }
.iv-card.paid { background: linear-gradient(180deg, rgba(5, 150, 105, 0.16), rgba(5, 150, 105, 0.05)); }
.iv-card.paid .ic { background: #059669; }     .iv-card.paid .amt { color: #34d399; }
.iv-card.unpaid { background: linear-gradient(180deg, rgba(220, 38, 38, 0.16), rgba(220, 38, 38, 0.05)); }
.iv-card.unpaid .ic { background: #dc2626; }   .iv-card.unpaid .amt { color: #f87171; }
.iv-card.part { background: linear-gradient(180deg, rgba(217, 119, 6, 0.18), rgba(217, 119, 6, 0.05)); }
.iv-card.part .ic { background: #d97706; }     .iv-card.part .lbl, .iv-card.part .amt { color: #fbbf24; }
.iv-card.account .ic { background: #2563eb; }  .iv-card.account .lbl, .iv-card.account .amt { color: #60a5fa; }
.iv-card.void .ic { background: #475569; }     .iv-card.void .amt { color: #cbd5e1; }

.iv-list { padding: 0; height: auto; overflow: hidden; }
.iv-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--gp-line); }
.iv-selected { font-size: 0.85rem; margin-right: 6px; white-space: nowrap; }
.iv-toolbar .iv-tool { text-transform: none; font-weight: 500; }
.iv-toolbar .iv-void:not(:disabled) { background: rgba(248, 113, 113, 0.1); }
.iv-quick { flex: 0 1 260px; }
/* Compact boxes in the toolbar and the pager: no room kept for a floating label, and a short input. */
.iv-quick.mud-input-control, .iv-rows .mud-input-control { margin: 0 !important; }
.iv-quick .mud-input-outlined input, .iv-rows .mud-input-outlined .mud-input-slot { padding-top: 7px !important; padding-bottom: 7px !important; }
.iv-scroll { overflow-x: auto; }
.iv-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.iv-table th { text-align: left; font-weight: 600; padding: 9px 8px; border-bottom: 1px solid var(--gp-line); white-space: nowrap; background: rgba(15, 27, 51, 0.6); }
.iv-table th.sortable { cursor: pointer; user-select: none; }
.iv-table td { padding: 4px 8px; border-bottom: 1px solid rgba(30, 45, 77, 0.6); white-space: nowrap; vertical-align: middle; }
.iv-table tbody tr:hover { background: rgba(59, 130, 246, 0.06); }
.iv-table tbody tr.on { background: rgba(59, 130, 246, 0.1); }
.iv-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.iv-table td.owed { color: #f87171; font-weight: 700; }
.iv-table td.clear { color: #34d399; font-weight: 700; }
.iv-table .tick { width: 34px; padding-left: 10px; }
.iv-table .act { text-align: center; width: 64px; }
.iv-table .iv-no { font-weight: 600; }
.iv-table .status-chip { padding: 3px 10px; font-size: 0.74rem; }
.iv-table .iv-row-menu .mud-icon-button { padding: 3px; border-radius: 8px; }
.iv-customer { white-space: normal; min-width: 130px; }
.iv-muted { color: var(--gp-muted); }
.iv-arrow { margin-left: 4px; font-size: 0.68rem; color: var(--gp-blue-2); }
.iv-arrow.idle { color: #475569; }
.iv-empty { text-align: center; color: var(--gp-muted); padding: 24px !important; }
.iv-station { display: inline-block; min-width: 64px; padding: 3px 10px; border-radius: 6px; font-size: 0.74rem; font-weight: 700; text-align: center; }
.iv-station.cue { background: #1d4ed8; color: #e0ecff; }
.iv-station.gaming { background: #0f766e; color: #ccfbf1; }
.iv-station.dining { background: #15803d; color: #dcfce7; }
.iv-station.counter { background: #6d28d9; color: #ede9fe; }
.iv-station.other { background: rgba(148, 163, 184, 0.2); color: #e2e8f0; }
.iv-method { display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: 0.74rem; background: rgba(148, 163, 184, 0.16); color: #e2e8f0; }
.iv-method.account { background: rgba(99, 102, 241, 0.22); color: #c7d2fe; }
.iv-method.mixed { background: rgba(251, 191, 36, 0.14); color: #fde68a; }
.iv-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 6px 14px; border-top: 1px solid var(--gp-line); font-size: 0.82rem; }
.iv-rows { flex: 0 0 84px; width: 84px; max-width: 84px; }
.iv-pages { display: flex; align-items: center; gap: 4px; }
.iv-page { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--gp-line); background: transparent; color: var(--gp-text);
           font: inherit; font-size: 0.82rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.iv-page.on { background: var(--gp-blue); border-color: var(--gp-blue); color: #fff; font-weight: 700; }
.iv-page:disabled { opacity: 0.4; cursor: default; }
.iv-gap { color: var(--gp-muted); padding: 0 4px; }
@media (max-width: 1100px) { .iv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .iv-presets, .iv-grid .iv-go { grid-column: 1 / -1; } }
@media (max-width: 600px) { .iv-grid { grid-template-columns: minmax(0, 1fr); } .iv-quick { flex: 1 1 100%; } }

/* ── Getting about: Stations, the bill, Bills and Add Items link to each other ── */
.tk-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tk-nav .mud-button-root { text-transform: none; }
.op-nav { margin-left: auto; }
.sd-bill-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sd-bill-links .mud-button-root { text-transform: none; }

/* ── System page (Gamliot only) and the station limits it sets ── */
.sys-usage { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 6px; }
.sys-usage > div { display: flex; flex-direction: column; padding: 8px 12px; border: 1px solid var(--gp-line); border-radius: 10px; }
.sys-usage span { color: var(--gp-muted); font-size: 0.78rem; }
.sys-usage b { font-size: 1.15rem; }
.sys-path { word-break: break-all; font-weight: 500; }
.res-usage { display: flex; gap: 16px; font-size: 0.85rem; color: var(--gp-muted); }
.res-usage .full { color: #fbbf24; font-weight: 600; }

/* A member's Premium PC on the floor: set aside (quiet), or theirs alone (gold). */
.station-chip.premium { color: #fbbf24; } .station-chip.premium i { background: #fbbf24; }
.station-premium { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; margin: 6px 0 0; padding: 3px 8px; border-radius: 8px; font-size: 0.78rem;
    line-height: 1.3; color: #cbd5e1; background: rgba(148, 163, 184, 0.12); text-decoration: none; }
.station-premium.now { color: #fcd34d; background: rgba(251, 191, 36, 0.16); }
.status-chip.premium { background: rgba(251, 191, 36, 0.14); color: #fcd34d; } .status-chip.premium i { background: #fbbf24; }
.rv-pc.premium { border-color: rgba(251, 191, 36, 0.6); background: rgba(251, 191, 36, 0.1); color: #fcd34d; }
.station-tamper { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; margin: 6px 0 0; padding: 4px 8px; border-radius: 8px; font-size: 0.78rem; line-height: 1.3; color: #fecaca; background: rgba(220, 38, 38, 0.32); border: 1px solid rgba(248, 113, 113, 0.7); font-weight: 600; }
.station-tamper > span { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.station-tamper-seen { margin-left: auto; padding: 1px 8px; border-radius: 6px; border: 1px solid #fecaca; background: transparent; color: #fecaca; font: inherit; font-size: 0.72rem; cursor: pointer; }
.station-tamper-seen:hover { background: rgba(254, 202, 202, 0.15); }
.station-silent { font-weight: 500; background: rgba(220, 38, 38, 0.2); }
.station-pc-oos { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; padding: 3px 8px; border-radius: 8px; font-size: 0.78rem; line-height: 1.3; color: #fca5a5; background: rgba(239, 68, 68, 0.16); }
.station-troubleshoot { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; margin: 6px 0 0; padding: 3px 8px; border-radius: 8px; font-size: 0.78rem; line-height: 1.3; color: #fdba74; background: rgba(249, 115, 22, 0.14); }

/* Vendors: the list wears the customer list's clothes; the page is details on the left, ledgers on the right. */
.vendor-cards { margin-bottom: 16px; }
.vendor-body { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 16px; align-items: start; }
.vendor-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 0.85rem; }
.vendor-facts dt { color: var(--gp-muted); white-space: nowrap; }
.vendor-facts dd { margin: 0; overflow-wrap: anywhere; }
.vendor-ledgers { min-width: 0; }
.vendor-ledgers .mud-tabs-panels { padding: 12px; }
.vendor-period { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.vendor-period .mud-picker { flex: 0 1 170px; }
.vendor-sums { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.85rem; color: var(--gp-muted); margin-bottom: 10px; }
.vendor-sums b { color: var(--mud-palette-text-primary); margin-left: 4px; }
.vendor-scroll { overflow-x: auto; }
@media (max-width: 900px) { .vendor-body { grid-template-columns: minmax(0, 1fr); } }

/* Purchase orders: heading fields, then lines you can type straight into. */
.po-fields { display: grid; grid-template-columns: minmax(200px, 2fr) repeat(3, minmax(140px, 1fr)); gap: 10px; margin-bottom: 10px; }
.po-fields-note { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.po-scroll { overflow-x: auto; }
.po-lines td { vertical-align: top; }
.po-line-net { padding-top: 16px !important; white-space: nowrap; }
.po-line-hint { margin-top: 2px; }
.po-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid rgba(30, 45, 77, 0.6); }
.po-totals { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; font-size: 0.85rem; color: var(--gp-muted); }
.po-totals b { color: var(--mud-palette-text-primary); margin-left: 4px; }
.po-grand { font-size: 1rem; }
.po-grand b { font-size: 1.15rem; }
@media (max-width: 760px) { .po-fields, .po-fields-note { grid-template-columns: minmax(0, 1fr); } }

/* Receiving: the same lines as an order, with what came. */
.rc-fields { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.rc-quick { display: flex; gap: 4px; padding: 6px 10px 0; }
.rc-line-name { font-weight: 600; }
.rc-over, .rc-extra, .rc-price-changed { color: #fbbf24; }
.rc-price { display: inline-block; padding-top: 8px; }
.rc-pay { max-width: 420px; }
.po-receipts { padding: 10px 12px 12px; border-top: 1px solid rgba(30, 45, 77, 0.6); overflow-x: auto; }

/* Paying vendors: spreading an amount sits in the panel head; credit beside the totals. */
.vp-spread { display: flex; align-items: center; gap: 8px; }
.vp-spread .mud-input-control { width: 170px; }
.vp-credit { max-width: 260px; }
.vo-total td { border-top: 1px solid rgba(148, 163, 184, 0.4); }

/* Vendor Insights: a bar per category, sized against the biggest. */
.vi-categories { display: flex; flex-direction: column; gap: 10px; }
.vi-category-head { display: flex; justify-content: space-between; gap: 12px; font-size: 0.85rem; margin-bottom: 4px; }
.vi-track { height: 6px; border-radius: 3px; background: rgba(148, 163, 184, 0.16); overflow: hidden; }
.vi-track i { display: block; height: 100%; border-radius: 3px; background: var(--mud-palette-primary); }

/* Rescue codes: the sheet on screen, and on paper alone (the rest of the page hidden). */
.rescue-sheet { border: 1px dashed var(--mud-palette-lines-default); border-radius: 8px; padding: 12px 14px; }
.rescue-sheet-title { font-size: 1.05rem; font-weight: 700; }
.rescue-sheet-sub { font-size: 0.8rem; opacity: 0.75; margin-bottom: 8px; }
.rescue-codes { list-style: none; padding: 0; margin: 0 0 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.rescue-codes li { display: flex; align-items: center; gap: 10px; }
.rescue-no { width: 1.6em; text-align: right; opacity: 0.7; }
.rescue-code { font-family: Consolas, "Courier New", monospace; font-size: 1.15rem; font-weight: 700; letter-spacing: 0.08em; }
.rescue-box { width: 14px; height: 14px; border: 1.5px solid currentColor; border-radius: 2px; margin-left: auto; opacity: 0.6; }
.rescue-sheet-how { font-size: 0.78rem; line-height: 1.4; }
@media (max-width: 480px) { .rescue-codes { grid-template-columns: 1fr; } }
@media print {
    html:has(.rescue-sheet), body:has(.rescue-sheet) { background: #fff !important; }
    /* The dialog holding it would cut it off at its edge, and a moved dialog would carry it along. */
    body:has(.rescue-sheet) .mud-dialog-container, body:has(.rescue-sheet) .mud-dialog, body:has(.rescue-sheet) .mud-dialog-content {
        overflow: visible !important; max-height: none !important; transform: none !important; box-shadow: none !important; background: transparent !important;
    }
    body:has(.rescue-sheet) * { visibility: hidden !important; }
    body:has(.rescue-sheet) .rescue-sheet, body:has(.rescue-sheet) .rescue-sheet * { visibility: visible !important; color: #000 !important; }
    body:has(.rescue-sheet) .rescue-sheet { position: fixed; left: 0; top: 0; width: 100%; box-sizing: border-box; border-color: #000 !important; background: #fff !important; }
    .rescue-code { font-size: 16pt; }
}

/* Admin → PC control: profiles on the left, the chosen one's rules on the right. */
.pcc-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .pcc-layout { grid-template-columns: 1fr; } }
.pcc-item { display: block; width: 100%; text-align: left; padding: 8px 10px; margin-bottom: 6px; border-radius: 8px; border: 1px solid var(--mud-palette-lines-default); background: transparent; color: inherit; cursor: pointer; font: inherit; }
.pcc-item:hover { border-color: var(--mud-palette-primary); }
.pcc-item.on { border-color: var(--mud-palette-primary); background: rgba(59, 130, 246, 0.10); }
.pcc-item-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pcc-item-sub { font-size: 0.76rem; opacity: 0.7; margin-top: 2px; }
.pcc-switches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; }
@media (max-width: 760px) { .pcc-switches { grid-template-columns: 1fr; } }
.pcc-switch { padding: 4px 8px 6px; border-radius: 8px; border: 1px solid transparent; }
.pcc-switch.is-on { border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.06); }
.pcc-switch .vs-hint { margin-left: 34px; }
.pcc-signin { display: inline-block; margin-left: 4px; color: #fbbf24; }
.pcc-new-mode .on { background: rgba(59, 130, 246, 0.14); }
.pcc-tag { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: 0.68rem; line-height: 1.5; text-transform: uppercase; letter-spacing: 0.04em; color: #93c5fd; background: rgba(59, 130, 246, 0.16); }
.pcc-tag.amber { color: #fbbf24; background: rgba(251, 191, 36, 0.14); }
.pcc-switch .mud-checkbox .mud-typography { font-size: 0.875rem; }
