/* ── Self-hosted fonts (no external dependencies) ──────────────────── */
@font-face {
  font-family: 'Inter';
  src: url('/static/fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/static/fonts/Inter-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/static/fonts/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/static/fonts/Inter-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/static/fonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/static/fonts/JetBrainsMono-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}

:root {
  /* ══════════════════════════════════════════════════════════════════
     DESIGN TOKENS — UI/UX overhaul 2026-07 (Part A of the SaaS package).
     Values evolved for larger type, softer borders/shadows, and a
     restaurant "spine" color. Every legacy var name is preserved so the
     ~45 existing templates keep rendering; only values changed + new
     tokens added at the end of each group.
     ══════════════════════════════════════════════════════════════════ */

  /* Brand — deep navy (primary actions + sidebar only) */
  --brand: #14253B;
  --brand-hover: #1d3556;
  --brand-light: #eef2f8;

  /* Accent — warm brass (editorial warmth; use sparingly) */
  --accent: #c89b6a;
  --accent-hover: #b88550;
  --accent-light: #f6efe6;

  /* Surfaces — cooler, calmer neutrals */
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-raised: #fcfcfd;
  --surface-sunken: #f9fafb;

  /* Borders — fewer hard lines */
  --border-subtle: #eef0f4;
  --border: #e7eaf0;
  --border-strong: #d6dbe4;
  --border-faint: #f1f5f9;

  /* Text */
  --text: #0e1622;
  --text-secondary: #515c6b;
  --text-muted: #8b94a3;
  --text-on-brand: #ffffff;

  /* Semantic — status only, never decorative */
  --success: #1f7a4d;
  --success-bg: #e9f5ee;
  --success-border: #c5dfd0;
  --warning: #a76410;
  --warning-bg: #fbf1e2;
  --warning-border: #ebd5b6;
  --danger: #b5382b;
  --danger-hover: #8f2c22;
  --danger-bg: #fbecea;
  --danger-border: #ebc8c4;
  --info: #2563eb;

  /* Restaurant identity — the spine. Resolved by body[data-restaurant]
     (see the theming block lower in this file). Default = navy for
     cross-restaurant / logged-out surfaces. */
  --restaurant-grappa: #7c3aed;
  --restaurant-grappa-tint: #f1ecfd;
  --restaurant-sparrow: #0d9488;
  --restaurant-sparrow-tint: #e6f5f3;
  --restaurant-color: var(--brand);
  --restaurant-tint: var(--brand-light);

  /* Elevation — softer, layered 3-tier system */
  --shadow-sm: 0 1px 2px rgba(14,22,34,.04), 0 1px 3px rgba(14,22,34,.05);
  --shadow-md: 0 6px 16px rgba(14,22,34,.07), 0 2px 6px rgba(14,22,34,.04);
  --shadow-lg: 0 18px 40px rgba(14,22,34,.12), 0 6px 14px rgba(14,22,34,.06);

  /* Shape — controls (8px) vs cards (12px) get distinct radii */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  /* Motion — tokenized + physical ease-out */
  --ease: cubic-bezier(.22,.61,.36,1);
  --dur-fast: .14s;
  --dur: .2s;
  --dur-slow: .32s;
  --transition: all var(--dur) var(--ease);

  /* Layout chrome */
  --sidebar-w: 248px;
  --appbar-h: 64px;
  --crumbs-h: 34px;
  --content-max: 1240px;

  /* Type scale — LARGER + more contrast (the single biggest lever) */
  --font-sans: 'Inter', 'SF Pro Display', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;
  --fs-display: 2rem;      /* page hero numbers */
  --fs-h1: 1.55rem;        /* page titles */
  --fs-h2: 1.15rem;        /* section titles */
  --fs-body: 0.9375rem;    /* 15px base */
  --fs-small: 0.8125rem;
  --fs-label: 0.6875rem;   /* uppercase eyebrows/labels */
  --lh-tight: 1.2;
  --lh-body: 1.5;
  --tracking-tight: -0.02em;
  --tracking-label: 0.08em;

  /* Spacing scale (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
}

/* Restaurant theming — the whole UI re-tints from one attribute on <body>.
   Kept alongside the legacy body.theme-* classes (set by nav.html) so both
   selectors resolve the spine color; data-restaurant is the new source. */
body[data-restaurant="grappa"], body.theme-grappa {
  --restaurant-color: var(--restaurant-grappa);
  --restaurant-tint: var(--restaurant-grappa-tint);
}
body[data-restaurant="sparrow"], body.theme-sparrow {
  --restaurant-color: var(--restaurant-sparrow);
  --restaurant-tint: var(--restaurant-sparrow-tint);
}

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

/* ── Slice 3 (2026-05-17): required-field visual indicator. ──────────
   CSS-only — no per-template asterisks needed. Selectors cover the
   four input/label patterns used in this codebase:
     (a) <label>X</label><input required>             — sibling, no <br>
     (b) <label>X</label><br><input required>         — sibling, separated
     (c) <label for="x">X</label><input id="x" required>  — same as (a)
     (d) <label>X<input required></label>             — wrapper label
   Browser support: :has() is universal in Chrome 105+, Safari 15.4+,
   Firefox 121+. No fallback needed for an internal tool. */
label:has(+ input[required])::after,
label:has(+ select[required])::after,
label:has(+ textarea[required])::after,
label:has(+ br + input[required])::after,
label:has(+ br + select[required])::after,
label:has(+ br + textarea[required])::after,
label:has(> input[required])::after,
label:has(> select[required])::after,
label:has(> textarea[required])::after {
    content: " *";
    color: var(--danger);
    font-weight: 700;
    margin-left: 1px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  max-width: 1500px;
  margin: 0 auto;
  padding: 1.5rem 2rem 3rem;
}

/* ─── Top Navigation Bar ─── */
.topnav {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--brand);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 0 1.5rem;
  height: 52px;
  box-shadow: 0 1px 0 rgba(15,23,34,.04);
}
.topnav-brand { flex: 0 0 auto; margin-right: 1.5rem; display: inline-flex; align-items: center; }
.topnav-logo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-on-brand);
  text-decoration: none;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.topnav-logo::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.topnav-links { display: flex; gap: 0.25rem; flex: 1; }
.topnav-link {
  display: inline-flex;
  align-items: center;
  padding: 0 0.9rem;
  height: 52px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.topnav-link:hover { color: var(--text-on-brand); border-bottom-color: rgba(255,255,255,.2); }
.topnav-link.active { color: var(--text-on-brand); border-bottom-color: var(--accent); font-weight: 600; }
.topnav-links .topnav-link { font-size: 0.925rem; font-weight: 600; padding: 0 1.1rem; }
.topnav-right { margin-left: auto; display: flex; align-items: center; gap: 0.25rem; }
.topnav-right .topnav-link { font-size: 0.78rem; padding: 0 0.7rem; }
.topnav-restaurant {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-on-brand);
  background: var(--accent);
  border-radius: 9999px;
  padding: 0.2rem 0.75rem;
  letter-spacing: 0.03em;
  text-transform: capitalize;
}
.topnav-logout { color: rgba(255,255,255,.55) !important; }
.topnav-logout:hover { color: #f1b5b1 !important; border-bottom-color: rgba(255,255,255,.2) !important; }

/* 3px restaurant-color bar that sits directly below the nav. */
.restaurant-bar {
  height: 3px;
  width: 100%;
  background: var(--restaurant-color);
}

/* ─── Topbar / Navbar (legacy) ─── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  gap: 0.75rem;
  position: sticky;
  top: calc(var(--appbar-h) + var(--crumbs-h) + 0.5rem);  /* clear the fixed appbar + breadcrumb bar */
  z-index: 50;
}
.topbar h1 { font-size: var(--fs-h1); margin: 0; font-weight: 700; letter-spacing: -0.02em; }
.top-links { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ─── Hero ─── */
.hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-hover) 100%);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  color: white;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
}
.hero h1 { font-size: 2.2rem; margin-bottom: 0.5rem; color: white; }
.hero .muted { color: rgba(255,255,255,0.8); }
.hero .actions { margin-top: 1.5rem; display: flex; justify-content: center; flex-wrap: wrap; gap: 0.75rem; }

/* ─── Sections ─── */
.section {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.section h2 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 1rem;
}

/* Section caption — uppercase "QUICK ACCESS" / "ACTIVE RUNS" headings. */
.section-caption {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 1.5rem 0 0.5rem;
}

/* ─── Buttons ─── */
.btn, .link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover, .link-btn:hover {
  background: var(--surface-raised);
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: var(--shadow-sm);
}
.btn.primary, a.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--text-on-brand);
  box-shadow: var(--shadow-sm);
}
.btn.primary:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  color: var(--text-on-brand);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.btn.secondary { background: var(--surface-raised); }
.btn.delete {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}
.btn.delete:hover { background: var(--danger); color: white; }
.btn.neutral { background: var(--surface-raised); border-color: var(--border); color: var(--text-secondary); }
.btn.neutral:hover { background: var(--brand-light); border-color: var(--brand); color: var(--brand); }

/* ─── Canonical button system ─────────────────────────────────────────
   Exactly three roles, defined once and shared app-wide:
     .btn-primary   — dark navy pill, white text (the main action)
     .btn-secondary — white pill, thin border (everything neutral)
     .btn-danger    — red, destructive actions ONLY (always confirm first)
   Use these on new/plain buttons. The legacy .btn.* variants above remain
   for existing markup and read as the same visual language. */
.btn-primary, .btn-secondary, .btn-danger,
button.btn-primary, button.btn-secondary, button.btn-danger,
a.btn-primary, a.btn-secondary, a.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 999px;
  /* border-color is left to each variant. Set only width+style here so the
     variant selectors (.btn-secondary, specificity 0,1,0) are not out-ranked by
     this base rule's element-qualified selectors (a.btn-secondary, 0,1,1) —
     that was making secondary buttons render with a transparent (invisible)
     border, i.e. borderless plain text, on white table cells. */
  border-width: 1px;
  border-style: solid;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
}
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--text-on-brand); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--text-on-brand); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { background: var(--surface-raised); border-color: var(--brand); color: var(--brand); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: var(--text-on-brand); }
.btn-danger:hover { background: var(--danger-hover); border-color: var(--danger-hover); color: var(--text-on-brand); }
.btn-primary:disabled, .btn-secondary:disabled, .btn-danger:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

/* Native file inputs read as a secondary button, so "Choose File" matches
   the rest of the system without any per-page markup. */
input[type="file"]::file-selector-button {
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  margin-right: 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
}
input[type="file"]::file-selector-button:hover {
  background: var(--surface-raised);
  border-color: var(--brand);
  color: var(--brand);
}

/* Ignored employee job rate rows */
tr.ignored-row { opacity: 0.5; background: #f8f8f8; }
tr.ignored-row td { text-decoration: line-through; color: var(--text-muted); }
tr.ignored-row td:last-child, tr.ignored-row td:nth-last-child(2) { text-decoration: none; }

/* ─── Forms ─── */
label { font-size: 0.8125rem; font-weight: 500; color: var(--text-secondary); display: block; margin-bottom: 0.3rem; }
input[type="text"], input[type="number"], input[type="password"],
input[type="email"], input[type="date"], input[type="search"], select {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.8125rem;
  transition: var(--transition);
  width: 100%;
  /* A single-line field never needs to span the whole page (the Payroll Setup
     Minimum Wage input used to stretch ~1000px). Cap it; labels stay above. */
  max-width: 420px;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(20, 37, 59, 0.10);
}

/* ─── Banners ─── */
.banner {
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  border-left: 4px solid;
}
.banner.info    { background: var(--brand-light);   border-color: var(--brand);   color: var(--brand); }
.banner.warning { background: var(--warning-bg);    border-color: var(--warning); color: #7a4a14; }
.banner.success { background: var(--success-bg);    border-color: var(--success); color: #1e5236; }
.banner.danger  { background: var(--danger-bg);     border-color: var(--danger);  color: #80251a; }

/* ─── Summary Cards ─── */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border-top: 3px solid var(--accent);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.card .label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin-bottom: 0.3rem; }
.card .value { font-size: 1.6rem; font-weight: 700; color: var(--text); }
.card .subvalue { font-size: 0.75rem; color: var(--text-secondary); margin-top: 0.25rem; }

/* ─── Review Table ─── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

#reviewTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

/* Review table lives in a bounded scroll viewport (.review-scroll) so the
   header and the first two columns can be pinned. position: sticky resolves
   against the nearest scroll container, so the header sticks to the top of
   that viewport (top: 0), not the page — an overflow ancestor would otherwise
   cancel a page-relative sticky entirely. Bounding the scroll here also keeps
   scroll repaints off the blurred appbar, which is what made large runs jank. */
.table-wrap.review-scroll {
  max-height: calc(100vh - 240px);
  overflow: auto;
  /* Own stacking context at z-index 0 so the sticky header inside (z-index 5)
     is confined to this container and can never paint over the sticky page
     header card (.topbar, z-index 50) when the window scrolls. Without this the
     header's z-index competed in the root stacking context and floated up over
     the "Payroll Review" card. */
  position: relative;
  z-index: 0;
}

#reviewTable thead th {
  background: var(--surface-sunken);
  padding: 0.65rem 0.75rem;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;   /* sticks to the top of the .review-scroll viewport */
  z-index: 5;
  user-select: none;
}

/* Sticky first two columns (Employee ID + Name) during horizontal scroll.
   review.js adds .sticky-cols only while those two are the first columns and
   sets --sticky-id-w to the ID column's current width, so resize / hide /
   reorder stay aligned. Cells keep an opaque background so scrolled content
   never bleeds under the pinned columns. */
#reviewTable.sticky-cols th.col-employee-id,
#reviewTable.sticky-cols td.col-employee-id {
  position: sticky;
  left: 0;
  z-index: 3;
}
#reviewTable.sticky-cols th.col-employee-name,
#reviewTable.sticky-cols td.col-employee-name {
  position: sticky;
  left: var(--sticky-id-w, 0px);
  z-index: 3;
}
#reviewTable.sticky-cols tbody td.col-employee-id,
#reviewTable.sticky-cols tbody td.col-employee-name {
  background: var(--surface);
}
#reviewTable.sticky-cols thead th.col-employee-id,
#reviewTable.sticky-cols thead th.col-employee-name {
  z-index: 7;   /* header + pinned-column intersection sits above both */
}

#reviewTable tbody td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border-faint);
  vertical-align: middle;
  white-space: nowrap;
}

#reviewTable tbody tr:hover td { background: var(--brand-light) !important; }

/* Row highlight states */
tr.row-below-promised td { background: #fff7ed !important; }
tr.row-below-promised:hover td { background: #fed7aa !important; }
tr.row-meets-promised td { background: #f0fdf4 !important; }
tr.row-meets-promised:hover td { background: #bbf7d0 !important; }
tr.row-missing-promised td { background: var(--danger-bg) !important; }
tr.row-missing-promised:hover td { background: #fee2e2 !important; }
tr.row-missing-promised td:first-child { border-left: 4px solid var(--danger); }

/* Status badges */
.status {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.status-ok      { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.status-ignored { background: var(--border-faint); color: var(--text-muted); border: 1px solid var(--border); }
.status-missing { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }
.status-new     { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }

/* Tip/Hours input cells */
.editable-tip-input, .small-hours-input {
  width: 90px !important;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  font-size: 0.8rem;
  background: white;
  color: var(--text);
}
.editable-tip-input:focus, .small-hours-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(20,37,59,0.12);
  outline: none;
}
.readonly-input {
  width: 90px !important;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface-sunken);
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Resizer handle on th */
.resizer {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  cursor: col-resize;
  background: transparent;
}
.resizer:hover { background: var(--accent); }
th { position: relative; }

/* Column checkboxes */
.column-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--surface-raised);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-top: 0.75rem;
}
.column-panel label { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; cursor: pointer; margin: 0; color: var(--text); font-weight: 400; }

/* Filters row */
.filters-grid { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0.75rem; align-items: flex-start; }
.field { display: flex; flex-direction: column; }

.job-actions, .column-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.actions-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.25rem; }
.action-stack { display: flex; flex-direction: column; gap: 0.35rem; }

/* Compact per-row action group for the payroll run tables. The navigation
   actions (Open / Labor Cost / Add Files) read as an aligned equal-width
   button band; the destructive Delete sits last and is the smallest. */
.run-actions { display: flex; align-items: stretch; flex-wrap: wrap; gap: 6px; }
.run-actions form { margin: 0; flex: 0 0 auto; display: flex; }
.run-actions > .btn-secondary { flex: 1 1 0; min-width: 88px; }
.run-actions .btn-secondary { padding: 0.32rem 0.7rem; font-size: 0.75rem; }
.run-actions .btn-danger { padding: 0.3rem 0.6rem; font-size: 0.72rem; }

/* Drop zone */
.drop-area {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  background: #fafbfd;
  transition: var(--transition);
  cursor: pointer;
}
.drop-area:hover, .drop-area.dragover {
  border-color: var(--accent);
  background: var(--accent-light);
}

/* Errors / warnings */
.errors  { background: var(--danger-bg); border: 1px solid var(--danger-border); border-radius: var(--radius-sm); padding: 1rem; margin-bottom: 1rem; color: var(--danger); }
.warnings { background: var(--warning-bg); border: 1px solid var(--warning-border); border-radius: var(--radius-sm); padding: 1rem; margin-bottom: 1rem; color: var(--warning); }

/* Misc */
.small { font-size: 0.75rem; color: var(--text-secondary); }
.small-note { font-size: 0.7rem; color: var(--danger); margin-top: 2px; }
.money-col { font-variant-numeric: tabular-nums; }
.locked-note { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.5rem; }
.subtitle { font-size: 0.875rem; color: var(--text-secondary); }
.title-block { display: flex; flex-direction: column; gap: 0.2rem; }

/* ─── Compact View Mode ─── */
body.compact-review-view .page {
  max-width: 100%;
  padding: 0.75rem 1rem 2rem;
}

body.compact-review-view #reviewTable {
  font-size: 0.7rem;
}

body.compact-review-view #reviewTable thead th {
  padding: 0.35rem 0.4rem;
  font-size: 0.62rem;
}

body.compact-review-view #reviewTable tbody td {
  padding: 0.22rem 0.4rem;
  white-space: nowrap;
}

/* Clamp name/job title cols to a fixed width with ellipsis */
body.compact-review-view .col-employee-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.compact-review-view .col-job-title {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Shrink number inputs */
body.compact-review-view .editable-tip-input,
body.compact-review-view .small-hours-input {
  width: 66px !important;
  padding: 0.15rem 0.3rem;
  font-size: 0.7rem;
}

body.compact-review-view .readonly-input {
  width: 66px !important;
  padding: 0.15rem 0.3rem;
  font-size: 0.7rem;
}

/* Make status badges thinner */
body.compact-review-view .status {
  padding: 0.1rem 0.35rem;
  font-size: 0.6rem;
}

/* Suppress row sub-notes in compact mode */
body.compact-review-view .small-note { display: none; }

/* ─── Toast Notifications ─── */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  min-width: 250px;
  max-width: 350px;
  background: var(--surface);
  color: var(--text);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  border-left: 4px solid var(--accent);
}

.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error { border-left-color: var(--danger); }
.toast.toast-warning { border-left-color: var(--warning); }
.toast.toast-info { border-left-color: var(--accent); }

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Restaurant accents ──────────────────────────────────────────────
   Restaurant identity is signaled only by the 3px .restaurant-bar
   below the nav, plus tinted active chips on the dashboard.
   --brand (navy) and --accent (brass) stay constant app-wide. */

/* (Restaurant tint resolution now lives in the token block at the top of this
   file, keyed on both body[data-restaurant] and body.theme-*. Kept here as a
   no-op anchor comment so the historical selector search still lands.) */

/* ─── Tabular numerics — JetBrains Mono on dates / dollars ─────────────
   Applied via utility classes (.mono, .num) plus targeted element /
   class selectors. Templates can opt-in by adding .mono to specific
   <td> elements; .money-col already applied to numeric review cols. */
.mono,
.num,
time,
td.money,
td.date,
.money-col {
  font-family: 'JetBrains Mono', ui-monospace, "SF Mono", Menlo, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* Monospace is for numeric VALUES only. A header cell that shares the .num /
   .mono class (for right-alignment) must not inherit the monospace face — it
   uses the UI font with the small-caps-style uppercase + letter-spacing
   treatment, matching the Labor Cost table. More specific than the .num rule
   above, so it wins on <th> without affecting <td> value cells. */
th.num,
th.mono,
thead th.num,
thead th.mono {
  font-family: 'Inter', system-ui, sans-serif;
  font-variant-numeric: normal;
  letter-spacing: 0.05em;
}

/* ─── Login page wordmark + card ──────────────────────────────────── */
.login-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background:
    radial-gradient(1100px 600px at 50% -10%, rgba(20,37,59,.08), transparent 60%),
    radial-gradient(700px 500px at 90% 110%, rgba(200,155,106,.10), transparent 55%),
    var(--bg);
}
.wordmark {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--brand);
  margin-bottom: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.wordmark::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 0.25rem;
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.25rem 2rem;
  width: 100%;
  max-width: 390px;
}
.login-card label {
  display: block;
  margin-top: 1rem;
}
.login-card label:first-of-type { margin-top: 0; }
.login-card button[type="submit"] {
  width: 100%;
  background: var(--brand);
  color: var(--text-on-brand);
  border: 1px solid var(--brand);
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 1.25rem;
  transition: var(--transition);
}
.login-card button[type="submit"]:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  transform: translateY(-1px);
}
.login-tagline {
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}


/* ════════════════════════════════════════════════════════════════════
   UI REDESIGN (2026) — left sidebar + content appbar shell.

   Driven entirely from nav.html (included by manager templates) + the
   sibling combinator below, so individual page templates need no edits:
   the fixed sidebar/appbar precede `.page` as siblings, and `.page` is
   offset only when a `.sidebar` precedes it. Login + employee-training
   shells (no nav) are untouched by this layer.
   ════════════════════════════════════════════════════════════════════ */

/* The off-canvas toggle checkbox (mobile). Hidden; state drives the
   sidebar transform + overlay via :checked sibling selectors. */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  z-index: 300;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--brand) 0%, #0f1d30 100%);
  border-right: 1px solid rgba(255,255,255,.06);
  padding: 1.1rem 0.75rem 1rem;
  overflow-y: auto;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.25rem 0.6rem 1.1rem;
  font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em;
  color: var(--text-on-brand); text-decoration: none;
}
.sidebar-brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.sidebar-nav { display: flex; flex-direction: column; gap: 0.1rem; }
.nav-section-label {
  font-size: 0.62rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: rgba(255,255,255,.38);
  padding: 0.9rem 0.7rem 0.35rem;
}
.nav-item {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
  color: rgba(255,255,255,.74);
  font-size: 0.875rem; font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nav-item svg { width: 18px; height: 18px; flex: 0 0 18px; stroke-width: 1.9; }
.nav-item:hover { background: rgba(255,255,255,.07); color: var(--text-on-brand); }
.nav-item.active {
  background: rgba(255,255,255,.09);
  color: var(--text-on-brand); font-weight: 600;
  border-left-color: var(--restaurant-color);
}
.nav-item.active svg { color: var(--restaurant-color); }
.sidebar-spacer { flex: 1 1 auto; }
.sidebar-foot {
  padding: 0.6rem 0.7rem 0.2rem;
  font-size: 0.7rem; color: rgba(255,255,255,.4);
  border-top: 1px solid rgba(255,255,255,.07);
  margin-top: 0.6rem;
}

/* ── Content appbar ── */
.appbar {
  position: fixed;
  top: 0; left: var(--sidebar-w); right: 0;
  height: var(--appbar-h);
  z-index: 250;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  background: rgba(255,255,255,.86);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 1.5rem;
}
.appbar-left { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.appbar-right { display: flex; align-items: center; gap: 0.6rem; }

/* Hamburger — hidden on desktop, shown ≤768 */
.nav-burger {
  display: none;
  align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
  cursor: pointer;
}
.nav-burger svg { width: 20px; height: 20px; }

/* Restaurant pill toggle (themed by --restaurant-color) */
.rest-toggle {
  display: inline-flex; align-items: center;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem;
}
.rest-toggle a, .rest-toggle span {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem; font-weight: 600;
  color: var(--text-secondary); text-decoration: none;
  text-transform: capitalize;
}
.rest-toggle .active {
  background: var(--restaurant-color); color: var(--text-on-brand);
  box-shadow: var(--shadow-sm);
}
/* Muted on cross-restaurant pages, where the toggle does not scope the view. */
.rest-toggle.muted { opacity: 0.45; }

/* "All restaurants" scope pill shown next to a cross-restaurant page title. */
.scope-pill {
  display: inline-block; vertical-align: middle; margin-left: 0.55rem;
  background: var(--brand-light); color: var(--brand);
  border: 1px solid var(--border);
  border-radius: 999px; padding: 0.12rem 0.7rem;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
.rest-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }

.appbar-link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.4rem 0.6rem; border-radius: var(--radius-sm);
  font-size: 0.8rem; font-weight: 500;
  color: var(--text-secondary); text-decoration: none;
}
.appbar-link:hover { background: var(--surface-raised); color: var(--text); }
.appbar-link svg { width: 16px; height: 16px; }

.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand); color: var(--text-on-brand);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em;
  text-decoration: none;
}
.avatar:hover { background: var(--brand-hover); }

/* Mobile overlay behind the open sidebar */
.nav-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 290;
  background: rgba(15,23,34,.45);
}

/* ── Breadcrumb bar: one fixed line under the appbar on every manager page ── */
.crumbs {
  position: fixed;
  top: var(--appbar-h);
  left: var(--sidebar-w);
  right: 0;
  height: var(--crumbs-h);
  z-index: 240;                 /* below the appbar (250), above sticky topbars (50) */
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0 1.5rem;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  white-space: nowrap; overflow: hidden;
}
.crumbs a { color: var(--text-secondary); text-decoration: none; font-weight: 500; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }
.crumbs .crumb-sep { color: var(--text-muted); }
.crumbs .crumb-current { color: var(--text); font-weight: 600; }

/* ── Content offset (the no-JS layout hook) ── */
.sidebar ~ .page {
  margin-left: var(--sidebar-w);
  margin-right: 0;
  padding-top: calc(var(--appbar-h) + var(--crumbs-h) + 1.5rem);  /* clear appbar + breadcrumb bar */
  max-width: none;
}
.sidebar ~ .page > .page-inner,
.page-inner { max-width: 1440px; }

/* ── Refined page title hierarchy ── */
.page > h1, .page-inner > h1 {
  font-size: var(--fs-h1);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}
.page-sub { color: var(--text-secondary); font-size: var(--fs-body); margin: 0 0 1.5rem; }

/* ── Metric cards (shared premium card) ── */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.metric-card:hover { box-shadow: var(--shadow-md); }
.metric-card .label {
  font-size: var(--fs-label); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.5rem;
}
.metric-card .value {
  font-size: 1.9rem; font-weight: 700; color: var(--text);
  letter-spacing: -0.02em; line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.metric-card .trend { font-size: var(--fs-small); color: var(--text-secondary); margin-top: 0.4rem; }
.metric-card .trend .up { color: var(--success); font-weight: 600; }
.metric-card .trend .down { color: var(--danger); font-weight: 600; }

/* Refine legacy summary cards toward the same language (brass accent kept) */
.card { border-radius: var(--radius-lg); border-top-width: 3px; }

/* ── Refined data tables (shared .data-table) ── */
.data-table { width: 100%; border-collapse: collapse; font-size: var(--fs-body); }
.data-table thead th {
  text-align: left; padding: 0.6rem 0.75rem;
  font-size: var(--fs-label); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.data-table tbody td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border-subtle); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--surface-raised); }

/* Accent buttons can opt into restaurant identity */
.btn.accent, a.btn.accent {
  background: var(--restaurant-color); border-color: var(--restaurant-color); color: var(--text-on-brand);
}
.btn.accent:hover { filter: brightness(1.06); color: var(--text-on-brand); }

/* ── Mobile (≤768px) — Slice 2 lightweight responsive layer ──────────
   Added 2026-05-17. Goal: app is functional on phones, not redesigned
   for them. Heavy data tables (review / labor / bookkeeping_month)
   still expect horizontal scroll inside their .table-wrap containers.
   ──────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Tighter page chrome — claw back screen real estate */
  .page {
    padding: 0.75rem 1rem 1.5rem;
  }

  /* Top nav: wrap to a second row instead of compressing horizontally.
     Brand stays left; utility links wrap underneath when needed. */
  .topnav {
    height: auto;
    min-height: 52px;
    padding: 0.4rem 1rem;
    flex-wrap: wrap;
    row-gap: 0.25rem;
  }
  .topnav-links,
  .topnav-right {
    flex-wrap: wrap;
    row-gap: 0.25rem;
  }
  .topnav-link {
    height: 40px;
    padding: 0 0.6rem;
    font-size: 0.8rem;
  }
  .topnav-right .topnav-link {
    font-size: 0.78rem;
  }

  /* Touch-friendly buttons / inputs — not 44pt but visibly tappable. */
  .btn,
  .link-btn,
  button[type="submit"] {
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
    min-height: 40px;
  }
  input[type="text"],
  input[type="number"],
  input[type="password"],
  input[type="date"],
  select,
  textarea {
    padding: 0.55rem 0.65rem;
    font-size: 16px; /* iOS auto-zooms inputs <16px — avoid that. */
    min-height: 40px;
  }

  /* Common grids collapse to single column on phones.
     !important is needed because several of these grid declarations
     are inline in templates (dashboard.html, admin_landing.html,
     admin_users_form.html, promised_rate_history.html). */
  .summary-grid,
  .admin-tiles,
  .quick-tiles,
  .perm-grid,
  .restaurant-chips {
    grid-template-columns: 1fr !important;
  }

  /* Filter bar inputs (e.g. /promised-rate-history) drop their
     min-width so each input takes a full row on phones. */
  .filter-bar input,
  .filter-bar select {
    min-width: 0;
    width: 100%;
  }
  .filter-bar label {
    width: 100%;
  }

  /* Welcome-card heading on the dashboard scales down. */
  .welcome-card h1 {
    font-size: 1.25rem;
  }
}

/* ── UI REDESIGN — responsive shell (≤768px) ─────────────────────────
   Sidebar becomes an off-canvas drawer toggled by the appbar hamburger
   (pure CSS via the .nav-toggle checkbox). Appbar spans full width;
   content offset collapses. ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    width: 260px;
    box-shadow: var(--shadow-lg);
  }
  .nav-toggle:checked ~ .sidebar { transform: translateX(0); }
  .nav-toggle:checked ~ .nav-overlay { display: block; }

  .appbar { left: 0; padding: 0 0.9rem; }
  .crumbs { left: 0; padding: 0 0.9rem; }
  .nav-burger { display: inline-flex; }

  .sidebar ~ .page {
    margin-left: 0;
    padding-top: calc(var(--appbar-h) + var(--crumbs-h) + 1rem);
  }
  .appbar-right { gap: 0.4rem; }
  .appbar-link span.lbl { display: none; }   /* icon-only utility links on phones */
  .metric-grid { grid-template-columns: 1fr; }
}

/* Visible keyboard focus on all interactive chrome (a11y). */
.nav-item:focus-visible, .appbar-link:focus-visible, .rest-toggle a:focus-visible,
.nav-burger:focus-visible, .avatar:focus-visible, .sidebar-brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ════════════════════════════════════════════════════════════════════
   Employee training (redesign, 2026-06-25)
   Mobile-first, minimal: white surfaces, 0.5px borders, one ink accent,
   no shadows or gradients. Scoped under .et-app so it never touches the
   manager/admin chrome. Self-contained tokens (also dark-mode aware) keep
   it independent of the navy/brass restaurant theme.
   ════════════════════════════════════════════════════════════════════ */
.et-body { margin: 0; background: #eceae2; }
.et-app {
  --et-ink: #1b1b19; --et-sec: #5f5e58; --et-ter: #8c8b81; --et-ok: #0f6e56;
  --et-warn: #99630f; --et-warn-bg: rgba(201,138,30,0.12); --et-warn-bd: rgba(201,138,30,0.45);
  --et-bg: #ffffff; --et-bg2: #f4f3ee; --et-bd: rgba(0,0,0,0.12);
  --et-bd2: rgba(0,0,0,0.22); --et-r: 8px; --et-r2: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  max-width: 480px; margin: 0 auto; min-height: 100vh;
  background: var(--et-bg); color: var(--et-ink);
  display: flex; flex-direction: column;
  border-left: 0.5px solid var(--et-bd); border-right: 0.5px solid var(--et-bd);
}
@media (prefers-color-scheme: dark) {
  .et-body { background: #161614; }
  .et-app {
    --et-ink: #f3f2ec; --et-sec: #b4b2a8; --et-ter: #86857b; --et-ok: #5dcaa5;
    --et-warn: #e3b866; --et-warn-bg: rgba(227,184,102,0.14); --et-warn-bd: rgba(227,184,102,0.42);
    --et-bg: #1e1e1c; --et-bg2: #262521; --et-bd: rgba(255,255,255,0.12);
    --et-bd2: rgba(255,255,255,0.22);
  }
}
.et-svg { display: inline-block; vertical-align: -3px; }

/* Top bar */
.et-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px 6px; }
.et-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--et-bg2);
  border: 0.5px solid var(--et-bd); border-radius: 999px; padding: 4px 10px 4px 6px; }
.et-chip-badge { width: 18px; height: 18px; border-radius: 50%; background: var(--et-ink);
  color: var(--et-bg); font-size: 10px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.et-chip-name { font-size: 12px; color: var(--et-sec); }
.et-chip-cx { color: var(--et-ter); display: inline-flex; }
.et-logout { font-size: 12px; color: var(--et-ter); text-decoration: none; }
.et-logout:hover { color: var(--et-sec); }
/* Multi-unit switcher (details/summary, no JS) */
.et-switch { position: relative; }
.et-switch > summary { list-style: none; cursor: pointer; }
.et-switch > summary::-webkit-details-marker { display: none; }
.et-switch-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; min-width: 160px;
  background: var(--et-bg); border: 0.5px solid var(--et-bd2); border-radius: var(--et-r);
  padding: 4px; box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
.et-switch-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px;
  text-decoration: none; color: var(--et-ink); font-size: 13px; }
.et-switch-item:hover { background: var(--et-bg2); }
.et-switch-item.on { font-weight: 600; }
.et-switch-item .et-svg { margin-left: auto; color: var(--et-ok); }

/* Content + bottom nav shell */
.et-screen { flex: 1; padding: 8px 18px 18px; }
.et-nav { display: flex; border-top: 0.5px solid var(--et-bd); padding: 2px 8px;
  position: sticky; bottom: 0; background: var(--et-bg); }
.et-nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0; font-size: 11px; color: var(--et-ter); text-decoration: none; }
.et-nav-item.on { color: var(--et-ink); }
.et-nav-item.is-soon { opacity: 0.4; cursor: default; }

/* Home: greeting + progress */
.et-daypart { font-size: 13px; color: var(--et-ter); margin: 8px 0 2px; }
.et-greet { font-size: 22px; font-weight: 500; margin: 0 0 2px; }
.et-role { font-size: 14px; color: var(--et-sec); margin: 0 0 18px; }
.et-prog-meta { display: flex; align-items: baseline; justify-content: space-between;
  font-size: 13px; color: var(--et-sec); margin: 0 0 8px; gap: 12px; }
.et-bar { height: 5px; background: var(--et-bg2); border-radius: 999px; overflow: hidden; margin: 0 0 14px; }
.et-bar-lg { height: 6px; margin: 0 0 22px; }
.et-bar > span { display: block; height: 100%; background: var(--et-ink); }

/* Continue card */
.et-section-cap { font-size: 12px; color: var(--et-ter); margin: 0 0 8px; }
.et-continue { display: block; text-decoration: none; color: inherit;
  border: 0.5px solid var(--et-bd2); border-radius: var(--et-r2); padding: 16px; margin: 0 0 24px; }
.et-continue-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--et-sec); margin: 0 0 10px; }
.et-dot { color: var(--et-bd2); }
.et-continue-title { font-size: 17px; font-weight: 500; margin: 0 0 12px; }
.et-pbtn { display: block; text-align: center; background: var(--et-ink); color: var(--et-bg);
  border: none; border-radius: var(--et-r); padding: 11px 16px; font-size: 14px; font-weight: 500; }

/* Your path preview */
.et-path-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.et-path-title { font-size: 15px; font-weight: 500; margin: 0; }
.et-seeall { background: none; border: none; color: var(--et-sec); font-size: 13px; }
.et-seeall.is-soon { opacity: 0.4; cursor: default; }
.et-mod { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--et-r);
  border: 0.5px solid var(--et-bd); background: var(--et-bg); width: 100%; text-align: left;
  margin: 0 0 8px; text-decoration: none; color: inherit; }
.et-mod:hover { border-color: var(--et-bd2); background: var(--et-bg2); }
.et-mod.is-locked { opacity: 0.55; }
.et-ic { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; color: var(--et-ter);
  background: var(--et-bg2); display: flex; align-items: center; justify-content: center; }
.et-ic.is-cur { color: var(--et-ink); }
.et-mod-body { flex: 1; min-width: 0; }
.et-mod-title { display: block; font-size: 14px; font-weight: 500; }
.et-mod-sub { display: block; font-size: 12px; color: var(--et-ter); }
.et-mod-cx { color: var(--et-ter); display: inline-flex; }

/* Attention states: manager send-back + new content to review (re-gate) */
.et-mod.is-sentback { border-color: var(--et-warn-bd); }
.et-mod.is-review { border-color: var(--et-bd2); }
.et-ic.is-flag { color: var(--et-warn); }
.et-badge { font-size: 10px; font-weight: 600; letter-spacing: .02em; padding: 2px 8px;
  border-radius: 999px; white-space: nowrap; flex-shrink: 0; }
.et-badge.b-sentback { background: var(--et-warn-bg); color: var(--et-warn); }
.et-badge.b-review { background: var(--et-bg2); color: var(--et-sec); }
.et-note { display: block; margin: 0 0 14px; padding: 10px 12px; border-radius: var(--et-r);
  background: var(--et-warn-bg); border: 0.5px solid var(--et-warn-bd);
  font-size: 13px; line-height: 1.5; color: var(--et-ink); }
.et-note strong { font-weight: 600; color: var(--et-warn); }

/* Certificate strip + empty state */
.et-cert { display: flex; align-items: center; gap: 10px; margin: 18px 0 4px; padding: 12px;
  background: var(--et-bg2); border-radius: var(--et-r); font-size: 13px; color: var(--et-sec); }
.et-cert strong { color: var(--et-ink); font-weight: 500; }
.et-empty { text-align: center; color: var(--et-sec); padding: 3rem 1rem; }
.et-empty p { font-size: 14px; line-height: 1.55; margin: 12px 0 0; }

/* Path tab (full ladder) */
.et-h1 { font-size: 22px; font-weight: 500; margin: 8px 0 2px; }
.et-h1-sub { font-size: 14px; color: var(--et-sec); margin: 0 0 8px; }
.et-pos { margin: 18px 0 4px; }
.et-pos-head { display: flex; align-items: baseline; justify-content: space-between;
  padding-left: 8px; border-left: 3px solid var(--et-pos, var(--et-ink)); margin: 0 0 10px; }
.et-pos-title { font-size: 15px; font-weight: 600; color: var(--et-pos, var(--et-ink)); }
.et-pos-frac { font-size: 12px; color: var(--et-ter); }
.et-class { font-size: 12px; color: var(--et-ter); font-weight: 500; margin: 12px 0 8px; padding-left: 8px; }
.et-ic.is-done { color: var(--et-ok); }
.et-seeall { text-decoration: none; }
.et-seeall:hover { color: var(--et-ink); }

/* Accessibility: a clearly visible keyboard focus ring on every interactive
   element in the employee shell (nav, switcher, module rows, continue card,
   see-all, primary button). Mouse users are unaffected (:focus-visible). */
.et-nav-item:focus-visible, .et-switch > summary:focus-visible,
.et-switch-item:focus-visible, .et-mod:focus-visible, .et-continue:focus-visible,
.et-seeall:focus-visible, .et-pbtn:focus-visible, .et-you-link:focus-visible,
.et-logout:focus-visible {
  outline: 2px solid var(--et-ink); outline-offset: 2px; border-radius: 6px;
}

/* Menu tab */
.et-menu-lock { display: flex; align-items: center; gap: 6px; font-size: 13px;
  color: var(--et-ter); margin: 0 0 14px; }

/* You tab (profile) */
.et-you-head { display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 14px 0 6px; }
.et-you-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--et-ink);
  color: var(--et-bg); display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 500; }
.et-you-name { font-size: 18px; font-weight: 500; margin: 12px 0 2px; }
.et-you-meta { font-size: 13px; color: var(--et-sec); margin: 0; }
.et-you-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.et-you-stat { background: var(--et-bg2); border-radius: var(--et-r); padding: 14px; }
.et-you-stat-cap { font-size: 12px; color: var(--et-sec); margin: 0; }
.et-you-stat-val { font-size: 22px; font-weight: 500; margin: 2px 0 0; }
.et-you-cert { display: flex; align-items: center; gap: 10px; padding: 12px;
  border: 0.5px solid var(--et-bd); border-radius: var(--et-r); font-size: 13px; margin: 0 0 8px; }
.et-you-link { display: flex; align-items: center; gap: 10px; padding: 13px 12px;
  border: 0.5px solid var(--et-bd); border-radius: var(--et-r); text-decoration: none;
  color: var(--et-ink); font-size: 14px; margin: 0 0 8px; }
.et-you-link:hover { background: var(--et-bg2); }
.et-you-link span { flex: 1; }
.et-you-link .et-svg:last-child { flex: 0; color: var(--et-ter); }


/* ════════════════════════════════════════════════════════════════════
   UI/UX OVERHAUL 2026-07 — shared component system (Part B/C).
   Authored from the design spec. Everything below is additive: new class
   names that the redesigned screens opt into. Legacy classes above are
   untouched so un-migrated pages keep working. Restaurant "spine" color
   comes from --restaurant-color / --restaurant-tint (body[data-restaurant]).
   ════════════════════════════════════════════════════════════════════ */

/* ── Page header (title left, primary action right — the canonical slot) ── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin: 0 0 var(--space-6);
  flex-wrap: wrap;
}
.page-header .ph-titles { min-width: 0; }
.page-header h1 {
  font-size: var(--fs-h1);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  margin: 0;
  line-height: var(--lh-tight);
}
.page-header .ph-sub {
  color: var(--text-secondary);
  font-size: var(--fs-small);
  margin: var(--space-2) 0 0;
}
.page-header .ph-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 0 0 auto;
  flex-wrap: wrap;
}

/* Eyebrow label + section title (kills the brass/bold/gray inconsistency) */
.eyebrow {
  font-size: var(--fs-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--text-muted);
  margin: 0 0 var(--space-2);
  display: block;
}
.sec {
  font-size: var(--fs-h2);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-4);
  color: var(--text);
}

/* ── Surface card (one card style) ── */
.surface-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
}
.surface-card + .surface-card { margin-top: var(--space-6); }

/* ── Button system: 4 tiers + destructive (Part B.1) ─────────────────── */
.btn-tertiary,
button.btn-tertiary,
a.btn-tertiary {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 0.5rem 0.85rem;
  font-family: inherit; font-size: var(--fs-small); font-weight: 600; line-height: 1.2;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: transparent; color: var(--text-secondary);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: var(--transition);
}
.btn-tertiary:hover { background: var(--surface-sunken); color: var(--text); }

/* Ghost restaurant-accent button (rare, restaurant-scoped emphasis) */
.btn-accent, button.btn-accent, a.btn-accent {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 0.5rem 1.1rem;
  font-family: inherit; font-size: var(--fs-small); font-weight: 600; line-height: 1.2;
  border-radius: var(--radius-pill); border: 1px solid var(--restaurant-color);
  background: var(--restaurant-color); color: var(--text-on-brand);
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.btn-accent:hover { filter: brightness(1.06); color: var(--text-on-brand); box-shadow: var(--shadow-md); }

/* Ghost-red destructive: quiet until a confirm dialog. Use on Delete in rows. */
.btn-ghost-danger, button.btn-ghost-danger, a.btn-ghost-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 0.5rem 0.85rem;
  font-family: inherit; font-size: var(--fs-small); font-weight: 600; line-height: 1.2;
  border-radius: var(--radius-pill);
  border: 1px solid transparent; background: transparent; color: var(--danger);
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: var(--transition);
}
.btn-ghost-danger:hover { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger-hover); }

/* Icon-only row action (34px square, needs aria-label) */
.btn-ghost-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid transparent; background: transparent; color: var(--text-muted);
  cursor: pointer; transition: var(--transition);
}
.btn-ghost-icon svg { width: 17px; height: 17px; }
.btn-ghost-icon:hover { background: var(--surface-sunken); color: var(--text); }
.btn-ghost-icon.danger:hover { background: var(--danger-bg); color: var(--danger); }

/* Small size modifier for the canonical buttons */
.btn-sm { padding: 0.32rem 0.7rem !important; font-size: var(--fs-label) !important; }

/* ── KPI stat card (hero row) ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.kpi {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5) var(--space-5) var(--space-5) calc(var(--space-5) + 3px);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  overflow: hidden;
}
.kpi::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--restaurant-color);
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi .kpi-label {
  font-size: var(--fs-label); font-weight: 600; text-transform: uppercase;
  letter-spacing: var(--tracking-label); color: var(--text-muted); margin-bottom: var(--space-2);
}
.kpi .kpi-value {
  font-size: 1.9rem; font-weight: 700; color: var(--text);
  letter-spacing: var(--tracking-tight); line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.kpi .kpi-delta { font-size: var(--fs-small); margin-top: var(--space-2); color: var(--text-muted); display: flex; align-items: center; gap: 0.35rem; }
.kpi .kpi-delta .up { color: var(--success); font-weight: 700; }
.kpi .kpi-delta .down { color: var(--danger); font-weight: 700; }
.kpi .kpi-delta .flat { color: var(--text-muted); font-weight: 700; }

/* ── Stat strip (single-row compact summary, replaces card walls) ── */
.stat-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: var(--space-5);
}
.stat-strip .stat-cell {
  padding: var(--space-4) var(--space-5);
  border-right: 1px solid var(--border-subtle);
  min-width: 0;
}
.stat-strip .stat-cell:last-child { border-right: none; }
.stat-strip .stat-label {
  font-size: var(--fs-label); font-weight: 600; text-transform: uppercase;
  letter-spacing: var(--tracking-label); color: var(--text-muted); margin-bottom: var(--space-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat-strip .stat-value {
  font-size: 1.25rem; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}
.stat-strip .stat-value.ok { color: var(--success); }
.stat-strip .stat-value.warn { color: var(--warning); }
.stat-strip .stat-value.bad { color: var(--danger); }
@media (max-width: 900px) {
  .stat-strip { grid-auto-flow: row; grid-auto-columns: none; }
  .stat-strip .stat-cell { border-right: none; border-bottom: 1px solid var(--border-subtle); }
}

/* ── Hub card (Payroll / Training / Admin — one identical component) ── */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-4);
}
.hub-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
  text-decoration: none;
  color: var(--text);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.hub-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.hub-card .hub-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--restaurant-tint); color: var(--restaurant-color);
  margin-bottom: var(--space-2);
}
.hub-card .hub-icon svg { width: 21px; height: 21px; }
.hub-card .hub-title { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
.hub-card .hub-desc { font-size: var(--fs-small); color: var(--text-secondary); line-height: 1.5; }
.hub-card .hub-badge {
  align-self: flex-start; margin-top: var(--space-2);
  font-size: var(--fs-label); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border);
  border-radius: var(--radius-pill); padding: 0.15rem 0.6rem;
}

/* ── Segmented control (date ranges, filter segments) ── */
.seg {
  display: inline-flex;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
  flex-wrap: wrap;
}
.seg a, .seg button, .seg .seg-item {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.34rem 0.8rem;
  font-family: inherit; font-size: var(--fs-small); font-weight: 600;
  color: var(--text-secondary); text-decoration: none;
  border: none; background: transparent; cursor: pointer;
  border-radius: var(--radius-pill); white-space: nowrap; transition: var(--transition);
}
.seg a:hover, .seg button:hover, .seg .seg-item:hover { color: var(--text); }
.seg .active, .seg [aria-current="true"], .seg [aria-pressed="true"] {
  background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-sm);
}
.seg .active .seg-count { color: var(--restaurant-color); }

/* ── Sticky toolbar (one bar above data: search left, view options right) ── */
.toolbar {
  position: sticky;
  top: calc(var(--appbar-h) + var(--crumbs-h));
  z-index: 40;
  display: flex; align-items: center; gap: var(--space-3);
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}
.toolbar .toolbar-left { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
.toolbar .toolbar-right { display: flex; align-items: center; gap: var(--space-2); flex: 0 0 auto; }
.toolbar-search {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--surface-sunken); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 0.3rem 0.75rem; max-width: 260px;
}
.toolbar-search svg { width: 15px; height: 15px; color: var(--text-muted); flex: 0 0 auto; }
.toolbar-search input {
  border: none !important; background: transparent !important; box-shadow: none !important;
  padding: 0.1rem 0 !important; margin: 0 !important; width: 100%; max-width: none; font-size: var(--fs-small);
}
.toolbar-search input:focus { outline: none; box-shadow: none !important; }

/* ── Popover (Columns menu, Auto-adjust menu) via <details> ── */
.popover { position: relative; display: inline-block; }
.popover > summary {
  list-style: none; cursor: pointer;
}
.popover > summary::-webkit-details-marker { display: none; }
.popover > summary::marker { content: ""; }
.popover-panel {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 60;
  min-width: 220px; max-height: 60vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: var(--space-3);
}
.popover-panel.left { right: auto; left: 0; }
.popover-panel .pop-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 0.55rem; border-radius: var(--radius-sm);
  font-size: var(--fs-small); color: var(--text); cursor: pointer; text-decoration: none;
}
.popover-panel .pop-item:hover { background: var(--surface-sunken); }
.popover-panel .pop-sep { height: 1px; background: var(--border-subtle); margin: var(--space-2) 0; }

/* ── Sticky bottom action bar (workflow decisive action never scrolls away) ── */
.action-bar {
  position: sticky;
  bottom: 0;
  z-index: 45;
  display: flex; align-items: center; gap: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: var(--space-3) var(--space-4);
  margin-top: var(--space-5);
}
.action-bar .ab-status { flex: 1 1 auto; min-width: 0; font-size: var(--fs-small); color: var(--text-secondary); display: flex; align-items: center; gap: 0.45rem; }
.action-bar .ab-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex: 0 0 auto; }
.action-bar .ab-status .dot.warn { background: var(--warning); }
.action-bar .ab-status .dot.bad { background: var(--danger); }
.action-bar .ab-actions { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; justify-content: flex-end; }

/* ── Badges / pills / tags ── */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.02em;
  padding: 0.18rem 0.6rem; border-radius: var(--radius-pill);
  border: 1px solid transparent; white-space: nowrap;
}
.badge.badge-waiting  { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.badge.badge-generated{ background: var(--brand-light); color: var(--brand);   border-color: var(--border); }
.badge.badge-ready,
.badge.badge-success  { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.badge.badge-danger   { background: var(--danger-bg);  color: var(--danger);  border-color: var(--danger-border); }
.badge.badge-neutral  { background: var(--surface-sunken); color: var(--text-secondary); border-color: var(--border); }

.tag {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: var(--fs-label); font-weight: 600;
  padding: 0.15rem 0.55rem; border-radius: var(--radius-sm);
  background: var(--surface-sunken); color: var(--text-secondary); border: 1px solid var(--border-subtle);
  white-space: nowrap;
}
.tag.tag-kitchen { background: var(--accent-light); color: var(--accent-hover); border-color: #eaddc9; }
.tag.tag-servers { background: var(--restaurant-sparrow-tint); color: #0b7d72; border-color: #c7e9e5; }
.tag.tag-support { background: var(--brand-light); color: var(--brand); border-color: #d7e0ee; }
.tag.tag-muted   { background: var(--surface-sunken); color: var(--text-muted); }

/* Source chips (Bookkeeping: Toast ✓ · Stripe ✓) */
.chip-row { display: inline-flex; flex-wrap: wrap; gap: 0.35rem; }
.src-chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: var(--fs-label); font-weight: 600;
  padding: 0.14rem 0.5rem; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--surface-sunken); color: var(--text-muted);
}
.src-chip.on { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.src-chip .src-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ── Status circle (✓ / ! / ✕) — replaces the word "OK" in tables ── */
.status-circle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  font-size: 13px; font-weight: 700; line-height: 1;
}
.status-circle.ok      { background: var(--success-bg); color: var(--success); box-shadow: inset 0 0 0 1px var(--success-border); }
.status-circle.warn    { background: var(--warning-bg); color: var(--warning); box-shadow: inset 0 0 0 1px var(--warning-border); }
.status-circle.blocked { background: var(--danger-bg);  color: var(--danger);  box-shadow: inset 0 0 0 1px var(--danger-border); }
.status-circle.muted   { background: var(--surface-sunken); color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--border); }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: var(--space-7) var(--space-5);
  color: var(--text-secondary);
}
.empty-state .es-icon {
  width: 52px; height: 52px; margin: 0 auto var(--space-4);
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--surface-sunken); color: var(--text-muted);
}
.empty-state .es-icon svg { width: 26px; height: 26px; }
.empty-state .es-title { font-size: var(--fs-h2); font-weight: 700; color: var(--text); margin: 0 0 var(--space-2); }
.empty-state .es-text { font-size: var(--fs-small); margin: 0 auto var(--space-4); max-width: 380px; line-height: 1.5; }

/* ── Skeleton loaders ── */
.skeleton {
  position: relative; overflow: hidden;
  background: var(--surface-sunken); border-radius: var(--radius-sm);
}
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  animation: skeleton-shimmer 1.4s infinite;
}
@keyframes skeleton-shimmer { 100% { transform: translateX(100%); } }
.skeleton-line { height: 12px; margin: 8px 0; }
.skeleton-line.w-60 { width: 60%; } .skeleton-line.w-40 { width: 40%; } .skeleton-line.w-80 { width: 80%; }

/* ── Slide-over (Add employee, filter drawers) — <details>-driven, no JS ── */
.slideover { display: contents; }
.slideover > summary { list-style: none; }
.slideover > summary::-webkit-details-marker { display: none; }
.slideover-scrim {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(14,22,34,.4);
  display: flex; justify-content: flex-end;
  animation: fade var(--dur) var(--ease);
}
.slideover-panel {
  width: min(440px, 92vw); height: 100%;
  background: var(--surface); box-shadow: var(--shadow-lg);
  padding: var(--space-5); overflow-y: auto;
  animation: slide-in var(--dur-slow) var(--ease);
}
.slideover-panel .so-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
@keyframes slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* ── Toast (top-right) — complements the existing bottom-right toast.js ── */
.toast-tr-container {
  position: fixed; top: calc(var(--appbar-h) + 12px); right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}

/* ── Motion ── */
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fade var(--dur-slow) var(--ease); }

/* ── Restaurant-tint focus ring on form controls (Part B.7) ── */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4) var(--space-5); }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.field-group { display: flex; flex-direction: column; gap: var(--space-2); }
.field-group label { font-size: var(--fs-small); font-weight: 600; color: var(--text); margin: 0; }
.field-group .hint { font-size: var(--fs-small); color: var(--text-muted); }
.field-group input, .field-group select, .field-group textarea { max-width: none; }
.ring-focus:focus,
.field-group input:focus, .field-group select:focus, .field-group textarea:focus {
  outline: none; border-color: var(--restaurant-color);
  box-shadow: 0 0 0 4px var(--restaurant-tint);
}

/* Toggle switch (Active columns etc.) */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute; inset: 0; border-radius: var(--radius-pill);
  background: var(--border-strong); transition: var(--transition); cursor: pointer;
}
.switch .track::before {
  content: ""; position: absolute; height: 16px; width: 16px; left: 3px; top: 3px;
  border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: var(--transition);
}
.switch input:checked + .track { background: var(--restaurant-color); }
.switch input:checked + .track::before { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 4px var(--restaurant-tint); }

/* ── Enhanced data table (opt-in via .data-table.grouped etc.) ── */
.data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tbody tr.group-kitchen td { background: color-mix(in srgb, var(--accent-light) 45%, transparent); }
.data-table tbody tr:hover td { background: var(--restaurant-tint); }
.data-table caption { text-align: left; caption-side: top; padding: 0 0 var(--space-3); color: var(--text-muted); font-size: var(--fs-small); }

/* Right-edge shadow on the frozen block of the review table */
#reviewTable.sticky-cols td.col-employee-name,
#reviewTable.sticky-cols th.col-employee-name {
  box-shadow: 6px 0 8px -6px rgba(14,22,34,.14);
}

/* Inline-edited cell marker */
.cell-edited { position: relative; }
.cell-edited::after {
  content: ""; position: absolute; top: 4px; right: 4px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--restaurant-color);
}

/* Utility */
.tabnum { font-variant-numeric: tabular-nums; }
.text-muted { color: var(--text-muted); }
.text-sec { color: var(--text-secondary); }
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
@media (max-width: 900px) { .two-up { grid-template-columns: 1fr; } }
.stack-6 > * + * { margin-top: var(--space-6); }

@media (max-width: 900px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .kpi-grid { grid-template-columns: 1fr; } }

/* ── Alerts and form labels (2026-08-13) ──────────────────────────────
   The color tokens for these have existed since the redesign, but the
   classes never did: `alert alert-success` was already in use on the
   checklists, discipline and events pages and rendered as unstyled body
   text, so a save confirmation looked identical to a paragraph. Module 13
   uses the same markup, so the rules land here once rather than being
   redefined in every page's <style> block.

   Purely additive. Nothing that was styled before changes. */
.alert {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
  font-size: var(--fs-small);
  line-height: 1.5;
}
.alert a { color: inherit; text-decoration: underline; }
.alert-success { background: var(--success-bg); border-color: var(--success-border); color: var(--success); }
.alert-warning { background: var(--warning-bg); border-color: var(--warning-border); color: var(--warning); }
.alert-danger  { background: var(--danger-bg);  border-color: var(--danger-border);  color: var(--danger); }
/* Info has no token trio of its own; the brand tint is the neutral
   "here is some context" surface used elsewhere for the same purpose. */
.alert-info {
  background: var(--brand-light);
  border-color: var(--border);
  color: var(--text-secondary);
}

/* The label above a form control. Matches the inline `.form-grid label`
   rule the events settings page defines for itself. */
.form-label {
  display: block;
  font-size: var(--fs-small);
  color: var(--text-secondary);
  margin-bottom: .25rem;
}
