/* ============================================================
   ProfOrga — Design tokens & base styles
   ============================================================ */

:root {
  /* Brand (dérivés du logo) */
  --navy: #1E3A8A;
  --navy-700: #1E40AF;
  --navy-800: #1E3A8A;
  --navy-900: #172554;
  --teal: #14B8A6;
  --teal-300: #5EEAD4;
  --teal-50: #ECFDF5;

  /* Neutres */
  --bg: #F6F7FB;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --surface-hover: #F1F5F9;
  --border: #E5E9F0;
  --border-strong: #CBD5E1;
  --text: #0F172A;
  --text-muted: #64748B;
  --text-soft: #94A3B8;

  /* Sémantique */
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;

  /* Matières (palette par défaut) */
  --c-math: #6366F1;
  --c-fr: #EC4899;
  --c-hist: #F59E0B;
  --c-svt: #10B981;
  --c-phy: #06B6D4;
  --c-eng: #8B5CF6;

  /* Typo */
  --font-body: 'Public Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Bricolage Grotesque', 'Public Sans', sans-serif;

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;

  /* Shadow */
  --sh-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --sh-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
  --sh-lg: 0 12px 32px rgba(15, 23, 42, 0.10), 0 4px 8px rgba(15, 23, 42, 0.04);

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
}
h1 { font-size: 32px; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: 22px; line-height: 1.25; }
h3 { font-size: 18px; line-height: 1.3; }

p { margin: 0; }

/* ============================================================
   App shell
   ============================================================ */

.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  height: 100%;
  min-height: 720px;
}

/* Sidebar */
.sidebar {
  background: var(--navy-900);
  color: #fff;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
}
.sidebar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 4px;
}
.sidebar .logo img { height: 32px; width: auto; display: block; }
.sidebar .logo-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.sidebar .logo-text .accent { color: var(--teal-300); }

.subject-switcher {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.subject-switcher:hover { background: rgba(255, 255, 255, 0.10); }
.subject-switcher .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.subject-switcher .label-wrap { flex: 1; min-width: 0; }
.subject-switcher .label-sm {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.2;
}
.subject-switcher .label-lg {
  font-size: 14px;
  font-weight: 500;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.subject-switcher .chevron { color: rgba(255, 255, 255, 0.5); flex-shrink: 0; }

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
  padding: 4px 10px 8px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-item.active {
  background: rgba(20, 184, 166, 0.16);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.3);
}
.nav-item.active .nav-icon { color: var(--teal-300); }
.nav-icon { display: flex; opacity: 0.85; }
.nav-item.active .nav-icon { opacity: 1; }
.nav-badge {
  margin-left: auto;
  background: var(--teal);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  min-width: 20px;
  text-align: center;
}

.sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}
.user-chip:hover { background: rgba(255, 255, 255, 0.06); }
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-300) 100%);
  color: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.user-chip .name { font-size: 14px; font-weight: 500; }
.user-chip .sub { font-size: 12px; color: rgba(255, 255, 255, 0.55); }

/* Main */
.main {
  overflow-y: auto;
  padding: 28px 36px 80px;
  position: relative;
}
.main-inner { max-width: 1200px; margin: 0 auto; }

/* ============================================================
   Common bits
   ============================================================ */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.page-head .eyebrow {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.page-head h1 { margin-bottom: 6px; }
.page-head .sub { color: var(--text-muted); font-size: 15px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--text);
  transition: all 0.12s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-hover); }
.btn.primary {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.btn.primary:hover { background: var(--navy-700); }
.btn.teal {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.btn.teal:hover { background: #0F9D8B; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--surface-hover); }
.btn.outline { border-color: var(--border-strong); background: var(--surface); }
.btn.outline:hover { background: var(--surface-hover); }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.btn.lg { padding: 13px 22px; font-size: 15px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
}
.card.hover { transition: all 0.15s; cursor: pointer; }
.card.hover:hover {
  border-color: var(--border-strong);
  box-shadow: var(--sh-md);
  transform: translateY(-1px);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.pill.success { background: #ECFDF5; color: #047857; border-color: #A7F3D0; }
.pill.warning { background: #FFFBEB; color: #B45309; border-color: #FDE68A; }
.pill.info { background: #EFF6FF; color: #1D4ED8; border-color: #BFDBFE; }
.pill.muted { background: var(--surface-2); color: var(--text-muted); }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; }
.row { display: flex; align-items: center; gap: 12px; }
.col { display: flex; flex-direction: column; gap: 12px; }
.spacer { flex: 1; }
.muted { color: var(--text-muted); }
.soft { color: var(--text-soft); }
.tiny { font-size: 12px; }
.small { font-size: 13px; }

/* ============================================================
   Dashboard
   ============================================================ */

.hero-next {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy) 55%, #2954C4 100%);
  color: #fff;
  border-radius: var(--r-xl);
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
}
.hero-next::before {
  content: "";
  position: absolute;
  right: -60px; top: -60px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.35) 0%, transparent 70%);
}
.hero-next .eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
}
.hero-next h2 {
  color: #fff;
  font-size: 28px;
  margin-bottom: 4px;
}
.hero-next .meta {
  display: flex;
  gap: 20px;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  flex-wrap: wrap;
}
.hero-next .meta .item { display: flex; align-items: center; gap: 6px; }
.hero-next .time {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}
.hero-next .time .sub {
  display: block;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 400;
  letter-spacing: 0;
  margin-top: 6px;
  font-family: var(--font-body);
}

.schedule-item {
  display: grid;
  grid-template-columns: 70px 4px 1fr auto;
  gap: 16px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  align-items: center;
  transition: background 0.12s;
}
.schedule-item:hover { background: var(--surface-2); }
.schedule-item .time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 15px;
}
.schedule-item .time .end { color: var(--text-muted); font-weight: 400; font-size: 13px; display: block; }
.schedule-item .bar {
  width: 4px;
  height: 36px;
  border-radius: 4px;
  background: var(--border);
}
.schedule-item .title { font-weight: 600; font-size: 15px; }
.schedule-item .sub { color: var(--text-muted); font-size: 13px; margin-top: 2px; }
.schedule-item.past { opacity: 0.55; }
.schedule-item.past .title { text-decoration: line-through; }
.schedule-item.now { background: var(--teal-50); }
.schedule-item.now .bar { background: var(--teal); }

.todo {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  transition: background 0.12s;
  cursor: pointer;
}
.todo:hover { background: var(--surface-2); }
.todo .checkbox {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--border-strong);
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  transition: all 0.15s;
}
.todo.done .checkbox {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.todo.done .label { text-decoration: line-through; color: var(--text-muted); }
.todo .label { font-size: 14px; font-weight: 500; }
.todo .meta-row { display: flex; gap: 8px; margin-top: 4px; font-size: 12px; color: var(--text-muted); }

/* Stat tiles */
.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
}
.stat-tile .label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.stat-tile .value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 600;
  line-height: 1.1;
  margin-top: 6px;
  letter-spacing: -0.02em;
}
.stat-tile .value .unit { font-size: 16px; color: var(--text-muted); font-weight: 400; margin-left: 4px; font-family: var(--font-body); }
.stat-tile .trend { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ============================================================
   Séquences
   ============================================================ */

.seq-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all 0.15s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.seq-card:hover { box-shadow: var(--sh-md); transform: translateY(-1px); border-color: var(--border-strong); }
.seq-card .top { padding: 18px 20px 14px; flex: 1; }
.seq-card .accent-bar { height: 4px; }
.seq-card h3 { margin-bottom: 6px; font-size: 17px; }
.seq-card .meta { color: var(--text-muted); font-size: 13px; margin-bottom: 14px; }
.seq-card .foot {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  background: var(--surface-2);
}
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}
.progress-bar .fill {
  position: absolute;
  inset: 0;
  background: var(--teal);
  border-radius: 99px;
  transition: width 0.3s;
}

/* Séquence detail */
.seance-row {
  display: grid;
  grid-template-columns: 36px 80px 1fr auto;
  gap: 16px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  align-items: center;
  border: 1px solid transparent;
}
.seance-row:hover { background: var(--surface-2); }
.seance-row .num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  color: var(--text-muted);
}
.seance-row.done .num {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.seance-row .date {
  font-size: 13px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.seance-row .title { font-weight: 500; font-size: 15px; }
.seance-row .obj { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.seance-row.done .title { color: var(--text-muted); }

/* ============================================================
   Progression annuelle
   ============================================================ */

.timeline {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  overflow-x: auto;
}
.timeline-grid {
  display: grid;
  grid-template-columns: 140px repeat(12, minmax(70px, 1fr));
  gap: 0;
  min-width: 800px;
}
.timeline-head {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.timeline-head.holiday { background: repeating-linear-gradient(45deg, transparent, transparent 4px, var(--surface-2) 4px, var(--surface-2) 8px); }
.timeline-row-label {
  padding: 16px 12px;
  font-weight: 600;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.timeline-cell {
  border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
  min-height: 64px;
  position: relative;
}
.timeline-cell.holiday { background: var(--surface-2); }
.timeline-bar {
  position: absolute;
  top: 8px; bottom: 8px;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: opacity 0.12s;
  z-index: 2;
}
.timeline-bar:hover { opacity: 0.9; }
.timeline-bar.row-2 { top: 36px; bottom: auto; height: 24px; }

/* ============================================================
   Classes / Matières
   ============================================================ */

.class-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.class-tile:hover { box-shadow: var(--sh-md); transform: translateY(-1px); }
.class-tile .head { display: flex; align-items: center; gap: 12px; }
.class-tile .badge {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: #fff;
}
.class-tile .name { font-weight: 600; font-size: 17px; }
.class-tile .matiere { color: var(--text-muted); font-size: 13px; }
.class-tile .stats {
  display: flex;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.class-tile .stats .stat .v { font-weight: 600; font-size: 16px; }
.class-tile .stats .stat .l { color: var(--text-muted); }

/* ============================================================
   Conseils de classe
   ============================================================ */

.conseil-row {
  display: grid;
  grid-template-columns: 80px 1fr auto auto auto;
  gap: 20px;
  align-items: center;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.12s;
}
.conseil-row:hover { border-color: var(--border-strong); box-shadow: var(--sh-sm); }
.conseil-row .when {
  font-family: var(--font-display);
  font-weight: 600;
  text-align: center;
  font-size: 14px;
}
.conseil-row .when .day { font-size: 24px; line-height: 1; }
.conseil-row .when .month { font-size: 12px; color: var(--text-muted); text-transform: uppercase; margin-top: 4px; }
.conseil-row .progress-mini {
  width: 100px;
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.conseil-row .progress-mini .fill { height: 100%; background: var(--teal); }

/* ============================================================
   Floating feedback button
   ============================================================ */

.feedback-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--teal);
  color: #fff;
  border: none;
  padding: 14px 22px 14px 18px;
  border-radius: 99px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(20, 184, 166, 0.45), 0 4px 12px rgba(15, 23, 42, 0.12);
  z-index: 100;
  transition: all 0.18s;
}
.feedback-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(20, 184, 166, 0.55), 0 6px 16px rgba(15, 23, 42, 0.14);
}
.feedback-fab .pulse {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.6);
  animation: fab-pulse 2.4s infinite;
  pointer-events: none;
}
@keyframes fab-pulse {
  0% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.55); }
  70% { box-shadow: 0 0 0 18px rgba(20, 184, 166, 0); }
  100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0); }
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  backdrop-filter: blur(4px);
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 520px;
  padding: 28px;
  box-shadow: var(--sh-lg);
  animation: modal-in 0.22s ease-out;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modal h2 { margin-bottom: 6px; }
.modal .sub { color: var(--text-muted); margin-bottom: 22px; font-size: 15px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text); }
.field .help { font-size: 12px; color: var(--text-muted); }
.field input, .field textarea, .field select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: all 0.12s;
  width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}
.field textarea { min-height: 120px; resize: vertical; font-family: inherit; }

.kind-radio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.kind-radio label {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: all 0.12s;
  background: var(--surface);
}
.kind-radio label:hover { background: var(--surface-2); }
.kind-radio input { display: none; }
.kind-radio input:checked + .kind-content {
  /* applied via class on label instead */
}
.kind-radio label.checked { border-color: var(--teal); background: var(--teal-50); box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12); }
.kind-radio .kind-icon { color: var(--teal); }
.kind-radio .kind-title { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.kind-radio .kind-desc { font-size: 12px; color: var(--text-muted); }

/* Empty state */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty .ic { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }

/* Back button */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  background: transparent;
  border: none;
  padding: 6px 10px 6px 6px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 12px;
}
.back-link:hover { background: var(--surface-hover); color: var(--text); }

/* Toast */
.toast {
  position: fixed;
  bottom: 88px;
  right: 24px;
  background: var(--text);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  z-index: 300;
  box-shadow: var(--sh-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 0.25s ease-out;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.tabs button {
  background: transparent;
  border: none;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.12s;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--navy); border-bottom-color: var(--navy); }

/* Filter chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Subject dropdown */
.dropdown-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  color: var(--text);
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  padding: 6px;
  z-index: 50;
  border: 1px solid var(--border);
  display: none;
}
.dropdown-pop.open { display: block; }
.dropdown-pop .item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
.dropdown-pop .item:hover { background: var(--surface-2); }
.dropdown-pop .item .dot { width: 8px; height: 8px; border-radius: 50%; }
.dropdown-pop .item.checked { background: var(--teal-50); color: var(--navy); font-weight: 600; }
