/* ========================================
   Azure Certification Portal - Styles
   Microsoft Fluent Design Inspired
   ======================================== */

/* --- CSS Variables --- */
:root {
    --primary: #0078d4;
    --primary-hover: #106ebe;
    --primary-dark: #005a9e;
    --primary-light: #deecf9;
    --primary-bg: rgba(0,120,212,0.08);
    --success: #107c10;
    --success-light: #dff6dd;
    --warning: #ffb900;
    --warning-light: #fff4ce;
    --danger: #d13438;
    --danger-light: #fde7e9;
    --bg-page: #f5f5f5;
    --bg-card: #ffffff;
    --bg-sidebar: #1b1a19;
    --bg-sidebar-hover: #2d2c2b;
    --bg-input: #ffffff;
    --text-primary: #323130;
    --text-secondary: #605e5c;
    --text-tertiary: #a19f9d;
    --text-sidebar: #edebe9;
    --text-sidebar-dim: #a19f9d;
    --border: #e1dfdd;
    --border-strong: #c8c6c4;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.07);
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --sidebar-width: 260px;
    --topbar-height: 56px;
    --transition: 0.2s ease;
}

[data-theme="dark"] {
    --bg-page: #1a1a1a;
    --bg-card: #2d2d2d;
    --bg-sidebar: #111111;
    --bg-sidebar-hover: #1f1f1f;
    --bg-input: #3d3d3d;
    --text-primary: #e4e4e4;
    --text-secondary: #a0a0a0;
    --text-tertiary: #707070;
    --border: #404040;
    --border-strong: #555;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
    --primary-light: #1a3a5c;
    --primary-bg: rgba(0,120,212,0.15);
    --success-light: #1a3a1a;
    --warning-light: #3a3010;
    --danger-light: #3a1a1a;
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
img { max-width: 100%; }

/* --- Layout --- */
#app { display: flex; min-height: 100vh; }

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    color: var(--text-sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    overflow-y: auto;
    transition: transform var(--transition);
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

.sidebar-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 1.5rem; }
.logo-text { font-size: 1rem; font-weight: 600; letter-spacing: -0.02em; }

#sidebar-nav { flex: 1; padding: 8px 0; overflow-y: auto; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: calc(100% - 16px);
    margin: 2px 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-sidebar-dim);
    font-size: 0.875rem;
    transition: all var(--transition);
    text-align: left;
    position: relative;
}
.nav-item:hover { background: var(--bg-sidebar-hover); color: var(--text-sidebar); }
.nav-item.active {
    background: var(--primary);
    color: #fff;
    font-weight: 500;
}
.nav-icon { font-size: 1rem; flex-shrink: 0; width: 20px; text-align: center; }
.nav-progress {
    margin-left: auto;
    font-size: 0.7rem;
    opacity: 0.6;
    min-width: 28px;
    text-align: right;
}
.nav-group { margin-top: 8px; }
.nav-group-label {
    padding: 6px 20px 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-sidebar-dim);
    font-weight: 600;
}

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.lang-switch { display: flex; gap: 4px; }
.lang-btn {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-sidebar-dim);
    transition: all var(--transition);
}
.lang-btn:hover { color: var(--text-sidebar); }
.lang-btn.active { background: var(--primary); color: #fff; }
.icon-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    color: var(--text-sidebar-dim);
    transition: all var(--transition);
}
.icon-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-sidebar); }

/* --- Main --- */
#main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Topbar --- */
#topbar {
    height: var(--topbar-height);
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 50;
}
#topbar h1 { font-size: 1.125rem; font-weight: 600; flex: 1; }
#topbar-actions { display: flex; gap: 8px; align-items: center; }

/* --- Content --- */
#content {
    flex: 1;
    padding: 24px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
    border: 1px solid transparent;
    white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--bg-input); color: var(--text-primary); border-color: var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { opacity: 0.9; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: 0.9; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-bg); }
.btn-lg { padding: 12px 28px; font-size: 1rem; border-radius: var(--radius); }
.btn-sm { padding: 4px 12px; font-size: 0.8rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-icon { padding: 8px; min-width: 36px; justify-content: center; }

/* --- Cards --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.card-icon { font-size: 2rem; }
.card-title { font-size: 1.1rem; font-weight: 600; }
.card-subtitle { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }
.card-body { font-size: 0.875rem; color: var(--text-secondary); }
.card-footer { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }

/* --- Dashboard Grid --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.exam-card { cursor: pointer; position: relative; overflow: hidden; }
.exam-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.exam-card .card-header { justify-content: space-between; }
.exam-card .level-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}
.level-fundamentals { background: #e8f5e9; color: #2e7d32; }
.level-associate { background: #e3f2fd; color: #1565c0; }
.level-expert { background: #f3e5f5; color: #7b1fa2; }
[data-theme="dark"] .level-fundamentals { background: #1b3a1b; color: #66bb6a; }
[data-theme="dark"] .level-associate { background: #1a2a3a; color: #64b5f6; }
[data-theme="dark"] .level-expert { background: #2a1a3a; color: #ce93d8; }

.must-badge {
    position: absolute;
    top: -4px; right: -4px;
    background: var(--warning);
    color: #000;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 0 var(--radius-lg) 0 var(--radius);
    text-transform: uppercase;
}

/* --- Progress Bar --- */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin: 8px 0;
}
.progress-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--primary), #00bcf2);
    transition: width 0.5s ease;
}
.progress-fill.high { background: linear-gradient(90deg, var(--success), #4caf50); }
.progress-fill.low { background: linear-gradient(90deg, var(--danger), #e57373); }
.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* --- Stats Row --- */
.stats-row {
    display: flex;
    gap: 12px;
    margin: 8px 0;
}
.stat {
    text-align: center;
    flex: 1;
    padding: 6px;
    border-radius: var(--radius-sm);
    background: var(--bg-page);
}
.stat-value { font-size: 1.25rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 0.7rem; color: var(--text-secondary); }

/* --- Exam Detail --- */
.exam-header {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.exam-info { flex: 1; min-width: 280px; }
.exam-info h2 { font-size: 1.5rem; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.exam-info p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 16px; }
.exam-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.exam-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.exam-meta-item strong { color: var(--text-primary); }
.exam-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* --- Domain Cards --- */
.domains-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-top: 20px;
}
.domain-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    border-left: 4px solid var(--primary);
}
.domain-card h4 { font-size: 0.9rem; margin-bottom: 4px; }
.domain-card .weight { font-size: 0.8rem; color: var(--primary); font-weight: 600; margin-bottom: 8px; }
.domain-card ul { padding-left: 16px; font-size: 0.8rem; color: var(--text-secondary); }
.domain-card li { margin-bottom: 4px; }

/* --- Question UI --- */
.question-container {
    max-width: 800px;
    margin: 0 auto;
}
.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}
.question-nav-btns {
    display: flex;
    gap: 8px;
}
.question-counter {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.question-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}
.badge-easy { background: var(--success-light); color: var(--success); }
.badge-medium { background: var(--warning-light); color: #d48800; }
.badge-hard { background: var(--danger-light); color: var(--danger); }
.badge-domain { background: var(--primary-bg); color: var(--primary); }
.badge-type { background: var(--bg-page); color: var(--text-secondary); border: 1px solid var(--border); }

/* --- Scenario Box --- */
.scenario-box {
    background: var(--primary-bg);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
}
.scenario-box h3 {
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.scenario-box p { font-size: 0.875rem; line-height: 1.7; white-space: pre-line; }

/* --- Question Text --- */
.question-text {
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.6;
}
.select-hint {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-style: italic;
    margin-bottom: 16px;
}

/* --- Options --- */
.options-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.9rem;
}
.option:hover { border-color: var(--primary); background: var(--primary-bg); }
.option.selected { border-color: var(--primary); background: var(--primary-bg); }
.option.correct { border-color: var(--success); background: var(--success-light); }
.option.incorrect { border-color: var(--danger); background: var(--danger-light); }
.option.correct-highlight { border-color: var(--success); background: var(--success-light); opacity: 0.8; }
.option.disabled { pointer-events: none; }
.option-letter {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    background: var(--bg-page);
    border: 1px solid var(--border);
    flex-shrink: 0;
}
.option.selected .option-letter { background: var(--primary); color: #fff; border-color: var(--primary); }
.option.correct .option-letter { background: var(--success); color: #fff; border-color: var(--success); }
.option.incorrect .option-letter { background: var(--danger); color: #fff; border-color: var(--danger); }
.option-text { flex: 1; padding-top: 3px; }

/* --- Explanation --- */
.explanation-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 16px;
    animation: fadeIn 0.3s ease;
}
.explanation-box h3 {
    font-size: 0.95rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.explanation-box p { font-size: 0.875rem; line-height: 1.7; color: var(--text-secondary); }
.hint-box {
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--warning-light);
    border-radius: var(--radius-sm);
}
.hint-box h4 { font-size: 0.85rem; color: #d48800; margin-bottom: 4px; }
.hint-box p { font-size: 0.825rem; }
.ref-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    font-size: 0.825rem;
    color: var(--primary);
}

/* --- Quiz Timer --- */
.timer-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
}
.timer-icon { font-size: 1.2rem; }
.timer-text { font-size: 0.9rem; font-weight: 600; }
.timer-text.warning { color: var(--warning); }
.timer-text.danger { color: var(--danger); animation: pulse 1s infinite; }
.timer-progress { flex: 1; }

/* --- Question Map --- */
.question-map {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 12px 0;
}
.qmap-item {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--bg-card);
}
.qmap-item:hover { border-color: var(--primary); }
.qmap-item.current { border-color: var(--primary); background: var(--primary-bg); font-weight: 700; }
.qmap-item.answered { background: var(--primary); color: #fff; border-color: var(--primary); }
.qmap-item.correct-map { background: var(--success); color: #fff; border-color: var(--success); }
.qmap-item.incorrect-map { background: var(--danger); color: #fff; border-color: var(--danger); }

/* --- Results --- */
.results-container { max-width: 700px; margin: 0 auto; text-align: center; }
.results-score {
    font-size: 4rem;
    font-weight: 800;
    margin: 16px 0;
    background: linear-gradient(135deg, var(--primary), #00bcf2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.results-score.failed {
    background: linear-gradient(135deg, var(--danger), #e57373);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.results-label {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
}
.results-label.passed { color: var(--success); }
.results-label.failed { color: var(--danger); }
.results-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 24px 0;
}
.results-stat {
    padding: 16px;
    border-radius: var(--radius);
    background: var(--bg-page);
}
.results-stat .value { font-size: 1.5rem; font-weight: 700; }
.results-stat .label { font-size: 0.8rem; color: var(--text-secondary); margin-top: 4px; }

/* --- Filter Bar --- */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}
.filter-bar select {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
}
.filter-bar label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    backdrop-filter: blur(4px);
}
.modal-overlay.hidden { display: none; }
.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.2s ease;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.modal-header h2 { font-size: 1.1rem; }
.modal-header .icon-btn { color: var(--text-secondary); }

/* --- Loading --- */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}
.spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-tertiary);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 12px; }

/* --- Section Header --- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.section-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

/* --- Animations --- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* --- Utility --- */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

.desktop-hidden { display: none; }
.mobile-only { display: none; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
    #main {
        margin-left: 0;
    }
    .desktop-hidden { display: flex; }
    .mobile-only { display: flex; }
    #content { padding: 16px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .exam-header { flex-direction: column; }
    .results-stats { grid-template-columns: 1fr; }
    .question-nav-btns { width: 100%; }
    .question-nav-btns .btn { flex: 1; }
}

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

/* --- Topbar actions dark theme fix --- */
#topbar .icon-btn { color: var(--text-secondary); }
#topbar .icon-btn:hover { background: var(--bg-page); }

/* --- Review mode --- */
.review-item {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    background: var(--bg-card);
}
.review-item.review-correct { border-left: 4px solid var(--success); }

/* --- Company Profile Cards --- */
.companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.company-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), border-color var(--transition);
}
.company-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary);
}
.company-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.company-logo {
    font-size: 2rem;
    line-height: 1;
}
.company-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}
.company-industry {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 500;
}
.company-meta {
    display: flex;
    gap: 16px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.company-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}
.company-details {
    margin-top: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.company-details summary {
    padding: 8px 12px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    background: var(--bg-page);
    color: var(--text-primary);
    user-select: none;
}
.company-details summary:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.company-details[open] summary {
    border-bottom: 1px solid var(--border);
}
.company-details ul {
    list-style: none;
    padding: 8px 12px;
    margin: 0;
}
.company-details li {
    font-size: 0.82rem;
    color: var(--text-secondary);
    padding: 3px 0;
    line-height: 1.4;
}
.company-details li::before {
    content: '•';
    color: var(--primary);
    font-weight: bold;
    margin-right: 6px;
}
@media (max-width: 600px) {
    .companies-grid { grid-template-columns: 1fr; }
}
.review-item.review-incorrect { border-left: 4px solid var(--danger); }
.review-question { font-weight: 500; margin-bottom: 8px; }
.review-answer { font-size: 0.875rem; color: var(--text-secondary); }
.review-answer span { font-weight: 500; }
.review-answer .correct-text { color: var(--success); }
.review-answer .incorrect-text { color: var(--danger); }

/* --- Quiz Start Config --- */
.quiz-config {
    max-width: 500px;
    margin: 0 auto;
}
.quiz-config .form-group {
    margin-bottom: 16px;
}
.quiz-config label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-secondary);
}
.quiz-config select,
.quiz-config input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
}
.quiz-config .checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.quiz-config .checkbox-group input[type="checkbox"] {
    width: auto;
}
