/* ═══════════════════════════════════════════════════════════════
   Delta H Scheduling System — Stylesheet
   Admin dashboard style inspired by AnimeNL Volunteer Manager
   and Endeavor, with a modern dark-glass aesthetic.
   ═══════════════════════════════════════════════════════════════ */

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand palette */
  --brand-1: #6366f1;
  --brand-2: #8b5cf6;
  --brand-3: #ec4899;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Surface tokens (dark theme) */
  --bg-0: #0f1117;
  --bg-1: #161922;
  --bg-2: #1c2030;
  --bg-3: #232839;
  --bg-hover: #2a3045;
  --border: #2d3247;
  --border-light: #3a4055;

  /* Text */
  --text-1: #e8eaf0;
  --text-2: #a4abbd;
  --text-3: #6b7388;
  --text-dim: #4a5163;

  /* Gradients */
  --grad-brand: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  --grad-brand-soft: linear-gradient(135deg, rgba(99,102,241,.15), rgba(139,92,246,.15));
  --grad-accent: linear-gradient(135deg, var(--accent), var(--brand-1));
  --grad-success: linear-gradient(135deg, #10b981, #059669);
  --grad-danger: linear-gradient(135deg, #ef4444, #dc2626);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,.3);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.4);
  --shadow-glow: 0 0 24px rgba(99,102,241,.15);
  --shadow-card: 0 2px 8px rgba(0,0,0,.25);

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-full: 999px;

  /* Transitions */
  --t-fast: .15s cubic-bezier(.4,0,.2,1);
  --t-med: .25s cubic-bezier(.4,0,.2,1);
  --t-slow: .4s cubic-bezier(.4,0,.2,1);

  /* Layout */
  --sidebar-w: 248px;
}

html { font-size: 15px; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-0);
  color: var(--text-1);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ════════════════════════════════════════════════
   LOGIN SCREEN
   ════════════════════════════════════════════════ */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--bg-0);
  overflow: hidden;
}
.login-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 25% 30%, rgba(99,102,241,.12) 0%, transparent 50%),
    radial-gradient(circle at 75% 70%, rgba(139,92,246,.10) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(236,72,153,.05) 0%, transparent 60%);
}
.login-bg-grid::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.015) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}
.login-card {
  position: relative;
  z-index: 1;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 48px 44px;
  max-width: 440px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  animation: cardEntry .6s cubic-bezier(.16,1,.3,1);
}
@keyframes cardEntry {
  from { opacity: 0; transform: translateY(24px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
  animation: logoFloat 3s ease-in-out infinite;
}
@keyframes logoFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.login-card h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 6px;
}
.login-subtitle {
  color: var(--text-2);
  font-size: .95rem;
  margin-bottom: 36px;
}
.login-oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 24px;
  background: #5865F2;
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--t-fast);
  box-shadow: 0 4px 16px rgba(88,101,242,.35);
}
.login-oauth-btn:hover {
  background: #4752c4;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(88,101,242,.45);
}
.login-oauth-btn:active { transform: translateY(0); }
.login-scopes {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.login-scopes span {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  color: var(--text-3);
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--r-full);
}
.login-footer {
  margin-top: 28px;
  font-size: .82rem;
  color: var(--text-3);
}
.login-role-switch {
  display: flex;
  gap: 8px;
  margin-top: 24px;
  justify-content: center;
  flex-wrap: wrap;
}
.role-switch-btn {
  padding: 8px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  color: var(--text-2);
  font-size: .8rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--t-fast);
}
.role-switch-btn:hover { border-color: var(--brand-1); color: var(--text-1); }
.role-switch-btn.active {
  background: var(--grad-brand);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 12px rgba(99,102,241,.3);
}

/* ════════════════════════════════════════════════
   APP SHELL
   ════════════════════════════════════════════════ */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ─── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-1);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform var(--t-med);
}
.sidebar-header {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
.sidebar-header span {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -.01em;
}
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}
.nav-section-label {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
  padding: 16px 12px 8px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
  margin-bottom: 2px;
  position: relative;
}
.nav-item:hover {
  background: var(--bg-2);
  color: var(--text-1);
}
.nav-item.active {
  background: var(--grad-brand-soft);
  color: var(--text-1);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--grad-brand);
  border-radius: 2px;
}
.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: .8;
}
.nav-item.active svg { opacity: 1; }
.nav-badge {
  margin-left: auto;
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: var(--brand-1);
  color: #fff;
}
.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--border);
}
.user-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--r-md);
  background: var(--bg-2);
  cursor: pointer;
  transition: background var(--t-fast);
}
.user-mini:hover { background: var(--bg-3); }
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--r-full);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
  color: #fff;
}
.user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.user-name {
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role-badge {
  font-size: .68rem;
  font-weight: 600;
  color: var(--brand-1);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ─── Main Content ─── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 32px;
  max-width: calc(100vw - var(--sidebar-w));
  min-height: 100vh;
}

/* ─── Page Header ─── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}
.page-title-group h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.page-title-group p {
  color: var(--text-2);
  font-size: .9rem;
  margin-top: 4px;
}
.page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-1);
  font-size: .85rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.btn:hover { background: var(--bg-3); border-color: var(--border-light); }
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--grad-brand);
  border: none;
  color: #fff;
  box-shadow: 0 2px 12px rgba(99,102,241,.25);
}
.btn-primary:hover { box-shadow: 0 4px 20px rgba(99,102,241,.35); }
.btn-success {
  background: var(--grad-success);
  border: none;
  color: #fff;
}
.btn-danger {
  background: var(--grad-danger);
  border: none;
  color: #fff;
}
.btn-ghost {
  background: transparent;
  border-color: var(--border-light);
  color: var(--text-2);
}
.btn-ghost:hover { color: var(--text-1); }
.btn-sm { padding: 6px 12px; font-size: .78rem; }
.btn-icon {
  padding: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-icon svg { width: 16px; height: 16px; }

/* ════════════════════════════════════════════════
   CARDS
   ════════════════════════════════════════════════ */
.card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title {
  font-size: 1rem;
  font-weight: 700;
}
.card-body { padding: 22px; }

/* ─── Stat Cards ─── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: all var(--t-fast);
}
.stat-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-brand);
}
.stat-card.success::before { background: var(--grad-success); }
.stat-card.warning::before { background: linear-gradient(90deg, #f59e0b, #f97316); }
.stat-card.info::before { background: var(--grad-accent); }
.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  background: var(--grad-brand-soft);
}
.stat-icon svg { width: 20px; height: 20px; color: var(--brand-1); }
.stat-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1;
}
.stat-label {
  color: var(--text-2);
  font-size: .82rem;
  margin-top: 6px;
}
.stat-sub {
  color: var(--text-3);
  font-size: .75rem;
  margin-top: 4px;
}

/* ════════════════════════════════════════════════
   TABLES
   ════════════════════════════════════════════════ */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--r-lg);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .87rem;
}
thead th {
  text-align: left;
  padding: 14px 16px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: var(--bg-1);
}
thead th.sticky {
  position: sticky;
  top: 0;
  z-index: 2;
}
tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tbody tr {
  transition: background var(--t-fast);
}
tbody tr:hover { background: var(--bg-2); }
tbody tr:last-child td { border-bottom: none; }

/* ─── Badges ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-success { background: rgba(16,185,129,.12); color: #34d399; }
.badge-warning { background: rgba(245,158,11,.12); color: #fbbf24; }
.badge-danger { background: rgba(239,68,68,.12); color: #f87171; }
.badge-info { background: rgba(59,130,246,.12); color: #60a5fa; }
.badge-brand { background: rgba(99,102,241,.12); color: #a5b4fc; }
.badge-neutral { background: var(--bg-3); color: var(--text-2); }
.badge-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ════════════════════════════════════════════════
   AVAILABILITY CHIPS / TIME PICKER
   ════════════════════════════════════════════════ */
.avail-day {
  margin-bottom: 20px;
}
.avail-day-label {
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.avail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.time-chip {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: .78rem;
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: all var(--t-fast);
  background: var(--bg-2);
  color: var(--text-2);
  user-select: none;
}
.time-chip:hover {
  border-color: var(--brand-1);
  color: var(--text-1);
}
.time-chip.selected {
  background: var(--grad-brand);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(99,102,241,.3);
  animation: chipPulse .3s ease;
}
@keyframes chipPulse {
  0% { transform: scale(.92); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* ─── Segmented Control ─── */
.segmented {
  display: inline-flex;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 3px;
  gap: 2px;
}
.segmented button {
  padding: 7px 16px;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: .82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border-radius: 7px;
  transition: all var(--t-fast);
}
.segmented button:hover { color: var(--text-1); }
.segmented button.active {
  background: var(--bg-3);
  color: var(--text-1);
  box-shadow: var(--shadow-sm);
}

/* ════════════════════════════════════════════════
   SHIFT CARDS
   ════════════════════════════════════════════════ */
.shift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.shift-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  transition: all var(--t-fast);
  position: relative;
  overflow: hidden;
}
.shift-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.shift-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}
.shift-card[data-dept="Main Hall"]::before { background: var(--brand-1); }
.shift-card[data-dept="Registration"]::before { background: var(--accent); }
.shift-card[data-dept="Tech / AV"]::before { background: var(--warning); }
.shift-card[data-dept="Food Service"]::before { background: var(--success); }
.shift-card[data-dept="Security"]::before { background: var(--danger); }
.shift-card[data-dept="Guest Relations"]::before { background: var(--brand-3); }
.shift-card[data-dept="Decorations"]::before { background: #a855f7; }
.shift-card[data-dept="Hospitality"]::before { background: var(--info); }
.shift-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}
.shift-title { font-size: 1rem; font-weight: 700; }
.shift-dept { font-size: .78rem; color: var(--text-2); margin-top: 3px; }
.shift-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.shift-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--text-2);
}
.shift-meta-row svg { width: 15px; height: 15px; opacity: .7; }
.shift-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.shift-capacity-bar {
  height: 6px;
  background: var(--bg-3);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}
.shift-capacity-fill {
  height: 100%;
  border-radius: 3px;
  transition: width var(--t-med);
}

/* ════════════════════════════════════════════════
   PROFILE CARD
   ════════════════════════════════════════════════ */
.profile-hero {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 28px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.profile-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 80px;
  background: var(--grad-brand-soft);
}
.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  z-index: 1;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}
.profile-info { z-index: 1; }
.profile-name { font-size: 1.5rem; font-weight: 700; }
.profile-discord { color: var(--text-2); font-size: .9rem; margin-top: 4px; }
.profile-badges { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* ─── Info Rows ─── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.info-item {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
}
.info-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-3);
  margin-bottom: 6px;
}
.info-value {
  font-size: .95rem;
  font-weight: 500;
}

/* ─── Form Elements ─── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--text-2);
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-1);
  font-size: .9rem;
  font-family: inherit;
  transition: all var(--t-fast);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--brand-1);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-row { display: flex; gap: 16px; }
.form-row > .form-group { flex: 1; }

/* ════════════════════════════════════════════════
   MODALS / DIALOGS
   ════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  max-width: 540px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalEntry .3s cubic-bezier(.16,1,.3,1);
}
.modal-card.lg { max-width: 720px; }
@keyframes modalEntry {
  from { opacity: 0; transform: translateY(20px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  padding: 22px 26px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-size: 1.15rem; font-weight: 700; }
.modal-close {
  background: transparent;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
}
.modal-close:hover { background: var(--bg-2); color: var(--text-1); }
.modal-close svg { width: 20px; height: 20px; display: block; }
.modal-body { padding: 26px; }
.modal-footer {
  padding: 18px 26px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ════════════════════════════════════════════════
   TOASTS
   ════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  animation: toastEntry .3s cubic-bezier(.16,1,.3,1);
  min-width: 280px;
  max-width: 420px;
}
@keyframes toastEntry {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
.toast.removing { animation: toastExit .3s ease forwards; }
@keyframes toastExit {
  to { opacity: 0; transform: translateX(40px); }
}
.toast-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.info .toast-icon { color: var(--info); }
.toast-text { font-size: .87rem; }

/* ════════════════════════════════════════════════
   HOTEL / ROOM CARDS
   ════════════════════════════════════════════════ */
.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.room-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  transition: all var(--t-fast);
}
.room-card:hover { border-color: var(--border-light); }
.room-card.over-capacity {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px rgba(239,68,68,.2);
}
.room-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.room-number {
  font-size: 1.1rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
}
.room-occupants {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.room-occupant {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-2);
  border-radius: var(--r-md);
  font-size: .82rem;
}
.room-occupant-avatar {
  width: 26px;
  height: 26px;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

/* ─── Progress bars ─── */
.progress {
  height: 8px;
  background: var(--bg-3);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width var(--t-slow);
}

/* ─── Tabs ─── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
}
.tab {
  padding: 12px 20px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.tab:hover { color: var(--text-1); }
.tab.active {
  color: var(--text-1);
  border-bottom-color: var(--brand-1);
}

/* ─── Empty state ─── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
}
.empty-state svg { width: 48px; height: 48px; opacity: .3; margin-bottom: 16px; }
.empty-state p { font-size: .9rem; }

/* ─── Flex utilities ─── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

/* ─── Spacing ─── */
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }

/* ─── Text ─── */
.text-sm { font-size: .82rem; }
.text-xs { font-size: .72rem; }
.text-dim { color: var(--text-3); }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

/* ─── Divider ─── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* ─── Animations ─── */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: slideUp .4s cubic-bezier(.16,1,.3,1) backwards; }
.animate-in:nth-child(1) { animation-delay: .02s; }
.animate-in:nth-child(2) { animation-delay: .06s; }
.animate-in:nth-child(3) { animation-delay: .1s; }
.animate-in:nth-child(4) { animation-delay: .14s; }
.animate-in:nth-child(5) { animation-delay: .18s; }
.animate-in:nth-child(6) { animation-delay: .22s; }

/* ─── Grid layouts ─── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ─── Filter bar ─── */
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.filter-bar .form-input, .filter-bar .form-select {
  width: auto;
  min-width: 160px;
}

/* ─── Day selector pills ─── */
.day-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.day-pill {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
  background: var(--bg-2);
  color: var(--text-2);
}
.day-pill:hover { border-color: var(--brand-1); color: var(--text-1); }
.day-pill.active {
  background: var(--grad-brand);
  border-color: transparent;
  color: #fff;
}

/* ─── Guest flight card ─── */
.flight-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  gap: 20px;
  align-items: center;
  transition: all var(--t-fast);
  margin-bottom: 12px;
}
.flight-card:hover { border-color: var(--border-light); box-shadow: var(--shadow-sm); }
.flight-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: var(--grad-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.flight-icon svg { width: 24px; height: 24px; color: #fff; }

/* ─── Activity log ─── */
.log-entry {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
}
.log-entry:last-child { border-bottom: none; }
.log-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: .75rem;
  color: var(--text-3);
  white-space: nowrap;
  min-width: 120px;
}
.log-action { flex: 1; }
.log-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.log-icon svg { width: 14px; height: 14px; }

/* ─── Food count display ─── */
.meal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.meal-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  text-align: center;
  transition: all var(--t-fast);
}
.meal-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.meal-icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.meal-icon-circle svg { width: 28px; height: 28px; }
.meal-count { font-size: 2.5rem; font-weight: 800; letter-spacing: -.03em; }
.meal-label { color: var(--text-2); font-size: .88rem; margin-top: 4px; }
.meal-window { color: var(--text-3); font-size: .75rem; margin-top: 6px; font-family: 'JetBrains Mono', monospace; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-100%); z-index: 200; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .main-content { padding: 16px; }
  .profile-hero { flex-direction: column; text-align: center; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 1.5rem; }
}

/* Live Delta H app compatibility layer */
body {
  background:
    radial-gradient(circle at 16% 12%, rgba(99, 102, 241, .18), transparent 34rem),
    radial-gradient(circle at 84% 4%, rgba(6, 182, 212, .13), transparent 30rem),
    radial-gradient(circle at 76% 92%, rgba(236, 72, 153, .09), transparent 30rem),
    var(--bg-0);
}

body.logged-in {
  padding-left: var(--sidebar-w);
}

body.logged-in main {
  width: auto;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 28px;
  animation: fadeUp .45s cubic-bezier(.16, 1, .3, 1);
}

main {
  display: block;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-shell {
  width: 100%;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.login-screen .auth-card-single {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100vw - 36px));
  max-width: 760px;
  background: rgba(22, 25, 34, .88);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--r-xl);
  padding: 36px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  backdrop-filter: blur(18px);
  animation: cardEntry .6s cubic-bezier(.16, 1, .3, 1);
}

.auth-brand-panel {
  text-align: center;
}

.auth-brand-panel h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 800;
  letter-spacing: 0;
  margin: 8px 0 12px;
}

.auth-preview {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.auth-preview span,
.status-pill,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: var(--r-full);
  background: rgba(99, 102, 241, .12);
  border: 1px solid rgba(99, 102, 241, .24);
  color: var(--text-2);
  font-size: .78rem;
  font-weight: 700;
}

.auth-form {
  background: rgba(28, 32, 48, .62);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.signup-step {
  display: grid;
  gap: 14px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: max-height var(--t-slow), opacity var(--t-med), transform var(--t-med);
}

.signup-step.is-active {
  max-height: 1500px;
  opacity: 1;
  transform: translateY(0);
  padding-bottom: 8px;
}

.signup-step.is-locked {
  pointer-events: none;
}

.signup-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.signup-progress span {
  height: 7px;
  border-radius: var(--r-full);
  background: var(--bg-3);
  transition: background var(--t-fast), box-shadow var(--t-fast);
}

.signup-progress span.is-active,
.signup-progress span.is-complete {
  background: var(--grad-brand);
  box-shadow: var(--shadow-glow);
}

.app-header {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  height: 100vh;
  padding: 24px 18px;
  background: rgba(15, 17, 23, .92);
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
  z-index: 100;
}

.brand-block {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-block h1 {
  font-size: 1rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  background: var(--grad-brand);
  box-shadow: 0 8px 24px rgba(99, 102, 241, .35);
}

.tabs {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
}

.tab {
  position: relative;
  width: 100%;
  justify-content: flex-start;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  padding: 12px 14px 12px 42px;
  text-align: left;
  font-size: .92rem;
  transition: transform var(--t-fast), background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}

.tab::before {
  content: attr(data-icon);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--bg-2);
  color: var(--text-3);
  font-size: .72rem;
  font-weight: 800;
}

.tab:hover {
  transform: translateX(2px);
  background: var(--bg-2);
  border-color: var(--border);
}

.tab.active {
  background: var(--grad-brand);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 28px rgba(99, 102, 241, .28);
}

.tab.active::before {
  background: rgba(255, 255, 255, .2);
  color: #fff;
}

.account-box {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

#accountLabel {
  color: var(--text-2);
  font-size: .86rem;
  line-height: 1.35;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.page-heading h2 {
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0;
}

.eyebrow {
  color: var(--accent);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.summary {
  color: var(--text-2);
  line-height: 1.55;
}

.panel {
  position: relative;
  overflow: hidden;
  background: rgba(22, 25, 34, .78);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
}

.panel::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--grad-accent);
}

.panel + .panel,
.toolbar,
.submit-bar {
  margin-top: 18px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.panel-heading h2,
.panel h2 {
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.workspace-grid,
.admin-grid,
.management-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(340px, .9fr);
  gap: 18px;
  margin-bottom: 18px;
}

.management-shell {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.command-panel {
  min-height: 100%;
}

.stats-grid,
.management-overview,
.my-schedule-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.stat,
.mini-stat {
  position: relative;
  overflow: hidden;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.stat::before,
.mini-stat::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad-brand);
}

.stat span,
.mini-stat span {
  display: block;
  color: var(--text-3);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.stat strong,
.mini-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
  line-height: 1;
}

label {
  display: grid;
  gap: 8px;
  color: var(--text-2);
  font-size: .84rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-2);
  color: var(--text-1);
  padding: 10px 12px;
  font: inherit;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}

input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  accent-color: var(--brand-1);
}

input[type="file"] {
  min-height: 44px;
  padding: 8px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .18);
  background: var(--bg-3);
}

.form-grid,
.assignment-controls,
.export-controls,
.import-controls,
.hotel-tools,
.meal-controls,
.preference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.form-actions,
.button-row {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-button,
.quiet-button,
.danger-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  padding: 10px 16px;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}

.primary-button {
  background: var(--grad-brand);
  box-shadow: 0 8px 22px rgba(99, 102, 241, .26);
}

.quiet-button {
  background: var(--bg-2);
  border-color: var(--border);
  color: var(--text-1);
}

.danger-button {
  background: rgba(239, 68, 68, .12);
  border-color: rgba(239, 68, 68, .45);
  color: #fecaca;
}

.primary-button:hover,
.quiet-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.login-oauth-btn {
  background: linear-gradient(135deg, #5865f2, #7c3aed);
}

.message {
  color: var(--accent);
  font-weight: 700;
  line-height: 1.45;
  margin-top: 12px;
}

.message:empty {
  display: none;
}

.profile-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) minmax(220px, 320px);
  align-items: center;
  gap: 18px;
}

.profile-photo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  background: var(--bg-2);
  border: 1px solid var(--border);
}

.photo-upload {
  justify-self: end;
  width: 100%;
}

.availability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.availability-day {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
}

.availability-day h3,
.availability-day h4 {
  margin-bottom: 12px;
}

.availability-times,
.availability-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.time-chip,
.availability-times label,
.availability-options label,
.check-row {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-2);
  color: var(--text-2);
  padding: 8px 10px;
  cursor: pointer;
  transition: transform var(--t-fast), border-color var(--t-fast), background var(--t-fast), color var(--t-fast);
}

.time-chip:hover,
.availability-times label:hover,
.availability-options label:hover,
.check-row:hover {
  transform: translateY(-1px);
  border-color: var(--brand-1);
  color: var(--text-1);
}

.time-chip.selected,
.availability-times label:has(input:checked),
.availability-options label:has(input:checked),
.check-row:has(input:checked) {
  background: var(--grad-brand);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 24px rgba(99, 102, 241, .25);
}

.availability-times input,
.availability-options input,
.check-row input {
  flex: 0 0 auto;
}

.toolbar,
.submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.shift-grid,
.my-shift-list,
.admin-card-list,
.checked-in-list,
.hotel-room-grid {
  display: grid;
  gap: 14px;
}

.shift-grid,
.hotel-room-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.shift-card,
.admin-card,
.hotel-room-card,
.room-card,
.flight-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}

.shift-card:hover,
.admin-card:hover,
.hotel-room-card:hover,
.room-card:hover,
.flight-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
}

.shift-card::before,
.admin-card::before,
.hotel-room-card::before,
.room-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad-accent);
}

.shift-meta,
.card-meta,
.admin-card p,
.hotel-room-card p,
.room-card p {
  color: var(--text-2);
  line-height: 1.45;
}

.shift-day-divider {
  grid-column: 1 / -1;
  color: var(--accent);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 8px 2px 0;
}

.shift-card {
  display: grid;
  gap: 16px;
}

.shift-card.selected {
  border-color: rgba(99, 102, 241, .62);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, .26), var(--shadow-md);
}

.shift-card.full {
  opacity: .65;
}

.shift-card h3 {
  font-size: 1.1rem;
  line-height: 1.2;
}

.shift-meta {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.shift-card button,
.admin-list-card button {
  justify-self: start;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-2);
  color: var(--text-1);
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
}

.shift-card.selected button {
  background: var(--grad-brand);
  border-color: transparent;
  color: #fff;
}

.shift-card button:disabled {
  cursor: not-allowed;
  opacity: .65;
}

.my-shift-card,
.admin-list-card,
.hotel-occupant {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px;
}

.my-shift-card strong,
.admin-list-card strong,
.hotel-occupant strong {
  display: block;
  color: var(--text-1);
}

.my-shift-card span,
.admin-list-card span,
.hotel-occupant .summary {
  color: var(--text-2);
  font-size: .86rem;
}

.admin-list-card {
  grid-template-columns: minmax(0, 1fr) minmax(160px, 1fr) auto;
}

.hotel-room-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.hotel-room-card.over-capacity,
.room-card.over-capacity {
  border-color: rgba(239, 68, 68, .55);
}

.hotel-occupant-actions {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(140px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--text-3);
  background: rgba(28, 32, 48, .88);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

td {
  color: var(--text-2);
}

tr:hover td {
  background: rgba(255, 255, 255, .02);
}

.assignment-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.availability-toolbar,
.clock-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.clock-actions {
  justify-content: flex-end;
}

.segmented-buttons {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented-buttons button,
.day-pill {
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--bg-2);
  color: var(--text-2);
  padding: 9px 13px;
  font-weight: 800;
  cursor: pointer;
}

.segmented-buttons button.active,
.day-pill.active {
  background: var(--grad-brand);
  border-color: transparent;
  color: #fff;
}

.loadout-box {
  display: grid;
  gap: 8px;
  background: rgba(99, 102, 241, .08);
  border: 1px solid rgba(99, 102, 241, .18);
  border-radius: var(--r-lg);
  padding: 14px;
}

.application-panel {
  max-width: 1180px;
}

.application-form {
  display: grid;
  gap: 18px;
}

.field-label {
  color: var(--text-2);
  font-size: .84rem;
  font-weight: 800;
  margin: 6px 0 10px;
}

.day-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.day-option input {
  flex: 0 0 auto;
}

.application-answer-list {
  display: grid;
  gap: 6px;
  max-width: 360px;
  color: var(--text-2);
  font-size: .84rem;
  line-height: 1.45;
}

.application-answer-list strong {
  color: var(--text-1);
}

.meal-controls {
  align-items: end;
  margin-bottom: 14px;
}

.hotel-tools {
  align-items: end;
  margin-bottom: 18px;
}

dialog {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text-1);
}

dialog::backdrop {
  background: rgba(0, 0, 0, .68);
  backdrop-filter: blur(8px);
}

.dialog-card {
  min-width: min(520px, calc(100vw - 32px));
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.dialog-card h3 {
  margin-bottom: 12px;
}

.dialog-card ul {
  display: grid;
  gap: 8px;
  padding-left: 20px;
  margin-bottom: 18px;
  color: var(--text-2);
}

@media (max-width: 1180px) {
  .workspace-grid,
  .admin-grid,
  .management-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }

  body.logged-in {
    padding-left: 0;
  }

  .app-header {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    padding: 14px;
    flex-direction: column;
  }

  .tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.logged-in main {
    padding: 18px 14px 28px;
  }

  .profile-row {
    grid-template-columns: 64px 1fr;
  }

  .photo-upload {
    grid-column: 1 / -1;
    justify-self: stretch;
  }
}

@media (max-width: 640px) {
  .login-screen .auth-card-single {
    padding: 22px;
  }

  .tabs,
  .stats-grid,
  .management-overview,
  .my-schedule-summary,
  .assignment-board,
  .availability-times {
    grid-template-columns: 1fr;
  }

  .panel,
  .auth-form {
    padding: 16px;
  }

  .page-heading,
  .panel-heading,
  .toolbar,
  .submit-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .clock-actions {
    justify-content: flex-start;
  }

  .shift-grid,
  .hotel-room-grid {
    grid-template-columns: 1fr;
  }
}

/* ════════════════════════════════════════════════
   2026 OPERATIONS REFRESH + SAFETY WORKSPACE
   ════════════════════════════════════════════════ */
:root {
  --safety: #f59e0b;
  --safety-soft: rgba(245, 158, 11, .12);
  --safety-border: rgba(245, 158, 11, .32);
  --critical: #fb7185;
  --critical-soft: rgba(251, 113, 133, .12);
}

body.logged-in main {
  max-width: 1700px;
  margin-inline: auto;
  padding: 34px clamp(20px, 3vw, 48px) 56px;
}

.app-header::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 5%, rgba(99, 102, 241, .18), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,.018), transparent 40%);
}

.brand-mark {
  letter-spacing: -.03em;
  background: linear-gradient(145deg, #818cf8, #6366f1 50%, #4f46e5);
  border: 1px solid rgba(255,255,255,.14);
}

.brand-block .eyebrow {
  color: #818cf8;
}

.tab.safety-tab.active {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  box-shadow: 0 8px 28px rgba(245, 158, 11, .24);
}

.page-heading .summary {
  max-width: 760px;
  margin-top: 8px;
}

.panel {
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}

button,
input,
select,
textarea {
  outline: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(99, 102, 241, .36);
  outline-offset: 2px;
}

.safety-heading .eyebrow,
.safety-view .panel-heading .eyebrow,
.safety-view .incident-editor-header .eyebrow {
  color: var(--safety);
}

.safety-primary {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  box-shadow: 0 7px 22px rgba(245, 158, 11, .22);
}

.safety-primary:hover {
  box-shadow: 0 10px 30px rgba(245, 158, 11, .3);
}

.safety-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
}

.safety-stat {
  min-height: 132px;
  display: grid;
  align-content: center;
  gap: 4px;
  background: linear-gradient(145deg, rgba(28, 32, 48, .94), rgba(22, 25, 34, .72));
}

.safety-stat::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent);
}

.safety-stat.active::after { background: var(--safety); }
.safety-stat.urgent::after { background: var(--critical); }
.safety-stat.resolved::after { background: var(--success); }
.safety-stat small { color: var(--text-3); line-height: 1.35; }

.safety-workspace {
  display: grid;
  grid-template-columns: minmax(300px, .62fr) minmax(0, 1.5fr);
  gap: 20px;
  align-items: start;
}

.incident-index-panel {
  position: sticky;
  top: 22px;
  max-height: calc(100vh - 44px);
  display: flex;
  flex-direction: column;
}

.incident-index-panel::before,
.incident-editor-panel::before {
  background: linear-gradient(90deg, #d97706, #f59e0b, rgba(245, 158, 11, 0));
}

.incident-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.incident-filters .search-field {
  grid-column: 1 / -1;
}

.incident-list {
  display: grid;
  gap: 10px;
  padding: 16px 3px 3px;
  overflow-y: auto;
}

.incident-list-card {
  width: 100%;
  display: grid;
  gap: 7px;
  padding: 14px;
  text-align: left;
  color: var(--text-1);
  background: rgba(28, 32, 48, .62);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: transform var(--t-fast), background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}

.incident-list-card:hover {
  transform: translateY(-1px);
  background: var(--bg-2);
  border-color: var(--border-light);
}

.incident-list-card.is-selected {
  background: var(--safety-soft);
  border-color: var(--safety-border);
  box-shadow: inset 3px 0 0 var(--safety), 0 8px 22px rgba(0,0,0,.16);
}

.incident-list-card > span:not(.incident-card-topline):not(.incident-card-meta) {
  color: var(--text-2);
  font-size: .82rem;
}

.incident-card-topline,
.incident-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.incident-card-meta {
  color: var(--text-3);
  font-size: .75rem;
}

.incident-number {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 7px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.07);
  color: var(--text-2);
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.severity-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .73rem;
  font-weight: 800;
}

.severity-dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-3);
  box-shadow: 0 0 0 4px rgba(107, 115, 136, .12);
}

.severity-low::before { background: var(--success); box-shadow: 0 0 0 4px rgba(16,185,129,.12); }
.severity-moderate::before { background: var(--warning); box-shadow: 0 0 0 4px rgba(245,158,11,.12); }
.severity-high::before,
.severity-critical::before { background: var(--critical); box-shadow: 0 0 0 4px rgba(251,113,133,.12); }

.status-pill.status-open,
.status-pill.status-investigating,
.status-pill.status-monitoring {
  min-height: 22px;
  padding: 2px 7px;
  color: #fbbf24;
  background: rgba(245, 158, 11, .1);
  border-color: rgba(245, 158, 11, .22);
}

.status-pill.status-resolved,
.status-pill.status-closed {
  min-height: 22px;
  padding: 2px 7px;
  color: #34d399;
  background: rgba(16, 185, 129, .1);
  border-color: rgba(16, 185, 129, .22);
}

.incident-editor-panel {
  padding: clamp(18px, 2.2vw, 30px);
}

.incident-editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.incident-editor-header h2 {
  margin-top: 4px;
  font-size: clamp(1.3rem, 2vw, 1.75rem);
}

.incident-form {
  display: grid;
  gap: 18px;
}

.incident-top-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.span-two {
  grid-column: span 2;
}

.incident-flags {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: rgba(28, 32, 48, .42);
}

.incident-save-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.incident-save-row .message,
.alert-form-actions .message {
  margin-right: auto;
}

.incident-subsection {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.incident-subsection .panel-heading {
  margin-bottom: 14px;
}

.privacy-chip {
  display: inline-flex;
  padding: 6px 10px;
  border: 1px solid var(--safety-border);
  border-radius: var(--r-full);
  color: #fbbf24;
  background: var(--safety-soft);
  font-size: .72rem;
  font-weight: 800;
}

.evidence-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.evidence-upload-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 14px;
  background: rgba(28, 32, 48, .56);
  border: 1px dashed var(--border-light);
  border-radius: var(--r-md);
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.evidence-card {
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.evidence-preview {
  height: 150px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(99,102,241,.12), rgba(6,182,212,.08)),
    var(--bg-1);
}

.evidence-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-med);
}

.evidence-preview:hover img { transform: scale(1.035); }
.evidence-preview.preview-failed img { display: none; }
.evidence-preview.preview-failed::after { content: 'Open evidence'; color: var(--text-2); font-weight: 700; }

.file-preview {
  display: grid;
  place-items: center;
  width: 62px;
  height: 74px;
  border-radius: 9px;
  background: rgba(99,102,241,.18);
  border: 1px solid rgba(99,102,241,.35);
  color: #a5b4fc;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
}

.evidence-card-body {
  display: grid;
  gap: 5px;
  padding: 12px;
}

.evidence-card-body span,
.evidence-card-body small {
  overflow: hidden;
  color: var(--text-3);
  font-size: .75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evidence-remove {
  width: fit-content;
  margin-top: 4px;
  padding: 4px 0;
  color: #fda4af;
  background: transparent;
  border: 0;
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
}

.incident-timeline {
  position: relative;
  display: grid;
  gap: 0;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  padding-bottom: 18px;
}

.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 13px;
  bottom: 0;
  width: 1px;
  background: var(--border-light);
}

.timeline-marker {
  width: 11px;
  height: 11px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--safety);
  box-shadow: 0 0 0 4px var(--safety-soft);
}

.timeline-item p { margin: 4px 0; color: var(--text-2); font-size: .84rem; line-height: 1.45; }
.timeline-item small { color: var(--text-3); }

.empty-state {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 180px;
  padding: 24px;
  text-align: center;
  color: var(--text-2);
  border: 1px dashed var(--border-light);
  border-radius: var(--r-md);
}

.empty-state > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #34d399;
  background: rgba(16,185,129,.12);
}

/* Missed shift alert builder */
.alert-command-panel {
  margin-bottom: 20px;
  background:
    linear-gradient(120deg, rgba(99,102,241,.08), transparent 42%),
    rgba(22, 25, 34, .82);
}

.alert-live-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid rgba(16,185,129,.25);
  border-radius: var(--r-full);
  color: #6ee7b7;
  background: rgba(16,185,129,.08);
  font-size: .74rem;
  font-weight: 800;
}

.alert-live-chip span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(16,185,129,.12);
}

.alert-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  gap: 24px;
}

.alert-rule-form {
  display: grid;
  gap: 15px;
  padding-right: 24px;
  border-right: 1px solid var(--border);
}

.alert-rule-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.alert-enabled {
  width: fit-content;
  padding: 8px 11px;
  border-radius: var(--r-full);
  background: rgba(16,185,129,.08);
  border: 1px solid rgba(16,185,129,.18);
}

.recipient-fieldset {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.recipient-fieldset legend {
  padding: 0 7px;
  color: var(--text-1);
  font-weight: 700;
}

.recipient-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
}

.recipient-card {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: rgba(28,32,48,.5);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}

.recipient-card.is-selected {
  border-color: rgba(99,102,241,.45);
  background: rgba(99,102,241,.1);
}

.recipient-card input { width: 15px; min-height: 15px; }
.recipient-card > span:nth-of-type(2) { min-width: 0; display: grid; }
.recipient-card strong,
.recipient-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recipient-card small { color: var(--text-3); font-size: .7rem; }

.recipient-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #c7d2fe;
  background: rgba(99,102,241,.18);
  font-size: .72rem;
  font-weight: 800;
}

.discord-linked {
  color: #6ee7b7;
  font-size: .65rem;
  font-weight: 800;
}

.placeholder-help {
  margin-top: -8px;
  color: var(--text-3);
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem;
}

.alert-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.alert-activity-column {
  display: grid;
  align-content: start;
  gap: 24px;
}

.alert-rule-list,
.alert-delivery-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.alert-rule-card {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 12px;
  text-align: left;
  color: var(--text-1);
  background: rgba(28,32,48,.52);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color var(--t-fast), transform var(--t-fast);
}

.alert-rule-card:hover { transform: translateY(-1px); border-color: var(--border-light); }
.alert-rule-card > span,
.alert-rule-card > small { color: var(--text-3); font-size: .74rem; }

.alert-rule-state {
  width: fit-content;
  padding: 3px 7px;
  border-radius: var(--r-full);
  font-size: .65rem !important;
  font-weight: 800;
}

.alert-rule-state.is-on { color: #6ee7b7; background: rgba(16,185,129,.1); }
.alert-rule-state.is-off { color: var(--text-2); background: rgba(107,115,136,.12); }

.alert-delivery-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 9px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: rgba(28,32,48,.42);
}

.alert-delivery-card > div { display: grid; }
.alert-delivery-card > div span,
.alert-delivery-card small,
.alert-delivery-card p { color: var(--text-3); font-size: .72rem; }
.alert-delivery-card small,
.alert-delivery-card p { grid-column: 1 / -1; }
.alert-delivery-card p { color: #fda4af; line-height: 1.4; }

.delivery-status {
  align-self: start;
  padding: 3px 6px;
  border-radius: var(--r-full);
  color: #fbbf24;
  background: rgba(245,158,11,.1);
  font-size: .64rem;
  font-weight: 800;
  text-transform: uppercase;
}

.alert-delivery-card.status-sent .delivery-status { color: #6ee7b7; background: rgba(16,185,129,.1); }
.alert-delivery-card.status-failed .delivery-status { color: #fda4af; background: rgba(251,113,133,.1); }

@media (max-width: 1380px) {
  .safety-workspace { grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr); }
  .incident-top-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .evidence-controls { grid-template-columns: 1fr; }
  .alert-workspace { grid-template-columns: 1fr; }
  .alert-rule-form { padding-right: 0; padding-bottom: 20px; border-right: 0; border-bottom: 1px solid var(--border); }
}

@media (max-width: 1050px) {
  .safety-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .safety-workspace { grid-template-columns: 1fr; }
  .incident-index-panel { position: static; max-height: none; }
  .incident-list { max-height: 430px; }
  .alert-rule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .safety-stats,
  .incident-top-grid,
  .evidence-controls,
  .alert-rule-grid,
  .recipient-grid {
    grid-template-columns: 1fr;
  }

  .span-two { grid-column: auto; }
  .incident-filters { grid-template-columns: 1fr; }
  .incident-filters .search-field { grid-column: auto; }
  .incident-editor-header,
  .incident-save-row,
  .alert-form-actions { align-items: stretch; flex-direction: column; }
  .incident-save-row .message,
  .alert-form-actions .message { margin-right: 0; }
  .evidence-upload-card { grid-template-columns: 1fr; }
  .incident-flags { display: grid; gap: 8px; }
}

/* ════════════════════════════════════════════════
   V0 COMMAND CENTER SHELL + ROSTER HANDOUTS
   ════════════════════════════════════════════════ */
:root {
  --brand-1: #6d5dfc;
  --brand-2: #8065ff;
  --accent: #7c6cff;
  --bg-0: #0d1017;
  --bg-1: #151922;
  --bg-2: #191e2a;
  --bg-3: #202638;
  --bg-hover: #242b3d;
  --border: #293145;
  --border-light: #39435a;
  --text-1: #f1f3f9;
  --text-2: #aab2c8;
  --text-3: #6f7894;
  --shadow-card: none;
  --shadow-lg: none;
  --shadow-md: 0 5px 16px rgba(0, 0, 0, .2);
  --r-sm: 5px;
  --r-md: 8px;
  --r-lg: 10px;
  --sidebar-w: 200px;
}

html { font-size: 14px; }

body {
  background: var(--bg-0);
}

body.logged-in main {
  max-width: none;
  margin: 0;
  padding: 28px 26px 48px;
}

.app-header {
  width: var(--sidebar-w);
  padding: 0;
  gap: 0;
  background: #151923;
  border-color: #2a3142;
  box-shadow: none;
  backdrop-filter: none;
}

.app-header::after,
.panel::before {
  display: none;
}

.brand-block {
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  min-height: 68px;
  padding: 16px 17px;
  border-bottom: 1px solid var(--border);
}

.brand-block .eyebrow { display: none; }

.brand-block h1 {
  overflow: hidden;
  color: #fff;
  font-size: 1rem;
  font-weight: 750;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: #6d5dfc;
  box-shadow: none;
  font-size: .72rem;
}

.tabs {
  align-content: start;
  gap: 2px;
  padding: 20px 10px;
}

.nav-section-label {
  padding: 0 9px 7px;
  color: #59637d;
  font-size: .61rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.tab {
  min-height: 34px;
  padding: 8px 10px 8px 37px;
  border: 0;
  border-radius: 7px;
  color: #aeb7cf;
  font-size: .78rem;
  font-weight: 600;
  transition: color var(--t-fast), background var(--t-fast);
}

.tab::before {
  left: 10px;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  color: #7d879f;
  background: transparent;
  font-size: .65rem;
}

.tab:hover {
  transform: none;
  background: #1c2230;
  border-color: transparent;
}

.tab.active,
.tab.safety-tab.active {
  color: #fff;
  background: rgba(112, 88, 225, .22);
  border-color: transparent;
  box-shadow: inset 3px 0 0 #7965ff;
}

.tab.active::before {
  color: #bfb6ff;
  background: transparent;
}

.account-box {
  gap: 8px;
  padding: 12px;
  background: #131722;
  border-top: 1px solid var(--border);
}

#accountLabel {
  overflow: hidden;
  color: #e5e8f2;
  font-size: .73rem;
  font-weight: 650;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.account-box .quiet-button {
  width: 100%;
}

.page-heading {
  align-items: flex-start;
  margin-bottom: 20px;
}

.page-heading h2 {
  font-size: 1.42rem;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.page-heading .summary {
  max-width: 760px;
  margin-top: 3px;
  font-size: .78rem;
}

.eyebrow {
  color: #68738e;
  font-size: .62rem;
  letter-spacing: .11em;
}

.panel {
  padding: 16px;
  overflow: hidden;
  background: #151923;
  border-color: var(--border);
  border-radius: 10px;
  box-shadow: none;
  backdrop-filter: none;
  transition: border-color var(--t-fast);
}

.panel:hover { border-color: #30394e; }

.panel-heading {
  align-items: center;
  margin-bottom: 14px;
}

.panel-heading h2,
.panel h2 {
  font-size: .92rem;
}

.workspace-grid,
.admin-grid,
.management-shell {
  gap: 14px;
  margin-bottom: 14px;
}

.stats-grid,
.management-overview,
.my-schedule-summary {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.stat,
.mini-stat {
  min-height: 104px;
  padding: 16px;
  background: #151923;
  border-radius: 10px;
  box-shadow: none;
}

.stat::before,
.mini-stat::before {
  height: 2px;
  background: #7462f7;
}

.stat span,
.mini-stat span {
  font-size: .65rem;
  letter-spacing: .05em;
}

.stat strong,
.mini-stat strong {
  margin-top: 10px;
  font-size: 1.65rem;
}

input,
select,
textarea {
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 7px;
  background: #1b2030;
  font-size: .78rem;
}

textarea { min-height: 90px; }

.primary-button,
.quiet-button,
.danger-button {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 7px;
  font-size: .75rem;
  box-shadow: none;
}

.primary-button { background: #725cf7; }

.primary-button:hover,
.quiet-button:hover,
.danger-button:hover {
  transform: none;
  box-shadow: none;
  filter: brightness(1.08);
}

.table-wrap {
  border-radius: 9px;
  background: #151923;
}

table { min-width: 850px; }

th,
td {
  padding: 11px 12px;
  font-size: .75rem;
}

th {
  color: #74809d;
  background: #171c27;
  font-size: .62rem;
  letter-spacing: .08em;
}

td { color: #b6bed1; }

tr:last-child td { border-bottom: 0; }
tr:hover td { background: rgba(113, 92, 247, .035); }

td select {
  min-height: 31px;
  padding: 5px 8px !important;
  border-radius: 6px !important;
  font-size: .72rem;
}

.badge {
  padding: 4px 7px;
  border-radius: 999px;
  font-size: .63rem;
}

.roster-panel-heading {
  align-items: flex-end;
}

.roster-toolbar {
  display: grid;
  grid-template-columns: minmax(190px, 1.35fr) repeat(3, minmax(145px, 1fr));
  gap: 8px;
  width: min(920px, 68vw);
}

.compact-field {
  gap: 4px;
  color: #6f7894;
  font-size: .61rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.shirt-size-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.shirt-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 4px 7px;
  color: #98a2bb;
  background: #1b2030;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .64rem;
}

.shirt-summary-chip strong { color: #d9dded; }

.shirt-pickup-cell {
  display: grid;
  grid-template-columns: auto minmax(100px, auto);
  align-items: center;
  justify-content: start;
  gap: 5px 7px;
  min-width: 176px;
}

.shirt-pickup-cell small {
  grid-column: 1 / -1;
  color: #69738e;
  font-size: .6rem;
}

.shirt-size-badge {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 30px;
  padding: 0 7px;
  color: #fff;
  background: rgba(114, 92, 247, .2);
  border: 1px solid rgba(128, 101, 255, .36);
  border-radius: 6px;
  font-weight: 800;
}

.shirt-pickup-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 8px;
  color: #a9b1c5;
  background: #1b2030;
  border: 1px solid #343d52;
  border-radius: 6px;
  font: inherit;
  font-size: .67rem;
  font-weight: 650;
  cursor: pointer;
}

.shirt-pickup-toggle:hover { border-color: #7462f7; }
.shirt-pickup-toggle:disabled { opacity: .55; cursor: wait; }

.shirt-pickup-toggle.is-picked {
  color: #6ee7b7;
  background: rgba(16, 185, 129, .09);
  border-color: rgba(16, 185, 129, .27);
}

.pickup-check {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  color: #7f8aa4;
  border: 1px solid #525d74;
  border-radius: 4px;
  font-size: .62rem;
}

.is-picked .pickup-check {
  color: #071a13;
  background: #34d399;
  border-color: #34d399;
}

.roster-person { min-width: 190px; }
.roster-photo { width: 30px; height: 30px; border-radius: 50%; }
.roster-person small { color: #6f7894; font-size: .65rem; }

.volunteer-profile-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-width: 1120px;
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  color: var(--text-1);
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.volunteer-profile-card { padding: 24px; }
.volunteer-profile-heading { position: sticky; top: 0; z-index: 2; padding-bottom: 16px; background: var(--bg-1); }
.volunteer-profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.profile-summary-form, .profile-note-form { display: grid; gap: 14px; }
.profile-note-column { padding-left: 24px; border-left: 1px solid var(--border); }
.profile-note-controls { display: grid; grid-template-columns: 1fr 130px; gap: 12px; }
.profile-note-list { display: grid; gap: 10px; max-height: 390px; overflow: auto; padding-right: 4px; }
.profile-note-card { padding: 14px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; }
.profile-note-card p { margin: 10px 0; white-space: pre-wrap; }
.profile-note-card small { color: var(--text-3); }
.profile-note-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.profile-recommendation { max-width: 145px; margin-top: 7px; color: var(--text-2); font-size: .67rem; line-height: 1.25; }

@media (max-width: 1100px) {
  .roster-panel-heading { align-items: stretch; flex-direction: column; }
  .roster-toolbar { width: 100%; }
}

@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  body.logged-in { padding-left: 0; }
  .app-header {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    padding: 0;
  }
  .brand-block { min-height: 56px; padding: 12px 14px; }
  .tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 9px; }
  .nav-section-label { grid-column: 1 / -1; padding-bottom: 3px; }
  .account-box { grid-template-columns: 1fr auto; align-items: center; }
  .account-box .quiet-button { width: auto; }
  body.logged-in main { padding: 18px 14px 30px; }
}

@media (max-width: 680px) {
  .roster-toolbar { grid-template-columns: 1fr; }
  .shirt-size-summary { margin-top: 8px; }
  .panel { padding: 14px; }
  .volunteer-profile-grid { grid-template-columns: 1fr; }
  .profile-note-column { padding-left: 0; padding-top: 20px; border-left: 0; border-top: 1px solid var(--border); }
  .profile-note-controls { grid-template-columns: 1fr; }
}
