/* ── Variables ──────────────────────────────────────────────────────────── */
:root {
  --primary: #4F46E5;
  --primary-light: #6366F1;
  --primary-dark: #3730A3;
  --accent: #F59E0B;
  --success: #10B981;
  --error: #EF4444;
  --warning: #F59E0B;
  --text: #111827;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --border: #E5E7EB;
  --bg: #F3F4F6;
  --card: #FFFFFF;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 24px rgba(0,0,0,0.1);
  --header-h: 56px;
  --bottom-nav-h: 62px;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── App header ─────────────────────────────────────────────────────────── */
.app-header {
  background: var(--primary);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(79,70,229,0.3);
}

.app-header-brand {
  color: white;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.app-header-right {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.header-user {
  color: rgba(255,255,255,0.7);
  font-size: 0.82rem;
  font-weight: 500;
}

.header-logout {
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 7px;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
.header-logout:hover { background: rgba(255,255,255,0.25); }

/* ── Bottom navigation ──────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-h);
  background: white;
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.07);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.bnav-icon {
  font-size: 1.35rem;
  line-height: 1;
  transition: transform 0.15s;
}

.bnav-item.active {
  color: var(--primary);
}
.bnav-item.active .bnav-icon {
  transform: scale(1.12);
}

/* ── Main content ───────────────────────────────────────────────────────── */
.main-content {
  padding: 1.125rem 1rem calc(var(--bottom-nav-h) + 1.5rem + env(safe-area-inset-bottom, 0));
  max-width: 600px;
  margin: 0 auto;
}

/* ── Page title ─────────────────────────────────────────────────────────── */
.page-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.025em;
  margin-bottom: 1.125rem;
}

.greeting {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.025em;
  margin-bottom: 0.2rem;
}

.greeting-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.125rem;
}

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.125rem;
  margin-bottom: 0.875rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 0.5rem;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* ── Hero card ──────────────────────────────────────────────────────────── */
.hero-card {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  color: white;
  border-radius: var(--radius);
  padding: 1.5rem 1.375rem;
  margin-bottom: 0.875rem;
  box-shadow: 0 8px 28px rgba(79,70,229,0.38);
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: '';
  position: absolute;
  top: -50px; right: -30px;
  width: 150px; height: 150px;
  background: rgba(255,255,255,0.07);
  border-radius: 50%;
  pointer-events: none;
}
.hero-card::after {
  content: '';
  position: absolute;
  bottom: -30px; left: 10px;
  width: 90px; height: 90px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
  pointer-events: none;
}

.hero-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
  margin-bottom: 0.375rem;
}

.hero-date {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  text-transform: capitalize;
  letter-spacing: -0.02em;
}

.hero-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem 0.7rem;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 1.125rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--primary); color: white; box-shadow: 0 2px 10px rgba(79,70,229,0.28); }
.btn-primary:hover:not(:disabled) { opacity: 0.9; }
.btn-success { background: var(--success); color: white; box-shadow: 0 2px 8px rgba(16,185,129,0.22); }
.btn-success:hover:not(:disabled) { opacity: 0.9; }
.btn-danger { background: var(--error); color: white; box-shadow: 0 2px 8px rgba(239,68,68,0.22); }
.btn-danger:hover:not(:disabled) { opacity: 0.9; }
.btn-warning { background: var(--warning); color: white; }
.btn-ghost { background: rgba(255,255,255,0.18); color: white; border: 1.5px solid rgba(255,255,255,0.3); }
.btn-ghost:hover:not(:disabled) { background: rgba(255,255,255,0.28); }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover:not(:disabled) { background: #F9FAFB; border-color: #D1D5DB; }
.btn-sm { padding: 0.38rem 0.75rem; font-size: 0.8rem; min-height: 36px; border-radius: 6px; }
.btn-block { display: flex; width: 100%; margin-top: 0.5rem; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--text); }
.form-control {
  width: 100%;
  padding: 0.7rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: var(--text);
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  min-height: 44px;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { cursor: pointer; }

/* ── Alerts ─────────────────────────────────────────────────────────────── */
.alert {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
}
.alert-error   { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
.alert-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-info    { background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; }
.alert-warning { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }

/* ── Badges ─────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.badge-blue   { background: #EFF6FF; color: #1D4ED8; }
.badge-green  { background: #ECFDF5; color: #065F46; }
.badge-red    { background: #FEF2F2; color: #B91C1C; }
.badge-yellow { background: #FFFBEB; color: #92400E; }
.badge-gray   { background: #F3F4F6; color: #4B5563; }
.badge-indigo { background: #EEF2FF; color: #4338CA; }

/* ── Shift list items ───────────────────────────────────────────────────── */
.shift-item {
  display: flex;
  align-items: center;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
  gap: 0.75rem;
}
.shift-item:last-child { border-bottom: none; }
.shift-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.shift-dot-morning { background: #6366F1; }
.shift-dot-afternoon { background: var(--accent); }
.shift-item-body { flex: 1; min-width: 0; }
.shift-item-date { font-weight: 700; font-size: 0.9rem; text-transform: capitalize; }
.shift-item-meta { font-size: 0.78rem; color: var(--text-muted); display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; margin-top: 0.15rem; }
.shift-item-actions { flex-shrink: 0; }

/* ── Swap items ─────────────────────────────────────────────────────────── */
.swap-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
}
.swap-item:last-child { border-bottom: none; }
.swap-avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
  text-transform: uppercase;
}
.swap-item-body { flex: 1; min-width: 0; }
.swap-item-name { font-weight: 700; font-size: 0.875rem; }
.swap-item-info { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.1rem; }
.swap-item-msg  { font-size: 0.78rem; color: var(--text-muted); font-style: italic; margin-top: 0.2rem; }
.swap-item-actions { flex-shrink: 0; }

/* ── Stats overview grid ────────────────────────────────────────────────── */
.stats-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.625rem;
  margin-bottom: 0.875rem;
}
.stat-tile {
  background: white;
  border-radius: var(--radius);
  padding: 0.875rem 0.75rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-tile-value {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.2rem;
}
.stat-tile-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Chart ──────────────────────────────────────────────────────────────── */
.chart-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.625rem;
  font-size: 0.82rem;
}
.chart-label {
  width: 80px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}
.chart-bar-outer {
  flex: 1;
  background: #F3F4F6;
  border-radius: 999px;
  height: 22px;
  overflow: hidden;
}
.chart-bar-inner {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  min-width: 4px;
  transition: width 0.5s ease;
}
.chart-value {
  width: 24px;
  text-align: right;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ── Table (stats detail) ───────────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.table th {
  text-align: left;
  padding: 0.5rem 0.625rem;
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 0.6rem 0.625rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }

/* ── Admin tabs ─────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 2px solid var(--border);
  margin: -1.125rem -1.125rem 1.125rem;
  padding: 0 1.125rem;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 0.75rem 0.875rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ── Schedule grid ──────────────────────────────────────────────────────── */
.schedule-header {
  display: grid;
  grid-template-columns: 82px 1fr 1fr;
  gap: 0.375rem;
  padding-bottom: 0.5rem;
  margin-bottom: 0.25rem;
}
.shift-col-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.schedule-grid { display: flex; flex-direction: column; gap: 0.375rem; }
.schedule-row {
  display: grid;
  grid-template-columns: 82px 1fr 1fr;
  gap: 0.375rem;
  align-items: start;
}
.schedule-date {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-top: 0.5rem;
  text-transform: capitalize;
  line-height: 1.3;
}
.shift-card {
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  border: 1.5px solid var(--border);
  background: white;
  min-height: 40px;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.shift-card.mine { border-color: #A5B4FC; background: #EEF2FF; }
.shift-card.unassigned { background: #FFFBEB; border-color: #FDE68A; border-style: dashed; }
.shift-user-name { font-weight: 600; }

.shift-assign-select {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: white;
  color: var(--text);
  cursor: pointer;
  width: 100%;
  font-size: 0.75rem;
  padding: 0.2rem 0.3rem;
}

/* ── User cards (admin) ─────────────────────────────────────────────────── */
.user-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
}
.user-card:last-child { border-bottom: none; }
.user-avatar {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.user-avatar.inactive { background: linear-gradient(135deg, #9CA3AF, #6B7280); }
.user-card-body { flex: 1; min-width: 0; }
.user-card-name { font-weight: 700; font-size: 0.9rem; }
.user-card-email { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 0.05rem; }
.user-card-meta { display: flex; gap: 0.35rem; flex-wrap: wrap; align-items: center; margin-top: 0.3rem; }
.user-card-actions { flex-shrink: 0; display: flex; flex-direction: column; gap: 0.3rem; align-items: flex-end; }

/* ── Restriction items ──────────────────────────────────────────────────── */
.restriction-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.restriction-item:last-child { border-bottom: none; }
.restriction-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: #FEF2F2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.restriction-body { flex: 1; min-width: 0; }
.restriction-name { font-weight: 700; font-size: 0.875rem; }
.restriction-desc { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.1rem; }

/* ── Swap admin items ───────────────────────────────────────────────────── */
.swap-admin-item {
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
}
.swap-admin-item:last-child { border-bottom: none; }
.swap-admin-header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.375rem; flex-wrap: wrap; }
.swap-admin-name { font-weight: 700; font-size: 0.875rem; }
.swap-admin-sub { font-size: 0.78rem; color: var(--text-muted); }
.swap-admin-actions { display: flex; gap: 0.375rem; margin-top: 0.5rem; }

/* ── Inline form panel (admin) ──────────────────────────────────────────── */
.form-panel {
  background: #F9FAFB;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.125rem;
  margin-bottom: 1rem;
}
.form-panel-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 1rem; }

/* ── Auth page ──────────────────────────────────────────────────────────── */
.auth-wrap {
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background: linear-gradient(160deg, #EEF2FF 0%, #F3F4F6 60%);
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: white;
  border-radius: 20px;
  padding: 2rem 1.75rem;
  box-shadow: 0 8px 40px rgba(79,70,229,0.12);
}
.auth-icon { font-size: 3rem; text-align: center; margin-bottom: 0.75rem; }
.auth-title { font-size: 1.65rem; font-weight: 900; color: var(--text); text-align: center; letter-spacing: -0.03em; margin-bottom: 0.25rem; }
.auth-subtitle { font-size: 0.875rem; color: var(--text-muted); text-align: center; margin-bottom: 1.75rem; }
.auth-info { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1.25rem; line-height: 1.6; }

/* ── QR display ─────────────────────────────────────────────────────────── */
.qr-display { text-align: center; padding: 1.5rem 0.5rem; }
.qr-border {
  display: inline-block;
  padding: 1.25rem;
  border: 2.5px dashed var(--border);
  border-radius: var(--radius);
  background: #FAFAFA;
}

/* ── Checkin screen ─────────────────────────────────────────────────────── */
.checkin-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1rem;
  min-height: 60vh;
}
.checkin-icon { font-size: 4.5rem; margin-bottom: 1rem; }
.checkin-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.025em; margin-bottom: 0.5rem; }

/* ── Modal / Bottom sheet ───────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: flex-end;
  z-index: 300;
  animation: bkFadeIn 0.2s ease;
}
@keyframes bkFadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: white;
  border-radius: 20px 20px 0 0;
  padding: 0 1.375rem calc(1.5rem + env(safe-area-inset-bottom, 0));
  width: 100%;
  max-height: 92svh;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.15);
  animation: sheetUp 0.25s ease;
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.modal-handle {
  width: 36px; height: 4px;
  background: #E5E7EB;
  border-radius: 999px;
  margin: 0.875rem auto 1.25rem;
}
.modal-title { font-size: 1.15rem; font-weight: 800; margin-bottom: 0.25rem; letter-spacing: -0.02em; }
.modal-subtitle { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.modal-actions { display: flex; gap: 0.5rem; margin-top: 1.25rem; }
.modal-actions .btn { flex: 1; }

/* ── Empty state ────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}
.empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.empty-text { font-size: 0.875rem; }

/* ── Spinner ────────────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2.5px solid rgba(255,255,255,0.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.55s linear infinite;
  flex-shrink: 0;
}
.spinner-dark { border-color: rgba(0,0,0,0.15); border-top-color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utility ────────────────────────────────────────────────────────────── */
.text-muted   { color: var(--text-muted); }
.text-sm      { font-size: 0.82rem; }
.text-xs      { font-size: 0.72rem; }
.text-center  { text-align: center; }
.mt-1         { margin-top: 0.5rem; }
.mt-2         { margin-top: 1rem; }
.divider      { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }
.overflow-x   { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Print ──────────────────────────────────────────────────────────────── */
@media print {
  body { background: white; }
  .app-header, .bottom-nav, .no-print, button { display: none !important; }
  .qr-print-container {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
  }
  .qr-print-container img { max-width: 420px; width: 80%; }
  .qr-print-container h1 { font-size: 1.8rem; margin-bottom: 0.25rem; }
  .qr-print-container h2 { font-size: 1.1rem; color: #718096; margin-bottom: 1.5rem; }
  .qr-print-container p  { font-size: 1rem; margin: 0.25rem 0; }
}

/* ── Admin home grid ────────────────────────────────────────────────────── */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-tile {
  background: white;
  border-radius: var(--radius);
  padding: 1.25rem 0.75rem;
  text-align: center;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  -webkit-tap-highlight-color: transparent;
}
.admin-tile:active { transform: scale(0.96); }
.admin-tile:hover { box-shadow: var(--shadow-md); }

.admin-tile-icon { font-size: 2rem; line-height: 1; }
.admin-tile-label { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.admin-tile-sub { font-size: 0.68rem; color: var(--text-muted); line-height: 1.3; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (min-width: 480px) {
  .schedule-header,
  .schedule-row { grid-template-columns: 100px 1fr 1fr; }
  .main-content { padding-left: 1.25rem; padding-right: 1.25rem; }
}
@media (min-width: 640px) {
  .schedule-header,
  .schedule-row { grid-template-columns: 120px 1fr 1fr; }
  .stats-overview { grid-template-columns: repeat(3, 1fr); }
}
