:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #0f172a;
    --text-secondary: #475569;
    --muted: #64748b;
    --border: #e2e8f0;
    --accent: #0d9488;
    --accent-hover: #0f766e;
    --accent-soft: #f0fdfa;
    --accent-light: #ccfbf1;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --font: system-ui, -apple-system, sans-serif;
    --side-nav-width: 260px;
    --side-nav-collapsed: 72px;
    --top-bar-height: 60px;
}


*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; -webkit-font-smoothing: antialiased; }
body { min-height: 100%; font-family: var(--font); font-size: 16px; line-height: 1.5; background: var(--bg); color: var(--text); }

::selection { background: var(--accent); color: white; }
::-moz-selection { background: var(--accent); color: white; }

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

.skip-link { position: absolute; top: -40px; left: 0; background: var(--accent); color: white; padding: 8px 16px; z-index: 1000; }
.skip-link:focus { top: 0; }

.offline-indicator { position: fixed; top: 0; left: 0; right: 0; background: var(--warning); color: #000; text-align: center; padding: 8px; font-size: 14px; z-index: 1000; }
.offline-indicator[hidden] { display: none; }

.app-layout { display: flex; min-height: 100vh; }

.side-nav { position: fixed; left: 0; top: 0; bottom: 0; width: var(--side-nav-width); background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 100; transition: width 0.2s ease; }
.side-nav.collapsed { width: var(--side-nav-collapsed); }
.side-nav.collapsed .brand-text, .side-nav.collapsed .nav-item span, .side-nav.collapsed .sidebar-nav-item span:not(.nav-badge), .side-nav.collapsed .streak-label, .side-nav.collapsed .api-status-text { display: none; }
.side-nav.collapsed .nav-item, .side-nav.collapsed .sidebar-nav-item { justify-content: center; padding: 12px; }
.side-nav.collapsed .side-nav-footer { padding: 12px; }

.side-nav-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-icon { color: var(--accent); }
.brand-text { font-size: 20px; font-weight: 700; color: var(--accent); }
.side-nav-collapse { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); color: var(--muted); transition: all 0.15s; }
.side-nav-collapse:hover { background: var(--bg); color: var(--text); }

.side-nav-menu { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.nav-item, .sidebar-nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius-sm); color: var(--text-secondary); font-weight: 500; transition: all 0.15s; position: relative; }
.nav-item:hover, .sidebar-nav-item:hover { background: var(--bg); color: var(--text); }
.nav-item.active, .sidebar-nav-item.active { background: var(--accent-soft); color: var(--accent); }
.nav-item svg, .sidebar-nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }
.nav-badge { position: absolute; right: 12px; background: var(--accent); color: white; font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 10px; }

.side-nav-footer { padding: 16px 20px; border-top: 1px solid var(--border); }
.streak-display { display: flex; align-items: center; gap: 8px; padding: 12px; background: var(--accent-soft); border-radius: var(--radius-sm); margin-bottom: 12px; color: var(--accent); font-weight: 600; }
.streak-display svg { color: #f59e0b; }
.streak-label { font-size: 13px; color: var(--muted); font-weight: 400; }

.api-status { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--bg); border-radius: var(--radius-sm); margin-bottom: 12px; font-size: 13px; }
.api-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.api-status-dot.connected { background: var(--success); }
.api-status-text { color: var(--muted); }

.side-nav-actions { display: flex; gap: 8px; margin-bottom: 12px; }
.icon-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); color: var(--muted); transition: all 0.15s; position: relative; }
.icon-btn:hover { background: var(--bg); color: var(--accent); }
.api-key-indicator { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; background: var(--success); border-radius: 50%; }
.api-key-indicator[hidden] { display: none; }

.social-links { display: flex; gap: 8px; }
.social-links a { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); color: var(--muted); transition: all 0.15s; }
.social-links a:hover { background: var(--bg); color: var(--accent); text-decoration: none; }

.main-content { flex: 1; margin-left: var(--side-nav-width); display: flex; flex-direction: column; transition: margin-left 0.2s ease; overflow-x: hidden; max-width: calc(100vw - var(--side-nav-width)); }
.side-nav.collapsed ~ .main-content { margin-left: var(--side-nav-collapsed); max-width: calc(100vw - var(--side-nav-collapsed)); }

.top-bar { position: sticky; top: 0; height: var(--top-bar-height); background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 16px; padding: 0 24px; z-index: 50; }
.mobile-menu-btn { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: var(--radius-sm); color: var(--muted); }

.breadcrumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.breadcrumb-item { color: var(--muted); transition: color 0.15s; }
.breadcrumb-item:hover { color: var(--accent); text-decoration: none; }
.breadcrumb-item.active { color: var(--text); font-weight: 500; cursor: default; }
.breadcrumb-separator { color: var(--border); font-size: 12px; }
.breadcrumbs::after { content: none; }

.search-trigger { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--muted); font-size: 14px; margin-left: auto; transition: all 0.15s; }
.search-trigger:hover { border-color: var(--accent); }
.search-trigger kbd { background: var(--surface); border: 1px solid var(--border); padding: 2px 6px; border-radius: 4px; font-size: 11px; }

.stats-bar { display: flex; align-items: center; gap: 16px; }
.stat-item { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.xp-display { display: flex; align-items: center; gap: 8px; }
.xp-level { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; background: var(--accent); color: white; font-size: 12px; font-weight: 700; border-radius: 50%; }
.xp-bar { width: 60px; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.xp-bar-fill { height: 100%; background: var(--accent); transition: width 0.3s; }

.content-area { flex: 1; padding: 24px; }
.panel, .toolbar-panel { display: none; }
.panel.active, .toolbar-panel.active { display: block; }

.panel-header { margin-bottom: 24px; }
.panel-header h2 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.panel-header p { color: var(--muted); }

.hero-section { text-align: center; padding: 48px 24px; margin-bottom: 32px; }
.hero-title { font-size: 36px; font-weight: 700; margin-bottom: 12px; background: linear-gradient(135deg, var(--accent), var(--accent-hover)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-subtitle { font-size: 18px; color: var(--muted); max-width: 500px; margin: 0 auto 32px; }
.hero-stats { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat-value { display: block; font-size: 32px; font-weight: 700; color: var(--accent); }
.hero-stat-label { font-size: 14px; color: var(--muted); }

.bento-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.appendix-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; cursor: pointer; transition: all 0.2s; position: relative; overflow: hidden; }
.appendix-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.appendix-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--accent); opacity: 0; transition: opacity 0.2s; }
.appendix-card:hover::before { opacity: 1; }

.appendix-card-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.appendix-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-size: 18px; font-weight: 700; border-radius: var(--radius-sm); }
.appendix-card-info { flex: 1; }
.appendix-letter { font-size: 12px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.5px; }
.appendix-title { font-size: 16px; font-weight: 600; color: var(--text); line-height: 1.4; }

.appendix-card-body { margin-bottom: 16px; }
.appendix-stats { display: flex; gap: 16px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.appendix-progress { height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.appendix-progress-bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-hover)); border-radius: 3px; transition: width 0.3s; }

.appendix-cta { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; border-top: 1px solid var(--border); }
.appendix-status { font-size: 14px; font-weight: 600; color: var(--accent); }
.difficulty-badge { font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 4px; text-transform: uppercase; }
.difficulty-badge.easy { background: #dcfce7; color: #166534; }
.difficulty-badge.medium { background: #fef3c7; color: #92400e; }
.difficulty-badge.hard { background: #fee2e2; color: #991b1b; }

.quiz-view { display: none; }
.quiz-view[style*="display: block"], .quiz-view:not([style*="display: none"]):not([style]) { display: block; }

.quiz-toolbar { display: flex; align-items: center; gap: 16px; padding: 16px 0; margin-bottom: 24px; flex-wrap: wrap; }
.back-btn { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-secondary); font-weight: 500; transition: all 0.15s; }
.back-btn:hover { border-color: var(--accent); color: var(--accent); }

.quiz-filters { display: flex; gap: 12px; flex: 1; }
.filter-select { padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); min-width: 150px; }
.filter-select:focus { outline: none; border-color: var(--accent); }
.search-box { flex: 1; max-width: 300px; }
.search-box input { width: 100%; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); }
.search-box input:focus { outline: none; border-color: var(--accent); }

.quiz-actions { display: flex; gap: 8px; }
.mode-toggle { display: flex; background: var(--bg); border-radius: var(--radius-sm); padding: 4px; }
.mode-btn { padding: 8px 16px; border-radius: 6px; font-size: 14px; font-weight: 500; color: var(--muted); transition: all 0.15s; }
.mode-btn.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.action-btn { display: flex; align-items: center; gap: 6px; padding: 10px 16px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-secondary); font-weight: 500; transition: all 0.15s; }
.action-btn:hover { border-color: var(--accent); color: var(--accent); }
.action-btn.primary { background: var(--accent); border-color: var(--accent); color: white; }
.action-btn.primary:hover { background: var(--accent-hover); }
.action-btn.danger { background: var(--danger); border-color: var(--danger); color: white; }

.quiz-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; }
.quiz-main { min-width: 0; }

.ai-tutor-sidebar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; position: sticky; top: calc(var(--top-bar-height) + 24px); max-height: calc(100vh - var(--top-bar-height) - 48px); overflow-y: auto; }
.tutor-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.tutor-header h3 { font-size: 16px; font-weight: 600; }
.tutor-badge { font-size: 11px; font-weight: 600; padding: 4px 8px; background: var(--accent-soft); color: var(--accent); border-radius: 4px; }
.tutor-content { min-height: 200px; margin-bottom: 16px; }
.tutor-placeholder { text-align: center; padding: 40px 20px; color: var(--muted); }
.tutor-actions { display: flex; gap: 8px; }
.tutor-btn { flex: 1; padding: 10px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); font-weight: 500; color: var(--text-secondary); transition: all 0.15s; }
.tutor-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.tutor-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.quiz-nav-fixed { position: fixed; bottom: 0; left: var(--side-nav-width); right: 0; background: var(--surface); border-top: 1px solid var(--border); padding: 12px 24px; display: flex; align-items: center; justify-content: center; gap: 12px; z-index: 40; }
.quiz-nav-btn { padding: 10px 20px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); font-weight: 500; color: var(--text-secondary); transition: all 0.15s; }
.quiz-nav-btn:hover { border-color: var(--accent); color: var(--accent); }
.quiz-nav-btn.primary { background: var(--accent); border-color: var(--accent); color: white; }
.quiz-nav-btn.flag { color: var(--warning); }
.quiz-nav-info { font-size: 14px; color: var(--muted); padding: 0 16px; }

.question-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.question-card.correct { border-color: var(--success); }
.question-card.incorrect { border-color: var(--danger); }
.question-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.question-number { font-size: 13px; font-weight: 600; color: var(--muted); }
.question-text { font-size: 16px; font-weight: 500; line-height: 1.6; margin-bottom: 20px; }

.options-container { display: flex; flex-direction: column; gap: 10px; }
.option { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: all 0.15s; }
.option:hover { border-color: var(--accent); background: var(--accent-soft); }
.option.selected { border-color: var(--accent); background: var(--accent-soft); }
.option.correct { border-color: var(--success); background: rgba(16,185,129,0.1); }
.option.incorrect { border-color: var(--danger); background: rgba(239,68,68,0.1); }
.option-letter { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border); border-radius: 50%; font-size: 13px; font-weight: 600; color: var(--text-secondary); flex-shrink: 0; }
.option.selected .option-letter { background: var(--accent); border-color: var(--accent); color: white; }
.option-text { flex: 1; font-size: 15px; line-height: 1.5; }

.question-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.question-btn { display: flex; align-items: center; gap: 6px; padding: 8px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; color: var(--text-secondary); transition: all 0.15s; }
.question-btn:hover { border-color: var(--accent); color: var(--accent); }

.answer-explanation { margin-top: 16px; padding: 16px; background: var(--bg); border-radius: var(--radius-sm); border-left: 3px solid var(--accent); display: none; }
.answer-explanation.show { display: block; }
.answer-explanation.loading { color: var(--muted); font-style: italic; }
.answer-explanation.correct-explanation { border-left-color: var(--success); background: rgba(16,185,129,0.05); }
.answer-explanation.incorrect-explanation { border-left-color: var(--danger); background: rgba(239,68,68,0.05); }
.answer-explanation h4 { font-size: 14px; font-weight: 600; color: var(--accent); margin-bottom: 8px; }
.answer-explanation p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* Dynamic quiz question card styles */
.question-card-text { font-size: 16px; font-weight: 500; line-height: 1.6; margin-bottom: 20px; color: var(--text); }
.question-card-options { display: flex; flex-direction: column; gap: 10px; }
.option-tile { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: all 0.15s; }
.option-tile:hover { border-color: var(--accent); background: var(--accent-soft); }
.option-tile.answered { pointer-events: none; }
.option-tile.correct { border-color: var(--success); background: rgba(16,185,129,0.1); }
.option-tile.incorrect { border-color: var(--danger); background: rgba(239,68,68,0.1); }
.option-tile .option-letter { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border); border-radius: 50%; font-size: 13px; font-weight: 600; color: var(--text-secondary); flex-shrink: 0; }
.option-tile.correct .option-letter { background: var(--success); border-color: var(--success); color: white; }
.option-tile.incorrect .option-letter { background: var(--danger); border-color: var(--danger); color: white; }
.option-tile .option-text { flex: 1; font-size: 15px; line-height: 1.5; color: var(--text); }

/* Question card header and actions */
.question-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; flex-wrap: nowrap; }
.question-card-badge { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--bg); padding: 4px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.question-number-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; background: var(--accent); color: white; font-size: 12px; font-weight: 600; border-radius: var(--radius-sm); flex-shrink: 0; }
.question-card-actions { display: flex; gap: 8px; }

/* Gemini AI explain button */
.gemini-btn { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: all 0.15s; }
.gemini-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.gemini-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.gemini-btn svg { width: 20px; height: 20px; }

/* Flag button */
.flag-btn { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: all 0.15s; color: var(--text-secondary); }
.flag-btn:hover { border-color: var(--warning); color: var(--warning); }
.flag-btn.flagged { background: var(--warning); border-color: var(--warning); color: white; }

/* Question card answered states */
.question-card.answered-correct { border-color: var(--success); }
.question-card.answered-incorrect { border-color: var(--danger); }

.review-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.review-stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; text-align: center; }
.review-stat-value { display: block; font-size: 36px; font-weight: 700; color: var(--accent); }
.review-stat-label { font-size: 14px; color: var(--muted); }
.review-actions { display: flex; gap: 12px; margin-bottom: 24px; }
.review-list { display: flex; flex-direction: column; gap: 12px; }

.insights-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.insight-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.insight-card.large { grid-column: span 2; }
.insight-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.category-breakdown { display: flex; flex-direction: column; gap: 12px; }
.weak-areas { min-height: 100px; }
.placeholder-text { color: var(--muted); font-size: 14px; }
.study-time-display { text-align: center; padding: 20px; }
.study-time-value { font-size: 32px; font-weight: 700; color: var(--accent); }
.stats-summary { display: flex; flex-direction: column; gap: 12px; }
.stat-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.stat-row:last-child { border-bottom: none; }

.progress-overview { display: flex; align-items: center; gap: 48px; margin-bottom: 32px; flex-wrap: wrap; }
.progress-ring-container { position: relative; width: 120px; height: 120px; }
.progress-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.progress-ring-bg { fill: none; stroke: var(--border); stroke-width: 8; }
.progress-ring-fill { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 339.292; stroke-dashoffset: 339.292; transition: stroke-dashoffset 0.5s; }
.progress-ring-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.progress-ring-value { display: block; font-size: 24px; font-weight: 700; color: var(--accent); }
.progress-ring-label { font-size: 12px; color: var(--muted); }
.progress-details { flex: 1; }
.progress-detail-item { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.progress-detail-item:last-child { border-bottom: none; }
.detail-label { color: var(--muted); }
.detail-value { font-weight: 600; }
.progress-grid { margin-bottom: 24px; }
.progress-actions { padding-top: 24px; border-top: 1px solid var(--border); }

.mobile-nav-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 90; }
.mobile-nav-overlay[hidden] { display: none; }

.chatbot-toggle { position: fixed; bottom: 24px; right: 24px; display: flex; align-items: center; gap: 8px; padding: 12px 20px; background: var(--accent); color: white; border-radius: 50px; box-shadow: var(--shadow-lg); z-index: 80; transition: all 0.2s; }
.chatbot-toggle:hover { transform: scale(1.05); }
.chatbot-label { font-weight: 500; }

.chatbot-panel { position: fixed; bottom: 90px; right: 24px; width: 380px; height: 500px; max-height: calc(100vh - 120px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); display: none; flex-direction: column; z-index: 80; overflow: hidden; }
.chatbot-panel.open { display: flex; }
.chatbot-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--border); }
.chatbot-identity { display: flex; align-items: center; gap: 12px; }
.chatbot-avatar { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); border-radius: 50%; }
.chatbot-title { font-weight: 600; margin: 0; }
.chatbot-subtitle { font-size: 12px; color: var(--muted); }
.chatbot-close { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--muted); border-radius: var(--radius-sm); }
.chatbot-close:hover { background: var(--bg); }
.chatbot-welcome { padding: 16px; background: var(--bg); text-align: center; color: var(--muted); font-size: 14px; }
.chat-suggestions { display: flex; flex-wrap: nowrap; gap: 8px; padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--border); overflow-x: auto; flex: 0 0 auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.chat-suggestions::-webkit-scrollbar { height: 4px; }
.chat-suggestions::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.chat-suggestion-chip { padding: 6px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; font-size: 12px; color: var(--text); cursor: pointer; transition: all 0.15s; white-space: nowrap; flex-shrink: 0; }
.chat-suggestion-chip:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.chat-input-row { display: flex; gap: 8px; padding: 16px; border-top: 1px solid var(--border); }
.chat-input { flex: 1; padding: 10px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); resize: none; }
.chat-input:focus { outline: none; border-color: var(--accent); }
.chat-send { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: var(--accent); color: white; border-radius: var(--radius-sm); transition: all 0.15s; }
.chat-send:hover { background: var(--accent-hover); }
.chat-send.pause-mode { background: var(--danger, #dc3545); }
.chat-send.pause-mode:hover { background: #c82333; }

.chat-message-wrapper { display: flex; align-items: flex-start; gap: 8px; max-width: 85%; }
.chat-message-wrapper.user { flex-direction: row-reverse; margin-left: auto; }
.chat-message-wrapper.assistant { flex-direction: row; margin-right: auto; }

.chat-icon { width: 28px; height: 28px; min-width: 28px; display: flex; align-items: center; justify-content: center; border-radius: 50%; flex-shrink: 0; }
.chat-message-wrapper.user .chat-icon { background: var(--accent); color: white; }
.chat-message-wrapper.assistant .chat-icon { background: var(--accent-soft); color: var(--accent); }

.chat-bubble { padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5; word-wrap: break-word; white-space: pre-wrap; }
.chat-message-wrapper.user .chat-bubble { background: var(--accent); color: white; border-bottom-right-radius: 4px; }
.chat-message-wrapper.assistant .chat-bubble { background: var(--bg); color: var(--text); border-bottom-left-radius: 4px; }

.chat-message-wrapper.typing-indicator .chat-bubble { min-width: 50px; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; z-index: 200; padding: 24px; }
.modal-overlay[aria-hidden="false"] { display: flex; }
.modal { background: var(--surface); border-radius: var(--radius-lg); width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; }
.modal.modal-large { max-width: 720px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-header h2 { font-size: 18px; font-weight: 600; margin: 0; }
.modal-close { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--muted); border-radius: var(--radius-sm); }
.modal-close:hover { background: var(--bg); }
.modal-body { padding: 24px; }
.modal-actions { display: flex; gap: 12px; margin-top: 20px; }

.config-group { margin-bottom: 16px; }
.config-group label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.config-group select, .config-group input { width: 100%; padding: 10px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); }
.config-group select:focus, .config-group input:focus { outline: none; border-color: var(--accent); }
.config-group .input-hint { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.api-key-status.error { background: rgba(239, 68, 68, 0.1); color: var(--error); }

.btn-primary { display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; background: var(--accent); color: white; border-radius: var(--radius-sm); font-weight: 500; transition: all 0.15s; border: none; cursor: pointer; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; background: var(--bg); border: 1px solid var(--border); color: var(--text-secondary); border-radius: var(--radius-sm); font-weight: 500; transition: all 0.15s; cursor: pointer; }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.exam-config { display: flex; flex-direction: column; gap: 16px; }
.exam-progress { text-align: center; padding: 20px; }
.exam-timer { font-size: 48px; font-weight: 700; color: var(--accent); margin-bottom: 16px; }
.exam-stats { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.exam-progress-bar { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.exam-progress-fill { height: 100%; background: var(--accent); transition: width 0.3s; }
.exam-results { text-align: center; }
.results-score { margin: 24px 0; }
.score-value { display: block; font-size: 64px; font-weight: 700; color: var(--accent); }
.score-label { font-size: 14px; color: var(--muted); }
.results-breakdown { display: flex; justify-content: center; gap: 32px; margin-bottom: 24px; }
.breakdown-item { text-align: center; }
.breakdown-value { display: block; font-size: 24px; font-weight: 700; }
.breakdown-label { font-size: 12px; color: var(--muted); }

.api-key-note { margin-top: 16px; font-size: 13px; color: var(--muted); }

.analytics-tabs { display: flex; gap: 4px; margin-bottom: 20px; background: var(--bg); padding: 4px; border-radius: var(--radius-sm); }
.analytics-tab { flex: 1; padding: 10px; text-align: center; font-weight: 500; color: var(--muted); border-radius: 6px; transition: all 0.15s; }
.analytics-tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.analytics-content { min-height: 200px; }
.analytics-panel { display: none; }
.analytics-panel.active { display: block; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.stat-card { background: var(--bg); border-radius: var(--radius-sm); padding: 20px; text-align: center; }
.stat-card .stat-value { display: block; font-size: 28px; font-weight: 700; color: var(--accent); }
.stat-card .stat-label { font-size: 13px; color: var(--muted); }
.trend-chart { height: 200px; background: var(--bg); border-radius: var(--radius-sm); }

/* Enhanced Toast Notification System */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 300; display: flex; flex-direction: column; gap: 12px; max-width: 380px; }
.toast { display: flex; align-items: flex-start; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); transform: translateX(120%); opacity: 0; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; }
.toast.show { transform: translateX(0); opacity: 1; }
.toast:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.15); }

/* Toast Icon Wrapper */
.toast-icon-wrapper { position: relative; flex-shrink: 0; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }
.toast-icon { width: 24px; height: 24px; stroke: var(--text-secondary); }

/* Toast Content */
.toast-content { flex: 1; min-width: 0; }
.toast-title { font-weight: 600; font-size: 14px; color: var(--text); margin-bottom: 2px; }
.toast-message { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
.toast-action { margin-top: 8px; padding: 6px 12px; background: var(--accent); color: white; border: none; border-radius: var(--radius-sm); font-size: 12px; font-weight: 500; cursor: pointer; transition: background 0.15s; }
.toast-action:hover { background: var(--accent-hover); }

/* Toast Close Button */
.toast-close { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; padding: 0; background: none; border: none; cursor: pointer; opacity: 0.5; transition: opacity 0.15s; }
.toast-close:hover { opacity: 1; }
.toast-close svg { width: 14px; height: 14px; stroke: var(--text-secondary); }

/* Toast Variants */
.toast-success { border-left: 3px solid var(--success); }
.toast-success .toast-icon { stroke: var(--success); }
.toast-success .success-circle { stroke-dasharray: 63; stroke-dashoffset: 63; animation: drawCircle 0.5s ease forwards; }
.toast-success .success-check { stroke-dasharray: 20; stroke-dashoffset: 20; animation: drawCheck 0.3s ease 0.4s forwards; }
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }

.toast-error { border-left: 3px solid var(--danger); }
.toast-error .toast-icon { stroke: var(--danger); }
.toast-error .error-x { stroke-dasharray: 10; stroke-dashoffset: 10; animation: drawX 0.2s ease forwards; }
.toast-error .error-x:nth-child(2) { animation-delay: 0.1s; }
@keyframes drawX { to { stroke-dashoffset: 0; } }
.toast.toast-error { animation: toastShake 0.4s ease; }
@keyframes toastShake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.toast.toast-error.show { animation: toastShake 0.4s ease; }

/* Badge Toast - Star with Sparkles */
.toast-badge { border-left: 3px solid #f59e0b; background: linear-gradient(135deg, var(--surface), rgba(245, 158, 11, 0.05)); }
.toast-badge .toast-icon { stroke: #f59e0b; }
.toast-badge .badge-star { fill: #f59e0b; stroke: #f59e0b; transform-origin: center; animation: starPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55); }
@keyframes starPop { 0% { transform: scale(0) rotate(-30deg); opacity: 0; } 50% { transform: scale(1.2) rotate(10deg); } 100% { transform: scale(1) rotate(0deg); opacity: 1; } }
.toast-sparkles { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; pointer-events: none; }
.sparkle { position: absolute; width: 6px; height: 6px; background: #f59e0b; border-radius: 50%; opacity: 0; }
.sparkle.s1 { animation: sparkleOut 0.8s ease 0.3s forwards; top: 0; left: 50%; }
.sparkle.s2 { animation: sparkleOut 0.8s ease 0.4s forwards; top: 50%; right: 0; }
.sparkle.s3 { animation: sparkleOut 0.8s ease 0.5s forwards; bottom: 0; left: 50%; }
.sparkle.s4 { animation: sparkleOut 0.8s ease 0.6s forwards; top: 50%; left: 0; }
@keyframes sparkleOut { 0% { transform: translate(-50%, -50%) scale(0); opacity: 1; } 50% { opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1) translateY(-15px); opacity: 0; } }

/* Level Up Toast - Ring Animation */
.toast-levelup { border-left: 3px solid var(--accent); background: linear-gradient(135deg, var(--surface), rgba(99, 102, 241, 0.05)); }
.toast-levelup .toast-icon { stroke: var(--accent); }
.toast-levelup .levelup-ring { stroke-dasharray: 63; stroke-dashoffset: 63; animation: ringDraw 0.8s ease forwards; }
.toast-levelup .levelup-arrow { stroke-dasharray: 20; stroke-dashoffset: 20; animation: arrowDraw 0.4s ease 0.5s forwards; }
@keyframes ringDraw { to { stroke-dashoffset: 0; } }
@keyframes arrowDraw { to { stroke-dashoffset: 0; } }
.toast-glow { position: absolute; top: 50%; left: 50%; width: 50px; height: 50px; background: radial-gradient(circle, rgba(99, 102, 241, 0.3), transparent 70%); border-radius: 50%; transform: translate(-50%, -50%); animation: glowPulse 1.5s ease infinite; pointer-events: none; }
@keyframes glowPulse { 0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.3); } }

/* Streak Toast - Flame Animation */
.toast-streak { border-left: 3px solid #ef4444; background: linear-gradient(135deg, var(--surface), rgba(239, 68, 68, 0.05)); }
.toast-streak .toast-icon { stroke: #ef4444; }
.toast-streak .flame-outer { fill: rgba(239, 68, 68, 0.2); stroke: #ef4444; animation: flameFlicker 0.5s ease infinite alternate; transform-origin: bottom center; }
.toast-streak .flame-inner { fill: #fbbf24; stroke: #fbbf24; animation: flameFlicker 0.3s ease infinite alternate-reverse; transform-origin: bottom center; }
@keyframes flameFlicker { 0% { transform: scaleY(1) scaleX(1); } 100% { transform: scaleY(1.1) scaleX(0.95); } }

/* Confetti Animation */
.toast-confetti { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; overflow: hidden; }
.confetti { position: absolute; width: 8px; height: 8px; opacity: 0; }
.confetti.c1 { background: #f59e0b; top: 50%; left: 20%; animation: confettiFall 1s ease forwards 0.1s; border-radius: 2px; }
.confetti.c2 { background: var(--accent); top: 50%; left: 40%; animation: confettiFall 1s ease forwards 0.2s; border-radius: 50%; }
.confetti.c3 { background: var(--success); top: 50%; left: 60%; animation: confettiFall 1s ease forwards 0.15s; }
.confetti.c4 { background: #ec4899; top: 50%; left: 80%; animation: confettiFall 1s ease forwards 0.25s; border-radius: 2px; }
.confetti.c5 { background: #8b5cf6; top: 50%; left: 30%; animation: confettiFall 1s ease forwards 0.3s; border-radius: 50%; }
.confetti.c6 { background: #06b6d4; top: 50%; left: 70%; animation: confettiFall 1s ease forwards 0.35s; }
@keyframes confettiFall { 0% { transform: translateY(0) rotate(0deg) scale(0); opacity: 1; } 50% { opacity: 1; } 100% { transform: translateY(-60px) rotate(360deg) scale(1); opacity: 0; } }

/* Reduced motion support for toasts */
@media (prefers-reduced-motion: reduce) {
    .toast { transition: opacity 0.2s; }
    .toast.show { transform: translateX(0); }
    .toast-success .success-circle, .toast-success .success-check,
    .toast-error .error-x, .toast-badge .badge-star,
    .toast-levelup .levelup-ring, .toast-levelup .levelup-arrow,
    .toast-streak .flame-outer, .toast-streak .flame-inner,
    .sparkle, .confetti, .toast-glow { animation: none; }
    .toast-success .success-circle, .toast-success .success-check,
    .toast-error .error-x, .toast-levelup .levelup-ring,
    .toast-levelup .levelup-arrow { stroke-dashoffset: 0; }
    .toast-badge .badge-star { transform: scale(1); opacity: 1; }
}
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.back-to-top { position: fixed; bottom: 24px; left: 24px; width: 44px; height: 44px; display: none; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border); border-radius: 50%; color: var(--muted); box-shadow: var(--shadow); z-index: 70; transition: all 0.15s; }
.back-to-top:hover { color: var(--accent); border-color: var(--accent); }
.back-to-top.visible { display: flex; }

.p2p-status { position: fixed; bottom: 24px; left: 80px; display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; font-size: 12px; color: var(--muted); z-index: 70; }
.p2p-icon { color: var(--success); }

.command-palette-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: none; align-items: flex-start; justify-content: center; padding-top: 15vh; z-index: 300; }
.command-palette-overlay:not([hidden]) { display: flex; }
.command-palette { width: 100%; max-width: 560px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.command-palette-header { display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--border); }
.command-palette-header input { flex: 1; background: none; border: none; font-size: 16px; color: var(--text); }
.command-palette-header input:focus { outline: none; }
.command-palette-header kbd { background: var(--bg); border: 1px solid var(--border); padding: 4px 8px; border-radius: 4px; font-size: 12px; color: var(--muted); }
.command-palette-results { max-height: 400px; overflow-y: auto; }
.command-group { padding: 8px; }
.command-group-title { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; padding: 8px 12px; }
.command-item { display: block; width: 100%; text-align: left; padding: 12px 16px; border-radius: var(--radius-sm); color: var(--text); transition: all 0.15s; }
.command-item:hover { background: var(--accent-soft); color: var(--accent); }

@media (max-width: 1024px) {
    .quiz-layout { grid-template-columns: 1fr; }
    .ai-tutor-sidebar { position: static; max-height: none; }
    .insight-card.large { grid-column: span 1; }
}

@media (max-width: 768px) {
    .side-nav { transform: translateX(-100%); width: 280px; }
    .side-nav.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .mobile-menu-btn { display: flex; }
    .top-bar { padding: 0 16px; }
    .search-trigger span, .search-trigger kbd { display: none; }
    .stats-bar { display: none; }
    .content-area { padding: 16px; }
    .hero-section { padding: 24px 16px; margin-bottom: 20px; }
    .hero-title { font-size: 24px; line-height: 1.3; }
    .hero-subtitle { font-size: 15px; margin-bottom: 16px; }
    .hero-stat-value { font-size: 20px; }
    .hero-stat-label { font-size: 11px; }
    .hero-credits { font-size: 12px; }
    .bento-grid { grid-template-columns: 1fr; }
    .quiz-toolbar { flex-direction: column; align-items: stretch; }
    .quiz-filters { flex-direction: column; }
    .search-box { max-width: none; }
    .quiz-nav-fixed { left: 0; padding: 12px 16px; }
    .chatbot-panel { right: 16px; left: 16px; width: auto; bottom: 80px; }
    .chatbot-toggle { right: 16px; bottom: 16px; }
    .progress-overview { flex-direction: column; gap: 24px; }
    .appendix-grid { grid-template-columns: 1fr; }
    /* Practice page hero - compact on mobile */
    .appendix-hero { padding: 16px; margin-bottom: 16px; }
    .appendix-hero h1 { font-size: 24px; margin-bottom: 6px; }
    .appendix-hero p { font-size: 14px; margin-bottom: 12px; }
    .appendix-hero .hero-stats { display: flex; flex-direction: row; gap: 24px; margin-bottom: 12px; }
    .appendix-hero .hero-stat { text-align: center; }
    .hero-credits { margin-top: 8px; }
}

/* Small Mobile - 480px */
@media (max-width: 480px) {
    .hero-section { padding: 16px 12px; margin-bottom: 16px; }
    .hero-title { font-size: 20px; }
    .hero-subtitle { font-size: 14px; margin-bottom: 12px; max-width: 100%; }
    .hero-stat-value { font-size: 16px; }
    .hero-stat-label { font-size: 10px; }
    .hero-credits { font-size: 11px; }
    .credit-separator { display: inline; }
    /* Practice page hero - even more compact on small mobile */
    .appendix-hero { padding: 12px; margin-bottom: 12px; }
    .appendix-hero h1 { font-size: 20px; }
    .appendix-hero p { font-size: 13px; margin-bottom: 10px; }
    .appendix-hero .hero-stats { gap: 16px; margin-bottom: 10px; }
    .appendix-card { padding: 16px; }
    .appendix-icon { width: 40px; height: 40px; font-size: 16px; }
    .appendix-title { font-size: 14px; }
    .appendix-stats { gap: 16px; flex-wrap: wrap; }
}

.appendix-selection { padding: 24px; }
.appendix-hero { background: linear-gradient(135deg, var(--accent-soft) 0%, var(--surface) 100%); border-radius: var(--radius-lg); padding: 48px; margin-bottom: 32px; text-align: center; }
.appendix-hero h1 { font-size: 32px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.appendix-hero p { color: var(--text-secondary); font-size: 16px; margin-bottom: 24px; }
.hero-stats { display: flex; justify-content: center; gap: 48px; margin-bottom: 24px; }
.hero-stat { text-align: center; }
.hero-stat-value { display: block; font-size: 28px; font-weight: 700; color: var(--accent); }
.hero-stat-label { font-size: 14px; color: var(--muted); }
.hero-credits { font-size: 13px; color: var(--muted); }
.hero-credits a { color: var(--accent); }
.credit-separator { margin: 0 8px; opacity: 0.5; }

.appendix-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.loading-appendices { text-align: center; padding: 48px; color: var(--muted); }
.appendix-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; cursor: pointer; transition: all 0.2s ease; }
.appendix-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.appendix-card-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.appendix-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); border-radius: var(--radius-sm); font-size: 20px; font-weight: 700; flex-shrink: 0; }
.appendix-icon.completed { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.appendix-card-info { flex: 1; min-width: 0; }
.appendix-letter { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; margin-bottom: 4px; }
.appendix-title { font-size: 16px; font-weight: 600; color: var(--text); line-height: 1.4; }
.appendix-card-body { }
.appendix-stats { display: flex; gap: 24px; margin-bottom: 12px; }
.appendix-stat { font-size: 13px; color: var(--text-secondary); }
.appendix-stat strong { color: var(--text); font-weight: 600; }
.appendix-progress { height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; margin-bottom: 16px; }
.appendix-progress-bar { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.3s ease; }
.appendix-cta { display: flex; align-items: center; justify-content: space-between; }
.appendix-status { font-size: 14px; font-weight: 500; color: var(--accent); }
.appendix-status.preloaded { color: var(--success); }
.appendix-arrow { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; color: var(--muted); transition: transform 0.2s; }
.appendix-card:hover .appendix-arrow { transform: translateX(4px); color: var(--accent); }

.quiz-header-pagination { display: flex; align-items: center; gap: 16px; padding: 16px 24px; background: var(--surface); border-bottom: 1px solid var(--border); margin: -24px -24px 24px -24px; flex-wrap: wrap; }
.back-to-selection, .back-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; color: var(--text-secondary); cursor: pointer; transition: all 0.15s; }
.back-to-selection:hover, .back-btn:hover { border-color: var(--accent); color: var(--accent); }
.appendix-quiz-title { font-size: 18px; font-weight: 600; color: var(--text); flex: 1; }
.pagination-info { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--muted); }
.page-counter { font-weight: 500; }
.chunk-progress { opacity: 0.7; }
.exhausted-badge { background: var(--success); color: white; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }

.streaming-indicator { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--accent-soft); border-radius: var(--radius-sm); margin-bottom: 16px; }
.streaming-pulse { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } }
.streaming-text { font-size: 14px; color: var(--accent); font-weight: 500; }
.continuous-generation-indicator { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--accent-soft); border-radius: var(--radius-sm); margin-top: 16px; }
.continuous-generation-indicator.hidden { display: none; }

.questions-container { display: flex; flex-direction: column; gap: 20px; }
.questions-container.flat-list { }

.next-page-container { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 32px; background: var(--bg); border-radius: var(--radius); margin-top: 24px; }
.next-page-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; background: var(--accent); color: white; border: none; border-radius: var(--radius-sm); font-size: 15px; font-weight: 500; cursor: pointer; transition: all 0.15s; }
.next-page-btn:hover { background: var(--accent-hover); }
.next-page-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.progress-note { font-size: 13px; color: var(--muted); }
.completion-message { text-align: center; padding: 32px; background: rgba(16, 185, 129, 0.1); border: 1px solid var(--success); border-radius: var(--radius); margin-top: 24px; }
.completion-message h3 { font-size: 18px; font-weight: 600; color: var(--success); margin-bottom: 8px; }
.completion-message p { color: var(--text-secondary); }

.generation-progress { padding: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-align: center; }
.generation-progress h2 { font-size: 20px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.generation-progress .appendix-subtitle { color: var(--text-secondary); margin-bottom: 24px; font-size: 15px; }
.generation-info { color: var(--text-secondary); margin-bottom: 16px; }
.progress-bar-container { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; margin-bottom: 16px; position: relative; }
.progress-bar-container .progress-bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--success)); border-radius: 4px; transition: width 0.3s ease; position: relative; }
.progress-bar-container .progress-bar::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); animation: shimmer 1.5s infinite; }
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.streaming-hint { font-size: 13px; color: var(--muted); margin-top: 16px; }
.status-text { font-size: 14px; color: var(--accent); font-weight: 500; margin-bottom: 8px; }

/* AI Neural Network Loader */
.ai-loader { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-bottom: 24px; }
.neural-network { overflow: visible; }
.neural-network .node { fill: var(--accent); opacity: 0.3; animation: nodePulse 2s ease-in-out infinite; }
.neural-network .node-1 { animation-delay: 0s; }
.neural-network .node-2 { animation-delay: 0.2s; }
.neural-network .node-3 { animation-delay: 0.4s; }
.neural-network .node-4 { animation-delay: 0.6s; }
.neural-network .node-5 { animation-delay: 0.8s; }
.neural-network .node-6 { animation-delay: 1s; fill: var(--success); }
@keyframes nodePulse { 0%, 100% { opacity: 0.3; transform: scale(1); } 50% { opacity: 1; transform: scale(1.1); } }
.neural-network .connection { stroke: var(--border); stroke-width: 2; stroke-dasharray: 4 4; animation: connectionFlow 1.5s linear infinite; }
.neural-network .c1 { animation-delay: 0s; }
.neural-network .c2 { animation-delay: 0.1s; }
.neural-network .c3 { animation-delay: 0.2s; }
.neural-network .c4 { animation-delay: 0.3s; }
.neural-network .c5 { animation-delay: 0.4s; }
.neural-network .c6 { animation-delay: 0.5s; }
.neural-network .c7 { animation-delay: 0.6s; }
.neural-network .c8 { animation-delay: 0.7s; }
@keyframes connectionFlow { 0% { stroke-dashoffset: 0; stroke: var(--border); } 50% { stroke: var(--accent); } 100% { stroke-dashoffset: -16; stroke: var(--border); } }
.neural-network .particle { fill: var(--accent); opacity: 0; }
.neural-network .p1 { animation: particleMove1 2s ease-in-out infinite; }
.neural-network .p2 { animation: particleMove2 2s ease-in-out infinite 0.3s; }
.neural-network .p3 { animation: particleMove3 2s ease-in-out infinite 0.6s; }
@keyframes particleMove1 { 0% { opacity: 0; cx: 38; cy: 30; } 20% { opacity: 1; } 50% { cx: 90; cy: 45; } 80% { opacity: 1; } 100% { opacity: 0; cx: 158; cy: 60; } }
@keyframes particleMove2 { 0% { opacity: 0; cx: 38; cy: 60; } 20% { opacity: 1; } 50% { cx: 90; cy: 75; } 80% { opacity: 1; } 100% { opacity: 0; cx: 158; cy: 60; } }
@keyframes particleMove3 { 0% { opacity: 0; cx: 38; cy: 90; } 20% { opacity: 1; } 50% { cx: 90; cy: 45; } 80% { opacity: 1; } 100% { opacity: 0; cx: 158; cy: 60; } }
.ai-loader-text { display: flex; align-items: center; gap: 4px; }
.ai-status { font-size: 14px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; }
.ai-dots span { display: inline-block; animation: dotBounce 1.4s ease-in-out infinite; font-weight: bold; color: var(--accent); }
.ai-dots span:nth-child(1) { animation-delay: 0s; }
.ai-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-4px); } }

/* Generation Stages Pipeline */
.generation-stages { display: flex; justify-content: center; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.generation-stages .stage { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--bg); border-radius: var(--radius-sm); font-size: 13px; color: var(--muted); transition: all 0.3s ease; position: relative; }
.generation-stages .stage::after { content: ''; position: absolute; right: -8px; width: 8px; height: 2px; background: var(--border); }
.generation-stages .stage:last-child::after { display: none; }
.generation-stages .stage.active { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.generation-stages .stage.active svg { animation: stageIconSpin 1s linear infinite; }
.generation-stages .stage.completed { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.generation-stages .stage.completed svg { animation: none; }
@keyframes stageIconSpin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Enhanced Streaming Indicator */
.streaming-indicator { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: linear-gradient(135deg, var(--accent-soft), rgba(99, 102, 241, 0.05)); border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid rgba(99, 102, 241, 0.2); }
.streaming-pulse { width: 10px; height: 10px; background: var(--accent); border-radius: 50%; animation: streamPulse 1.5s ease-in-out infinite; box-shadow: 0 0 8px var(--accent); }
@keyframes streamPulse { 0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 8px var(--accent); } 50% { opacity: 0.6; transform: scale(0.8); box-shadow: 0 0 16px var(--accent); } }
.streaming-text { font-size: 14px; color: var(--accent); font-weight: 500; }
.streaming-indicator .mini-loader { display: flex; gap: 3px; margin-left: auto; }
.streaming-indicator .mini-loader span { width: 4px; height: 4px; background: var(--accent); border-radius: 50%; animation: miniLoaderBounce 1s ease-in-out infinite; }
.streaming-indicator .mini-loader span:nth-child(1) { animation-delay: 0s; }
.streaming-indicator .mini-loader span:nth-child(2) { animation-delay: 0.15s; }
.streaming-indicator .mini-loader span:nth-child(3) { animation-delay: 0.3s; }
@keyframes miniLoaderBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .neural-network .node, .neural-network .connection, .neural-network .particle,
    .ai-dots span, .streaming-pulse, .progress-bar-container .progress-bar::after,
    .generation-stages .stage.active svg, .streaming-indicator .mini-loader span { animation: none; }
    .neural-network .node { opacity: 0.7; }
    .neural-network .particle { opacity: 0; }
}

.progress-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 12px; }
.progress-item-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.progress-item-name { font-weight: 500; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress-item-actions { display: flex; align-items: center; gap: 12px; }
.progress-item-stats { font-size: 14px; color: var(--text-secondary); font-weight: 500; }
.category-reset-btn { padding: 4px 10px; background: transparent; border: 1px solid var(--border); border-radius: 4px; font-size: 12px; color: var(--muted); cursor: pointer; transition: all 0.15s; }
.category-reset-btn:hover { border-color: var(--danger); color: var(--danger); }
.progress-item-bar { height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.progress-item-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.3s ease; }

.error { color: var(--danger); padding: 16px; background: rgba(239, 68, 68, 0.1); border-radius: var(--radius-sm); }

.category-stat-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.category-stat-item:last-child { border-bottom: none; }
.category-stat-name { color: var(--text); }
.category-stat-value { color: var(--text-secondary); font-weight: 500; }

.missed-question-item { padding: 12px; background: var(--bg); border-radius: var(--radius-sm); margin-bottom: 8px; }
.missed-question-text { font-size: 14px; color: var(--text); margin-bottom: 4px; }
.missed-question-stats { font-size: 12px; color: var(--muted); }

.stats { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-bottom: 16px; }
.stat { text-align: center; min-width: 100px; }
.stat .stat-value { display: block; font-size: 24px; font-weight: 700; color: var(--accent); }
.stat .stat-label { font-size: 12px; color: var(--muted); }

.footer { text-align: center; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }

.category { padding: 8px 0; border-bottom: 1px solid var(--border); }
.category:last-child { border-bottom: none; }

.api-key-status { padding: 8px 12px; border-radius: var(--radius-sm); font-size: 13px; margin-top: 12px; }
.api-key-status.success { background: rgba(16, 185, 129, 0.1); color: var(--success); }

.nav-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); cursor: pointer; transition: all 0.15s; }
.nav-dot:hover { background: var(--muted); }
.nav-dot.active { background: var(--accent); transform: scale(1.2); }
.nav-dot.answered { background: var(--success); }
.nav-dot.flagged { background: var(--warning); }

/* PDF Container - Study Page */
.pdf-container { width: 100%; max-width: 100%; min-width: 0; height: calc(100vh - var(--top-bar-height) - 120px); min-height: 600px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.pdf-container iframe { display: block; width: 100%; max-width: 100%; min-width: 0; height: 100%; border: none; }

/* Study Actions Buttons - Base styles */
.study-actions { display: flex; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.study-actions .action-btn { display: inline-flex; align-items: center; gap: 8px; }

/* Tablet - 1024px */
@media (max-width: 1024px) {
    .pdf-container { height: calc(100vh - var(--top-bar-height) - 100px); min-height: 500px; }
}

/* Mobile - 768px: Stack buttons vertically */
@media (max-width: 768px) {
    .pdf-container { height: calc(100dvh - var(--top-bar-height) - 140px); min-height: 350px; border-radius: var(--radius-sm); }
    .study-actions { flex-direction: column; gap: 8px; width: 100%; }
    .study-actions .action-btn { width: 100%; justify-content: center; padding: 12px 16px; font-size: 14px; }
}

/* Small Mobile - 480px */
@media (max-width: 480px) {
    .pdf-container { height: calc(100dvh - var(--top-bar-height) - 160px); min-height: 280px; }
    .study-actions .action-btn { padding: 10px 14px; font-size: 13px; }
}

/* Practice Page Hero - Mobile Responsive (must be after base styles) */
@media (max-width: 768px) {
    .appendix-hero { padding: 16px; margin-bottom: 16px; }
    .appendix-hero h1 { font-size: 22px; margin-bottom: 4px; }
    .appendix-hero p { font-size: 13px; margin-bottom: 10px; }
    .appendix-hero .hero-stats { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 20px; margin-bottom: 10px; justify-content: center; }
    .appendix-hero .hero-stat { flex: 0 0 auto; }
    .appendix-hero .hero-stat-value { font-size: 20px; }
    .appendix-hero .hero-stat-label { font-size: 11px; }
    .hero-credits { font-size: 11px; }
}

@media (max-width: 480px) {
    .appendix-hero { padding: 12px; margin-bottom: 12px; }
    .appendix-hero h1 { font-size: 18px; }
    .appendix-hero p { font-size: 12px; margin-bottom: 8px; }
    .appendix-hero .hero-stats { gap: 12px; margin-bottom: 8px; }
    .appendix-hero .hero-stat-value { font-size: 16px; }
    .appendix-hero .hero-stat-label { font-size: 10px; }
}

/* Review Question Cards */
.review-section-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; color: var(--text); }
.review-question-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; transition: all 0.2s; }
.review-question-card.incorrect { border-left: 4px solid var(--danger); }
.review-question-card.correct { border-left: 4px solid var(--success); }
.review-question-card.flagged { background: rgba(245, 158, 11, 0.05); }
.review-question-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.review-question-number { font-weight: 600; color: var(--muted); font-size: 14px; }
.review-question-appendix { font-size: 12px; padding: 4px 8px; background: var(--accent-soft); color: var(--accent); border-radius: 4px; font-weight: 500; }
.review-question-status { font-size: 12px; padding: 4px 8px; border-radius: 4px; font-weight: 600; }
.review-question-status.correct { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.review-question-status.incorrect { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.review-question-flag { font-size: 12px; padding: 4px 8px; background: rgba(245, 158, 11, 0.1); color: var(--warning); border-radius: 4px; font-weight: 500; }
.review-question-text { font-size: 16px; line-height: 1.6; margin-bottom: 16px; color: var(--text); }
.review-answer-section { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.review-answer { padding: 12px; border-radius: var(--radius-sm); }
.review-answer.incorrect { background: rgba(239, 68, 68, 0.1); }
.review-answer.correct { background: rgba(16, 185, 129, 0.1); }
.review-answer-label { font-size: 12px; font-weight: 600; color: var(--muted); display: block; margin-bottom: 4px; }
.review-answer-text { font-size: 14px; color: var(--text); }
.review-explanation { padding: 16px; background: var(--bg); border-radius: var(--radius-sm); margin-bottom: 16px; }
.review-explanation-label { font-size: 12px; font-weight: 600; color: var(--accent); display: block; margin-bottom: 8px; }
.review-explanation p { font-size: 14px; line-height: 1.6; color: var(--text-secondary); margin: 0; }
.review-question-actions { display: flex; gap: 8px; }
.action-btn.small { padding: 6px 12px; font-size: 13px; }

/* Category Stats for Insights */
.category-stat-item { margin-bottom: 16px; }
.category-stat-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.category-stat-name { font-size: 14px; font-weight: 500; color: var(--text); }
.category-stat-accuracy { font-size: 14px; font-weight: 600; color: var(--accent); }
.category-stat-bar { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.category-stat-fill { height: 100%; border-radius: 4px; transition: width 0.3s; }
.category-stat-details { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Weak Areas for Insights */
.weak-areas-list { list-style: none; padding: 0; margin: 0; }
.weak-area-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.weak-area-item:last-child { border-bottom: none; }
.weak-area-name { font-size: 14px; font-weight: 500; color: var(--text); }
.weak-area-accuracy { font-size: 13px; color: var(--danger); font-weight: 500; }
.placeholder-text { color: var(--muted); font-size: 14px; text-align: center; padding: 20px; }
.placeholder-text.success { color: var(--success); }

/* ==================== INSIGHTS PAGE REDESIGN ==================== */

/* Summary Stats Row */
.insights-summary-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.summary-card { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; transition: all 0.2s; }
.summary-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.summary-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); }
.summary-icon.correct { background: rgba(13, 148, 136, 0.1); color: var(--accent); }
.summary-icon.success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.summary-icon.accuracy { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.summary-icon.time { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.summary-content { display: flex; flex-direction: column; }
.summary-value { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1.2; }
.summary-label { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* Charts Row */
.insights-charts-row { display: grid; grid-template-columns: 280px 1fr; gap: 20px; margin-bottom: 24px; }
.insight-card.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.insight-card.chart-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 20px; color: var(--text); }
.insight-card.chart-card.large { grid-column: span 1; }

/* Donut Chart Styles */
.donut-chart-container { display: flex; flex-direction: column; align-items: center; }
.donut-chart, .donut-placeholder { position: relative; display: flex; justify-content: center; align-items: center; }
.donut-center { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-value { font-size: 32px; font-weight: 700; color: var(--text); }
.donut-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.donut-chart.small .donut-value { font-size: 20px; }
.donut-center.small { font-size: 14px; }
.donut-legend { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; width: 100%; }
.legend-item { display: flex; align-items: center; gap: 8px; }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; }
.legend-dot.correct { background: var(--success); }
.legend-dot.incorrect { background: var(--danger); }
.legend-text { font-size: 13px; color: var(--text-secondary); }

/* Category Bars Container */
.category-bars-container { display: flex; flex-direction: column; gap: 16px; max-height: 400px; overflow-y: auto; }
.category-stat-item { padding: 12px; background: var(--bg); border-radius: var(--radius-sm); }
.category-stat-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.category-stat-name { font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70%; }
.category-stat-accuracy { font-size: 14px; font-weight: 700; }
.category-stat-bar { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.category-stat-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.category-stat-details { font-size: 11px; color: var(--muted); margin-top: 6px; }

/* Details Row */
.insights-details-row { display: grid; grid-template-columns: 1fr; gap: 20px; }
.insight-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.insight-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.card-subtitle { font-size: 13px; color: var(--muted); margin-bottom: 16px; }

/* Weak Areas List Redesign */
.weak-areas-list { list-style: none; padding: 0; margin: 0; }
ul.weak-areas-list { list-style: none; }
.weak-area-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--bg); border-radius: var(--radius-sm); margin-bottom: 8px; border-left: 3px solid var(--danger); }
.weak-area-item:last-child { margin-bottom: 0; }
.weak-area-name { font-size: 14px; font-weight: 500; color: var(--text); }
.weak-area-accuracy { font-size: 13px; color: var(--danger); font-weight: 600; background: rgba(239, 68, 68, 0.1); padding: 4px 8px; border-radius: 4px; }

/* ==================== ADDITIONAL KPI & VISUALIZATION STYLES ==================== */

/* KPI Row Styles */
.insights-summary-row.kpi-row { margin-top: 24px; }
.summary-card.kpi-card { background: linear-gradient(135deg, var(--surface) 0%, var(--bg) 100%); }
.summary-icon.speed { background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%); color: white; }
.summary-icon.mastery { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); color: white; }
.summary-icon.best { background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: white; }
.summary-icon.streak-bonus { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); color: white; }

/* Full Width Card */
.insight-card.full-width { grid-column: 1 / -1; }

/* Practice vs Exam Comparison Chart */
.comparison-chart-container { display: flex; flex-direction: column; gap: 16px; min-height: 160px; }
.comparison-bar-group { display: flex; flex-direction: column; gap: 8px; }
.comparison-bar-label { font-size: 13px; font-weight: 500; color: var(--text); display: flex; justify-content: space-between; }
.comparison-bar-label span:last-child { color: var(--muted); }
.comparison-bar { height: 24px; background: var(--bg); border-radius: 12px; overflow: hidden; position: relative; }
.comparison-bar-fill { height: 100%; border-radius: 12px; transition: width 0.5s ease; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; }
.comparison-bar-fill.practice { background: linear-gradient(90deg, var(--accent) 0%, #14b8a6 100%); }
.comparison-bar-fill.exam { background: linear-gradient(90deg, #8b5cf6 0%, #a78bfa 100%); }
.comparison-bar-value { font-size: 11px; font-weight: 600; color: white; }

/* 7-Day Activity Chart */
.activity-chart-container { display: flex; flex-direction: column; gap: 12px; min-height: 160px; }
.activity-days { display: flex; gap: 8px; justify-content: space-between; }
.activity-day { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; }
.activity-bar-container { width: 100%; height: 80px; display: flex; align-items: flex-end; justify-content: center; }
.activity-bar { width: 100%; max-width: 32px; border-radius: 4px 4px 0 0; transition: height 0.3s ease; min-height: 4px; }
.activity-bar.active { background: linear-gradient(180deg, var(--accent) 0%, #14b8a6 100%); }
.activity-bar.inactive { background: var(--border); }
.activity-bar.today { background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%); }
.activity-day-label { font-size: 11px; color: var(--muted); font-weight: 500; }
.activity-day-count { font-size: 10px; color: var(--text-secondary); }

/* Recent Activity List */
.recent-activity-list { display: flex; flex-direction: column; gap: 12px; max-height: 300px; overflow-y: auto; }
.recent-activity-item { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--bg); border-radius: var(--radius-sm); transition: all 0.2s; }
.recent-activity-item:hover { background: var(--accent-soft); }
.recent-activity-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.recent-activity-icon.correct { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.recent-activity-icon.incorrect { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.recent-activity-content { flex: 1; min-width: 0; }
.recent-activity-question { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.recent-activity-meta { font-size: 11px; color: var(--muted); display: flex; gap: 8px; }
.recent-activity-time { font-size: 11px; color: var(--muted); flex-shrink: 0; }

/* ==================== REVIEW PAGE REDESIGN ==================== */

/* Review Summary Section */
.review-summary-section { display: flex; align-items: center; gap: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.review-donut-container { flex-shrink: 0; }
.review-stats-grid { display: flex; flex-direction: column; gap: 16px; flex: 1; }
.review-stat-card { display: flex; align-items: center; gap: 16px; padding: 16px; background: var(--bg); border-radius: var(--radius-sm); }
.review-stat-card.incorrect { border-left: 3px solid var(--danger); }
.review-stat-card.flagged { border-left: 3px solid var(--warning); }
.review-stat-card .stat-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); }
.review-stat-card.incorrect .stat-icon { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.review-stat-card.flagged .stat-icon { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.review-stat-card .stat-info { display: flex; flex-direction: column; }
.review-stat-card .review-stat-value { font-size: 24px; font-weight: 700; color: var(--text); line-height: 1.2; }
.review-stat-card .review-stat-label { font-size: 12px; color: var(--muted); }

/* Review Actions */
.review-actions { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.review-actions .action-btn { display: inline-flex; align-items: center; gap: 8px; }
.review-actions .action-btn svg { flex-shrink: 0; }

/* Review Question Cards with Numbers */
.review-section-title { font-size: 18px; font-weight: 600; margin-bottom: 20px; color: var(--text); display: flex; align-items: center; gap: 12px; }
.review-section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.review-question-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; transition: all 0.2s; }
.review-question-card:hover { box-shadow: var(--shadow-md); }
.review-question-card.incorrect { border-left: 4px solid var(--danger); }
.review-question-card.correct { border-left: 4px solid var(--success); }
.review-question-card.flagged { background: linear-gradient(135deg, rgba(245, 158, 11, 0.03) 0%, transparent 100%); }
.review-question-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.review-question-number { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: var(--accent); color: white; font-size: 14px; font-weight: 700; border-radius: 50%; }
.review-question-appendix { font-size: 12px; padding: 4px 10px; background: var(--accent-soft); color: var(--accent); border-radius: 20px; font-weight: 500; }
.review-question-status { font-size: 11px; padding: 4px 10px; border-radius: 20px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.review-question-status.correct { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.review-question-status.incorrect { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.review-question-flag { font-size: 11px; padding: 4px 10px; background: rgba(245, 158, 11, 0.1); color: var(--warning); border-radius: 20px; font-weight: 600; }
.review-question-text { font-size: 15px; line-height: 1.7; margin-bottom: 20px; color: var(--text); }
.review-answer-section { display: grid; gap: 12px; margin-bottom: 20px; }
.review-answer { padding: 14px 16px; border-radius: var(--radius-sm); }
.review-answer.incorrect { background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.2); }
.review-answer.correct { background: rgba(16, 185, 129, 0.08); border: 1px solid rgba(16, 185, 129, 0.2); }
.review-answer-label { font-size: 11px; font-weight: 600; color: var(--muted); display: block; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.review-answer-text { font-size: 14px; color: var(--text); font-weight: 500; }
.review-explanation { padding: 16px; background: linear-gradient(135deg, var(--accent-soft) 0%, var(--bg) 100%); border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid var(--accent-light); }
.review-explanation-label { font-size: 11px; font-weight: 600; color: var(--accent); display: block; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.review-explanation p { font-size: 14px; line-height: 1.6; color: var(--text-secondary); margin: 0; }
.review-question-actions { display: flex; gap: 8px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ==================== CHART.JS DASHBOARD ==================== */

/* Charts Dashboard Container */
.charts-dashboard {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 0 24px 0;
}

/* Charts Row */
.charts-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Chart Card */
.chart-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    position: relative;
}

.chart-card.wide {
    grid-column: span 1;
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.chart-card.stats-card {
    display: flex;
    flex-direction: column;
}

/* Chart Header */
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.chart-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-container canvas {
    max-width: 100%;
    max-height: 100%;
}

.chart-container-lg {
    position: relative;
    height: 200px;
}

.chart-container-lg canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Quick Stats Grid */
.quick-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    flex: 1;
}

.quick-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: var(--bg);
    border-radius: 8px;
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.stat-label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 4px;
}

/* Alert List */
.alert-list {
    min-height: 60px;
}

.alert-placeholder {
    color: var(--muted);
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

/* Timeline List */
.timeline-list {
    min-height: 60px;
}

.timeline-placeholder {
    color: var(--muted);
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

/* Achievements Grid */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    min-height: 60px;
}

/* Progress Grid */
.progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    min-height: 60px;
}

/* Actions Panel */
.actions-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.actions-info {
    color: var(--muted);
    font-size: 13px;
}

.progress-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.action-btn.secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.action-btn.secondary:hover {
    background: var(--border);
}

.action-btn.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.action-btn.danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Legend */
.appendix-legend {
    display: flex;
    gap: 16px;
    font-size: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.mastered {
    background: #10b981;
}

.legend-dot.progress {
    background: #f59e0b;
}

.legend-dot.not-started {
    background: var(--border);
}

/* Badges */
.kpi-status,
.kpi-badge,
.readiness-badge,
.progress-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(100, 116, 139, 0.15);
    color: var(--muted);
}

/* Responsive */
@media (max-width: 900px) {
    .charts-row {
        grid-template-columns: 1fr;
    }
    
    .chart-card.wide {
        grid-column: span 1;
    }
    
    .quick-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 600px) {
    .quick-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .appendix-legend {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* ==================== SOC-STYLE REVIEW DASHBOARD (LEGACY) ==================== */

/* SOC Dashboard Container */
.soc-dashboard {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 24px;
}

/* Primary Metrics Row */
.soc-metrics-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr;
    gap: 20px;
}

/* SOC Metric Cards */
.soc-metric-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.soc-metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #0d9488);
}

.soc-metric-card.gauge-card::before {
    background: linear-gradient(90deg, #10b981, #f59e0b, #ef4444);
}

.soc-metric-card.ring-card::before {
    background: linear-gradient(90deg, #0d9488, #10b981);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.metric-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.metric-badge.medium {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.metric-badge.high {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.metric-trend {
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.metric-trend.positive {
    color: #10b981;
}

.metric-trend.negative {
    color: #ef4444;
}

/* Gauge Container */
.gauge-container {
    display: flex;
    justify-content: center;
    padding: 10px 0;
}

.gauge-svg {
    width: 100%;
    max-width: 200px;
    height: auto;
}

.gauge-fill {
    transition: stroke-dashoffset 1s ease-out;
}

.gauge-needle {
    transition: transform 1s ease-out;
    transform-origin: 100px 100px;
}

.gauge-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--muted);
    padding: 0 10px;
    margin-top: 8px;
}

/* Ring Container */
.ring-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
}

.ring-svg {
    width: 120px;
    height: 120px;
}

.ring-fill {
    transition: stroke-dashoffset 1s ease-out;
}

.ring-center {
    position: absolute;
    text-align: center;
}

.ring-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    display: block;
}

.ring-label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Quick Stats Grid */
.quick-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.quick-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.quick-stat:hover {
    background: var(--border);
}

.quick-stat .stat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.quick-stat .stat-icon.critical {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.quick-stat .stat-icon.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.quick-stat .stat-icon.info {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.quick-stat .stat-icon.success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.quick-stat .stat-content {
    display: flex;
    flex-direction: column;
}

.quick-stat .stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.quick-stat .stat-label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* SOC Visualization Row */
.soc-viz-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.soc-viz-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
}

.viz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.viz-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.viz-legend {
    display: flex;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--muted);
}

.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.legend-color.critical { background: #ef4444; }
.legend-color.warning { background: #f59e0b; }
.legend-color.success { background: #10b981; }

/* Heatmap Container */
.heatmap-container {
    padding: 10px 0;
}

.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    gap: 4px;
}

.heatmap-cell {
    aspect-ratio: 1;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.heatmap-cell:hover {
    transform: scale(1.1);
    z-index: 1;
}

.heatmap-cell.critical { background: linear-gradient(135deg, #ef4444, #dc2626); }
.heatmap-cell.warning { background: linear-gradient(135deg, #f59e0b, #d97706); }
.heatmap-cell.success { background: linear-gradient(135deg, #10b981, #059669); }
.heatmap-cell.neutral { background: var(--border); color: var(--muted); }

.heatmap-cell .cell-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 12px;
    color: var(--text);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    box-shadow: var(--shadow-md);
    z-index: 10;
}

.heatmap-cell:hover .cell-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Trend Period Buttons */
.trend-period {
    display: flex;
    gap: 4px;
}

.period-btn {
    padding: 4px 10px;
    border: 1px solid var(--border);
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s;
}

.period-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

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

/* Trend Chart */
.trend-chart-container {
    position: relative;
    height: 150px;
    padding: 10px 0;
}

.trend-svg {
    width: 100%;
    height: 100%;
}

.trend-line {
    stroke-linecap: round;
    stroke-linejoin: round;
}

.trend-area {
    opacity: 0.3;
}

.trend-points circle {
    fill: #0d9488;
    stroke: var(--surface);
    stroke-width: 2;
    cursor: pointer;
    transition: all 0.2s;
}

.trend-points circle:hover {
    r: 6;
    fill: #10b981;
}

.trend-tooltip {
    position: absolute;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 12px;
    color: var(--text);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: var(--shadow-md);
    z-index: 10;
}

/* SOC Alert Panel */
.soc-alert-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.1), rgba(245, 158, 11, 0.05));
    border-bottom: 1px solid var(--border);
}

.alert-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.alert-header h3 svg {
    color: #f59e0b;
}

.alert-count {
    font-size: 12px;
    color: var(--muted);
}

.alert-list {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 200px;
    overflow-y: auto;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--danger);
    transition: all 0.2s;
}

.alert-item:hover {
    background: var(--border);
}

.alert-item.warning {
    border-left-color: var(--warning);
}

.alert-item .alert-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.alert-item.warning .alert-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

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

.alert-item .alert-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 2px;
}

.alert-item .alert-detail {
    font-size: 12px;
    color: var(--muted);
}

.alert-item .alert-action {
    padding: 6px 12px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.alert-item .alert-action:hover {
    background: var(--accent-hover);
}

.alert-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    text-align: center;
    color: var(--muted);
}

.alert-placeholder svg {
    margin-bottom: 12px;
    opacity: 0.5;
}

.alert-placeholder p {
    font-size: 14px;
    margin: 0;
}

/* Review Filter Section Enhanced */
.review-filter-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.filter-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.queue-count {
    font-size: 13px;
    color: var(--muted);
}

.filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.review-filter-tabs {
    display: flex;
    gap: 8px;
}

.filter-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.filter-tab:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.filter-tab svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.review-sort-options {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Review Empty State */
.review-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    color: var(--muted);
}

.review-empty-state svg {
    margin-bottom: 16px;
    opacity: 0.4;
}

.review-empty-state h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px 0;
}

.review-empty-state p {
    font-size: 14px;
    max-width: 400px;
    margin: 0;
    line-height: 1.5;
}

/* ==================== SOC INSIGHTS DASHBOARD ==================== */

/* SOC Command Center */
.soc-command-center {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* SOC KPI Row */
.soc-kpi-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 20px;
}

.soc-kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
}

.soc-kpi-card.primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #10b981);
    border-radius: var(--radius) var(--radius) 0 0;
}

.soc-kpi-card.ring-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #8b5cf6, #6366f1);
    border-radius: var(--radius) var(--radius) 0 0;
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.kpi-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.kpi-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}

/* KPI Gauge */
.kpi-gauge-container {
    position: relative;
    display: flex;
    justify-content: center;
}

.kpi-gauge-svg {
    width: 100%;
    max-width: 200px;
}

.kpi-gauge-fill {
    transition: stroke-dashoffset 1s ease-out;
}

.kpi-gauge-needle {
    transition: transform 1s ease-out;
    transform-origin: 100px 100px;
}

.kpi-gauge-value {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.gauge-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    display: block;
}

.gauge-label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-gauge-scale {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--muted);
    padding: 0 10px;
    margin-top: 8px;
}

/* Stats Grid 4 */
.stats-grid-4 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.stat-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.stat-icon-sm {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.stat-icon-sm.attempted { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.stat-icon-sm.correct { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.stat-icon-sm.time { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.stat-icon-sm.streak { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.stat-name {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Mastery Ring */
.mastery-ring-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
}

.mastery-ring-svg {
    width: 120px;
    height: 120px;
}

.mastery-ring-fill {
    transition: stroke-dashoffset 1s ease-out;
}

.mastery-ring-center {
    position: absolute;
    text-align: center;
}

.mastery-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    display: block;
}

.mastery-label {
    font-size: 12px;
    color: var(--muted);
}

/* SOC Viz Card Wide */
.soc-viz-card.wide {
    grid-column: span 1;
}

.viz-controls {
    display: flex;
    gap: 4px;
}

.viz-btn {
    padding: 4px 10px;
    border: 1px solid var(--border);
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s;
}

.viz-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

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

/* Performance Placeholder */
.performance-placeholder,
.donut-placeholder,
.comparison-placeholder,
.timeline-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    text-align: center;
    color: var(--muted);
    min-height: 150px;
}

.performance-placeholder svg,
.donut-placeholder svg {
    margin-bottom: 12px;
    opacity: 0.4;
}

.performance-placeholder p,
.donut-placeholder p,
.comparison-placeholder p,
.timeline-placeholder p {
    font-size: 13px;
    margin: 0;
}

.donut-placeholder {
    position: relative;
}

.donut-placeholder .donut-center {
    position: absolute;
    text-align: center;
}

.donut-placeholder .donut-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--muted);
}

/* Trend Indicator */
.trend-indicator {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.trend-indicator.positive {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.trend-indicator.negative {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Activity Chart */
.activity-chart-container {
    position: relative;
    height: 150px;
}

.activity-svg {
    width: 100%;
    height: 120px;
}

.activity-line {
    stroke-linecap: round;
    stroke-linejoin: round;
}

.activity-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--muted);
    padding: 0 5px;
    margin-top: 8px;
}

/* SOC Achievements Panel */
.soc-achievements-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.achievements-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.1), rgba(99, 102, 241, 0.05));
    border-bottom: 1px solid var(--border);
}

.achievements-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.achievements-header h3 svg {
    color: #8b5cf6;
}

.badges-count {
    font-size: 12px;
    color: var(--muted);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    padding: 16px 20px;
}

.achievement-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    text-align: center;
    opacity: 0.4;
    transition: all 0.2s;
}

.achievement-badge.earned {
    opacity: 1;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(99, 102, 241, 0.1));
}

.achievement-badge .badge-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.achievement-badge .badge-name {
    font-size: 11px;
    font-weight: 500;
    color: var(--text);
}

/* SOC Timeline Panel */
.soc-timeline-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.timeline-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.timeline-filter {
    font-size: 12px;
    color: var(--muted);
}

.timeline-list {
    padding: 16px 20px;
    max-height: 300px;
    overflow-y: auto;
}

.timeline-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

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

.timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 4px;
    flex-shrink: 0;
}

.timeline-dot.correct { background: #10b981; }
.timeline-dot.incorrect { background: #ef4444; }

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

.timeline-question {
    font-size: 13px;
    color: var(--text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timeline-meta {
    font-size: 11px;
    color: var(--muted);
}

/* ==================== SOC PROGRESS DASHBOARD ==================== */

/* SOC Progress Center */
.soc-progress-center {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* SOC Progress Row */
.soc-progress-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 20px;
}

.soc-progress-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
}

.soc-progress-card.primary-ring::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0d9488, #10b981);
    border-radius: var(--radius) var(--radius) 0 0;
}

.soc-progress-card.completion-gauge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #10b981);
    border-radius: var(--radius) var(--radius) 0 0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.progress-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.readiness-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.readiness-badge.preparing {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.readiness-badge.ready {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

/* Progress Ring Wrapper */
.progress-ring-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
}

.soc-progress-ring {
    width: 140px;
    height: 140px;
}

.soc-progress-fill {
    transition: stroke-dashoffset 1s ease-out;
}

.progress-ring-center {
    position: absolute;
    text-align: center;
}

.progress-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    display: block;
}

.progress-sublabel {
    font-size: 12px;
    color: var(--muted);
}

/* Progress Stats Grid */
.progress-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.progress-stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.stat-icon-circle {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.stat-icon-circle.questions { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.stat-icon-circle.appendices { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.stat-icon-circle.streak { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.stat-icon-circle.mastered { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-info .stat-number {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.stat-info .stat-label {
    font-size: 11px;
    color: var(--muted);
}

/* Readiness Gauge */
.readiness-gauge-container {
    display: flex;
    justify-content: center;
    padding: 10px 0;
}

.readiness-gauge-svg {
    width: 100%;
    max-width: 200px;
}

.readiness-gauge-fill {
    transition: stroke-dashoffset 1s ease-out;
}

.readiness-needle {
    transition: transform 1s ease-out;
    transform-origin: 100px 100px;
}

.readiness-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--muted);
    padding: 0 10px;
    margin-top: 8px;
}

/* SOC Appendix Panel */
.soc-appendix-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.appendix-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.appendix-panel-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.appendix-legend {
    display: flex;
    gap: 16px;
}

.appendix-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--muted);
}

.appendix-legend .legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.appendix-legend .legend-dot.mastered { background: #10b981; }
.appendix-legend .legend-dot.progress { background: #f59e0b; }
.appendix-legend .legend-dot.not-started { background: var(--border); }

/* SOC Progress Grid */
.soc-progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 20px;
}

/* SOC Actions Panel */
.soc-actions-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.actions-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--muted);
}

.actions-info svg {
    flex-shrink: 0;
    color: var(--warning);
}

.progress-actions {
    display: flex;
    gap: 12px;
}

.action-btn.secondary {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
}

.action-btn.secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Appendix Progress Grid */
.appendix-progress-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.appendix-progress-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.appendix-progress-item.mastered {
    border-color: rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), transparent);
}

.appendix-progress-item.in-progress {
    border-color: rgba(245, 158, 11, 0.3);
}

.appendix-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.appendix-letter {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

.appendix-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
}

.appendix-status-dot.mastered {
    background: #10b981;
}

.appendix-status-dot.in-progress {
    background: #f59e0b;
}

.appendix-progress-title {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.appendix-progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.appendix-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #10b981);
    border-radius: 3px;
    transition: width 0.5s ease-out;
}

.appendix-progress-stats {
    font-size: 11px;
    color: var(--muted);
}

/* KPI Status Badge Variants */
.kpi-status.excellent {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.kpi-status.good {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.kpi-status.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.kpi-status.critical {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* KPI Badge Variants */
.kpi-badge.expert {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.kpi-badge.advanced {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.kpi-badge.intermediate {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.kpi-badge.beginner {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Progress Status Badge Variants */
.progress-status.complete {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.progress-status.good {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.progress-status.starting {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

/* Donut Chart Styles */
.donut-svg {
    display: block;
    margin: 0 auto;
}

.donut-fill {
    transition: stroke-dashoffset 1s ease-out;
}

.donut-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 12px;
}

.donut-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
}

.donut-legend .legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.donut-legend .legend-dot.correct {
    background: #10b981;
}

.donut-legend .legend-dot.incorrect {
    background: #ef4444;
}

/* Category Bar Chart (kept for compatibility) */
.category-bar-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.category-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.category-bar-name {
    color: var(--text);
    font-weight: 500;
}

.category-bar-stats {
    color: var(--muted);
    font-size: 12px;
}

.category-bar-track {
    height: 8px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.category-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.category-bar-fill.danger {
    background: linear-gradient(90deg, var(--danger), #f87171);
}

.category-bar-fill.warning {
    background: linear-gradient(90deg, var(--warning), #fbbf24);
}

.category-bar-fill.success {
    background: linear-gradient(90deg, var(--success), #34d399);
}

/* Weak Areas Widget */
.review-weak-areas-widget {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.review-weak-areas-widget .widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.review-weak-areas-widget .widget-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.review-weak-areas-widget .widget-header h3 svg {
    color: var(--warning);
}

.review-weak-areas-widget .widget-subtitle {
    font-size: 13px;
    color: var(--muted);
}

.weak-areas-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.weak-area-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--danger);
}

.weak-area-item .weak-area-info {
    display: flex;
    flex-direction: column;
}

.weak-area-item .weak-area-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.weak-area-item .weak-area-detail {
    font-size: 12px;
    color: var(--muted);
}

.weak-area-item .weak-area-accuracy {
    font-size: 14px;
    font-weight: 600;
    color: var(--danger);
}

/* Review Filter Section */
.review-filter-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.review-filter-tabs {
    display: flex;
    gap: 8px;
}

.filter-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.filter-tab:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.filter-tab svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.review-sort-options {
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-sort-options label {
    font-size: 14px;
    color: var(--muted);
}

/* Enhanced Donut for Review */
.review-donut-container .donut-chart {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.review-donut-container .donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.review-donut-container .donut-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    display: block;
}

.review-donut-container .donut-label {
    font-size: 12px;
    color: var(--muted);
}

.review-donut-container .donut-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.review-donut-container .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.review-donut-container .legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.review-donut-container .legend-dot.correct {
    background: var(--success);
}

.review-donut-container .legend-dot.incorrect {
    background: var(--danger);
}

/* ==================== RESPONSIVE STYLES ==================== */

@media (max-width: 1024px) {
    .insights-charts-row { grid-template-columns: 1fr; }
    .insight-card.chart-card.large { grid-column: span 1; }
    .soc-metrics-row { grid-template-columns: 1fr 1fr; }
    .soc-metrics-row .stats-card { grid-column: span 2; }
    .soc-viz-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .insights-summary-row { grid-template-columns: repeat(2, 1fr); }
    .summary-card { padding: 16px; }
    .summary-value { font-size: 24px; }
    .summary-icon { width: 40px; height: 40px; }
    .review-summary-section { flex-direction: column; align-items: stretch; }
    .review-donut-container { display: flex; justify-content: center; }
    .review-stats-grid { flex-direction: row; }
    .review-stat-card { flex: 1; }
}

@media (max-width: 768px) {
    .soc-metrics-row { grid-template-columns: 1fr; }
    .soc-metrics-row .stats-card { grid-column: span 1; }
    .quick-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .filter-controls { flex-direction: column; align-items: stretch; }
    .review-filter-tabs { justify-content: center; }
    .review-sort-options { justify-content: center; }
    .heatmap-grid { grid-template-columns: repeat(6, 1fr); }
    .soc-kpi-row { grid-template-columns: 1fr; }
    .soc-progress-row { grid-template-columns: 1fr; }
    .stats-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .progress-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .appendix-panel-header { flex-direction: column; gap: 12px; align-items: flex-start; }
    .appendix-legend { flex-wrap: wrap; }
    .soc-actions-panel { flex-direction: column; align-items: stretch; }
    .progress-actions { justify-content: center; }
    .achievements-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
}

@media (max-width: 480px) {
    .insights-summary-row { grid-template-columns: 1fr; }
    .review-actions { flex-direction: column; }
    .review-actions .action-btn { width: 100%; justify-content: center; }
    .soc-metric-card { padding: 16px; }
    .soc-kpi-card { padding: 16px; }
    .soc-progress-card { padding: 16px; }
    .quick-stats-grid { grid-template-columns: 1fr; }
    .quick-stat .stat-value { font-size: 18px; }
    .ring-svg { width: 100px; height: 100px; }
    .ring-value { font-size: 24px; }
    .gauge-svg { max-width: 160px; }
    .kpi-gauge-svg { max-width: 160px; }
    .gauge-number { font-size: 26px; }
    .mastery-ring-svg { width: 100px; height: 100px; }
    .mastery-value { font-size: 26px; }
    .soc-progress-ring { width: 120px; height: 120px; }
    .progress-value { font-size: 26px; }
    .readiness-gauge-svg { max-width: 160px; }
    .stats-grid-4 { grid-template-columns: 1fr; }
    .progress-stats-grid { grid-template-columns: 1fr; }
    .review-filter-tabs { flex-wrap: wrap; }
    .filter-tab { flex: 1; min-width: 90px; justify-content: center; padding: 8px 12px; font-size: 13px; }
    .heatmap-grid { grid-template-columns: repeat(4, 1fr); }
    .trend-period { gap: 2px; }
    .period-btn { padding: 4px 8px; font-size: 10px; }
    .alert-item { flex-direction: column; align-items: flex-start; gap: 8px; }
    .alert-item .alert-action { width: 100%; text-align: center; }
    .soc-progress-grid { grid-template-columns: 1fr; }
    .progress-actions { flex-direction: column; }
    .progress-actions .action-btn { width: 100%; justify-content: center; }
}

/* ==================== ENHANCED MOBILE RESPONSIVE STYLES ==================== */

/* Mobile Navigation Improvements */
@media (max-width: 768px) {
    /* Improved mobile overlay */
    .mobile-nav-overlay {
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
    
    /* Better sidebar on mobile */
    .side-nav {
        box-shadow: var(--shadow-lg);
    }
    
    .side-nav.open {
        z-index: 101;
    }
    
    /* Improved top bar for mobile */
    .top-bar {
        gap: 8px;
        min-height: var(--top-bar-height);
    }
    
    .mobile-menu-btn {
        min-width: 44px;
        min-height: 44px;
        flex-shrink: 0;
    }
    
    /* Breadcrumbs - prevent overflow and improve readability */
    .breadcrumbs {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        font-size: 13px;
    }
    
    .breadcrumb-item {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }
    
    .breadcrumb-item.active {
        max-width: 180px;
    }
    
    .breadcrumb-separator {
        flex-shrink: 0;
    }
    
    /* Search trigger - compact on mobile */
    .search-trigger {
        min-width: 44px;
        min-height: 44px;
        padding: 8px;
        margin-left: auto;
        flex-shrink: 0;
    }
    
    /* Content area improvements */
    .content-area {
        padding: 12px;
    }
    
    /* Panel headers */
    .panel-header {
        margin-bottom: 16px;
    }
    
    .panel-header h2 {
        font-size: 20px;
    }
}

/* Question Card Mobile Improvements */
@media (max-width: 768px) {
    .question-card {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .question-card-header {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .question-card-badge {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .question-card-actions {
        gap: 6px;
    }
    
    .gemini-btn,
    .flag-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }
    
    .question-card-text,
    .question-text {
        font-size: 15px;
        line-height: 1.5;
    }
    
    .option,
    .option-tile {
        padding: 12px;
        gap: 10px;
    }
    
    .option-letter {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }
    
    .option-text {
        font-size: 14px;
    }
    
    .answer-explanation {
        padding: 12px;
        margin-top: 12px;
    }
    
    .answer-explanation h4 {
        font-size: 13px;
    }
    
    .answer-explanation p {
        font-size: 13px;
    }
}

/* Quiz Toolbar Mobile */
@media (max-width: 768px) {
    .quiz-toolbar {
        gap: 12px;
        padding: 12px 0;
        margin-bottom: 16px;
    }
    
    .back-btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }
    
    .quiz-filters {
        gap: 8px;
    }
    
    .filter-select {
        min-height: 44px;
        min-width: 100%;
    }
    
    .quiz-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .action-btn {
        flex: 1;
        min-width: calc(50% - 4px);
        justify-content: center;
        min-height: 44px;
    }
    
    .mode-toggle {
        width: 100%;
    }
    
    .mode-btn {
        flex: 1;
        text-align: center;
        min-height: 40px;
    }
}

/* Generation Progress Mobile */
@media (max-width: 768px) {
    .generation-progress {
        padding: 20px 16px;
    }
    
    .generation-progress h2 {
        font-size: 18px;
    }
    
    .generation-progress .appendix-subtitle {
        font-size: 14px;
    }
    
    .generation-stages {
        gap: 6px;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }
    
    .generation-stages .stage {
        padding: 6px 10px;
        font-size: 12px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .generation-stages .stage::after {
        display: none;
    }
    
    .ai-loader {
        gap: 12px;
        margin-bottom: 16px;
    }
    
    .neural-network {
        width: 140px;
        height: 80px;
    }
    
    .ai-status {
        font-size: 12px;
    }
}

/* Chatbot Panel Mobile */
@media (max-width: 768px) {
    .chatbot-panel {
        height: calc(100dvh - 120px);
        max-height: calc(100dvh - 120px);
    }
    
    .chatbot-header {
        padding: 12px;
    }
    
    .chatbot-avatar {
        width: 36px;
        height: 36px;
    }
    
    .chatbot-title {
        font-size: 15px;
    }
    
    .chat-messages {
        padding: 12px;
    }
    
    .chat-input-row {
        padding: 12px;
        gap: 8px;
    }
    
    .chat-input {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .chat-send {
        width: 44px;
        height: 44px;
    }
    
    .chatbot-toggle {
        padding: 10px 16px;
    }
    
    .chatbot-label {
        font-size: 14px;
    }
}

/* Modal Mobile Improvements */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 16px;
        align-items: flex-end;
    }
    
    .modal {
        max-height: 85vh;
        max-height: 85dvh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
    
    .modal-header {
        padding: 16px;
        position: sticky;
        top: 0;
        background: var(--surface);
        z-index: 1;
    }
    
    .modal-header h2 {
        font-size: 16px;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .modal-actions .btn-primary,
    .modal-actions .btn-secondary {
        width: 100%;
        min-height: 48px;
    }
    
    .config-group select,
    .config-group input {
        min-height: 48px;
    }
}

/* Command Palette Mobile */
@media (max-width: 768px) {
    .command-palette-overlay {
        padding: 16px;
        padding-top: 10vh;
    }
    
    .command-palette {
        max-width: 100%;
    }
    
    .command-palette-header {
        padding: 12px;
    }
    
    .command-palette-header input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .command-item {
        padding: 14px 16px;
    }
}

/* Appendix Cards Mobile */
@media (max-width: 768px) {
    .appendix-selection {
        padding: 12px;
    }
    
    .appendix-card {
        padding: 16px;
    }
    
    .appendix-card-header {
        gap: 12px;
        margin-bottom: 12px;
    }
    
    .appendix-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .appendix-letter {
        font-size: 11px;
    }
    
    .appendix-title {
        font-size: 15px;
    }
    
    .appendix-stats {
        gap: 16px;
        flex-wrap: wrap;
    }
    
    .appendix-stat {
        font-size: 12px;
    }
    
    .appendix-cta {
        padding-top: 12px;
    }
    
    .appendix-status {
        font-size: 13px;
    }
}

/* Review Page Mobile */
@media (max-width: 768px) {
    .review-summary-section {
        padding: 16px;
        gap: 16px;
    }
    
    .review-stat-card {
        padding: 12px;
    }
    
    .review-stat-card .review-stat-value {
        font-size: 20px;
    }
    
    .review-question-card {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .review-question-header {
        gap: 8px;
    }
    
    .review-question-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .review-question-appendix,
    .review-question-status,
    .review-question-flag {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .review-question-text {
        font-size: 14px;
        margin-bottom: 16px;
    }
    
    .review-answer {
        padding: 10px 12px;
    }
    
    .review-answer-text {
        font-size: 13px;
    }
    
    .review-explanation {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .review-question-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .review-question-actions .action-btn {
        flex: 1;
        min-width: calc(50% - 4px);
        justify-content: center;
    }
}

/* Insights Page Mobile */
@media (max-width: 768px) {
    .insights-summary-row {
        gap: 12px;
    }
    
    .summary-card {
        padding: 14px;
        gap: 12px;
    }
    
    .summary-icon {
        width: 40px;
        height: 40px;
    }
    
    .summary-value {
        font-size: 22px;
    }
    
    .summary-label {
        font-size: 12px;
    }
    
    .insight-card {
        padding: 16px;
    }
    
    .insight-card h3 {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .donut-value {
        font-size: 24px;
    }
    
    .category-stat-item {
        padding: 10px;
    }
    
    .category-stat-name {
        font-size: 12px;
    }
    
    .weak-area-item {
        padding: 10px 12px;
    }
    
    .weak-area-name {
        font-size: 13px;
    }
}

/* Progress Page Mobile */
@media (max-width: 768px) {
    .progress-ring-container {
        width: 100px;
        height: 100px;
    }
    
    .progress-ring-value {
        font-size: 20px;
    }
    
    .progress-detail-item {
        padding: 10px 0;
        font-size: 14px;
    }
    
    .progress-item {
        padding: 12px;
    }
    
    .progress-item-name {
        font-size: 14px;
    }
    
    .progress-item-stats {
        font-size: 13px;
    }
}

/* Quiz Navigation Fixed Bar Mobile */
@media (max-width: 768px) {
    .quiz-nav-fixed {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .quiz-nav-btn {
        padding: 10px 14px;
        font-size: 13px;
        min-height: 44px;
    }
    
    .quiz-nav-info {
        width: 100%;
        text-align: center;
        order: -1;
        padding: 0;
        font-size: 13px;
    }
}

/* Toast Notifications Mobile */
@media (max-width: 768px) {
    .toast-container {
        bottom: 80px;
        right: 12px;
        left: 12px;
        max-width: none;
    }
    
    .toast {
        padding: 12px 14px;
    }
    
    .toast-content h4 {
        font-size: 14px;
    }
    
    .toast-content p {
        font-size: 12px;
    }
}

/* P2P Status Mobile */
@media (max-width: 768px) {
    .p2p-status {
        left: 12px;
        bottom: 80px;
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .back-to-top {
        left: 12px;
        bottom: 80px;
        width: 40px;
        height: 40px;
    }
}

/* Small Mobile - 480px Additional Fixes */
@media (max-width: 480px) {
    /* Even more compact content area */
    .content-area {
        padding: 10px;
    }
    
    /* Breadcrumbs - even shorter on small screens */
    .breadcrumb-item {
        max-width: 100px;
    }
    
    .breadcrumb-item.active {
        max-width: 120px;
    }
    
    /* Question cards */
    .question-card {
        padding: 12px;
    }
    
    .question-card-text,
    .question-text {
        font-size: 14px;
    }
    
    .option,
    .option-tile {
        padding: 10px;
    }
    
    .option-letter {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    
    .option-text {
        font-size: 13px;
    }
    
    /* Appendix cards */
    .appendix-card {
        padding: 12px;
    }
    
    .appendix-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .appendix-title {
        font-size: 14px;
    }
    
    /* Generation stages - scrollable on very small screens */
    .generation-stages {
        margin: 0 -10px;
        padding: 0 10px 8px;
    }
    
    /* Chatbot - full width on small screens */
    .chatbot-panel {
        left: 8px;
        right: 8px;
        bottom: 70px;
    }
    
    .chatbot-toggle {
        right: 12px;
        bottom: 12px;
        padding: 8px 14px;
    }
    
    /* Modal - nearly full screen */
    .modal-overlay {
        padding: 8px;
    }
    
    .modal {
        max-height: 90vh;
        max-height: 90dvh;
    }
    
    /* Summary cards - stack icon and content */
    .summary-card {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    /* Review cards */
    .review-question-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .review-question-actions .action-btn {
        min-width: 100%;
    }
}

/* Touch Target Improvements - Ensure minimum 44px touch targets */
@media (max-width: 768px) {
    button,
    a,
    .nav-item,
    .sidebar-nav-item,
    .appendix-card,
    .option,
    .option-tile {
        min-height: 44px;
    }
    
    .icon-btn,
    .social-links a {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Safe Area Insets for notched devices */
@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        .content-area {
            padding-left: max(12px, env(safe-area-inset-left));
            padding-right: max(12px, env(safe-area-inset-right));
            padding-bottom: max(16px, env(safe-area-inset-bottom));
        }
        
        .quiz-nav-fixed {
            padding-bottom: max(12px, env(safe-area-inset-bottom));
        }
        
        .chatbot-toggle {
            bottom: max(16px, env(safe-area-inset-bottom));
        }
        
        .modal {
            padding-bottom: env(safe-area-inset-bottom);
        }
    }
}

/* Landscape Mobile Orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .modal {
        max-height: 95vh;
        max-height: 95dvh;
    }
    
    .chatbot-panel {
        height: calc(100dvh - 80px);
        max-height: calc(100dvh - 80px);
    }
    
    .generation-progress {
        padding: 16px;
    }
    
    .ai-loader {
        flex-direction: row;
        gap: 16px;
    }
}

/* Prevent horizontal scroll on mobile */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
    }
    
    .app-layout {
        overflow-x: hidden;
    }
}

/* Exam Panel Header Responsiveness */
@media (max-width: 768px) {
    .quiz-header-pagination {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 16px;
        margin: -16px -16px 16px -16px;
    }
    
    .pagination-info {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .appendix-quiz-title {
        font-size: 16px;
        width: 100%;
    }
    
    .chunk-progress {
        white-space: normal;
        word-break: break-word;
    }
    
    #exam-container .quiz-header-pagination .shuffle-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .quiz-header-pagination {
        padding: 10px 12px;
        margin: -12px -12px 12px -12px;
    }
    
    .appendix-quiz-title {
        font-size: 14px;
    }
    
    .pagination-info {
        font-size: 12px;
    }
}

/* Enhanced Mobile Responsiveness - Comprehensive Fixes */
@media (max-width: 768px) {
    /* Main content takes full width on mobile */
    .main-content {
        margin-left: 0 !important;
        max-width: 100vw !important;
        width: 100%;
    }
    
    /* Appendix grid - single column on mobile for better visibility */
    .appendix-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    
    /* Bento grid - single column on mobile */
    .bento-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    
    /* Ensure appendix selection is scrollable and all cards visible */
    .appendix-selection {
        padding: 12px;
        overflow-y: auto;
        max-height: none;
    }
    
    /* Hero section compact on mobile */
    .appendix-hero {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .appendix-hero h1 {
        font-size: 20px;
        line-height: 1.3;
    }
    
    .appendix-hero p {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    /* Hero stats horizontal scroll or wrap */
    .hero-stats {
        gap: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-stat-value {
        font-size: 18px;
    }
    
    .hero-stat-label {
        font-size: 11px;
    }
    
    /* Hero credits compact */
    .hero-credits {
        font-size: 11px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }
    
    /* Top bar improvements */
    .top-bar {
        padding: 0 12px;
        gap: 8px;
    }
    
    /* Breadcrumbs truncation */
    .breadcrumbs {
        font-size: 12px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 60%;
    }
    
    /* Content area full width */
    .content-area {
        padding: 12px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Quiz layout single column */
    .quiz-layout {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    
    /* AI tutor sidebar - full width on mobile */
    .ai-tutor-sidebar {
        position: static;
        max-height: none;
        width: 100%;
        margin-top: 16px;
    }
    
    /* Question card improvements */
    .question-card {
        padding: 14px;
        margin-bottom: 12px;
        border-radius: var(--radius-sm);
    }
    
    .question-card-header {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .question-card-actions {
        display: flex;
        gap: 8px;
        flex-wrap: nowrap;
    }
    
    /* Options better touch targets */
    .option,
    .option-tile {
        padding: 14px 12px;
        min-height: 48px;
    }
    
    /* Insights grid responsive */
    .insights-summary-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* Progress panel responsive */
    .progress-overview {
        flex-direction: column;
        gap: 16px;
    }
    
    /* Modal improvements */
    .modal {
        width: calc(100vw - 24px);
        max-width: none;
        margin: 12px;
    }
    
    /* Chatbot panel full width */
    .chatbot-panel {
        left: 12px;
        right: 12px;
        width: auto;
        bottom: 70px;
        height: calc(100dvh - 100px);
        max-height: calc(100dvh - 100px);
    }
}

/* Small mobile - 480px and below */
@media (max-width: 480px) {
    /* Even more compact spacing */
    .content-area {
        padding: 8px;
    }
    
    .appendix-selection {
        padding: 8px;
    }
    
    .appendix-hero {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .appendix-hero h1 {
        font-size: 18px;
    }
    
    .appendix-hero p {
        font-size: 12px;
    }
    
    .hero-stats {
        gap: 12px;
    }
    
    .hero-stat-value {
        font-size: 16px;
    }
    
    .hero-stat-label {
        font-size: 10px;
    }
    
    /* Appendix cards compact */
    .appendix-card {
        padding: 12px;
    }
    
    .appendix-card-header {
        gap: 10px;
        margin-bottom: 10px;
    }
    
    .appendix-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .appendix-title {
        font-size: 13px;
    }
    
    .appendix-letter {
        font-size: 10px;
    }
    
    .appendix-stats {
        gap: 12px;
    }
    
    .appendix-stat {
        font-size: 11px;
    }
    
    /* Question cards compact */
    .question-card {
        padding: 10px;
    }
    
    .question-card-text,
    .question-text {
        font-size: 13px;
    }
    
    .option,
    .option-tile {
        padding: 10px;
    }
    
    .option-letter {
        width: 22px;
        height: 22px;
        font-size: 10px;
    }
    
    .option-text {
        font-size: 12px;
    }
    
    /* Insights single column */
    .insights-summary-row {
        grid-template-columns: 1fr;
    }
    
    /* Top bar minimal */
    .top-bar {
        padding: 0 8px;
        height: 50px;
    }
    
    .mobile-menu-btn {
        width: 36px;
        height: 36px;
    }
    
    /* Breadcrumbs hidden on very small screens */
    .breadcrumbs {
        max-width: 50%;
        font-size: 11px;
    }
}
