/* ============================================================
   EliteAdmitAI — Design System
   Modern, polished — Indigo & Slate palette
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --primary: #6366F1;
  --primary-hover: #4F46E5;
  --primary-light: #EEF2FF;
  --primary-muted: #E0E7FF;

  --bg: #FFFFFF;
  --bg-alt: #F8FAFC;
  --bg-section: #F1F5F9;
  --bg-dark: #0F172A;

  --border: #E2E8F0;
  --border-focus: #A5B4FC;

  --text: #0F172A;
  --text-secondary: #475569;
  --text-tertiary: #94A3B8;
  --text-inverse: #FFFFFF;

  --success: #10B981;
  --success-light: #ECFDF5;
  --warning: #F59E0B;
  --warning-light: #FFFBEB;
  --danger: #EF4444;
  --danger-light: #FEF2F2;

  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --shadow-xs: 0 1px 2px rgba(15,23,42,.04);
  --shadow-sm: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow: 0 4px 6px -1px rgba(15,23,42,.08), 0 2px 4px -2px rgba(15,23,42,.04);
  --shadow-md: 0 10px 15px -3px rgba(15,23,42,.08), 0 4px 6px -4px rgba(15,23,42,.03);
  --shadow-lg: 0 20px 25px -5px rgba(15,23,42,.10), 0 8px 10px -6px rgba(15,23,42,.04);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;

  --transition: 180ms cubic-bezier(.4,0,.2,1);
  --sidebar-width: 248px;
  --topnav-height: 60px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-alt);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-hover); }

h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.3; color: var(--text); }
h1 { font-size: 1.75rem; letter-spacing: -0.02em; }
h2 { font-size: 1.35rem; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; }
h4 { font-size: 0.95rem; }

p { color: var(--text-secondary); }

img { max-width: 100%; display: block; }

::selection { background: var(--primary-muted); color: var(--text); }

/* --- Top Navigation --- */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topnav-height);
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid rgba(226,232,240,0.6);
  display: flex;
  align-items: center;
  padding: 0 24px;
  z-index: 100;
  gap: 8px;
}

.top-nav__logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.02em;
  white-space: nowrap;
  margin-right: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-nav__logo-icon {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--primary), #818CF8);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-inverse);
  font-weight: 700;
  font-size: 0.8rem;
  box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}

.top-nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.top-nav__link {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
}

.top-nav__link:hover {
  background: var(--bg-section);
  color: var(--text);
}

.top-nav__link.active {
  background: var(--primary-light);
  color: var(--primary);
}

.top-nav__link--accent {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  border: 1px solid var(--primary-muted);
  border-radius: 100px;
  padding: 5px 14px;
}

.top-nav__link--accent:hover {
  background: var(--primary-muted);
  color: var(--primary-hover);
}

.top-nav__link--accent.active {
  background: var(--primary);
  color: var(--text-inverse);
}

.top-nav__right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.top-nav__session {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-section);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.top-nav__session:hover {
  background: var(--border);
}

.top-nav__restore {
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-nav__restore-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  font-weight: 500;
}

.top-nav__restore-input {
  width: 130px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-align: center;
  background: var(--bg);
  color: var(--text);
  transition: border-color var(--transition);
}

.top-nav__restore-input::placeholder {
  color: var(--text-tertiary);
}

.top-nav__restore-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-muted);
}

.top-nav__cta {
  display: inline-flex;
}

/* --- Layout --- */
.layout {
  display: flex;
  min-height: calc(100vh - var(--topnav-height));
  margin-top: var(--topnav-height);
}

.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #FFFFFF 0%, var(--bg-alt) 100%);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  position: sticky;
  top: var(--topnav-height);
  height: calc(100vh - var(--topnav-height));
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar__section {
  padding: 0 12px;
  margin-bottom: 20px;
}

.sidebar__title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  padding: 0 12px;
  margin-bottom: 6px;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 450;
  transition: all var(--transition);
  cursor: pointer;
}

.sidebar__link:hover {
  background: var(--bg-section);
  color: var(--text);
}

.sidebar__link.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 550;
  box-shadow: inset 3px 0 0 var(--primary);
}

.sidebar__link--accent {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  border: 1px solid var(--primary-muted);
  border-radius: var(--radius);
  margin-top: 4px;
}

.sidebar__link--accent:hover {
  background: var(--primary-muted);
  color: var(--primary-hover);
}

.sidebar__link-icon {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.sidebar__nested {
  padding-left: 24px;
}

.sidebar__nested .sidebar__link {
  font-size: 0.82rem;
  padding: 5px 12px;
}

.main-content {
  flex: 1;
  min-width: 0;
  padding: 28px 32px;
  max-width: 1200px;
}

.main-content--wide {
  max-width: 100%;
  padding: 0;
}

.main-content--centered {
  max-width: 800px;
  margin: 0 auto;
}

/* --- Page Header --- */
.page-header {
  margin-bottom: 24px;
}

.page-header__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.page-header__subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.page-header__actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* --- Cards --- */
.card {
  background: var(--bg);
  border: 1px solid rgba(226,232,240,0.7);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border);
}

.card--flat { box-shadow: none; }
.card--flat:hover { box-shadow: none; }

.card--interactive { cursor: pointer; }
.card--interactive:hover { box-shadow: var(--shadow); border-color: var(--border-focus); }

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card__title {
  font-size: 0.95rem;
  font-weight: 600;
}

.card__subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.card__body { font-size: 0.9rem; }

.card__footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.card-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 550;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1.4;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #818CF8);
  color: var(--text-inverse);
  border-color: var(--primary);
  box-shadow: 0 1px 3px rgba(99,102,241,0.25);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-hover), #6366F1);
  border-color: var(--primary-hover);
  color: var(--text-inverse);
  box-shadow: 0 4px 12px rgba(99,102,241,0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--bg-section);
  border-color: #D1D5DB;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--bg-section);
  color: var(--text);
}

.btn-danger {
  background: var(--bg);
  color: var(--danger);
  border-color: var(--border);
}
.btn-danger:hover:not(:disabled) {
  background: var(--danger-light);
  border-color: var(--danger);
}

.btn-success {
  background: var(--success);
  color: var(--text-inverse);
  border-color: var(--success);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 12px 24px;
  font-size: 1rem;
  border-radius: var(--radius);
}

.btn-icon {
  padding: 6px;
  width: 32px;
  height: 32px;
}

.btn-block {
  width: 100%;
}

/* --- Tabs --- */
.tab-bar {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.tab {
  padding: 10px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font);
  margin-bottom: -1px;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* --- Collapsible --- */
.collapsible {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  margin-bottom: 8px;
  overflow: hidden;
}

.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  cursor: pointer;
  transition: background var(--transition);
  user-select: none;
}

.collapsible-header:hover {
  background: var(--bg-alt);
}

.collapsible-header__title {
  font-size: 0.9rem;
  font-weight: 550;
  display: flex;
  align-items: center;
  gap: 10px;
}

.collapsible-header__chevron {
  width: 16px;
  height: 16px;
  transition: transform var(--transition);
  color: var(--text-tertiary);
}

.collapsible.open .collapsible-header__chevron {
  transform: rotate(90deg);
}

.collapsible-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 250ms ease;
}

.collapsible.open .collapsible-body {
  max-height: 5000px;
}

.collapsible-body__inner {
  padding: 0 20px 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 550;
  color: var(--text);
  margin-bottom: 5px;
}

.form-group .form-hint {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row--3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.form-row--4 {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  transition: all var(--transition);
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-tertiary);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.input-with-btn {
  display: flex;
  gap: 8px;
}

.input-with-btn input {
  flex: 1;
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-high, .badge-safety {
  background: var(--success-light);
  color: var(--success);
}

.badge-medium, .badge-target {
  background: var(--warning-light);
  color: var(--warning);
}

.badge-low, .badge-reach {
  background: var(--danger-light);
  color: var(--danger);
}

.badge-info {
  background: var(--primary-light);
  color: var(--primary);
}

.badge-neutral {
  background: var(--bg-section);
  color: var(--text-secondary);
}

/* --- Data Tables --- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead th {
  text-align: left;
  padding: 10px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.data-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.data-table tbody tr:hover {
  background: var(--bg-alt);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* --- Chat --- */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--topnav-height) - 120px);
  max-height: 700px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.chat-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-message {
  max-width: 75%;
  padding: 10px 16px;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  line-height: 1.6;
  word-wrap: break-word;
}

.chat-message--user {
  align-self: flex-end;
  background: var(--primary);
  color: var(--text-inverse);
  border-bottom-right-radius: var(--radius-sm);
}

.chat-message--ai {
  align-self: flex-start;
  background: var(--bg-section);
  color: var(--text);
  border-bottom-left-radius: var(--radius-sm);
}

.chat-message__meta {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.chat-message--user .chat-message__meta {
  color: rgba(255,255,255,0.7);
}

.chat-input {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.chat-input textarea {
  flex: 1;
  min-height: 40px;
  max-height: 120px;
  resize: none;
  border-radius: var(--radius);
}

/* --- Progress Bar --- */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-section);
  border-radius: 100px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: var(--primary);
  border-radius: 100px;
  transition: width 400ms ease;
}

.progress-bar--success .progress-bar__fill { background: var(--success); }
.progress-bar--warning .progress-bar__fill { background: var(--warning); }

.progress-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* --- Toast Notifications --- */
.toast-container {
  position: fixed;
  top: calc(var(--topnav-height) + 12px);
  right: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  font-size: 0.875rem;
  pointer-events: auto;
  animation: toast-in 250ms ease;
  max-width: 380px;
}

.toast--success { border-left: 3px solid var(--success); }
.toast--error   { border-left: 3px solid var(--danger); }
.toast--warning { border-left: 3px solid var(--warning); }
.toast--info    { border-left: 3px solid var(--primary); }

.toast__icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.toast--success .toast__icon { color: var(--success); }
.toast--error   .toast__icon { color: var(--danger); }
.toast--warning .toast__icon { color: var(--warning); }
.toast--info    .toast__icon { color: var(--primary); }

.toast__message {
  flex: 1;
  color: var(--text);
}

.toast__close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
  font-size: 1.1rem;
  padding: 0;
  line-height: 1;
}

.toast.toast-out {
  animation: toast-out 200ms ease forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}

/* --- Balance Indicator Bar --- */
.balance-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.balance-bar__segment {
  display: flex;
  align-items: center;
  gap: 6px;
}

.balance-bar__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.balance-bar__dot--reach   { background: var(--danger); }
.balance-bar__dot--target  { background: var(--warning); }
.balance-bar__dot--safety  { background: var(--success); }

.balance-bar__note {
  margin-left: auto;
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

/* --- Timeline --- */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline__item {
  position: relative;
  margin-bottom: 24px;
  padding-bottom: 4px;
}

.timeline__dot {
  position: absolute;
  left: -24px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--primary-muted);
}

.timeline__dot--success { background: var(--success); box-shadow: 0 0 0 2px var(--success-light); }
.timeline__dot--warning { background: var(--warning); box-shadow: 0 0 0 2px var(--warning-light); }

.timeline__date {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.timeline__content {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
}

/* --- Hero Section --- */
.hero {
  text-align: center;
  padding: 28px 24px 16px;
  max-width: 900px;
  margin: 0 auto;
}

.hero__badge {
  display: inline-flex;
  padding: 5px 16px;
  background: linear-gradient(135deg, var(--primary-light), #E0E7FF);
  color: var(--primary);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: 0.01em;
  border: 1px solid rgba(99,102,241,0.1);
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 10px;
}

.hero p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0 auto 8px;
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* --- Home Page Sections --- */
.home-section {
  padding: 32px 24px;
}

.home-section__inner {
  max-width: 1060px;
  margin: 0 auto;
}

.home-section--alt {
  background: var(--bg-section);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.home-section--white {
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.home-section--cta {
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
}

.home-section__heading {
  text-align: center;
  margin-bottom: 8px;
}

.home-section__subheading {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* How it Works Steps */
.how-it-works-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.how-it-works-step {
  text-align: center;
  flex: 1;
  min-width: 180px;
  max-width: 240px;
}

.how-it-works-step__number {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), #818CF8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}

.how-it-works-arrow {
  display: flex;
  align-items: center;
  height: 48px;
  color: var(--text-tertiary);
  font-size: 1.5rem;
  padding: 0 16px;
}

/* No-account callout */
.no-account-callout {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.no-account-callout__inner {
  padding: 14px 24px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
}

/* Feature checkmark list */
.feature-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0;
  margin-bottom: 12px;
}

.feature-checks span {
  white-space: nowrap;
}

/* Final CTA section */
.cta-section {
  padding: 56px 24px;
  text-align: center;
}

.cta-section__inner {
  max-width: 520px;
  margin: 0 auto;
}

.cta-section__restore {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 28px;
}

/* --- Status Dots --- */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.status-dot--done      { background: var(--success); }
.status-dot--progress  { background: var(--primary); }
.status-dot--pending   { background: var(--border); }

/* --- Quick Stats Row --- */
.stats-row {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
}

.stat-item {
  text-align: center;
}

.stat-item__value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.stat-item__label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* --- Dashboard Stats Row --- */
.dash-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.dash-stat {
  flex: 1;
  min-width: 140px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: 1px solid rgba(226,232,240,0.7);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition), transform var(--transition);
}

.dash-stat:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.dash-stat__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-stat__value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  word-break: break-word;
}

.dash-stat__total {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.dash-stat__label {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* --- Dashboard Profile Grid --- */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  font-size: 0.875rem;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-field__label {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-field__value {
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.profile-detail {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

.profile-detail__label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.profile-detail__value {
  color: var(--text-secondary);
  line-height: 1.6;
  word-break: break-word;
}

/* --- Dashboard Verdict Rows --- */
.verdict-row {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}

.verdict-row:last-child {
  border-bottom: none;
}

.verdict-row__school {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.verdict-row__name {
  font-weight: 600;
  font-size: 0.9rem;
  word-break: break-word;
  min-width: 0;
}

.verdict-row__blocker {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --- Combined College + Verdict Rows --- */
.college-verdict-row {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}

.college-verdict-row:last-child {
  border-bottom: none;
}

.college-verdict-row__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.college-verdict-row__info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.college-verdict-row__name {
  font-weight: 600;
  font-size: 0.9rem;
  word-break: break-word;
  min-width: 0;
}

.college-verdict-row__blocker {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --- Dashboard Quick Links --- */
.dash-quick-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dash-quick-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 550;
  color: var(--text);
  text-decoration: none;
  transition: all var(--transition);
}

.dash-quick-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-tertiary);
}

.empty-state__icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.3;
}

.empty-state__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.empty-state__text {
  font-size: 0.875rem;
  margin-bottom: 20px;
}

/* --- Session Code Display --- */
.session-code-display {
  text-align: center;
  padding: 40px 24px;
}

.session-code-display__code {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text);
  padding: 20px 40px;
  background: var(--bg-alt);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  display: inline-block;
  margin-bottom: 20px;
}

/* --- Mode Toggle --- */
.mode-toggle {
  display: inline-flex;
  background: var(--bg-section);
  border-radius: var(--radius);
  padding: 3px;
  gap: 2px;
}

.mode-toggle__option {
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
  background: transparent;
  border: none;
  font-family: var(--font);
}

.mode-toggle__option.active {
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}

/* --- Filter Bar --- */
.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-bar select {
  width: auto;
  min-width: 160px;
  padding: 6px 32px 6px 12px;
  font-size: 0.82rem;
}

/* --- Generation Progress --- */
.gen-progress {
  max-width: 640px;
  margin: 0 auto;
}

.gen-progress__phase {
  font-size: 1rem;
  color: var(--text-secondary);
  text-align: center;
  margin: 16px 0 24px;
}

.gen-progress__list {
  list-style: none;
  margin: 20px 0;
}

.gen-progress__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.gen-progress__item--done {
  color: var(--success);
}

.gen-progress__item--active {
  color: var(--primary);
  font-weight: 550;
}

.gen-progress__status-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* --- Quiz --- */
.quiz-question {
  margin-bottom: 12px;
}

.quiz-question__title {
  font-size: 0.95rem;
  font-weight: 550;
  margin-bottom: 10px;
  color: var(--text);
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.875rem;
}

.quiz-option:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.quiz-option input[type="radio"] {
  width: auto;
  accent-color: var(--primary);
}

/* --- Separator --- */
.separator {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-tertiary);
  font-size: 0.82rem;
  margin: 24px 0;
}

.separator::before,
.separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 24px;
  font-size: 0.78rem;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border);
}

/* --- Utility --- */
.text-secondary { color: var(--text-secondary); }
.text-success   { color: var(--success); }
.text-warning   { color: var(--warning); }
.text-danger    { color: var(--danger); }
.text-primary   { color: var(--primary); }
.text-center    { text-align: center; }
.text-sm        { font-size: 0.82rem; }
.text-xs        { font-size: 0.75rem; }
.font-mono      { font-family: var(--font-mono); }
.font-bold      { font-weight: 600; }

.mt-0  { margin-top: 0; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.flex       { display: flex; }
.flex-col   { flex-direction: column; }
.flex-wrap  { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4  { gap: 4px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

.hidden { display: none !important; }

.plan-section {
  padding: 24px;
  margin-bottom: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* --- Spinner --- */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 600ms linear infinite;
}

.spinner--lg { width: 28px; height: 28px; border-width: 3px; }
.spinner-sm { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 600ms linear infinite; }

/* --- Session Prompt Overlay --- */
.session-prompt-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.session-prompt-overlay.visible { opacity: 1; pointer-events: auto; }
.session-prompt {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  padding: 24px;

/* ── Feedback Modal ──────────────────────────────────────────────── */
}
.feedback-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000;
  animation: feedbackFadeIn 0.2s ease;
}
@keyframes feedbackFadeIn { from { opacity: 0; } to { opacity: 1; } }
.feedback-modal {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 12px;
  padding: 28px 32px;
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: feedbackSlideUp 0.25s ease;
}
@keyframes feedbackSlideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.feedback-modal__close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; font-size: 1.5rem;
  cursor: pointer; color: var(--text-secondary, #888);
  line-height: 1; padding: 4px;
}
.feedback-modal__close:hover { color: var(--text-primary, #333); }
.feedback-modal__title {
  margin: 0 0 4px; font-size: 1.25rem; font-weight: 700;
}
.feedback-modal__subtitle {
  margin: 0 0 20px; font-size: 0.9rem;
  color: var(--text-secondary, #666);
}
.feedback-field {
  margin-bottom: 16px;
}
.feedback-field label {
  display: block; font-size: 0.85rem; font-weight: 600;
  margin-bottom: 6px; color: var(--text-primary, #333);
}
.feedback-field input,
.feedback-field textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border, #d0d0d0);
  border-radius: 8px; font-size: 0.9rem;
  background: var(--bg, #fff);
  color: var(--text-primary, #333);
  font-family: inherit;
  box-sizing: border-box;
}
.feedback-field input:focus,
.feedback-field textarea:focus {
  outline: none; border-color: var(--primary, #4f46e5);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.feedback-stars {
  display: flex; gap: 4px;
}
.feedback-star {
  font-size: 1.6rem; cursor: pointer;
  color: var(--border, #d0d0d0);
  transition: color 0.15s, transform 0.15s;
}
.feedback-star:hover,
.feedback-star.active {
  color: #f59e0b;
}
.feedback-star:hover { transform: scale(1.15); }
.top-nav__link--feedback {
  color: var(--text-secondary, #888) !important;
  font-size: 0.85rem;
}
  max-width: 420px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Save Code Button (nav) --- */
.save-code-btn {
  animation: subtle-pulse 2s ease-in-out 3;
}

@keyframes subtle-pulse {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2); }
}

/* --- Profile Stats Grid (mobile-friendly replacement for profile table) --- */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0;
  background: var(--bg-section);
  border-radius: var(--radius);
  overflow: hidden;
}

.profile-stats-grid__item {
  padding: 12px 16px;
  text-align: center;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.profile-stats-grid__item:last-child {
  border-right: none;
}

/* --- Table scroll wrapper --- */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 0 4px;
}

.table-scroll table {
  min-width: 500px;
}

/* --- Responsive --- */
/* --- Sample Plans Grid --- */
.sample-plans-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1200px) {
  .card-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .card-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .form-row--4  { grid-template-columns: 1fr 1fr; }
  .sample-plans-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --sidebar-width: 0px;
  }

  .top-nav {
    padding: 0 16px;
  }

  .top-nav__restore {
    display: none;
  }

  .top-nav__links {
    display: none;
  }

  .top-nav__links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--topnav-height);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px;
    box-shadow: var(--shadow);
    z-index: 101;
  }

  .top-nav__right {
    display: none;
  }

  .top-nav__mobile-auth {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border);
    margin-top: 4px;
    padding-top: 8px;
  }

  .top-nav__mobile-user {
    padding: 6px 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
  }

  .mobile-menu-btn {
    display: flex;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    font-size: 1.3rem;
    padding: 4px;
    margin-left: auto;
  }

  .sidebar {
    display: none;
    position: fixed;
    top: var(--topnav-height);
    left: 0;
    bottom: 0;
    z-index: 90;
    width: 260px;
    box-shadow: var(--shadow-lg);
  }

  .sidebar.mobile-open {
    display: block;
  }

  .main-content {
    padding: 20px 16px;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .hero {
    padding: 32px 16px 24px;
  }

  .card-grid,
  .card-grid--2,
  .card-grid--3,
  .card-grid--4 {
    grid-template-columns: 1fr;
  }

  .sample-plans-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .how-it-works-steps {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .how-it-works-arrow {
    display: none;
  }

  .how-it-works-step {
    max-width: 320px;
  }

  .form-row,
  .form-row--3,
  .form-row--4 {
    grid-template-columns: 1fr;
  }

  .stats-row {
    flex-wrap: wrap;
  }

  .hero__actions {
    flex-direction: column;
  }

  .balance-bar {
    flex-wrap: wrap;
  }

  .dash-stats {
    flex-direction: column;
    gap: 10px;
  }

  .dash-stat {
    min-width: 0;
  }

  .profile-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dash-quick-links {
    flex-direction: column;
  }

  .dash-quick-link {
    justify-content: center;
  }

  .chat-container {
    height: calc(100vh - var(--topnav-height) - 80px);
  }

  /* ── Tables: horizontal scroll for all tables on mobile ── */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  thead, tbody, tr, th, td {
    min-width: 0;
  }

  /* ── Data tables ── */
  .data-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* ── Student profile stat row → stack vertically ── */
  .profile-stat-row td {
    display: block;
    width: 100%;
    text-align: center !important;
    border-bottom: 1px solid var(--border);
    border-radius: 0 !important;
  }

  .profile-stat-row tr {
    display: flex;
    flex-wrap: wrap;
  }

  .profile-stat-row td {
    flex: 1 1 45%;
    min-width: 120px;
  }

  /* ── Top nav session code area ── */
  .top-nav__session {
    flex-wrap: wrap;
    gap: 4px !important;
    font-size: 0.75rem;
  }

  .top-nav__session .btn {
    font-size: 0.72rem;
    padding: 3px 8px;
  }

  #session-display {
    font-size: 0.72rem;
  }

  /* ── Plan page: prev/next nav ── */
  .plan-nav-bottom {
    flex-direction: column;
    gap: 8px;
  }

  .plan-nav-bottom .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* ── Inline flex cards that wrap poorly ── */
  .card__body [style*="display:flex"][style*="justify-content:space-between"] {
    flex-direction: column;
    gap: 12px;
  }

  /* ── Grid layouts in school detail ── */
  .card__body [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* ── Profile stats grid: 2 cols on mobile ── */
  .profile-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-stats-grid__item:nth-child(2n) {
    border-right: none;
  }
}

@media (min-width: 769px) {
  .mobile-menu-btn { display: none; }
  .top-nav__mobile-auth { display: none; }
}

/* ── Prose: rich-text content styling for plan sections ── */
.prose { line-height: 1.85; color: var(--text-primary); }
.prose h2 { margin: 32px 0 14px; font-size: 1.3rem; font-weight: 700; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.prose h3 { margin: 28px 0 12px; font-size: 1.15rem; font-weight: 700; color: var(--text-primary); }
.prose h4 { margin: 22px 0 8px; font-size: 1.02rem; font-weight: 600; }
.prose h5 { margin: 16px 0 6px; font-size: 0.95rem; font-weight: 600; }
.prose p { margin: 10px 0; line-height: 1.85; }
.prose ul, .prose ol { margin: 14px 0; padding-left: 24px; }
.prose ul { list-style-type: disc; }
.prose ol { list-style-type: decimal; }
.prose li { margin-bottom: 10px; line-height: 1.75; }
.prose li > ul, .prose li > ol { margin-top: 6px; margin-bottom: 4px; }
.prose strong { font-weight: 700; color: var(--text-primary); }
.prose em { font-style: italic; }
.prose hr { margin: 28px 0; border: none; border-top: 1px solid var(--border); }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.92rem; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prose th { text-align: left; padding: 10px 14px; background: var(--bg-section); border-bottom: 2px solid var(--border); font-weight: 600; white-space: nowrap; }
.prose td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose tr:hover td { background: var(--bg-section); }
.prose blockquote { margin: 16px 0; padding: 12px 20px; border-left: 3px solid var(--primary); background: var(--bg-section); border-radius: 0 var(--radius) var(--radius) 0; }
.prose blockquote p { margin: 4px 0; }
.prose code { background: var(--bg-section); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }
.prose a { color: var(--primary); text-decoration: underline; }
.prose h3:first-child, .prose h2:first-child { margin-top: 0; }

/* --- Onboarding Stepper --- */
.onboarding-step { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 100px; }
.onboarding-step__num { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; background: var(--bg-section); color: var(--text-secondary); border: 2px solid var(--border); transition: all 0.3s; }
.onboarding-step__label { font-size: 0.8rem; color: var(--text-secondary); font-weight: 500; }
.onboarding-step--active .onboarding-step__num { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }
.onboarding-step--active .onboarding-step__label { color: var(--primary); font-weight: 600; }
.onboarding-step--done .onboarding-step__num { background: var(--success); color: #fff; border-color: var(--success); }
.onboarding-step--done .onboarding-step__label { color: var(--success); }
.onboarding-step__line { width: 60px; height: 2px; background: var(--border); margin-bottom: 24px; transition: background 0.3s; }
.onboarding-step__line--done { background: var(--success); }
@media (max-width: 600px) {
  .onboarding-step { min-width: 70px; }
  .onboarding-step__line { width: 30px; }
  .onboarding-step__label { font-size: 0.7rem; }
}

/* --- Kanban Board --- */
.kanban-board { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; min-height: 400px; }
.kanban-col { background: var(--bg-alt); border-radius: var(--radius); border: 1px solid var(--border); display: flex; flex-direction: column; }
.kanban-col__header { padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.kanban-col__title { font-weight: 700; font-size: 0.9rem; }
.kanban-col__body { padding: 12px; flex: 1; display: flex; flex-direction: column; gap: 10px; min-height: 100px; }
.kanban-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); transition: box-shadow 0.2s, transform 0.2s; }
.kanban-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-1px); }
.kanban-card__actions { display: flex; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.kanban-card__actions .btn { font-size: 0.75rem; padding: 3px 10px; }
@media (max-width: 768px) {
  .kanban-board { grid-template-columns: 1fr; }
}

/* --- Course & Activity Picker --- */
.course-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
  margin-top: 6px;
}

.form-toggle-link {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--primary);
  margin-top: 6px;
  cursor: pointer;
  text-decoration: none;
}

.form-toggle-link:hover {
  text-decoration: underline;
}

.course-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  transition: all var(--transition);
  user-select: none;
}

.course-tag:hover {
  border-color: var(--primary-muted);
}

.course-tag.selected {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 500;
}

.course-tag input[type="checkbox"] {
  display: none;
}
