@font-face {
    font-family: 'Neue Power';
    src: url('/static/fonts/NeuePower-Ultra.ttf') format('truetype');
    font-weight: 800;
    font-display: swap;
}
@font-face {
    font-family: 'Nimbus Sans L';
    src: url('/static/fonts/NimbusSanL-Bol.otf') format('opentype');
    font-weight: 700;
    font-display: swap;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Nimbus Sans L', Arial, sans-serif; }
body { background: #eef1f5; color: #1f2933; }
.hidden { display: none !important; }

h1 { font-family: 'Neue Power', Arial, sans-serif; font-weight: 800; }

/* Screens (base) */
.screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
/* Dashboard overrides the centering */
.db-screen { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; }

/* Login */
.login-screen { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }

.login-brand {
    position: relative;
    overflow: hidden;
    background: #0b3d91;
    color: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.brand-header { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 44px; height: 44px; border-radius: 10px; background: #f37021; display: flex; align-items: center; justify-content: center; flex-shrink: 0; line-height: 0; }
.brand-mark svg { display: block; }
.brand-header-text { line-height: 1.3; }
.brand-name { font-size: 14px; font-weight: 600; }
.brand-sub { font-size: 12px; color: rgba(255,255,255,0.7); }

.brand-pitch { max-width: 480px; }
.brand-pitch h1 { font-size: 36px; line-height: 1.2; margin-bottom: 16px; }
.brand-pitch > p { font-size: 15px; color: rgba(255,255,255,0.8); line-height: 1.6; }

.brand-features { list-style: none; margin-top: 32px; display: flex; flex-direction: column; gap: 16px; }
.brand-features li { display: flex; align-items: flex-start; gap: 12px; }
.feature-icon { width: 36px; height: 36px; border-radius: 8px; background: rgba(243,112,33,0.15); color: #f37021; display: flex; align-items: center; justify-content: center; flex-shrink: 0; line-height: 0; }
.feature-icon svg { display: block; width: 18px; height: 18px; flex-shrink: 0; }
.feature-title { font-size: 14px; font-weight: 600; }
.feature-desc { font-size: 13px; color: rgba(255,255,255,0.7); margin-top: 2px; }

.brand-disclaimer { font-size: 12px; color: rgba(255,255,255,0.6); }

.login-action { background: #eef1f5; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-action-inner { width: 100%; max-width: 380px; }

.mobile-brand { display: none; flex-direction: column; align-items: center; text-align: center; margin-bottom: 32px; }
.mobile-brand .brand-mark { margin-bottom: 12px; }
.mobile-brand-name { font-size: 17px; font-weight: 700; color: #1f2933; }
.mobile-brand-sub { font-size: 13px; color: #5b6776; }

.login-panel { background: white; border: 1px solid #d7dde5; border-radius: 16px; padding: 32px; box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04); transition: box-shadow 0.25s ease; }
.login-panel:hover { box-shadow: 0 12px 32px -8px rgba(11,61,145,0.18), 0 4px 12px rgba(0,0,0,0.06); }
.login-panel h2 { font-size: 22px; font-weight: 700; color: #0f1b2d; }
.login-panel p { color: #5b6776; font-size: 14px; margin-top: 6px; margin-bottom: 24px; }

.google-btn { width: 100%; height: 44px; background: white; color: #1f2933; border: 1px solid #d7dde5; border-radius: 8px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 14px; transition: background 0.2s ease, box-shadow 0.2s ease; }
.google-btn:hover { background: #f3f4f6; box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.google-logo { flex-shrink: 0; }

.login-legal { font-size: 12px; color: #8a94a3; margin-top: 22px; text-align: center; line-height: 1.5; }
.login-footnote { font-size: 13px; color: #5b6776; text-align: center; margin-top: 22px; }

@media (max-width: 1023px) {
    .login-screen { grid-template-columns: 1fr; }
    .login-brand { display: none; }
    .mobile-brand { display: flex; }
}

/* ===== Dashboard ===== */

/* Navbar */
.db-nav { background: white; border-bottom: 1px solid #e2e8f0; padding: 0 28px; height: 60px; display: flex; align-items: center; gap: 20px; position: sticky; top: 0; z-index: 100; }
.db-nav-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark-sm { width: 34px; height: 34px; border-radius: 8px; background: #f37021; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.db-nav-name { font-size: 13px; font-weight: 700; color: #0f1b2d; line-height: 1.2; }
.db-nav-sub { font-size: 11px; color: #8a94a3; line-height: 1.2; }
.db-nav-search { flex: 1; max-width: 400px; display: flex; align-items: center; gap: 8px; background: #f3f5f8; border: 1px solid #e2e8f0; border-radius: 8px; padding: 0 12px; height: 36px; }
.db-search-input { border: none; background: transparent; font-size: 13px; color: #1f2933; outline: none; width: 100%; }
.db-search-input::placeholder { color: #8a94a3; }
.db-nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.db-icon-btn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid #e2e8f0; background: white; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #5b6776; }
.db-icon-btn:hover { background: #f3f5f8; }
.db-avatar { width: 34px; height: 34px; border-radius: 50%; background: #f37021; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }
#db-avatar-initials { font-size: 13px; font-weight: 700; color: white; }
.db-nav-username { font-size: 13px; font-weight: 600; color: #0f1b2d; }

/* Body */
.db-body { max-width: 1100px; width: 100%; margin: 0 auto; padding: 32px 24px 60px; display: flex; flex-direction: column; gap: 28px; }

/* Hero row */
.db-hero-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.db-greeting { font-family: 'Neue Power', Arial, sans-serif; font-size: 28px; color: #0f1b2d; line-height: 1.2; }
.db-greeting-sub { font-size: 14px; color: #5b6776; margin-top: 6px; }
.btn-orange-pill { display: flex; align-items: center; gap: 8px; background: #f37021; color: white; border: none; border-radius: 10px; padding: 11px 20px; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; flex-shrink: 0; transition: background 0.15s; }
.btn-orange-pill:hover { background: #e0621a; }

/* Stat cards */
.db-stats-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.db-stat-card { background: white; border: 1px solid #e2e8f0; border-radius: 12px; padding: 18px 16px; display: flex; align-items: center; gap: 14px; }
.db-stat-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.db-stat-icon--blue { background: #eff6ff; color: #2563eb; }
.db-stat-icon--purple { background: #f5f3ff; color: #7c3aed; }
.db-stat-icon--green { background: #f0fdf4; color: #16a34a; }
.db-stat-icon--amber { background: #fffbeb; color: #d97706; }
.db-stat-icon--orange { background: #fff7ed; color: #f37021; }
.db-stat-value { font-family: 'Neue Power', Arial, sans-serif; font-size: 22px; font-weight: 800; color: #0f1b2d; line-height: 1; }
.db-stat-label { font-size: 12px; color: #5b6776; margin-top: 4px; }

/* Tab bar */
.db-tab-bar { display: flex; gap: 4px; background: white; border: 1px solid #e2e8f0; border-radius: 10px; padding: 4px; width: fit-content; }
.db-tab { display: flex; align-items: center; gap: 7px; padding: 8px 16px; border: none; border-radius: 7px; background: transparent; font-size: 13px; font-weight: 600; color: #5b6776; cursor: pointer; transition: background 0.15s, color 0.15s; }
.db-tab:hover { background: #f3f5f8; color: #0f1b2d; }
.db-tab.active { background: #f37021; color: white; }
.db-tab.active svg { stroke: white; }

/* Card grid */
.db-panel { width: 100%; }
.db-panel-body { width: 100%; }
.db-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

/* New test card */
.test-card { background: white; border: 1px solid #e2e8f0; border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 14px; transition: box-shadow 0.2s; }
.test-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.07); }
.test-card-top { display: flex; align-items: flex-start; gap: 12px; }
.test-card-icon { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: white; font-weight: 700; line-height: 0; }
.subject-physics { background: #3b82f6; color: white; } /* Blue for Physics */
.subject-chemistry { background: #10b981; color: white; } /* Green for Chemistry */
.subject-mathematics { background: #f59e0b; color: white; } /* Orange for Mathematics */
.subject-botany { background: #16a34a; color: white; } /* Leaf green for Botany */
.subject-zoology { background: #0d9488; color: white; } /* Teal for Zoology */
.subject-syllabus { background: #6366f1; color: white; } /* Purple for Full Syllabus */

/* ===== Exam type selector (JEE / NEET) ===== */
.db-exam-selector { display: flex; gap: 8px; margin-bottom: 18px; }
.db-exam-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: white;
    font-size: 13px;
    font-weight: 700;
    color: #5b6776;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.db-exam-pill:hover { border-color: #cbd5e1; color: #0f1b2d; }
.db-exam-pill.active { background: #0f1b2d; border-color: #0f1b2d; color: white; }
.db-exam-pill-count {
    font-size: 11px;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 999px;
    background: #f3f5f8;
    color: #5b6776;
}
.db-exam-pill.active .db-exam-pill-count { background: rgba(255,255,255,0.18); color: white; }
.test-card-meta { flex: 1; }
.test-card-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #5b6776; }
.test-card-status { display: inline-block; margin-top: 4px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.status-not-started { background: #f3f5f8; color: #5b6776; }
.status-in-progress { background: #fef9c3; color: #a16207; }
.status-completed { background: #dcfce7; color: #16a34a; }
.test-card-title { font-size: 16px; font-weight: 700; color: #0f1b2d; line-height: 1.35; margin-top: 4px; }
.test-card-specs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-top: 12px; }
.test-card-spec { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 16px; background: #f8f9fb; border-radius: 10px; text-align: center; }
.spec-container { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: white; border-radius: 8px; color: #5b6776; margin: 0 auto; }
.spec-container svg { width: 18px; height: 18px; }
.spec-val { font-size: 14px; font-weight: 700; color: #0f1b2d; }
.spec-lbl { font-size: 12px; color: #8a94a3; }
.test-card-actions { display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid #f0f2f5; }
.tc-btn { padding: 8px 14px; border-radius: 7px; border: none; font-size: 12px; font-weight: 700; cursor: pointer; transition: background 0.15s; }
.tc-btn-primary { background: #f37021; color: white; }
.tc-btn-primary:hover { background: #e0621a; }
.tc-btn-ghost { background: #f3f5f8; color: #1f2933; }
.tc-btn-ghost:hover { background: #e2e8f0; }
.tc-btn-danger { background: #fff1f2; color: #e11d48; }
.tc-btn-danger:hover { background: #ffe4e8; }

.test-card-status-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.tc-score-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tc-score-pos { background: #dcfce7; color: #16a34a; }
.tc-score-neg { background: #fee2e2; color: #dc2626; }
.badge-global { display: inline-block; padding: 2px 8px; font-size: 10px; font-weight: 700; color: white; background: #0b3d91; border-radius: 999px; letter-spacing: 0.04em; }
.empty-text { color: #8a94a3; font-size: 13px; padding: 24px 0; }

@media (max-width: 1200px) {
    .db-stats-row { grid-template-columns: repeat(3, 1fr); }
    .db-stat-card:nth-child(4) { grid-column: 1; }
    .db-stat-card:nth-child(5) { grid-column: 2; }
}

@media (max-width: 900px) {
    .db-stats-row { grid-template-columns: repeat(2, 1fr); }
    .db-stat-card:nth-child(5) { grid-column: 1 / -1; max-width: 300px; margin: 0 auto; }
    .test-card-specs { grid-template-columns: 1fr 1fr; }
    .test-card-spec:last-child { grid-column: 1 / -1; max-width: 200px; margin: 0 auto; }
}

@media (max-width: 600px) {
    .db-stats-row { grid-template-columns: 1fr; }
    .db-stat-card:nth-child(5) { grid-column: auto; max-width: none; }
    .test-card-specs { grid-template-columns: 1fr; max-width: 200px; margin: 12px auto 0; }
    .test-card-spec:last-child { grid-column: auto; }
    .db-hero-row { flex-direction: column; }
    .db-nav-search { display: none; }
    .db-card-grid { grid-template-columns: 1fr; }
}


/* Modal base */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; z-index: 1000; backdrop-filter: blur(2px); }

/* Upload modal */
.upload-modal-content { background: white; border-radius: 20px; padding: 32px; width: 90%; max-width: 480px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.15); }
.upload-modal-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 50%; border: none; background: #f3f5f8; color: #5b6776; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.upload-modal-close:hover { background: #e2e8f0; }
.upload-modal-title { font-family: 'Neue Power', Arial, sans-serif; font-size: 22px; font-weight: 800; color: #0f1b2d; margin-bottom: 24px; }
.upload-form { display: flex; flex-direction: column; gap: 16px; }
.upload-field { display: flex; flex-direction: column; gap: 6px; }
.upload-label { font-size: 13px; font-weight: 600; color: #1f2933; }
.upload-input { width: 100%; padding: 10px 14px; border: 1.5px solid #e2e8f0; border-radius: 10px; font-size: 14px; color: #1f2933; background: #f8fafc; outline: none; transition: border-color 0.15s; }
.upload-input:focus { border-color: #f37021; background: white; }
.upload-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235b6776' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; cursor: pointer; }
.upload-file-label { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1.5px solid #e2e8f0; border-radius: 10px; background: #f8fafc; cursor: pointer; transition: border-color 0.15s; }
.upload-file-label:hover { border-color: #f37021; background: white; }
.upload-file-label svg { flex-shrink: 0; color: #5b6776; }
.upload-file-label > span:first-of-type { font-size: 13px; font-weight: 600; color: #1f2933; background: white; border: 1px solid #d0d5dd; border-radius: 6px; padding: 3px 10px; white-space: nowrap; }
.upload-file-name { font-size: 13px; color: #8a94a3; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-file-label.has-file .upload-file-name { color: #1f2933; }
.upload-file-name.upload-file-error { color: #d92d20; }
.upload-submit-btn { display: flex; align-items: center; justify-content: center; gap: 8px; background: #f37021; color: white; border: none; border-radius: 10px; padding: 12px 24px; font-size: 14px; font-weight: 700; cursor: pointer; margin-top: 4px; transition: background 0.15s; }
.upload-submit-btn:hover { background: #e0621a; }
.upload-status { font-size: 13px; color: #5b6776; margin-top: 8px; text-align: center; }

/* Share modal */
.share-modal-content { background: white; border-radius: 20px; padding: 32px; width: 90%; max-width: 400px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.15); display: flex; flex-direction: column; gap: 14px; }
.share-modal-icon { width: 52px; height: 52px; border-radius: 14px; background: #eff6ff; display: flex; align-items: center; justify-content: center; }
.share-modal-title { font-family: 'Neue Power', Arial, sans-serif; font-size: 20px; font-weight: 800; color: #0f1b2d; margin: 0; }
.share-modal-sub { font-size: 13px; color: #5b6776; margin: 0; line-height: 1.5; }

/* Upload-disabled notice */
.upload-disabled-content { background: white; border-radius: 20px; padding: 32px; width: 90%; max-width: 380px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.15); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.upload-disabled-icon { width: 52px; height: 52px; border-radius: 14px; background: #fff4ec; display: flex; align-items: center; justify-content: center; }
.upload-disabled-title { font-family: 'Neue Power', Arial, sans-serif; font-size: 20px; font-weight: 800; color: #0f1b2d; margin: 0; }
.upload-disabled-sub { font-size: 13px; color: #5b6776; margin: 0; line-height: 1.5; }

/* Stat icon circles — match mockup's softer circular style */
.db-stat-icon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.db-stat-icon--blue   { background: #eff6ff; color: #3b82f6; }
.db-stat-icon--purple { background: #f5f3ff; color: #8b5cf6; }
.db-stat-icon--green  { background: #f0fdf4; color: #22c55e; }
.db-stat-icon--amber  { background: #fffbeb; color: #f59e0b; }
.db-stat-icon--orange { background: #fff7ed; color: #f37021; }

/* ===== Exam Screen (NTA Style) ===== */
.exam-screen { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; background: #f0f0f0; }

/* Top header */
.nta-header { background: white; border-bottom: 2px solid #d0d0d0; display: flex; justify-content: space-between; align-items: stretch; min-height: 72px; }
.nta-header-left { display: flex; align-items: center; padding: 10px 16px; border-right: 2px solid #d0d0d0; }
.nta-logo-block { display: flex; align-items: center; gap: 12px; }
.nta-logo-icon { width: 48px; height: 48px; background: #f37021; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nta-logo-title { font-size: 15px; font-weight: 700; color: #0b3d91; font-family: 'Neue Power', Arial, sans-serif; }
.nta-logo-sub { font-size: 12px; color: #555; margin-top: 2px; }
.nta-header-right { display: flex; align-items: center; padding: 10px 20px; margin-left: auto; }
.nta-candidate-box { display: flex; align-items: center; gap: 14px; }
.nta-avatar { width: 52px; height: 52px; border: 2px solid #aaa; border-radius: 4px; display: flex; align-items: center; justify-content: center; background: #eee; flex-shrink: 0; }
.nta-candidate-info { display: flex; flex-direction: column; gap: 3px; }
.nta-info-row { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.nta-info-label { color: #333; font-weight: 500; min-width: 110px; }
.nta-info-sep { color: #333; }
.nta-info-val { color: #0b3d91; font-weight: 700; }
.nta-timer { color: #fff; font-weight: 700; font-size: 15px; background: #1a1a2e; padding: 4px 12px; border-radius: 4px; font-family: monospace; border: 1px solid #444; letter-spacing: 0.05em; }
.nta-timer.warning { background: #7f1d1d; color: #fca5a5; }

/* Subject tab bar */
.nta-subject-bar { background: #f37021; display: flex; align-items: center; padding: 0 16px; min-height: 44px; }
.nta-subject-bar-left { display: flex; align-items: center; gap: 0; }
.nta-exam-label { color: white; font-weight: 800; font-size: 15px; font-family: 'Neue Power', Arial, sans-serif; margin-right: 12px; letter-spacing: 0.03em; }
.nta-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.nta-tab-btn { background: #1a73e8; color: white; border: none; border-radius: 3px; padding: 7px 20px; cursor: pointer; font-weight: 700; font-size: 13px; letter-spacing: 0.02em; }
.nta-tab-btn.active { background: #0b3d91; }
.nta-tab-btn:hover { background: #0b3d91; }

/* Body layout */
.nta-body { display: grid; grid-template-columns: 1fr 300px; flex: 1; min-height: calc(100vh - 116px); }

/* Question panel */
.nta-question-panel { background: white; border-right: 2px solid #d0d0d0; display: flex; flex-direction: column; overflow: hidden; }
.nta-question-header { padding: 10px 16px; border-bottom: 1px solid #e0e0e0; background: #f8f8f8; }
.nta-qnum { font-size: 15px; font-weight: 700; color: #1f2933; }
.nta-question-body { flex: 1; overflow-y: auto; padding: 16px; min-height: 0; }
.question-image { max-width: 100%; height: auto; display: block; }

.options-container { padding: 8px 16px 4px; }
.option-selector { display: flex; flex-direction: column; gap: 10px; }
.option-btn { padding: 10px 18px; border: 2px solid #1a73e8; border-radius: 4px; background: white; color: #1a73e8; font-weight: 600; cursor: pointer; text-align: left; font-size: 14px; }
.option-btn.selected { background: #1a73e8; color: white; }
.option-btn:hover:not(.selected) { background: #e8f0fe; }
.num-input { width: 220px; padding: 10px 12px; border: 2px solid #b8c1cc; border-radius: 4px; font-size: 16px; margin: 8px 0; }

/* Action bar (save/mark buttons) */
.nta-action-bar { padding: 10px 16px; border-top: 1px solid #e0e0e0; background: #f8f8f8; display: flex; gap: 8px; flex-wrap: wrap; }
.nta-actions-left { display: flex; gap: 8px; flex-wrap: wrap; }
.nta-btn { padding: 9px 16px; border: none; border-radius: 3px; font-weight: 700; font-size: 12px; cursor: pointer; letter-spacing: 0.02em; }
.nta-btn-green { background: #28a745; color: white; }
.nta-btn-green:hover { background: #218838; }
.nta-btn-orange { background: #e07b39; color: white; }
.nta-btn-orange:hover { background: #c96a2a; }
.nta-btn-white { background: white; color: #333; border: 1px solid #aaa; }
.nta-btn-white:hover { background: #f0f0f0; }
.nta-btn-blue { background: #0b3d91; color: white; }
.nta-btn-blue:hover { background: #082d6e; }
.nta-btn-outline { background: white; color: #333; border: 1px solid #888; }
.nta-btn-outline:hover { background: #f0f0f0; }
.nta-btn-exit { background: #1f2933; color: #f3f4f6; border: 1px solid #444; }
.nta-btn-exit:hover { background: #111827; }
.nta-btn-submit { background: #28a745; color: white; margin-left: auto; padding: 9px 28px; }
.nta-btn-submit:hover { background: #218838; }

/* Nav bar (back/next/submit) */
.nta-nav-bar { padding: 10px 16px; border-top: 1px solid #e0e0e0; background: white; display: flex; gap: 8px; align-items: center; }

/* Palette panel */
.nta-palette-panel { background: #f8f8f8; border-left: 1px solid #d0d0d0; display: flex; flex-direction: column; overflow-y: auto; padding: 12px; gap: 10px; }

/* Legend */
.nta-legend { display: flex; flex-direction: column; gap: 6px; background: white; border: 1px solid #ddd; border-radius: 4px; padding: 10px; }
.nta-legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #333; }
.nta-legend-wide { align-items: flex-start; }
.nta-badge { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; font-size: 12px; font-weight: 700; color: white; flex-shrink: 0; }
.nta-badge-gray { background: #aaa; }
.nta-badge-red { background: #dc3545; clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%); border-radius: 0; width: 28px; height: 28px; }
.nta-badge-green { background: #28a745; border-radius: 50% 50% 0 50%; }
.nta-badge-purple { background: #6f42c1; border-radius: 50%; }
.nta-badge-purple-green { background: #6f42c1; border-radius: 50%; border: 3px solid #28a745; width: 26px; height: 26px; }

.nta-palette-title { font-size: 13px; font-weight: 700; color: #0b3d91; padding: 4px 0; border-bottom: 1px solid #ddd; }

/* Question number grid */
.number-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.grid-item { min-height: 32px; width: 100%; text-align: center; border: 1px solid #bbb; border-radius: 2px; cursor: pointer; background: #e9ecef; font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.grid-item.not_visited { background: #e9ecef; color: #333; }
.grid-item.not_answered { background: #dc3545; color: white; clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%); }
.grid-item.answered { background: #28a745; color: white; border-radius: 50% 50% 0 50%; }
.grid-item.marked { background: #6f42c1; color: white; border-radius: 50%; }
.grid-item.current { outline: 3px solid #f37021; outline-offset: 1px; }

.nta-calc-toggle { margin-top: auto; background: #1a73e8; color: white; border: none; border-radius: 4px; padding: 9px 14px; font-weight: 700; font-size: 13px; cursor: pointer; }
.nta-calc-toggle:hover { background: #0b3d91; }
.calculator { position: fixed; bottom: 80px; right: 20px; width: 240px; background: white; border: 1px solid #d7dde5; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); z-index: 1000; }
.calc-header { background: #f37021; color: white; padding: 8px 12px; border-radius: 8px 8px 0 0; display: flex; justify-content: space-between; cursor: move; }
.close-calc { cursor: pointer; font-weight: bold; }
.calc-display { padding: 12px; font-size: 24px; text-align: right; border-bottom: 1px solid #eef1f5; background: #fafafa; min-height: 50px; }
.calc-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 8px; }
.calc-buttons button { padding: 12px; border: none; background: #f0f4f8; border-radius: 4px; font-size: 18px; cursor: pointer; }
.calc-buttons button:hover { background: #dde3e9; }

/* ===== Results Screen ===== */
.results-screen { background: #eef1f5; }
.results-wrapper { background: white; border-radius: 20px; padding: 48px 40px 40px; max-width: 680px; width: 90%; display: flex; flex-direction: column; align-items: center; gap: 32px; box-shadow: 0 4px 24px rgba(0,0,0,0.07); }

.results-hero { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.results-check-circle { width: 72px; height: 72px; border-radius: 50%; background: #dcfce7; display: flex; align-items: center; justify-content: center; }
.results-title { font-family: 'Neue Power', Arial, sans-serif; font-size: 28px; font-weight: 800; color: #0f1b2d; }
.results-subtitle { font-size: 14px; color: #5b6776; }

.results-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; width: 100%; }
.results-stat-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; padding: 20px 16px; text-align: center; }
.results-stat-val { font-family: 'Neue Power', Arial, sans-serif; font-size: 28px; font-weight: 800; color: #0f1b2d; line-height: 1; }
.results-stat-val.positive { color: #16a34a; }
.results-stat-val.negative { color: #dc2626; }
.results-stat-lbl { font-size: 12px; color: #5b6776; margin-top: 6px; font-weight: 600; }

.results-details { width: 100%; display: flex; flex-direction: column; gap: 16px; }
.results-accuracy-row { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; color: #1f2933; }
.results-accuracy-val { font-weight: 800; color: #0b3d91; font-size: 18px; }
.results-subject-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.results-subject-chip { background: #f0f4ff; border: 1px solid #c7d7fd; border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: 600; color: #2d4fd6; display: flex; gap: 6px; align-items: center; }
.results-subject-chip span { color: #5b6776; font-weight: 400; }

.results-back-btn { display: flex; align-items: center; gap: 8px; background: #0b3d91; color: white; border: none; border-radius: 10px; padding: 12px 24px; font-size: 14px; font-weight: 700; cursor: pointer; transition: background 0.15s; }
.results-back-btn:hover { background: #082d6e; }

/* ===== Analysis Screen ===== */
.analysis-screen { background: #eef1f5; display: flex; flex-direction: column; align-items: stretch; min-height: 100vh; }

.analysis-header { background: white; border-bottom: 1px solid #e2e8f0; padding: 16px 28px; display: flex; align-items: center; justify-content: space-between; }
.analysis-header-left { display: flex; align-items: center; gap: 16px; }
.analysis-back-btn { display: flex; align-items: center; gap: 6px; background: #f3f5f8; color: #1f2933; border: none; border-radius: 8px; padding: 8px 14px; font-size: 13px; font-weight: 700; cursor: pointer; }
.analysis-back-btn:hover { background: #e2e8f0; }
.analysis-title { font-family: 'Neue Power', Arial, sans-serif; font-size: 18px; font-weight: 800; color: #0f1b2d; }
.analysis-summary { font-size: 13px; font-weight: 600; color: #5b6776; }

.analysis-tabs { background: white; border-bottom: 1px solid #e2e8f0; padding: 12px 28px; display: flex; gap: 10px; }
.analysis-tab-btn { background: #f3f5f8; color: #1f2933; border: none; border-radius: 8px; padding: 8px 20px; font-weight: 700; font-size: 13px; cursor: pointer; }
.analysis-tab-btn.active { background: #0b3d91; color: white; }
.analysis-tab-btn:hover:not(.active) { background: #e2e8f0; }

.analysis-body { flex: 1; padding: 24px 28px 48px; display: flex; flex-direction: column; gap: 20px; max-width: 760px; margin: 0 auto; width: 100%; }

.analysis-question-card { background: white; border-radius: 14px; padding: 20px; box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
.analysis-question-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.analysis-qnum { font-size: 14px; font-weight: 700; color: #0f1b2d; }

.analysis-status { font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.analysis-status-correct { background: #dcfce7; color: #16a34a; }
.analysis-status-incorrect { background: #fee2e2; color: #dc2626; }
.analysis-status-unattempted { background: #f3f5f8; color: #5b6776; }

.analysis-question-image { display: block; max-width: 100%; margin: 0 auto 16px; border-radius: 8px; }

.analysis-options { display: flex; flex-direction: column; gap: 10px; }
.analysis-option-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border: 2px solid #e2e8f0; border-radius: 6px; font-size: 14px; font-weight: 600; color: #1f2933; }
.analysis-option-correct { border-color: #16a34a; background: #f0fdf4; }
.analysis-option-incorrect { border-color: #dc2626; background: #fef2f2; }
.analysis-correct-answer-row { margin-top: 4px; }

.analysis-icon { font-weight: 800; font-size: 15px; }
.analysis-icon-correct { color: #16a34a; }
.analysis-icon-incorrect { color: #dc2626; }

/* Responsive */
@media (max-width: 900px) {
    .test-sections { grid-template-columns: 1fr; }
    .exam-container { grid-template-columns: 1fr; height: auto; }
    .palette-section { order: -1; max-height: 300px; }
    .top-header { flex-wrap: wrap; }
    .timer-badge { font-size: 20px; min-width: 100px; }
}