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

:root {
  --purple: #7C3AED;
  --purple-light: #EDE9FE;
  --purple-dark: #5B21B6;
  --navy: #1E1B4B;
  --green: #059669;
  --red: #DC2626;
  --text: #1F2937;
  --muted: #6B7280;
  --border: #E5E7EB;
  --bg: #F9FAFB;
  --white: #FFFFFF;
  --radius: 12px;
  --shadow: 0 2px 16px rgba(0,0,0,.07);
}

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--text); background: var(--bg); }
a { color: inherit; text-decoration: none; }

/* ── Parent nav ───────────────────────────────────────────────────────────── */
.p-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 60px; background: var(--white);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.p-brand { font-size: 18px; font-weight: 800; color: var(--purple); }
.p-nav-links { display: flex; align-items: center; gap: 24px; font-size: 14px; font-weight: 500; }
.p-nav-links a { color: var(--muted); transition: color .15s; }
.p-nav-links a:hover, .p-nav-links a.active { color: var(--purple); }
.p-logout { color: var(--red) !important; }

/* ── Page content wrapper ─────────────────────────────────────────────────── */
.p-content { max-width: 960px; margin: 0 auto; padding: 32px 24px 64px; }

/* ── Flash message ────────────────────────────────────────────────────────── */
.p-flash {
  background: #FEF3C7; border: 1px solid #FCD34D; color: #92400E;
  padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 14px;
}

/* ── Page header ──────────────────────────────────────────────────────────── */
.p-page-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 28px;
}
.p-page-header h1 { font-size: 26px; font-weight: 800; color: var(--navy); }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn-primary-sm {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--purple); color: #fff; border: none;
  padding: 10px 18px; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background .15s;
}
.btn-primary-sm:hover { background: var(--purple-dark); }

.btn-outline-sm {
  display: inline-flex; align-items: center;
  border: 1.5px solid var(--border); color: var(--muted); background: var(--white);
  padding: 10px 18px; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.btn-outline-sm:hover { border-color: var(--purple); color: var(--purple); }

.btn-danger-sm {
  background: transparent; border: 1.5px solid var(--red); color: var(--red);
  padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.btn-danger-sm:hover { background: #FEE2E2; }

/* ── Auth pages ───────────────────────────────────────────────────────────── */
.auth-body { background: linear-gradient(135deg, #F5F3FF, #EDE9FE); min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 40px 20px; }
.auth-card {
  background: var(--white); border-radius: 16px; padding: 40px;
  width: 100%; max-width: 420px; box-shadow: 0 8px 40px rgba(0,0,0,.1);
}
.auth-brand { font-size: 20px; font-weight: 800; color: var(--purple); display: block; margin-bottom: 24px; }
.auth-card h1 { font-size: 24px; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.auth-sub { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.auth-card form label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; margin-top: 16px; }
.auth-card form input {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 15px; outline: none; transition: border-color .15s;
}
.auth-card form input:focus { border-color: var(--purple); }
.btn-submit {
  width: 100%; margin-top: 20px; padding: 13px;
  background: var(--purple); color: #fff; border: none;
  border-radius: 8px; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: background .15s;
}
.btn-submit:hover { background: var(--purple-dark); }
.auth-switch { margin-top: 16px; font-size: 13px; color: var(--muted); text-align: center; }
.auth-switch a { color: var(--purple); font-weight: 600; }
.hint { color: var(--muted); font-weight: 400; font-size: 12px; }

/* ── T&C box ──────────────────────────────────────────────────────────────── */
.tnc-box {
  max-height: 160px; overflow-y: auto;
  border: 1.5px solid var(--border); border-radius: 8px;
  padding: 12px 14px; font-size: 13px; color: var(--muted);
  line-height: 1.6; background: var(--bg); margin-top: 6px;
}
.tnc-box p  { margin-bottom: 8px; }
.tnc-box p:last-child { margin-bottom: 0; }
.tnc-agree  {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 10px; font-size: 13px; font-weight: 600;
  color: var(--text); cursor: pointer;
}
.tnc-agree input[type="checkbox"] { margin-top: 2px; flex-shrink: 0;
  width: 16px; height: 16px; accent-color: var(--purple); cursor: pointer; }

/* ── Dashboard: kid grid ──────────────────────────────────────────────────── */
.kid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.kid-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; transition: box-shadow .2s, transform .2s; cursor: pointer;
}
.kid-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--purple); }
.kid-avatar { font-size: 44px; line-height: 1; }
.kid-info { flex: 1; }
.kid-name   { font-size: 17px; font-weight: 700; color: var(--navy); }
.kid-meta   { font-size: 13px; color: var(--muted); margin-top: 2px; }
.kid-progress { margin-top: 8px; }
.badge-gold {
  display: inline-flex; align-items: center; gap: 4px;
  background: #FEF3C7; color: #92400E; border-radius: 20px;
  padding: 3px 10px; font-size: 12px; font-weight: 600;
}
.kid-arrow  { color: var(--muted); font-size: 20px; }

/* ── Empty state ──────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 64px 24px; }
.empty-icon  { font-size: 64px; margin-bottom: 16px; }
.empty-state h2 { font-size: 22px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.empty-state p  { color: var(--muted); margin-bottom: 24px; }

/* ── Form card ────────────────────────────────────────────────────────────── */
.form-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; max-width: 640px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 4px; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text); }
.form-input {
  padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 15px; outline: none; transition: border-color .15s;
}
.form-input:focus { border-color: var(--purple); }
.form-card label { display: block; font-size: 13px; font-weight: 600; margin-top: 16px; margin-bottom: 6px; }

/* ── Avatar picker ────────────────────────────────────────────────────────── */
.avatar-picker { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.avatar-option { position: relative; cursor: pointer; }
.avatar-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.avatar-emoji {
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; font-size: 30px; border-radius: 12px;
  border: 2.5px solid var(--border); transition: all .15s;
}
.avatar-option input:checked ~ .avatar-emoji { border-color: var(--purple); background: var(--purple-light); }
.avatar-emoji:hover { border-color: var(--purple); }

/* ── Form actions ─────────────────────────────────────────────────────────── */
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 28px; }

/* ── Section title ────────────────────────────────────────────────────────── */
.section-title { font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 16px; }

/* ── Skill tree ───────────────────────────────────────────────────────────── */
.skill-category {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 16px; overflow: hidden;
}
.skill-cat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
}
.skill-cat-name  { font-size: 15px; font-weight: 700; }
.skill-cat-count { font-size: 13px; color: var(--muted); }
.skill-list { padding: 8px 0; }
.skill-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; transition: background .12s;
}
.skill-row:hover { background: var(--bg); }
.skill-row.unlocked .skill-name { color: var(--navy); }
.skill-row.locked   .skill-name { color: var(--muted); }
.skill-row.locked   .skill-icon { opacity: 0.4; }
.skill-icon    { font-size: 22px; }
.skill-details { flex: 1; min-width: 0; }
.skill-name    { font-size: 14px; font-weight: 600; display: block; }
.skill-desc    { font-size: 12px; color: var(--muted); display: block; margin-top: 1px; }
.skill-btn     { padding: 6px 14px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; border: none; transition: all .15s; white-space: nowrap; }
.skill-btn-unlock { background: var(--purple-light); color: var(--purple); }
.skill-btn-unlock:hover { background: var(--purple); color: #fff; }
.skill-btn-lock   { background: #F3F4F6; color: var(--muted); }
.skill-btn-lock:hover { background: #FEE2E2; color: var(--red); }

/* ── Activity log ─────────────────────────────────────────────────────────── */
.activity-list { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.activity-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 20px; background: var(--white); border-bottom: 1px solid var(--border);
}
.activity-row:last-child { border-bottom: none; }
.activity-icon  { font-size: 22px; margin-top: 2px; }
.activity-type  { font-size: 14px; font-weight: 600; }
.activity-notes { font-size: 13px; color: var(--muted); margin-top: 2px; }
.activity-time  { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ── Misc ─────────────────────────────────────────────────────────────────── */
.muted { color: var(--muted); font-size: 14px; }

/* ── Content Manager ──────────────────────────────────────────────────────── */
.cm-legend { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.cm-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.cm-badge-ready   { background: #D1FAE5; color: #065F46; }
.cm-badge-partial { background: #DBEAFE; color: #1D4ED8; }
.cm-badge-empty   { background: #F3F4F6; color: var(--muted); }

.cm-category {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 20px; overflow: hidden;
}
.cm-cat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: var(--bg); border-bottom: 1px solid var(--border);
}
.cm-cat-name { font-size: 15px; font-weight: 800; }

.cm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cm-table th { padding: 10px 16px; text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--border); background: var(--bg); }
.cm-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cm-table tr:last-child td { border-bottom: none; }
.cm-table tr:hover td { background: var(--bg); }
.cm-icon { font-size: 22px; }
.cm-model-name { font-weight: 600; }
.cm-model-file { font-size: 11px; color: var(--muted); font-family: monospace; margin-top: 2px; }

/* Level pip indicators on model list */
.cm-level-dots    { display: flex; gap: 4px; align-items: center; }
.cm-lvl-pip {
  width: 22px; height: 22px; border-radius: 6px; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  background: #F3F4F6; color: var(--muted);
}
.cm-lvl-pip-full  { background: #D1FAE5; color: #065F46; }

/* File callout on model detail page */
.cm-file-callout {
  display: flex; align-items: flex-start; gap: 12px;
  background: #F8FAFC; border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 18px; margin-bottom: 20px;
}
.cm-file-icon  { font-size: 20px; margin-top: 1px; }
.cm-file-label { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.cm-file-path  { font-size: 13px; color: var(--purple); word-break: break-all; }

/* YAML hint block */
.cm-yaml-hint {
  text-align: left; margin-top: 20px;
  background: #1E1B4B; border-radius: 10px; padding: 16px 20px;
}
.cm-yaml-hint pre {
  color: #C4B5FD; font-size: 12px; line-height: 1.6;
  white-space: pre-wrap; margin: 0;
}

/* Q number */
.cm-q-num { font-size: 12px; }
.cm-level      { background: var(--purple-light); color: var(--purple); border-radius: 6px; padding: 2px 8px; font-size: 12px; font-weight: 700; }
.cm-q-count    { font-weight: 600; }
.cm-q-inactive { color: var(--muted); font-weight: 400; }
.cm-model-info { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; font-size: 14px; }

/* Question list on model detail page */
.cm-q-list { display: flex; flex-direction: column; gap: 12px; }
.cm-q-row  {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px 20px;
}
.cm-q-row.cm-q-inactive { opacity: .6; border-style: dashed; }
.cm-q-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cm-type-badge { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.cm-type-mcq       { background: #EDE9FE; color: #7C3AED; }
.cm-type-truefalse { background: #D1FAE5; color: #059669; }
.cm-type-scenario  { background: #DBEAFE; color: #2563EB; }
.cm-diff-badge     { background: #F3F4F6; color: var(--muted); padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.cm-inactive-label { color: var(--muted); font-size: 11px; font-style: italic; }
.cm-q-stem    { font-size: 14px; line-height: 1.5; color: var(--text); margin-bottom: 10px; }
.cm-q-options { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cm-q-opt     { background: #F3F4F6; border-radius: 6px; padding: 4px 10px; font-size: 12px; }
.cm-q-opt-correct { background: #D1FAE5; color: #065F46; font-weight: 700; }
.cm-q-explanation { font-size: 13px; color: var(--muted); font-style: italic; margin-bottom: 10px; }
.cm-q-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── CSS tooltip ──────────────────────────────────────────────────────────── */
.tooltip-wrap {
  position: relative; display: inline-flex; align-items: center; cursor: default;
}
.tooltip-box {
  visibility: hidden; opacity: 0;
  background: #1E1B4B; color: #fff;
  font-size: 12px; font-weight: 400; line-height: 1.5;
  padding: 7px 10px; border-radius: 8px;
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  width: 200px; text-align: center;
  pointer-events: none; z-index: 200;
  transition: opacity .15s, visibility .15s;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.tooltip-box::after {
  content: ''; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: #1E1B4B;
}
.tooltip-wrap:hover .tooltip-box { visibility: visible; opacity: 1; }

/* ── Collapsible profile sections ────────────────────────────────────────── */
.profile-section {
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 16px; overflow: hidden;
}

.profile-section-summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 15px 20px; cursor: pointer;
  background: var(--bg); border-bottom: 1px solid transparent;
  font-size: 16px; font-weight: 800; color: var(--navy);
  list-style: none; user-select: none; transition: background .15s;
}
.profile-section-summary::-webkit-details-marker { display: none; }
.profile-section-summary:hover { background: #F0EEF8; }
details[open] > .profile-section-summary { border-bottom-color: var(--border); }

/* Chevron indicator */
.profile-section-summary::after {
  content: '›'; font-size: 22px; font-weight: 300; color: var(--muted);
  transition: transform .2s; flex-shrink: 0; margin-left: auto;
}
details[open] > .profile-section-summary::after { transform: rotate(90deg); }

.profile-section-meta { font-size: 13px; font-weight: 400; }
.profile-section-body { padding: 16px; }

/* Inner category <details> within a section */
.profile-cat { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.profile-cat:last-child { margin-bottom: 0; }

.profile-cat-summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px; cursor: pointer; background: var(--bg);
  border-bottom: 1px solid transparent;
  list-style: none; user-select: none; transition: background .15s;
}
.profile-cat-summary::-webkit-details-marker { display: none; }
.profile-cat-summary:hover { background: #EEF2FF; }
details[open] > .profile-cat-summary { border-bottom-color: var(--border); }
.profile-cat-summary::after {
  content: '›'; font-size: 18px; font-weight: 300; color: var(--muted);
  transition: transform .2s;
}
details[open] > .profile-cat-summary::after { transform: rotate(90deg); }

/* ── Skill lock/hide controls (kid profile) ───────────────────────────────── */
.skill-ctrl-legend {
  display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px;
  color: var(--muted); margin-bottom: 20px; align-items: center;
}
.legend-item { display: flex; align-items: center; gap: 6px; }

/* Skill row states */
.skill-row-hidden { opacity: .45; }
.skill-row-locked .skill-name { color: var(--muted); }

/* Status badge */
.skill-status { margin-right: 4px; }
.status-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
  white-space: nowrap;
}
.status-done     { background: #D1FAE5; color: #065F46; }
.status-progress { background: #DBEAFE; color: #1D4ED8; }
.status-locked   { background: #FEF3C7; color: #92400E; }
.status-hidden   { background: #F3F4F6; color: var(--muted); }
.status-new      { background: #F3F4F6; color: var(--muted); }

/* Control pills */
.skill-controls { display: flex; gap: 6px; }
.ctrl-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
  cursor: pointer; border: 1.5px solid var(--border); background: var(--bg);
  color: var(--muted); transition: all .15s; white-space: nowrap;
}
.ctrl-pill:hover       { border-color: var(--purple); color: var(--purple); background: var(--purple-light); }
.ctrl-pill-lock-on     { background: #FEF3C7; color: #92400E; border-color: #FCD34D; }
.ctrl-pill-lock-on:hover { background: #FDE68A; }
.ctrl-pill-hide-on     { background: #F3F4F6; color: #374151; border-color: #D1D5DB; }
.ctrl-pill-hide-on:hover { background: #E5E7EB; }
.ctrl-pill-off         { }

/* ── Book progress (parent kid profile) ───────────────────────────────────── */
.book-parent-grid { display: flex; flex-direction: column; gap: 0; }
.book-parent-row  {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 4px; border-bottom: 1px solid var(--border);
}
.book-parent-row:last-child  { border-bottom: none; }
.book-parent-done            { background: #F0FDF4; border-radius: 8px; }
.book-parent-cover           { font-size: 28px; flex-shrink: 0; }
.book-parent-info            { flex: 1; min-width: 0; }
.book-parent-title           { display: block; font-size: 14px; font-weight: 700; }
.book-parent-author          { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.book-parent-status          { flex-shrink: 0; }

/* ── Metrics dashboard ────────────────────────────────────────────────────── */
.metrics-cards { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 16px; margin-bottom: 32px; }
.metrics-kid-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; text-align: center; transition: box-shadow .2s, transform .2s;
}
.metrics-kid-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--purple); }
.metrics-avatar   { font-size: 44px; margin-bottom: 6px; }
.metrics-kid-name { font-size: 16px; font-weight: 800; color: var(--navy); margin-bottom: 12px; }
.metrics-stats    { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.metrics-stat     { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.metrics-stat-num { font-size: 22px; font-weight: 900; line-height: 1; }
.metrics-stat-label { font-size: 11px; color: var(--muted); }
.metrics-last     { font-size: 12px; color: var(--muted); }

.metrics-charts   { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.metrics-tabs     { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.metrics-tab {
  padding: 8px 18px; border-radius: 20px; border: 1.5px solid var(--border);
  background: var(--bg); color: var(--muted); font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all .15s;
}
.metrics-tab:hover { border-color: var(--purple); color: var(--purple); }
.metrics-tab.active { background: var(--purple); border-color: var(--purple); color: #fff; }
.metrics-range    { display: flex; gap: 8px; margin-bottom: 16px; }
.metrics-chart-wrap { position: relative; }

/* Level tabs */
.lvl-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 4px; }
.lvl-tab {
  padding: 8px 18px; border-radius: 8px 8px 0 0; font-size: 14px; font-weight: 600;
  border: 1.5px solid var(--border); border-bottom: none; color: var(--muted);
  background: var(--bg); transition: all .15s;
}
.lvl-tab:hover     { color: var(--purple); background: var(--purple-light); }
.lvl-tab-active    { background: var(--white); color: var(--purple); border-color: var(--purple); }

/* Question form */
.qtype-picker { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.qtype-option {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px;
  border: 2px solid var(--border); border-radius: 10px; cursor: pointer;
  font-size: 14px; font-weight: 600; transition: all .15s;
}
.qtype-option input { display: none; }
.qtype-option:hover, .qtype-option.selected { border-color: var(--purple); background: var(--purple-light); color: var(--purple); }
.qtype-icon { font-size: 18px; }

.form-textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 15px; outline: none; resize: vertical;
  font-family: inherit; transition: border-color .15s;
}
.form-textarea:focus { border-color: var(--purple); }

.mcq-options-grid { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.mcq-option-row   { display: flex; align-items: center; gap: 10px; }
.mcq-correct-radio { display: flex; align-items: center; gap: 0; cursor: pointer; }
.mcq-correct-radio input { display: none; }
.mcq-letter {
  width: 36px; height: 36px; border-radius: 50%; background: #F3F4F6;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; cursor: pointer; transition: all .15s;
  border: 2px solid transparent;
}
.mcq-correct-radio:has(input:checked) .mcq-letter { background: var(--purple); color: #fff; border-color: var(--purple-dark); }

.tf-picker { display: flex; gap: 12px; margin-top: 8px; }
.tf-option {
  display: flex; align-items: center; gap: 8px; padding: 12px 20px;
  border: 2px solid var(--border); border-radius: 10px; cursor: pointer;
  font-size: 15px; font-weight: 600; transition: all .15s;
}
.tf-option input { display: none; }
.tf-option:has(input:checked) { border-color: var(--purple); background: var(--purple-light); color: var(--purple); }

.diff-picker { display: flex; gap: 10px; margin-top: 8px; }
.diff-option {
  display: flex; align-items: center; gap: 6px; padding: 8px 16px;
  border: 2px solid var(--border); border-radius: 8px; cursor: pointer;
  font-size: 14px; font-weight: 600; transition: all .15s;
}
.diff-option input { display: none; }
.diff-option:has(input:checked) { border-color: var(--purple); background: var(--purple-light); color: var(--purple); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .p-nav { padding: 0 16px; }
  .p-content { padding: 20px 16px 48px; }
  .form-row  { grid-template-columns: 1fr; }
  .form-card { padding: 20px; }
  .auth-card { padding: 28px 20px; }
}
