/**
 * AI Studio Cohort Hub — Design System
 *
 * Premium dark/light theme with CSS custom properties.
 * Matches the polish level of ai-studio-product.
 */

/* ---------------------------------------------------------------------------
   CSS Custom Properties
   --------------------------------------------------------------------------- */

:root {
  /* Dark mode (default) — softer than pure black */
  --bg: #121218;
  --surface: #1a1a22;
  --surface2: #22222c;
  --surface3: #2a2a36;
  --border: #2e2e3a;
  --border-subtle: #252530;
  --text: #eeedf5;
  --text-secondary: #b8b5c8;
  --subtext: #8886a0;
  --muted: #5c5a72;
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --primary-glow: rgba(79, 70, 229, 0.15);
  --primary-subtle: rgba(79, 70, 229, 0.08);
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.1);
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.1);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --font: 'Manrope', sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --input-bg: #16161e;
  --transition: 0.2s ease;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15);
  --gradient-surface: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
  --gradient-primary: linear-gradient(135deg, #4F46E5 0%, #6366f1 100%);
}

[data-theme="light"] {
  --bg: #f4f4f8;
  --surface: #ffffff;
  --surface2: #f0eff5;
  --surface3: #e8e7ef;
  --border: #dddbe6;
  --border-subtle: #e8e7ef;
  --text: #1a1a2e;
  --text-secondary: #44425c;
  --subtext: #6b6888;
  --muted: #9996b0;
  --primary-glow: rgba(79, 70, 229, 0.1);
  --primary-subtle: rgba(79, 70, 229, 0.05);
  --input-bg: #f8f8fc;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.06);
  --gradient-surface: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
}

/* ---------------------------------------------------------------------------
   Reset & Base
   --------------------------------------------------------------------------- */

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

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

input, textarea, button, select { font-family: inherit; font-size: inherit; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--subtext); }

::selection { background: var(--primary-glow); color: var(--text); }

/* ---------------------------------------------------------------------------
   Layout
   --------------------------------------------------------------------------- */

#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: 260px;
  background: var(--surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo { height: 32px; width: auto; }

.sidebar-title {
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.02em;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 8px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 2px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--subtext);
  transition: background var(--transition), color var(--transition);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.sidebar-nav-item:hover {
  background: var(--surface2);
  color: var(--text);
}
.sidebar-nav-item.active {
  background: var(--primary-glow);
  color: var(--primary);
  font-weight: 700;
}
.sidebar-nav-item .nav-emoji {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-section-label {
  padding: 20px 12px 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  background: var(--bg);
}

/* Top bar — mobile only */
.top-bar {
  display: none;
  align-items: center;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface);
  flex-shrink: 0;
}
.top-bar-title {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
}
@media (max-width: 768px) {
  .top-bar { display: flex; }
}

/* ---------------------------------------------------------------------------
   Theme Toggle
   --------------------------------------------------------------------------- */

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  background: var(--surface2);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  font-size: 16px;
  transition: all var(--transition);
}
.theme-toggle:hover { background: var(--surface3); }

/* ---------------------------------------------------------------------------
   Auth Screens
   --------------------------------------------------------------------------- */

.auth-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 100vh;
  background: var(--bg);
  padding: 24px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 8px;
}
.auth-logo img { height: 40px; }
.auth-logo h1 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.auth-card h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -0.03em;
}
.auth-card p.subtitle {
  color: var(--subtext);
  font-size: 14px;
  margin-bottom: 12px;
}

/* ---------------------------------------------------------------------------
   Forms
   --------------------------------------------------------------------------- */

.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-input::placeholder { color: var(--muted); }

select.form-input {
  cursor: pointer;
  appearance: auto;
}

textarea.form-input {
  resize: vertical;
  min-height: 80px;
}

.form-error {
  color: var(--error);
  font-size: 13px;
  margin-top: 6px;
  font-weight: 500;
}

/* ---------------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  letter-spacing: -0.02em;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--surface3);
  border-color: var(--subtext);
}

.btn-ghost {
  background: transparent;
  color: var(--subtext);
  padding: 8px 12px;
}
.btn-ghost:hover { color: var(--text); background: var(--surface2); }

.btn-full { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 13px; }

.btn-danger {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.15); }

/* ---------------------------------------------------------------------------
   Dashboard
   --------------------------------------------------------------------------- */

.dashboard {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

.dashboard-header { margin-bottom: 32px; }
.dashboard-greeting {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}
.dashboard-subtitle { color: var(--subtext); font-size: 15px; }

.dashboard-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.stat-card {
  background: var(--gradient-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  flex: 1;
  min-width: 150px;
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
}
.stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.stat-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.stat-label {
  color: var(--subtext);
  font-size: 12px;
  margin-top: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ---------------------------------------------------------------------------
   Week Cards
   --------------------------------------------------------------------------- */

.weeks-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 680px;
}

.week-card {
  background: var(--gradient-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-card);
}
.week-card.expanded {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.week-card.locked { opacity: 0.45; }

.week-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.week-card-header:hover .week-card-title { color: var(--primary); }
.week-card.locked .week-card-header { cursor: default; }
.week-card.locked .week-card-header:hover .week-card-title { color: var(--text); }

.week-chevron {
  font-size: 11px;
  color: var(--subtext);
  transition: transform 0.2s ease;
  display: inline-block;
}
.week-card.expanded .week-chevron { transform: rotate(90deg); }

.week-card-body {
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.week-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.week-tab {
  background: none;
  border: none;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--subtext);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition);
  font-family: var(--font);
}
.week-tab:hover { color: var(--text); }
.week-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.week-card-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.week-card-status { font-size: 12px; color: var(--subtext); font-weight: 500; }

/* Progress bar */
.progress-bar {
  height: 6px;
  background: var(--surface3);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 3px;
  transition: width 0.5s ease;
}
.progress-bar-fill.complete { background: var(--success); }

/* ---------------------------------------------------------------------------
   Content View (markdown rendered)
   --------------------------------------------------------------------------- */

.content-view {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.content-view h1 { font-size: 26px; font-weight: 800; margin: 28px 0 12px; letter-spacing: -0.03em; }
.content-view h2 { font-size: 20px; font-weight: 700; margin: 24px 0 10px; letter-spacing: -0.02em; }
.content-view h3 { font-size: 16px; font-weight: 700; margin: 20px 0 8px; }
.content-view p { margin: 14px 0; line-height: 1.75; color: var(--text-secondary); }
.content-view ul, .content-view ol { padding-left: 24px; margin: 12px 0; }
.content-view li { margin: 8px 0; line-height: 1.65; color: var(--text-secondary); }
.content-view strong { color: var(--text); font-weight: 700; }
.content-view code {
  background: var(--surface2);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  border: 1px solid var(--border-subtle);
}
.content-view pre {
  background: var(--surface);
  padding: 18px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--border);
}
.content-view pre code { background: none; padding: 0; border: none; }
.content-view blockquote {
  border-left: 3px solid var(--primary);
  padding: 4px 16px;
  margin: 16px 0;
  color: var(--subtext);
  background: var(--primary-subtle);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
}
.content-view hr { border: none; border-top: 1px solid var(--border); margin: 28px 0; }
.content-view a { color: var(--primary); font-weight: 600; }

/* Vimeo embed */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  margin: 20px 0;
  box-shadow: var(--shadow);
}
.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ---------------------------------------------------------------------------
   Checklist
   --------------------------------------------------------------------------- */

.checklist {
  background: var(--gradient-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin: 20px 0;
  box-shadow: var(--shadow-card);
}

.checklist-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: opacity var(--transition);
}
.checklist-item:last-child { border-bottom: none; }
.checklist-item.completed { opacity: 0.5; }
.checklist-item.completed .checklist-label { text-decoration: line-through; }

.checklist-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  font-size: 12px;
}
.checklist-checkbox.checked {
  background: var(--gradient-primary);
  border-color: var(--primary);
  color: #fff;
}

.checklist-label { font-size: 14px; font-weight: 500; }

/* ---------------------------------------------------------------------------
   Directory
   --------------------------------------------------------------------------- */

.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.directory-card {
  background: var(--gradient-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
}
.directory-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.directory-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  border: 2px solid var(--primary-subtle);
}

.directory-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.directory-business { font-size: 13px; color: var(--subtext); font-weight: 500; }
.directory-bio { font-size: 13px; color: var(--subtext); line-height: 1.6; }

/* Belt badge */
.belt-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
  color: #fff;
  letter-spacing: 0.01em;
}

/* ---------------------------------------------------------------------------
   Belt Progress
   --------------------------------------------------------------------------- */

.belt-progress {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 20px 0;
  padding: 20px;
  background: var(--gradient-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.belt-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.belt-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all var(--transition);
}
.belt-circle.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.belt-circle.achieved { border-color: transparent; }

.belt-label {
  font-size: 11px;
  color: var(--subtext);
  text-align: center;
  text-transform: capitalize;
  font-weight: 600;
}

.belt-connector {
  height: 3px;
  flex: 1;
  background: var(--border);
  margin-bottom: 22px;
  border-radius: 2px;
}
.belt-connector.filled {
  background: var(--gradient-primary);
}

/* ---------------------------------------------------------------------------
   Prompt Copy Card
   --------------------------------------------------------------------------- */

.prompt-card {
  background: var(--gradient-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin: 16px 0;
  box-shadow: var(--shadow-card);
}

.prompt-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.prompt-card-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.prompt-preview {
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
  max-height: 200px;
  overflow-y: auto;
  font-size: 13px;
  color: var(--subtext);
  line-height: 1.65;
  white-space: pre-wrap;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ---------------------------------------------------------------------------
   Settings
   --------------------------------------------------------------------------- */

.settings {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.settings h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 28px;
  letter-spacing: -0.03em;
}

.settings-section {
  background: var(--gradient-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.settings-section h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.settings-row:last-child { border-bottom: none; }
.settings-label { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.settings-value { color: var(--subtext); font-size: 14px; }

/* ---------------------------------------------------------------------------
   Admin Panel
   --------------------------------------------------------------------------- */

.admin {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  width: 100%;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.admin-header h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.admin-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
  overflow-x: auto;
}

.admin-tab {
  background: none;
  border: none;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--subtext);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  margin-bottom: -1px;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.admin-stat-card {
  background: var(--gradient-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
}
.admin-stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.admin-stat-value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.admin-stat-label {
  font-size: 11px;
  color: var(--subtext);
  margin-top: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th {
  text-align: left;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: var(--surface2);
}
.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--primary-subtle); }

.admin-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-transform: capitalize;
}

.admin-action-select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-size: 12px;
  padding: 6px 10px;
  cursor: pointer;
  outline: none;
  font-weight: 500;
}

.admin-section { margin-bottom: 28px; }
.admin-section h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.admin-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 160px;
  padding: 16px;
  background: var(--gradient-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.admin-chart-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  min-width: 0;
}

.admin-chart-bar {
  width: 100%;
  max-width: 32px;
  background: var(--gradient-primary);
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease;
}

.admin-chart-label {
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
  white-space: nowrap;
  font-weight: 500;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.admin-temp-password {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  margin: 12px 0;
  user-select: all;
}

.admin-form-card {
  background: var(--gradient-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}
.admin-form-card h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

/* ---------------------------------------------------------------------------
   Toast Notifications
   --------------------------------------------------------------------------- */

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 360px;
  backdrop-filter: blur(8px);
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--error); }
.toast.info { border-left: 4px solid var(--primary); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ---------------------------------------------------------------------------
   Modal
   --------------------------------------------------------------------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.modal p { color: var(--subtext); font-size: 14px; margin-bottom: 16px; line-height: 1.6; }

/* ---------------------------------------------------------------------------
   Skeleton Loading
   --------------------------------------------------------------------------- */

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--surface2) 25%, var(--surface3) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ---------------------------------------------------------------------------
   Utility Classes
   --------------------------------------------------------------------------- */

.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-sm { font-size: 13px; }
.text-muted { color: var(--subtext); }

/* ---------------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------------- */

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    bottom: 0;
    z-index: 50;
    transition: left 0.3s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { left: 0; }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 49;
  }
  .sidebar-backdrop.open { display: block; }

  .dashboard { padding: 20px; }
  .weeks-grid { grid-template-columns: 1fr; }
  .directory-grid { grid-template-columns: 1fr; }
  .dashboard-stats { flex-direction: column; }
  .dashboard-greeting { font-size: 24px; }

  .admin { padding: 20px; }
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-toolbar { flex-direction: column; align-items: stretch; }

  .content-view { padding: 20px; }
  .settings { padding: 20px; }

  .mobile-menu-btn { display: flex; }
}

@media (min-width: 769px) {
  .mobile-menu-btn { display: none; }
  .sidebar-backdrop { display: none !important; }
}
