:root {
    color-scheme: light;
    --logo-dark-bg: #000000;
    --logo-accent: #e6a62e;
    --sidebar-bg: var(--logo-dark-bg);
    --sidebar-text: #e8e8f0;
    --sidebar-text-muted: rgba(232, 232, 240, 0.54);
    --sidebar-border: rgba(255, 255, 255, 0.06);
    --sidebar-hover: rgba(255, 255, 255, 0.06);
    --sidebar-active-bg: rgba(230, 166, 46, 0.18);
    --sidebar-active-border: rgba(230, 166, 46, 0.40);

    --surface-0: #f7f4ee;
    --surface-1: #ffffff;
    --surface-2: #f4f0e8;
    --surface-3: #e9e2d7;
    --surface-accent: rgba(230, 166, 46, 0.10);

    --topbar-bg: #ffffff;
    --topbar-border: #ded7ca;
    --topbar-shadow: 0 8px 24px rgba(69, 55, 34, 0.08);

    --border-subtle: #ded7ca;
    --text-primary: #24262b;
    --text-secondary: #59616d;
    --text-muted: #7b8490;

    --brand: var(--logo-accent);
    --brand-strong: #c98d1c;
    --brand-light: rgba(230, 166, 46, 0.16);

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.07), 0 2px 8px rgba(0, 0, 0, 0.05);
    --card-shadow-elevated: 0 4px 16px rgba(0, 0, 0, 0.10);

    --icon-color: #374151;
    --icon-color-muted: #6b7280;
    --sidebar-nav-text: rgba(255, 255, 255, 0.92);
    --sidebar-nav-text-muted: rgba(255, 255, 255, 0.84);
    --sidebar-nav-text-hover: #ffffff;
    --sidebar-nav-text-active: #ffffff;
    --sidebar-nav-chevron: rgba(255, 255, 255, 0.55);
    --sidebar-nav-chevron-expanded: rgba(255, 255, 255, 0.84);
    --sidebar-icon-color: rgba(255, 255, 255, 0.80);
    --sidebar-icon-color-hover: rgba(255, 255, 255, 0.96);
    --sidebar-icon-color-active: var(--brand);

    /* Legacy neutral aliases let older page styles participate in both themes. */
    --ui-canvas: #f7f4ee;
    --ui-canvas-muted: #f3efe7;
    --ui-canvas-subtle: #faf8f3;
    --ui-panel-deep: #f8f5ef;
    --ui-panel-base: #ffffff;
    --ui-panel-control: #fffdf9;
    --ui-panel-control-alt: #fbf8f2;
    --ui-panel-control-soft: #fdfbf7;
    --ui-panel: #ffffff;
    --ui-panel-card: #fffefa;
    --ui-panel-card-alt: #fcfaf5;
    --ui-panel-raised: #faf6ee;
    --ui-panel-raised-alt: #f8f3ea;
    --ui-panel-hover: #f5eee2;
    --ui-panel-hover-alt: #f2eadc;
    --ui-panel-selected: #eee4d5;
    --ui-panel-compact: #fbf8f2;
    --ui-panel-hover-soft: #f3ecdf;
    --ui-panel-marker: #eee6d9;
    --ui-panel-pressed: #f0e8da;
    --ui-panel-active: #ede4d5;
    --ui-panel-badge: #eee7db;
    --ui-panel-track: #e2d8c9;
    --ui-divider: #ddd4c7;
    --ui-skeleton: #f0ece4;
    --ui-panel-field: #f5efe6;
    --ui-divider-soft: #e7dfd3;
    --ui-panel-row: #fbf8f3;
    --ui-panel-row-border: #d8cec0;
    --ui-panel-info: #eef4f7;
    --ui-panel-secondary: #f7f2e9;
    --ui-panel-secondary-alt: #f2ece2;
    --ui-panel-secondary-hover: #ebe3d7;
    --ui-control-addon: #f0ebe2;
    --ui-toggle-off: #c9c2b8;
    --ui-toggle-off-border: #aca397;
    --ui-toggle-knob: #ffffff;
    --ui-progress-track: #e9e2d7;
    --ui-border: #ded7ca;
    --ui-border-strong: #c9c0b2;
    --ui-border-strong-alt: #c5bcad;
    --ui-border-hover: #b9ae9e;
    --ui-border-muted: #d3cabd;
    --ui-border-interactive: #aaa090;
    --ui-text-muted: #68717e;
    --ui-text-primary: #24262b;
    --ui-text-strong: #15171a;
    --ui-text-secondary: #555d68;
    --ui-text-secondary-alt: #4e5661;
    --ui-text-secondary-soft: #606874;
    --ui-text-secondary-strong: #414852;
    --ui-text-subtle: #7a828d;
    --ui-text-subtle-alt: #717985;
    --ui-text-dim: #6b7480;
    --ui-text-dim-alt: #626b77;
    --ui-text-supporting: #555e69;
    --ui-text-supporting-alt: #5a6470;
    --ui-text-supporting-soft: #606a75;
    --ui-text-supporting-strong: #46505b;
    --ui-text-card: #404852;
    --ui-text-caption: #747d88;
    --ui-text-caption-alt: #707986;
    --ui-text-table: #58616d;
    --ui-text-action: #3f4853;
    --ui-text-button: #515b66;
    --ui-text-list: #46505b;
    --ui-text-list-soft: #56606b;
    --ui-text-list-strong: #48515c;
    --ui-text-card-strong: #3e4752;
    --ui-text-card-bright: #3c4651;
    --ui-text-card-muted: #414b56;
    --ui-text-card-soft: #3c4650;
    --ui-text-legacy-muted: #626b77;
    --ui-text-legacy-soft: #59636f;
    --ui-text-topbar-action: #616a76;
    --ui-text-link: #3f4853;
    --status-success-surface: #e6f6f1;
    --status-success-border: #a9d9cb;
    --status-danger-surface: #fff0f1;
    --status-danger-border: #e8b7bc;
}

.dark-mode {
    color-scheme: dark;
    --sidebar-bg: var(--logo-dark-bg);
    --sidebar-text: #e8e8f0;
    --sidebar-text-muted: rgba(232, 232, 240, 0.54);
    --sidebar-border: rgba(255, 255, 255, 0.06);
    --sidebar-hover: rgba(255, 255, 255, 0.06);
    --sidebar-active-bg: rgba(230, 166, 46, 0.18);
    --sidebar-active-border: rgba(230, 166, 46, 0.40);

    --surface-0: #090a0c;
    --surface-1: #111214;
    --surface-2: #17181b;
    --surface-3: #202227;
    --surface-accent: rgba(230, 166, 46, 0.14);

    --topbar-bg: #090a0c;
    --topbar-border: #272b32;
    --topbar-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);

    --border-subtle: rgba(255, 255, 255, 0.08);
    --text-primary: #f0f2f8;
    --text-secondary: #a0a8c0;
    --text-muted: #6b7290;

    --brand: var(--logo-accent);
    --brand-strong: #f3bd52;
    --brand-light: rgba(230, 166, 46, 0.16);

    --card-shadow: none;
    --card-shadow-elevated: 0 10px 28px rgba(0, 0, 0, 0.32);

    --icon-color: #ffffff;
    --icon-color-muted: #a0a8c0;
    --sidebar-nav-text: rgba(255, 255, 255, 0.92);
    --sidebar-nav-text-muted: rgba(255, 255, 255, 0.84);
    --sidebar-nav-text-hover: #ffffff;
    --sidebar-nav-text-active: #ffffff;
    --sidebar-nav-chevron: rgba(255, 255, 255, 0.55);
    --sidebar-nav-chevron-expanded: rgba(255, 255, 255, 0.84);
    --sidebar-icon-color: rgba(255, 255, 255, 0.80);
    --sidebar-icon-color-hover: rgba(255, 255, 255, 0.96);
    --ui-text-link: #ffffff;

    --ui-canvas: #090a0c;
    --ui-canvas-muted: #0d0f12;
    --ui-canvas-subtle: #0e1014;
    --ui-panel-deep: #101216;
    --ui-panel-base: #111214;
    --ui-panel-control: #111318;
    --ui-panel-control-alt: #111316;
    --ui-panel-control-soft: #111317;
    --ui-panel: #15171b;
    --ui-panel-card: #17191f;
    --ui-panel-card-alt: #181b20;
    --ui-panel-raised: #1a1d22;
    --ui-panel-raised-alt: #1a1c22;
    --ui-panel-hover: #202329;
    --ui-panel-hover-alt: #20242a;
    --ui-panel-selected: #252932;
    --ui-panel-compact: #121418;
    --ui-panel-hover-soft: #20242b;
    --ui-panel-marker: #272b33;
    --ui-panel-pressed: #191b20;
    --ui-panel-active: #1b1e24;
    --ui-panel-badge: #22252d;
    --ui-panel-track: #292d35;
    --ui-divider: #242830;
    --ui-skeleton: #131519;
    --ui-panel-field: #24282e;
    --ui-divider-soft: #22262d;
    --ui-panel-row: #191c21;
    --ui-panel-row-border: #292e37;
    --ui-panel-info: #222630;
    --ui-panel-secondary: #1b1e23;
    --ui-panel-secondary-alt: #23262d;
    --ui-panel-secondary-hover: #23272e;
    --ui-control-addon: #22262c;
    --ui-toggle-off: #252a31;
    --ui-toggle-off-border: #39404a;
    --ui-toggle-knob: #8993a0;
    --ui-progress-track: #282d34;
    --ui-border: #2a2e36;
    --ui-border-strong: #343944;
    --ui-border-strong-alt: #343945;
    --ui-border-hover: #3b424d;
    --ui-border-muted: #303640;
    --ui-border-interactive: #48505d;
    --ui-text-muted: #929cad;
    --ui-text-primary: #e8edf5;
    --ui-text-strong: #f4f7fb;
    --ui-text-secondary: #c5ccd6;
    --ui-text-secondary-alt: #c8d0dc;
    --ui-text-secondary-soft: #cbd4df;
    --ui-text-secondary-strong: #dce2ea;
    --ui-text-subtle: #737d8d;
    --ui-text-subtle-alt: #7f8998;
    --ui-text-dim: #697382;
    --ui-text-dim-alt: #8d98a8;
    --ui-text-supporting: #aeb7c4;
    --ui-text-supporting-alt: #aab4c1;
    --ui-text-supporting-soft: #aeb8c5;
    --ui-text-supporting-strong: #c5cfdb;
    --ui-text-card: #cbd3de;
    --ui-text-caption: #737e8d;
    --ui-text-caption-alt: #707b89;
    --ui-text-table: #aeb8c6;
    --ui-text-action: #c5cfdd;
    --ui-text-button: #b5bfcc;
    --ui-text-list: #c4ceda;
    --ui-text-list-soft: #b6c0cc;
    --ui-text-list-strong: #c2ccd8;
    --ui-text-card-strong: #cbd3df;
    --ui-text-card-bright: #cbd5e2;
    --ui-text-card-muted: #c9d2df;
    --ui-text-card-soft: #cdd5e0;
    --ui-text-legacy-muted: #9ca7b5;
    --ui-text-legacy-soft: #aab2c0;
    --ui-text-topbar-action: #aab3c1;
    --status-success-surface: #202d2a;
    --status-success-border: #34413f;
    --status-danger-surface: #171215;
    --status-danger-border: #4b3338;
}

.light-mode {
    color-scheme: light;
    --order-icon-surface: #eef3f4;
    --order-icon-foreground: #315f70;
    --order-inset-surface: #f6f3ed;
    --order-control-surface: #ffffff;
    --order-control-foreground: #414b56;
    --order-positive-text: #08745e;
    --order-positive-surface: #e4f5ee;
    --order-negative-text: #a33a45;
    --order-negative-surface: #fff0f1;
    --order-action-hover: #d9e7e7;
    --order-muted-foreground: #5c6672;
    --order-strong-foreground: #24262b;
    --order-divider: #e2d9cc;
    --order-control-border: #c9c0b2;
    --order-success-fill: #0b745e;
    --light-control-bg: #f6f1e8;
    --light-control-hover: #eee5d6;
    --light-field-bg: #fffefa;
    --light-danger-bg: #fff0f1;
    --light-danger-text: #a33a45;
    --light-info-bg: #eaf2f6;
    --light-warning-bg: #fff5e6;
    --light-warning-text: #805012;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--surface-0);
    color: var(--text-primary);
    transition: background-color 0.2s ease, color 0.2s ease;
}

body {
    font-size: 0.95rem;
    line-height: 1.6;
}

a,
.btn-link {
    color: inherit;
}

h1:focus {
    outline: none;
}

.page-shell {
    padding: 1.15rem 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-card,
.surface-card {
    border-radius: 0.45rem;
    border: 1px solid var(--border-subtle);
    background: var(--surface-1);
    box-shadow: var(--card-shadow);
}

.hero-card {
    padding: 1.6rem;
}

.hero-card.compact {
    padding: 1.35rem 1.5rem;
}

.hero-grid,
.page-title-row,
.leaderboard-row,
.activity-row,
.legend-row,
.leaderboard-profile,
.metric-header,
.metric-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.hero-grid {
    align-items: end;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.mini-stat {
    padding: 1rem 1.1rem;
    border-radius: 0.75rem;
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
}

.mini-stat strong {
    display: block;
    font-size: 1.45rem;
    margin-top: 0.25rem;
}

.mini-stat-label,
.section-kicker {
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.74rem;
    font-weight: 700;
}

.page-title {
    margin: 0.35rem 0 0.5rem;
    font-size: clamp(1.6rem, 2.5vw, 2rem);
    line-height: 1.1;
    color: var(--text-primary);
}

.section-title {
    margin: 0.25rem 0 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.page-description,
.muted-text {
    color: var(--text-secondary);
}

.metrics-grid,
.content-grid,
.inventory-grid,
.profile-grid,
.stat-grid,
.module-grid {
    display: grid;
    gap: 1rem;
}

.metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.content-grid.two-column,
.profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inventory-grid,
.module-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.surface-card {
    padding: 1rem;
}

.metric-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.metric-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.625rem;
    background: var(--brand-light);
    font-size: 1.1rem;
}

.dark-mode .metric-icon {
    background: rgba(232, 93, 4, 0.14);
}

.metric-label {
    display: block;
    color: var(--text-secondary);
}

.metric-value {
    font-size: 1.5rem;
    line-height: 1.1;
}

.metric-badge,
.chip,
.status-pill,
.tab-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.metric-badge,
.chip,
.tab-chip {
    border: 1px solid var(--border-subtle);
    background: var(--surface-2);
    color: var(--text-secondary);
}

.chip-emphasis,
.tab-chip.active {
    background: rgba(232, 93, 4, 0.10);
    border-color: rgba(232, 93, 4, 0.28);
    color: var(--brand);
}

.dark-mode .chip-emphasis,
.dark-mode .tab-chip.active {
    background: rgba(232, 93, 4, 0.16);
    border-color: rgba(232, 93, 4, 0.35);
    color: #fff;
}

.trend-positive {
    color: #9ae6b4;
}

.trend-negative {
    color: #ffd08a;
}

.sparkline {
    height: 3rem;
    display: flex;
    align-items: end;
    gap: 0.35rem;
}

.spark-bar {
    flex: 1 1 0;
    border-radius: 999px 999px 0 0;
    background: var(--brand);
}

.chart-bars {
    min-height: 17rem;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: end;
    margin-top: 1rem;
}

.chart-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
}

.chart-bar {
    width: 100%;
    min-height: 2.5rem;
    border-radius: 1rem 1rem 0.6rem 0.6rem;
    background: var(--brand);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.bar-value {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.bar-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.donut-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
}

.donut-chart {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin-inline: auto;
}

.donut-hole {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(11, 13, 19, 0.96);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.donut-hole strong {
    font-size: 2rem;
    line-height: 1;
}

.donut-hole span,
.legend-list {
    color: var(--text-secondary);
}

.legend-list,
.activity-list,
.leaderboard-list,
.department-list,
.detail-stack {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.legend-dot {
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    display: inline-flex;
}

.activity-row,
.leaderboard-row,
.department-item,
.detail-card,
.kanban-card,
.module-card {
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-subtle);
    background: var(--surface-2);
}

.module-card-active {
    border-color: rgba(232, 93, 4, 0.28);
    background: rgba(232, 93, 4, 0.06);
}

.dark-mode .module-card-active {
    background: rgba(232, 93, 4, 0.1);
}

.activity-meta,
.leaderboard-stats {
    min-width: 10rem;
    text-align: right;
}

.status-pill {
    background: color-mix(in srgb, var(--status-color) 18%, transparent);
    color: var(--status-color);
    border: 1px solid color-mix(in srgb, var(--status-color) 35%, transparent);
}

.avatar-circle {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
}

.progress-thin {
    width: 100%;
    height: 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin-block: 0.35rem;
}

.progress-thin > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--brand);
}

.filter-grid,
.split-grid,
.payment-summary,
.kanban-board {
    display: grid;
    gap: 1rem;
}

.filter-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.split-grid {
    grid-template-columns: 280px minmax(0, 1fr);
}

.payment-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kanban-board {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
}

.kanban-column {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem;
    border-radius: 0.75rem;
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
}

.kanban-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
}

.kanban-card {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.kanban-card .page-title-row {
    flex-wrap: wrap;
    row-gap: 0.35rem;
    align-items: flex-start;
}

.kanban-card .page-title-row .badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    align-items: center;
}

.ticket-meta,
.stack-grid {
    display: grid;
    gap: 0.75rem;
}

.ticket-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stack-grid.two-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stack-grid.three-up {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.department-item.active {
    border-color: rgba(232, 93, 4, 0.30);
    background: rgba(232, 93, 4, 0.06);
}

.dark-mode .department-item.active {
    background: rgba(232, 93, 4, 0.12);
}

.tabs-inline {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tab-chip {
    border: 0;
}

.dark-table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-primary);
    --bs-table-border-color: var(--border-subtle);
    --bs-table-striped-bg: var(--surface-2);
    --bs-table-hover-bg: var(--surface-2);
    margin-bottom: 0;
}

.dark-table th {
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.table-avatar {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.action-link {
    color: var(--ui-text-link);
    text-decoration: none;
    font-weight: 600;
}

/* Dashboard command center */
.ops-dashboard {
    gap: 1.25rem;
}

.ops-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: stretch;
    gap: 1rem;
    padding: 1.4rem;
    background: var(--surface-1);
}

.ops-hero-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.ops-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1rem;
}

.ops-now-card {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    border: 1px solid rgba(230, 166, 46, 0.22);
    border-radius: 0.75rem;
    padding: 1rem;
    background: rgba(7, 20, 38, 0.34);
}

.ops-now-header,
.ops-card-top,
.ops-order-meta,
.ops-report-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ops-now-header {
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.live-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16);
}

.ops-now-card > strong {
    font-size: 1.8rem;
    line-height: 1;
}

.ops-pressure-bar {
    height: 0.5rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.ops-pressure-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.ops-now-grid,
.ops-decision-grid,
.ops-mode-grid,
.ops-ledger,
.ops-report-groups {
    display: grid;
    gap: 0.85rem;
}

.ops-now-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ops-now-grid div,
.ops-mode-grid div,
.ops-ledger div {
    min-width: 0;
    border: 1px solid var(--border-subtle);
    border-radius: 0.625rem;
    padding: 0.75rem;
    background: var(--surface-2);
}

.ops-now-grid span,
.ops-mode-grid span,
.ops-ledger span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.ops-now-grid strong,
.ops-mode-grid strong,
.ops-ledger strong {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.ops-decision-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.ops-decision-card {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    border-top: 3px solid var(--border-subtle);
}

.ops-decision-card.good {
    border-top-color: #10b981;
}

.ops-decision-card.warning {
    border-top-color: #f59e0b;
}

.ops-decision-card.danger {
    border-top-color: #ef4444;
}

.ops-decision-card.neutral {
    border-top-color: #3b82f6;
}

.executive-dashboard {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    gap: 1.15rem;
}

.executive-brief {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(270px, 0.38fr);
    gap: 1rem;
    overflow: visible;
    padding: 1rem;
    color: #fff;
    background: var(--surface-1);
}

.executive-brief::after {
    content: none;
}

.executive-brief-copy {
    min-width: 0;
}

.executive-brief .page-title {
    max-width: 720px;
    margin: 0.2rem 0 0.35rem;
    color: #fff;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.executive-brief .page-description {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.68);
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.5;
}

.executive-eyebrow,
.executive-pulse-header,
.executive-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.executive-eyebrow {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.7rem;
    font-weight: 600;
}

.executive-brief .section-kicker {
    display: none;
}

.executive-story {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    max-width: 760px;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.executive-story-icon {
    flex: 0 0 auto;
    width: 1.8rem;
    height: 1.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #071426;
    background: var(--brand);
}

.executive-story span,
.executive-story strong,
.executive-story p {
    display: block;
}

.executive-story span {
    display: none;
}

.executive-story strong {
    margin-top: 0;
    font-size: 0.85rem;
}

.executive-story p {
    margin: 0.2rem 0 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.75rem;
}

.executive-pulse {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    gap: 0.35rem;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.4rem;
    background: #090909;
}

.executive-pulse-header > div {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.executive-health {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.14);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.executive-health.watch {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.14);
}

.executive-health.high {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.14);
}

.executive-pulse > strong {
    margin-top: auto;
    font-size: 2rem;
    line-height: 1;
    letter-spacing: -0.05em;
}

.executive-pulse > span,
.executive-pulse > small {
    color: rgba(255, 255, 255, 0.58);
}

.executive-pulse .ops-pressure-bar {
    margin: 0.35rem 0;
}

.executive-pulse-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.executive-pulse-stats div {
    padding: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.3rem;
    background: var(--ui-panel-base);
}

.executive-pulse-stats strong,
.executive-pulse-stats span {
    display: block;
}

.executive-pulse-stats strong {
    font-size: 0.95rem;
}

.executive-pulse-stats span {
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.68rem;
}

.light-mode .executive-brief {
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.light-mode .executive-brief .page-title,
.light-mode .executive-pulse > strong {
    color: var(--text-primary);
}

.light-mode .executive-brief .page-description,
.light-mode .executive-story p,
.light-mode .executive-eyebrow,
.light-mode .executive-pulse-header > div,
.light-mode .executive-pulse > span,
.light-mode .executive-pulse > small,
.light-mode .executive-pulse-stats span {
    color: var(--text-secondary);
}

.light-mode .executive-story {
    border-top-color: var(--border-subtle);
}

.light-mode .executive-pulse {
    border-color: var(--border-subtle);
    background: var(--surface-2);
}

.light-mode .executive-pulse-stats div {
    border-color: var(--border-subtle);
    background: var(--surface-1);
}

.light-mode .executive-health {
    color: var(--order-positive-text);
    background: var(--order-positive-surface);
}

.light-mode .executive-health.watch {
    color: var(--light-warning-text);
    background: var(--light-warning-bg);
}

.light-mode .executive-health.high {
    color: var(--light-danger-text);
    background: var(--light-danger-bg);
}

.executive-section-heading {
    margin-bottom: 0.6rem;
}

.executive-section-heading.compact {
    margin-bottom: 0;
}

.executive-section-heading .section-title {
    margin-top: 0;
    font-size: 0.92rem;
    font-weight: 600;
}

.executive-dashboard > section:not(.executive-brief) .section-kicker {
    display: none;
}

.executive-loading {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.executive-loading span {
    height: 128px;
    border: 1px solid var(--border-subtle);
    border-radius: 0.45rem;
    background: var(--surface-1);
    animation: executive-pulse-loading 1.4s ease-in-out infinite alternate;
}

@keyframes executive-pulse-loading {
    from { opacity: 0.55; }
    to { opacity: 1; }
}

.executive-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.65rem;
}

.executive-kpi-card {
    min-height: 126px;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    border-top: 1px solid var(--border-subtle);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.executive-kpi-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--card-shadow-elevated);
}

.executive-kpi-card.good {
    border-top-color: #10b981;
}

.executive-kpi-card.warning {
    border-top-color: #f59e0b;
}

.executive-kpi-card.danger {
    border-top-color: #ef4444;
}

.executive-kpi-card.neutral {
    border-top-color: #3b82f6;
}

.executive-chip {
    max-width: 100%;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    color: var(--text-secondary);
    background: var(--surface-2);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.executive-decision-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.executive-decision-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
    min-height: 145px;
    border-left: 1px solid #10b981;
}

.executive-decision-card.warning {
    border-left-color: #f59e0b;
}

.executive-decision-card.danger {
    border-left-color: #ef4444;
}

.executive-decision-icon {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.35rem;
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
}

.executive-decision-card.warning .executive-decision-icon {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
}

.executive-decision-card.danger .executive-decision-icon {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

.executive-decision-card strong {
    display: block;
    margin-top: 0.2rem;
    font-size: 1.1rem;
}

.executive-decision-card p {
    min-height: 2.7rem;
    margin: 0.35rem 0 0.85rem;
    font-size: 0.75rem;
}

.executive-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--brand-strong);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
}

.executive-action:hover {
    color: var(--brand);
}

.executive-action i {
    transition: transform 0.18s ease;
}

.executive-action:hover i {
    transform: translateX(3px);
}

.executive-summary-card {
    min-width: 0;
}

.executive-story-grid {
    align-items: stretch;
}

.executive-summary-card .ops-ledger {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.executive-operations-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
}

.executive-card-title {
    margin: 0.15rem 0 0;
    font-size: 0.92rem;
}

.executive-flow {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-top: 1rem;
}

.executive-flow-row {
    display: grid;
    grid-template-columns: 78px minmax(100px, 1fr) 34px 110px;
    align-items: center;
    gap: 0.75rem;
}

.executive-flow-row > span {
    font-size: 0.78rem;
    font-weight: 700;
}

.executive-flow-row > div {
    height: 0.5rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--surface-3);
}

.executive-flow-row > div span {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.executive-flow-row strong {
    text-align: right;
}

.executive-flow-row small {
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.executive-insight {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin: 1rem 0 0;
    padding: 0.65rem;
    border-radius: 0.35rem;
    color: var(--text-secondary);
    background: var(--surface-accent);
    font-size: 0.8rem;
}

.executive-insight i {
    margin-top: 0.1rem;
    color: var(--brand);
}

.executive-order-list {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: 1rem;
}

.executive-order-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.executive-order-row:last-child {
    border-bottom: 0;
}

.executive-order-status {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--status-color);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--status-color) 16%, transparent);
}

.executive-order-row > div {
    min-width: 0;
}

.executive-order-row > div:last-child {
    text-align: right;
}

.executive-order-row strong,
.executive-order-row span {
    display: block;
}

.executive-order-row div span {
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.risk-text {
    color: var(--warning) !important;
    font-weight: 700;
}

.executive-empty-state {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-align: center;
}

.executive-empty-state i {
    margin-bottom: 0.5rem;
    color: var(--success);
    font-size: 2rem;
}

.executive-quality {
    display: grid;
    grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1.3fr);
    gap: 1rem;
    margin-top: 1.25rem;
}

.executive-rating {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem;
    border-radius: 0.65rem;
    background: var(--surface-accent);
}

.executive-rating span,
.executive-rating small,
.executive-quality-list span,
.executive-stock-summary span,
.executive-stock-summary small {
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.executive-rating strong {
    margin: 0.35rem 0;
    font-size: 2rem;
}

.executive-quality-list {
    display: flex;
    flex-direction: column;
}

.executive-quality-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.executive-quality-list div:last-child {
    border-bottom: 0;
}

.executive-stock-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.executive-stock-summary div {
    padding: 0.75rem;
    border: 1px solid var(--border-subtle);
    border-radius: 0.35rem;
    background: var(--surface-2);
}

.executive-stock-summary div.warning {
    border-color: rgba(245, 158, 11, 0.35);
}

.executive-stock-summary div.danger {
    border-color: rgba(239, 68, 68, 0.35);
}

.executive-stock-summary span,
.executive-stock-summary strong,
.executive-stock-summary small {
    display: block;
}

.executive-stock-summary strong {
    margin: 0.25rem 0;
    font-size: 1.35rem;
}

.ops-card-top {
    justify-content: space-between;
}

.ops-icon {
    width: 2.35rem;
    height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.625rem;
    color: var(--brand);
    background: var(--brand-light);
    font-size: 1.05rem;
}

.ops-alert-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.ops-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-left: 3px solid #10b981;
}

.ops-alert strong {
    display: block;
    margin: 0.25rem 0;
    font-size: 1.2rem;
}

.ops-alert.warning {
    border-left-color: #f59e0b;
}

.ops-alert.danger {
    border-left-color: #ef4444;
}

.ops-order-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.ops-order-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: 0.75rem;
    padding: 0.8rem 0.9rem;
    background: var(--surface-2);
}

.ops-order-main {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.35rem 0.7rem;
}

.ops-order-main .muted-text {
    grid-column: 2;
}

.ops-order-meta {
    justify-content: flex-end;
    flex-wrap: wrap;
    max-width: 260px;
}

.ops-paid,
.ops-unpaid {
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.ops-paid {
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
}

.ops-unpaid {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.14);
}

.ops-pipeline {
    margin-top: 1rem;
}

.compact-bars {
    height: 130px;
    margin-top: 1.2rem;
}

.ops-ledger,
.ops-mode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ops-report-groups {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ops-report-links {
    flex-direction: column;
    align-items: flex-start;
    margin-top: 0.8rem;
}

@media (max-width: 1200px) {
    .ops-decision-grid,
    .executive-loading {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ops-alert-strip,
    .ops-report-groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .executive-brief {
        grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    }
}

@media (max-width: 900px) {
    .ops-hero,
    .ops-alert-strip,
    .ops-report-groups,
    .executive-brief,
    .executive-decision-grid,
    .executive-operations-grid {
        grid-template-columns: 1fr;
    }

    .ops-decision-grid,
    .executive-loading {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .executive-summary-card .ops-ledger {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ops-order-row {
        grid-template-columns: 1fr;
    }

    .ops-order-meta {
        justify-content: flex-start;
        max-width: none;
    }
}

@media (max-width: 640px) {
    .ops-hero {
        padding: 1rem;
    }

    .ops-decision-grid,
    .executive-loading,
    .ops-ledger,
    .ops-mode-grid,
    .ops-now-grid {
        grid-template-columns: 1fr;
    }

    .executive-dashboard {
        gap: 1.5rem;
    }

    .executive-brief {
        padding: 1.25rem;
    }

    .executive-brief .page-title {
        font-size: 2rem;
    }

    .executive-eyebrow,
    .executive-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .executive-pulse-stats,
    .executive-stock-summary,
    .executive-quality {
        grid-template-columns: 1fr;
    }

    .executive-summary-card .ops-ledger {
        grid-template-columns: 1fr;
    }

    .executive-flow-row {
        grid-template-columns: 66px minmax(70px, 1fr) 28px;
    }

    .executive-flow-row small {
        display: none;
    }

    .ops-alert {
        align-items: flex-start;
        flex-direction: column;
    }

    .ops-order-main {
        grid-template-columns: 1fr;
    }

    .ops-order-main .muted-text {
        grid-column: auto;
    }
}

.detail-card {
    padding: 1rem;
}

.detail-card strong,
.metric-copy strong,
.mini-stat strong,
.module-card strong {
    color: var(--text-primary);
}

.highlight-stat {
    padding: 1rem;
    border-radius: 0.75rem;
    background: rgba(232, 93, 4, 0.08);
    border: 1px solid rgba(232, 93, 4, 0.18);
}

.dark-mode .highlight-stat {
    background: rgba(232, 93, 4, 0.12);
    border-color: rgba(232, 93, 4, 0.22);
}

.highlight-stat strong {
    display: block;
    font-size: 1.6rem;
    line-height: 1.1;
    margin-top: 0.35rem;
}

.blazor-error-boundary {
    background: #7f1d1d;
    color: #fff;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    margin: 1rem;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ── Slide-over panel ─────────────────────────────────────────────── */
.slide-over-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
}

.slide-over {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: calc(100vw - 2rem);
    background: var(--surface-1);
    border-left: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    z-index: 1001;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
}

.slide-over-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.35rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    gap: 1rem;
}

.slide-over-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.slide-over-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    border-top: 1px solid var(--border-subtle);
    padding-top: 1rem;
    margin-top: 1rem;
}

.payments-terms-dialog {
    position: fixed;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: min(560px, calc(100vw - 2rem));
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: 1rem;
    z-index: 1001;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
}

.payments-terms-dialog__header,
.payments-terms-dialog__footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
}

.payments-terms-dialog__header {
    border-bottom: 1px solid var(--border-subtle);
}

.payments-terms-dialog__body {
    padding: 1.5rem;
}

.payments-terms-dialog__footer {
    justify-content: flex-end;
    border-top: 1px solid var(--border-subtle);
}

.payments-terms-list {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--text-secondary);
}

.payments-terms-list li + li {
    margin-top: 0.75rem;
}

/* ── Payments confirm dialog ───────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.payment-confirm-dialog {
    width: min(440px, 100%);
    pointer-events: auto;
    z-index: 1001;
}

/* ── Button variants ──────────────────────────────────────────────── */
.btn-brand {
    background: var(--brand);
    color: #fff;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    font-weight: 600;
}

.btn-brand:hover,
.btn-brand:focus {
    background: var(--brand-strong);
    color: #fff;
}

.btn-ghost {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    border-radius: 0.5rem;
    font-weight: 500;
}

.btn-ghost:hover,
.btn-ghost:focus {
    background: var(--surface-3);
    color: var(--text-primary);
}

.btn-danger-outline {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: #ef4444;
    border-radius: 0.5rem;
    font-weight: 500;
}

.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
}

/* ── Search input (compact toolbar variant) ───────────────────────── */
.search-input-sm {
    background: var(--surface-2) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
    border-radius: 0.5rem;
    min-width: 200px;
}

.search-input-sm::placeholder {
    color: var(--text-muted);
}

.search-input-sm:focus {
    background: var(--surface-1) !important;
    border-color: rgba(232, 93, 4, 0.45) !important;
    box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.10) !important;
    outline: none;
}

/* ── Empty state ──────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-state-icon {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.empty-state p {
    margin-bottom: 1rem;
}

@media (max-width: 1400px) {
    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inventory-grid,
    .module-grid,
    .stat-grid,
    .payment-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1200px) {
    .content-grid.two-column,
    .profile-grid,
    .split-grid,
    .donut-layout,
    .kanban-board {
        grid-template-columns: 1fr;
    }

    .filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .page-shell {
        padding: 1rem;
    }

    .hero-grid,
    .page-title-row,
    .activity-row,
    .leaderboard-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-metrics,
    .metrics-grid,
    .filter-grid,
    .inventory-grid,
    .module-grid,
    .stat-grid,
    .payment-summary,
    .stack-grid.two-up,
    .stack-grid.three-up,
    .ticket-meta {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Authentication Layout & Login Page
═══════════════════════════════════════════════════════════════ */

.auth-layout-root {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Split wrapper ── */
.login-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ── Left panel ── */
.login-panel-left {
    position: relative;
    background-color: var(--logo-dark-bg);
    background-image: url('/images/login-bg.jpg');
    background-size: cover;
    background-position: center 30%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.login-panel-left-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(7, 20, 38, 0.88) 0%,
        rgba(7, 20, 38, 0.78) 45%,
        rgba(7, 20, 38, 0.94) 100%
    );
}

.login-panel-left-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    padding: 3rem 3rem 2.5rem;
    height: 100%;
}

/* Brand lockup */
.login-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.login-brand-wordmark {
    display: block;
    width: clamp(180px, 18vw, 240px);
    height: auto;
    border-radius: 8px;
}

.login-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(230, 166, 46, 0.24);
}

.login-brand-mark img {
    width: 100%;
    height: 100%;
    display: block;
}

.login-brand-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0;
}

/* Headline */
.login-panel-headline {
    max-width: 360px;
}

.login-panel-title {
    font-size: clamp(1.7rem, 2.5vw, 2.2rem);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.15;
    margin-bottom: 0.75rem;
    letter-spacing: 0;
}

.login-panel-sub {
    color: rgba(220, 225, 240, 0.70);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 0;
}

/* Stats grid */
.login-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.login-stat {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.login-stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand);
    line-height: 1.1;
    letter-spacing: 0;
}

.login-stat-label {
    display: block;
    font-size: 0.75rem;
    color: rgba(200, 210, 230, 0.65);
    line-height: 1.4;
}

/* Feature list */
.login-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin-top: auto;
}

.login-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.login-feature-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(230, 166, 46, 0.16);
    border: 1px solid rgba(230, 166, 46, 0.24);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
    margin-top: 0.1rem;
}

.login-feature-item strong {
    display: block;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.login-feature-item p {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(200, 210, 230, 0.62);
    line-height: 1.55;
}

/* ── Right panel ── */
.login-panel-right {
    background: var(--logo-dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
}

.login-form-wrap {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Mobile logo (hidden on desktop) */
.login-mobile-brand {
    display: none;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.login-mobile-wordmark {
    display: block;
    width: 172px;
    height: auto;
    border-radius: 8px;
}

.login-form-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.login-form-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0.3rem 0 0;
    letter-spacing: 0;
    line-height: 1.15;
}

.login-form-sub {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.55;
}

/* Error banner */
.login-error-banner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.24);
    color: #dc2626;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Field */
.login-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.login-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.login-input-wrap {
    position: relative;
}

.login-input-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    display: flex;
    pointer-events: none;
}

.login-input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    border-radius: 10px;
    border: 1.5px solid var(--border-subtle);
    background: var(--surface-1);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.18s, box-shadow 0.18s;
    outline: none;
}

.login-input::placeholder {
    color: var(--text-muted);
}

.login-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(230, 166, 46, 0.14);
}

.login-field-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* Submit button */
.login-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.9rem 1.5rem;
    border-radius: 10px;
    border: none;
    background: var(--brand);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
    box-shadow: 0 4px 16px rgba(230, 166, 46, 0.28);
}

.login-submit-btn:hover:not(:disabled) {
    background: var(--brand-strong);
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(230, 166, 46, 0.36);
}

.login-submit-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(230, 166, 46, 0.22);
}

.login-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.login-spinner {
    animation: login-spin 0.8s linear infinite;
}

@keyframes login-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.login-footer-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin: 0;
    line-height: 1.55;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .login-split {
        grid-template-columns: 1fr;
    }

    .login-panel-left {
        display: none;
    }

    .login-mobile-brand {
        display: flex;
    }

    .login-panel-right {
        min-height: 100vh;
        padding: 2.5rem 1.5rem;
        align-items: flex-start;
        padding-top: 4rem;
    }
}

@media (max-width: 1200px) and (min-width: 901px) {
    .login-panel-left-content {
        padding: 2.5rem 2rem;
        gap: 2rem;
    }

    .login-panel-title {
        font-size: 1.7rem;
    }
}

/* ── Kanban order-item accordion ─────────────────────────────── */
.accordion-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.35rem 0.6rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-subtle);
    background: var(--surface-2);
    color: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s;
}

.accordion-toggle:hover {
    background: var(--surface-3);
}

.accordion-chevron {
    display: inline-block;
    transition: transform 0.2s;
    font-style: normal;
}

.accordion-chevron.open {
    transform: rotate(-180deg);
}

.order-items-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.order-item-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    padding: 0.25rem 0.4rem;
    border-radius: 0.4rem;
    background: var(--surface-1);
}

.order-item-addon {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    padding: 0.15rem 0.4rem 0.15rem 1.4rem;
    border-left: 2px solid rgba(245, 158, 11, 0.4);
    margin-left: 0.5rem;
    color: #f59e0b;
    font-weight: 500;
    list-style: none;
}

.order-item-note {
    font-size: 0.74rem;
    padding: 0 0.4rem 0.15rem;
    color: var(--text-secondary);
    list-style: none;
    font-style: italic;
}

.order-total {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: 0.35rem 0.4rem 0.1rem;
    border-top: 1px solid var(--border-subtle);
    margin-top: 0.15rem;
}

/* ── Setup Wizard ──────────────────────────────────────────────────────────── */

.setup-wizard {
    max-width: 640px;
    margin: 0 auto;
    padding: 2.5rem 1rem 4rem;
}

.setup-wizard__header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.setup-wizard__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--brand);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 1.2rem;
}

.setup-wizard__title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.4rem;
}

.setup-wizard__subtitle {
    color: var(--text-secondary);
    margin: 0;
}

/* Progress bar */
.setup-wizard__progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    row-gap: 0.5rem;
}

.setup-wizard__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.setup-wizard__step-dot {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--surface-2);
    border: 2px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.setup-wizard__step--active .setup-wizard__step-dot {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.setup-wizard__step--done .setup-wizard__step-dot {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.setup-wizard__step-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.setup-wizard__step--active .setup-wizard__step-label {
    color: var(--brand);
    font-weight: 600;
}

.setup-wizard__step--done .setup-wizard__step-label {
    color: var(--success);
}

.setup-wizard__step-line {
    flex: 1;
    min-width: 24px;
    height: 2px;
    background: var(--border-subtle);
    margin-bottom: 1.4rem;
    transition: background 0.2s;
}

.setup-wizard__step-line--done {
    background: var(--success);
}

/* Card */
.setup-wizard__card {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--card-shadow);
}

/* Step content */
.setup-wizard__step-heading {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.4rem;
}

.setup-wizard__step-desc {
    color: var(--text-secondary);
    margin: 0 0 1.5rem;
    font-size: 0.9rem;
}

/* Fields */
.setup-wizard__field {
    margin-bottom: 1.2rem;
}

.setup-wizard__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.setup-wizard__input {
    width: 100%;
    padding: 0.55rem 0.8rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-subtle);
    background: var(--surface-0);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    box-sizing: border-box;
}

.setup-wizard__file-input {
    display: block;
    width: 100%;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Actions */
.setup-wizard__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.setup-wizard__btn {
    padding: 0.55rem 1.4rem;
    border-radius: 0.5rem;
    font-size: 0.88rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.15s, background 0.15s;
    font-family: inherit;
}

.setup-wizard__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.setup-wizard__btn--primary {
    background: var(--brand);
    color: #fff;
}

.setup-wizard__btn--primary:hover:not(:disabled) {
    background: var(--brand-strong);
}

.setup-wizard__btn--secondary {
    background: var(--surface-2);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.setup-wizard__btn--ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

/* Alerts */
.setup-wizard__alert {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    margin-bottom: 1.2rem;
}

.setup-wizard__alert--error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.setup-wizard__alert--success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Summary */
.setup-wizard__summary {
    background: var(--surface-2);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.2rem;
}

.setup-wizard__summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.87rem;
    padding: 0.2rem 0;
}

.setup-wizard__summary-label {
    color: var(--text-secondary);
}

.setup-wizard__summary-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* QR */
.setup-wizard__qr-block {
    text-align: center;
    margin: 1.5rem 0;
}

.setup-wizard__qr-img {
    width: 200px;
    height: 200px;
    border-radius: 0.5rem;
    border: 4px solid var(--surface-2);
}

.setup-wizard__qr-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

.setup-wizard__qr-url {
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 0.5rem;
    word-break: break-all;
}

/* Scan status */
.setup-wizard__scan-status {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
}

/* Cover image preview */
.setup-wizard__cover-preview {
    margin: 1rem 0;
    border-radius: 0.5rem;
    overflow: hidden;
}

.setup-wizard__cover-img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 0.5rem;
}

/* Spinner */
.setup-wizard__spinner {
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Wizard Layout ─────────────────────────────────────────────────────────── */

.wizard-layout {
    min-height: 100vh;
    background: var(--surface-0);
    display: flex;
    flex-direction: column;
}

.wizard-layout__header {
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--surface-1);
}

.wizard-layout__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.layout-brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: block;
    flex: 0 0 auto;
}

.layout-brand-wordmark {
    display: block;
    width: 172px;
    height: auto;
    border-radius: 8px;
    flex: 0 0 auto;
}

.wizard-layout__body {
    flex: 1;
    overflow-y: auto;
}

/* ── Register Layout ───────────────────────────────────────────────────────── */

.register-layout {
    min-height: 100vh;
    background: var(--surface-0);
    display: flex;
    flex-direction: column;
}

.register-layout__header {
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--surface-1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.register-layout__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.register-layout__login-link {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
}

.register-layout__login-link:hover {
    color: var(--brand);
}

.register-layout__body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.register-layout__footer {
    padding: 1rem 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-subtle);
}

/* ── Register Page ─────────────────────────────────────────────────────────── */

.register-page {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.register-page__card {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: 1rem;
    padding: 2.25rem 2rem;
    box-shadow: var(--card-shadow);
}

.register-page__header {
    margin-bottom: 1.75rem;
}

.register-page__kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--brand);
    display: block;
    margin-bottom: 0.4rem;
}

.register-page__title {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.register-page__sub {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.55;
}

.register-page__alert {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.register-page__alert--error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.register-page__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.register-page__field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.register-page__label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.register-page__required {
    color: var(--danger);
}

.register-page__input {
    padding: 0.6rem 0.85rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-subtle);
    background: var(--surface-0);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.15s;
    box-sizing: border-box;
    width: 100%;
}

.register-page__input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.1);
}

.register-page__submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.7rem 1.5rem;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 0.6rem;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 0.25rem;
}

.register-page__submit-btn:hover:not(:disabled) {
    background: var(--brand-strong);
}

.register-page__submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.register-page__spinner {
    animation: spin 0.7s linear infinite;
}

.register-page__footer-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin: 0;
}

.register-page__footer-note a {
    color: var(--brand);
    text-decoration: none;
}

.register-page__footer-note a:hover {
    text-decoration: underline;
}

/* Success state */
.register-page__success {
    text-align: center;
    padding: 1rem 0;
}

.register-page__success-icon {
    color: var(--success);
    margin-bottom: 0.75rem;
}

.register-page__success-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.register-page__success-body {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 1.25rem;
}

.register-page__back-link {
    font-size: 0.875rem;
    color: var(--brand);
    text-decoration: none;
    font-weight: 500;
}

.register-page__back-link:hover {
    text-decoration: underline;
}

/* ── Wizard Operating Hours Grid ───────────────────────────────────────────── */

.setup-wizard__hours-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setup-wizard__hours-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.setup-wizard__hours-day {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    width: 2.8rem;
    flex-shrink: 0;
}

.setup-wizard__hours-input {
    padding: 0.3rem 0.5rem;
    border-radius: 0.4rem;
    border: 1px solid var(--border-subtle);
    background: var(--surface-0);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: inherit;
    width: 7rem;
}

.setup-wizard__hours-sep {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.setup-wizard__hours-closed-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    flex: 1;
}

.setup-wizard__hours-closed-check {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    margin-left: auto;
}


/* ═══════════════════════════════════════════════════════════════════════════
   WAITER MODE
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Floor map table grid ───────────────────────────────────────────────── */

.waiter-table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.85rem;
}

.waiter-table-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 1rem 0.75rem;
    border-radius: 0.75rem;
    border: 2px solid var(--border-subtle);
    background: var(--surface-2);
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
    text-align: center;
    font-family: inherit;
}

.waiter-table-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-elevated);
}

.waiter-table-label {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.waiter-table-status {
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

.waiter-table-orders {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.waiter-table-card.status-idle .waiter-table-status {
    background: var(--surface-3);
    color: var(--text-muted);
}

.waiter-table-card.status-pending {
    border-color: rgba(245, 158, 11, 0.5);
}

.waiter-table-card.status-pending .waiter-table-status {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.waiter-table-card.status-inprogress {
    border-color: rgba(59, 130, 246, 0.5);
}

.waiter-table-card.status-inprogress .waiter-table-status {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

.waiter-table-card.status-ready {
    border-color: rgba(16, 185, 129, 0.5);
}

.waiter-table-card.status-ready .waiter-table-status {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

/* ── Table view layout ──────────────────────────────────────────────────── */

.waiter-table-view {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.waiter-tv-topbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--surface-1);
    flex-shrink: 0;
}

.waiter-tv-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}

.waiter-tv-body {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 0;
    flex: 1;
    overflow: hidden;
}

.waiter-tv-menu {
    overflow-y: auto;
    padding: 1rem 1.25rem;
    border-right: 1px solid var(--border-subtle);
}

.waiter-tv-sidebar {
    overflow-y: auto;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.waiter-tv-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--brand);
    margin-bottom: 0.65rem;
}

/* ── Category tabs ──────────────────────────────────────────────────────── */

.waiter-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.waiter-cat-btn {
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: var(--surface-2);
    color: var(--text-secondary);
    font-size: 0.82rem;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.waiter-cat-btn.active,
.waiter-cat-btn:hover {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

/* ── Menu item cards ────────────────────────────────────────────────────── */

.waiter-menu-items {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.waiter-menu-item-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.65rem;
    border: 1px solid var(--border-subtle);
    background: var(--surface-1);
    cursor: pointer;
    transition: box-shadow 0.12s, border-color 0.12s;
}

.waiter-menu-item-card:hover {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(232, 93, 4, 0.12);
}

.waiter-menu-item-img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 0.4rem;
    flex-shrink: 0;
}

.waiter-menu-item-info {
    flex: 1;
    min-width: 0;
}

.waiter-menu-item-name {
    display: block;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.waiter-menu-item-desc {
    font-size: 0.77rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.waiter-menu-item-price {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--brand);
    margin-top: 0.15rem;
}

.waiter-add-btn {
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 1rem;
}

/* ── Cart ───────────────────────────────────────────────────────────────── */

.waiter-cart-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.waiter-cart-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.6rem;
    border-radius: 0.55rem;
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
}

.waiter-cart-row-name {
    flex: 1;
    min-width: 0;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.waiter-cart-row-controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.qty-btn {
    background: var(--surface-3);
    border: 1px solid var(--border-subtle);
    border-radius: 0.3rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-family: inherit;
    line-height: 1;
}

.qty-val {
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.waiter-cart-row-price {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--brand);
    white-space: nowrap;
}

.waiter-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-subtle);
    margin-top: 0.25rem;
    font-size: 0.9rem;
}

/* ── Waiter order cards ─────────────────────────────────────────────────── */

.waiter-order-card {
    border-radius: 0.65rem;
    border: 1px solid var(--border-subtle);
    background: var(--surface-1);
    padding: 0.85rem 1rem;
    margin-bottom: 0.6rem;
}

.waiter-order-card.is-ready {
    border-color: rgba(16, 185, 129, 0.45);
    background: rgba(16, 185, 129, 0.05);
}

.waiter-order-card.is-inprogress {
    border-color: rgba(59, 130, 246, 0.35);
}

.waiter-order-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.waiter-order-items {
    list-style: none;
    padding: 0;
    margin: 0 0 0.5rem 0;
    font-size: 0.83rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.item-qty {
    font-weight: 700;
    margin-right: 0.3rem;
    color: var(--brand);
}

.item-choices {
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-left: 0.3rem;
}

.item-note {
    color: var(--text-secondary);
    font-size: 0.78rem;
    margin-left: 1.5rem;
}

.waiter-order-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-subtle);
}

.waiter-order-total {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.waiter-order-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* ── Item add sheet ─────────────────────────────────────────────────────── */

.waiter-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1rem;
}

.waiter-sheet {
    background: var(--surface-1);
    border-radius: 1rem 1rem 0.5rem 0.5rem;
    padding: 1.5rem;
    width: 100%;
    max-width: 540px;
    max-height: 85vh;
    overflow-y: auto;
}

.waiter-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
}

.waiter-option-group {
    margin-bottom: 1rem;
}

.waiter-option-group-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
}

.waiter-option-choice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    cursor: pointer;
    font-size: 0.88rem;
}

.waiter-sheet-qty-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ── Status pill ────────────────────────────────────────────────────────── */

.status-pill {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--status-color) 40%, transparent);
    background: color-mix(in srgb, var(--status-color) 14%, transparent);
    color: var(--status-color);
    white-space: nowrap;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .waiter-tv-body {
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .waiter-tv-menu {
        border-right: none;
        border-bottom: none; /* no divider needed since sidebar is now off-canvas */
    }

    /* ── Cart slide-in drawer ─────────────────────────────────────────── */
    .waiter-tv-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(88vw, 380px);
        z-index: 1050;
        background: var(--surface-1);
        border-left: 1px solid var(--border-subtle);
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
        overflow-y: auto;
        padding: 1rem 1.1rem 2rem;
        transform: translateX(100%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .waiter-tv-sidebar.cart-drawer-open {
        transform: translateX(0);
    }
}

/* ── Cart FAB (mobile only) ─────────────────────────────────────────────── */
.waiter-cart-fab {
    display: none; /* hidden by default; shown via media query below */
}

@media (max-width: 768px) {
    .waiter-cart-fab {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 1.5rem;
        right: 1.5rem;
        z-index: 1040;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: var(--brand);
        color: #fff;
        border: none;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
        font-size: 1.35rem;
        cursor: pointer;
        transition: transform 0.15s ease, box-shadow 0.15s ease;
    }

    .waiter-cart-fab:hover {
        transform: scale(1.07);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
    }

    .waiter-cart-fab-badge {
        position: absolute;
        top: 6px;
        right: 6px;
        background: #fff;
        color: var(--brand);
        border-radius: 999px;
        font-size: 0.68rem;
        font-weight: 700;
        min-width: 17px;
        height: 17px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 3px;
        line-height: 1;
    }
}

/* ── Cart drawer backdrop (mobile) ──────────────────────────────────────── */
.waiter-cart-backdrop {
    display: none;
}

@media (max-width: 768px) {
    .waiter-cart-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1045;
        background: rgba(0, 0, 0, 0.45);
        animation: fadeInBackdrop 0.2s ease;
    }

    @keyframes fadeInBackdrop {
        from { opacity: 0; }
        to   { opacity: 1; }
    }
}

/* ── Drawer header (close button row) ───────────────────────────────────── */
.waiter-cart-drawer-header {
    display: none; /* only shown in mobile drawer mode */
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .waiter-cart-drawer-header {
        display: flex;
    }
}

.waiter-cart-drawer-close {
    background: var(--surface-3);
    border: 1px solid var(--border-subtle);
    border-radius: 0.4rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.85rem;
    transition: background 0.12s;
}

.waiter-cart-drawer-close:hover {
    background: var(--surface-4, var(--surface-3));
}

/* ── Modal overlay ──────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-dialog {
    padding: 1.5rem;
    border-radius: 0.75rem;
    animation: modal-in 0.15s ease;
}

@keyframes modal-in {
    from { opacity: 0; transform: scale(0.96) translateY(-8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Waiter menu discovery */
.waiter-menu-toolbar {
    position: sticky;
    top: -1rem;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.6rem;
    padding: 1rem 0 0.75rem;
    margin-top: -1rem;
    background: var(--surface-1);
}

.waiter-menu-search {
    min-width: 0;
    height: 42px;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) 32px;
    align-items: center;
    gap: 0.4rem;
    padding: 0 0.55rem 0 0.75rem;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--text-muted);
}

.waiter-menu-search:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.12);
}

.waiter-menu-search input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: 0.88rem;
}

.waiter-menu-search input::placeholder {
    color: var(--text-muted);
}

.waiter-search-clear,
.waiter-filter-close {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.waiter-search-clear:hover,
.waiter-filter-close:hover {
    color: var(--text-primary);
}

.waiter-filter-button {
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0 0.8rem;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: var(--surface-1);
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 650;
    cursor: pointer;
}

.waiter-filter-button:hover,
.waiter-filter-button.active {
    border-color: var(--brand);
    color: var(--brand);
}

.waiter-filter-count {
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 0.7rem;
    line-height: 1;
}

.waiter-active-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: -0.25rem 0 0.65rem;
}

.waiter-active-filter {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.45rem 0.25rem 0.65rem;
    border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--border-subtle));
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand) 8%, var(--surface-1));
    color: var(--text-primary);
    font: inherit;
    font-size: 0.76rem;
    cursor: pointer;
}

.waiter-active-filter i {
    font-size: 0.9rem;
    color: var(--brand);
}

.waiter-clear-filters {
    border: 0;
    background: transparent;
    color: var(--brand);
    font: inherit;
    font-size: 0.76rem;
    font-weight: 650;
    cursor: pointer;
}

.waiter-results-meta {
    min-height: 22px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.55rem;
    color: var(--text-muted);
    font-size: 0.76rem;
}

.waiter-menu-empty {
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.waiter-menu-empty > i {
    font-size: 1.5rem;
    color: var(--brand);
}

.waiter-menu-empty strong {
    color: var(--text-primary);
}

.waiter-menu-empty span {
    font-size: 0.82rem;
}

.waiter-filter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    justify-content: flex-end;
    background: rgba(0, 0, 0, 0.48);
}

.waiter-filter-panel {
    width: min(460px, 100vw);
    height: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    background: var(--surface-1);
    border-left: 1px solid var(--border-subtle);
    box-shadow: -10px 0 32px rgba(0, 0, 0, 0.2);
}

.waiter-filter-header,
.waiter-filter-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.waiter-filter-header h3 {
    margin: 0.1rem 0 0;
    font-size: 1.05rem;
    letter-spacing: 0;
    color: var(--text-primary);
}

.waiter-filter-kicker {
    display: block;
    color: var(--brand);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.waiter-filter-content {
    overflow-y: auto;
    padding: 0 1.1rem;
}

.waiter-filter-section {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 0.75rem;
    padding: 1.15rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.waiter-filter-section:last-child {
    border-bottom: 0;
}

.waiter-filter-step {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}

.waiter-filter-section h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.9rem;
    letter-spacing: 0;
}

.waiter-filter-section p {
    margin: 0.2rem 0 0.75rem;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.waiter-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.waiter-filter-option {
    min-height: 34px;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.78rem;
    cursor: pointer;
}

.waiter-filter-option:hover,
.waiter-filter-option.selected {
    border-color: var(--brand);
    background: color-mix(in srgb, var(--brand) 10%, var(--surface-1));
    color: var(--brand);
}

.waiter-price-range {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.waiter-price-range label > span {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.waiter-price-input {
    height: 38px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.35rem;
    padding: 0 0.6rem;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 0.72rem;
}

.waiter-price-input:focus-within {
    border-color: var(--brand);
}

.waiter-price-input input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
}

.waiter-filter-toggles {
    display: grid;
    gap: 0.55rem;
}

.waiter-filter-toggles label {
    min-height: 48px;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
}

.waiter-filter-toggles input,
.waiter-sort-options input {
    width: 17px;
    height: 17px;
    accent-color: var(--brand);
}

.waiter-filter-toggles strong,
.waiter-filter-toggles small {
    display: block;
}

.waiter-filter-toggles strong {
    color: var(--text-primary);
    font-size: 0.8rem;
}

.waiter-filter-toggles small {
    margin-top: 0.1rem;
    color: var(--text-muted);
    font-size: 0.72rem;
}

.waiter-sort-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
}

.waiter-sort-options label {
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--text-secondary);
    font-size: 0.76rem;
    cursor: pointer;
}

.waiter-sort-options label.selected {
    border-color: var(--brand);
    color: var(--brand);
}

.waiter-filter-footer {
    border-top: 1px solid var(--border-subtle);
    border-bottom: 0;
}

.waiter-filter-footer .btn {
    min-width: 110px;
}

@media (max-width: 768px) {
    .waiter-menu-toolbar {
        top: 0;
    }

    .waiter-filter-button > span:not(.waiter-filter-count) {
        display: none;
    }

    .waiter-filter-button {
        width: 42px;
        padding: 0;
        position: relative;
    }

    .waiter-filter-count {
        position: absolute;
        top: -6px;
        right: -6px;
    }

    .waiter-filter-backdrop {
        align-items: flex-end;
    }

    .waiter-filter-panel {
        width: 100%;
        height: min(88vh, 760px);
        border-left: 0;
        border-top: 1px solid var(--border-subtle);
        border-radius: 8px 8px 0 0;
        box-shadow: 0 -10px 32px rgba(0, 0, 0, 0.22);
    }

    .waiter-sort-options {
        grid-template-columns: 1fr;
    }
}
