:root {
  --ink: #1c1b1f;
  --paper: #f7f2e6;
  --card: #ffffff;
  --line: #e4dcc8;
  --accent: #1f4d3c;
  --accent-dark: #123328;
  --muted: #6b6355;
  --success: #2f9e44;
  --warn: #e8590c;
  --danger: #c92a2a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.sidebar {
  width: 220px;
  background: var(--accent-dark);
  color: #f4ece4;
  padding: 24px 16px;
  flex-shrink: 0;
}
.sidebar .brand {
  text-align: center;
  margin-bottom: 24px;
}
.sidebar .brand img {
  width: 100%;
  max-width: 180px;
  border-radius: 8px;
  display: block;
  margin: 0 auto 8px;
}
.sidebar .brand-sub {
  font-size: 12px;
  opacity: 0.75;
  letter-spacing: 0.03em;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f4ece4;
  padding: 9px 10px;
  border-radius: 6px;
  margin-bottom: 2px;
  font-size: 14px;
}
.sidebar nav a:hover { background: rgba(255,255,255,0.1); text-decoration: none; }
.sidebar nav a.active { background: rgba(255,255,255,0.18); font-weight: 600; }
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.85; }
.sidebar-danger-zone { margin-top: 24px; padding-top: 14px; border-top: 1px solid rgba(244,236,228,0.15); }
.sidebar-danger-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(244,236,228,0.5); margin-bottom: 6px; }
.sidebar-danger-btn {
  display: block; width: 100%; text-align: left; background: none; border: none;
  color: #e8a2a2; opacity: 0.85; cursor: pointer; font-size: 12.5px; padding: 6px 10px;
  border-radius: 6px;
}
.sidebar-danger-btn:hover { opacity: 1; background: rgba(232,162,162,0.12); }
.sidebar-danger-btn-strong { color: #ff9b9b; font-weight: 600; }
.sidebar .logout-form { margin-top: 24px; }
.sidebar button.linklike {
  background: none; border: none; color: #f4ece4; opacity: 0.8;
  cursor: pointer; font-size: 13px; padding: 9px 10px;
}
.sidebar button.linklike:hover { opacity: 1; text-decoration: underline; }

.main { flex: 1; padding: 28px 36px; max-width: 1100px; }
.main h2 { margin-top: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 18px;
  overflow-x: auto;
}
.logs-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.logs-tab-btn {
  background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 7px 14px;
  font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.logs-tab-btn:hover { border-color: var(--accent); color: var(--accent); }
.logs-tab-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.logs-tab-count { opacity: 0.75; font-weight: 500; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.stat-card .num { font-size: 26px; font-weight: 700; color: var(--accent-dark); }
.stat-card .label { font-size: 13px; color: var(--muted); margin-top: 2px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; }
tr:hover td { background: #fbf6ee; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; }
.btn.secondary { background: #fff; color: var(--accent); border: 1px solid var(--accent); }
.btn.secondary:hover { background: #fdf3ee; }
.btn.danger { background: var(--danger); }
.btn.small { padding: 5px 10px; font-size: 12px; white-space: nowrap; }

/* Access-grant toggle buttons (Users page) — soft pill style matching the
   badge language used elsewhere in the table, instead of a solid block
   button, so a row of several of these side by side reads as a set of
   small consistent controls rather than clashing, unevenly-wrapping buttons. */
.btn-toggle {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  line-height: 1.4;
}
.btn-toggle.grant { background: #ebfbee; color: var(--success); border-color: #b2f2bb; }
.btn-toggle.grant:hover { background: #d3f9d8; }
.btn-toggle.revoke { background: #fff5f5; color: var(--danger); border-color: #ffc9c9; }
.btn-toggle.revoke:hover { background: #ffe3e3; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge.confirmed { background: #e7f5ff; color: #1c7ed6; }
.badge.pending_approval { background: #fff9db; color: #e8590c; }
.badge.seated { background: #ebfbee; color: #2f9e44; }
.badge.cancelled { background: #f1f3f5; color: #868e96; }
.badge.completed { background: #f3f0ff; color: #7048e8; }

.badge.status-sent { background: #ebfbee; color: #2f9e44; }
.badge.status-failed { background: #fff5f5; color: #c92a2a; }
.badge.status-skipped-no-smtp { background: #fff9db; color: #e8590c; }

.badge.payment-unpaid { background: #fff5f5; color: #c92a2a; }
.badge.payment-deposit_paid { background: #fff9db; color: #e8590c; }
.badge.payment-paid_full { background: #ebfbee; color: #2f9e44; }
.badge.payment-refunded { background: #f1f3f5; color: #868e96; }

.badge.table-status-occupied { background: #fff5f5; color: var(--danger); }
.badge.table-status-reserved { background: #fff9db; color: #e8590c; }
.badge.table-status-available { background: #ebfbee; color: var(--success); }

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; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--muted); }
input, select, textarea {
  width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 14px; font-family: inherit; background: #fff;
}
textarea { resize: vertical; min-height: 70px; }
.field { margin-bottom: 14px; }

.error-box { background: #fff5f5; border: 1px solid #ffc9c9; color: #c92a2a; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.success-box { background: #ebfbee; border: 1px solid #b2f2bb; color: #2b8a3e; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.login-forgot-link { display: block; text-align: center; margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.login-forgot-link:hover { color: var(--accent-dark); }

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

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; margin: 16px 0; }
.detail-grid dt { font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.03em; }
.detail-grid dd { margin: 0 0 10px; font-size: 15px; }

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

.actions-row { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }

.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 32px; width: 340px; }
.login-card h1 { font-size: 20px; 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, glossier card. */
.login-wrap--brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: #1a1408;
  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) saturate(1.15);
  transform: scale(1.06);
}
.login-wrap--brand::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,11,5,0.78) 0%, rgba(15,11,5,0.4) 45%, rgba(15,11,5,0.85) 100%);
}
.login-card--brand {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.97);
  width: 460px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 52px 48px 44px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 6px 18px rgba(0,0,0,0.25);
}
.login-logo-full {
  width: 100%;
  max-width: 280px;
  display: block;
  margin: 0 auto 6px;
}
.login-tagline {
  text-align: center;
  color: var(--muted);
  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;
  border-radius: 9px;
  border-color: #ddd3c0;
}
.login-card--brand input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31,77,60,0.15);
}
.login-card--brand .btn {
  width: 100%;
  padding: 15px;
  font-size: 16px;
  border-radius: 9px;
  margin-top: 8px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 20px rgba(18,51,40,0.35);
}
.login-card--brand .btn:hover { background: var(--accent); }

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

.section-title { font-size: 16px; font-weight: 700; margin: 22px 0 10px; }
.muted { color: var(--muted); font-size: 13px; }

#calendar { background: #fff; 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: #fff;
}
.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: #fff; 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. */
.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(240px, 1fr)); gap: 20px; }
.menu-dish-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.menu-dish-card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(18, 51, 40, 0.14); }
.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: 6px; flex: 1; }
.menu-dish-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.menu-dish-name { font-weight: 700; font-size: 15.5px; line-height: 1.25; }
.menu-dish-price { font-weight: 700; color: var(--accent-dark); white-space: nowrap; font-size: 14.5px; }
.menu-dish-desc { font-size: 13px; color: var(--muted); line-height: 1.45; flex: 1; }
.menu-allergen-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.menu-allergen-tag {
  background: var(--paper); border: 1px solid var(--line); color: var(--muted);
  font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.03em;
}

/* 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. */
.menu-edit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 16px; }
.menu-edit-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.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: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.menu-edit-fields input { font-size: 13px; padding: 7px 8px; }
.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: 10px; padding: 14px 12px;
  display: flex; flex-direction: column; gap: 6px; justify-content: center;
}
.menu-add-card input { font-size: 13px; padding: 7px 8px; }
.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; }
}

.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: #fff; cursor: pointer; color: #fff; 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: #eef3ee; color: var(--accent-dark); border-radius: 20px; padding: 3px 10px; font-size: 12px; }

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

.menu-toggle { display: none; }

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #f4ece4 !important;
  text-decoration: none !important;
}
.user-card:hover { background: rgba(255,255,255,0.08); }
.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.25);
}
.user-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.12);
  color: #f4ece4;
}
.user-avatar-placeholder svg { width: 22px; height: 22px; opacity: 0.85; }
.user-card-text { min-width: 0; }
.user-card-name { font-size: 13px; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card-role { font-size: 11px; opacity: 0.7; letter-spacing: 0.03em; }

.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: #eef3ee;
  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: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,0.18);
}
.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(--accent-dark); color: #f4ece4;
}
.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%;
    padding: 12px 16px;
  }
  .sidebar .brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    margin-bottom: 0;
    gap: 10px;
  }
  .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: block;
    margin-left: auto;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.25);
    color: #f4ece4;
    padding: 7px 13px;
    border-radius: 6px;
    font-size: 17px;
    cursor: pointer;
  }

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

  .sidebar nav a { padding: 11px 12px; font-size: 15px; }

  .main { padding: 18px 16px; max-width: 100%; }

  .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: 340px; padding: 24px; }
}

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

/* Dashboard — flat, borderless layout. Sections are separated by
   whitespace instead of boxed cards, stat tiles use a soft colour tint
   instead of a hard border, and live-updating sections get a pulsing dot
   so it reads as "live" rather than static. Scoped to dash- classes so it
   doesn't touch .card/.stat-card used elsewhere in the app. */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 40px;
}
.dash-stat {
  background: var(--dash-tint, rgba(31,77,60,0.07));
  border-radius: 14px;
  padding: 18px 20px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  animation: dashFadeUp 0.35s ease both;
}
.dash-stat:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(18,51,40,0.08); }
.dash-stat.clickable { cursor: pointer; }
.dash-stat.clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dash-stat .num { font-size: 30px; font-weight: 700; color: var(--accent-dark); line-height: 1.15; display: flex; align-items: center; gap: 8px; }
.dash-stat .label { font-size: 13px; color: var(--muted); margin-top: 4px; }
.dash-stat.c-blue { --dash-tint: rgba(28,126,214,0.09); }
.dash-stat.c-blue .num { color: #1c5d96; }
.dash-stat.c-purple { --dash-tint: rgba(112,72,232,0.09); }
.dash-stat.c-purple .num { color: #5638b0; }
.dash-stat.c-amber { --dash-tint: rgba(232,89,12,0.09); }
.dash-stat.c-amber .num { color: #b3560c; }
.dash-stat.c-live { --dash-tint: rgba(47,158,68,0.11); }
.dash-stat.c-live .num { color: var(--success); }
.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); } }

.dash-section { margin-bottom: 40px; }
.dash-section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.dash-section-head h3 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 9px; }
.dash-section-head .hint { font-size: 12px; color: var(--muted); }

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

.dash-table-wrap table { width: 100%; }
.dash-table-wrap th { border-bottom: 2px solid var(--line); }
.dash-table-wrap tr:hover td { background: rgba(31,77,60,0.045); }
.dash-table-wrap tr.clickable:hover td { cursor: pointer; }

@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); }

.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 rgba(18,51,40,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: #fff; 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: #f1efe8; color: var(--muted); }
.kiosk-status-badge.kiosk-status-clocked_in { background: #ebfbee; color: var(--success); }
.kiosk-status-badge.kiosk-status-on_break { background: #fff9db; color: var(--warn); }

.kiosk-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(18,51,40,0.55); 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: #fff; 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: #eef3ee; }
.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: #fff; 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: #ebfbee; 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: #fff; border-radius: 30px;
  padding: 12px 18px; display: none; align-items: center; gap: 8px;
  cursor: pointer; box-shadow: 0 8px 20px rgba(18,51,40,0.25);
  font-size: 13px; font-weight: 600; border: none;
}
.kiosk-duties-tab-count { background: rgba(255,255,255,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 rgba(18,51,40,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: rgba(18,51,40,0.65); align-items: center; justify-content: center; z-index: 400; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal-box { background: var(--card); border-radius: 16px; padding: 24px; max-width: 380px; width: 100%; }
.modal-box h3 { margin-top: 0; }
.modal-step { display: none; }
.modal-step.active { display: block; }
.modal-note { font-size: 13px; color: var(--muted); 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: #f7f5ef; border: 1px solid var(--line); }
.week-hours-day.is-today { border-color: var(--accent); background: #eef3ee; }
.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), #6b3f1e 130%);
  color: #f7ede1;
  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%, rgba(255,255,255,0.14), transparent 55%);
  pointer-events: none;
}
.training-hero h2 { margin: 0 0 6px; font-size: 26px; color: #fff; }
.training-hero p { margin: 0; opacity: 0.88; max-width: 560px; font-size: 14.5px; }
.training-hero .btn { margin-top: 16px; background: #fff; color: var(--accent-dark); font-weight: 700; }
.training-hero .btn:hover { background: #f3ece0; }

.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: #fff; 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: #fbf9f4; 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 rgba(18,51,40,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(--line); 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: #fff; 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, rgba(18,51,40,0.82), rgba(18,51,40,0.25) 65%);
}
.training-detail-hero-inner { position: relative; z-index: 1; }
.training-detail-category {
  display: inline-block; background: rgba(255,255,255,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: #fff; }
.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: rgba(18,51,40,0.65); 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: rgba(18,51,40,0.35);
  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 rgba(18,51,40,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; padding: 18px 20px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.drawer-header h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.drawer-close { background: none; border: none; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.drawer-close:hover { color: var(--accent-dark); }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 20px; }
.drawer-person { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.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: #eef3ee; color: var(--accent-dark); font-weight: 700; font-size: 13px; }
.drawer-person-info { min-width: 0; flex: 1; }
.drawer-person-name { font-weight: 600; font-size: 14px; }
.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: #fff; 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; }
}
