/* ========================================================
   NEET (UG) CBT Examination System - Pure CSS Stylesheet
   ======================================================== */
:root {
    --primary: #1e40af;
    --primary-hover: #1d4ed8;
    --secondary: #475569;
    --success: #15803d;
    --danger: #b91c1c;
    --warning: #b45309;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --radius: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    font-size: 14px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Navbar */
.navbar {
    background-color: #0f172a;
    color: #ffffff;
    padding: 12px 0;
    border-bottom: 2px solid #2563eb;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.logo-badge {
    background-color: #2563eb;
    color: white;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}
.admin-badge {
    background-color: #dc2626;
}
.brand h1 {
    font-size: 18px;
    font-weight: 700;
}
.brand small {
    color: #94a3b8;
    font-size: 11px;
    display: block;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
}
.welcome-text {
    font-size: 13px;
    color: #cbd5e1;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    text-align: center;
}
.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); }
.btn-outline { background-color: transparent; border-color: #cbd5e1; color: inherit; }
.btn-outline:hover { background-color: rgba(255,255,255,0.1); }
.btn-danger { background-color: var(--danger); color: white; }
.btn-warning { background-color: var(--warning); color: white; }
.btn-secondary { background-color: var(--secondary); color: white; }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 4px 8px; font-size: 12px; }

/* Main Content */
.main-content {
    padding: 24px 16px;
}
.hero-card {
    background: linear-gradient(135deg, #1e3a8a, #0f172a);
    color: white;
    padding: 32px;
    border-radius: var(--radius);
    margin-bottom: 24px;
}
.hero-body h2 { font-size: 24px; margin-bottom: 8px; }
.hero-body p { color: #cbd5e1; font-size: 14px; max-width: 800px; margin-bottom: 16px; }
.nta-rules-row { display: flex; flex-wrap: wrap; gap: 8px; }
.rule-badge { background: rgba(255,255,255,0.15); padding: 4px 10px; border-radius: 20px; font-size: 12px; }

/* Test Grid */
.section-header { margin-bottom: 16px; }
.section-header h3 { font-size: 18px; font-weight: 700; color: #1e293b; }
.section-header p { font-size: 13px; color: var(--text-muted); }
.test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.test-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.test-badge {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}
.test-card h4 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.test-meta { font-size: 12px; color: var(--secondary); margin-bottom: 16px; line-height: 1.8; }

/* Auth Pages */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #e2e8f0;
}
.auth-card {
    background: white;
    width: 100%;
    max-width: 440px;
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.auth-header { text-align: center; margin-bottom: 24px; }
.auth-header h2 { font-size: 20px; margin-top: 8px; }
.auth-header p { font-size: 12px; color: var(--text-muted); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
}
.form-control:focus { outline: none; border-color: var(--primary); }
.form-row { display: flex; gap: 12px; }
.col-half { flex: 1; }
.demo-credentials {
    background: #f1f5f9;
    padding: 12px;
    border-radius: var(--radius);
    font-size: 11px;
    margin-top: 16px;
    border: 1px dashed #cbd5e1;
}
.demo-credentials ul { margin-left: 16px; margin-top: 4px; }
.auth-footer { text-align: center; margin-top: 16px; font-size: 12px; }

/* CBT Interface */
.cbt-body { background: #f1f5f9; }
.cbt-header {
    background: #0f172a;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #2563eb;
}
.nta-tag { background: #2563eb; padding: 2px 6px; border-radius: 3px; font-weight: bold; font-size: 11px; margin-right: 8px; }
.cbt-candidate-info { font-size: 13px; display: flex; gap: 16px; color: #cbd5e1; }
.cbt-timer-box { background: #dc2626; color: white; padding: 6px 14px; border-radius: 4px; font-weight: 700; font-family: monospace; font-size: 16px; }

.cbt-container {
    display: flex;
    height: calc(100vh - 55px);
}
.cbt-question-area {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.subject-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    border-bottom: 2px solid #cbd5e1;
    padding-bottom: 4px;
}
.subject-tab {
    padding: 8px 16px;
    background: #e2e8f0;
    border: none;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
}
.subject-tab.active { background: #1e40af; color: white; }

.question-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.question-header { display: flex; justify-content: space-between; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid #f1f5f9; }
.q-number { font-size: 16px; font-weight: 700; color: #1e3a8a; }
.badge-pos { background: #dcfce7; color: #166534; padding: 2px 6px; border-radius: 3px; font-size: 11px; font-weight: bold; }
.badge-neg { background: #fee2e2; color: #991b1b; padding: 2px 6px; border-radius: 3px; font-size: 11px; font-weight: bold; margin-left: 4px; }
.question-body { flex: 1; font-size: 15px; }
.question-text { font-size: 16px; font-weight: 500; margin-bottom: 20px; line-height: 1.6; }
.options-group { display: flex; flex-direction: column; gap: 10px; }
.option-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s;
}
.option-label:hover { background: #f8fafc; }
.option-label.selected { background: #eff6ff; border-color: #3b82f6; }

.cbt-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}
.cbt-footer-left, .cbt-footer-right { display: flex; gap: 8px; }

/* Palette Sidebar */
.cbt-palette-sidebar {
    width: 320px;
    background: white;
    border-left: 1px solid var(--border);
    padding: 16px;
    display: flex;
    flex-direction: column;
}
.palette-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 11px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #e2e8f0; }
.legend-item { display: flex; align-items: center; gap: 6px; }
.palette-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; overflow-y: auto; flex: 1; padding: 8px 0; }
.palette-btn {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    background: #f1f5f9;
}
.state-answered { background: #22c55e !important; color: white; border-color: #16a34a !important; }
.state-not-answered { background: #ef4444 !important; color: white; border-color: #dc2626 !important; }
.state-not-visited { background: #e2e8f0 !important; color: #475569; }
.state-review { background: #8b5cf6 !important; color: white; border-color: #7c3aed !important; }
.palette-btn.active-q { outline: 2px solid #000; outline-offset: 1px; }

.submit-section { margin-top: 16px; }

/* Tables */
.table-responsive { overflow-x: auto; background: white; border-radius: var(--radius); border: 1px solid var(--border); }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { background: #f8fafc; padding: 12px 16px; border-bottom: 2px solid var(--border); font-size: 12px; font-weight: 700; color: #475569; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; font-size: 13px; }

/* Scorecard */
.scorecard-hero { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; display: flex; justify-content: space-between; align-items: center; }
.score-big { font-size: 40px; font-weight: 800; color: #1e3a8a; }
.score-badge { display: inline-block; background: #fef3c7; color: #92400e; padding: 4px 10px; border-radius: 4px; font-size: 13px; font-weight: 600; margin-top: 8px; }
.score-stats-grid { display: flex; gap: 24px; }
.stat-box { text-align: center; }
.stat-num { font-size: 24px; font-weight: 800; display: block; }
.stat-title { font-size: 11px; color: var(--text-muted); }
.text-success { color: #15803d; }
.text-danger { color: #b91c1c; }
.text-muted { color: #64748b; }

.solution-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.status-correct { border-left: 6px solid #22c55e; }
.status-incorrect { border-left: 6px solid #ef4444; }
.status-unattempted { border-left: 6px solid #94a3b8; }
.sol-header { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 12px; }
.sol-question-text { font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.sol-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.sol-opt { padding: 10px 14px; border: 1px solid #e2e8f0; border-radius: var(--radius); display: flex; justify-content: space-between; align-items: center; }
.option-correct { background: #f0fdf4; border-color: #86efac; color: #166534; font-weight: 600; }
.option-wrong { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.tag-correct { font-size: 11px; background: #22c55e; color: white; padding: 2px 6px; border-radius: 3px; }
.tag-wrong { font-size: 11px; background: #ef4444; color: white; padding: 2px 6px; border-radius: 3px; }
.ncert-explanation { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: var(--radius); padding: 14px; font-size: 13px; line-height: 1.6; }
.ncert-cite { color: #0284c7; font-weight: 600; display: block; margin-top: 6px; }

/* ========================================================
   ADMIN SUITE EXPANDED STYLES (Matching Web Applet Look & Feel)
   ======================================================== */
.admin-body { background-color: #f1f5f9; }
.admin-navbar { background-color: #0f172a; border-bottom: 2px solid #3b82f6; padding: 14px 0; }
.admin-badge { background-color: #f59e0b; color: #000; font-weight: 800; }
.btn-outline-light { border: 1px solid #475569; color: #e2e8f0; background: transparent; }
.btn-outline-light:hover { background: #334155; color: #fff; }
.btn-xs { padding: 4px 8px; font-size: 11px; border-radius: 4px; }
.btn-primary-alt { background-color: #4f46e5; color: white; }
.btn-primary-alt:hover { background-color: #4338ca; }

/* Subnav Tabs */
.admin-subnav { background: #1e293b; border-bottom: 1px solid #334155; position: sticky; top: 0; z-index: 100; }
.subnav-container { display: flex; gap: 4px; overflow-x: auto; padding: 6px 16px; }
.subnav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}
.subnav-tab:hover { background: #334155; color: #f8fafc; }
.subnav-tab.active { background: #2563eb; color: #ffffff; }
.tab-badge { background: rgba(255,255,255,0.2); padding: 1px 6px; border-radius: 12px; font-size: 11px; }

/* Metrics Grid */
.admin-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.admin-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.border-blue { border-left: 5px solid #2563eb; }
.border-amber { border-left: 5px solid #f59e0b; }
.border-emerald { border-left: 5px solid #10b981; }
.border-purple { border-left: 5px solid #8b5cf6; }

.stat-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.bg-blue { background: #eff6ff; }
.bg-amber { background: #fffbeb; }
.bg-emerald { background: #ecfdf5; }
.bg-purple { background: #f5f3ff; }

.stat-info { display: flex; flex-direction: column; }
.stat-label { font-size: 12px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-val { font-size: 26px; font-weight: 800; color: #0f172a; line-height: 1.2; margin: 4px 0 2px; }
.stat-hint { font-size: 11px; color: #94a3b8; }

/* Action Command Bar */
.admin-action-bar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.action-bar-title strong { display: block; font-size: 14px; color: #0f172a; }
.action-bar-title span { font-size: 12px; color: #64748b; }
.action-buttons-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* Admin Cards */
.admin-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.card-header-flex, .tab-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.card-header-flex h3, .tab-header-flex h2 { font-size: 18px; font-weight: 700; color: #0f172a; }
.card-header-flex p, .tab-header-flex p { font-size: 13px; color: #64748b; margin-top: 2px; }

/* Filter Card */
.filter-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
}
.filter-inputs-grid {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1.2fr auto;
    gap: 12px;
    align-items: flex-end;
}
.filter-actions { display: flex; gap: 6px; }

/* Question Cards & Options */
.questions-deck { display: flex; flex-direction: column; gap: 16px; }
.deck-header { font-size: 13px; color: #64748b; margin-bottom: 4px; }
.admin-question-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.admin-q-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 8px;
}
.q-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.subject-pill { padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.sub-physics { background: #dbeafe; color: #1e40af; }
.sub-chemistry { background: #fef3c7; color: #92400e; }
.sub-botany { background: #d1fae5; color: #065f46; }
.sub-zoology { background: #ede9fe; color: #5b21b6; }
.sub-biology { background: #d1fae5; color: #065f46; }

.diff-pill { padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.diff-easy { background: #dcfce7; color: #166534; }
.diff-medium { background: #fef9c3; color: #854d0e; }
.diff-hard { background: #fee2e2; color: #991b1b; }
.chapter-pill { padding: 3px 8px; border-radius: 4px; font-size: 11px; background: #f1f5f9; color: #475569; }

.q-text { font-size: 15px; font-weight: 600; color: #0f172a; margin-bottom: 14px; line-height: 1.6; }
.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}
@media (max-width: 640px) { .options-grid { grid-template-columns: 1fr; } }
.opt-box {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    background: #fafafa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.opt-correct {
    background: #f0fdf4 !important;
    border-color: #86efac !important;
    color: #166534 !important;
    font-weight: 600;
}
.check-badge { font-size: 11px; background: #22c55e; color: white; padding: 2px 6px; border-radius: 3px; }

.q-meta-footer {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 12px;
    color: #475569;
    margin-top: 10px;
}
.ncert-tag { font-weight: 600; color: #0284c7; margin-bottom: 4px; }

/* Test Paper Cards */
.tests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.admin-test-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.test-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.test-type-pill { background: #eff6ff; color: #1d4ed8; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.status-pill { padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 700; }
.status-pub { background: #dcfce7; color: #166534; }
.status-draft { background: #f1f5f9; color: #64748b; }
.test-card-title { font-size: 16px; font-weight: 700; color: #0f172a; margin-bottom: 14px; flex: 1; }
.test-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: #f8fafc;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 16px;
}
.spec-item { display: flex; flex-direction: column; }
.spec-lbl { font-size: 10px; color: #94a3b8; text-transform: uppercase; }
.spec-item strong { font-size: 13px; color: #1e293b; }
.test-card-actions { display: flex; gap: 8px; margin-top: auto; }

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 20px;
}
.modal-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2);
}
.modal-lg { max-width: 780px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid #f1f5f9; padding-bottom: 12px; }
.modal-header h3 { font-size: 18px; font-weight: 700; color: #0f172a; }
.close-btn { background: none; border: none; font-size: 24px; cursor: pointer; color: #64748b; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; border-top: 1px solid #f1f5f9; padding-top: 16px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Selector Box */
.questions-selector-box {
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px 12px;
    background: #fafafa;
}
.q-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    padding: 4px 0;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
}

/* CSV Uploader */
.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 768px) { .admin-grid-2 { grid-template-columns: 1fr; } }
.drop-zone {
    border: 2px dashed #3b82f6;
    border-radius: 8px;
    padding: 32px 16px;
    text-align: center;
    background: #eff6ff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}
.drop-icon { font-size: 36px; }
.divider-text { text-align: center; margin: 16px 0; position: relative; }
.divider-text::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: #e2e8f0; z-index: 1; }
.divider-text span { background: #ffffff; padding: 0 10px; font-size: 11px; font-weight: 700; color: #94a3b8; position: relative; z-index: 2; }
.csv-spec-list { padding-left: 20px; font-size: 12px; color: #475569; line-height: 1.8; margin-top: 12px; }
.csv-spec-list code { background: #f1f5f9; padding: 2px 4px; border-radius: 3px; font-weight: bold; }
.font-mono { font-family: monospace; font-size: 12px; }

/* Status Badges */
.roll-pill { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 12px; font-weight: bold; color: #334155; }
.score-pill { padding: 3px 8px; border-radius: 4px; font-size: 12px; font-weight: 700; display: inline-block; }
.score-high { background: #dcfce7; color: #166534; }
.score-med { background: #fef9c3; color: #854d0e; }
.score-low { background: #fee2e2; color: #991b1b; }
.badge-sub { background: #f1f5f9; color: #475569; padding: 2px 6px; border-radius: 4px; font-size: 11px; }
.badge-test-pill {
    display: inline-block;
    background: #e0e7ff;
    color: #3730a3;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #c7d2fe;
    margin: 2px 4px 2px 0;
}
.assigned-tests-row {
    margin-top: 6px;
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}
.q-actions-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.btn-indigo {
    background-color: #4f46e5;
    color: #ffffff;
    border: 1px solid #4338ca;
}
.btn-indigo:hover {
    background-color: #4338ca;
    color: #ffffff;
}
.flex-gap-2 { display: flex; gap: 8px; }
.empty-box { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 32px; text-align: center; color: #64748b; font-size: 13px; }

/* ========================================================
   HIGH-FIDELITY NTA NEET CBT EXAM STYLES
   ======================================================== */
.cbt-header-brand { display: flex; align-items: center; gap: 12px; }
.cbt-title-row { display: flex; align-items: center; gap: 8px; }
.cbt-test-title { font-size: 15px; font-weight: 700; color: #ffffff; }
.cbt-pattern-badge { background: #2563eb; color: #fff; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 3px; }
.cbt-sub-info { font-size: 11px; color: #94a3b8; display: flex; gap: 6px; align-items: center; }
.cbt-dot { color: #64748b; }
.cbt-header-right { display: flex; align-items: center; gap: 14px; }
.cbt-sync-indicator { font-size: 11px; color: #22c55e; display: flex; align-items: center; gap: 5px; background: rgba(34,197,94,0.1); padding: 4px 8px; border-radius: 4px; }
.sync-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; }
.cbt-timer-card { background: #dc2626; color: white; display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 6px; }
.cbt-timer-card.timer-warning { background: #b91c1c; animation: pulse 1s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
.timer-icon { font-size: 16px; }
.timer-text-wrap { display: flex; flex-direction: column; }
.timer-sub { font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.85; }
.timer-digits { font-size: 17px; font-weight: 800; font-family: monospace; letter-spacing: 1px; }
.cbt-header-actions { display: flex; gap: 6px; }
.btn-cbt-action { background: #1e293b; color: #e2e8f0; border: 1px solid #334155; padding: 6px 10px; border-radius: 4px; font-size: 11px; cursor: pointer; }
.btn-cbt-action:hover { background: #334155; color: #fff; }

.cbt-section-bar { background: #e2e8f0; display: flex; align-items: center; padding: 4px 16px; border-bottom: 2px solid #cbd5e1; gap: 12px; }
.section-label { font-size: 11px; font-weight: 800; color: #475569; text-transform: uppercase; }
.section-tabs { display: flex; gap: 4px; }
.cbt-section-tab { background: #cbd5e1; color: #334155; border: none; padding: 6px 12px; border-radius: 4px 4px 0 0; font-weight: 700; font-size: 12px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.cbt-section-tab.active { background: #1e40af; color: #ffffff; }
.tab-counter-pill { background: rgba(0,0,0,0.15); font-size: 10px; padding: 1px 5px; border-radius: 10px; }
.cbt-section-tab.active .tab-counter-pill { background: rgba(255,255,255,0.25); color: #fff; }

.cbt-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; flex: 1; display: flex; flex-direction: column; }
.cbt-q-meta { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f1f5f9; padding-bottom: 10px; margin-bottom: 14px; }
.cbt-q-meta-left { display: flex; align-items: center; gap: 8px; }
.cbt-q-number { font-size: 16px; font-weight: 800; color: #1e3a8a; }
.cbt-pill { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 3px; }
.cbt-pill-sub { background: #dbeafe; color: #1e40af; }
.cbt-pill-diff { background: #fef3c7; color: #92400e; }
.cbt-q-meta-right { font-size: 11px; font-weight: 700; }
.cbt-mark-pos { background: #dcfce7; color: #166534; padding: 2px 6px; border-radius: 3px; }
.cbt-mark-neg { background: #fee2e2; color: #991b1b; padding: 2px 6px; border-radius: 3px; margin-left: 4px; }
.cbt-q-body { flex: 1; }
.cbt-question-text { font-size: 15px; font-weight: 500; line-height: 1.6; color: #0f172a; margin-bottom: 20px; }
.cbt-options-grid { display: flex; flex-direction: column; gap: 10px; }
.cbt-option-card { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border: 1px solid #cbd5e1; border-radius: 6px; cursor: pointer; transition: all 0.15s; background: #fff; }
.cbt-option-card:hover { background: #f8fafc; border-color: #94a3b8; }
.cbt-option-card.selected { background: #eff6ff; border-color: #2563eb; }
.opt-letter { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #f1f5f9; font-weight: 700; font-size: 11px; color: #475569; }
.cbt-option-card.selected .opt-letter { background: #2563eb; color: #fff; }
.opt-text { font-size: 14px; color: #1e293b; }

.cbt-control-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; border-top: 1px solid #f1f5f9; margin-top: 20px; gap: 8px; flex-wrap: wrap; }
.cbt-footer-left, .cbt-footer-right { display: flex; gap: 6px; }
.btn-cbt-purple { background: #7c3aed; color: white; border: none; padding: 8px 12px; border-radius: 4px; font-weight: 600; font-size: 12px; cursor: pointer; }
.btn-cbt-purple:hover { background: #6d28d9; }
.btn-cbt-purple-outline { background: #f5f3ff; color: #6d28d9; border: 1px solid #c4b5fd; padding: 8px 12px; border-radius: 4px; font-weight: 600; font-size: 12px; cursor: pointer; }
.btn-cbt-purple-outline:hover { background: #ede9fe; }
.btn-cbt-primary { background: #2563eb; color: white; border: none; padding: 8px 14px; border-radius: 4px; font-weight: 700; font-size: 12px; cursor: pointer; }
.btn-cbt-primary:hover { background: #1d4ed8; }
.btn-cbt-secondary { background: #475569; color: white; border: none; padding: 8px 12px; border-radius: 4px; font-weight: 600; font-size: 12px; cursor: pointer; }
.btn-cbt-outline { background: #fff; color: #475569; border: 1px solid #cbd5e1; padding: 8px 12px; border-radius: 4px; font-weight: 600; font-size: 12px; cursor: pointer; }
.btn-cbt-outline:hover { background: #f1f5f9; }
.btn-cbt-submit { background: #15803d; color: white; border: none; padding: 10px 18px; border-radius: 6px; font-weight: 800; font-size: 13px; cursor: pointer; width: 100%; }
.btn-cbt-submit:hover { background: #166534; }

/* Candidate Profile inside Palette */
.cbt-candidate-profile { display: flex; align-items: center; gap: 10px; background: #f8fafc; padding: 10px; border-radius: 6px; border: 1px solid #e2e8f0; margin-bottom: 12px; }
.cbt-avatar { width: 36px; height: 36px; border-radius: 50%; background: #1e40af; color: white; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; }
.cbt-candidate-meta { display: flex; flex-direction: column; }
.cbt-roll-mono { font-family: monospace; font-size: 10px; color: #64748b; font-weight: 600; }
.cbt-palette-legend { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; padding: 8px 10px; margin-bottom: 12px; }
.legend-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 11px; margin-bottom: 4px; }
.single-legend { font-size: 11px; margin-top: 4px; }
.legend-cell { display: flex; align-items: center; gap: 6px; }
.pal-legend-badge { width: 22px; height: 20px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; border-radius: 3px; border: 1px solid #cbd5e1; }
.palette-header-strip { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: #475569; margin-bottom: 6px; }
.cbt-submit-wrap { margin-top: 12px; }

/* Palette Cell State Colors */
.pal-cell { height: 34px; display: flex; align-items: center; justify-content: center; border: 1px solid #cbd5e1; border-radius: 4px; font-weight: 700; font-size: 12px; cursor: pointer; }
.pal-answered { background: #22c55e !important; color: white !important; border-color: #16a34a !important; }
.pal-not-answered { background: #ef4444 !important; color: white !important; border-color: #dc2626 !important; }
.pal-not-visited { background: #e2e8f0 !important; color: #475569 !important; border-color: #cbd5e1 !important; }
.pal-review { background: #8b5cf6 !important; color: white !important; border-color: #7c3aed !important; }
.pal-ans-review { background: #6d28d9 !important; color: #fde047 !important; border-color: #4c1d95 !important; position: relative; }
.pal-ans-review::after { content: '★'; position: absolute; top: 1px; right: 2px; font-size: 8px; color: #fde047; }
.pal-active { outline: 2px solid #000 !important; outline-offset: 1px; }

/* Modals for CBT */
.cbt-modal-backdrop { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15,23,42,0.65); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 9999; padding: 20px; }
.cbt-modal { background: #ffffff; border-radius: 10px; width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.25); }
.cbt-modal-lg { max-width: 860px; }
.cbt-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #f1f5f9; }
.cbt-submit-header { background: #f0fdf4; border-bottom: 1px solid #bbf7d0; }
.cbt-modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: #64748b; }
.cbt-modal-body { padding: 20px; }
.cbt-modal-footer { padding: 14px 20px; border-top: 1px solid #f1f5f9; display: flex; justify-content: flex-end; gap: 8px; }
.paper-q-item { border-bottom: 1px solid #f1f5f9; padding-bottom: 14px; margin-bottom: 14px; }
.paper-q-header { display: flex; gap: 8px; margin-bottom: 6px; }
.paper-q-text { font-size: 13px; font-weight: 600; color: #0f172a; margin-bottom: 8px; }
.paper-options { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 12px; color: #334155; }
.submit-warning { background: #fef2f2; border: 1px solid #fecaca; border-radius: 6px; padding: 12px; margin-bottom: 16px; font-size: 12px; color: #991b1b; }
.submit-summary-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 12px; }
.submit-summary-table th, .submit-summary-table td { padding: 8px 10px; border: 1px solid #e2e8f0; }
.submit-summary-table th { background: #f8fafc; font-weight: 700; }
.text-purple { color: #7c3aed; }

/* Footer */
.footer { background: #0f172a; color: #94a3b8; padding: 24px 0; margin-top: 40px; font-size: 12px; text-align: center; }
