/* =====================================================================
   Holy Cross — monochrome design system (one hue: 173°, Holy Cross teal)
   ---------------------------------------------------------------------
   Scale c50..c900 = hsl(173, S%, L%). Everything on screen is drawn from
   this one ramp; statuses differ by LIGHTNESS and OUTLINE STYLE only
   (solid / dashed / thin outline), never by hue.
   Legacy variables (--ink, --paper, --accent, --warn, --danger ...) are
   remapped onto the scale below so the many inline style="" attributes in
   templates that reference them adopt the new look automatically.
   Page-specific rules live in pages-staff.css / pages-public.css.
   ===================================================================== */
:root {
  --c50:  hsl(173, 22%, 96%);
  --c100: hsl(173, 22%, 91%);
  --c200: hsl(173, 24%, 83%);
  --c300: hsl(173, 25%, 72%);
  --c400: hsl(173, 26%, 56%);
  --c500: hsl(173, 33%, 41%);
  --c600: hsl(173, 42%, 30%);
  --c700: hsl(173, 44%, 20%);
  --c800: hsl(173, 45%, 15%);
  --c900: hsl(173, 50%, 10%);
  --c950: hsl(173, 50%, 6%);   /* hover state for the darkest (danger) surfaces */

  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Legacy tokens, remapped onto the scale */
  --ink: var(--c900);
  --ink-soft: var(--c800);
  --paper: var(--c100);
  --card: var(--c50);
  --line: var(--c200);
  --line-strong: var(--c300);
  --accent: var(--c700);
  --accent-dark: var(--c800);
  --muted: var(--c600);
  --success: var(--c700);
  --warn: var(--c600);
  --danger: var(--c900);

  /* Surfaces / shape */
  --field-bg: #ffffff;
  --radius-card: 20px;
  --radius-btn: 14px;
  --radius-field: 12px;
  --radius-pill: 999px;
  --shadow-soft: 0 1px 2px hsla(173, 45%, 15%, 0.06), 0 6px 18px hsla(173, 45%, 15%, 0.08);
  --shadow-lift: 0 2px 4px hsla(173, 45%, 15%, 0.08), 0 12px 28px hsla(173, 45%, 15%, 0.14);
  --overlay: hsla(173, 50%, 10%, 0.55);
  --focus-ring: 0 0 0 3px hsla(173, 33%, 41%, 0.28);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; }
a { color: var(--c700); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--c500); outline-offset: 2px; }

/* Page titles + card/section titles: serif italic */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: var(--c800);
  line-height: 1.1;
  letter-spacing: 0;
}
h1 { font-size: 46px; margin: 0 0 18px; }
h2 { font-size: 40px; margin: 0 0 18px; }
h3 { font-size: 26px; margin: 0 0 12px; }
h4, h5, h6 { font-family: var(--font-sans); font-weight: 800; color: var(--c800); }

.app-shell { display: flex; min-height: 100vh; }

/* ---- Sidebar (dark c800) ---- */
.sidebar {
  width: 256px;
  background: var(--c800);
  color: var(--c100);
  padding: 28px 16px 22px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--c700) transparent;
}
.sidebar .brand {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0 12px;
  margin-bottom: 22px;
}
.sidebar .brand-name {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: 31px;
  line-height: 1;
  color: var(--c50);
}
.sidebar .brand-wordmark { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
/* legacy logo image, if a page ever still renders one */
.sidebar .brand img { width: 100%; max-width: 180px; border-radius: 8px; display: block; }
.sidebar .brand-sub {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--c300);
}
.sidebar nav { display: flex; flex-direction: column; gap: 1px; }
.sidebar .nav-group-label {
  padding: 16px 12px 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c400);
}
.sidebar .nav-group-label:first-child { padding-top: 0; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 38px;
  padding: 7px 12px;
  border-radius: 10px;
  color: var(--c200);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
}
.sidebar nav a:hover { background: hsla(173, 44%, 20%, 0.6); color: var(--c50); text-decoration: none; }
.sidebar nav a.active { background: var(--c700); color: var(--c50); font-weight: 700; }
.sidebar nav a.active .nav-icon { color: var(--c300); opacity: 1; }
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.8; }

.sidebar-danger-zone {
  margin-top: 22px;
  padding: 14px 12px 12px;
  border: 1.5px dashed var(--c600);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar-danger-label {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--c400); margin-bottom: 2px;
}
.sidebar-danger-zone form { margin: 0; }
.sidebar-danger-btn {
  display: flex; align-items: center; width: 100%; min-height: 36px; text-align: left;
  background: transparent; border: 1.5px solid var(--c600); border-radius: 10px;
  color: var(--c100); cursor: pointer; font-size: 13px; font-weight: 700; padding: 6px 12px;
}
.sidebar-danger-btn:hover { background: var(--c700); border-color: var(--c500); color: var(--c50); }
.sidebar-danger-btn-strong { background: var(--c900); border-color: var(--c900); color: var(--c50); font-weight: 800; }
.sidebar-danger-btn-strong:hover { background: var(--c950); border-color: var(--c400); }

.sidebar .logout-form { margin-top: 8px; }
.sidebar button.linklike {
  width: 100%;
  min-height: 40px;
  background: var(--c700);
  border: none;
  border-radius: 12px;
  color: var(--c100);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 700;
  padding: 8px 12px;
}
.sidebar button.linklike:hover { background: var(--c600); color: var(--c50); }

/* ---- Main column ---- */
.main { flex: 1; min-width: 0; padding: 40px 44px 56px; max-width: 1240px; }
.main h2 { margin-top: 0; }

/* Page header (eyebrow + serif title + actions). Reusable on any page:
   <header class="page-header"><div><div class="page-eyebrow">…</div>
   <h1 class="page-title">…</h1></div><div class="page-actions">…</div></header> */
.page-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px 24px; flex-wrap: wrap; margin-bottom: 26px;
}
.page-header-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.page-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--c600);
}
.page-title { margin: 0; font-size: 52px; line-height: 1; color: var(--c800); }
.page-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- Cards ---- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 24px 26px;
  margin-bottom: 20px;
  overflow-x: auto;
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card h2 { font-size: 30px; }
.card-dark { background: var(--c800); border-color: var(--c800); color: var(--c50); }
.card-dark h2, .card-dark h3 { color: var(--c50); }

/* Tabs / segmented control */
.logs-tabs, .tabs, .segmented {
  display: inline-flex; flex-wrap: wrap; gap: 4px; margin-bottom: 20px;
  background: var(--c200); border-radius: var(--radius-btn); padding: 4px;
}
.logs-tab-btn, .tab-btn {
  background: transparent; border: none; border-radius: 10px; padding: 8px 16px;
  font-size: 13.5px; font-weight: 700; color: var(--c700); cursor: pointer;
}
.logs-tab-btn:hover, .tab-btn:hover { background: hsla(173, 22%, 96%, 0.55); color: var(--c900); }
.logs-tab-btn.active, .tab-btn.active { background: var(--c50); color: var(--c900); font-weight: 800; box-shadow: 0 1px 2px hsla(173, 45%, 15%, 0.1); }
.logs-tab-count { opacity: 0.8; font-weight: 600; }

/* Generic stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 18px 20px; }
.stat-card .num { font-size: 32px; font-weight: 800; color: var(--c900); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-card .label { font-size: 13px; font-weight: 700; color: var(--c600); margin-top: 4px; }

/* ---- Tables ---- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
td { color: var(--c900); }
.card td { border-bottom-color: var(--c100); }
th {
  color: var(--c600); font-weight: 700; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.14em; padding-top: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--c200);
}
tr:hover td { background: var(--c100); }
tbody tr:last-child td { border-bottom: none; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  background: var(--c700);
  color: var(--c50);
  border: 1.5px solid var(--c700);
  padding: 9px 20px;
  border-radius: var(--radius-btn);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  vertical-align: middle;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--c800); border-color: var(--c800); color: var(--c50); text-decoration: none; }
.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn.secondary { background: var(--c50); color: var(--c800); border: 1.5px solid var(--c300); }
.btn.secondary:hover { background: var(--c100); border-color: var(--c400); color: var(--c900); }
.btn.danger { background: var(--c900); border-color: var(--c900); color: var(--c50); }
.btn.danger:hover { background: var(--c950); border-color: var(--c950); }
.btn.small { min-height: 34px; padding: 5px 14px; font-size: 13px; border-radius: 10px; white-space: nowrap; }
.btn.small svg { width: 15px; height: 15px; }

/* Access-grant toggle buttons (Users page): small pills. Grant = solid
   light pill; revoke = dashed outline (the "warning" treatment). */
.btn-toggle {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  border: 1.5px solid transparent;
  line-height: 1.4;
}
.btn-toggle.grant { background: var(--c200); color: var(--c800); border-color: var(--c300); }
.btn-toggle.grant:hover { background: var(--c300); color: var(--c900); }
.btn-toggle.revoke { background: transparent; color: var(--c900); border: 1.5px dashed var(--c600); }
.btn-toggle.revoke:hover { background: var(--c100); border-style: solid; }

/* ---- Badges / status pills ----
   confirmed = solid c700 · seated = c300 · pending = dashed outline ·
   completed = c100 muted · cancelled/danger = c900 · on break = thin c400 outline */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 26px; padding: 3px 11px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 800; line-height: 1.2; white-space: nowrap;
  background: var(--c200); color: var(--c700); border: 1.5px solid transparent;
}
.badge.confirmed, .badge.active, .badge.status-sent, .badge.payment-paid_full { background: var(--c700); color: var(--c50); }
.badge.seated, .badge.payment-deposit_paid { background: var(--c300); color: var(--c900); }
.badge.pending_approval, .badge.pending, .badge.payment-unpaid, .badge.table-status-reserved {
  background: transparent; color: var(--c800); border: 1.5px dashed var(--c600);
}
.badge.completed, .badge.done, .badge.redeemed, .badge.payment-refunded { background: var(--c100); color: var(--c600); border-color: var(--c200); }
.badge.cancelled, .badge.danger, .badge.void, .badge.status-failed, .badge.table-status-occupied { background: var(--c900); color: var(--c50); }
.badge.status-skipped-no-smtp, .badge.onbreak, .badge.on_break { background: transparent; color: var(--c700); border: 1.5px solid var(--c400); }
.badge.present, .badge.table-status-available { background: var(--c200); color: var(--c800); }
.badge.neutral { background: var(--c200); color: var(--c700); }

form.inline { display: inline; }
/* A <select> inside a form.inline (display:inline) has no defined
   containing-block width to resolve its own width:100% against, so
   browsers collapse it down to just the dropdown arrow — this undoes
   that for the Role select specifically. */
.role-select { width: auto; min-width: 150px; }

/* ---- Forms ---- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--c800); }
input, select, textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--c200);
  border-radius: var(--radius-field);
  font-size: 14.5px;
  font-weight: 500;
  font-family: inherit;
  color: var(--c900);
  background: var(--field-bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:hover, select:hover, textarea:hover { border-color: var(--c300); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--c500); box-shadow: var(--focus-ring); }
input::placeholder, textarea::placeholder { color: var(--c500); opacity: 1; }
input:disabled, select:disabled, textarea:disabled { background: var(--c100); color: var(--c600); cursor: not-allowed; }
input[type="checkbox"], input[type="radio"] {
  width: auto; padding: 0; border: none; box-shadow: none; background: none; accent-color: var(--c700);
}
input[type="range"] { padding: 0; border: none; background: none; box-shadow: none; accent-color: var(--c700); }
input[type="file"] { background: var(--c50); border-style: dashed; border-color: var(--c300); cursor: pointer; }
input[type="color"] { padding: 4px; min-height: 44px; cursor: pointer; }
textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.field { margin-bottom: 16px; }

/* ---- Flash / alert boxes ---- */
.error-box {
  background: var(--c900); border: 1.5px solid var(--c900); color: var(--c50);
  padding: 12px 16px; border-radius: 14px; margin-bottom: 18px; font-size: 14px; font-weight: 600;
}
.error-box a { color: var(--c200); }
.success-box {
  background: var(--c50); border: 1.5px solid var(--c400); color: var(--c800);
  padding: 12px 16px; border-radius: 14px; margin-bottom: 18px; font-size: 14px; font-weight: 600;
}
.notice-box, .warn-box {
  background: var(--c50); border: 1.5px dashed var(--c600); color: var(--c800);
  padding: 12px 16px; border-radius: 14px; margin-bottom: 18px; font-size: 14px; font-weight: 600;
}
.login-forgot-link { display: block; text-align: center; margin-top: 14px; font-size: 13.5px; color: var(--c600); }
.login-forgot-link:hover { color: var(--c800); }

.filters { display: flex; gap: 12px; margin-bottom: 18px; align-items: end; flex-wrap: wrap; }
.filters .field { margin-bottom: 0; min-width: 160px; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; margin: 16px 0; }
.detail-grid dt { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--c600); letter-spacing: 0.14em; }
.detail-grid dd { margin: 2px 0 10px; font-size: 15px; font-weight: 600; color: var(--c900); }

.history-list { list-style: none; padding: 0; margin: 0; }
.history-list li { padding: 9px 0; border-bottom: 1px solid var(--c100); font-size: 13px; color: var(--c600); }
.history-list li:last-child { border-bottom: none; }

.actions-row { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 32px; width: 360px; }
.login-card h1 { font-size: 34px; margin-top: 0; }
.login-logo { width: 100%; border-radius: 8px; display: block; margin-bottom: 12px; }

/* Branded login page: full-bleed bar photo backdrop + a larger card. */
.login-wrap--brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: var(--c900);
  padding: 24px;
  box-sizing: border-box;
}
.login-wrap--brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/img/bar-hero.png') center 60% / cover no-repeat;
  filter: brightness(0.5) grayscale(0.6);
  transform: scale(1.06);
}
.login-wrap--brand::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, hsla(173,50%,10%,0.82) 0%, hsla(173,50%,10%,0.5) 45%, hsla(173,50%,10%,0.9) 100%);
}
.login-card--brand {
  position: relative;
  z-index: 1;
  background: var(--c50);
  width: 460px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 52px 48px 44px;
  border-radius: 24px;
  border: 1px solid var(--c200);
  box-shadow: 0 40px 80px hsla(173,50%,6%,0.5), 0 6px 18px hsla(173,50%,6%,0.25);
}
.login-logo-full {
  width: 100%;
  max-width: 280px;
  display: block;
  margin: 0 auto 6px;
}
.login-tagline {
  text-align: center;
  color: var(--c600);
  font-size: 14.5px;
  margin: 0 0 32px;
}
.login-card--brand .field { margin-bottom: 20px; }
.login-card--brand label { font-size: 13px; font-weight: 700; letter-spacing: 0.02em; }
.login-card--brand input { padding: 14px 15px; font-size: 15.5px; }
.login-card--brand .btn {
  width: 100%;
  min-height: 52px;
  font-size: 16px;
  margin-top: 8px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

@media (max-width: 520px) {
  .login-card--brand { padding: 38px 26px 32px; border-radius: 18px; }
  .login-logo-full { max-width: 220px; }
}

.section-title {
  font-family: var(--font-serif); font-style: italic; font-weight: 600;
  font-size: 24px; color: var(--c800); margin: 24px 0 10px;
}
.muted { color: var(--c600); font-size: 13px; }

/* Empty states: dashed outline, muted text */
.empty, .empty-state {
  border: 1.5px dashed var(--c300); border-radius: 16px; padding: 24px 16px;
  text-align: center; color: var(--c600); font-size: 14px; font-weight: 600; background: transparent;
}

#calendar { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }

/* ---- Roster: 24-hour colour-coded timeline grid ---- */
.roster-legend { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 4px; }
.roster-legend-item { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.roster-legend-swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex-shrink: 0; }

.roster-hour-header { display: flex; margin-left: 138px; font-size: 10px; color: var(--muted); margin-bottom: 3px; }
.roster-hour-header span { flex: 1; text-align: left; border-left: 1px solid var(--line); padding-left: 3px; }

.roster-timeline-row { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.roster-timeline-name { width: 128px; flex-shrink: 0; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster-timeline-track {
  position: relative; flex: 1; height: 34px; display: flex;
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--card);
}
.roster-hour-cell { flex: 1; border-right: 1px solid var(--line); }
.roster-hour-cell:last-child { border-right: none; }
.roster-timeline-bar {
  position: absolute; top: 3px; bottom: 3px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  color: var(--c50); font-size: 10.5px; font-weight: 700; overflow: hidden; white-space: nowrap; padding: 0 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.35);
}
.roster-timeline-remove {
  flex-shrink: 0; background: none; border: none; cursor: pointer;
  color: var(--danger); font-size: 17px; line-height: 1; padding: 0 4px;
}
.roster-timeline-empty { flex: 1; color: var(--muted); font-size: 13px; padding: 8px 2px; }

.roster-add-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-bottom: 16px; }
.roster-add-form .field { margin-bottom: 0; min-width: 140px; }
.roster-add-form .field.narrow { min-width: 110px; }

.roster-batch-form { margin-bottom: 4px; }
.roster-batch-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.roster-batch-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.roster-batch-row .field { margin-bottom: 0; min-width: 140px; }
.roster-batch-row .field.narrow { min-width: 110px; }

@media (max-width: 768px) {
  .roster-hour-header { display: none; }
  .roster-timeline-name { width: 92px; font-size: 12px; }
  .roster-timeline-bar span { display: none; }
}

.menu-section { margin-bottom: 18px; }
.item-row { display: grid; grid-template-columns: 2fr 1fr 3fr auto; gap: 8px; margin-bottom: 6px; align-items: center; }

/* Public menu page: image-forward dish cards, side by side in a
   responsive grid instead of a stacked list. Flat white cards with a soft
   drop shadow (no blur/translucency) on a plain paper backdrop, keeping
   the site's existing dark-green/gold branding as the one accent color —
   same idea as a modern flat card-based dashboard UI, just in-brand. */
.public-menu-body { background: var(--paper); min-height: 100vh; }

.menu-section-title { display: flex; align-items: baseline; gap: 14px; margin: 34px 0 18px; }
.menu-section-title:first-of-type { margin-top: 6px; }
.menu-section-title h3 { margin: 0; font-size: 21px; color: var(--accent-dark); white-space: nowrap; }
.menu-section-line { flex: 1; height: 1px; background: var(--line); }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }

.menu-dish-card {
  position: relative; display: flex; align-items: stretch; border-radius: 16px; overflow: hidden;
  background: var(--card);
  box-shadow: 0 1px 2px hsla(173,45%,15%,0.06), 0 4px 14px hsla(173,45%,15%,0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.menu-dish-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px hsla(173,45%,15%,0.08), 0 10px 24px hsla(173,45%,15%,0.14); }

/* Allergen rail: a narrow strip on the left edge of the card, its badges
   centred vertically in the middle of the card's height (not pinned to
   the top), so it reads as a quiet side-column rather than more clutter
   mixed in with the dish text. */
.menu-dish-rail {
  flex: 0 0 28px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 10px 0; background: var(--paper); border-right: 1px solid var(--line);
}
.menu-allergen-badge {
  width: 19px; height: 19px; border-radius: 50%; background: var(--accent-dark); color: var(--c50);
  font-size: 9.5px; font-weight: 700; line-height: 1; display: flex; align-items: center; justify-content: center;
}

.menu-dish-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.menu-dish-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--paper); }
.menu-dish-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.menu-dish-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.menu-dish-name { font-weight: 700; font-size: 16px; line-height: 1.3; color: var(--ink); }
.menu-dish-price {
  font-weight: 700; font-size: 14.5px; color: var(--accent-dark); white-space: nowrap;
  background: hsla(173,44%,20%,0.1); padding: 2px 10px; border-radius: 20px;
}
.menu-dish-desc {
  font-size: 13.5px; color: var(--muted); line-height: 1.55; flex: 1;
  overflow-wrap: break-word; word-break: normal;
}

/* One legend near the top of the page decodes every badge number used
   below — built fresh from whatever allergens are actually on the menu
   right now (see routes/publicMenu.js), so it's always complete. */
.menu-allergen-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 9px 16px;
  background: var(--card); box-shadow: 0 1px 2px hsla(173,45%,15%,0.06), 0 4px 14px hsla(173,45%,15%,0.08);
  border-radius: 14px; padding: 11px 16px; margin-bottom: 26px; font-size: 12.5px; color: var(--muted);
}
.menu-allergen-legend strong { color: var(--ink); font-size: 12.5px; }
.menu-allergen-legend-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.menu-allergen-legend-item .menu-allergen-badge--static { width: 17px; height: 17px; font-size: 9px; }

/* Admin Menu & Events editor: same card-grid idea, with inline inputs so
   items can still be edited side by side instead of one long list.
   Description/allergens are textareas (not single-line inputs) so the
   full text wraps and stays readable/editable instead of getting cut off
   and needing to scroll sideways inside a narrow box — that was the
   original complaint about this page. Cards use the same flat white +
   soft-shadow treatment as the public menu for a consistent look. */
.menu-edit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; margin-bottom: 16px; }
.menu-edit-card {
  background: var(--card); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 1px 2px hsla(173,45%,15%,0.06), 0 4px 14px hsla(173,45%,15%,0.08);
}
.menu-edit-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--paper); }
.menu-edit-photo-placeholder {
  width: 100%; aspect-ratio: 4 / 3; background: var(--paper); color: var(--muted);
  display: flex; align-items: center; justify-content: center; font-size: 11px;
}
.menu-edit-fields { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 5px; }
.menu-edit-fields input, .menu-edit-fields textarea { font-size: 13.5px; padding: 7px 9px; }
.menu-edit-fields textarea { resize: vertical; min-height: 44px; line-height: 1.4; font-family: inherit; }
.menu-edit-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 700; margin: 4px 0 -1px; }
.menu-edit-row-inline { display: flex; gap: 6px; }
.menu-edit-row-inline input:first-child { flex: 2; min-width: 0; }
.menu-edit-row-inline input:last-child { flex: 1; min-width: 0; }
.menu-add-card {
  border: 1.5px dashed var(--line); border-radius: 14px; padding: 14px 12px;
  display: flex; flex-direction: column; gap: 6px; justify-content: center;
}
.menu-add-card input, .menu-add-card textarea { font-size: 13.5px; padding: 7px 9px; font-family: inherit; }
.menu-add-card textarea { resize: vertical; min-height: 40px; line-height: 1.4; }
.menu-add-card-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 700; margin-bottom: 2px; }

@media (max-width: 480px) {
  .menu-grid, .menu-edit-grid { grid-template-columns: 1fr; }
  .menu-section-title h3 { font-size: 18px; }
}

/* Menu hub ("Check the Menu" landing page): 4 big cards, one per category,
   each linking to its own filtered menu page. Same flat-card + soft-shadow
   language as the dish cards below it, just larger. A category with no
   items yet (Carvery/Bar until content is added) gets a muted photo
   placeholder and a "Coming soon" badge instead of an item count, but stays
   clickable so the page underneath is reachable and explains itself. */
.menu-hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.menu-hub-card {
  display: block; border-radius: 18px; overflow: hidden; background: var(--card); color: var(--ink);
  box-shadow: 0 1px 2px hsla(173,45%,15%,0.06), 0 4px 14px hsla(173,45%,15%,0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.menu-hub-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px hsla(173,45%,15%,0.08), 0 10px 24px hsla(173,45%,15%,0.14); text-decoration: none; }
.menu-hub-card-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--paper); }
.menu-hub-card-photo--placeholder { background: linear-gradient(135deg, var(--paper), var(--line)); }
.menu-hub-card-body { padding: 16px 18px 18px; text-align: center; }
.menu-hub-card-title { font-weight: 700; font-size: 19px; color: var(--accent-dark); }
.menu-hub-card-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.menu-hub-card-badge {
  display: inline-block; margin-top: 7px; font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
  text-transform: uppercase; color: var(--muted); background: var(--paper); border: 1px solid var(--line);
  border-radius: 20px; padding: 3px 12px;
}
.menu-hub-card--soon .menu-hub-card-title { color: var(--muted); }

.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 12px; margin-top: 6px; }
.checkbox-item { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 400; color: var(--ink); }
.checkbox-item input { width: auto; }

/* Bar Staff Duties checklist page */
.duties-toolbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.duty-progress-summary { margin-left: auto; font-size: 13px; color: var(--muted); min-width: 180px; }
.duty-progress-track { width: 180px; height: 8px; border-radius: 20px; background: var(--line); margin-top: 5px; overflow: hidden; }
.duty-progress-fill { height: 100%; background: var(--success); border-radius: 20px; transition: width 0.2s ease; }
.duty-section-card { padding-bottom: 8px; }
.duty-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.duty-section-header h3 { margin: 0; }
.duty-task-list { list-style: none; margin: 0; padding: 0; }
.duty-task { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.duty-task:last-child { border-bottom: none; }
.duty-task-form { margin: 0; flex-shrink: 0; }
.duty-task-check {
  width: 22px; height: 22px; border-radius: 5px; border: 1.5px solid var(--line);
  background: var(--card); cursor: pointer; color: var(--c50); font-size: 13px; font-weight: 700;
  line-height: 1; display: flex; align-items: center; justify-content: center; padding: 0;
}
.duty-task.done .duty-task-check { background: var(--success); border-color: var(--success); }
.duty-task-text { flex: 1; }
.duty-task.done .duty-task-text { color: var(--muted); text-decoration: line-through; }
.duty-task-meta { font-size: 12px; color: var(--muted); text-decoration: none; display: inline-block; }
.duty-task-edit-controls { align-items: center; gap: 6px; flex-shrink: 0; }
.duty-task-edit-controls form { display: flex; align-items: center; gap: 6px; margin: 0; }
.duty-task-edit-controls input[type="text"] { width: 220px; padding: 5px 8px; font-size: 13px; }
.duty-task-add-form { align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.duty-task-add-form input[type="text"] { flex: 1; }
.music-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.music-tag { background: var(--c200); color: var(--accent-dark); border-radius: 20px; padding: 3px 10px; font-size: 12px; }

.food-course-row { margin-top: 6px; padding: 10px; background: var(--c100); border-radius: 8px; border: 1px solid var(--line); }

.menu-toggle { display: none; }

/* Sidebar user card (links to /profile) */
.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--c700);
  color: var(--c50) !important;
  text-decoration: none !important;
}
.user-card:hover { background: var(--c700); }
.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid var(--c600);
}
.user-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c300);
  color: var(--c900);
  border-color: var(--c300);
}
.user-avatar-placeholder svg { width: 22px; height: 22px; }
.user-card-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.user-card-name { font-size: 14px; font-weight: 700; line-height: 1.3; color: var(--c50); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card-role { font-size: 12px; color: var(--c300); }

.profile-avatar-lg {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}
.profile-avatar-lg-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c200);
  color: var(--accent-dark);
}
.profile-avatar-lg-placeholder svg { width: 52px; height: 52px; }
.profile-header { display: flex; align-items: center; gap: 18px; margin-bottom: 8px; }

.topbar-avatar {
  position: fixed;
  top: 16px;
  right: 24px;
  z-index: 200;
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--c50);
  box-shadow: 0 2px 10px hsla(173,45%,15%,0.22);
}
.topbar-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topbar-avatar-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--c800); color: var(--c200);
}
.topbar-avatar-placeholder svg { width: 22px; height: 22px; }

@media (max-width: 768px) {
  /* On mobile the avatar already lives in the slide-down menu, so hide the
     floating badge to avoid overlapping the hamburger button. */
  .topbar-avatar { display: none; }
}

/* ---- Avatar cropper (profile page) ---- */
.cropper-wrap { margin-top: 14px; }
.cropper-image-box { max-width: 320px; max-height: 320px; overflow: hidden; background: #000; border-radius: 8px; }
.cropper-view-box, .cropper-face { border-radius: 50%; }
.zoom-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.zoom-row input[type="range"] { width: auto; flex: 1; }

/* ---- Mobile responsiveness ---- */
@media (max-width: 768px) {
  .app-shell { flex-direction: column; }

  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    overflow: visible;
    padding: 14px 16px;
  }
  .sidebar .brand {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    margin-bottom: 0;
    padding: 0 4px;
    gap: 10px;
  }
  .sidebar .brand-name { font-size: 25px; }
  .sidebar .brand img {
    width: 42px;
    height: 42px;
    max-width: 42px;
    margin: 0;
    border-radius: 6px;
    object-fit: cover;
  }
  .sidebar .brand-sub { display: none; }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    min-width: 44px;
    min-height: 44px;
    background: var(--c700);
    border: 1px solid var(--c600);
    color: var(--c100);
    padding: 6px 13px;
    border-radius: 12px;
    font-size: 18px;
    cursor: pointer;
  }
  .sidebar.open .menu-toggle { background: var(--c600); color: var(--c50); }

  .sidebar-body { display: none; margin-top: 14px; }
  .sidebar.open .sidebar-body { display: block; }

  .sidebar nav a { min-height: 44px; padding: 10px 12px; font-size: 15px; }

  .main { padding: 22px 16px 40px; max-width: 100%; }
  h1, .page-title { font-size: 38px; }
  h2 { font-size: 32px; }
  .page-header { align-items: flex-start; }
  .card { padding: 18px; border-radius: 18px; }

  .form-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .item-row { grid-template-columns: 1fr; }

  table { display: block; overflow-x: auto; white-space: nowrap; }

  .filters { flex-direction: column; align-items: stretch; }
  .filters .field { min-width: 0; }

  .actions-row { flex-direction: column; align-items: stretch; }
  .actions-row form.inline,
  .actions-row form.inline button,
  .actions-row > a,
  .actions-row > button { width: 100%; }

  .login-card { width: 88%; max-width: 360px; padding: 24px; }
}

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


/* ---- Dashboard ----
   Stat tiles run the light→dark ladder (c200, c300, c400, c600, c800).
   .dash-stat = rung 1; .c-blue/.tone-2, .c-purple/.tone-3, .c-amber/.tone-4,
   .c-live/.tone-5 are rungs 2–5 (legacy class names kept). */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}
.dash-stat {
  --tile-bg: var(--c200); --tile-fg: var(--c900); --tile-label: var(--c700);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  min-height: 124px;
  padding: 20px;
  border-radius: var(--radius-card);
  background: var(--tile-bg);
  color: var(--tile-fg);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  animation: dashFadeUp 0.35s ease both;
}
.dash-stat.c-blue, .dash-stat.tone-2 { --tile-bg: var(--c300); --tile-fg: var(--c900); --tile-label: var(--c800); }
.dash-stat.c-purple, .dash-stat.tone-3 { --tile-bg: var(--c400); --tile-fg: var(--c900); --tile-label: var(--c900); }
.dash-stat.c-amber, .dash-stat.tone-4 { --tile-bg: var(--c600); --tile-fg: var(--c50); --tile-label: var(--c100); }
.dash-stat.c-live, .dash-stat.tone-5 { --tile-bg: var(--c800); --tile-fg: var(--c50); --tile-label: var(--c200); }
.dash-stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.dash-stat.clickable { cursor: pointer; }
.dash-stat.clickable:focus-visible { outline: 2px solid var(--c500); outline-offset: 3px; }
.dash-stat .num {
  order: 2;
  font-size: 42px; font-weight: 800; line-height: 1; color: var(--tile-fg);
  font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 10px;
}
.dash-stat .label { order: 1; font-size: 13px; font-weight: 700; color: var(--tile-label); margin: 0; }
.dash-stat .live-dot { background: var(--c300); }
.dash-stat:nth-child(1) { animation-delay: 0s; }
.dash-stat:nth-child(2) { animation-delay: 0.05s; }
.dash-stat:nth-child(3) { animation-delay: 0.1s; }
.dash-stat:nth-child(4) { animation-delay: 0.15s; }
.dash-stat:nth-child(5) { animation-delay: 0.2s; }
@keyframes dashFadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Pending-approval banner: dashed outline = "needs attention" */
.dash-alert {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px 20px; margin-bottom: 24px;
  border-radius: 18px; background: var(--c50); border: 1.5px dashed var(--c500);
}
.dash-alert-icon {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: 14px;
  background: var(--c200); color: var(--c800);
  display: flex; align-items: center; justify-content: center;
}
.dash-alert-icon svg { width: 22px; height: 22px; }
.dash-alert-text { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 3px; }
.dash-alert-title { font-size: 17px; font-weight: 800; color: var(--c900); }
.dash-alert-sub { font-size: 14px; color: var(--c600); }
.dash-alert .btn { background: var(--c800); border-color: var(--c800); }
.dash-alert .btn:hover { background: var(--c900); border-color: var(--c900); }

/* Two-column body: today's bookings | working now + coming up */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

.dash-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px 26px 18px;
  margin-bottom: 0;
  min-width: 0;
}
.dash-section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.dash-section-head h2, .dash-section-head h3 {
  margin: 0; font-size: 30px; display: flex; align-items: center; gap: 10px;
}
.dash-section-head .hint { font-size: 12px; color: var(--c600); }
.dash-section-link { font-size: 14px; font-weight: 700; color: var(--c700); }

/* Dark accent card (one per page) */
.dash-section--dark { background: var(--c800); border-color: var(--c800); color: var(--c50); }
.dash-section--dark .dash-section-head h2, .dash-section--dark .dash-section-head h3 { color: var(--c50); }
.dash-section--dark .muted { color: var(--c200); }
.dash-section--dark th { color: var(--c300); border-bottom-color: var(--c700); }
.dash-section--dark td { color: var(--c50); border-bottom-color: var(--c700); }
.dash-section--dark tr:hover td { background: var(--c700); }
.dash-section--dark .live-dot { background: var(--c300); }

.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c500); display: inline-block; flex-shrink: 0; animation: dashPulse 1.8s infinite; }
@keyframes dashPulse {
  0% { box-shadow: 0 0 0 0 hsla(173,33%,41%,0.45); }
  70% { box-shadow: 0 0 0 7px hsla(173,33%,41%,0); }
  100% { box-shadow: 0 0 0 0 hsla(173,33%,41%,0); }
}

.dash-table-wrap { overflow-x: auto; }
.dash-table-wrap table { width: 100%; }
.dash-table-wrap td { border-bottom-color: var(--c100); }
.dash-table-wrap tr:hover td { background: var(--c100); }
.dash-table-wrap tr.clickable:hover td { cursor: pointer; }
.dash-table-wrap td:first-child { font-weight: 700; }

@media (max-width: 1200px) {
  .dash-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .dash-stat, .live-dot { animation: none; }
  .dash-stat:hover { transform: none; }
}

/* ---- Kiosk clock-in/out page (shared tablet, no sidebar) ---- */
.kiosk-shell { min-height: 100vh; padding: 28px 32px 40px; }
.kiosk-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.kiosk-header > div:first-child { display: flex; align-items: center; gap: 14px; }
/* The Holy Cross logo is a wide signage graphic (900x550), not a square
   crest — forcing it into a 50x50 square with object-fit:cover cropped it
   down to an illegible sliver. Keep its natural aspect ratio instead. */
.kiosk-logo { height: 54px; width: auto; border-radius: 6px; display: block; }
.kiosk-brand { font-size: 21px; font-weight: 700; color: var(--accent-dark); }
.kiosk-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.kiosk-header-right { display: flex; align-items: center; gap: 18px; }
.kiosk-clock { font-size: 17px; font-weight: 700; color: var(--muted); }
.kiosk-exit { font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; background: none; font-family: inherit; cursor: pointer; }
.kiosk-exit:hover { color: var(--accent-dark); border-color: var(--accent); }
/* "Log out tablet" is a separate, rarer action from "Exit" (which just
   returns to the clock grid) — kept visually secondary so staff don't
   confuse the two and accidentally sign the whole tablet out. */
.kiosk-signout { display: inline-block; margin-left: 8px; }
.kiosk-signout-btn { opacity: 0.7; font-size: 12px; }

/* Kiosk "Exit" overview — deliberately plain cards, no photos/PII, just
   enough for someone glancing at the tablet to know what's coming up. */
.kiosk-overview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 20px; }
.kiosk-overview-card { background: var(--card); border-radius: 14px; padding: 18px 20px; border: 1px solid var(--line); }
.kiosk-overview-card h3 { margin: 0 0 12px; font-size: 16px; color: var(--accent-dark); }
.kiosk-overview-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.kiosk-overview-list li { font-size: 14px; color: var(--ink); padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.kiosk-overview-list li:last-child { border-bottom: none; padding-bottom: 0; }

.kiosk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
.kiosk-tile { background: var(--card); border-radius: 14px; padding: 18px 10px; text-align: center; cursor: pointer; border: 1px solid var(--line); transition: transform 0.12s ease, box-shadow 0.12s ease; }
.kiosk-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 18px hsla(173,45%,15%,0.08); }
.kiosk-tile-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin: 0 auto 10px; }
.kiosk-tile-initials { display: flex; align-items: center; justify-content: center; color: var(--c50); font-weight: 700; font-size: 18px; }
.kiosk-tile-name { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kiosk-tile-timer { font-size: 11px; color: var(--muted); margin-top: 5px; min-height: 14px; }

.kiosk-status-badge.kiosk-status-clocked_out { background: var(--c100); color: var(--c600); border: 1.5px solid var(--c200); }
.kiosk-status-badge.kiosk-status-clocked_in { background: var(--c200); color: var(--c800); border-color: transparent; }
.kiosk-status-badge.kiosk-status-on_break { background: transparent; color: var(--c700); border: 1.5px solid var(--c400); }

.kiosk-modal-overlay { display: none; position: fixed; inset: 0; background: var(--overlay); align-items: center; justify-content: center; z-index: 300; padding: 20px; }
.kiosk-modal-overlay.open { display: flex; }
.kiosk-modal { background: var(--card); border-radius: 16px; padding: 32px 28px; max-width: 340px; width: 100%; text-align: center; }
.kiosk-modal-avatar { width: 68px; height: 68px; border-radius: 50%; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; color: var(--c50); font-weight: 700; font-size: 20px; }
.kiosk-modal-name { font-size: 17px; font-weight: 700; color: var(--accent-dark); margin-bottom: 4px; }

.kiosk-pin-dots { display: flex; gap: 12px; justify-content: center; margin: 6px 0 8px; }
.kiosk-pin-dot { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--accent); }
.kiosk-pin-dot.filled { background: var(--accent); }
.kiosk-pin-error { font-size: 12px; color: var(--danger); min-height: 16px; margin-bottom: 6px; }

.kiosk-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0 18px; }
.kiosk-key { padding: 16px 0; font-size: 19px; font-weight: 600; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--accent-dark); cursor: pointer; }
.kiosk-key:hover { background: var(--c200); }
.kiosk-forgot-pin { display: block; margin: 12px auto 0; background: none; border: none; font-size: 12.5px; color: var(--muted); cursor: pointer; text-decoration: underline; }
.kiosk-forgot-pin:hover { color: var(--accent-dark); }
.kiosk-forgot-pin:disabled { cursor: default; text-decoration: none; opacity: 0.7; }

.kiosk-action-buttons { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 18px; }
.kiosk-action-btn { padding: 15px; font-size: 16px; font-weight: 600; border: none; border-radius: 10px; color: var(--c50); cursor: pointer; }
.kiosk-btn-in { background: var(--accent); }
.kiosk-btn-in:hover { background: var(--accent-dark); }
.kiosk-btn-out { background: var(--danger); }
.kiosk-btn-break { background: var(--warn); }

.kiosk-success-check { width: 60px; height: 60px; border-radius: 50%; background: var(--c200); color: var(--success); display: flex; align-items: center; justify-content: center; margin: 4px auto 14px; font-size: 28px; }

.kiosk-camera-video { width: 100%; max-width: 280px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 14px; background: #000; display: block; margin: 0 auto; }

/* Bar Staff Duties tab/panel — ambient, floats over a corner of the kiosk
   screen without ever blocking the tile grid underneath. */
.kiosk-duties-tab {
  position: fixed; bottom: 24px; right: 24px; z-index: 250;
  background: var(--accent-dark); color: var(--c50); border-radius: 30px;
  padding: 12px 18px; display: none; align-items: center; gap: 8px;
  cursor: pointer; box-shadow: 0 8px 20px hsla(173,45%,15%,0.25);
  font-size: 13px; font-weight: 600; border: none;
}
.kiosk-duties-tab-count { background: hsla(173,22%,96%,0.2); border-radius: 12px; padding: 2px 8px; font-size: 12px; }
.kiosk-duties-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 340px; max-width: 92vw;
  background: var(--card); box-shadow: -6px 0 24px hsla(173,45%,15%,0.18);
  transform: translateX(100%); transition: transform 0.25s ease; z-index: 250;
  display: flex; flex-direction: column; padding: 20px;
}
.kiosk-duties-panel.open { transform: translateX(0); }
.kiosk-duties-panel-header { display: flex; align-items: center; justify-content: space-between; font-weight: 700; color: var(--accent-dark); margin-bottom: 14px; font-size: 15px; }
.kiosk-duties-collapse { background: none; border: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); }
.kiosk-duties-panel-body { flex: 1; overflow-y: auto; }
.kiosk-duty-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; cursor: pointer; }
.kiosk-duty-row input { margin-top: 2px; width: 18px; height: 18px; flex-shrink: 0; }
.kiosk-duty-row.done span { color: var(--muted); text-decoration: line-through; }
.kiosk-duties-panel-footer { padding-top: 14px; display: flex; }
.kiosk-duties-panel-footer .btn { width: 100%; }
.kiosk-duties-reason textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px; font-family: inherit; font-size: 13.5px; resize: vertical; }
.kiosk-duties-reason-actions { display: flex; gap: 8px; margin-top: 10px; }
.kiosk-duties-reason-actions .btn { flex: 1; }
.kiosk-duties-done { text-align: center; padding-top: 40px; }

/* Report an Issue page */
.report-evidence-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.report-upload-label { display: inline-flex; align-items: center; cursor: pointer; }
.report-evidence-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.report-evidence-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; }
.report-evidence-remove { background: none; border: none; color: var(--danger); font-size: 12px; cursor: pointer; text-decoration: underline; padding: 0; }
/* ---- Generic small modal (Profile page: change password / change PIN) ---- */
.modal-overlay { display: none; position: fixed; inset: 0; background: var(--overlay); align-items: center; justify-content: center; z-index: 400; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal-box { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 26px; max-width: 400px; width: 100%; box-shadow: var(--shadow-lift); }
.modal-box h3 { margin-top: 0; font-size: 28px; }
.modal-step { display: none; }
.modal-step.active { display: block; }
.modal-note { font-size: 13.5px; color: var(--c600); margin: 6px 0 14px; }

/* ---- Profile page: "this week" worked-hours mini calendar ---- */
.week-hours-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin: 12px 0 4px; }
.week-hours-day { text-align: center; padding: 10px 4px; border-radius: 10px; background: var(--c100); border: 1px solid var(--line); }
.week-hours-day.is-today { border-color: var(--accent); background: var(--c200); }
.week-hours-day .wh-name { font-size: 10.5px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.03em; }
.week-hours-day .wh-date { font-size: 11px; color: var(--muted); margin-top: 2px; }
.week-hours-day .wh-hours { font-size: 14.5px; font-weight: 700; margin-top: 6px; color: var(--accent-dark); }
.week-hours-day .wh-hours.is-off { color: var(--muted); font-weight: 500; }
@media (max-width: 640px) {
  .week-hours-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---- Training & Resources (Behind the Bar + In the Kitchen) ---- */
.training-hero {
  background: linear-gradient(120deg, var(--accent-dark), var(--c600) 130%);
  color: var(--c100);
  border-radius: 16px;
  padding: 30px 32px;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
}
.training-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 88% 20%, hsla(173,22%,96%,0.14), transparent 55%);
  pointer-events: none;
}
.training-hero h2 { margin: 0 0 6px; font-size: 26px; color: var(--c50); }
.training-hero p { margin: 0; opacity: 0.88; max-width: 560px; font-size: 14.5px; }
.training-hero .btn { margin-top: 16px; background: var(--card); color: var(--accent-dark); font-weight: 700; }
.training-hero .btn:hover { background: var(--c100); }

.training-section-head { margin-bottom: 16px; }
.training-section-head h3 { margin: 0 0 4px; font-size: 19px; color: var(--ink); }
.training-section-head p { margin: 0; max-width: 640px; font-size: 13.5px; }

.training-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.training-column {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  border-top: 5px solid var(--col-accent, var(--accent));
}
.training-column-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.training-column-icon {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: color-mix(in srgb, var(--col-accent, var(--accent)) 16%, white);
  display: flex; align-items: center; justify-content: center;
  color: var(--col-accent, var(--accent));
}
.training-column-icon svg { width: 20px; height: 20px; }
.training-column-title { font-weight: 700; font-size: 16px; color: var(--ink); }
.training-column-count { font-size: 12px; color: var(--muted); font-weight: 500; }
.training-column-add { margin-left: auto; }
.training-column-add a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--col-accent, var(--accent)); color: var(--c50); font-size: 18px; font-weight: 700; line-height: 1;
}
.training-column-add a:hover { text-decoration: none; opacity: 0.88; }

.training-card-list { display: flex; flex-direction: column; gap: 10px; }
.training-card {
  display: flex; gap: 12px; align-items: center;
  background: var(--c100); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px; transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.training-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px hsla(173,45%,15%,0.1); text-decoration: none; }
.training-card-thumb {
  width: 54px; height: 54px; border-radius: 10px; flex-shrink: 0;
  background: color-mix(in srgb, var(--col-accent, var(--accent)) 14%, white);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  color: var(--col-accent, var(--accent));
}
.training-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.training-card-thumb svg { width: 24px; height: 24px; }
.training-card-body { min-width: 0; flex: 1; }
.training-card-name { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.training-card-subtitle { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.training-tutorial-tag {
  display: inline-flex; align-items: center; gap: 3px; margin-top: 5px;
  font-size: 11px; font-weight: 600; color: var(--col-accent, var(--accent));
}
.training-tutorial-tag svg { width: 11px; height: 11px; }

.training-empty {
  border: 1.5px dashed var(--c300); border-radius: 12px; padding: 22px 14px;
  text-align: center; color: var(--muted); font-size: 13.5px;
}
.training-empty a { font-weight: 600; }

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

/* Detail page */
.training-back-link { display: inline-block; margin-bottom: 14px; font-size: 13.5px; font-weight: 600; }
.training-detail-hero {
  border-radius: 16px; overflow: hidden; margin-bottom: 20px;
  background: linear-gradient(120deg, var(--col-accent, var(--accent-dark)), var(--accent-dark));
  color: var(--c50); position: relative; min-height: 160px;
  display: flex; align-items: flex-end; padding: 22px 26px;
}
.training-detail-hero.has-photo { background-size: cover; background-position: center; }
.training-detail-hero.has-photo::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(0deg, hsla(173,45%,15%,0.82), hsla(173,45%,15%,0.25) 65%);
}
.training-detail-hero-inner { position: relative; z-index: 1; }
.training-detail-category {
  display: inline-block; background: hsla(173,22%,96%,0.2); border-radius: 20px;
  padding: 3px 12px; font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; margin-bottom: 8px;
}
.training-detail-hero h2 { margin: 0; font-size: 26px; color: var(--c50); }
.training-detail-hero .training-detail-subtitle { opacity: 0.9; font-size: 14px; margin-top: 4px; }

.training-detail-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: start; }
.training-recipe-section { margin-bottom: 18px; }
.training-recipe-section:last-child { margin-bottom: 0; }
.training-recipe-section h4 {
  margin: 0 0 8px; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--muted); font-weight: 700;
}
.training-recipe-section .body-text { white-space: pre-wrap; font-size: 14.5px; line-height: 1.55; }

.training-video-panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.training-video-panel h4 { margin: 0 0 10px; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 700; }
.training-video-panel video, .training-video-panel iframe {
  width: 100%; aspect-ratio: 16/9; border-radius: 10px; border: none; display: block; background: #000;
}
.training-video-panel + .training-video-panel { margin-top: 14px; }
.training-no-video { text-align: center; color: var(--muted); font-size: 13px; padding: 26px 10px; border: 1.5px dashed var(--line); border-radius: 10px; }

.training-actions-row { display: flex; gap: 10px; margin-top: 20px; }

@media (max-width: 880px) {
  .training-detail-grid { grid-template-columns: 1fr; }
}

/* Add/edit form */
.training-current-media { display: flex; align-items: center; gap: 10px; margin: 6px 0 4px; }
.training-current-media img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.training-current-media span { font-size: 12.5px; color: var(--muted); }

.report-camera-overlay { display: none; position: fixed; inset: 0; background: var(--overlay); align-items: center; justify-content: center; z-index: 400; padding: 20px; }
.report-camera-overlay.open { display: flex; }
.report-camera-box { background: var(--card); border-radius: 16px; padding: 24px; max-width: 340px; width: 100%; text-align: center; }
.report-camera-video { width: 100%; max-width: 280px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 14px; background: #000; display: block; margin: 0 auto; }
.report-camera-actions { display: flex; gap: 10px; margin-top: 14px; }
.report-camera-actions .btn, .report-camera-actions .btn.secondary { flex: 1; }

/* ---- "Who's clocked in now" slide-in drawer (opened from the Dashboard
   stat tile) ---- */
.drawer-overlay {
  position: fixed; inset: 0; background: hsla(173,50%,10%,0.4);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease; z-index: 400;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer-panel {
  position: fixed; top: 0; right: -380px; width: 340px; max-width: 88vw; height: 100vh;
  background: var(--card); box-shadow: -8px 0 24px hsla(173,45%,15%,0.15); z-index: 401;
  transition: right 0.25s ease; display: flex; flex-direction: column;
}
.drawer-panel.open { right: 0; }
.drawer-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 24px 16px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.drawer-header h3 { margin: 0; font-size: 28px; display: flex; align-items: center; gap: 10px; }
.drawer-close { width: 40px; height: 40px; flex-shrink: 0; background: var(--c100); border: 1px solid var(--c200); border-radius: 12px; font-size: 22px; line-height: 1; color: var(--c700); cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; }
.drawer-close:hover { background: var(--c200); color: var(--c900); }
.drawer-body { flex: 1; overflow-y: auto; padding: 6px 24px 16px; }
.drawer-person { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--c100); }
.drawer-person:last-child { border-bottom: none; }
.drawer-person-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.drawer-person-initials { display: flex; align-items: center; justify-content: center; background: var(--c200); color: var(--c800); font-weight: 800; font-size: 13px; }
.drawer-person-info { min-width: 0; flex: 1; }
.drawer-person-name { font-weight: 700; font-size: 15px; color: var(--c900); }
.drawer-person-meta { display: flex; align-items: center; gap: 8px; margin-top: 5px; flex-wrap: wrap; font-size: 12px; }

@media (max-width: 480px) {
  .drawer-panel { width: 100%; max-width: 100%; right: -100%; }
}

/* ---- Roster "week at a glance" table — rows are staff, columns are days,
   sticky header row + sticky staff-name column so both stay in view while
   scrolling horizontally on a narrow screen. ---- */
.roster-table-card { overflow: hidden; }
.roster-table-wrap { overflow-x: auto; max-width: 100%; }
.roster-table { border-collapse: collapse; width: 100%; min-width: 620px; }
.roster-table th, .roster-table td { padding: 9px 8px; text-align: center; border-bottom: 1px solid var(--line); font-size: 13px; }
.roster-table thead th {
  position: sticky; top: 0; z-index: 2; background: var(--card);
  font-weight: 600; color: var(--muted); border-bottom: 2px solid var(--line);
}
.roster-table thead th a { color: var(--accent-dark); font-weight: 600; }
.roster-table-corner { position: sticky; left: 0; top: 0; z-index: 3; background: var(--card); text-align: left; }
.roster-table-name {
  position: sticky; left: 0; z-index: 1; background: var(--card);
  text-align: left; font-weight: 600; white-space: nowrap; border-right: 1px solid var(--line);
}
.roster-table-cell { min-width: 88px; }
.roster-table-off { color: var(--line); }
.roster-pill {
  display: inline-block; color: var(--c50); font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 20px; margin: 2px; white-space: nowrap;
}
.roster-pill:hover { opacity: 0.85; }

@media (max-width: 640px) {
  .kiosk-shell { padding: 18px 16px 30px; }
  .kiosk-header { flex-wrap: wrap; gap: 12px; }
  .kiosk-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
}

/* "Still there?" — shown a minute before the automatic sign-out
   (public/js/idle-logout.js). */
.idle-warning {
  position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: hsla(173, 40%, 8%, .55);
}
.idle-warning-card {
  width: min(420px, 100%); box-sizing: border-box; padding: 26px 26px 22px; border-radius: 22px;
  background: var(--c50); color: var(--c900); box-shadow: 0 30px 80px hsla(173, 40%, 8%, .35);
}
.idle-warning-card h2 {
  margin: 0 0 8px; font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 600; font-size: 30px; line-height: 1.05; color: var(--c800);
}
.idle-warning-card p { margin: 0 0 18px; font-size: 15px; line-height: 1.45; color: var(--c700); }
.idle-warning-card strong { color: var(--c900); font-variant-numeric: tabular-nums; }
.idle-warning-actions { display: flex; flex-wrap: wrap; gap: 10px; }
