:root {
    /* ---------- Brand, from the Divine Restaurant logo ----------
       Gold is a fill with near-black text (8.1:1) or the dark --rms-accent-text (6.6:1);
       never brand gold as text on cream (2.2:1). */
    --brand-black: #0D0D0D;
    --brand-black-soft: #1A1713;
    --brand-black-line: #262019;
    --brand-gold: #C9A253;
    --brand-gold-light: #E8C468;
    --brand-gold-dark: #8B6C2E;
    --brand-gold-subtle: #FBF0D8;
    --brand-gold-text: #6B5320;
    --brand-cream: #F7F3EA;

    /* ---------- Neutral ramp (warm greys, tuned to the cream ground) ---------- */
    --rms-n-0: #FFFFFF;     /* card surface */
    --rms-n-25: #FBF8F1;    /* row hover */
    --rms-n-50: #F7F3EA;    /* app ground */
    --rms-n-100: #EFE9DC;   /* subtle fill, neutral pill */
    --rms-n-200: #E2DACA;   /* default border */
    --rms-n-300: #CFC5B0;   /* strong divider */
    --rms-n-400: #A39B8C;   /* muted text on black, 7.1:1 */
    --rms-n-500: #8A8071;   /* control border, disabled text */
    --rms-n-600: #6E6558;   /* secondary text, 5.2:1 on cream */
    --rms-n-700: #5C5347;   /* meta text, 6.8:1 */
    --rms-n-800: #3A342C;   /* sub-heading, 11.1:1 */
    --rms-n-900: #1A1713;   /* ink, 16.1:1 */

    /* ---------- Roles ---------- */
    --rms-primary: var(--brand-gold);            /* the one filled action colour */
    --rms-primary-hover: var(--brand-gold-dark);
    --rms-primary-active: var(--brand-gold-text);
    --rms-on-primary: var(--brand-black);        /* text on a gold fill */
    --rms-accent: var(--brand-gold-dark);        /* focus rings, selected borders on light */
    --rms-accent-bright: var(--brand-gold-light);/* accents on the dark bars */
    --rms-accent-subtle: var(--brand-gold-subtle);
    --rms-accent-text: var(--brand-gold-text);   /* gold as text: only this shade */

    --rms-ink: var(--rms-n-900);
    --rms-ink-soft: var(--rms-n-800);
    --rms-meta: var(--rms-n-700);
    --rms-disabled: var(--rms-n-500);
    --rms-ground: var(--rms-n-50);
    --rms-surface: var(--rms-n-0);
    --rms-surface-hover: var(--rms-n-25);
    --rms-neutral-subtle: var(--rms-n-100);
    --rms-line: var(--rms-n-200);
    --rms-line-strong: var(--rms-n-300);
    --rms-control: var(--rms-n-500);

    /* Dark surfaces: sidebar, top bar, action bar, workspace footer */
    --rms-dark: var(--brand-black);
    --rms-dark-hover: var(--brand-black-soft);
    --rms-dark-line: var(--brand-black-line);
    --rms-on-dark: var(--brand-cream);
    --rms-on-dark-muted: var(--rms-n-400);

    /* ---------- Semantic status: pale fill, dark text, no gold-adjacent hue ---------- */
    --rms-success: #1F7A4D;
    --rms-success-subtle: #E8F5EE;
    --rms-success-text: #14532D;
    --rms-warning: #D97706;     /* orange-amber, so a status never reads as brand gold */
    --rms-warning-subtle: #FEF0C7;
    --rms-warning-text: #7A4A06;
    --rms-info: #2F6FA8;
    --rms-info-subtle: #E6F0FA;
    --rms-info-text: #1E4E79;
    --rms-danger: #B42318;
    --rms-danger-subtle: #FEF3F2;
    --rms-danger-text: #912018;

    /* ---------- Depth: borders in the page, shadow only for floating layers ---------- */
    --rms-radius-control: .375rem;   /* inputs, buttons, chips */
    --rms-radius-card: .625rem;      /* cards, alerts, panels */
    --rms-radius-modal: .75rem;      /* dialogs */
    --rms-radius-pill: 999px;        /* status pills */
    --rms-shadow-overlay: 0 8px 24px rgba(31, 27, 24, .12);  /* dropdown, modal, off-canvas sidebar */
    --rms-shadow-bar: 0 -2px 12px rgba(13, 13, 13, .10);     /* fixed bottom action bar */

    /* ---------- Size ---------- */
    --rms-tap: 44px;
    --rms-tap-lg: 56px;
    --rms-sidebar-width: 248px;
    --rms-header-height: 60px;

    /* ---------- Type. The root stays 16px so rem spacing and px tap targets don't move. ---------- */
    --rms-fs-total: 1.5rem;    /* 24px  money totals: deliberately larger than body text */
    --rms-fs-h1: 1.25rem;      /* 20px */
    --rms-fs-h2: 1.125rem;     /* 18px */
    --rms-fs-lg: 1rem;         /* 16px  h3/h4, header title, large buttons, change due */
    --rms-fs-h5: .9375rem;     /* 15px  card headers, dialog titles */
    --rms-fs-body: .875rem;    /* 14px  body, tables, buttons: floor for primary text */
    --rms-fs-sm: .8125rem;     /* 13px  small buttons, field labels, chips, tile prices */
    --rms-fs-meta: .75rem;     /* 12px  meta text, badges, uppercase labels */
    --rms-fs-input: 1rem;      /* 16px on phones/tablets (avoids iOS focus zoom); 14px from 992px */

    /* Weights. Nothing heavier than bold; emphasis comes from size, colour or a pill. */
    --rms-fw-normal: 400;      /* body copy, table cells */
    --rms-fw-medium: 500;      /* nav items, lifted meta labels */
    --rms-fw-semibold: 600;    /* card titles, form labels, buttons, money */
    --rms-fw-bold: 650;        /* h1-h4 only */

    /* ---------- Motion: hover, press, collapse, fade. Nothing else. ---------- */
    --rms-motion-fast: .12s;
    --rms-motion: .2s;
    --rms-ease: cubic-bezier(.2, 0, .2, 1);

    /* ---------- Bootstrap hooks ---------- */
    --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --bs-font-monospace: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, "Liberation Mono", monospace;
    --bs-body-font-size: var(--rms-fs-body);
    --bs-body-line-height: 1.5;
    --bs-body-color: var(--rms-ink);
    --bs-body-color-rgb: 26, 23, 19;
    --bs-body-bg: var(--rms-ground);
    --bs-secondary-color: var(--rms-meta);
    --bs-tertiary-bg: var(--rms-ground);
    --bs-border-color: var(--rms-line);
    --bs-border-radius: var(--rms-radius-control);
    --bs-border-radius-lg: var(--rms-radius-card);
    --bs-emphasis-color: var(--rms-ink);
    --bs-heading-color: var(--rms-ink);
    --bs-link-color: var(--rms-ink);
    --bs-link-color-rgb: 26, 23, 19;
    --bs-link-hover-color: var(--rms-accent-text);
    --bs-link-hover-color-rgb: 107, 83, 32;

    --bs-primary: var(--rms-primary);
    --bs-primary-rgb: 201, 162, 83;
    --bs-primary-bg-subtle: var(--rms-accent-subtle);
    --bs-primary-text-emphasis: var(--rms-accent-text);
    --bs-primary-border-subtle: #EBD9A8;
    --bs-success: var(--rms-success);
    --bs-success-rgb: 31, 122, 77;
    --bs-success-bg-subtle: var(--rms-success-subtle);
    --bs-success-text-emphasis: var(--rms-success-text);
    --bs-warning: var(--rms-warning);
    --bs-warning-rgb: 217, 119, 6;
    --bs-warning-bg-subtle: var(--rms-warning-subtle);
    --bs-warning-text-emphasis: var(--rms-warning-text);
    --bs-info: var(--rms-info);
    --bs-info-rgb: 47, 111, 168;
    --bs-info-bg-subtle: var(--rms-info-subtle);
    --bs-info-text-emphasis: var(--rms-info-text);
    --bs-danger: var(--rms-danger);
    --bs-danger-rgb: 180, 35, 24;
    --bs-danger-bg-subtle: var(--rms-danger-subtle);
    --bs-danger-text-emphasis: var(--rms-danger-text);
    /* Bootstrap's validation red is its own token, not --bs-danger */
    --bs-form-invalid-color: var(--rms-danger);
    --bs-form-invalid-border-color: var(--rms-danger);
    --bs-secondary-bg-subtle: var(--rms-neutral-subtle);
    --bs-secondary-text-emphasis: var(--rms-meta);
    --bs-focus-ring-color: rgba(139, 108, 46, .35);
}

@media (min-width: 992px) {
    :root { --rms-fs-input: var(--rms-fs-body); }
}

/* ---------- Type scale ---------- */
body { background: var(--rms-ground); color: var(--rms-ink); overflow-x: hidden; }
h1, .h1, .page-title { font-size: var(--rms-fs-h1); font-weight: var(--rms-fw-bold); line-height: 1.25; }
h2, .h2 { font-size: var(--rms-fs-h2); font-weight: var(--rms-fw-bold); line-height: 1.3; }
h3, .h3, h4, .h4 { font-size: var(--rms-fs-lg); font-weight: var(--rms-fw-bold); line-height: 1.3; }
h5, .h5 { font-size: var(--rms-fs-h5); font-weight: var(--rms-fw-semibold); }
h6, .h6 { font-size: var(--rms-fs-body); font-weight: var(--rms-fw-semibold); }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; }
small, .small, .rms-meta { font-size: var(--rms-fs-meta); }
.text-muted, .rms-meta { color: var(--rms-meta) !important; }
.rms-label {
    font-size: var(--rms-fs-meta); font-weight: var(--rms-fw-semibold); letter-spacing: .05em;
    text-transform: uppercase; color: var(--rms-meta);
}
.rms-num, .table, .rms-money { font-variant-numeric: tabular-nums; }
.rms-total { font-size: var(--rms-fs-total); font-weight: var(--rms-fw-semibold); font-variant-numeric: tabular-nums; }

/* ---------- Buttons: primary / secondary / destructive / tertiary ---------- */
.btn {
    min-height: var(--rms-tap);
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    font-weight: var(--rms-fw-semibold);
    --bs-btn-border-radius: var(--rms-radius-control);
    --bs-btn-font-size: var(--rms-fs-body);
}
.btn-sm { min-height: 36px; --bs-btn-font-size: var(--rms-fs-sm); }
.btn-lg { min-height: var(--rms-tap-lg); --bs-btn-font-size: var(--rms-fs-lg); }
.btn:focus-visible,
.btn-check:focus-visible + .btn {
    outline: 3px solid var(--rms-accent); outline-offset: 2px; box-shadow: none;
}

/* Primary: gold fill with near-black text (8.1:1); bronze on hover with cream text (4.4:1).
   .btn-success is mapped here until each screen is restyled. */
.btn-primary, .btn-success, .btn-dark {
    --bs-btn-color: var(--rms-on-primary);
    --bs-btn-bg: var(--brand-gold);
    --bs-btn-border-color: var(--brand-gold);
    --bs-btn-hover-color: var(--brand-cream);
    --bs-btn-hover-bg: var(--brand-gold-dark);
    --bs-btn-hover-border-color: var(--brand-gold-dark);
    --bs-btn-active-color: var(--brand-cream);
    --bs-btn-active-bg: var(--brand-gold-text);
    --bs-btn-active-border-color: var(--brand-gold-text);
    --bs-btn-disabled-color: var(--rms-on-primary);
    --bs-btn-disabled-bg: var(--brand-gold);
    --bs-btn-disabled-border-color: var(--brand-gold);
}

/* Secondary. Ad hoc info/warning/light/outline-* colours collapse to this. */
.btn-secondary, .btn-light, .btn-info, .btn-warning,
.btn-outline-secondary, .btn-outline-primary, .btn-outline-info,
.btn-outline-success, .btn-outline-warning, .btn-outline-dark {
    --bs-btn-color: var(--rms-ink);
    --bs-btn-bg: var(--rms-surface);
    --bs-btn-border-color: var(--rms-control);
    --bs-btn-hover-color: var(--rms-ink);
    --bs-btn-hover-bg: var(--rms-neutral-subtle);
    --bs-btn-hover-border-color: var(--rms-primary);
    --bs-btn-active-color: var(--rms-ink);
    --bs-btn-active-bg: var(--rms-line);
    --bs-btn-active-border-color: var(--rms-primary);
    --bs-btn-disabled-color: var(--rms-meta);
    --bs-btn-disabled-bg: var(--rms-surface);
    --bs-btn-disabled-border-color: var(--rms-line);
}

/* Destructive: outline on screens, filled only inside confirm dialogs (.modal). */
.btn-danger, .btn-outline-danger {
    --bs-btn-color: var(--rms-danger);
    --bs-btn-bg: var(--rms-surface);
    --bs-btn-border-color: var(--rms-danger);
    --bs-btn-hover-color: var(--rms-danger-text);
    --bs-btn-hover-bg: var(--rms-danger-subtle);
    --bs-btn-hover-border-color: var(--rms-danger-text);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--rms-danger);
    --bs-btn-active-border-color: var(--rms-danger);
    --bs-btn-disabled-color: var(--rms-danger);
    --bs-btn-disabled-bg: var(--rms-surface);
    --bs-btn-disabled-border-color: var(--rms-danger);
}
.modal .btn-danger {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--rms-danger);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--rms-danger-text);
}

/* Tertiary */
.btn-link {
    --bs-btn-color: var(--rms-ink);
    --bs-btn-hover-color: #000;
    text-decoration: underline; text-underline-offset: 3px; min-height: auto;
}

.btn[aria-busy="true"] { cursor: progress; }

/* ---------- Forms ---------- */
.form-control, .form-select {
    min-height: var(--rms-tap);
    border-color: var(--rms-control);
    font-size: var(--rms-fs-input); /* 16px on phones keeps iOS from zooming into fields */
    color: var(--rms-ink);
}
.form-control-sm, .form-select-sm { min-height: 36px; font-size: var(--rms-fs-sm); }
.form-control-lg, .form-select-lg { min-height: var(--rms-tap-lg); }
textarea.form-control { min-height: 5rem; }
.form-control:focus, .form-select:focus, .form-check-input:focus {
    border-color: var(--rms-accent);
    box-shadow: 0 0 0 .2rem var(--bs-focus-ring-color);
}
.form-label { font-size: var(--rms-fs-sm); font-weight: var(--rms-fw-semibold); margin-bottom: .375rem; }
.form-check-input:checked { background-color: var(--brand-black); border-color: var(--brand-black); }
.input-group-text { font-size: var(--rms-fs-input); background: var(--rms-ground); border-color: var(--rms-control); color: var(--rms-meta); }

/* ---------- Cards: one style ---------- */
.card {
    --bs-card-border-color: var(--rms-line);
    --bs-card-border-radius: var(--rms-radius-card);
    --bs-card-inner-border-radius: calc(var(--rms-radius-card) - 1px);
    --bs-card-cap-bg: var(--rms-surface);
    --bs-card-cap-padding-y: .75rem;
    --bs-card-cap-padding-x: 1rem;
    --bs-card-spacer-y: 1rem;
    --bs-card-spacer-x: 1rem;
    --bs-card-bg: var(--rms-surface);
}
.card.shadow, .card.shadow-sm, .card.shadow-lg { box-shadow: none !important; }
.card-header { border-bottom-color: var(--rms-line); }
.card-header h5, .card-header .card-title { margin-bottom: 0; }
.card-footer { background: var(--rms-surface); border-top-color: var(--rms-line); }

/* ---------- Tables: one style ---------- */
.table {
    --bs-table-bg: var(--rms-surface);
    --bs-table-color: var(--rms-ink);
    --bs-table-border-color: var(--rms-line);
    --bs-table-hover-bg: var(--rms-surface-hover);
    --bs-table-striped-bg: var(--rms-surface-hover);
    margin-bottom: 0;
    vertical-align: middle;
}
/* A card is a flex column, so its scrolling table wrapper needs to be allowed to shrink;
   without this a wide table pushes the whole page sideways on tablets. */
.table-responsive { min-width: 0; max-width: 100%; }

.table > :not(caption) > * > * { padding: .75rem 1rem; }
.table > thead th, .table-light th {
    --bs-table-bg: var(--rms-ground);
    font-size: var(--rms-fs-meta); font-weight: var(--rms-fw-semibold); letter-spacing: .05em;
    text-transform: uppercase; color: var(--rms-meta);
    white-space: nowrap;
}
.table-light { --bs-table-bg: var(--rms-ground); --bs-table-color: var(--rms-meta); }
.table-sm > :not(caption) > * > * { padding: .5rem .75rem; }

/* Stock level bar (kitchen items): neutral track, semantic fill */
.progress.rms-stock-bar { height: 8px; background: var(--rms-neutral-subtle); border-radius: var(--rms-radius-pill); }

/* Stock change: the verb select stays narrow so the number gets the room */
.input-group > .form-select.rms-stock-action { flex: 0 0 8rem; }

/* Bars for reports: drawn in CSS so the page needs no chart library and works offline */
.rms-bars { display: grid; gap: .5rem; }
.rms-bar-row { display: grid; grid-template-columns: 7.5rem 1fr auto; align-items: center; gap: .75rem; }
.rms-bar-label { font-size: var(--rms-fs-sm); color: var(--rms-meta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rms-bar-track { display: block; height: 10px; border-radius: var(--rms-radius-pill); background: var(--rms-neutral-subtle); overflow: hidden; }
.rms-bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--rms-primary); }
.rms-bar-value { font-size: var(--rms-fs-sm); white-space: nowrap; }
.rms-bar-cell { min-width: 8rem; }
@media (max-width: 575.98px) {
    .rms-bar-row { grid-template-columns: 5.5rem 1fr auto; gap: .5rem; }
}

/* Inline search in a card header */
.rms-search-inline { width: 100%; max-width: 14rem; }

/* Staff photo, or their initials when there isn't one */
.rms-staff-photo {
    flex-shrink: 0; border-radius: 50%; object-fit: cover;
    background: var(--rms-neutral-subtle); border: 1px solid var(--rms-line);
}
.rms-staff-initials {
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: var(--rms-fw-semibold); color: var(--rms-meta); letter-spacing: .02em;
}

/* The letter as it will print: a page-like block inside the app's own chrome */
.rms-letter-preview {
    background: var(--rms-surface); border: 1px solid var(--rms-line);
    border-radius: var(--rms-radius-card); padding: 1.25rem;
    max-height: 32rem; overflow-y: auto;
}
.rms-letter-preview body { background: none; }
.rms-letter-preview .letterhead { border-bottom: 1px solid var(--rms-line); }
.rms-letter-preview table { width: 100%; }

/* Reports: a totals line that reads as a total, and a heatmap drawn in CSS */
.rms-report-table tfoot .rms-report-total td { border-top: 2px solid var(--rms-line-strong); font-weight: var(--rms-fw-semibold); }
.rms-heatmap { border-collapse: separate; border-spacing: 2px; font-size: var(--rms-fs-meta); }
.rms-heatmap th { font-weight: var(--rms-fw-semibold); color: var(--rms-meta); padding: 0 .25rem; }
.rms-heat {
    display: flex; align-items: center; justify-content: center;
    min-width: 2rem; height: 1.75rem; border-radius: var(--rms-radius-control);
    background: var(--rms-neutral-subtle); color: var(--rms-ink);
}
.rms-heat-1 { background: #F3E6C6; }
.rms-heat-2 { background: #E8CE92; }
.rms-heat-3 { background: var(--brand-gold); }
.rms-heat-4 { background: var(--brand-gold-dark); color: var(--brand-cream); }

/* ---------- Status pills (badges) ---------- */
.badge {
    font-weight: var(--rms-fw-semibold); font-size: var(--rms-fs-meta); line-height: 1.2;
    padding: .3em .7em; border-radius: var(--rms-radius-pill);
}
.badge.bg-success, .badge.text-bg-success { background: var(--rms-success-subtle) !important; color: var(--rms-success-text) !important; }
.badge.bg-warning, .badge.text-bg-warning { background: var(--rms-warning-subtle) !important; color: var(--rms-warning-text) !important; }
.badge.bg-info, .badge.text-bg-info { background: var(--rms-info-subtle) !important; color: var(--rms-info-text) !important; }
.badge.bg-danger, .badge.text-bg-danger { background: var(--rms-danger-subtle) !important; color: var(--rms-danger-text) !important; }
.badge.bg-primary, .badge.text-bg-primary { background: var(--rms-accent-subtle) !important; color: var(--rms-accent-text) !important; }
.badge.bg-secondary, .badge.bg-dark, .badge.bg-light,
.badge.text-bg-secondary, .badge.text-bg-dark, .badge.text-bg-light { background: var(--rms-neutral-subtle) !important; color: var(--rms-meta) !important; }

/* ---------- Alerts / flash messages ---------- */
.alert {
    --bs-alert-border-radius: var(--rms-radius-card);
    display: flex; gap: .75rem; align-items: flex-start;
}
.alert > .bi { font-size: var(--rms-fs-lg); line-height: 1.35; flex-shrink: 0; }
.alert-success { --bs-alert-bg: var(--rms-success-subtle); --bs-alert-color: var(--rms-success-text); --bs-alert-border-color: #BFE3CC; }
.alert-danger { --bs-alert-bg: var(--rms-danger-subtle); --bs-alert-color: var(--rms-danger-text); --bs-alert-border-color: #F6C9C4; }
.alert-warning { --bs-alert-bg: var(--rms-warning-subtle); --bs-alert-color: var(--rms-warning-text); --bs-alert-border-color: #F5D98B; }
.alert-info { --bs-alert-bg: var(--rms-info-subtle); --bs-alert-color: var(--rms-info-text); --bs-alert-border-color: #C3D9EF; }

/* ---------- Modals & dropdowns ---------- */
.modal { --bs-modal-border-radius: var(--rms-radius-modal); --bs-modal-header-border-color: var(--rms-line); --bs-modal-footer-border-color: var(--rms-line); }
.dropdown-menu {
    --bs-dropdown-font-size: var(--rms-fs-body);
    --bs-dropdown-link-active-bg: var(--brand-gold);
    --bs-dropdown-link-active-color: var(--rms-on-primary);
    border: 1px solid var(--rms-line); border-radius: .5rem;
    box-shadow: var(--rms-shadow-overlay); padding: .375rem;
}
.dropdown-item { border-radius: .375rem; padding: .5rem .75rem; display: flex; align-items: center; gap: .625rem; min-height: 40px; }
.nav-tabs .nav-link.active, .nav-pills .nav-link.active { font-weight: var(--rms-fw-semibold); }
.nav-pills { --bs-nav-pills-link-active-bg: var(--brand-gold); --bs-nav-pills-link-active-color: var(--rms-on-primary); }
/* Tabs are an underline, never a box: one gold line under the open list */
.nav-tabs { --bs-nav-tabs-border-color: var(--rms-line); }
.nav-tabs .nav-link {
    color: var(--rms-meta); background: transparent;
    border: 0; border-bottom: 2px solid transparent; border-radius: 0;
    min-height: var(--rms-tap); font-weight: var(--rms-fw-medium);
}
.nav-tabs .nav-link:hover { color: var(--rms-ink); border-bottom-color: var(--rms-line-strong); }
.nav-tabs .nav-link.active { color: var(--rms-ink); background: transparent; border-bottom-color: var(--rms-accent); }
@media (max-width: 767.98px) {
    /* Phones scroll the tab strip sideways rather than stacking it */
    .nav-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .nav-tabs::-webkit-scrollbar { display: none; }
    .nav-tabs .nav-link { white-space: nowrap; }
}
.page-link { color: var(--rms-ink); min-width: 40px; text-align: center; }
.pagination { --bs-pagination-font-size: var(--rms-fs-body); --bs-pagination-active-bg: var(--brand-gold); --bs-pagination-active-color: var(--rms-on-primary); --bs-pagination-active-border-color: var(--brand-gold-dark); --bs-pagination-focus-box-shadow: 0 0 0 .2rem var(--bs-focus-ring-color); }

/* ---------- Shared controls for till & kitchen screens ---------- */
.rms-icon-btn { width: var(--rms-tap); padding: 0; }

/* Icon sizes that sit next to the denser text */
.bi.fs-1 { font-size: 2rem !important; }       /* was ~40px via Bootstrap's responsive fs-1 */
.bi.fs-2 { font-size: 1.5rem !important; }     /* was ~32px */
.rms-icon-hero { font-size: 2.5rem; line-height: 1; } /* large decorative icon at the top of a dialog */

/* Batch/receipt codes (was a kitchen view <style> rule) */
.font-monospace { font-family: 'Courier New', monospace; font-size: var(--rms-fs-sm); }

/* Segmented choice built from Bootstrap .btn-check radios */
.btn-check:checked + .btn-outline-secondary,
.btn-check:checked + .btn-secondary {
    --bs-btn-active-color: var(--rms-on-primary);
    --bs-btn-active-bg: var(--brand-gold);
    --bs-btn-active-border-color: var(--brand-gold-dark);
}

/* Summary tiles */
.rms-stat { display: grid; gap: .25rem; }
.rms-stat-value { font-size: clamp(1rem, 3.6vw, 1.375rem); font-weight: var(--rms-fw-semibold); line-height: 1.2; font-variant-numeric: tabular-nums; }

/* Stacked list rows (phone alternative to wide tables) */
.rms-list-row { padding: .75rem 1rem; border-bottom: 1px solid var(--rms-line); }
.rms-list-row:last-child { border-bottom: 0; }

/* Tap tiles (menu items). Ember marks the selected state only. */
.rms-tile {
    position: relative; display: grid; align-content: space-between; gap: .375rem;
    width: 100%; height: 100%; min-height: 76px; padding: .625rem .75rem;
    text-align: left; font: inherit; color: var(--rms-ink);
    background: var(--rms-surface); border: 1px solid var(--rms-line); border-radius: .5rem;
}
.rms-tile:hover { border-color: var(--rms-control); }
.rms-tile:focus-visible { outline: 3px solid var(--rms-accent); outline-offset: 2px; }
.rms-tile[aria-pressed="true"] {
    border: 2px solid var(--rms-accent); background: var(--rms-accent-subtle);
    padding: calc(.625rem - 1px) calc(.75rem - 1px);
}
.rms-tile:disabled { opacity: .55; cursor: not-allowed; background: var(--rms-neutral-subtle); }
.rms-tile-flag { justify-self: start; font-size: var(--rms-fs-meta); font-weight: var(--rms-fw-semibold); color: var(--rms-meta); }

/* Tap confirmation: a quick ember flash so the cashier doesn't need to look at the cart */
@keyframes rms-tile-added {
    0% { background: var(--rms-accent-subtle); box-shadow: 0 0 0 0 rgba(201, 162, 83, .6); }
    100% { box-shadow: 0 0 0 10px rgba(201, 162, 83, 0); }
}
.rms-tile.is-added { animation: rms-tile-added .35s ease-out; }
@media (prefers-reduced-motion: reduce) { .rms-tile.is-added { animation: none; } }

/* Touch: no double-tap zoom delay, no grey tap highlight, no accidental text selection on fast taps */
.rms-tile, .rms-chip, .rms-stepper button, .rms-keypad button, .rms-choice-row .btn {
    touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none;
}
.rms-tile-name { font-weight: var(--rms-fw-semibold); line-height: 1.25; padding-right: 2rem; }
.rms-tile-price { font-size: var(--rms-fs-sm); color: var(--rms-meta); font-variant-numeric: tabular-nums; }
.rms-tile-qty {
    position: absolute; top: .375rem; right: .375rem;
    min-width: 1.75rem; height: 1.75rem; padding: 0 .375rem; border-radius: var(--rms-radius-pill);
    background: var(--rms-accent); color: #fff; font-size: var(--rms-fs-meta); font-weight: var(--rms-fw-semibold);
    display: inline-flex; align-items: center; justify-content: center;
}

/* Filter chips */
.rms-chips { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: thin; }
.rms-chip {
    flex-shrink: 0; min-height: var(--rms-tap); padding: 0 1rem; border-radius: var(--rms-radius-pill);
    border: 1px solid var(--rms-control); background: var(--rms-surface); color: var(--rms-ink);
    font-weight: var(--rms-fw-semibold); font-size: var(--rms-fs-sm); white-space: nowrap;
}
.rms-chip[aria-pressed="true"] { background: var(--brand-gold); border-color: var(--brand-gold-dark); color: var(--rms-on-primary); }
.rms-chip:focus-visible { outline: 3px solid var(--rms-accent); outline-offset: 2px; }

/* Line items with a quantity stepper: two rows when narrow, one row once the list is 400px+ wide */
.rms-line-list { container-type: inline-size; }
.rms-line-item {
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "info amount" "stepper amount";
    gap: .5rem .75rem; align-items: start;
    padding: .75rem 0; border-bottom: 1px solid var(--rms-line);
}
.rms-line-item:last-child { border-bottom: 0; }
.rms-line-info { grid-area: info; min-width: 0; }
.rms-line-item .rms-stepper { grid-area: stepper; justify-self: start; }
.rms-line-amount { grid-area: amount; align-self: stretch; display: grid; justify-items: end; align-content: space-between; gap: .25rem; }
@container (min-width: 400px) {
    .rms-line-item { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "info stepper amount"; align-items: center; }
    .rms-line-amount { align-self: center; min-width: 6.5rem; }
}
.rms-stepper { display: inline-flex; align-items: center; border: 1px solid var(--rms-control); border-radius: var(--rms-radius-control); background: var(--rms-surface); }
.rms-stepper button { width: var(--rms-tap); height: var(--rms-tap); border: 0; background: transparent; color: var(--rms-ink); font-size: var(--rms-fs-lg); }
.rms-stepper button:hover { background: var(--rms-neutral-subtle); }
.rms-stepper button:focus-visible { outline: 3px solid var(--rms-accent); outline-offset: -3px; }
/* Cart lines are tapped mid-rush: 48px − / + targets */
.rms-line-item .rms-stepper button { width: 48px; height: 48px; }

/* Horizontal row of large single-choice buttons (e.g. waiters), built from .btn-check radios */
.rms-choice-row { display: flex; gap: .5rem; overflow-x: auto; min-width: 0; padding-bottom: .25rem; scrollbar-width: thin; }
.rms-choice-row .btn { flex-shrink: 0; min-height: 48px; white-space: nowrap; }
.rms-table-input { width: 5.5rem; flex-shrink: 0; min-height: 48px; }
.rms-workspace-fields .rms-icon-btn { width: 48px; min-height: 48px; }
/* Phones/tablets: waiters get the full width; table and customer move to the next line */
@media (max-width: 991.98px) {
    .rms-fields-row { flex-wrap: wrap; }
    .rms-fields-row > .rms-choice-row { flex-basis: 100%; }
    .rms-fields-row > .rms-table-input { flex: 1 1 auto; width: auto; }
}
.rms-stepper output { min-width: 2.5rem; text-align: center; font-weight: var(--rms-fw-semibold); font-variant-numeric: tabular-nums; }

/* Payment entry: amount display, quick amounts and on-screen keypad (no OS keyboard over the totals) */
.rms-amount-display {
    min-height: var(--rms-tap-lg); padding: 0 .75rem;
    display: flex; align-items: center; justify-content: flex-end;
    background: var(--rms-surface); border: 1px solid var(--rms-control); border-radius: var(--rms-radius-control);
    font-size: var(--rms-fs-total); font-weight: var(--rms-fw-semibold); font-variant-numeric: tabular-nums; color: var(--rms-ink);
}
.rms-amount-display.is-empty { color: var(--rms-meta); font-weight: var(--rms-fw-semibold); }
.rms-amount-display:focus-visible { outline: 3px solid var(--rms-accent); outline-offset: 2px; }
.rms-pay-entry { display: grid; gap: .375rem; }
.rms-quick-amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .375rem; }
.rms-quick-amounts .btn { min-height: 48px; padding-inline: .25rem; font-size: var(--rms-fs-sm); white-space: nowrap; }
.rms-keypad { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .375rem; }
.rms-keypad .btn { min-height: 52px; padding-inline: 0; font-size: var(--rms-fs-h1); font-weight: var(--rms-fw-semibold); }
.rms-keypad .rms-key-action { font-size: var(--rms-fs-lg); }
.rms-keypad .rms-key-wide { grid-column: span 2; }
.rms-keypad-toggle { display: none; }

@media (min-width: 992px) {
    /* Laptops/landscape tablets: display and quick amounts side by side so the pinned area stays short */
    .rms-pay-entry { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: stretch; }
    .rms-workspace-pinned .rms-amount-display { min-height: var(--rms-tap); font-size: var(--rms-fs-h1); }
    .rms-workspace-pinned .rms-quick-amounts .btn { min-height: var(--rms-tap); }
    .rms-workspace-pinned .rms-keypad .btn { min-height: var(--rms-tap); font-size: var(--rms-fs-lg); }
}
/* With a mouse and keyboard (typing works on the display), the keypad opens on demand to keep the cart visible */
@media (min-width: 992px) and (pointer: fine) {
    .rms-keypad-toggle { display: inline-flex; }
    .rms-keypad[data-collapsible]:not(.is-open) { display: none; }
}

/* Pinned bottom action bar for phones (primary action stays reachable while scrolling) */
.rms-actionbar {
    position: fixed; inset: auto 0 0 0; z-index: 1025;
    padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
    background: var(--rms-dark); border-top: 1px solid var(--rms-dark-line);
    color: var(--rms-on-dark); box-shadow: var(--rms-shadow-bar);
}
.rms-actionbar-spacer { height: 5rem; }

/* ---------- Workspace dialog (pattern from the new-order dialog) ----------
 * Markup: <x-rms.workspace-modal>, <x-rms.picker-head>, <x-rms.summary-panel>. JS: RMS.workspace(form), RMS.picker(panel).
 * < 992px: full-screen, two steps (form[data-step="main" | "side"]); the modal body scrolls.
 * ≥ 992px: main panel (inputs to pick from) and side panel (running state) side by side, each scrolling on its own;
 *          .rms-workspace-pinned controls and the footer action are always visible.
 * Side panel contents, in DOM order: .rms-workspace-fields, .rms-summary-panel, .rms-workspace-pinned.
 */
.rms-workspace .rms-workspace-body { padding: 0; }
/* Figures read under pressure (e.g. "Change due") stay at 16px even though body text is 14px */
.rms-workspace-pinned span.rms-num { font-size: var(--rms-fs-lg); }
.rms-workspace-main, .rms-workspace-side { padding: 1rem; }
.rms-workspace-side { display: flex; flex-direction: column; gap: .75rem; }
.rms-picker-head {
    position: sticky; top: 0; z-index: 2;
    margin: -1rem -1rem .75rem; padding: .75rem 1rem .5rem;
    background: var(--bs-body-bg); border-bottom: 1px solid var(--rms-line);
}
.rms-picker-bar { display: flex; align-items: flex-start; gap: .5rem; }
.rms-picker-bar .rms-chips { min-width: 0; }
.rms-picker-search { padding-top: .25rem; }

@media (max-width: 991.98px) {
    .rms-workspace-form[data-step="main"] .rms-workspace-side,
    .rms-workspace-form[data-step="main"] .rms-step-side-only,
    .rms-workspace-form[data-step="side"] .rms-workspace-main,
    .rms-workspace-form[data-step="side"] .rms-step-main-only { display: none !important; }
    /* Side step: fields, then the pinned controls, then the lines to check, so the key input is on the first screen */
    .rms-workspace-side > .rms-step-back { order: 0; }
    .rms-workspace-side > .rms-workspace-fields { order: 1; }
    .rms-workspace-side > .rms-workspace-pinned { order: 2; }
    .rms-workspace-side > .rms-summary-panel { order: 3; }
}

@media (min-width: 992px) {
    .rms-step-main-only, .rms-step-back { display: none !important; }
    .rms-workspace .modal-content { height: calc(100vh - 3.5rem); }
    .rms-workspace .rms-workspace-body {
        display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
        overflow: hidden; min-height: 0;
    }
    .rms-workspace-main { overflow-y: auto; min-height: 0; border-right: 1px solid var(--rms-line); }
    /* The side panel only scrolls on very short screens; normally the summary lines absorb the space. */
    .rms-workspace-side { overflow-y: auto; min-height: 0; }
    /* Shrinks to share the side panel's height, but never below its minimum lines area (5.5rem) + footer
       (~4rem). With min-height: 0 the footer draws over the pinned controls when space is short; with the
       automatic minimum it never shrinks and the dialog body scrolls. The side panel scrolls instead. */
    .rms-summary-panel { flex: 1 1 auto; min-height: 9.5rem; display: flex; flex-direction: column; }
    .rms-summary-scroll { flex: 1 1 auto; min-height: 5.5rem; overflow-y: auto; }
    /* Pinned controls keep the 44px minimum instead of 56px so the summary keeps room */
    .rms-workspace-pinned .btn-lg { --bs-btn-padding-y: .375rem; --bs-btn-font-size: var(--rms-fs-lg); min-height: var(--rms-tap); }
    .rms-workspace-pinned .form-control-lg { min-height: var(--rms-tap); font-size: var(--rms-fs-lg); padding-block: .375rem; }
    .rms-summary-panel .rms-empty { padding-block: 1.25rem; }
}

/* Brand: the till's sticky footer is the same black + gold bar as the header */
.rms-workspace-form .modal-footer {
    background: var(--brand-black); border-top-color: var(--brand-black-line); color: var(--brand-cream);
}
.rms-workspace-form .modal-footer .rms-meta { color: var(--rms-on-dark-muted) !important; }
.rms-workspace-form .modal-footer .rms-num,
.rms-workspace-form .modal-footer .rms-total { color: var(--brand-gold-light); }
/* …but not inside a gold button, where gold-on-gold would vanish */
.rms-workspace-form .modal-footer .btn .rms-num { color: inherit; }
.rms-workspace-form .modal-footer .btn-secondary {
    --bs-btn-color: var(--brand-cream);
    --bs-btn-bg: transparent;
    --bs-btn-border-color: #4A4136;
    --bs-btn-hover-color: var(--brand-cream);
    --bs-btn-hover-bg: var(--brand-black-soft);
    --bs-btn-hover-border-color: var(--brand-gold);
}

/* ---------- Loading & empty states ---------- */
.rms-empty {
    display: grid; justify-items: center; gap: .375rem;
    padding: 2rem 1rem; text-align: center; color: var(--rms-meta);
}
.rms-empty > .bi { font-size: 1.5rem; color: var(--rms-control); }
.rms-empty strong { color: var(--rms-ink); font-weight: var(--rms-fw-semibold); }
.rms-loading { display: flex; align-items: center; justify-content: center; gap: .75rem; padding: 2rem 1rem; color: var(--rms-meta); }

/* ---------- Auth screens ----------
 * The one place the logo's black background is used directly: a single-purpose branding
 * moment, not a screen staff stare at for hours. Cream card on near-black.
 */
.rms-auth {
    min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 1.5rem 1rem calc(1.5rem + env(safe-area-inset-bottom));
    background: var(--brand-black);
}
.rms-auth-card {
    width: 100%; max-width: 26rem; padding: 1.75rem 1.5rem;
    background: var(--brand-cream); border-radius: .875rem;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .45);
}
.rms-auth-brand { display: flex; flex-direction: column; align-items: center; gap: .5rem; margin-bottom: 1.25rem; }
.rms-auth-mark { width: 72px; height: 72px; flex-shrink: 0; display: block; }
.rms-auth-name { font-weight: var(--rms-fw-semibold); font-size: var(--rms-fs-h2); line-height: 1.2; }
.rms-auth-title { font-size: var(--rms-fs-h1); margin-bottom: .25rem; }
.rms-auth .form-control { background: #fff; }
.rms-auth .form-check-input { width: 1.15em; height: 1.15em; margin-top: .125em; }
/* Mid gold is 2.2:1 on cream, so auth links use the deep gold (6.5:1) */
.rms-auth-link { color: var(--brand-gold-text); font-weight: var(--rms-fw-semibold); text-decoration: underline; text-underline-offset: 3px; }
.rms-auth-link:hover { color: var(--rms-ink); }
.rms-auth-foot { margin-top: 1rem; text-align: center; color: var(--rms-on-dark-muted); font-size: var(--rms-fs-meta); }
@media (max-width: 380px) { .rms-auth-card { padding: 1.25rem 1rem; } }

/* ---------- Page head: the row every screen opens with ----------
 * The page title itself lives in the sticky top bar (one h1 per page), so this row
 * carries the one-line explanation and the screen's actions, and nothing repeats.
 */
.rms-page-head {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: .75rem; margin-bottom: 1rem;
}
.rms-page-head-text { min-width: 0; }
.rms-page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
@media (max-width: 575.98px) {
    .rms-page-actions { width: 100%; }
    .rms-page-actions > .btn { flex: 1 1 auto; }
}

/* ---------- App shell ---------- */
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--rms-sidebar-width);
    background: var(--rms-dark); z-index: 1040;
    display: flex; flex-direction: column;
    transition: transform var(--rms-motion) var(--rms-ease), width var(--rms-motion) var(--rms-ease);
}
.sidebar-brand {
    display: flex; align-items: center; gap: .75rem;
    padding: 1rem 1.25rem; min-height: var(--rms-header-height);
    color: var(--rms-on-dark); text-decoration: none;
    border-bottom: 1px solid var(--rms-dark-line);
}
.sidebar-brand:hover { color: #fff; }
.sidebar-brand-mark { width: 32px; height: 32px; flex-shrink: 0; display: block; }
.sidebar-brand-text { font-weight: var(--rms-fw-bold); font-size: var(--rms-fs-h5); white-space: nowrap; }
.sidebar-nav { padding: .75rem; overflow-y: auto; flex: 1 1 auto; }
.sidebar-section { margin: .75rem .75rem .25rem; font-size: var(--rms-fs-meta); font-weight: var(--rms-fw-semibold);
    letter-spacing: .06em; text-transform: uppercase; color: var(--rms-on-dark-muted); }
.sidebar-nav > .sidebar-section:first-child { margin-top: 0; }
.sidebar-menu { list-style: none; margin: 0 0 .25rem; padding: 0; display: grid; gap: 2px; }
.sidebar-menu-link {
    position: relative;
    display: flex; align-items: center; gap: .75rem;
    min-height: var(--rms-tap); padding: .5rem .75rem; border-radius: .5rem;
    color: var(--rms-on-dark-muted); text-decoration: none; font-size: var(--rms-fs-body); font-weight: var(--rms-fw-medium);
    transition: background var(--rms-motion-fast) var(--rms-ease), color var(--rms-motion-fast) var(--rms-ease);
}
.sidebar-menu-link .bi { font-size: var(--rms-fs-lg); width: 1.25rem; flex-shrink: 0; }
.sidebar-menu-link:hover { background: var(--rms-dark-hover); color: var(--rms-on-dark); }
.sidebar-menu-link.active { background: var(--rms-dark-hover); color: var(--rms-accent-bright); font-weight: var(--rms-fw-semibold); }
.sidebar-menu-link.active .bi { color: var(--rms-accent-bright); }
/* Gold marker on the rail, the one place the brand colour marks "you are here" */
.sidebar-menu-link.active::before {
    content: ""; position: absolute; left: -.75rem; top: 50%; transform: translateY(-50%);
    width: 3px; height: 1.5rem; border-radius: 0 3px 3px 0; background: var(--brand-gold);
}
.sidebar-menu-link:focus-visible { outline: 3px solid var(--rms-accent-bright); outline-offset: -3px; }
.sidebar-menu-text { white-space: nowrap; }

.sidebar.collapsed { width: 72px; }
.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .sidebar-menu-text { display: none; }
.sidebar.collapsed .sidebar-menu-link { justify-content: center; }
.sidebar.collapsed .sidebar-menu-link.active::before { left: -.375rem; }
/* Section names can't be read on the icon rail; a hairline keeps the grouping visible */
.sidebar.collapsed .sidebar-section { height: 1px; margin: .625rem .5rem; padding: 0; overflow: hidden;
    color: transparent; background: var(--rms-dark-line); }

.main-content { margin-left: var(--rms-sidebar-width); min-height: 100vh; transition: margin-left var(--rms-motion) var(--rms-ease); }
.sidebar.collapsed ~ .main-content { margin-left: 72px; }

.top-header {
    position: sticky; top: 0; z-index: 1020;
    height: var(--rms-header-height); padding: 0 1rem;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    background: var(--rms-dark); border-bottom: 1px solid var(--rms-dark-line);
    color: var(--rms-on-dark);
}
.top-header .text-muted { color: var(--rms-on-dark-muted) !important; }
.header-left, .header-right { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.header-title { color: var(--rms-on-dark); font-size: var(--rms-fs-lg); font-weight: var(--rms-fw-bold); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toggle-sidebar {
    width: var(--rms-tap); height: var(--rms-tap); border: 0; border-radius: .5rem;
    background: transparent; color: var(--rms-on-dark); font-size: 1.25rem;
    display: inline-flex; align-items: center; justify-content: center;
}
.toggle-sidebar:hover { background: var(--rms-dark-hover); }
.toggle-sidebar:focus-visible { outline: 3px solid var(--rms-accent); outline-offset: 2px; }
.user-menu {
    display: flex; align-items: center; gap: .625rem;
    min-height: var(--rms-tap); padding: .25rem .5rem .25rem .25rem;
    border: 1px solid var(--rms-dark-line); border-radius: var(--rms-radius-pill); background: transparent;
    color: var(--rms-on-dark);
}
.user-menu:hover { background: var(--rms-dark-hover); }
.user-menu:focus-visible { outline: 3px solid var(--rms-accent); outline-offset: 2px; }
.user-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--rms-primary); color: var(--rms-on-primary);
    display: flex; align-items: center; justify-content: center; font-weight: var(--rms-fw-bold); font-size: var(--rms-fs-sm);
}
.user-info { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; text-align: left; }
.user-name { font-weight: var(--rms-fw-semibold); font-size: var(--rms-fs-sm); }
.user-role { font-size: var(--rms-fs-meta); color: var(--rms-on-dark-muted); }

.content-wrapper { padding: 1rem; }
@media (min-width: 992px) {
    .top-header { padding: 0 1.5rem; }
    .content-wrapper { padding: 1.5rem; }
}

.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(31, 27, 24, .5); z-index: 1030; }

@media (max-width: 991.98px) {
    .sidebar, .sidebar.collapsed { width: var(--rms-sidebar-width); transform: translateX(-100%); }
    .sidebar.collapsed .sidebar-brand-text, .sidebar.collapsed .sidebar-menu-text { display: inline; }
    .sidebar.collapsed .sidebar-menu-link { justify-content: flex-start; }
    .sidebar.show { transform: translateX(0); box-shadow: var(--rms-shadow-overlay); }
    .sidebar-overlay.show { display: block; }
    .main-content, .sidebar.collapsed ~ .main-content { margin-left: 0; }
    .user-info { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar, .main-content { transition: none; }
    .spinner-border, .spinner-grow { animation-duration: 1.5s; }
}

/* ---------- Print: black on white, no app chrome ---------- */
@media print {
    .sidebar, .sidebar-overlay, .top-header, .no-print, .rms-actionbar, .rms-actionbar-spacer, .alert .btn-close { display: none !important; }
    .main-content, .sidebar.collapsed ~ .main-content { margin-left: 0 !important; }
    .content-wrapper { padding: 0 !important; }
    body, .card, .table { background: #fff !important; color: #000 !important; }
    .card { border: 0 !important; }
    .table > thead th { background: #fff !important; color: #000 !important; }
    .badge { background: #fff !important; color: #000 !important; border: 1px solid #000; }
    a { color: #000 !important; text-decoration: none !important; }

    /* Fixed print sizes, independent of the screen scale (receipt printers need legible text) */
    body { font-size: 11pt !important; }
    h1, .h1, .page-title, h2, .h2 { font-size: 14pt !important; }
    h3, .h3, h4, .h4, h5, .h5, h6, .h6 { font-size: 12pt !important; }
    .table { font-size: 11pt !important; }
    small, .small, .rms-meta, .rms-label, .table > thead th, .badge { font-size: 10pt !important; }
    .rms-total, .rms-stat-value { font-size: 14pt !important; font-weight: var(--rms-fw-semibold) !important; }

    /* Bars keep their meaning on paper: outlined track, solid fill */
    .rms-bar-track, .progress { background: #fff !important; border: 1px solid #000 !important; }
    .rms-bar-fill, .progress-bar { background: #000 !important; }

    /* No brand colour on paper: thermal/basic printers can't render gold */
    .top-header, .rms-actionbar, .rms-workspace-form .modal-footer,
    .rms-workspace-form .modal-footer .rms-num, .rms-workspace-form .modal-footer .rms-total {
        background: #fff !important; color: #000 !important; border-color: #000 !important;
    }
}

/* ---------- Closing the day ---------- */
/* The one page a manager signs. Sections never split, and it prints without app chrome. */
.rms-reconciliation .rec-section { margin-bottom: 1.25rem; }
.rms-reconciliation .rec-heading {
    font-size: var(--rms-fs-meta); text-transform: uppercase; letter-spacing: .04em;
    color: var(--rms-meta); font-weight: var(--rms-fw-semibold);
    border-bottom: 1px solid var(--rms-line); padding-bottom: .25rem; margin: 0 0 .5rem;
}
.rms-reconciliation .rec-figures { width: 100%; border-collapse: collapse; }
.rms-reconciliation .rec-figures td { padding: .2rem 0; }
.rms-reconciliation .rec-amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rms-reconciliation .rec-rule td {
    border-top: 1px solid var(--rms-line-strong); font-weight: var(--rms-fw-semibold); padding-top: .35rem;
}
.rms-reconciliation .rec-flag td { border-top: 2px solid var(--rms-ink); }
.rms-reconciliation .rec-note { color: var(--rms-meta); font-size: var(--rms-fs-meta); }
.rms-reconciliation .rec-warn { color: var(--rms-warning-text); font-weight: var(--rms-fw-semibold); }
.rms-reconciliation .rec-list { margin: .25rem 0 0; padding-left: 1.1rem; }
.rms-reconciliation .rec-list li { padding: .1rem 0; }
.rms-reconciliation .rec-explain { margin: .5rem 0 0; }
.rms-reconciliation .rec-columns { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.rms-reconciliation .rec-column { flex: 1 1 15rem; min-width: 0; }
.rms-reconciliation .rec-items { width: 100%; border-collapse: collapse; table-layout: fixed; }
.rms-reconciliation .rec-items td { padding: .15rem 0; }
.rms-reconciliation .rec-items td:first-child { width: 54%; }
.rms-reconciliation .rec-items .rec-count { width: 20%; }
.rms-reconciliation .rec-items .rec-amount { width: 26%; font-variant-numeric: tabular-nums; }

/* Somewhere to sign, big enough for a finger on a tablet */
.rms-signature-pad {
    width: 100%; max-width: 32rem; height: 9rem; touch-action: none;
    border: 1px solid var(--rms-line-strong); border-radius: var(--rms-radius-control);
    background: var(--rms-surface);
}
