/* ═══════════════════════════════════════════════════════════
   PQS Training App — Design System
   Mobile-first, dark theme, zero-bloat transitions
   ═══════════════════════════════════════════════════════════ */

/* ── PIN Screen (Access Gate) ─────────────────────────── */
#pin-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #071520;
  display: flex;
  align-items: center;
  justify-content: center;
}
#pin-screen.hidden { display: none; }

.pin-container {
  text-align: center;
  width: 280px;
}

.pin-logo {
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.5px;
  color: #2fbf96;
  margin-bottom: 8px;
}
.pin-logo span { color: #e8ecf4; font-weight: 600; }

.pin-subtitle {
  font-size: 14px;
  color: #8fa3b8;
  margin-bottom: 28px;
  font-weight: 500;
}

.pin-dots {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 12px;
}

.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #1c3a4e;
  background: transparent;
  transition: background 0.1s, border-color 0.1s;
}
.pin-dot.filled {
  background: #2fbf96;
  border-color: #2fbf96;
}

.pin-error {
  height: 20px;
  font-size: 13px;
  color: #f87171;
  font-weight: 500;
  margin-bottom: 8px;
}

.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
}

.pin-key {
  width: 100%;
  height: 60px;
  border-radius: 12px;
  background: #0d1f2d;
  border: 1px solid #1c3a4e;
  color: #e8ecf4;
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.08s;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(47,191,150,0.2);
}
.pin-key:active { background: #1a3548; }
.pin-key-empty { background: transparent; border-color: transparent; cursor: default; }
.pin-key-empty:active { background: transparent; }
.pin-key-del { font-size: 20px; color: #8fa3b8; }

@keyframes pin-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}
.pin-dots.shake { animation: pin-shake 0.35s ease; }

/* ── Auth Screen (Login / Register) ────────────────────── */
#auth-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #071520;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}
#auth-screen.hidden { display: none; }

.auth-container {
  text-align: center;
  width: 100%;
  max-width: 380px;
  padding: 24px 20px;
}

.auth-logo {
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.5px;
  color: #2fbf96;
  margin-bottom: 4px;
}
.auth-logo span { color: #e8ecf4; font-weight: 600; }

.auth-tagline {
  font-size: 13px;
  color: #5a7a92;
  margin-bottom: 32px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.auth-card {
  background: #0d1f2d;
  border: 1px solid #1c3a4e;
  border-radius: 16px;
  padding: 28px 24px;
  text-align: left;
}

.auth-card h2 {
  font-size: 20px;
  font-weight: 700;
  color: #e8ecf4;
  margin-bottom: 4px;
}

.auth-subtitle {
  font-size: 13px;
  color: #8fa3b8;
  margin-bottom: 24px;
}

.auth-field {
  margin-bottom: 16px;
}

.auth-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #8fa3b8;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: #5a7a92;
}

.auth-field input {
  width: 100%;
  padding: 12px 14px;
  background: #071520;
  border: 1px solid #1c3a4e;
  border-radius: 10px;
  color: #e8ecf4;
  font-size: 15px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-field input:focus {
  border-color: #2fbf96;
  box-shadow: 0 0 0 3px rgba(47,191,150,0.15);
}

.auth-field input::placeholder {
  color: #2d4a5e;
}

.auth-error {
  font-size: 13px;
  color: #f87171;
  font-weight: 500;
  min-height: 20px;
  margin-bottom: 8px;
  line-height: 1.4;
}

.auth-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #2fbf96, #1f9474);
  color: white;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
  letter-spacing: 0.2px;
}

.auth-submit:hover {
  box-shadow: 0 4px 20px rgba(47,191,150,0.35);
}

.auth-submit:active {
  transform: scale(0.98);
}

.auth-switch {
  margin-top: 20px;
  font-size: 13px;
  color: #8fa3b8;
  text-align: center;
}

.auth-switch a {
  color: #2fbf96;
  font-weight: 600;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.auth-footer {
  margin-top: 24px;
  font-size: 12px;
  color: #2d4a5e;
  text-align: center;
}

@keyframes auth-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}
.auth-card.shake, .shake { animation: auth-shake 0.35s ease; }

/* ── User Badge (Header) ─────────────────────────────── */
.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: default;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #1f9474);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.3px;
}

.user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 400px) {
  .user-name { display: none; }
  .user-badge { padding: 4px; }
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── CSS Variables ──────────────────────────────────────── */
:root {
  /* Backgrounds — midnight navy family */
  --bg-base: #071520;
  --bg-surface: #0d1f2d;
  --bg-elevated: #142a3a;
  --bg-hover: #1a3548;
  --bg-active: #214054;
  --border: #1c3a4e;
  --border-light: #152e3f;

  /* Text — cool steel greys */
  --text-primary: #e4eaf0;
  --text-secondary: #8fa3b8;
  --text-muted: #5a7a92;
  --text-inverse: #071520;

  /* Accent — Vantage teal */
  --accent: #2fbf96;
  --accent-hover: #26a882;
  --accent-dim: rgba(47,191,150,0.12);
  --accent-glow: rgba(47,191,150,0.25);

  /* Status Colors */
  --success: #34d399;
  --success-dim: rgba(52,211,153,0.12);
  --warning: #fbbf24;
  --warning-dim: rgba(251,191,36,0.12);
  --danger: #f87171;
  --danger-dim: rgba(248,113,113,0.12);
  --info: #5eb8d6;
  --orange: #e8993e;
  --purple: #9b8ec4;
  --mastered: #4f9cf8;
  --mastered-dim: rgba(79,156,248,0.12);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.35);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.45);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.55);

  --nav-height: 64px;
  --header-height: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --transition-instant: 80ms ease;
  --transition-fast: 120ms ease;
  --transition-normal: 180ms ease;
}

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

html {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
}

a { color: var(--accent); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }

/* Prevent iOS zoom on input focus */
input, select, textarea { font-size: 16px !important; }

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ── App Shell ─────────────────────────────────────────── */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.app-header .logo {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.5px;
  color: var(--accent);
  white-space: nowrap;
}

.app-header .logo span {
  color: var(--text-primary);
  font-weight: 600;
}

.header-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.header-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background var(--transition-instant);
}
.header-btn:active { background: var(--bg-active); }

.app-content {
  flex: 1;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 8px);
  overflow-y: auto;
}

/* ── Bottom Navigation ─────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: stretch;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-instant);
  position: relative;
  -webkit-user-select: none;
  user-select: none;
}

.nav-item .nav-icon { font-size: 22px; line-height: 1; }

.nav-item.active {
  color: var(--accent);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 2px;
  background: var(--accent);
  border-radius: 0 0 2px 2px;
}

.nav-item:active { color: var(--accent); }

.nav-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 20px);
  min-width: 16px;
  height: 16px;
  background: var(--danger);
  color: white;
  font-size: 9px;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ── Page Views ────────────────────────────────────────── */
.page { display: none; padding: 16px; }
.page.active { display: block; }

/* ── Dashboard ─────────────────────────────────────────── */
.dash-hero {
  background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.radial-progress {
  width: 90px;
  height: 90px;
  flex-shrink: 0;
  position: relative;
}

.radial-progress svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.radial-progress .track {
  fill: none;
  stroke: var(--border);
  stroke-width: 6;
}

.radial-progress .fill {
  fill: none;
  stroke: var(--mastered);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset var(--transition-normal);
}

.radial-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.radial-pct {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  color: var(--mastered);
}

.radial-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dash-hero-text h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.dash-hero-text p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

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

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

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}

.stat-value {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}

.stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
  font-weight: 500;
}

.stat-card.green .stat-value { color: var(--success); }
.stat-card.blue .stat-value { color: var(--mastered); }
.stat-card.orange .stat-value { color: var(--orange); }
.stat-card.red .stat-value { color: var(--danger); }
.stat-card.purple .stat-value { color: var(--purple); }

/* ── Section Headers ───────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  margin-top: 8px;
}

.section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.section-action {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.section-action:active { background: var(--accent-dim); }

/* ── Category Cards (Dashboard) ────────────────────────── */
.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.cat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: border-color var(--transition-instant);
  position: relative;
  overflow: hidden;
}

.cat-card:active {
  border-color: var(--accent);
  background: var(--bg-elevated);
}

.cat-card-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.3;
}

.cat-card-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}

.cat-card-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  transition: width var(--transition-normal);
}

.cat-card-meta {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
}

/* Category bar colors set dynamically via JS based on readiness % */
/* Heat-map: red (0%) → orange → yellow → green → blue (100%) */

/* ── Quick Actions ─────────────────────────────────────── */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.quick-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  transition: border-color var(--transition-instant);
}

.quick-btn:active {
  border-color: var(--accent);
  background: var(--bg-elevated);
}

.quick-btn .qb-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.quick-btn.accent .qb-icon { background: var(--accent-dim); }
.quick-btn.success .qb-icon { background: var(--success-dim); }
.quick-btn.warning .qb-icon { background: var(--warning-dim); }
.quick-btn.danger .qb-icon { background: var(--danger-dim); }

/* ── Streak Banner ─────────────────────────────────────── */
.streak-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.streak-fire { font-size: 28px; }

.streak-text {
  flex: 1;
}

.streak-text strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.streak-text span {
  font-size: 12px;
  color: var(--text-secondary);
}

.streak-days {
  display: flex;
  gap: 4px;
}

.streak-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.streak-dot.filled { background: var(--success); }

/* ═══════════════════════════════════════════════════════════
   STUDY MODE (Flashcards)
   ═══════════════════════════════════════════════════════════ */

.study-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.study-controls select,
.study-controls .filter-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  appearance: none;
  -webkit-appearance: none;
}

.study-controls select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238fa3b8'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  cursor: pointer;
}

.filter-btn {
  cursor: pointer;
  transition: border-color var(--transition-instant), background var(--transition-instant);
}
.filter-btn.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}
.filter-btn:active { background: var(--bg-hover); }

.study-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.study-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  transition: all var(--transition-instant);
  flex-shrink: 0;
}
.study-nav-btn:hover { color: var(--text-primary); border-color: var(--accent); }
.study-nav-btn:active { background: var(--bg-active); }

.study-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.study-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width var(--transition-fast);
}

/* ── Flashcard ─────────────────────────────────────────── */
.card-container {
  perspective: 1200px;
  margin-bottom: 16px;
  min-height: 260px;
}

.flashcard {
  position: relative;
  width: 100%;
  min-height: 260px;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.15s ease;
  will-change: transform;
  -webkit-user-select: none;
  user-select: none;
}

.flashcard.flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
}

.card-back {
  transform: rotateY(180deg);
}

.edit-answer-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--transition-instant), background var(--transition-instant);
  z-index: 5;
}
.edit-answer-btn:hover, .edit-answer-btn:active {
  opacity: 1;
  background: var(--accent-dim);
  color: var(--accent);
}

.card-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.card-text {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  display: flex;
  align-items: center;
  overflow-y: auto;
  word-break: break-word;
  -webkit-overflow-scrolling: touch;
}

/* Limit answer height on mobile for very long answers */
@media (max-width: 600px) {
  .card-text {
    max-height: 55vh;
    align-items: flex-start;
  }
}

.card-meta {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.card-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--accent-dim);
  color: var(--accent);
}

.card-tag.site-specific {
  background: var(--warning-dim);
  color: var(--warning);
}

.card-tag.ca1-only {
  background: var(--danger-dim);
  color: var(--danger);
}

.card-tag.generic {
  background: var(--success-dim);
  color: var(--success);
}

.card-tap-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

/* ── Study Action Buttons ──────────────────────────────── */
.study-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 8px;
}

.study-btn {
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  border: 1px solid var(--border);
  transition: background var(--transition-instant);
}

.study-btn:active { transform: scale(0.97); }

.study-btn.again {
  background: var(--danger-dim);
  color: var(--danger);
  border-color: rgba(248,113,113,0.2);
}

.study-btn.hard {
  background: var(--warning-dim);
  color: var(--warning);
  border-color: rgba(251,191,36,0.2);
}

.study-btn.good {
  background: var(--success-dim);
  color: var(--success);
  border-color: rgba(52,211,153,0.2);
}

.study-btn.easy {
  background: var(--mastered-dim);
  color: var(--mastered);
  border-color: rgba(79,156,248,0.2);
}

.study-btn .btn-sub {
  display: block;
  font-size: 10px;
  font-weight: 500;
  opacity: 0.7;
  margin-top: 2px;
}

/* ── Empty State ───────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.empty-state .btn-primary {
  display: inline-flex;
  padding: 10px 20px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
}

.empty-state .btn-secondary {
  display: inline-flex;
  padding: 10px 20px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.empty-state .btn-secondary:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════
   QUIZ MODE
   ═══════════════════════════════════════════════════════════ */

.quiz-setup {
  max-width: 480px;
}

.quiz-option-group {
  margin-bottom: 16px;
}

.quiz-option-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.quiz-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quiz-chip {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-instant);
}

.quiz-chip.selected {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.quiz-chip:active { background: var(--bg-hover); }

.quiz-start-btn {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  margin-top: 12px;
  transition: background var(--transition-instant);
}
.quiz-start-btn:active { background: var(--accent-hover); }

/* Quiz Active */
.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.quiz-counter {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.quiz-lookups {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--warning-dim);
  color: var(--warning);
}

.quiz-question-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin-bottom: 16px;
}

.quiz-question-card .q-category {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.quiz-question-card .q-text {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}

.quiz-answer-area {
  margin-bottom: 16px;
}

.quiz-answer-area textarea {
  width: 100%;
  min-height: 100px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  transition: border-color var(--transition-instant);
}

.quiz-answer-area textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.quiz-btn-row {
  display: flex;
  gap: 8px;
}

.quiz-btn-row button {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
}

.quiz-reveal-btn {
  background: var(--accent);
  color: white;
  border-color: var(--accent) !important;
}

.quiz-lookup-btn {
  background: var(--warning-dim);
  color: var(--warning);
  border-color: rgba(251,191,36,0.3) !important;
}

.quiz-next-btn {
  background: var(--success-dim);
  color: var(--success);
  border-color: rgba(52,211,153,0.3) !important;
}

.quiz-skip-btn {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.quiz-answer-reveal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.quiz-answer-reveal .reveal-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--success);
  margin-bottom: 8px;
}

.quiz-answer-reveal .reveal-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
}

/* Quiz Self-Grade Buttons */
.quiz-grade-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.grade-btn {
  flex: 1;
  padding: 10px 8px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  transition: all var(--transition-instant);
}

.grade-btn:active { transform: scale(0.97); }
.grade-btn.wrong { color: var(--danger); border-color: rgba(248,113,113,0.3); }
.grade-btn.partial { color: var(--warning); border-color: rgba(251,191,36,0.3); }
.grade-btn.correct { color: var(--success); border-color: rgba(52,211,153,0.3); }

/* Quiz Results */
.quiz-results {
  text-align: center;
  padding: 24px 0;
}

.quiz-results .result-grade {
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
}

.quiz-results .result-label {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.quiz-results .result-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.4;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

/* ═══════════════════════════════════════════════════════════
   BROWSE MODE
   ═══════════════════════════════════════════════════════════ */

.search-bar {
  position: relative;
  margin-bottom: 12px;
}

.search-bar input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px 10px 38px;
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color var(--transition-instant);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--accent);
}

.search-bar .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.filter-row {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar { display: none; }

.filter-pill {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-instant);
}

.filter-pill.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.filter-pill:active { background: var(--bg-hover); }

.browse-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* ── Question List Items ───────────────────────────────── */
.q-list { list-style: none; }

.q-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  overflow: hidden;
  transition: border-color var(--transition-instant);
}

.q-item:active { border-color: var(--accent); }

.q-item-header {
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.q-item-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

.q-item-status.answered { background: var(--success); }
.q-item-status.unanswered { background: var(--danger); }

.q-item-content { flex: 1; min-width: 0; }

.q-item-question {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 4px;
}

.q-item-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.q-item-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-muted);
}

.q-item-expand {
  color: var(--text-muted);
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 4px;
  transition: transform var(--transition-fast);
}

.q-item.open .q-item-expand { transform: rotate(180deg); }

.q-item-body {
  display: none;
  padding: 0 14px 14px 32px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  border-top: 1px dashed var(--border);
  margin: 0 14px;
  padding-top: 10px;
  max-height: 400px;
  overflow-y: auto;
  word-break: break-word;
}

.q-item.open .q-item-body { display: block; }

.q-item-body .answer-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--success);
  margin-bottom: 4px;
}

.q-item-body .no-answer {
  color: var(--text-muted);
  font-style: italic;
}

.q-item-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.q-item-action-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  background: var(--bg-elevated);
  transition: all var(--transition-instant);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.q-item-action-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--accent);
}

.q-item-action-btn:active { background: var(--bg-active); }
.q-item-action-btn.flagged { color: var(--warning); border-color: rgba(251,191,36,0.3); }

/* ═══════════════════════════════════════════════════════════
   ORAL BOARD SIMULATOR
   ═══════════════════════════════════════════════════════════ */

.sim-banner {
  background: linear-gradient(135deg, #1e1030 0%, var(--bg-surface) 100%);
  border: 1px solid #3d2a6b;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  text-align: center;
}

.sim-banner h2 {
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, #a78bfa, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}

.sim-banner p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════
   SETTINGS PAGE
   ═══════════════════════════════════════════════════════════ */

.settings-group {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
}

.settings-group-title {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--bg-elevated);
}

.setting-item {
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}

.setting-item:last-child { border-bottom: none; }

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

.setting-desc {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Toggle Switch */
.toggle {
  width: 44px;
  height: 24px;
  background: var(--border);
  border-radius: var(--radius-full);
  position: relative;
  cursor: pointer;
  transition: background var(--transition-instant);
  flex-shrink: 0;
}

.toggle.on { background: var(--accent); }

.toggle::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  top: 2px;
  left: 2px;
  transition: transform var(--transition-fast);
}

.toggle.on::after { transform: translateX(20px); }

.setting-btn {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.setting-btn.danger {
  border-color: rgba(248,113,113,0.3);
  color: var(--danger);
}

/* ═══════════════════════════════════════════════════════════
   CA3 NEEDS LIST
   ═══════════════════════════════════════════════════════════ */

.needs-header {
  background: var(--warning-dim);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.needs-header .needs-icon { font-size: 24px; }

.needs-header .needs-text {
  font-size: 13px;
  color: var(--warning);
  line-height: 1.4;
}

.needs-header .needs-count {
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════
   MODAL / OVERLAY
   ═══════════════════════════════════════════════════════════ */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 300;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.open { display: flex; }

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
  margin: auto;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}

.modal-sheet {
  background: var(--bg-surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 20px;
  padding-bottom: calc(20px + var(--safe-bottom));
}

.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ═══════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════ */

.toast-container {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 12px);
  left: 16px;
  right: 16px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(10px);
  animation: toastIn 0.15s ease forwards;
}

.toast.removing {
  animation: toastOut 0.12s ease forwards;
}

@keyframes toastIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(10px); }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

@media (min-width: 640px) {
  .page { padding: 24px; max-width: 640px; margin: 0 auto; }
  .dash-stats { grid-template-columns: repeat(4, 1fr); }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .bottom-nav {
    position: fixed;
    left: 0;
    top: var(--header-height);
    bottom: 0;
    width: 200px;
    height: auto;
    flex-direction: column;
    border-top: none;
    border-right: 1px solid var(--border);
    padding: 12px 8px;
    gap: 4px;
    align-items: stretch;
  }

  .nav-item {
    flex-direction: row;
    justify-content: flex-start;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    gap: 10px;
  }

  .nav-item.active::before { display: none; }
  .nav-item.active { background: var(--accent-dim); }

  .app-content {
    margin-left: 200px;
    padding-bottom: 24px;
  }

  .page { max-width: 800px; }
}

/* ═══════════════════════════════════════════════════════════
   FLOATING ACTION BUTTON
   ═══════════════════════════════════════════════════════════ */

.fab-btn {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
  right: 16px;
  z-index: 150;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #1f9474);
  color: white;
  border: none;
  box-shadow: 0 4px 16px rgba(47,191,150,0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fab-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(47,191,150,0.5);
}

.fab-btn:active {
  transform: scale(0.95);
}

/* ═══════════════════════════════════════════════════════════
   EDIT MODAL TABS
   ═══════════════════════════════════════════════════════════ */

.edit-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  background: var(--bg-base);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.edit-tab {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
  color: var(--text-secondary);
  transition: background var(--transition-instant), color var(--transition-instant);
  cursor: pointer;
}

.edit-tab.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.edit-tab:hover:not(.active) {
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════
   ADD QUESTION FORM
   ═══════════════════════════════════════════════════════════ */

.add-q-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.add-q-row {
  margin-bottom: 8px;
}

/* ── Edit Properties Tab ─────────────────────────────────── */

.edit-prop-field {
  margin-bottom: 10px;
}

.edit-prop-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.edit-prop-select {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-base);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--transition-instant);
}

.edit-prop-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(47,191,150,0.2);
}

.edit-prop-row {
  display: flex;
  gap: 10px;
}

.edit-textarea {
  width: 100%;
  min-height: 140px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  box-sizing: border-box;
}

.edit-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(47,191,150,0.2);
}

/* ── Diagram Drop Zone ───────────────────────────────────── */

.diagram-drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.diagram-drop-zone:hover {
  border-color: var(--accent);
  background: rgba(47,191,150,0.05);
}

.diagram-drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(47,191,150,0.1);
  border-style: solid;
}

.diagram-drop-zone.has-diagram {
  border-style: solid;
  border-color: var(--border);
  padding: 12px;
}

/* ── PQS Test Prep (Gold Theme) ──────────────────────────── */

.pqs-test-header {
  margin-top: 20px;
  align-items: center;
}

.pqs-test-header .section-title {
  color: #d4a017;
}

.pqs-test-badge {
  font-size: 11px;
  font-weight: 600;
  color: #d4a017;
  background: rgba(212, 160, 23, 0.12);
  border: 1px solid rgba(212, 160, 23, 0.3);
  border-radius: 12px;
  padding: 3px 10px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.pqs-test-card {
  border: 1.5px solid rgba(212, 160, 23, 0.4) !important;
  background: linear-gradient(135deg, rgba(212, 160, 23, 0.06) 0%, var(--bg-elevated) 100%) !important;
}

.pqs-test-card:hover {
  border-color: #d4a017 !important;
  box-shadow: 0 0 12px rgba(212, 160, 23, 0.15);
}

.pqs-test-card .cat-card-name {
  color: #e8c547;
}

/* Gold tag for PQS test questions */
.pqs-test-tag {
  background: rgba(212, 160, 23, 0.18) !important;
  color: #e8c547 !important;
  border: 1px solid rgba(212, 160, 23, 0.4);
  font-weight: 600;
}

/* Gold border on flashcard for test questions */
.pqs-test-flashcard {
  border: 2px solid rgba(212, 160, 23, 0.5) !important;
  box-shadow: 0 0 16px rgba(212, 160, 23, 0.1);
}

.pqs-test-flashcard .card-face {
  border-color: rgba(212, 160, 23, 0.3);
}

/* ── Browse Campus Select ────────────────────────────────── */

.browse-campus-select {
  padding: 5px 10px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-instant);
}

.browse-campus-select:hover {
  border-color: var(--accent);
}

.browse-campus-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(47,191,150,0.15);
}

/* ── Browse Status Dropdown ──────────────────────────────── */

.q-status-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.q-status-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.q-status-select {
  padding: 5px 8px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition-instant);
}

.q-status-select:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.q-status-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(47,191,150,0.2);
}

/* ═══════════════════════════════════════════════════════════
   BROWSE PAGINATION
   ═══════════════════════════════════════════════════════════ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px 0 8px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition-instant);
}

.page-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.page-btn.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.page-btn.arrow {
  font-size: 16px;
}

.page-ellipsis {
  width: 28px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 36px;
}

/* ═══════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════ */

.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.fw-700 { font-weight: 700; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.text-center { text-align: center; }
.hidden { display: none !important; }
