*{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:#f1f3f6;color:#3b3b3b;min-height:100vh}button,input{font:inherit}.login{min-height:100vh;display:grid;place-items:center}.login section{width:min(360px,92vw);display:grid;gap:12px}.login h1{margin:0 0 8px;font-size:32px}.login input{height:44px;padding:0 12px;border:1px solid #b8c0cc;border-radius:4px}.login button,.actions button,.modal-actions button{height:42px;display:inline-flex;gap:8px;align-items:center;justify-content:center;border:1px solid #8390a3;background:#fff;border-radius:4px;cursor:pointer}button:disabled{opacity:.65;cursor:wait}.error{color:#b91c1c}.exam{width:auto;height:calc(100vh - 56px);display:grid;grid-template-rows:auto 1fr;-webkit-user-select:none;user-select:none;overflow:hidden;background:#fff;margin:0 56px;box-shadow:0 0 0 1px #e2e2e2}.exam-header{background:#f5f5f5;border-bottom:1px solid #d7d7d7}.site-nav{height:30px;display:flex;align-items:center;justify-content:space-between;padding:0 32px;background:#2d6b97;color:#fff;font-size:14px;font-weight:700}.site-nav span{font-size:12px;opacity:.9}.candidate-strip{min-height:88px;display:grid;grid-template-columns:76px minmax(0,1fr);align-items:center;gap:14px;padding:12px 32px;background:#f5f5f5}.photo{width:66px;height:66px;border:2px solid #666;background:#f7f7f7;display:grid;place-items:center;color:#555;font-size:20px;font-weight:800;overflow:hidden}.candidate-meta{display:grid;grid-template-columns:1fr;font-size:16px;line-height:1.3;min-width:0}.candidate-meta p{margin:0 0 4px;white-space:nowrap}.candidate-meta p:last-child{margin-bottom:0}.candidate-meta span{display:inline-block;width:144px}.candidate-meta b{color:#ff8a00}.candidate-meta i{background:#0da5df;color:#fff;border-radius:999px;padding:1px 10px;font-style:normal;font-weight:700}.workspace{display:flex;align-items:stretch;min-height:0;min-width:0;width:100%;border-top:1px solid #d4d4d4}.question{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;height:100%;background:#fff;overflow:hidden}.palette-toggle{flex:0 0 auto;align-self:center;width:22px;height:64px;margin:0 6px;border:none;border-radius:4px;background:#1f2937;color:#fff;display:grid;place-items:center;cursor:pointer}.palette-toggle:hover{background:#111827}.tabs{flex:0 0 auto;height:40px;display:flex;gap:6px;align-items:end;border-bottom:1px solid #b9c4d2;margin:0;padding:0 22px;background:#f8fafc}.tabs button{height:34px;padding:0 14px;border:1px solid #9eb1ca;border-bottom:0;background:#dbeafe;border-radius:4px 4px 0 0;cursor:pointer;display:inline-flex;align-items:center;gap:7px;min-width:104px;justify-content:center;font-weight:700;font-size:14px}.tabs button.active{background:#2563eb;border-color:#1d4ed8;color:#fff}.tabs button span{font-size:12px;padding:2px 8px;border-radius:999px;background:#0f172a1f}.tabs button.active span{background:#ffffff38}.question-body{flex:1 1 auto;overflow:auto;padding:22px 28px 14px}.question-head{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #999;padding-bottom:12px;margin-bottom:18px}.question h2{margin:0;font-size:19px;color:#333}.marks{display:none}.scroll-btn{width:30px;height:30px;flex:0 0 auto;border:none;border-radius:999px;background:#1a9bd7;color:#fff;display:grid;place-items:center;cursor:pointer}.scroll-btn:hover{background:#1786ba}.question-foot{display:flex;justify-content:flex-end;padding-top:12px}.stem{min-height:70px;font-size:15px;line-height:1.5;margin:0;padding:0 0 16px}.question-image{display:block;max-width:min(540px,100%);max-height:240px;margin:12px 0;border:1px solid #cbd5e1;background:#fff}.options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));column-gap:28px;row-gap:16px;align-items:start;border-bottom:1px solid #999;padding:4px 4px 20px;margin:0}.option{min-height:28px;display:inline-flex;align-items:flex-start;gap:8px;padding:0;border:0;border-radius:0;cursor:pointer;font-size:15px;line-height:1.4}.option:has(input:checked){color:#111;font-weight:700;background:transparent}.option input{width:16px;height:16px;margin-top:2px;flex:0 0 auto}.palette{flex:0 0 410px;display:flex;flex-direction:column;height:100%;padding:20px 28px 18px;background:#fff;overflow:auto}.palette h3{margin:0 0 6px;font-size:18px;color:#333}.section-name{margin:0 0 12px;text-transform:uppercase;font-size:12px;color:#475569;font-weight:800}.legend{display:grid;grid-template-columns:120px 150px;gap:12px 16px;padding:14px 16px;border:3px dotted #555;font-size:14px;line-height:1.2}.legend span{display:grid;grid-template-columns:42px 1fr;gap:11px;align-items:center;color:#4b4b4b}.legend span.wide{grid-column:1 / -1;grid-template-columns:42px 1fr}.legend span.wide em{grid-column:2;font-style:normal;font-size:12px;color:#6b6b6b}.legend i{width:42px;height:32px;display:inline-grid;place-items:center;position:relative;border:1px solid #b8b8b8;font-style:normal;font-weight:800;font-size:15px;border-radius:4px}.nv{background:linear-gradient(#fcfcfc,#e6e6e6);color:#333}.grid{display:grid;grid-template-columns:repeat(8,36px);gap:8px 6px;margin-top:16px;justify-content:start}.grid button{height:30px;border:1px solid #b9b9b9;background:linear-gradient(#fcfcfc,#e6e6e6);border-radius:5px;cursor:pointer;font-weight:700;font-size:12px;color:#333}.grid button.current{outline:3px solid #0f172a;outline-offset:2px}.grid button.not_answered,.legend .na{background:#d24b1f;color:#fff;border:0;border-radius:3px;clip-path:polygon(0 0,100% 20%,100% 80%,0 100%)}.grid button.answered,.legend .ans{background:#2e9b2e;color:#fff;border:0;border-radius:3px;clip-path:polygon(0 0,100% 20%,100% 80%,0 100%)}.grid button.marked,.legend .mark{background:radial-gradient(circle at 38% 32%,#7b4fc0,#4b1f97);color:#fff;border:0;border-radius:999px}.grid button.answered_marked,.legend .ansmark{background:radial-gradient(circle at 38% 32%,#7b4fc0,#4b1f97);color:#fff;border:0;border-radius:999px;position:relative}.grid button.answered_marked:after,.legend .ansmark:after{content:"";position:absolute;right:-2px;bottom:-2px;width:14px;height:14px;border-radius:50%;background:#2e9b2e;border:2px solid white}.actions{flex:0 0 auto;display:flex;flex-direction:column}.top-actions{display:flex;flex-wrap:wrap;align-items:center;gap:9px;padding:14px 22px;border-top:1px solid #d8d8d8;background:#fff}.bottom-actions{display:flex;align-items:center;gap:0;padding:14px 22px;background:#f6f6f6;border-top:1px solid #ddd}.bottom-actions button:not(.submit)+button:not(.submit){margin-left:-1px}.actions button{height:42px;padding:0 18px;border:1px solid #ccc;border-radius:3px;font-weight:700;letter-spacing:.2px;white-space:nowrap;font-size:13.5px}.actions .save{background:#5cb85c;color:#fff;border-color:#4cae4c}.actions .clear{background:#fff;color:#444}.actions .save-mark{background:#f0ad4e;color:#fff;border-color:#eea236}.actions .mark-next{background:#337ab7;color:#fff;border-color:#2e6da4}.bottom-actions .submit{margin-left:auto;background:#5cb85c;color:#fff;border-color:#4cae4c}.modal{position:fixed;inset:0;display:grid;place-items:center;background:#0f172a75;padding:24px;z-index:20}.modal-panel{width:min(920px,96vw);background:#fff;border-radius:6px;border:1px solid #94a3b8;box-shadow:0 20px 60px #0f172a4d;padding:20px}.modal-panel h2{margin:0 0 14px}.modal-panel table{width:100%;border-collapse:collapse;font-size:14px}.modal-panel th,.modal-panel td{border:1px solid #cbd5e1;padding:9px;text-align:center}.modal-panel th{background:#e2e8f0}.modal-panel td:first-child,.modal-panel th:first-child{text-align:left;font-weight:700}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.result{min-height:100vh;display:block;background:#fff;padding:0}.result section{width:min(1600px,94vw);border:1px solid #ddd;background:#fff;padding:0;border-radius:0;margin:24px auto}.result-topbar{display:flex;justify-content:flex-end;border-bottom:2px solid #ddd;padding:12px}.result-topbar button{height:38px;padding:0 16px;border:1px solid #8390a3;background:#fff;border-radius:4px;cursor:pointer;font-weight:700}.score-card h1{text-align:center;font-size:26px;margin:14px 0}.score-table,.review-table{width:100%;border-collapse:collapse;font-size:20px}.score-table td,.review-table th,.review-table td{border:1px solid #ddd;padding:10px 14px}.score-table td:nth-child(2n){font-weight:700}.review-tools{display:flex;justify-content:space-between;margin:28px 0 16px;font-size:18px}.review-tools input,.review-tools select{height:38px;border:1px solid #ccc}.correct-pill{background:#58bc55;color:#fff;border-radius:4px;padding:3px 10px;font-weight:800}.result-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}.result-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}.result h1{margin:0 0 6px}.result-head p{margin:0;color:#475569}.result button{height:40px;padding:0 14px;border:1px solid #8390a3;background:#fff;border-radius:4px;cursor:pointer;white-space:nowrap}.score{font-size:44px;font-weight:800;margin:10px 0 18px;color:#0f766e}.result-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:18px}.result-grid strong{border:1px solid #cbd5e1;border-radius:4px;padding:12px;text-align:center;background:#f8fafc}.bars{display:grid;gap:10px;margin-bottom:24px}.bar-row{display:grid;grid-template-columns:110px 1fr 80px;gap:12px;align-items:center}.bar-row div{height:12px;background:#e2e8f0;border-radius:999px;overflow:hidden}.bar-row i{display:block;height:100%;background:#0f766e}.chapter-list{display:grid;gap:8px}.chapter-list p{display:flex;justify-content:space-between;gap:16px;margin:0;padding:10px 12px;border:1px solid #e2e8f0;border-radius:4px;background:#f8fafc}.chapter-list p>span:last-child{white-space:nowrap;color:#475569}.submit-summary{min-height:100vh;background:#fff}.exam-summary{max-width:1640px;margin:50px auto 0;text-align:center}.exam-summary h1{font-size:34px;margin-bottom:30px}.summary-grid{display:grid;grid-template-columns:1fr .8fr 1fr 1.2fr 3fr 1fr;border-bottom:1px solid #ddd;margin-bottom:30px}.summary-grid article{min-height:120px;border-right:1px solid #ddd;display:grid;align-content:center;gap:20px;font-size:24px}.summary-grid article:last-child{border-right:0}.summary-grid span{font-size:26px}.exam-summary h2{font-size:26px;line-height:1.2;margin-top:42px}.yes-no{display:flex;justify-content:center;gap:8px}.yes-no button{width:92px;height:58px;border:1px solid #ccc;background:#fff;font-size:22px;font-weight:800}.nta-footer{position:fixed;left:0;right:0;bottom:0;background:#073b64;color:#fff;text-align:center;padding:22px;font-weight:700}.teacher{min-height:100vh;background:#f8fafc;padding:24px}.teacher header{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:18px}.teacher h1{margin:0 0 6px}.teacher header p{margin:0;color:#475569}.teacher button{height:40px;padding:0 14px;border:1px solid #8390a3;background:#fff;border-radius:4px;cursor:pointer}.teacher-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:18px}.teacher-stats article,.teacher-grid article{border:1px solid #cbd5e1;background:#fff;border-radius:6px;padding:16px}.teacher-stats span{color:#475569;display:block;margin-bottom:8px}.teacher-stats b{font-size:34px;color:#0f766e}.teacher-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.teacher-grid h2{margin:0 0 12px;font-size:20px}.teacher-grid p{display:flex;justify-content:space-between;gap:12px;margin:0;padding:9px 0;border-bottom:1px solid #e2e8f0}.teacher-grid p:last-child{border-bottom:0}.teacher-grid span{color:#475569;white-space:nowrap}.admin-console{min-height:100vh;background:#f8fafc;padding:24px}.admin-console-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.admin-console-head h1{margin:0}.admin-console-head button{height:40px;padding:0 14px;border:1px solid #8390a3;background:#fff;border-radius:4px;cursor:pointer}.admin-console-tabs{display:flex;gap:8px;margin-bottom:18px}.admin-console-tabs button{height:40px;padding:0 18px;border:1px solid #9eb1ca;background:#e2e8f0;border-radius:4px;cursor:pointer;font-weight:700}.admin-console-tabs button.active{background:#2563eb;border-color:#1d4ed8;color:#fff}.admin-tab{background:#fff;border:1px solid #cbd5e1;border-radius:6px;padding:18px}.admin-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:14px}.admin-toolbar input,.admin-toolbar select{height:38px;padding:0 10px;border:1px solid #b8c0cc;border-radius:4px}.admin-toolbar button{height:38px;padding:0 14px;border:1px solid #8390a3;background:#fff;border-radius:4px;cursor:pointer}.admin-toolbar .spacer{flex:1 1 auto}.admin-note{margin:0 0 12px;padding:10px 12px;background:#eff6ff;border:1px solid #bfdbfe;border-radius:4px;color:#1e3a8a}.admin-note.warn{background:#fef3c7;border-color:#fcd34d;color:#92400e;padding:6px 10px;margin:8px 0 0}.admin-table{width:100%;border-collapse:collapse;margin-bottom:14px;font-size:14px}.admin-table th,.admin-table td{border:1px solid #e2e8f0;padding:8px 10px;text-align:left;vertical-align:top}.admin-table th{background:#f1f5f9}.admin-stem{max-width:420px}.admin-row-actions{display:flex;gap:8px;align-items:center}.admin-row-actions button{height:34px;padding:0 12px;border:1px solid #8390a3;background:#fff;border-radius:4px;cursor:pointer}.admin-pagination{display:flex;align-items:center;gap:12px}.admin-pagination button{height:34px;padding:0 12px;border:1px solid #8390a3;background:#fff;border-radius:4px;cursor:pointer}.admin-form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:12px}.admin-form-grid label,.modal-panel label.full{display:grid;gap:4px;font-size:13px;font-weight:700;color:#334155}.admin-form-grid input,.admin-form-grid select,.modal-panel label.full input,.modal-panel label.full textarea{font-weight:400;height:38px;padding:0 10px;border:1px solid #b8c0cc;border-radius:4px}.modal-panel label.full{margin-bottom:12px}.modal-panel label.full textarea{height:auto;padding:8px 10px;resize:vertical}.admin-options-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:12px}.admin-options-grid label{display:grid;gap:4px;font-size:13px;font-weight:700;color:#334155}.admin-options-grid label span{display:flex;align-items:center;gap:6px}.admin-options-grid input[type=text],.admin-options-grid input:not([type]){font-weight:400;height:38px;padding:0 10px;border:1px solid #b8c0cc;border-radius:4px}.admin-image-preview{display:block;max-width:220px;max-height:160px;margin-top:8px;border:1px solid #cbd5e1}.badge{display:inline-block;padding:2px 10px;border-radius:999px;font-size:12px;font-weight:700;text-transform:uppercase;background:#e2e8f0;color:#334155}.badge-draft{background:#e2e8f0;color:#334155}.badge-published{background:#dbeafe;color:#1d4ed8}.badge-live{background:#dcfce7;color:#166534}.badge-closed{background:#fee2e2;color:#991b1b}.admin-live-banner{padding:12px 16px;border-radius:4px;background:#dcfce7;border:1px solid #86efac;color:#166534;font-weight:700;margin-bottom:14px}.admin-live-banner.muted{background:#f1f5f9;border-color:#cbd5e1;color:#475569}.admin-test-builder{margin-top:18px;border-top:2px solid #e2e8f0;padding-top:16px}.admin-test-builder-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.admin-test-section{margin-bottom:14px}.admin-test-section h5{margin:0 0 6px}.admin-live-analytics{margin-top:12px}.admin-draft-grid{display:grid;gap:16px}.admin-draft-row{border:1px solid #cbd5e1;border-radius:6px;padding:14px;background:#f8fafc}.admin-draft-row.needs-answer{border-color:#fcd34d;background:#fffbeb}.admin-draft-head{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;gap:10px;align-items:end;margin-bottom:10px}.admin-draft-head label{display:grid;gap:4px;font-size:13px;font-weight:700;color:#334155}.admin-draft-head input,.admin-draft-head select{font-weight:400;height:36px;padding:0 8px;border:1px solid #b8c0cc;border-radius:4px}.admin-draft-remove{height:36px;padding:0 12px;border:1px solid #8390a3;background:#fff;border-radius:4px;cursor:pointer}@media(max-width:800px){.workspace{grid-template-columns:1fr}.palette{display:none}.topbar{grid-template-columns:1fr;height:auto;padding:8px 12px;gap:4px}}
