:root{--bg:#f3f8ff;--panel:#fff;--line:#dce8f6;--text:#172033;--muted:#66768f;--primary:#1677ff;--primary-2:#0f5fd2;--success:#14b87a;--warning:#f6a609;--danger:#ef4444;--soft:#eef6ff;--shadow:0 12px 40px rgba(11, 43, 90, 0.08), 0 4px 12px rgba(11, 43, 90, 0.04);--radius:20px;--transition-smooth:all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1)}
*{box-sizing:border-box}
body{margin:0;font-family:var(--font);background:var(--bg);color:var(--text)}
/* Shared text scale: 12, 13, 14, 15, 16, 18, 20, 24, 28px. */
h1{font-size:28px}h2{font-size:24px}h3{font-size:18px}h4{font-size:16px}h5,h6,small{font-size:12px}
code,pre,kbd,samp{font-family:inherit;font-size:inherit}
a{text-decoration:none;color:inherit}
button,input,select,textarea{font:inherit}
input,select,textarea{width:100%;border:1px solid var(--line);border-radius:12px;padding:11px 13px;background:rgba(255,255,255,0.8);backdrop-filter:blur(4px);color:var(--text);outline:none;transition:all 0.25s ease}
textarea{min-height:90px;resize:vertical}
input:focus,select:focus,textarea:focus{border-color:var(--primary);box-shadow:0 0 0 4px rgba(22,119,255,.15);background:#fff}
label{display:grid;gap:7px;font-weight:650;color:#25364d}
code{background:#f3f7fc;border:1px solid #dde9f7;border-radius:8px;padding:2px 5px}
.muted{color:var(--muted)}.center{text-align:center}.actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.brand-mark{width:44px;height:56px;background:transparent;display:grid;place-items:center;padding:0;overflow:visible}.brand-mark img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;object-position:center;display:block}.brand-mark.big{width:72px;height:92px}.brand-mark.big img{max-width:72px;max-height:92px}.app-shell{min-height:100vh;display:flex;align-items:stretch}.sidebar{position:sticky;top:0;width:250px;min-width:250px;height:100vh;display:flex;flex-direction:column;gap:14px;padding:16px 12px;background:linear-gradient(180deg,#0d4b93 0%,#0f3e7c 48%,#102f5f 100%);color:#fff;box-shadow:18px 0 45px rgba(16,47,95,.18);overflow-y:auto}.side-brand{display:flex;align-items:center;gap:12px;min-width:0;padding:4px 4px 14px;border-bottom:1px solid rgba(255,255,255,.14)}.side-brand.no-pad{padding:0;border-bottom:0}.side-brand>div{min-width:0}.side-brand b{display:block;font-size:14px;line-height:1.25;overflow-wrap:anywhere}.side-brand span{display:block;margin-top:3px;color:rgba(255,255,255,.72);font-size:12px;line-height:1.35}.sidebar nav{display:grid;gap:4px}.sidebar nav a{display:flex;gap:10px;align-items:center;min-width:0;padding:9px 12px;border-radius:10px;font-size:14px;color:rgba(255,255,255,.82);transition:var(--transition-smooth)}.sidebar nav a span{width:22px;flex:0 0 22px;text-align:center}.sidebar nav a:hover,.sidebar nav a.active{background:rgba(255,255,255,.14);color:#fff;transform:translateX(2px)}.side-footer{margin-top:auto;color:rgba(255,255,255,.78);font-size:12px;line-height:1.6}
.main{flex:1;min-width:0;padding:16px 22px 30px}.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}.topbar h1{margin:3px 0 0;font-size:20px}.crumb{color:var(--muted);font-size:12px;display:flex;gap:7px;align-items:center;flex-wrap:wrap}.userbox{display:flex;align-items:center;gap:14px;background:rgba(255, 255, 255, 0.85);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,0.5);border-radius:14px;padding:8px 12px;box-shadow:0 8px 24px rgba(31,64,113,.05);transition:var(--transition-smooth)}.userbox:hover{background:#fff;box-shadow:0 12px 32px rgba(31,64,113,.08);transform:translateY(-1px)}.userbox b,.userbox span{display:block}.userbox span{color:var(--muted);font-size:12px}
.btn{border:0;border-radius:12px;padding:10px 15px;font-weight:800;cursor:pointer;transition:var(--transition-smooth);display:inline-flex;align-items:center;justify-content:center;gap:8px}.btn:hover{transform:translateY(-2px);filter:brightness(1.05);box-shadow:0 6px 16px rgba(0,0,0,0.08)}.btn:active{transform:translateY(0);box-shadow:0 2px 8px rgba(0,0,0,0.05)}.btn:disabled{opacity:.5;cursor:not-allowed;transform:none}.btn.primary{background:var(--primary);color:#fff}.btn.ghost{background:#eef5ff;color:#175ba7;border:1px solid var(--line)}.btn.warning{background:#fff2d5;color:#9d6100;border:1px solid #ffe0a3}.btn.danger{background:#fff1f0;color:#b42318;border:1px solid #ffd1cc}.btn.full{width:100%}.btn.tiny{padding:7px 10px;border-radius:10px;font-size:12px}
.page-head{display:flex;justify-content:space-between;gap:16px;align-items:center;background:linear-gradient(135deg,rgba(255,255,255,0.9),rgba(238,247,255,0.9));backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,0.6);border-radius:var(--radius);padding:16px 20px;margin-bottom:16px;box-shadow:0 12px 30px rgba(31,64,113,.06);transition:var(--transition-smooth)}.page-head h2{margin:0 0 5px;font-size:20px}.page-head p{margin:0;color:var(--muted);font-size:13px}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.stat-card{display:flex;align-items:center;gap:12px;background:rgba(255,255,255,0.9);backdrop-filter:blur(8px);border:1px solid rgba(255,255,255,0.5);border-radius:16px;padding:14px;box-shadow:0 8px 24px rgba(31,64,113,.06);transition:var(--transition-smooth)}.stat-card:hover{transform:translateY(-3px);box-shadow:0 14px 32px rgba(31,64,113,.1);background:#fff}.stat-icon{width:42px;height:42px;border-radius:14px;background:linear-gradient(135deg,#eef7ff,#dff1ff);display:grid;place-items:center}.stat-card span,.stat-card em{display:block;color:var(--muted);font-size:12px;font-style:normal}.stat-card strong{display:block;font-size:24px}
.panel{background:rgba(255,255,255,0.95);backdrop-filter:blur(8px);border:1px solid rgba(255,255,255,0.6);border-radius:var(--radius);padding:16px;box-shadow:var(--shadow);margin-bottom:16px;transition:var(--transition-smooth)}.panel-title{display:flex;justify-content:space-between;align-items:center;gap:12px}.grid{display:grid;gap:14px}.grid.two{grid-template-columns:minmax(300px,420px) 1fr}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.grid.four-report{grid-template-columns:repeat(4,minmax(0,1fr))}.grid.compact{gap:10px}.recap-box{border:1px solid var(--line);border-radius:14px;background:#fbfdff;padding:12px}.recap-box h4{margin:0 0 8px}.span-two{grid-column:1/-1}.form{display:grid;gap:12px;align-content:start}.form.wide{max-width:740px}.filter-form{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px;border:1px solid var(--line);border-radius:12px;background:#f8fbff;padding:10px;margin:10px 0 14px}.filter-form label{display:flex;flex-direction:column;gap:4px;font-size:12px;flex:1 1 160px;min-width:140px}.filter-form input,.filter-form select{min-height:34px;height:34px;padding:6px 10px;border-radius:10px;font-size:13px;width:100%}.filter-actions{display:flex;gap:8px;align-items:center;margin-left:auto}.checks{display:grid;gap:8px}.checks label,.doubt-check{display:flex;align-items:center;gap:9px;font-weight:600}.checks input,.doubt-check input{width:auto}

table{width:100%;border-collapse:collapse}table tbody tr{transition:background 0.2s}table tbody tr:hover td{background:#f4f8fe}th,td{padding:10px 8px;border-bottom:1px solid #edf3fb;text-align:left;vertical-align:middle;font-size:13px}th{font-size:12px;color:#5d6f87;text-transform:uppercase;letter-spacing:.04em;background:#f8fbff;vertical-align:bottom}.table-wrap{overflow:auto}.badge{display:inline-flex;padding:4px 8px;border-radius:999px;font-size:12px;font-weight:800;background:#eff4fb;color:#526070}.badge.primary{background:#e8f2ff;color:#145fbb}.badge.success{background:#e9fbf3;color:#0b7a50}.badge.warning{background:#fff5d8;color:#966000}.badge.danger{background:#fff0ee;color:#b42318}.bar-track{height:9px;background:#edf3fb;border:1px solid #dce8f6;border-radius:999px;overflow:hidden;min-width:120px;margin-bottom:5px}.bar-track span{display:block;height:100%;background:linear-gradient(90deg,#1677ff,#14b87a)}.mini-list{display:grid;gap:8px}.mini-list>div:not(.empty){border:1px solid var(--line);border-radius:12px;background:#f8fbff;padding:10px}.mini-list span,.mini-list em{display:block;color:var(--muted);font-size:12px;font-style:normal}.mini-list b{display:block;margin-top:3px;font-size:13px}.toast{border-radius:14px;padding:12px 14px;margin-bottom:14px;border:1px solid var(--line);background:#f8fbff;font-size:14px}.toast.success{background:#eafbF5;color:#096847;border-color:#b9efd8;animation:toast-success-dismiss 5s ease 3s forwards}@keyframes toast-success-dismiss{to{opacity:0;visibility:hidden}}.toast.error,.toast.danger{background:#fff1f0;color:#a8071a;border-color:#ffccc7}.toast.warning{background:#fff8e6;color:#8a5a00;border-color:#ffe2a8}
.compact-list{margin:8px 0 0;padding-left:18px;color:#4f6078;font-size:12px;line-height:1.5}details summary{cursor:pointer;color:#175ba7;font-weight:800;margin-top:6px}
.question-pick{max-height:260px;overflow:auto;display:grid;gap:8px;border:1px solid var(--line);border-radius:14px;padding:10px;background:#fbfdff}.question-pick label{display:flex;gap:8px;font-weight:500}.question-pick input{width:auto}.inline{display:inline-flex;gap:6px;align-items:center}.inline select{width:auto;min-width:92px}.inline .review-comment{width:170px;min-width:150px}.incident-form{display:grid;grid-template-columns:minmax(160px,1fr) auto;gap:6px;margin-top:8px}.incident-form input{height:34px;padding:7px 10px;border-radius:10px;font-size:12px}.review-note{display:grid;gap:8px;border:1px solid var(--line);border-radius:14px;background:#f8fbff;padding:12px;margin:10px 0}.review-note>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.review-note p{margin:0;color:#31445f;line-height:1.5}.token{font-size:18px;background:#ecfdf5;color:#047857;padding:5px 8px;border-radius:8px}.empty{text-align:center;color:var(--muted);padding:28px}.analysis-line{display:block;color:#4f6078;font-size:12px;line-height:1.45}.footer{margin-top:24px;color:var(--muted);font-size:12px}.signature{display:flex;justify-content:space-around;padding-top:70px}.print-card{display:none}
.login-bg{background:#f6f8fb}.auth-wrap{position:relative;min-height:100vh;display:grid;grid-template-rows:150px 1fr;overflow:hidden}.auth-wrap:before{content:"";position:absolute;inset:0 0 auto;height:150px;background:linear-gradient(105deg,#1176b8 0%,#2b6b9e 48%,#356b9d 100%)}.auth-wrap:after{content:"";position:absolute;inset:0 0 auto;height:150px;background:linear-gradient(120deg,rgba(255,255,255,.16),rgba(255,255,255,0) 54%);clip-path:polygon(0 0,25% 0,15% 100%,0 68%)}.auth-hero{position:relative;z-index:1;height:150px;color:#fff;display:flex;align-items:center;gap:16px;padding:24px clamp(24px,4vw,58px)}.auth-hero .brand-mark.big{width:62px;height:80px}.auth-hero h1{max-width:520px;margin:0 0 4px;font-size:18px;line-height:1.25;font-weight:900;text-transform:uppercase}.auth-hero p{margin:0;color:#edf7ff;font-size:13px;font-weight:750;text-transform:uppercase}.auth-card{position:relative;z-index:2;align-self:start;justify-self:center;width:min(450px,calc(100% - 32px));margin-top:-30px;background:rgba(255,255,255,0.85);backdrop-filter:blur(20px);border:1px solid rgba(255,255,255,0.7);border-radius:18px;box-shadow:0 30px 80px rgba(17,118,184,.15), 0 0 0 1px rgba(255,255,255,0.4) inset;padding:30px 32px;display:grid;gap:16px;transition:var(--transition-smooth)}.auth-card h2{margin:0;color:#202938;font-size:24px;line-height:1.25;font-weight:850}.auth-card p{margin:0 0 4px;font-size:14px;line-height:1.65}.auth-card label{gap:6px;color:#26364a;font-size:13px;font-weight:800}.auth-card input{border-width:0 0 1px;border-color:#dce5ef;border-radius:0;background:transparent;padding:10px 0 11px;box-shadow:none}.auth-card input:focus{border-color:var(--primary);box-shadow:none}.auth-card .btn{min-height:40px;border-radius:10px}.auth-card .btn.primary{background:#0f80f2}.auth-alt-link{color:#536783;text-align:center;font-size:14px;font-weight:650}.auth-alt-link:hover{color:#0f5fd2}
.tka-bg{background:linear-gradient(180deg,#eef6ff 0,#f8fbff 230px,#f4f7fb 100%)}.tka-top{height:60px;background:linear-gradient(90deg,#0e4ca3,#116de4);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 28px;box-shadow:0 10px 30px rgba(14,76,163,.18)}.top-logout .btn{background:rgba(255,255,255,.14);color:#fff;border-color:rgba(255,255,255,.25)}.tka-main{max-width:860px;margin:24px auto;padding:0 16px}.tka-start-card{background:rgba(255,255,255,0.92);backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,0.7);border-radius:18px;box-shadow:0 26px 70px rgba(14,76,163,.1), 0 0 0 1px rgba(255,255,255,0.5) inset;padding:24px 26px;transition:var(--transition-smooth)}.tka-start-card.narrow{max-width:520px;margin:0 auto}.tka-start-card h1{margin:0 0 6px;font-size:24px;line-height:1.2}.tka-start-card p{margin:0;color:#52627a;line-height:1.6}.student-mini{display:grid;gap:4px;border-left:4px solid var(--primary);padding:4px 0 4px 14px;margin:22px 0;color:#25364d}.student-mini span{color:var(--muted)}.simulation-picker{display:grid;gap:16px;margin-top:20px}.picker-grid{display:grid;grid-template-columns:160px repeat(2,minmax(0,1fr));gap:14px}.empty.compact{padding:14px}.session-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:20px 0}.session-card{display:block;border:1px solid rgba(255,255,255,0.6);border-radius:20px;padding:20px;background:linear-gradient(135deg,rgba(255,255,255,0.95),rgba(243,249,255,0.9));backdrop-filter:blur(10px);box-shadow:0 8px 24px rgba(31,64,113,.04);transition:var(--transition-smooth)}.session-card:hover{transform:translateY(-5px) scale(1.01);box-shadow:0 22px 45px rgba(14,76,163,.12);background:linear-gradient(135deg,#fff,#fff)}.session-card span{display:inline-flex;background:#e8f2ff;color:#145fbb;border-radius:999px;padding:5px 10px;font-weight:800;font-size:12px}.session-card h3{margin:12px 0 4px}.session-card p{color:var(--muted)}.session-card em{font-style:normal;color:#0b7a50;font-weight:800}
.confirm-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:18px;row-gap:0;margin:16px 0;border-top:1px solid var(--line)}.confirm-list div{border-bottom:1px solid var(--line);padding:12px 0;min-width:0}.confirm-list span{display:block;color:var(--muted);font-size:12px;font-weight:750;text-transform:uppercase;letter-spacing:.03em}.confirm-list b{display:block;margin-top:4px;font-weight:800;overflow-wrap:anywhere}.score-circle{width:120px;height:120px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#1677ff,#20c997);color:#fff;font-size:28px;font-weight:900;margin:16px auto;box-shadow:0 18px 40px rgba(22,119,255,.25)}.review-list{display:grid;gap:10px}.review-item{background:#f8fbff;border:1px solid var(--line);border-radius:14px;padding:14px}.review-item p{margin:6px 0}.review-item span,.review-item em{display:block;color:var(--muted);font-size:13px}.review-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:10px 0}.review-columns div{background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px}.review-columns strong{display:block;margin-top:5px;font-size:13px}
.exam-body{height:100vh;overflow:hidden;background:#f1f5fa}.exam-layout{height:100vh;display:grid;grid-template-columns:270px 1fr;grid-template-rows:74px 1fr 76px;grid-template-areas:"head head" "nums question" "foot foot"}.exam-header{grid-area:head;background:linear-gradient(90deg,#0e4ca3,#116de4);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 22px;box-shadow:0 10px 30px rgba(14,76,163,.18)}.font-tools{display:flex;gap:8px}.font-tools button{border:1px solid rgba(255,255,255,.3);background:rgba(255,255,255,.14);color:#fff;border-radius:10px;padding:8px 10px;cursor:pointer}.timer,.autosave{background:rgba(255,255,255,.14);padding:9px 13px;border-radius:10px;font-weight:800}.autosave{font-size:12px;font-weight:700;color:#e8f4ff}.autosave[data-state=saving]{background:rgba(255,245,216,.22);color:#fff7dc}.autosave[data-state=saved]{background:#ecfdf5;color:#047857}.autosave[data-state=error]{background:rgba(255,240,238,.24);color:#ffe4e1}.number-panel{grid-area:nums;background:#fff;border-right:1px solid var(--line);padding:14px;overflow:auto}.number-panel h3{margin-top:0}.num-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.num{height:42px;border-radius:10px;display:grid;place-items:center;border:1px solid var(--line);font-weight:900;background:#fff}.num.answered{background:#e9fbf3;color:#067a51;border-color:#b9efd8}.num.doubt{background:#fff5d8;color:#9d6100;border-color:#ffe0a3}.num.active{background:#1677ff;color:#fff;border-color:#1677ff}.legend{display:grid;gap:7px;margin-top:18px;color:var(--muted);font-size:12px}.legend span{display:flex;align-items:center;gap:8px}.l{width:14px;height:14px;border-radius:5px;display:inline-block;border:1px solid var(--line)}.l.answered{background:#e9fbf3}.l.doubt{background:#fff5d8}.l.active{background:#1677ff}.finish-modal{position:fixed;inset:0;z-index:50;display:grid;place-items:center;background:rgba(11,31,62,.52);padding:18px}.finish-modal[hidden]{display:none}.finish-dialog{width:min(520px,100%);background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 28px 80px rgba(11,31,62,.28);padding:18px}.finish-dialog h2{margin:0 0 8px;font-size:20px}.finish-dialog p{margin:0;color:var(--muted)}.finish-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:18px 0}.finish-summary div{border:1px solid var(--line);background:#f8fbff;border-radius:12px;padding:12px}.finish-summary span{display:block;color:var(--muted);font-size:12px}.finish-summary b{display:block;margin-top:4px;font-size:20px}.finish-actions{display:flex;justify-content:flex-end;gap:10px}
.question-panel{grid-area:question;overflow:auto;padding:22px;transition:var(--transition-smooth)}.question-panel.font-lg{font-size:20px}.question-top{display:flex;justify-content:space-between;align-items:center;background:rgba(255,255,255,0.9);backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,0.6);border-radius:20px;padding:16px 18px;margin-bottom:14px;box-shadow:0 10px 24px rgba(31,64,113,.06)}.question-top h2{margin:0}.stimulus,.question-media,.question-text,.answers{background:rgba(255,255,255,0.85);backdrop-filter:blur(8px);border:1px solid rgba(255,255,255,0.6);border-radius:20px;padding:20px;margin-bottom:14px;line-height:1.7;box-shadow:0 4px 12px rgba(31,64,113,.03)}.stimulus{background:#fbfdff}.question-media{display:grid;gap:12px}.media-card{display:grid;gap:8px}.media-card img{max-width:100%;max-height:420px;object-fit:contain;border-radius:12px;border:1px solid var(--line);background:#f8fbff}.media-card audio{width:100%}.media-caption{margin:0;color:var(--muted);font-size:13px}.media-link{width:max-content}.question-text{font-weight:700}.answers{display:grid;gap:10px}.answer-card{display:flex;align-items:flex-start;gap:12px;border:1px solid var(--line);border-radius:16px;padding:14px;cursor:pointer;transition:var(--transition-smooth);background:#fff;font-weight:600}.answer-card:hover{border-color:var(--primary);box-shadow:0 12px 28px rgba(22,119,255,.12);transform:translateY(-2px)}.answer-card input{width:auto;margin-top:4px}.preview-option{cursor:default}.preview-option:hover{border-color:var(--line);box-shadow:none}.op-label{min-width:34px;height:34px;border-radius:10px;background:#eef6ff;display:grid;place-items:center;font-weight:900;color:#135eb7}.answer-card:has(input:checked){border-color:var(--primary);background:#f0f7ff}.statement-list,.match-list{display:grid;gap:10px}.statement-row{display:grid;grid-template-columns:1fr 120px 120px;gap:10px;align-items:center;border:1px solid var(--line);border-radius:14px;padding:12px;background:#fff}.statement-row div,.match-row span{display:flex;align-items:center;gap:10px}.statement-row label{display:flex;align-items:center;gap:8px;font-weight:700}.statement-row input{width:auto}.match-row{display:grid;grid-template-columns:1fr minmax(180px,320px);gap:12px;align-items:center;border:1px solid var(--line);border-radius:14px;padding:12px;background:#fff}.doubt-check{background:#fff;border:1px solid var(--line);padding:12px 14px;border-radius:14px;margin-bottom:56px}.exam-footer{grid-area:foot;background:#fff;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:10px;align-items:center;padding:12px 22px}.exam-footer .btn{min-width:130px}.package-preview-shell{display:grid;grid-template-columns:250px 1fr;gap:18px}.preview-number-panel{position:sticky;top:16px;align-self:start;background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px;box-shadow:var(--shadow)}.preview-number-panel h3{margin-top:0}.preview-question-list{display:grid;gap:18px}.preview-question-card{background:#edf5ff;border:1px solid var(--line);border-radius:20px;padding:18px}.package-preview-meta{margin:0}
.print-body{background:#fff}.print-head{display:flex;align-items:center;justify-content:space-between;padding:20px 28px;border-bottom:1px solid #ddd}.print-head h1{margin:0}.print-head p{margin:4px 0 0;color:#555}.card-sheet{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;padding:20px}.login-card{border:1px solid #bbb;border-radius:14px;padding:16px;break-inside:avoid}.brand-row{display:flex;gap:10px;align-items:center;margin-bottom:12px}.brand-row span{display:block;font-size:12px;color:#666}.login-card dl{display:grid;grid-template-columns:120px 1fr;gap:6px;margin:0}.login-card dt{color:#666}.login-card dd{margin:0;font-weight:700}.print-document{max-width:1120px;margin:0 auto;padding:26px 34px 46px}.doc-title{text-align:center;margin-bottom:18px}.doc-title h2{margin:0;font-size:24px;letter-spacing:.03em}.doc-title p{margin:6px 0 0;color:#555}.doc-meta,.doc-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:16px 0}.doc-meta div,.doc-summary div{border:1px solid #d8d8d8;border-radius:8px;padding:10px;background:#fff}.doc-meta span,.doc-summary span{display:block;color:#666;font-size:12px}.doc-meta b,.doc-summary b{display:block;margin-top:4px}.token-display{display:grid;place-items:center;border:2px solid #0e4ca3;border-radius:18px;padding:24px;margin:18px auto;max-width:520px;background:#f7fbff}.token-display span{font-size:13px;color:#555;text-transform:uppercase;letter-spacing:.08em}.token-display b{font-size:28px;letter-spacing:.12em;color:#0e4ca3}.doc-paragraph{line-height:1.7;margin:16px 0}.print-table{width:100%;border-collapse:collapse;margin-top:14px}.print-table th,.print-table td{border:1px solid #bdbdbd;padding:8px;font-size:12px}.print-table th{background:#f0f4f8;color:#222}.compact-print th,.compact-print td{padding:7px}.signature-cell{height:36px}.doc-signatures{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-top:52px;text-align:center}.doc-signatures.three{grid-template-columns:repeat(3,minmax(0,1fr))}.doc-signatures span{display:block;margin-bottom:58px}.doc-signatures b{font-weight:600}.incident-lines{display:grid;gap:18px;margin:10px 0 24px}.incident-lines span{display:block;border-bottom:1px solid #bbb;padding-bottom:8px}
@media(max-width:900px){.sidebar{display:none}.main{padding:16px}.stats-grid{grid-template-columns:repeat(2,1fr)}.grid.two,.grid.three,.grid.four-report,.package-preview-shell{grid-template-columns:1fr}.auth-wrap{grid-template-rows:132px 1fr}.auth-wrap:before,.auth-wrap:after{height:132px}.auth-hero{height:132px;padding:22px 18px;gap:12px}.auth-hero .brand-mark.big{width:48px;height:62px}.auth-hero .brand-mark.big img{max-width:48px;max-height:62px}.auth-hero h1{max-width:280px;font-size:13px}.auth-hero p{font-size:12px}.auth-card{width:min(430px,calc(100% - 24px));margin-top:-18px;padding:28px 22px}.session-grid,.picker-grid,.confirm-list,.review-columns,.finish-summary{grid-template-columns:1fr}.exam-layout{grid-template-columns:1fr;grid-template-rows:auto auto 1fr auto;grid-template-areas:"head" "nums" "question" "foot"}.exam-body{overflow:auto}.exam-layout{height:auto;min-height:100vh}.number-panel{border-right:0;border-bottom:1px solid var(--line)}.preview-number-panel{position:static}.num-grid{grid-template-columns:repeat(10,1fr)}.exam-header{gap:12px;flex-wrap:wrap;height:auto;padding:12px}.statement-row,.match-row{grid-template-columns:1fr}.exam-footer{position:sticky;bottom:0;flex-wrap:wrap}.exam-footer .btn{min-width:auto;flex:1}.finish-actions{display:grid}.topbar{display:grid;gap:12px}.stats-grid{grid-template-columns:1fr}.page-head{display:grid}.card-sheet{grid-template-columns:1fr}}

@media print{.sidebar,.topbar,.page-head .actions,.btn,.footer,.no-print{display:none!important}.main{padding:0}.panel{box-shadow:none;border:0}.print-card{display:block}.app-shell{display:block}body{background:#fff}.print-head{display:none}.card-sheet{grid-template-columns:repeat(2,1fr);padding:0}.login-card{border-color:#333}.print-document{max-width:none;padding:0}.doc-meta,.doc-summary{grid-template-columns:repeat(4,1fr)}.print-table th,.print-table td{font-size:12px;padding:6px}}


/* Modern compact UI refresh */
@media screen {
    :root {
        --bg: #eef3f8;
        --panel: #ffffff;
        --line: #d8e2ef;
        --text: #101827;
        --muted: #617089;
        --primary: #0b6fe8;
        --primary-2: #064fb4;
        --success: #07966b;
        --warning: #d98a00;
        --danger: #dc2626;
        --soft: #edf6ff;
        --shadow: 0 10px 26px rgba(15, 45, 86, .08);
        --shadow-strong: 0 18px 46px rgba(15, 45, 86, .14);
        --radius: 12px;
        --transition-smooth: all .18s ease;
    }

    html {
        background: var(--bg);
    }

    body {
        background:
            linear-gradient(180deg, rgba(228, 237, 248, .92), rgba(245, 248, 252, .98) 310px),
            var(--bg);
        color: var(--text);
        font-family: var(--font);
        font-size: 14px;
        line-height: 1.45;
    }

    input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
    select,
    textarea {
        min-height: 36px;
        border-color: #d4deeb;
        border-radius: 9px;
        padding: 8px 10px;
        background: #fbfdff;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
    }

    textarea {
        min-height: 82px;
    }

    input:focus,
    select:focus,
    textarea:focus {
        border-color: #2b7ff0;
        box-shadow: 0 0 0 3px rgba(11, 111, 232, .13);
    }

    label {
        gap: 5px;
        color: #26364c;
        font-size: 12px;
        font-weight: 750;
    }

    .app-shell {
        background: transparent;
    }

    .sidebar {
        width: 228px;
        min-width: 228px;
        gap: 10px;
        padding: 12px 10px;
        background:
            linear-gradient(180deg, rgba(17, 106, 194, .92), rgba(8, 56, 121, .96)),
            #083879;
        border-right: 1px solid rgba(255, 255, 255, .13);
        box-shadow: 18px 0 38px rgba(19, 50, 94, .18);
    }

    .side-brand {
        gap: 10px;
        padding: 4px 6px 12px;
        border-bottom-color: rgba(255, 255, 255, .16);
    }

    .brand-mark {
        width: 36px;
        height: 46px;
        flex: 0 0 auto;
    }

    .brand-mark.big {
        width: 60px;
        height: 76px;
    }

    .brand-mark.big img {
        max-width: 60px;
        max-height: 76px;
    }

    .side-brand b {
        font-size: 12px;
        font-weight: 900;
        letter-spacing: .01em;
    }

    .side-brand span {
        margin-top: 2px;
        font-size: 12px;
        color: rgba(255, 255, 255, .72);
    }

    .sidebar nav {
        gap: 2px;
    }

    .sidebar nav a {
        gap: 9px;
        min-height: 34px;
        padding: 7px 9px;
        border: 1px solid transparent;
        border-radius: 9px;
        color: rgba(239, 247, 255, .84);
        font-size: 12px;
        font-weight: 750;
    }

    .sidebar nav a span {
        width: 24px;
        height: 24px;
        flex: 0 0 24px;
        display: grid;
        place-items: center;
        border-radius: 8px;
        background: rgba(255, 255, 255, .09);
        color: #e6f2ff;
        font-size: 13px;
        line-height: 1;
    }

    .sidebar nav a:hover,
    .sidebar nav a.active {
        background: rgba(255, 255, 255, .16);
        border-color: rgba(255, 255, 255, .12);
        color: #fff;
        transform: none;
    }

    .sidebar nav a.active span {
        background: #fff;
        color: #0a5ed0;
        box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
    }

    .side-footer {
        padding: 10px 6px 4px;
        border-top: 1px solid rgba(255, 255, 255, .12);
        font-size: 12px;
        color: rgba(255, 255, 255, .68);
    }

    .main {
        padding: 14px 18px 24px;
    }

    .topbar {
        min-height: 54px;
        margin-bottom: 12px;
        padding: 0 2px;
    }

    .crumb {
        gap: 6px;
        font-size: 12px;
        color: #6e7e94;
    }

    .topbar h1 {
        margin-top: 2px;
        font-size: 20px;
        line-height: 1.2;
        letter-spacing: 0;
    }

    .userbox {
        gap: 10px;
        border-radius: 10px;
        border-color: rgba(213, 224, 238, .9);
        background: rgba(255, 255, 255, .82);
        box-shadow: 0 8px 22px rgba(19, 50, 94, .07);
        padding: 7px 8px 7px 12px;
    }

    .userbox:hover {
        transform: none;
        box-shadow: 0 10px 24px rgba(19, 50, 94, .1);
    }

    .userbox b {
        font-size: 12px;
    }

    .userbox span {
        font-size: 12px;
    }

    .btn {
        min-height: 34px;
        padding: 8px 12px;
        border-radius: 9px;
        font-size: 12px;
        font-weight: 850;
        letter-spacing: 0;
        box-shadow: none;
    }

    .btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 18px rgba(15, 45, 86, .1);
    }

    .btn.primary {
        background: linear-gradient(180deg, var(--theme-primary), var(--theme-primary-dark));
    }

    .btn.ghost {
        background: #f3f8ff;
        color: #17529a;
        border: 1px solid #d7e5f6;
    }

    .btn.warning {
        background: #fff7df;
        color: #8c5600;
        border: 1px solid #f4d28a;
    }

    .btn.danger {
        background: #fff0f0;
        color: #af1f1f;
        border: 1px solid #f5c7c7;
    }

    .btn.tiny {
        min-height: 28px;
        padding: 6px 9px;
        border-radius: 8px;
        font-size: 12px;
    }

    .page-head {
        margin-bottom: 12px;
        padding: 13px 16px;
        border-color: rgba(215, 226, 239, .86);
        border-radius: 12px;
        background:
            linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(238, 246, 255, .88));
        box-shadow: var(--shadow);
    }

    .page-head h2 {
        margin-bottom: 3px;
        font-size: 18px;
    }

    .page-head p {
        max-width: 760px;
        font-size: 12px;
    }

    .stats-grid {
        grid-template-columns: repeat(4, minmax(150px, 1fr));
        gap: 10px;
        margin-bottom: 12px;
    }

    .stat-card {
        min-height: auto;
        gap: 10px;
        border-color: rgba(215, 226, 239, .86);
        border-radius: 12px;
        background: rgba(255, 255, 255, .93);
        padding: 11px 12px;
        box-shadow: var(--shadow);
    }

    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-strong);
    }

    .stat-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: linear-gradient(135deg, #e8f3ff, #dcecff);
        color: #0b6fe8;
        font-size: 15px;
    }

    .stat-card span,
    .stat-card em {
        font-size: 12px;
    }

    .stat-card strong {
        margin-top: 1px;
        font-size: 20px;
        letter-spacing: 0;
    }

    .grid {
        gap: 12px;
    }

    .grid.two {
        grid-template-columns: minmax(300px, .95fr) minmax(360px, 1.05fr);
    }

    .panel {
        margin-bottom: 12px;
        padding: 13px;
        border: 1px solid rgba(215, 226, 239, .9);
        border-radius: 12px;
        background: rgba(255, 255, 255, .95);
        box-shadow: var(--shadow);
    }

    .panel-title {
        min-height: 31px;
        padding-bottom: 8px;
    }

    .panel-title h3 {
        margin: 0;
        font-size: 15px;
        line-height: 1.25;
    }

    .table-wrap {
        border: 1px solid #e2eaf4;
        border-radius: 10px;
        background: #fff;
    }

    table {
        border-collapse: separate;
        border-spacing: 0;
    }

    th,
    td {
        padding: 8px 9px;
        border-bottom-color: #e8eff7;
        font-size: 12px;
    }

    th {
        position: sticky;
        top: 0;
        z-index: 1;
        background: #f5f8fc;
        color: #526176;
        font-size: 12px;
        font-weight: 900;
        letter-spacing: .05em;
    }

    tbody tr:last-child td {
        border-bottom: 0;
    }

    table tbody tr:hover td {
        background: #f7fbff;
    }

    .badge {
        min-height: 22px;
        align-items: center;
        padding: 3px 8px;
        border-radius: 999px;
        font-size: 12px;
        font-weight: 900;
        border: 1px solid transparent;
    }

    .badge.primary {
        background: #e8f3ff;
        color: #0759bb;
        border-color: #c7ddfb;
    }

    .badge.success {
        background: #e8fbf4;
        color: #06714f;
        border-color: #bcebd7;
    }

    .badge.warning {
        background: #fff6de;
        color: #875300;
        border-color: #f1d187;
    }

    .badge.danger {
        background: #fff0f0;
        color: #a31d1d;
        border-color: #f3caca;
    }

    code,
    .token {
        border-color: #d7e5f4;
        border-radius: 7px;
        background: #eef7ff;
        color: #0759bb;
        font-size: 12px;
    }

    .token {
        display: inline-flex;
        align-items: center;
        min-height: 26px;
        font-weight: 900;
    }

    .mini-list {
        gap: 7px;
    }

    .mini-list > div:not(.empty),
    .recap-box {
        border-color: #e1eaf4;
        border-radius: 10px;
        background: #f8fbff;
        padding: 9px 10px;
    }

    .mini-list b {
        font-size: 13px;
    }

    .empty {
        padding: 20px 12px;
        color: #7a8799;
    }

    .toast {
        margin-bottom: 12px;
        border-radius: 10px;
        padding: 10px 12px;
        font-size: 13px;
        box-shadow: var(--shadow);
    }

    .filter-form,
    .review-note,
    .question-pick {
        border-color: #e0e9f3;
        border-radius: 10px;
        background: #f8fbff;
        padding: 10px;
    }

    .filter-form {
        gap: 8px;
        margin: 8px 0 12px;
    }

    .filter-actions {
        align-items: end;
    }

    .compact-list,
    .analysis-line {
        font-size: 12px;
    }

    .login-bg {
        background: #eef3f8;
    }

    .auth-wrap {
        grid-template-rows: 132px 1fr;
    }

    .auth-wrap:before {
        height: 132px;
        background: linear-gradient(100deg, #0d82c4 0%, #176da8 45%, #315d8d 100%);
        box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .16);
    }

    .auth-wrap:after {
        height: 132px;
        background: linear-gradient(120deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 56%);
        clip-path: polygon(0 0, 25% 0, 15% 100%, 0 76%);
    }

    .auth-hero {
        height: 132px;
        gap: 13px;
        padding: 20px clamp(22px, 4vw, 60px);
    }

    .auth-hero > div {
        min-width: 0;
    }

    .auth-hero .brand-mark.big {
        width: 58px;
        height: 74px;
    }

    .auth-hero h1 {
        max-width: 610px;
        font-size: 16px;
        line-height: 1.22;
        letter-spacing: 0;
        overflow-wrap: anywhere;
    }

    .auth-hero p {
        font-size: 12px;
        letter-spacing: 0;
        overflow-wrap: anywhere;
    }

    .auth-card {
        width: min(420px, calc(100% - 32px));
        margin-top: -22px;
        gap: 14px;
        border-radius: 12px;
        border-color: rgba(218, 228, 240, .95);
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 24px 60px rgba(26, 66, 112, .16);
        padding: 32px 38px;
    }

    .auth-card h2 {
        font-size: 24px;
        font-weight: 900;
    }

    .auth-card p {
        font-size: 13px;
    }

    .auth-card input {
        min-height: 38px;
        padding: 8px 0 9px;
        border-bottom-color: #d4deeb;
        background: transparent;
    }

    .auth-card .btn {
        min-height: 42px;
        margin-top: 2px;
        border-radius: 9px;
        font-size: 14px;
    }

    .auth-alt-link {
        font-size: 13px;
    }

    .tka-bg {
        background:
            linear-gradient(180deg, #dfeeff 0, #f5f8fc 240px),
            #f5f8fc;
    }

    .tka-top {
        height: 64px;
        padding: 0 20px;
        background: linear-gradient(90deg, #0b4ca5, #0e72df);
    }

    .tka-main {
        max-width: 820px;
        margin: 24px auto;
    }

    .tka-start-card,
    .session-card,
    .review-item,
    .review-columns div {
        border-color: #dfe8f3;
        border-radius: 12px;
        box-shadow: var(--shadow);
    }

    .tka-start-card {
        padding: 20px 22px;
    }

    .tka-start-card h1 {
        font-size: 24px;
    }

    .session-grid {
        gap: 12px;
    }

    .session-card {
        padding: 16px;
    }

    .session-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-strong);
    }

    .exam-body {
        background: #edf2f8;
    }

    .exam-layout {
        grid-template-columns: 246px 1fr;
        grid-template-rows: 64px 1fr 64px;
    }

    .exam-header {
        padding: 0 16px;
        background: linear-gradient(90deg, #0b4ca5, #0e72df);
    }

    .exam-header .side-brand b {
        font-size: 12px;
    }

    .exam-header .side-brand span {
        font-size: 12px;
    }

    .font-tools {
        gap: 6px;
    }

    .font-tools button,
    .timer,
    .autosave {
        border-radius: 9px;
        background: rgba(255, 255, 255, .13);
        border: 1px solid rgba(255, 255, 255, .22);
    }

    .font-tools button {
        min-width: 34px;
        padding: 7px 8px;
    }

    .timer,
    .autosave {
        padding: 7px 10px;
        font-size: 12px;
    }

    .number-panel {
        padding: 14px;
        background: #ffffff;
    }

    .number-panel h3 {
        margin-bottom: 10px;
        font-size: 15px;
    }

    .num-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
    }

    .num {
        height: 36px;
        border-radius: 9px;
        font-size: 12px;
    }

    .legend {
        margin-top: 14px;
        font-size: 12px;
    }

    .question-panel {
        padding: 16px;
    }

    .question-top,
    .stimulus,
    .question-media,
    .question-text,
    .answers,
    .doubt-check,
    .answer-card,
    .statement-row,
    .match-row,
    .finish-dialog {
        border-color: #dfe8f3;
        border-radius: 12px;
        box-shadow: var(--shadow);
    }

    .question-top {
        padding: 12px 14px;
        margin-bottom: 10px;
    }

    .question-top h2 {
        font-size: 20px;
    }

    .stimulus,
    .question-media,
    .question-text,
    .answers {
        margin-bottom: 10px;
        padding: 15px;
        line-height: 1.62;
        background: rgba(255, 255, 255, .96);
    }

    .answer-card {
        gap: 10px;
        padding: 11px 12px;
    }

    .answer-card:hover {
        transform: translateY(-1px);
    }

    .op-label {
        min-width: 30px;
        height: 30px;
        border-radius: 8px;
        font-size: 12px;
    }

    .doubt-check {
        margin-bottom: 76px;
        padding: 10px 12px;
    }

    .exam-footer {
        gap: 8px;
        padding: 10px 16px;
        box-shadow: 0 -10px 28px rgba(15, 45, 86, .08);
    }

    .exam-footer .btn {
        min-width: 118px;
    }

    .finish-dialog {
        padding: 20px;
    }

    .finish-dialog h2 {
        font-size: 18px;
    }

    .finish-summary {
        gap: 8px;
    }

    .finish-summary div {
        border-radius: 10px;
        padding: 10px;
    }

    .finish-summary b {
        font-size: 24px;
    }

    @media (max-width: 1180px) {
        .stats-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .grid.two,
        .grid.three,
        .grid.four-report {
            grid-template-columns: 1fr;
        }
    }

    @media (max-width: 900px) {
        body {
            font-size: 13px;
            overflow-x: hidden;
        }

        html,
        .login-bg,
        .auth-wrap {
            max-width: 100vw;
            overflow-x: hidden;
        }

        .main {
            padding: 12px;
        }

        .page-head,
        .panel,
        .stat-card {
            border-radius: 10px;
        }

        .stats-grid {
            grid-template-columns: 1fr;
        }

        .auth-wrap {
            grid-template-rows: 120px 1fr;
        }

        .auth-wrap:before,
        .auth-wrap:after,
        .auth-hero {
            height: 120px;
        }

        .auth-card {
            box-sizing: border-box;
            justify-self: start;
            width: calc(100vw - 24px) !important;
            max-width: calc(100vw - 24px) !important;
            margin-right: 12px;
            margin-left: 12px;
            margin-top: -22px;
            padding: 26px 22px;
        }

        .auth-card input,
        .auth-card .btn {
            box-sizing: border-box;
            width: 100%;
            max-width: 100%;
            min-width: 0;
        }

        .auth-hero {
            gap: 10px;
            padding: 18px 14px;
        }

        .auth-hero .brand-mark.big {
            width: 44px;
            height: 56px;
        }

        .auth-hero .brand-mark.big img {
            max-width: 44px;
            max-height: 56px;
        }

        .auth-hero h1 {
            max-width: calc(100vw - 92px);
            font-size: 12px;
            line-height: 1.18;
        }

        .auth-hero p {
            max-width: calc(100vw - 92px);
            font-size: 12px;
            line-height: 1.25;
        }

        .exam-layout {
            grid-template-columns: 1fr;
            grid-template-rows: auto auto 1fr auto;
        }

        .exam-header {
            gap: 8px;
            padding: 10px;
        }

        .num-grid {
            grid-template-columns: repeat(10, minmax(30px, 1fr));
        }

        .exam-footer .btn {
            min-width: 0;
        }
    }
}

/* Bantuan publik bergaya Cupertino: dock kecil yang tetap di kanan bawah. */
.auth-support {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 999px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 12px 32px rgba(15, 23, 42, .2), 0 1px 0 rgba(255, 255, 255, .8) inset;
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
}

.auth-support-caption {
    padding-inline: 7px 3px;
    color: #334155;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .01em;
    white-space: nowrap;
}

.auth-support-link {
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 50%;
    color: #fff;
    background: var(--support-brand);
    box-shadow: 0 5px 14px var(--support-shadow), 0 1px 0 rgba(255, 255, 255, .3) inset;
    line-height: 0;
    text-decoration: none;
    touch-action: manipulation;
    transition: filter .16s ease, box-shadow .16s ease, transform .12s ease;
}

.auth-support-link:hover {
    filter: brightness(1.06);
    box-shadow: 0 7px 18px var(--support-shadow), 0 1px 0 rgba(255, 255, 255, .34) inset;
}

.auth-support-link:active {
    transform: scale(.94);
}

.auth-support-link:focus-visible {
    outline: 3px solid rgba(255, 255, 255, .96);
    outline-offset: 2px;
    box-shadow: 0 0 0 5px var(--support-brand), 0 7px 18px var(--support-shadow);
}

.auth-support-link svg {
    display: block;
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    flex: none;
    fill: currentColor;
}

.auth-support-link.telegram {
    --support-brand: #087eae;
    --support-shadow: rgba(8, 126, 174, .32);
}

.auth-support-link.whatsapp {
    --support-brand: #087b55;
    --support-shadow: rgba(8, 123, 85, .32);
}

@media (max-width: 480px) {
    .auth-support {
        right: max(12px, env(safe-area-inset-right));
        bottom: max(12px, env(safe-area-inset-bottom));
        padding: 6px;
    }

    .auth-support-caption {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .auth-support-link {
        width: 46px;
        height: 46px;
        min-width: 46px;
        min-height: 46px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-support-link {
        transition: none;
    }
}

/* Dashboard 2026 — data-first layout with lightweight illustrated summaries. */
.dashboard-v2 {
    --dashboard-blue: #2563eb;
    --dashboard-cyan: #0891b2;
    --dashboard-green: #059669;
    --dashboard-amber: #d97706;
    --dashboard-violet: #7c3aed;
    display: grid;
    gap: 20px;
    padding-bottom: 8px;
}

.dashboard-icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.dashboard-icon-sprite symbol,
.dashboard-quick-icon svg,
.dashboard-system-metric > svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.75;
}

.dashboard-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-summary-card {
    position: relative;
    min-height: 178px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .38);
    border-radius: 18px;
    background: #eff6ff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .07);
    color: #0f172a;
    isolation: isolate;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.dashboard-summary-card::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(255, 255, 255, .98) 0%, rgba(255, 255, 255, .9) 36%, rgba(255, 255, 255, .12) 66%, transparent 100%);
    content: "";
}

.dashboard-summary-card img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .35s ease;
}

.dashboard-summary-card:hover {
    border-color: rgba(37, 99, 235, .32);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .13);
    transform: translateY(-3px);
}

.dashboard-summary-card:hover img {
    transform: scale(1.025);
}

.dashboard-summary-card:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .25);
    outline-offset: 2px;
}

.dashboard-summary-copy {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    width: 58%;
    min-height: 178px;
    padding: 17px 10px 14px 16px;
}

.dashboard-summary-label {
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .075em;
    line-height: 1.2;
    text-transform: uppercase;
}

.dashboard-summary-copy strong {
    margin-top: 4px;
    color: #0f172a;
    font-family: var(--font);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1;
}

.dashboard-summary-copy small {
    max-width: 140px;
    margin-top: 7px;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.dashboard-summary-copy em {
    margin-top: auto;
    color: #1d4ed8;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    line-height: 1.25;
}

.dashboard-operations-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.62fr) minmax(320px, .78fr);
    gap: 16px;
}

.dashboard-execution-card,
.dashboard-system-card,
.dashboard-quick-section,
.dashboard-v2 .dashboard-level-block {
    border: 1px solid var(--border, #dbe3ef);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(15, 23, 42, .055);
}

.dashboard-execution-card,
.dashboard-system-card {
    padding: 20px;
}

.dashboard-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8eef6;
}

.dashboard-eyebrow {
    display: block;
    margin-bottom: 4px;
    color: var(--dashboard-blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .095em;
    line-height: 1.2;
    text-transform: uppercase;
}

.dashboard-card-heading h2,
.dashboard-quick-section h2 {
    margin: 0;
    color: #0f172a;
    font-family: var(--font);
    font-size: var(--fs-panel);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: var(--lh-tight);
}

.dashboard-card-heading p,
.dashboard-quick-section header p {
    margin: 5px 0 0;
    color: #475569;
    font-size: 12px;
    line-height: 1.45;
}

.dashboard-heatmap-panel,
.dashboard-heatmap-figure,
.dashboard-heatmap-wrap {
    min-width: 0;
    max-width: 100%;
    contain: inline-size;
}

.dashboard-heatmap-figure {
    overflow: hidden;
}

.dashboard-heatmap-wrap {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    contain: inline-size paint;
}

.dashboard-online-badge,
.dashboard-server-badge {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.dashboard-online-badge i,
.dashboard-server-badge i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, .13);
}

.dashboard-execution-content {
    display: grid;
    grid-template-columns: minmax(230px, .85fr) minmax(280px, 1.15fr);
    gap: 22px;
    padding-top: 18px;
}

.dashboard-progress-visual {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: linear-gradient(145deg, #eff6ff, #f8fafc);
}

.dashboard-progress-ring {
    position: relative;
    display: grid;
    flex: 0 0 132px;
    width: 132px;
    height: 132px;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(#2563eb 0 var(--finished-end), #f59e0b var(--finished-end) var(--working-end), #dbe4f0 var(--working-end) 100%);
}

.dashboard-progress-ring::after {
    position: absolute;
    inset: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .18);
    content: "";
}

.dashboard-progress-ring > div {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 2px;
    text-align: center;
}

.dashboard-progress-ring strong {
    color: #0f172a;
    font-family: var(--font);
    font-size: 28px;
    line-height: 1;
}

.dashboard-progress-ring span {
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.dashboard-progress-legend {
    display: grid;
    flex: 1;
    gap: 9px;
    min-width: 0;
}

.dashboard-progress-legend > div {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
}

.dashboard-progress-legend i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dashboard-progress-legend i.finished { background: #2563eb; }
.dashboard-progress-legend i.working { background: #f59e0b; }
.dashboard-progress-legend i.pending { background: #cbd5e1; }

.dashboard-progress-legend span,
.dashboard-progress-legend b {
    font-size: 12px;
    line-height: 1.2;
}

.dashboard-progress-legend span { color: #475569; }
.dashboard-progress-legend b { color: #0f172a; }

.dashboard-progress-detail {
    display: grid;
    align-content: start;
    gap: 12px;
}

.dashboard-progress-item > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #334155;
    font-size: 12px;
    font-weight: 750;
}

.dashboard-progress-item > div:first-child b {
    color: #0f172a;
    font-size: 12px;
}

.dashboard-progress-track,
.dashboard-system-track {
    height: 7px;
    margin-top: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8eef6;
}

.dashboard-progress-track i,
.dashboard-system-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    transition: width .35s ease;
}

.dashboard-progress-track i.finished { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.dashboard-progress-track i.working { background: linear-gradient(90deg, #d97706, #fbbf24); }
.dashboard-progress-track i.pending { background: linear-gradient(90deg, #94a3b8, #cbd5e1); }

.dashboard-progress-item small {
    display: block;
    margin-top: 4px;
    color: #475569;
    font-size: 12px;
    line-height: 1.3;
}

.dashboard-text-link {
    display: inline-flex;
    align-items: center;
    width: max-content;
    gap: 7px;
    margin-top: 2px;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.dashboard-text-link span {
    transition: transform .2s ease;
}

.dashboard-text-link:hover span { transform: translateX(3px); }

.dashboard-system-list {
    display: grid;
    gap: 10px;
    padding-top: 16px;
}

.dashboard-system-metric {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.dashboard-system-metric > svg {
    width: 44px;
    height: 44px;
    padding: 10px;
    border-radius: 12px;
    background: #dbeafe;
    color: #2563eb;
}

.dashboard-system-metric.memory > svg {
    background: #ede9fe;
    color: #7c3aed;
}

.dashboard-system-metric.storage > svg {
    background: #ccfbf1;
    color: #0f766e;
}

.dashboard-system-metric.disk-io > svg {
    background: #fff7ed;
    color: #c2410c;
}

.dashboard-system-metric > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    column-gap: 10px;
}

.dashboard-system-metric span,
.dashboard-system-metric strong {
    color: #334155;
    font-size: 12px;
    line-height: 1.2;
}

.dashboard-system-metric strong {
    color: #0f172a;
    font-family: var(--font);
    font-size: 15px;
}

.dashboard-system-metric .dashboard-system-track,
.dashboard-system-metric small {
    grid-column: 1 / -1;
}

.dashboard-system-metric .dashboard-system-track {
    height: 6px;
    margin-top: 7px;
}

.dashboard-system-metric.cpu .dashboard-system-track i { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.dashboard-system-metric.memory .dashboard-system-track i { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.dashboard-system-metric.storage .dashboard-system-track i { background: linear-gradient(90deg, #0f766e, #2dd4bf); }

.dashboard-system-metric small {
    margin-top: 5px;
    color: #475569;
    font-size: 12px;
    line-height: 1.3;
}

.dashboard-system-scope {
    margin: 8px 0 0;
    color: #475569;
    font-size: 12px;
}

.dashboard-system-nodes {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.dashboard-system-nodes-title {
    margin: 0 0 8px;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.dashboard-system-nodes-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dashboard-system-nodes-list li {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: #334155;
    font-size: 12px;
}

.dashboard-system-nodes-list li b {
    color: #0f172a;
    font-family: var(--font);
}

.dashboard-system-nodes-list li span:last-child {
    margin-left: auto;
    color: #475569;
    white-space: nowrap;
}

.dashboard-quick-section {
    padding: 18px;
}

.dashboard-quick-section > header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.dashboard-quick-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-quick-grid > a {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    min-height: 72px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    color: #0f172a;
    text-decoration: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.dashboard-quick-grid > a:hover {
    border-color: #bfdbfe;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
    transform: translateY(-2px);
}

.dashboard-quick-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 13px;
    background: #dbeafe;
    color: #2563eb;
}

.dashboard-quick-icon.green { background: #d1fae5; color: #047857; }
.dashboard-quick-icon.amber { background: #fef3c7; color: #b45309; }
.dashboard-quick-icon.cyan { background: #cffafe; color: #0e7490; }
.dashboard-quick-icon.violet { background: #ede9fe; color: #6d28d9; }

.dashboard-quick-icon svg {
    width: 23px;
    height: 23px;
}

.dashboard-quick-grid > a > span:last-child,
.dashboard-quick-grid b,
.dashboard-quick-grid em {
    display: block;
    min-width: 0;
}

.dashboard-quick-grid b {
    color: #1e293b;
    font-size: 12px;
    line-height: 1.25;
}

.dashboard-quick-grid em {
    margin-top: 3px;
    color: #7c8da3;
    font-size: 12px;
    font-style: normal;
    line-height: 1.35;
}

.dashboard-v2 .dashboard-evaluation-section {
    display: grid;
    gap: 14px;
    margin-top: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.dashboard-v2 .dashboard-section-heading {
    margin: 2px 0 -2px;
    padding: 0 2px;
}

.dashboard-v2 .dashboard-section-heading h2 {
    color: #0f172a;
    font-family: var(--font);
    font-size: var(--fs-panel);
    letter-spacing: -.02em;
}

.dashboard-v2 .dashboard-report-link {
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1d4ed8;
}

.dashboard-v2 .dashboard-level-block {
    margin: 0;
    padding: 18px;
}

.dashboard-v2 .dashboard-level-heading {
    justify-content: flex-start;
    margin-bottom: 13px;
}

.dashboard-v2 .dashboard-evaluation-grid {
    gap: 12px;
}

.dashboard-v2 .dashboard-score-panel,
.dashboard-v2 .dashboard-item-panel,
.dashboard-v2 .dashboard-school-ranking-panel {
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    background: #fbfdff;
    box-shadow: none;
}

@media (max-width: 1600px) {
    .dashboard-summary-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .dashboard-summary-card {
        grid-column: span 2;
        min-height: 168px;
    }

    .dashboard-summary-card:nth-child(4),
    .dashboard-summary-card:nth-child(5) {
        grid-column: span 3;
    }
}

@media (max-width: 1250px) {
    .dashboard-operations-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-system-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-system-metric {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .dashboard-system-metric > svg {
        width: 38px;
        height: 38px;
        padding: 8px;
    }

    .dashboard-quick-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .dashboard-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-summary-card,
    .dashboard-summary-card:nth-child(4),
    .dashboard-summary-card:nth-child(5) {
        grid-column: auto;
    }

    .dashboard-summary-card:nth-child(5) {
        grid-column: 1 / -1;
    }

    .dashboard-execution-content {
        grid-template-columns: 1fr;
    }

    .dashboard-system-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .dashboard-v2 {
        gap: 14px;
    }

    .dashboard-summary-grid,
    .dashboard-quick-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-summary-card:nth-child(5) {
        grid-column: auto;
    }

    .dashboard-summary-card,
    .dashboard-summary-copy {
        min-height: 158px;
    }

    .dashboard-summary-copy {
        width: 62%;
    }

    .dashboard-summary-copy strong {
        font-size: 28px;
    }

    .dashboard-execution-card,
    .dashboard-system-card,
    .dashboard-quick-section,
    .dashboard-v2 .dashboard-level-block {
        padding: 15px;
        border-radius: 17px;
    }

    .dashboard-card-heading,
    .dashboard-quick-section > header {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }

    .dashboard-execution-content {
        gap: 14px;
    }

    .dashboard-progress-visual {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-progress-ring {
        align-self: center;
    }

    .dashboard-quick-section header p {
        margin: 0;
    }
}

/* Google SSO portal for teacher question contributors. */
.role-login-fields {
    display: grid;
    gap: 14px;
}

.google-sso-button {
    display: flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid #c7d2e2;
    border-radius: 12px;
    background: #fff;
    color: #1f2937;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(15, 23, 42, .08);
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.google-sso-button:hover {
    border-color: #1a73e8;
    box-shadow: 0 6px 16px rgba(26, 115, 232, .16);
    transform: translateY(-1px);
}

.google-sso-button svg {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
}

.google-sso-note {
    margin: -2px 0 0;
    color: #475569;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

/* Distinct authentication portals for Admin, Proctor, Question Team, and Students. */
.auth-card.home-card {
    width: min(680px, calc(100% - 32px));
}

.auth-portal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.auth-portal {
    display: grid;
    gap: 4px;
    min-height: 86px;
    padding: 16px 18px;
    color: #23344d;
    text-decoration: none;
    border: 1px solid #dce6f2;
    border-radius: 15px;
    background: rgba(248, 251, 255, .92);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.auth-portal:hover {
    transform: translateY(-2px);
    border-color: #9fc2ee;
    box-shadow: 0 12px 24px rgba(28, 73, 126, .1);
}

.auth-portal b {
    font-size: 15px;
}

.auth-portal span {
    color: #667891;
    font-size: 12px;
    line-height: 1.45;
}

.auth-portal.student {
    border-left: 4px solid #0f80f2;
}

.auth-portal.admin {
    border-left: 4px solid #1d5cc7;
}

.auth-portal.proctor {
    border-left: 4px solid #16845b;
}

.auth-portal.team {
    border-left: 4px solid #7651bd;
}

.role-login-card {
    --role-accent: #1d5cc7;
    --role-soft: #edf4ff;
}

.role-login-card.role-proctor {
    --role-accent: #16845b;
    --role-soft: #eaf8f2;
}

.role-login-card.role-team {
    --role-accent: #7651bd;
    --role-soft: #f3effc;
}

.login-bg.login-proctor .auth-wrap:before {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .13) 0 18%, transparent 18% 100%),
        linear-gradient(126deg, transparent 0 47%, rgba(255, 255, 255, .08) 47% 58%, transparent 58% 100%),
        linear-gradient(105deg, #106b4a 0%, #16845b 48%, #247a62 100%) !important;
}

.login-bg.login-team .auth-wrap:before {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .13) 0 18%, transparent 18% 100%),
        linear-gradient(126deg, transparent 0 47%, rgba(255, 255, 255, .08) 47% 58%, transparent 58% 100%),
        linear-gradient(105deg, #553794 0%, #7651bd 48%, #65509b 100%) !important;
}

.role-login-heading {
    display: flex;
    align-items: flex-start;
    gap: 13px;
}

.role-login-heading > div {
    min-width: 0;
}

.auth-role-badge {
    display: grid;
    place-items: center;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    border-radius: 14px;
    background: var(--role-accent);
    box-shadow: 0 10px 20px rgba(29, 92, 199, .2);
}

.auth-card.role-login-card input:focus {
    border-color: var(--role-accent) !important;
}

.auth-card.role-login-card .btn.primary {
    background: var(--role-accent) !important;
}

@media (max-width: 620px) {
    .auth-portal-grid {
        grid-template-columns: 1fr;
    }

    .auth-card.home-card {
        width: min(430px, calc(100% - 24px));
    }

    .role-login-heading {
        align-items: flex-start;
    }
}

/* Keep the question form readable without creating a clipped fourth column. */
@media screen {
    form[data-question-form] {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    form[data-question-form] > label {
        min-width: 0;
    }

    form[data-question-form] > label small {
        display: block;
        min-width: 0;
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

@media screen and (max-width: 1100px) {
    form[data-question-form] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 768px) {
    form[data-question-form] {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* First-login school confirmation for belajar.id contributors. */
.teacher-school-card {
    max-width: 520px;
}

.teacher-account-summary {
    display: grid;
    gap: 3px;
    margin-bottom: 18px;
    padding: 13px 15px;
    background: var(--theme-primary-soft);
    border: 1px solid color-mix(in srgb, var(--theme-primary) 20%, #dfe7f1);
    border-radius: 11px;
}

.teacher-account-summary span {
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.teacher-account-summary strong {
    color: #172033;
    font-size: 15px;
}

.teacher-account-summary small {
    color: #52627a;
    overflow-wrap: anywhere;
}

.teacher-school-note {
    margin: -2px 0 2px;
    color: #475569;
    font-size: 12px;
    line-height: 1.55;
}

.teacher-school-logout {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.teacher-school-logout .auth-alt-link {
    width: auto;
    padding: 0;
    color: #475569;
    background: transparent;
    border: 0;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.teacher-school-logout .auth-alt-link:hover {
    color: var(--theme-primary);
}

/* Go template parity helpers.
   The visual values intentionally follow the Laravel reference stylesheet. */
@media screen {
    .page-head h1 {
        margin: 0 0 3px;
        font-size: 18px;
        line-height: 1.25;
        font-weight: 600;
    }

    .form-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 14px;
        align-content: start;
    }

    .form-grid > h2,
    .form-grid > h3 {
        grid-column: 1 / -1;
        margin: 0;
    }

    .form-actions {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 8px;
        margin-top: 4px;
    }

    .span-2 {
        grid-column: 1 / -1;
    }

    .narrow {
        width: min(100%, 720px);
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .inline-upload {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .inline-upload input[type="file"] {
        width: min(250px, 32vw);
        min-height: 34px;
        padding: 5px 8px;
        font-size: 12px;
    }

    .row-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        white-space: nowrap;
    }

    .row-actions form {
        display: inline-flex;
    }

    /* Tegaskan aksi hapus agar berbeda jelas dari Pratinjau/Ubah yang netral. */
    .row-actions .btn.danger {
        background: #fdecec;
        border-color: #f0b8b8;
        color: #a4161a;
    }

    .row-actions .btn.danger:hover {
        background: #fbdcdc;
    }

    .actions-column {
        width: 1%;
    }

    .checkbox-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 16px;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: #f8fbff;
    }

    .checkbox {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .checkbox input {
        width: 17px;
        min-height: 17px;
        flex: 0 0 auto;
    }

    .options-editor,
    .question-picker,
    .school-picker {
        min-width: 0;
        border: 1px solid var(--line);
        border-radius: 12px;
        padding: 12px;
        background: #fbfdff;
    }

    .question-picker,
    .school-picker {
        max-height: 420px;
        overflow: auto;
    }

    .option-edit {
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr) minmax(180px, .55fr) auto;
        gap: 8px;
        align-items: start;
        padding: 8px 0;
        border-bottom: 1px solid #e7eef7;
    }

    .option-edit > span,
    .option-key {
        width: 32px;
        height: 32px;
        display: grid;
        place-items: center;
        border-radius: 9px;
        background: #eef6ff;
        color: #135eb7;
        font-weight: 600;
    }

    .media-editor,
    .media-preview,
    .media-existing {
        display: grid;
        gap: 7px;
    }

    .media-preview img,
    .media-existing img {
        max-width: 320px;
        max-height: 220px;
        object-fit: contain;
        border-radius: 8px;
    }

    .selected-media-list {
        display: grid;
        gap: 8px;
        margin-top: 8px;
    }

    .selected-media-list[hidden] {
        display: none;
    }

    .selected-media-item {
        display: grid;
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 8px 10px;
        align-items: center;
        min-width: 0;
        padding: 9px;
        border: 1px solid var(--line);
        border-radius: 11px;
        background: #f8fbff;
    }

    .selected-media-thumbnail,
    .selected-media-filetype {
        grid-row: 1 / span 2;
        width: 56px;
        height: 56px;
        border-radius: 8px;
    }

    .selected-media-thumbnail {
        object-fit: contain;
        background: #fff;
        outline: 1px solid oklch(0 0 0 / .1);
    }

    .selected-media-filetype {
        display: grid;
        place-items: center;
        background: #e8f2ff;
        color: #145fbb;
        font-size: 12px;
        font-weight: 800;
    }

    .selected-media-details {
        display: grid;
        min-width: 0;
        gap: 2px;
    }

    .selected-media-details strong {
        overflow-wrap: anywhere;
    }

    .selected-media-details small {
        color: var(--muted);
    }

    .selected-media-remove {
        min-height: 40px;
        justify-self: start;
    }

    .question-choice {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 8px;
        padding: 9px;
        border-bottom: 1px solid #e7eef7;
        font-weight: 400;
    }

    .question-choice input {
        width: 17px;
        min-height: 17px;
        margin-top: 2px;
        flex: 0 0 auto;
    }

    .review-actions {
        display: grid;
        grid-template-columns: minmax(220px, 1fr) 150px auto;
        gap: 8px;
        align-items: end;
    }

    .badge-row {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }

    .monitor-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .participant-card {
        padding: 13px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: #fff;
        box-shadow: var(--shadow);
    }

    .participant-head,
    .section-heading {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
    }

    .participant-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid var(--line);
    }

    .mini-input {
        width: 64px;
        min-height: 28px;
        padding: 5px 7px;
    }

    .status {
        display: inline-flex;
        padding: 4px 8px;
        border-radius: 999px;
        background: #eff4fb;
        color: #526070;
        font-size: 12px;
        font-weight: 600;
    }

    .status-mengerjakan {
        background: #e8f2ff;
        color: #145fbb;
    }

    .status-selesai {
        background: #e9fbf3;
        color: #0b7a50;
    }

    .status-keluar {
        background: #fff0ee;
        color: #b42318;
    }

    .timeline {
        display: grid;
        gap: 10px;
    }

    .timeline article {
        display: grid;
        grid-template-columns: 12px 1fr;
        gap: 9px;
    }

    .timeline article > span {
        width: 9px;
        height: 9px;
        margin-top: 5px;
        border-radius: 50%;
        background: var(--primary);
    }

    .timeline p {
        margin: 2px 0;
        color: var(--muted);
    }

    .cards-grid,
    .print-token-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }

    .card-brand {
        color: var(--primary);
        font-size: 12px;
        font-weight: 600;
    }

    .compact-dl {
        display: grid;
        grid-template-columns: 110px 1fr;
        gap: 5px 10px;
    }

    .info-box,
    .warning-box {
        margin: 12px 0;
        padding: 11px 12px;
        border-radius: 10px;
    }

    .info-box {
        border: 1px solid #c7dff0;
        background: #eef6ff;
        color: #0f5cae;
    }

    .warning-box {
        border: 1px solid #f1dbac;
        background: #fff8e8;
        color: #704800;
    }

    .eyebrow {
        margin: 0 0 5px;
        color: var(--primary);
        font-size: 12px;
        font-weight: 600;
        letter-spacing: .08em;
        text-transform: uppercase;
    }
}

@media screen and (max-width: 900px) {
    .form-grid,
    .review-actions,
    .monitor-grid {
        grid-template-columns: 1fr;
    }

    .span-2,
    .form-actions {
        grid-column: 1;
    }

    .option-edit {
        grid-template-columns: 32px minmax(0, 1fr);
    }

    .option-edit .media-editor,
    .option-edit > label {
        grid-column: 2;
    }
}

/* Dense audit/history rows while keeping full timestamps readable. */
body:not(.login-bg):not(.exam-body):not(.tka-bg) table.compact-history-table th {
    min-height: 30px;
    padding: 5px 10px;
    line-height: 1.15;
}

body:not(.login-bg):not(.exam-body):not(.tka-bg) table.compact-history-table td {
    min-height: 31px;
    padding: 5px 10px;
    line-height: 1.2;
}

table.compact-history-table .history-time {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.activity-log-head p {
    max-width: 850px;
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.activity-log-panel {
    padding: 0 !important;
    overflow: hidden;
}

.activity-log-scope {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    background: var(--primary-soft);
}

.activity-log-scope b {
    flex: 0 0 auto;
    color: var(--primary-dark);
    font-size: 12px;
}

.activity-log-scope span {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
}

.activity-log-panel .table-wrap {
    border: 0;
    border-radius: 0;
}

.activity-log-table {
    min-width: 1480px;
}

body:not(.login-bg):not(.exam-body):not(.tka-bg) table.activity-log-table td {
    height: auto;
    padding: 9px 10px;
    vertical-align: top;
    line-height: 1.35;
}

.activity-log-table th:first-child,
.activity-log-table td:first-child {
    width: 150px;
}

.activity-log-table th:nth-child(2) { width: 180px; }
.activity-log-table th:nth-child(3) { width: 330px; }
.activity-log-table th:nth-child(4) { width: 190px; }
.activity-log-table th:nth-child(5) { width: 340px; }
.activity-log-table th:nth-child(6) { width: 290px; }

.activity-log-user,
.activity-log-event,
.activity-log-ip,
.activity-log-client,
.activity-log-request {
    overflow-wrap: anywhere;
}

.activity-log-user b,
.activity-log-event b,
.activity-log-client b,
.activity-log-user small,
.activity-log-event small,
.activity-log-ip small,
.activity-log-client small,
.activity-log-request small {
    display: block;
}

.activity-log-user small,
.activity-log-event small,
.activity-log-ip small,
.activity-log-client small,
.activity-log-request small {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
}

.activity-log-ip code,
.activity-log-request code {
    color: var(--text);
    font-size: 12px;
    white-space: normal;
}

.activity-log-client details {
    margin-top: 5px;
}

.activity-log-client summary {
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.activity-log-client details code {
    display: block;
    margin-top: 5px;
    padding: 6px;
    border-radius: 7px;
    background: var(--bg);
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
    white-space: normal;
    word-break: break-all;
}

@media (max-width: 1440px) {
    .activity-log-panel .table-wrap {
        overflow: visible;
    }

    .activity-log-table {
        min-width: 0;
    }

    .activity-log-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .activity-log-table tbody,
    .activity-log-table tr {
        display: block;
    }

    .activity-log-table tbody tr {
        display: grid;
        grid-template-columns: 150px minmax(0, .9fr) minmax(0, 1.25fr);
        gap: 0;
        padding: 5px 8px;
        border-bottom: 1px solid var(--border-light);
    }

    .activity-log-table tbody tr:last-child {
        border-bottom: 0;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) table.activity-log-table td {
        width: auto;
        padding: 8px 10px;
        border: 0;
    }

    .activity-log-table td::before {
        display: block;
        margin-bottom: 4px;
        color: var(--text-muted);
        content: attr(data-label);
        font-size: 12px;
        font-weight: 800;
        letter-spacing: .045em;
        line-height: 1.2;
        text-transform: uppercase;
    }

    .activity-log-table td.empty {
        grid-column: 1 / -1;
    }

    .activity-log-table td.empty::before {
        display: none;
    }
}

@media (max-width: 720px) {
    .activity-log-scope {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .activity-log-table tbody tr {
        grid-template-columns: 1fr;
        padding: 6px 10px;
    }
}

.taxonomy-page-head,
.taxonomy-subject-picker,
.taxonomy-settings-grid,
.taxonomy-tree-row {
  display: grid;
  gap: 16px;
}

.taxonomy-page-head,
.taxonomy-subject-picker,
.taxonomy-tree-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.taxonomy-page-actions,
.taxonomy-subject-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.taxonomy-page-actions {
  justify-content: flex-end;
}

.taxonomy-subject-form {
  min-width: min(100%, 320px);
}

.taxonomy-subject-control {
  margin-top: 5px;
}

.taxonomy-subject-control select {
  min-width: min(100%, 240px);
  flex: 1 1 220px;
}

.taxonomy-import-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  align-items: center;
  gap: 10px 24px;
}

.taxonomy-import-panel > .field-help:last-child {
  grid-column: 1 / -1;
  margin: 0;
}

.taxonomy-import-form {
  justify-self: end;
  width: min(100%, 520px);
}

.taxonomy-settings-grid {
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.4fr);
  align-items: start;
}

.taxonomy-node-form-panel {
  position: sticky;
  top: 16px;
}

.taxonomy-tree {
  display: grid;
  gap: 8px;
}

.taxonomy-tree-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.taxonomy-tree-row.is-inactive {
  opacity: 0.68;
}

.taxonomy-tree-content {
  min-width: 0;
}

.taxonomy-tree-content strong,
.taxonomy-tree-content small {
  display: block;
}

.taxonomy-tree-content small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.taxonomy-type {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .taxonomy-settings-grid {
    grid-template-columns: 1fr;
  }
  .taxonomy-node-form-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .taxonomy-page-head,
  .taxonomy-subject-picker,
  .taxonomy-import-panel,
  .taxonomy-tree-row {
    grid-template-columns: 1fr;
  }

  .taxonomy-page-actions {
    justify-content: flex-start;
  }
  .taxonomy-page-actions .btn,
  .taxonomy-import-form,
  .taxonomy-import-form .btn {
    width: 100%;
  }
  .taxonomy-import-panel > .field-help:last-child {
    grid-column: auto;
  }
}

/* Polished public login chooser. Kept home-specific so role login pages stay unchanged. */
body.login-bg.home-login {
    min-height: 100vh;
    background:
        radial-gradient(circle at 9% 12%, rgba(59, 130, 246, .27), transparent 31%),
        radial-gradient(circle at 91% 87%, rgba(14, 165, 233, .17), transparent 31%),
        linear-gradient(135deg, #06162e 0%, #0a2e5c 48%, #0d5ba5 100%) !important;
}

.home-login .home-auth-wrap {
    position: relative;
    isolation: isolate;
    width: min(720px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    padding: clamp(32px, 5vw, 72px);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto !important;
    gap: clamp(22px, 3vw, 30px);
    align-content: center;
    align-items: stretch;
    overflow: hidden;
    background: transparent !important;
}

.home-login .home-auth-wrap::before,
.home-login .home-auth-wrap::after {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
    border-radius: 999px;
    clip-path: none;
}

.home-login .home-auth-wrap::before {
    inset: -155px -95px auto auto !important;
    width: 390px !important;
    height: 390px !important;
    background: rgba(255, 255, 255, .06) !important;
    border: 1px solid rgba(255, 255, 255, .09);
    clip-path: none !important;
}

.home-login .home-auth-wrap::after {
    inset: auto auto -195px -155px !important;
    width: 430px !important;
    height: 430px !important;
    background: rgba(37, 99, 235, .18) !important;
    border: 1px solid rgba(147, 197, 253, .12);
    clip-path: none !important;
}

.home-login .home-auth-hero {
    position: relative;
    z-index: 1;
    align-self: center;
    width: 100%;
    height: auto !important;
    padding: 0 !important;
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    color: #fff;
}

body.home-login .home-auth-hero .brand-mark.big.home-brand-mark {
    width: 80px !important;
    height: 96px !important;
    padding: 9px !important;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 24px !important;
    background: rgba(255, 255, 255, .12) !important;
    box-shadow: 0 22px 50px rgba(1, 12, 31, .26);
    backdrop-filter: blur(12px);
}

body.home-login .home-auth-hero .brand-mark.big.home-brand-mark img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain;
}

.home-login .home-hero-copy {
    min-width: 0;
}

.home-login .auth-eyebrow,
.home-login .home-card-kicker {
    display: block;
    margin-bottom: 9px;
    color: #bfdbfe;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.home-login .home-auth-hero h1 {
    max-width: none;
    margin: 0;
    color: #fff;
    font-size: 24px !important;
    font-weight: 800;
    line-height: 1.15 !important;
    letter-spacing: -.03em;
    text-transform: none;
    text-shadow: 0 8px 30px rgba(1, 12, 31, .2);
}

.home-login .home-auth-hero p {
    margin: 12px 0 0;
    color: rgba(239, 246, 255, .82);
    font-size: 13px !important;
    font-weight: 500;
    line-height: 1.55;
    letter-spacing: 0;
    text-transform: none;
}

.home-login .home-card {
    position: relative;
    z-index: 1;
    align-self: center !important;
    justify-self: center;
    width: 100% !important;
    max-width: 620px !important;
    margin: 0 !important;
    padding: clamp(28px, 3.5vw, 42px) !important;
    display: grid;
    gap: 24px;
    border: 1px solid rgba(255, 255, 255, .78) !important;
    border-radius: 28px !important;
    background: rgba(255, 255, 255, .96) !important;
    box-shadow: 0 30px 80px rgba(1, 12, 31, .27) !important;
    backdrop-filter: blur(18px);
}

.home-login .home-card-heading {
    display: grid;
    gap: 7px;
}

.home-login .home-card-kicker {
    margin: 0;
    color: #1d67c7;
}

.home-login .home-card h2 {
    margin: 0;
    color: #111827;
    font-size: 20px !important;
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -.02em;
}

.home-login .home-card-heading p {
    margin: 0;
    color: #66758d;
    font-size: 13px;
    line-height: 1.55;
}

.home-login .auth-portal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 12px;
}

.home-login .auth-portal {
    --portal-accent: #147df5;
    --portal-soft: #eaf4ff;
    position: relative;
    min-width: 0;
    min-height: 108px;
    padding: 16px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    color: #22324a;
    border: 1px solid #dce6f2;
    border-radius: 18px;
    background: #fbfdff;
    box-shadow: 0 8px 22px rgba(24, 65, 115, .05);
    overflow: hidden;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.home-login .auth-portal::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--portal-accent);
}

.home-login .auth-portal.student {
    --portal-accent: #147df5;
    --portal-soft: #eaf4ff;
}

.home-login .auth-portal.admin {
    --portal-accent: #2859c5;
    --portal-soft: #eef2ff;
}

.home-login .auth-portal.proctor {
    --portal-accent: #14805c;
    --portal-soft: #eaf8f2;
}

.home-login .auth-portal.team {
    --portal-accent: #7651c5;
    --portal-soft: #f2edff;
}

.home-login .auth-portal:hover {
    transform: translateY(-3px);
    color: #13243c;
    border-color: color-mix(in srgb, var(--portal-accent) 35%, #dce6f2);
    background: #fff;
    box-shadow: 0 14px 30px rgba(24, 65, 115, .12);
}

.home-login .auth-portal:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--portal-accent) 28%, transparent);
    outline-offset: 3px;
}

.home-login .auth-portal-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    color: var(--portal-accent);
    border-radius: 14px;
    background: var(--portal-soft);
}

.home-login .auth-portal-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-login .auth-portal-copy {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.home-login .auth-portal-copy b {
    color: #23344d;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.25;
}

.home-login .auth-portal-copy small {
    color: #6b7c94;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
}

.home-login .home-card-help {
    margin: -2px 0 0;
    color: #7b8a9f;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

@media screen and (max-width: 920px) {
    .home-login .home-auth-wrap {
        max-width: 720px;
        padding: 32px 22px 38px;
        gap: 26px;
        align-content: center;
    }

    .home-login .home-auth-hero {
        padding: 0 8px !important;
    }

    .home-login .home-auth-hero h1 {
        max-width: none;
        font-size: 24px;
    }

    .home-login .home-card { max-width: none !important; }
}

@media screen and (max-width: 560px) {
    .home-login .home-auth-wrap {
        width: 100%;
        padding: 22px 14px 26px;
        gap: 20px;
        align-content: start;
        overflow: visible;
    }

    .home-login .home-auth-hero {
        padding: 4px 4px 0 !important;
        grid-template-columns: 60px minmax(0, 1fr);
        gap: 14px;
        align-items: center;
    }

    body.home-login .home-auth-hero .brand-mark.big.home-brand-mark {
        width: 60px !important;
        height: 76px !important;
        padding: 7px !important;
        border-radius: 17px !important;
    }

    .home-login .auth-eyebrow {
        margin-bottom: 5px;
        font-size: 12px;
        letter-spacing: .1em;
    }

    .home-login .home-auth-hero h1 {
        font-size: 20px !important;
        line-height: 1.18;
    }

    .home-login .home-auth-hero p {
        margin-top: 6px;
        font-size: 12px !important;
        line-height: 1.4;
    }

    .home-login .home-card {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 24px 18px !important;
        gap: 19px;
        border-radius: 22px;
    }

    .home-login .home-card h2 {
        font-size: 24px;
    }

    .home-login .auth-portal-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .home-login .auth-portal {
        min-height: 82px;
        padding: 13px 14px;
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 11px;
        border-radius: 15px;
    }

    .home-login .auth-portal-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .home-login .auth-portal-icon svg {
        width: 21px;
        height: 21px;
    }
}

/* School-scoped proctor session workflow. */
.session-mode-note {
    display: grid;
    gap: 4px;
    align-content: center;
    min-height: 58px;
    padding: 10px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: #eff6ff;
    color: #1e3a5f;
}

.session-mode-note span,
.session-mode-school-note p,
.proctor-session-table td small {
    color: var(--muted);
    font-size: 12px;
}

.proctor-session-panel,
.proctor-participant-panel {
    display: grid;
    gap: 16px;
}

.proctor-session-guide {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    max-width: 620px;
}

.proctor-session-guide span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid #dbe7f5;
    border-radius: 10px;
    background: #f8fbff;
    color: #27415f;
    font-size: 12px;
    font-weight: 600;
}

.proctor-session-guide b {
    display: inline-grid;
    place-items: center;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    background: #1f6feb;
    color: #fff;
}

.proctor-session-table {
    min-width: 1120px;
}

.proctor-session-table td {
    vertical-align: middle;
}

.proctor-session-table td > strong,
.proctor-session-table td > small {
    display: block;
}

.proctor-session-actions {
    min-width: 270px;
}

.school-token-code,
.student-school-token b {
    color: #0b56c5;
    font-family: var(--font);
    font-weight: 800;
    letter-spacing: .08em;
}

.status-dibuka {
    background: #e9fbf3;
    color: #0b7a50;
}

.status-draft {
    background: #fff7dc;
    color: #8a5a00;
}

.status-ditutup {
    background: #fff0ee;
    color: #b42318;
}

.participant-picker-tools {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fbff;
}

.participant-picker-tools label {
    flex: 1 1 360px;
    max-width: 520px;
}

.participant-picker-tools > div {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.participant-picker-table {
    min-width: 760px;
}

.participant-conflict-row {
    background: #fffafa;
}

.student-school-token {
    display: grid;
    gap: 5px;
    padding: 14px;
    border: 1px solid #93c5fd;
    border-radius: 12px;
    background: #eff6ff;
    text-align: center;
}

.student-school-token span,
.student-school-token small {
    color: #47627f;
}

.student-school-token b {
    font-size: 24px;
}

[data-uppercase] {
    text-transform: uppercase;
}

@media screen and (max-width: 900px) {
    .proctor-session-head,
    .proctor-participant-head {
        align-items: flex-start;
    }

    .proctor-session-guide {
        grid-template-columns: 1fr;
    }

    .participant-picker-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .participant-picker-tools label {
        max-width: none;
    }
}

/* Monitoring peserta */
.page-head.monitoring-page-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 14px;
}

.monitoring-online-count {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    color: #047857;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    background: #ecfdf5;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.monitoring-online-count i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, .12);
}

.monitoring-toolbar {
    width: 100%;
}

.monitoring-toolbar form {
    display: grid;
    grid-template-columns: minmax(220px, 360px) auto;
    align-items: end;
    justify-content: start;
    gap: 10px;
    width: 100%;
}

.monitoring-toolbar form.has-admin-filters {
    grid-template-columns:
        minmax(100px, .72fr)
        minmax(115px, .9fr)
        minmax(190px, 1.55fr)
        minmax(145px, 1fr)
        auto;
}

.monitoring-toolbar label {
    min-width: 0;
    gap: 4px;
    color: var(--muted);
    font-size: 12px;
}

.monitoring-toolbar select,
.monitoring-toolbar input:not([type="hidden"]) {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 7px 10px;
    border-radius: 9px;
    font-size: 12px;
}

.monitoring-filter-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.monitoring-filter-actions .btn {
    min-height: 38px;
    white-space: nowrap;
}

.monitoring-live-region,
.dashboard-evaluation-live {
    display: contents;
}

.monitoring-live-state,
.dashboard-live-state {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.3;
    white-space: nowrap;
}

.monitoring-live-state i,
.dashboard-live-state i {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 999px;
    background: #94a3b8;
}

.monitoring-live-state.is-live,
.dashboard-live-state.is-live {
    color: #047857;
}

.monitoring-live-state.is-live i,
.dashboard-live-state.is-live i {
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, .12);
}

.monitoring-live-state.is-delayed,
.dashboard-live-state.is-delayed {
    color: #a16207;
}

.monitoring-live-state.is-delayed i,
.dashboard-live-state.is-delayed i {
    background: #f59e0b;
}

.monitoring-tabs {
    display: flex;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    max-width: 800px;
    box-sizing: border-box;
    gap: 5px;
    margin: 0 auto 14px;
    padding: 6px;
    border: 1px solid #d6e2ef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(31, 64, 113, .06);
}

.monitoring-tabs a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 220px;
    width: 100%;
    max-width: 260px;
    min-width: 0;
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #4c6079;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    transition: var(--transition-smooth);
}

.monitoring-tabs a:hover {
    border-color: #d5e6f8;
    background: #edf5ff;
    color: #075fc7;
}

.monitoring-tabs a.active {
    border-color: #0966db;
    background: linear-gradient(180deg, var(--theme-primary), var(--theme-primary-dark));
    color: #fff;
    box-shadow: 0 6px 15px rgba(9, 102, 219, .22);
}

.monitoring-report-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 14px;
}

.monitoring-report-panel h2 {
    margin: 0 0 5px;
    font-size: 18px;
}

.monitoring-report-panel p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.monitoring-report-panel form {
    display: flex;
    align-items: end;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 9px;
}

.monitoring-report-panel label {
    min-width: 210px;
    flex: 1 1 230px;
    gap: 4px;
    color: var(--muted);
    font-size: 12px;
}

.monitoring-report-panel label:first-child {
    flex-grow: 1.35;
    min-width: 300px;
}

.monitoring-report-panel select {
    min-height: 38px;
    width: 100%;
    padding: 7px 10px;
    border-radius: 9px;
    font-size: 12px;
}

.monitoring-report-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 7px;
    margin-left: auto;
}

.monitor-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 620px), 1fr));
    gap: 14px;
}

.participant-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    overflow: hidden;
}

.participant-identity {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
}

.participant-identity > div {
    min-width: 0;
}

.participant-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eaf3ff;
    color: #0759bb;
    font-size: 15px;
    font-weight: 800;
}

.participant-identity h3 {
    margin: 6px 0 2px;
    color: #142942;
    font-size: 15px;
    line-height: 1.3;
}

.participant-identity p {
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.participant-score {
    min-width: 72px;
    padding: 7px 10px;
    border: 1px solid #cfe0f4;
    border-radius: 10px;
    background: #f5f9ff;
    text-align: right;
}

.participant-score span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.participant-score strong {
    display: block;
    margin-top: 2px;
    color: #0759bb;
    font-size: 18px;
}

.participant-metrics {
    display: grid;
    grid-template-columns: minmax(170px, 1.5fr) repeat(3, minmax(115px, 1fr));
    gap: 8px;
}

.participant-metrics > div {
    min-width: 0;
    padding: 10px;
    border: 1px solid #e0e9f3;
    border-radius: 10px;
    background: #f8fbff;
}

.participant-metrics span,
.participant-metrics small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.participant-metrics b {
    display: block;
    margin: 4px 0 2px;
    overflow: hidden;
    color: #142942;
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.participant-metrics .remaining-time {
    color: #0759bb;
    font-variant-numeric: tabular-nums;
}

.participant-actions {
    display: flex;
    min-width: 0;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-top: 0;
    padding-top: 12px;
}

.participant-time-form,
.participant-time-form label,
.participant-action-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.participant-time-form .mini-input {
    width: 58px;
}

.participant-time-form label span {
    color: var(--muted);
}

.participant-action-buttons {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.participant-action-buttons form {
    display: inline-flex;
}

.monitor-empty {
    grid-column: 1 / -1;
}

.monitoring-table-panel {
    padding: 0;
}

.monitoring-table {
    min-width: 1080px;
}

.monitoring-table th,
.monitoring-table td {
    vertical-align: middle;
}

.monitoring-table td {
    padding-top: 9px;
    padding-bottom: 9px;
}

.monitor-participant-cell b,
.monitor-session-cell b,
.monitor-participant-cell small,
.monitor-session-cell small,
.monitoring-table td > small {
    display: block;
}

.monitor-participant-cell b,
.monitor-session-cell b {
    color: #142942;
    font-size: 12px;
}

.monitor-participant-cell small,
.monitor-session-cell small,
.monitoring-table td > small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.monitor-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    white-space: nowrap;
}

.monitor-control {
    position: relative;
}

.monitor-control summary {
    list-style: none;
    cursor: pointer;
}

.monitor-control summary::-webkit-details-marker {
    display: none;
}

.monitor-control[open] summary {
    border-color: #86b8f4;
    background: #eaf4ff;
    color: #0759bb;
}

.monitor-control-body {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 7px;
    padding: 7px;
    border: 1px solid #dce6f1;
    border-radius: 9px;
    background: #f8fbff;
}

.monitor-control-body form,
.monitor-add-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.monitor-add-time .mini-input {
    width: 52px;
}

.status-belum_login {
    background: #f1f4f8;
    color: #526176;
}

.status-login {
    background: #fff7dc;
    color: #8a5a00;
}

@media screen and (max-width: 1380px) {
    .monitoring-toolbar form.has-active-filters {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .monitoring-toolbar form.has-active-filters .monitoring-filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}

@media screen and (max-width: 1240px) {
    .monitoring-toolbar form.has-admin-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .monitoring-filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .monitoring-report-panel {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .monitoring-report-panel form {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .participant-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .participant-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .participant-action-buttons {
        justify-content: flex-start;
    }
}

@media screen and (max-width: 700px) {
    .monitoring-page-head,
    .monitoring-toolbar,
    .monitoring-toolbar form,
    .participant-time-form {
        align-items: stretch;
    }

    .monitoring-toolbar,
    .monitoring-toolbar form,
    .participant-time-form,
    .monitoring-report-panel form,
    .monitoring-report-actions {
        width: 100%;
        flex-direction: column;
    }

    .monitoring-toolbar form,
    .monitoring-toolbar form.has-admin-filters {
        grid-template-columns: minmax(0, 1fr);
    }

    .monitoring-toolbar label,
    .monitoring-report-panel label,
    .monitoring-report-panel label:first-child {
        min-width: 0;
        width: 100%;
    }

    .monitoring-filter-actions {
        grid-column: auto;
        width: 100%;
    }

    .monitoring-filter-actions .btn {
        flex: 1 1 0;
    }

    .monitoring-report-actions {
        margin-left: 0;
    }

    .monitoring-report-actions .btn {
        width: 100%;
    }

    .monitoring-tabs {
        display: flex;
        width: 100%;
        max-width: none;
    }

    .monitoring-tabs a {
        max-width: none;
        flex: 1 1 0;
        padding-inline: 10px;
    }

    .participant-metrics {
        grid-template-columns: 1fr;
    }

    .participant-time-form label {
        justify-content: space-between;
    }
}

@media screen and (max-width: 700px) {
    .cards-grid,
    .print-token-grid {
        grid-template-columns: 1fr;
    }
}

/* KTP-size participant login cards: 85.6 × 54 mm, eight cards per A4 page. */
.credential-card-filter-note {
    margin: -4px 4px 0;
    font-size: 12px;
}

.credential-card-sheet {
    display: grid;
    grid-template-columns: repeat(2, 85.6mm);
    justify-content: center;
    align-items: start;
    gap: 5mm 7mm;
    padding: 10mm;
}

.credential-card-sheet.is-empty {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
}

.credential-card {
    box-sizing: border-box;
    width: 85.6mm;
    min-width: 85.6mm;
    max-width: 85.6mm;
    height: 54mm;
    min-height: 54mm;
    max-height: 54mm;
    padding: 3.5mm 4mm;
    overflow: hidden;
    border: .3mm solid #183b66;
    border-radius: 3mm;
    background: #fff;
    color: #10253f;
    box-shadow: 0 2mm 5mm rgba(15, 45, 82, .08);
    break-inside: avoid;
    page-break-inside: avoid;
    font-family: var(--font);
}

.credential-card .credential-card-brand {
    display: grid;
    grid-template-columns: 9mm minmax(0, 1fr);
    gap: 2.2mm;
    align-items: center;
    min-height: 9.5mm;
    margin: 0 0 2mm;
    padding: 0 0 1.6mm;
    border-bottom: .25mm solid #a9b8c9;
}

.credential-card .credential-card-brand .brand-mark {
    width: 8mm;
    height: 9mm;
    padding: 0;
    border-radius: 0;
    background: transparent;
}

.credential-card .credential-card-brand .brand-mark img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain;
}

.credential-card .credential-card-brand small,
.credential-card .credential-card-brand b,
.credential-card .credential-card-brand span {
    display: block;
    min-width: 0;
    margin: 0;
}

.credential-card .credential-card-brand small {
    color: #175ba7;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .08em;
}

.credential-card .credential-card-brand b {
    margin-top: .5mm;
    overflow: hidden;
    color: #10253f;
    font-size: 12px;
    font-weight: 700 !important;
    line-height: 1.08;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.credential-card .credential-card-brand span {
    margin-top: .5mm;
    overflow: hidden;
    color: #52657b;
    font-size: 12px;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.credential-card .credential-card-data {
    display: grid;
    grid-template-columns: 19mm minmax(0, 1fr);
    column-gap: 1.5mm;
    row-gap: .7mm;
    margin: 0;
}

.credential-card .credential-card-data dt,
.credential-card .credential-card-data dd {
    min-width: 0;
    margin: 0;
    font-size: 12px;
    line-height: 1.18;
}

.credential-card .credential-card-data dt {
    color: #52657b;
}

.credential-card .credential-card-data dt::after {
    content: " :";
    float: right;
}

.credential-card .credential-card-data dd {
    overflow: hidden;
    color: #10253f;
    font-weight: 600 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.credential-card .credential-card-data .credential-code {
    color: #084f9d;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 700 !important;
    letter-spacing: .025em;
}

@media (max-width: 820px) {
    .credential-card-sheet {
        grid-template-columns: 85.6mm;
        justify-content: start;
        overflow-x: auto;
    }

    .credential-card-sheet.is-empty {
        grid-template-columns: minmax(0, 1fr);
        justify-content: stretch;
        overflow-x: visible;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 10mm;
    }

    .credential-card-sheet {
        grid-template-columns: repeat(2, 85.6mm) !important;
        gap: 5mm 7mm;
        width: 178.2mm;
        margin: 0 auto;
        padding: 0;
    }

    .credential-card {
        width: 85.6mm !important;
        min-width: 85.6mm !important;
        max-width: 85.6mm !important;
        height: 54mm !important;
        min-height: 54mm !important;
        max-height: 54mm !important;
        border-color: #183b66;
        box-shadow: none;
    }
}

/* Formal Grobogan attendance sheet and examination minutes */
.formal-sheet {
    width: min(210mm, calc(100% - 32px));
    max-width: 980px;
    margin: 18px auto 40px;
    padding: 16mm 15mm 18mm;
    background: #fff;
    color: #111;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
    font-family: var(--font);
    font-size: 12px;
    line-height: 1.4;
}

.formal-letterhead {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) 78px;
    align-items: center;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 3px double #111;
}

.formal-logo {
    display: grid;
    place-items: center;
}

.formal-logo img {
    display: block;
    width: 66px;
    height: 76px;
    object-fit: contain;
}

.formal-letterhead-text {
    text-align: center;
}

.formal-letterhead-text span {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
}

.formal-letterhead-text h1 {
    margin: 1px 0;
    font-family: var(--font);
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: .04em;
}

.formal-letterhead-text p {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
}

.formal-document-title {
    margin: 16px 0 13px;
    text-align: center;
}

.formal-document-title h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    line-height: 1.25;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.formal-document-title p {
    margin: 3px 0 0;
    font-size: 12px;
    font-weight: 600;
}

@media (max-width: 760px) {
    .formal-sheet {
        width: calc(100% - 16px);
        margin: 8px auto 24px;
        padding: 22px 18px 30px;
        overflow-x: auto;
    }

    .formal-letterhead {
        grid-template-columns: 58px minmax(0, 1fr) 58px;
        gap: 7px;
    }

    .formal-logo img {
        width: 52px;
        height: 62px;
    }

    .formal-letterhead-text span {
        font-size: 12px;
    }

    .formal-letterhead-text h1 {
        font-size: 15px;
    }

    .formal-letterhead-text p {
        font-size: 12px;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 10mm;
    }

    .formal-sheet {
        width: auto;
        max-width: none;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }

}

/* Pusat laporan evaluasi */
.report-page-head {
    align-items: center;
    flex-wrap: wrap;
    overflow: visible;
}

.report-page-head > div:first-child {
    min-width: 0;
}

.report-export-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}

.report-export-complete {
    white-space: nowrap;
}

.report-export-menu {
    position: relative;
}

.report-export-menu summary {
    list-style: none;
    cursor: pointer;
}

.report-export-menu summary::-webkit-details-marker {
    display: none;
}

.report-export-menu > div {
    position: absolute;
    z-index: 40;
    top: calc(100% + 7px);
    right: 0;
    width: 245px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(31, 64, 113, .18);
}

.report-export-menu a {
    display: block;
    padding: 9px 10px;
    border-radius: 8px;
    color: var(--text);
    font-size: 12px;
    font-weight: 650;
}

.report-export-menu a:hover {
    background: #eef5ff;
    color: var(--primary);
}

.report-filter-panel .section-heading {
    margin-bottom: 6px;
}

.report-filter-panel .filter-form {
    margin-bottom: 0;
}

.report-filter-panel .report-filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px !important;
}

.report-filter-hierarchy {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    width: 100%;
}

.report-filter-refinements {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    width: 100%;
}

.report-filter-hierarchy label,
.report-filter-refinements label {
    min-width: 0;
}

.report-filter-refinements .report-search-filter {
    flex: 1 1 320px;
}

.report-filter-refinements .filter-actions {
    margin-left: 0;
    margin-inline-start: auto;
}

.report-workspace .section-heading {
    margin-bottom: 10px;
}

.report-workspace .section-heading h2 {
    margin: 0;
    color: #172033;
    font-size: 16px;
    font-weight: 750;
    line-height: 1.3;
    letter-spacing: -.01em;
}

.report-workspace .section-heading p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
}

.report-workspace {
    min-width: 0;
    max-width: 100%;
}

body:not(.login-bg):not(.exam-body):not(.tka-bg) .main > .report-workspace {
    margin-left: 22px;
    margin-right: 22px;
}

.report-tabs {
    display: flex;
    align-items: stretch;
    gap: 4px;
    max-width: 100%;
    margin-bottom: 12px;
    padding: 5px;
    overflow-x: auto;
    border: 1px solid #cfdeef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 7px 20px rgba(31, 64, 113, .06);
    scrollbar-width: thin;
}

.report-tabs a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 14px;
    color: #53657c;
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
    border-radius: 8px;
}

.report-tabs a:hover {
    color: #155fb8;
    background: #f0f6fd;
}

.report-tabs a.active {
    color: #fff;
    background: linear-gradient(180deg, #237cf0, #125fc8);
    box-shadow: 0 7px 15px rgba(21, 95, 184, .2);
}

.report-tabs a b {
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 20px;
    padding: 0 5px;
    color: #1458aa;
    font-size: 12px;
    border-radius: 999px;
    background: #fff;
}

.report-method-note {
    margin: 12px 0 0;
    padding: 9px 11px;
    color: #596b82;
    font-size: 12px;
    border-left: 3px solid #6c9ed8;
    border-radius: 6px;
    background: #f5f9fe;
}

.report-initial-loading,
.report-preparing {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 112px;
}

.report-initial-loading p,
.report-preparing p {
    margin: 4px 0 0;
    color: var(--muted);
}

[data-report-page][aria-busy="true"] .report-data-freshness {
    color: var(--primary);
}

.report-agency-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    min-width: 0;
}

.report-agency-grid > .panel {
    min-width: 0;
    margin-bottom: 0;
}

.report-agency-grid td strong {
    color: #0759bb;
}

.report-agency-grid .report-data-table th,
.report-agency-grid .report-data-table .table-sort-label {
    overflow-wrap: normal !important;
    word-break: normal !important;
    white-space: normal !important;
}

body.staff-body .report-agency-grid .report-data-table th[data-sort-wired="1"] .table-sort-button {
    gap: 4px;
    padding: 7px 6px;
}

.report-section-nav {
    position: sticky;
    z-index: 16;
    top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    width: fit-content;
    max-width: 100%;
    margin: 0 0 14px;
    padding: 6px;
    border: 1px solid rgba(198, 214, 232, .9);
    border-radius: 12px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 8px 24px rgba(31, 64, 113, .08);
    backdrop-filter: blur(10px);
}

.report-section-nav a {
    padding: 7px 10px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.report-section-nav a:hover {
    background: #eaf3ff;
    color: var(--primary);
}

.report-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.report-kpi-grid article {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 14px;
    border: 1px solid #d9e6f3;
    border-radius: 14px;
    background: linear-gradient(155deg, #fff, #f5f9fe);
    box-shadow: 0 8px 22px rgba(31, 64, 113, .06);
}

.report-kpi-grid span,
.report-kpi-grid em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.report-kpi-grid b {
    overflow: hidden;
    color: #12345a;
    font-size: 24px;
    line-height: 1.05;
    text-overflow: ellipsis;
}

.recommendation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}

.recommendation-grid article {
    padding: 12px 13px;
    border: 1px solid #d9e6f3;
    border-left-width: 4px;
    border-radius: 10px;
    background: #f8fbff;
}

.recommendation-grid article b {
    color: #173a62;
    font-size: 13px;
}

.recommendation-grid article p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.recommendation-grid .recommendation-danger {
    border-left-color: #d92d20;
    background: #fff5f4;
}

.recommendation-grid .recommendation-warning {
    border-left-color: #dc8b08;
    background: #fffbeb;
}

.recommendation-grid .recommendation-success {
    border-left-color: #079455;
    background: #f0fdf4;
}

.recommendation-grid .recommendation-neutral {
    border-left-color: #667085;
}

.report-analysis-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.score-distribution,
.report-aggregate-card {
    min-width: 0;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfdff;
}

.score-distribution {
    grid-column: span 2;
}

.score-distribution h3,
.report-aggregate-card h3 {
    margin: 0 0 10px;
    color: #173a62;
    font-size: 13px;
}

.distribution-row {
    display: grid;
    grid-template-columns: 58px minmax(90px, 1fr) 30px 42px;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    font-size: 12px;
}

.distribution-row progress {
    width: 100%;
    height: 8px;
    appearance: none;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: #e5edf6;
}

.distribution-row progress::-webkit-progress-bar {
    border-radius: inherit;
    background: #e5edf6;
}

.distribution-row progress::-webkit-progress-value {
    border-radius: inherit;
    background: linear-gradient(90deg, #1677ff, #56a4ff);
}

.distribution-row progress::-moz-progress-bar {
    border-radius: inherit;
    background: linear-gradient(90deg, #1677ff, #56a4ff);
}

.distribution-row em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    text-align: right;
}

.report-analysis-grid .mini-list {
    max-height: 270px;
    overflow: auto;
}

.report-subject-recap .mini-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
    overflow: visible;
}

.report-subject-recap .mini-list > div {
    min-width: 0;
}

.report-analysis-grid .mini-list > div {
    grid-template-columns: minmax(0, 1fr) auto;
}

.report-analysis-grid .mini-list em {
    grid-column: 1 / -1;
}

.report-ranking-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.report-ranking-tabs,
.report-agency-tabs {
    width: fit-content;
    max-width: 100%;
    box-shadow: none;
    background: #f5f8fc;
}

.report-ranking-grid td small,
.item-analysis-table td small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.report-ranking-grid td strong {
    color: #0759bb;
}

.item-analysis-table {
    min-width: 1380px;
}

.item-analysis-table th:nth-child(3) {
    min-width: 280px;
}

.item-analysis-table th:nth-child(8) {
    min-width: 180px;
}

.item-analysis-table th:nth-child(9) {
    min-width: 190px;
}

.item-analysis-table td {
    vertical-align: top;
    font-size: 12px;
    line-height: 1.5;
}

@media screen and (max-width: 1380px) {
    .report-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .report-analysis-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 960px) {
    .report-ranking-grid,
    .report-analysis-grid,
    .report-agency-grid {
        grid-template-columns: 1fr;
    }

    .score-distribution {
        grid-column: auto;
    }
}

@media screen and (max-width: 700px) {
	.report-subject-recap .mini-list {
		grid-template-columns: minmax(0, 1fr);
	}

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .main > .report-page-head,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .main > .report-workspace {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        margin-left: 12px !important;
        margin-right: 12px !important;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .main > .report-page-head {
        display: grid;
        align-items: stretch;
    }

    .report-export-actions {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
        width: 100%;
    }

    .report-export-actions .btn {
        width: 100%;
        min-width: 0;
    }

    .report-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        padding: 4px;
        overflow: visible;
    }

    .report-tabs a {
        width: 100%;
        min-width: 0;
        min-height: 36px;
        padding: 7px 11px;
        white-space: normal;
        text-align: center;
    }

    .report-filter-panel {
        min-width: 0;
        max-width: 100%;
        overflow: visible;
    }

    body .report-filter label {
        flex: 0 0 auto !important;
    }

    .report-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-export-menu,
    .report-export-menu summary {
        width: 100%;
    }

    .report-export-menu > div {
        right: auto;
        left: 0;
        width: min(100%, 280px);
    }

    .report-section-nav {
        position: static;
        width: 100%;
    }
}

/* Formal printable attendance and minutes documents */
.report-document {
    color: #111827;
    font-family: var(--font);
    font-size: 12px;
    line-height: 1.45;
}

.report-document .print-head {
    max-width: 1120px;
    margin: 0 auto;
    padding: 14px 28px;
    background: #fff;
    border-bottom-color: #cbd5e1;
}

.report-document .print-head h1 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.report-document .print-head p {
    margin: 2px 0 0;
    font-size: 12px;
    color: #475569;
}

.print-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.report-document .print-actions .btn {
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 12px;
}

.report-document .print-document {
    max-width: 1080px;
    padding: 22px 28px 42px;
}

.report-document .doc-title {
    margin-bottom: 14px;
}

.report-document .doc-title h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.25;
    letter-spacing: .06em;
}

.report-document .doc-title p {
    margin-top: 4px;
    color: #334155;
    font-size: 12px;
}

.school-identity {
    margin: 0 0 12px;
    padding: 9px 10px;
    border-top: 1px solid #64748b;
    border-bottom: 1px solid #64748b;
}

.school-identity h3 {
    margin: 0 0 6px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
    text-align: center;
    text-transform: uppercase;
}

.school-identity-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.school-identity-grid div,
.school-identity p {
    display: flex;
    gap: 6px;
    margin: 0;
    min-width: 0;
}

.school-identity span {
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.school-identity b,
.school-identity p {
    font-size: 12px;
}

.school-identity p {
    margin-top: 5px;
}

.report-document .doc-meta,
.report-document .doc-summary {
    gap: 6px;
    margin: 12px 0;
}

.report-document .doc-meta div,
.report-document .doc-summary div {
    padding: 7px 8px;
    border-color: #cbd5e1;
    border-radius: 3px;
}

.report-document .doc-meta span,
.report-document .doc-summary span {
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.report-document .doc-meta b,
.report-document .doc-summary b {
    margin-top: 2px;
    font-size: 12px;
}

.report-document .doc-paragraph {
    margin: 12px 0;
    font-size: 12px;
    line-height: 1.6;
    text-align: justify;
}

.report-document h3 {
    margin: 12px 0 5px;
    font-size: 12px;
}

.report-document .print-table {
    margin-top: 7px;
}

.report-document .print-table th,
.report-document .print-table td {
    padding: 6px;
    border-color: #64748b;
    font-size: 12px;
}

.report-document .print-table th {
    background: #f1f5f9;
    font-size: 12px;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.report-document .signature-cell {
    height: 32px;
}

.report-document .doc-signatures {
    gap: 20px;
    margin-top: 34px;
}

.report-document .signature-block > span {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
}

.report-document .signature-space {
    display: block;
    height: 48px;
}

.report-document .signature-block b {
    display: block;
    min-height: 18px;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.report-document .signature-block small {
    display: block;
    margin-top: 5px;
    color: #475569;
    font-size: 12px;
}

.report-document .incident-lines {
    gap: 12px;
    margin: 8px 0 18px;
}

.report-document .incident-lines span {
    padding-bottom: 6px;
}

@media (max-width: 760px) {
    .report-document .print-head {
        align-items: flex-start;
        gap: 12px;
        padding: 12px 16px;
    }

    .report-document .print-document {
        padding: 18px 16px 32px;
    }

    .report-document .doc-meta,
    .report-document .doc-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-document .doc-signatures,
    .report-document .doc-signatures.three {
        grid-template-columns: 1fr;
    }
}

@media print {
    .report-document {
        font-size: 13px;
    }

    .report-document .print-document {
        padding: 0;
    }

    .report-document .doc-signatures {
        break-inside: avoid;
    }
}

/* Reference-style UI match pass */
@media screen {
    body:not(.login-bg):not(.exam-body):not(.tka-bg) {
        background: #f6faff;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .app-shell {
        min-height: 100vh;
        background: #f7fbff;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .sidebar {
        width: 260px;
        min-width: 260px;
        gap: 0;
        padding: 0 12px 16px;
        background: linear-gradient(180deg, #052a57 0%, #063d7c 42%, #052b58 100%);
        color: #fff;
        box-shadow: none;
        border-right: 1px solid #dbe5f0;
        scrollbar-width: thin;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .side-brand {
        min-height: 68px;
        gap: 12px;
        padding: 14px 4px 16px;
        border-bottom: 1px solid rgba(255, 255, 255, .16);
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .side-brand .brand-mark {
        width: 44px;
        height: 44px;
        background: rgba(255, 255, 255, .92);
        border-radius: 10px;
        padding: 4px;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .side-brand b {
        color: #fff;
        font-size: 13px;
        line-height: 1.15;
        font-weight: 900;
        text-transform: uppercase;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .side-brand span {
        color: rgba(255, 255, 255, .88);
        font-size: 12px;
        line-height: 1.2;
        font-weight: 700;
        text-transform: uppercase;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .sidebar nav {
        gap: 5px;
        padding: 14px 0;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .sidebar nav a {
        min-height: 38px;
        gap: 12px;
        padding: 0 12px;
        border-radius: 7px;
        border: 0;
        color: rgba(255, 255, 255, .94);
        font-size: 12px;
        font-weight: 800;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .sidebar nav a span {
        width: 22px;
        height: 22px;
        flex: 0 0 22px;
        background: transparent;
        color: currentColor;
        font-size: 15px;
        box-shadow: none;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .sidebar nav a:hover,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .sidebar nav a.active {
        background: #0b78f0;
        color: #fff;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .sidebar nav a.active span {
        background: transparent;
        color: #fff;
        box-shadow: none;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .side-account {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-top: auto;
        padding: 14px 4px 0;
        border-top: 1px solid rgba(255, 255, 255, .16);
    }

    .avatar {
        width: 38px;
        height: 38px;
        border-radius: 999px;
        display: grid;
        place-items: center;
        background: #e7eef8;
        color: #0d2746;
        font-size: 16px;
        font-weight: 900;
    }

    .avatar.small {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .side-account b,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .side-account span {
        display: block;
        text-transform: none;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .side-account b {
        font-size: 13px;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .side-account span {
        font-size: 12px;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .main {
        min-width: 0;
        padding: 0 0 24px;
        background: #f7fbff;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .topbar {
        height: 56px;
        min-height: 56px;
        margin: 0;
        padding: 0 24px;
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 18px;
        background: #fff;
        border-bottom: 1px solid #dde6f1;
        box-shadow: 0 2px 12px rgba(15, 35, 60, .04);
    }

    .topbar-left,
    .topbar-date,
    .topbar-right {
        display: flex;
        align-items: center;
        min-width: 0;
    }

    .topbar-left {
        gap: 22px;
        color: #485a72;
        font-size: 12px;
        font-weight: 700;
    }

    .topbar-date {
        gap: 8px;
        color: #2c3b51;
        font-size: 12px;
        font-weight: 800;
    }

    .topbar-date-icon {
        color: #071c36;
        font-size: 15px;
    }

    .topbar-right {
        justify-content: flex-end;
        gap: 12px;
    }

    .icon-button {
        position: relative;
        width: 34px;
        height: 34px;
        border: 0;
        border-radius: 9px;
        display: inline-grid;
        place-items: center;
        background: transparent;
        color: #071c36;
        font-weight: 900;
        cursor: pointer;
    }

    .icon-button:hover {
        background: #f1f6fd;
    }

    .menu-button {
        font-size: 18px;
    }

    .has-badge span {
        position: absolute;
        top: 2px;
        right: 1px;
        min-width: 16px;
        height: 16px;
        border-radius: 999px;
        display: grid;
        place-items: center;
        background: #1677ff;
        color: #fff;
        font-size: 12px;
        line-height: 1;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .userbox {
        gap: 9px;
        padding: 0 0 0 12px;
        border: 0;
        border-left: 1px solid #dce5f0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .userbox b {
        color: #061832;
        font-size: 12px;
        font-weight: 900;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .userbox span {
        color: #5d6d84;
        font-size: 12px;
    }

    .logout-button {
        width: 28px;
        color: #5d6d84;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .content-title {
        padding: 14px 22px 9px;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 18px;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .content-title h1 {
        margin: 0 0 3px;
        color: #071c36;
        font-size: 24px;
        line-height: 1.15;
        font-weight: 900;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .content-title p {
        margin: 0;
        color: #66758b;
        font-size: 12px;
        font-weight: 600;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .content-title .crumb {
        display: none;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .stats-grid,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .dashboard-main-grid,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .quick-actions-panel,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .main > .grid,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .main > .panel,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .main > .page-head,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .toast {
        margin-left: 22px;
        margin-right: 22px;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .stats-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 16px;
        margin-bottom: 18px;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .stat-card {
        min-height: 110px;
        display: grid;
        grid-template-columns: 54px 1fr;
        align-items: start;
        gap: 14px;
        padding: 17px 16px 13px;
        border: 1px solid #dbe5f0;
        border-radius: 9px;
        background: #fff;
        box-shadow: 0 4px 14px rgba(15, 35, 60, .05);
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .stat-card:hover {
        transform: none;
        box-shadow: 0 6px 18px rgba(15, 35, 60, .08);
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .stat-icon {
        width: 48px;
        height: 48px;
        border-radius: 9px;
        color: #fff;
        font-size: 24px;
    }

    .metric-school .stat-icon { background: linear-gradient(135deg, #2789ff, #075be1); }
    .metric-students .stat-icon { background: linear-gradient(135deg, #24c88f, #07996d); }
    .metric-sessions .stat-icon { background: linear-gradient(135deg, #8367e8, #5844c9); }
    .metric-packages .stat-icon { background: linear-gradient(135deg, #ffb21c, #f08a00); }
    .metric-score .stat-icon { background: linear-gradient(135deg, #16b8a9, #07998a); }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .stat-card span,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .stat-card em {
        display: block;
        color: #65748b;
        font-size: 12px;
        line-height: 1.2;
        font-style: normal;
        font-weight: 650;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .stat-card strong {
        display: block;
        margin-top: 3px;
        color: #0b1f3a;
        font-size: 28px;
        line-height: 1;
        font-weight: 950;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .stat-card a {
        display: block;
        margin-top: 18px;
        padding-top: 10px;
        border-top: 1px solid #e6edf5;
        color: #0b6fe8;
        font-size: 12px;
        font-weight: 850;
    }

    .dashboard-main-grid {
        display: grid;
        grid-template-columns: minmax(620px, 1fr) 405px;
        gap: 16px;
        margin-bottom: 18px;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .panel {
        border: 1px solid #dbe5f0;
        border-radius: 9px;
        background: #fff;
        box-shadow: 0 4px 14px rgba(15, 35, 60, .05);
        padding: 16px;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .panel-title {
        min-height: 28px;
        padding-bottom: 10px;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .panel-title h3 {
        color: #0b1f3a;
        font-size: var(--fs-sub);
        font-weight: 700;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .table-wrap {
        border: 1px solid #dfe7f1;
        border-radius: 7px;
        box-shadow: none;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) th {
        min-height: 32px;
        background: #f5f8fc;
        color: #33445c;
        font-size: 12px;
        font-weight: 900;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) td {
        min-height: 38px;
        color: #1d2d44;
        font-size: 12px;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .bar-track {
        height: 7px;
        min-width: 70px;
        border: 0;
        background: #edf2f7;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .bar-track span {
        background: #14b87a;
    }

    .panel-link {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        margin-top: 12px;
        color: #0b6fe8;
        font-size: 12px;
        font-weight: 850;
    }

    .donut-wrap {
        min-height: 215px;
        display: grid;
        grid-template-columns: 185px 1fr;
        align-items: center;
        gap: 12px;
    }

    .donut-chart {
        width: 155px;
        height: 155px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        background: conic-gradient(#10b981 0 32%, #1f73f2 32% 59%, #f59e0b 59% 76%, #b8c2cc 76% 100%);
        box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .03);
    }

    .donut-chart > div {
        width: 78px;
        height: 78px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        align-content: center;
        background: #fff;
        text-align: center;
    }

    .donut-chart b {
        color: #0b1f3a;
        font-size: 18px;
        line-height: 1;
    }

    .donut-chart span {
        margin-top: 4px;
        color: #63728a;
        font-size: 12px;
        font-weight: 750;
    }

    .donut-legend {
        display: grid;
        gap: 13px;
    }

    .donut-legend div {
        display: grid;
        grid-template-columns: 10px 1fr auto;
        align-items: center;
        gap: 8px;
        color: #314158;
        font-size: 12px;
        font-weight: 700;
    }

    .donut-legend i {
        width: 8px;
        height: 8px;
        border-radius: 999px;
    }

    .donut-legend .green { background: #10b981; }
    .donut-legend .blue { background: #1f73f2; }
    .donut-legend .amber { background: #f59e0b; }
    .donut-legend .gray { background: #b8c2cc; }

    .donut-legend b {
        color: #43536b;
        font-weight: 800;
    }

    .quick-actions-panel {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 0;
        margin-bottom: 18px;
        border: 1px solid #dbe5f0;
        border-radius: 9px;
        background: #fff;
        box-shadow: 0 4px 14px rgba(15, 35, 60, .05);
    }

    .quick-actions-panel a {
        min-height: 68px;
        display: grid;
        grid-template-columns: 36px 1fr;
        column-gap: 10px;
        align-items: center;
        padding: 12px 16px;
        border-right: 1px solid #e6edf5;
    }

    .quick-actions-panel a:last-child {
        border-right: 0;
    }

    .quick-actions-panel span {
        width: 30px;
        height: 30px;
        border: 1px solid #dce7f4;
        border-radius: 7px;
        display: grid;
        place-items: center;
        color: #0b6fe8;
        font-size: 16px;
        font-weight: 900;
    }

    .quick-actions-panel b,
    .quick-actions-panel em {
        display: block;
        font-style: normal;
    }

    .quick-actions-panel b {
        color: #0b1f3a;
        font-size: 12px;
        font-weight: 900;
    }

    .quick-actions-panel em {
        margin-top: 2px;
        color: #65748b;
        font-size: 12px;
        font-weight: 650;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .grid.three {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .mini-list > div:not(.empty) {
        border: 1px solid #dfe7f1;
        border-radius: 7px;
        background: #f8fbff;
        padding: 11px 12px;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .footer {
        margin: 22px;
        color: #7a879b;
    }

    /* Compact staff polish: square logos, lighter typography, and chart summaries. */
    .brand-mark,
    .brand-mark.big,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .side-brand .brand-mark,
    .auth-hero .brand-mark.big {
        aspect-ratio: 1 / 1 !important;
        width: 44px !important;
        height: 44px !important;
        padding: 3px !important;
        border-radius: 9px !important;
        overflow: hidden;
    }

    .auth-hero .brand-mark.big {
        width: 54px !important;
        height: 54px !important;
    }

    .brand-mark img,
    .brand-mark.big img,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .side-brand .brand-mark img,
    .auth-hero .brand-mark.big img {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .side-brand b,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .content-title h1 {
        font-weight: 800;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .sidebar nav a,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .topbar-left,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .topbar-date,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .userbox b,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .side-account b,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) label,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .btn,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .panel-title h3,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) th,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) td b,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .stat-card a,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .quick-actions-panel b,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .panel-link {
        font-weight: 700;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .side-brand span,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .content-title p,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .stat-card span,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .stat-card em,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .quick-actions-panel em,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .donut-legend div {
        font-weight: 500;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .stat-card strong,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .donut-chart b {
        font-weight: 800;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .page-head h2,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .panel h3 {
        font-weight: 600;
    }

    .login-card dd,
    .login-card b,
    .brand-row b {
        font-weight: 600;
    }

    .login-card dt,
    .brand-row span {
        font-weight: 400;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .main > .page-head {
        margin-top: 16px;
    }

    .summary-chart {
        min-height: 250px;
        display: grid;
        grid-template-columns: 150px 1fr;
        gap: 20px;
        align-items: center;
        padding: 4px 0;
    }

    .summary-meter {
        width: 136px;
        height: 136px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        background:
            conic-gradient(#0b6fe8 0 var(--sd), #14b87a var(--sd) calc(var(--sd) + var(--smp)), #e7eef7 0);
        box-shadow: inset 0 0 0 1px rgba(13, 40, 75, .04);
    }

    .summary-meter > div {
        width: 78px;
        height: 78px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        align-content: center;
        background: #fff;
        text-align: center;
    }

    .summary-meter b {
        color: #0b1f3a;
        font-size: 24px;
        line-height: 1;
        font-weight: 800;
    }

    .summary-meter span {
        margin-top: 4px;
        color: #66758b;
        font-size: 12px;
    }

    .chart-bars {
        display: grid;
        gap: 12px;
    }

    .chart-row {
        display: grid;
        grid-template-columns: 42px 1fr 34px;
        align-items: center;
        gap: 10px;
        color: #314158;
        font-size: 12px;
    }

    .chart-row > div {
        height: 10px;
        overflow: hidden;
        border-radius: 999px;
        background: #edf3fb;
    }

    .chart-row i {
        display: block;
        height: 100%;
        min-width: 4px;
        border-radius: inherit;
    }

    .chart-row .sd { background: #0b6fe8; }
    .chart-row .smp { background: #14b87a; }

    .chart-row b {
        color: #0b1f3a;
        text-align: right;
        font-weight: 700;
    }

    .summary-kpis {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .summary-kpis div {
        position: relative;
        overflow: hidden;
        border: 1px solid #dfe7f1;
        border-radius: 8px;
        padding: 11px 12px 14px;
        background: #f8fbff;
    }

    .summary-kpis span,
    .summary-kpis b {
        position: relative;
        z-index: 1;
        display: block;
    }

    .summary-kpis span {
        color: #66758b;
        font-size: 12px;
    }

    .summary-kpis b {
        margin-top: 2px;
        color: #0b1f3a;
        font-size: 20px;
        font-weight: 800;
    }

    .summary-kpis i {
        position: absolute;
        left: 0;
        bottom: 0;
        height: 3px;
        background: linear-gradient(90deg, #0b6fe8, #14b87a);
    }

    .login-bg {
        background: #f7fbff;
    }

    .auth-wrap {
        min-height: 100vh;
        grid-template-rows: 88px 1fr !important;
        background: linear-gradient(180deg, #fff 0, #f7fbff 260px, #f2f7fc 100%);
    }

    .auth-wrap:before {
        height: 88px !important;
        background: linear-gradient(105deg, #0057b8 0%, #0067ce 46%, #0753a7 100%) !important;
    }

    .auth-wrap:after {
        height: 88px !important;
        clip-path: polygon(0 0, 78% 0, 68% 100%, 0 100%) !important;
        background: linear-gradient(110deg, rgba(0, 36, 94, .16), rgba(255, 255, 255, .08)) !important;
    }

    .auth-hero {
        height: 88px !important;
        padding: 14px clamp(18px, 5vw, 80px) !important;
        gap: 14px;
    }

    .auth-hero .brand-mark.big {
        width: 54px !important;
        height: 54px !important;
        padding: 3px;
        border-radius: 10px;
        background: rgba(255, 255, 255, .92);
    }

    .auth-hero .brand-mark.big img {
        max-width: 48px !important;
        max-height: 48px !important;
    }

    .auth-hero h1 {
        max-width: 620px;
        color: #fff;
        font-size: 16px !important;
        line-height: 1.2 !important;
        font-weight: 900;
    }

    .auth-hero p {
        color: rgba(255, 255, 255, .92);
        font-size: 12px !important;
        line-height: 1.2;
        font-weight: 850;
    }

    .auth-card {
        width: min(334px, calc(100vw - 32px)) !important;
        max-width: 334px !important;
        margin-top: 14px !important;
        justify-self: center !important;
        align-self: start;
        gap: 13px !important;
        border: 1px solid #dde7f2 !important;
        border-radius: 7px !important;
        background: #fff !important;
        box-shadow: 0 18px 45px rgba(14, 43, 77, .08) !important;
        padding: 28px 24px !important;
    }

    .auth-card h2 {
        color: #0b1f3a;
        font-size: 20px !important;
        line-height: 1.2;
        font-weight: 700;
    }

    .auth-card p {
        color: #53647b;
        font-size: 12px !important;
        line-height: 1.45;
    }

    .auth-card label {
        color: #0b1f3a;
        gap: 7px;
        font-size: 12px;
        font-weight: 900;
    }

    .auth-card input {
        height: 34px !important;
        min-height: 34px !important;
        border: 1px solid #d7e1ee !important;
        border-radius: 5px !important;
        background: #fff !important;
        padding: 0 9px !important;
        color: #1d2d44;
        font-size: 12px;
    }

    .auth-card input:focus {
        border-color: #0b6fe8 !important;
        box-shadow: 0 0 0 3px rgba(11, 111, 232, .12) !important;
    }

    .auth-card input::placeholder {
        color: #475569;
        font-weight: 700;
    }

    .auth-card .btn {
        height: 38px !important;
        min-height: 38px !important;
        margin-top: 0 !important;
        border-radius: 5px !important;
        background: linear-gradient(180deg, #0b76f6, #075ed3) !important;
        font-size: 12px !important;
        font-weight: 950;
    }

    .auth-alt-link {
        color: #53647b;
        font-size: 12px !important;
        font-weight: 800;
    }

    /* TKA-style auth background: taller blue government header with soft geometric wash. */
    .login-bg {
        background:
            radial-gradient(circle at 18% 24%, rgba(0, 117, 201, .10), transparent 30%),
            linear-gradient(180deg, #f7fbff 0, #eef4fa 46%, #f7fbff 100%) !important;
    }

    .auth-wrap {
        grid-template-rows: 150px 1fr !important;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, .22) 0, rgba(255, 255, 255, 0) 42%),
            radial-gradient(circle at 62% 3%, rgba(13, 95, 180, .16), transparent 32%),
            linear-gradient(180deg, #f7fbff 0, #eef4fa 260px, #f7fbff 100%) !important;
    }

    .auth-wrap:before {
        height: 150px !important;
        background:
            linear-gradient(135deg, rgba(255, 255, 255, .13) 0 18%, transparent 18% 100%),
            linear-gradient(126deg, transparent 0 47%, rgba(255, 255, 255, .08) 47% 58%, transparent 58% 100%),
            linear-gradient(105deg, #0756af 0%, #0c70c9 45%, #2f5f91 100%) !important;
        box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .18) !important;
    }

    .auth-wrap:after {
        height: 150px !important;
        clip-path: polygon(0 0, 34% 0, 19% 100%, 0 68%) !important;
        background: linear-gradient(120deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 62%) !important;
    }

    .auth-hero {
        height: 150px !important;
        padding: 24px clamp(22px, 5vw, 80px) !important;
    }

    .auth-card {
        margin-top: -30px !important;
        box-shadow: 0 26px 70px rgba(20, 57, 98, .14), 0 0 90px rgba(11, 111, 232, .05) !important;
    }

    .auth-card h2 {
        font-weight: 700 !important;
    }

    .auth-card label,
    .auth-card .btn,
    .auth-card input::placeholder {
        font-weight: 650 !important;
    }    html.exam-body, body.exam-body {
        height: 100vh !important;
        height: 100dvh !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .exam-layout {
        display: grid !important;
        grid-template-columns: 300px 1fr !important;
        grid-template-rows: 56px calc(100vh - 118px) 62px !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        background: #f4f7fb !important;
        overflow: hidden !important;
    }

    .exam-header {
        height: 56px;
        padding: 0 20px !important;
        background: linear-gradient(90deg, #0056b8 0%, #006bd8 100%) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .exam-header .side-brand .brand-mark {
        width: 36px;
        height: 36px;
    }

    .exam-header .side-brand b {
        font-size: 13px !important;
        color: #ffffff;
    }

    .exam-header .side-brand span {
        font-size: 12px !important;
        color: #93c5fd;
    }

    .number-panel {
        margin: 14px 0 14px 16px !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 14px;
        background: #ffffff !important;
        padding: 16px 18px !important;
        box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
        display: flex;
        flex-direction: column;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .number-panel::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }

    .num-panel-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 14px;
    }

    .num-panel-head h3 {
        font-family: var(--font-heading);
        font-size: 14px;
        font-weight: 700;
        color: #0f172a;
        margin: 0;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .num-panel-close-btn {
        width: 28px;
        height: 28px;
        border-radius: 8px;
        border: 1px solid #cbd5e1;
        background: #f8fafc;
        color: #475569;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
    }

    .num-panel-close-btn:hover {
        background: #eff6ff;
        border-color: #2563eb;
        color: #2563eb;
    }

    .num-toggle-header-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 6px 14px;
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        color: #ffffff;
        font-family: var(--font-heading);
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .num-toggle-header-btn:hover {
        background: rgba(255, 255, 255, 0.25);
        border-color: #ffffff;
    }

    body.num-panel-collapsed .exam-layout {
        grid-template-columns: 0px 1fr !important;
    }

    body.num-panel-collapsed .number-panel {
        width: 0 !important;
        min-width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        border: 0 !important;
    }


    .num-grid {
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 8px !important;
        margin-bottom: 16px;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .num {
        width: 100% !important;
        min-width: 0 !important;
        aspect-ratio: 1;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-family: var(--font-heading) !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        border-radius: 10px !important;
        border: 1.5px solid #cbd5e1 !important;
        background: #ffffff !important;
        color: #334155 !important;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
        text-decoration: none !important;
        box-sizing: border-box !important;
    }

    .num:hover {
        border-color: #2563eb !important;
        color: #2563eb !important;
        transform: translateY(-1px);
    }

    .num.active {
        background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
        color: #ffffff !important;
        border-color: #2563eb !important;
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35) !important;
        font-weight: 800 !important;
    }

    .num.answered {
        background: #d1fae5 !important;
        color: #065f46 !important;
        border-color: #059669 !important;
        font-weight: 800 !important;
        box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25) !important;
    }

    .num.doubt {
        background: #fef3c7 !important;
        color: #92400e !important;
        border-color: #d97706 !important;
        font-weight: 800 !important;
        box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25) !important;
    }

    /* Font Tools in Exam Header */
    .font-tools {
        display: inline-flex;
        align-items: center;
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        padding: 3px;
        gap: 3px;
    }

    .font-tools button {
        background: transparent;
        border: 0;
        color: #93c5fd;
        font-family: var(--font-heading);
        font-size: 13px;
        font-weight: 700;
        padding: 4px 10px;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .font-tools button:hover {
        background: rgba(255, 255, 255, 0.15);
        color: #ffffff;
    }

    .font-tools button.active {
        background: #ffffff !important;
        color: #1d4ed8 !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
    }

    .legend {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        margin-top: auto !important;
        padding-top: 14px !important;
        border-top: 1px solid #f1f5f9 !important;
    }

    .legend span {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        color: #475569 !important;
        white-space: normal !important;
    }

    .legend i.l {
        width: 16px !important;
        height: 16px !important;
        min-height: 16px !important;
        max-height: 16px !important;
        border-radius: 4px !important;
        flex: 0 0 16px !important;
        display: inline-block !important;
        box-sizing: border-box !important;
    }

    .legend i.l.empty { background: #ffffff !important; border: 1.5px solid #cbd5e1 !important; }
    .legend i.l.answered { background: #10b981 !important; border: 1px solid #059669 !important; }
    .legend i.l.doubt { background: #f59e0b !important; border: 1px solid #d97706 !important; }
    .legend i.l.active { background: #2563eb !important; border: 1px solid #1d4ed8 !important; }

    /* Dynamic Question Panel Font Zoom Classes */
    .question-panel.font-sm .stimulus,
    .question-panel.font-sm .question-text { font-size: 14px !important; }
    .question-panel.font-sm .option-text { font-size: 13px !important; }

    .question-panel.font-lg .stimulus,
    .question-panel.font-lg .question-text { font-size: 18px !important; }
    .question-panel.font-lg .option-text { font-size: 18px !important; }

    .question-panel {
        padding: 16px 28px !important;
        max-width: 1050px;
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        height: 100% !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }

    .question-panel::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }




    .question-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 18px;
        border: 1px solid #e2e8f0 !important;
        border-radius: 12px !important;
        background: #ffffff !important;
        box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03) !important;
        margin-bottom: 14px;
    }

    .question-top h2 {
        font-size: var(--fs-panel);
        font-weight: 700;
        color: #0f172a;
        margin: 0;
    }

    .question-top span {
        font-size: 13px;
        font-weight: 600;
        color: #475569;
    }

    .stimulus,
    .question-text {
        border: 1px solid #e2e8f0 !important;
        border-radius: 12px !important;
        background: #ffffff !important;
        padding: 16px 20px !important;
        box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03) !important;
        margin-bottom: 14px;
        font-size: 15px;
        line-height: 1.6;
        color: #0f172a;
    }

    .answers {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        margin-bottom: 14px !important;
        max-width: 900px;
    }

    .answer-card {
        display: flex !important;
        align-items: center !important;
        gap: 14px !important;
        border: 1.5px solid #cbd5e1 !important;
        border-radius: 12px !important;
        padding: 12px 18px !important;
        background: #ffffff !important;
        box-shadow: 0 2px 4px rgba(15, 23, 42, 0.02) !important;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
        cursor: pointer !important;
    }

    .answer-card:hover {
        border-color: #2563eb !important;
        box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12) !important;
        transform: translateY(-1px) !important;
    }

    .answer-card:has(input:checked) {
        border-color: #2563eb !important;
        background: #eff6ff !important;
        box-shadow: 0 0 0 1px #2563eb !important;
    }

    .answer-card input[type="radio"],
    .answer-card input[type="checkbox"] {
        width: 18px;
        height: 18px;
        accent-color: #2563eb;
        cursor: pointer;
    }

    .op-label {
        width: 32px !important;
        height: 32px !important;
        flex: 0 0 32px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-family: var(--font-heading) !important;
        font-size: 14px !important;
        font-weight: 800 !important;
        border-radius: 8px !important;
        background: #e0e7ff !important;
        color: #3730a3 !important;
    }

    .option-text {
        font-size: var(--fs-body) !important;
        font-weight: 500 !important;
        color: #0f172a !important;
    }

    .doubt-check {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 16px !important;
        border: 1px solid #fde68a !important;
        border-radius: 10px !important;
        background: #fffbeb !important;
        color: #b45309;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
    }

    .doubt-check input[type="checkbox"] {
        width: 18px;
        height: 18px;
        accent-color: #d97706;
    }

    .exam-footer {
        height: 62px;
        padding: 10px 24px !important;
        border-top: 1px solid #e2e8f0 !important;
        background: #ffffff !important;
        display: flex;
        align-items: center;
        justify-content: space-between;
        box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.04);
    }

    .exam-footer .btn {
        height: 40px;
        padding: 0 20px;
        font-size: 14px;
        font-weight: 600;
        border-radius: 8px;
    }

    .btn.warning {
        background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
        color: #ffffff;
        border: 0;
        box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
    }

    .btn.warning:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
    }

    .btn.danger {
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        color: #ffffff;
        border: 0;
        box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25);
    }

    .btn.danger:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
    }
}

/* Ultra-Responsive Mobile CBT Exam Layout */
@media (max-width: 900px) {
    .exam-layout {
        display: flex !important;
        flex-direction: column !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        overflow: hidden !important;
    }

    .exam-header {
        height: auto !important;
        min-height: 52px !important;
        padding: 8px 12px !important;
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 6px 10px !important;
    }

    .exam-header .side-brand {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: 50% !important;
    }

    .exam-header .side-brand b {
        font-size: 12px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
    }

    .exam-header .side-brand span {
        font-size: 12px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
    }

    .num-toggle-header-btn {
        padding: 4px 10px !important;
        font-size: 12px !important;
    }

    .font-tools {
        padding: 2px !important;
        gap: 2px !important;
    }

    .font-tools button {
        padding: 3px 7px !important;
        font-size: 12px !important;
    }

    .timer {
        padding: 4px 8px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
    }

    .autosave {
        padding: 4px 8px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
    }

    /* Mobile Floating Drawer for Number Panel */
    .number-panel {
        position: fixed !important;
        z-index: 1000 !important;
        top: 60px !important;
        left: 12px !important;
        right: 12px !important;
        bottom: auto !important;
        max-height: calc(100vh - 130px) !important;
        max-height: calc(100dvh - 130px) !important;
        margin: 0 !important;
        width: auto !important;
        border-radius: 14px !important;
        box-shadow: 0 16px 40px rgba(15, 23, 42, 0.35) !important;
        background: #ffffff !important;
        transition: all 0.22s ease !important;
    }

    body:not(.num-panel-open-mobile) .number-panel,
    body.num-panel-collapsed .number-panel {
        display: none !important;
    }

    body.num-panel-open-mobile .number-panel {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    .question-panel {
        flex: 1 1 auto !important;
        height: auto !important;
        padding: 12px 14px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-y: auto !important;
    }

    .question-top {
        padding: 10px 12px !important;
        margin-bottom: 10px !important;
    }

    .question-top h2 {
        font-size: 15px !important;
    }

    .question-top span {
        font-size: 12px !important;
    }

    .stimulus,
    .question-text {
        padding: 12px 14px !important;
        font-size: 14px !important;
        margin-bottom: 10px !important;
    }

    .answers {
        max-width: 100% !important;
        gap: 8px !important;
        margin-bottom: 10px !important;
    }

    .answer-card {
        padding: 10px 12px !important;
        gap: 10px !important;
        border-radius: 10px !important;
    }

    .op-label {
        width: 28px !important;
        height: 28px !important;
        flex: 0 0 28px !important;
        font-size: 13px !important;
        border-radius: 6px !important;
    }

    .option-text {
        font-size: 13px !important;
    }

    .exam-footer {
        height: auto !important;
        min-height: 52px !important;
        padding: 8px 12px !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        justify-content: space-between !important;
    }

    .exam-footer .btn {
        height: 36px !important;
        padding: 0 10px !important;
        font-size: 12px !important;
        flex: 1 1 calc(50% - 6px) !important;
        min-width: 110px !important;
        border-radius: 6px !important;
    }
}


    @media (max-width: 1180px) {
        body:not(.login-bg):not(.exam-body):not(.tka-bg) .stats-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .dashboard-main-grid,
        body:not(.login-bg):not(.exam-body):not(.tka-bg) .grid.three,
        .quick-actions-panel {
            grid-template-columns: 1fr;
        }
    }

    @media (max-width: 900px) {
        body:not(.login-bg):not(.exam-body):not(.tka-bg) .sidebar {
            display: none;
        }

        body:not(.login-bg):not(.exam-body):not(.tka-bg) .topbar {
            grid-template-columns: 1fr;
            height: auto;
            padding: 10px 14px;
        }

        .topbar-date,
        .topbar-right {
            display: none;
        }

        body:not(.login-bg):not(.exam-body):not(.tka-bg) .content-title,
        body:not(.login-bg):not(.exam-body):not(.tka-bg) .stats-grid,
        body:not(.login-bg):not(.exam-body):not(.tka-bg) .dashboard-main-grid,
        body:not(.login-bg):not(.exam-body):not(.tka-bg) .quick-actions-panel,
        body:not(.login-bg):not(.exam-body):not(.tka-bg) .main > .grid,
        body:not(.login-bg):not(.exam-body):not(.tka-bg) .main > .panel {
            margin-left: 12px;
            margin-right: 12px;
        }

        body:not(.login-bg):not(.exam-body):not(.tka-bg) .content-title {
            padding: 12px 0 8px;
            display: block;
        }

        body:not(.login-bg):not(.exam-body):not(.tka-bg) .stats-grid {
            grid-template-columns: 1fr;
        }

        .donut-wrap {
            grid-template-columns: 1fr;
            justify-items: center;
        }

        /* Responsive Mobile Dashboard & Metrics Overrides */
        .dashboard-main-grid {
            grid-template-columns: 1fr !important;
            gap: 16px !important;
        }

        .execution-grid {
            grid-template-columns: 1fr !important;
            gap: 14px !important;
        }

        .metrics-grid {
            grid-template-columns: 1fr !important;
            gap: 12px !important;
        }

        .metric-box {
            padding: 12px 14px !important;
        }

        .filter-form.list-filter-form {
            display: flex !important;
            flex-direction: column !important;
            align-items: stretch !important;
            gap: 10px !important;
            padding: 12px 14px !important;
            margin-bottom: 14px !important;
        }

        .filter-form.list-filter-form label {
            display: flex !important;
            flex-direction: column !important;
            gap: 4px !important;
            margin: 0 !important;
            padding: 0 !important;
            width: 100% !important;
            min-width: 0 !important;
            height: auto !important;
            min-height: 0 !important;
        }

        .filter-form.list-filter-form input,
        .filter-form.list-filter-form select {
            height: 38px !important;
            min-height: 38px !important;
            width: 100% !important;
            box-sizing: border-box !important;
            margin: 0 !important;
        }

        .filter-actions {
            margin-left: 0 !important;
            margin-top: 4px !important;
            width: 100% !important;
            display: flex !important;
            align-items: center !important;
            justify-content: flex-end !important;
            gap: 8px !important;
        }

        .filter-actions .btn {
            height: 36px !important;
            padding: 0 16px !important;
            font-size: 13px !important;
        }



        .quick-actions-panel a {
            border-right: 0;
            border-bottom: 1px solid #e6edf5;
        }

        .quick-actions-panel a:last-child {
            border-bottom: 0;
        }

        .auth-card {
            width: calc(100vw - 28px) !important;
            max-width: calc(100vw - 28px) !important;
            margin-left: 14px !important;
            margin-right: 14px !important;
            padding: 26px 22px !important;
        }

        .auth-hero {
            padding: 14px 16px !important;
        }

        .auth-hero h1 {
            font-size: 12px !important;
        }

        .auth-hero p {
            font-size: 12px !important;
        }

        .exam-layout {
            grid-template-columns: 1fr !important;
            grid-template-rows: auto auto 1fr auto !important;
        }
    }

    .option-editor {
        display: grid;
        gap: 8px;
        padding: 10px;
        border: 1px solid #e2ebf5;
        border-radius: 8px;
        background: #fbfdff;
    }

    .option-current-media {
        display: grid;
        gap: 8px;
        padding: 8px;
        border: 1px solid #e8eef6;
        border-radius: 7px;
        background: #fff;
    }

    .inline-check {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .inline-check input {
        width: auto;
    }

    .answer-card .option-content,
    .statement-row .option-content,
    .match-row .option-content {
        flex: 1;
        min-width: 0;
    }

    .option-content,
    .option-media {
        display: grid !important;
        gap: 7px;
        align-items: start;
        justify-items: start;
    }

    .option-content-row {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        min-width: 0;
    }

    .option-text {
        white-space: pre-line;
        overflow-wrap: anywhere;
    }

    .option-media {
        max-width: 100%;
    }

    .option-media img {
        max-width: min(360px, 100%);
        max-height: 220px;
        object-fit: contain;
        border: 1px solid #dbe5f0;
        border-radius: 8px;
        background: #f8fbff;
    }

    .option-media audio {
        width: min(360px, 100%);
    }

    .option-media small {
        color: var(--muted);
        font-size: 12px;
        line-height: 1.35;
    }

    /* Softer screen typography so labels and data text do not read as overly bold. */
    body b,
    body strong,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) td b,
    .btn,
    .badge,
    label,
    th,
    details summary,
    .checks label,
    .doubt-check,
    .answer-card,
    .statement-row label,
    .session-card span,
    .session-card em,
    .confirm-list span,
    .confirm-list b,
    .timer,
    .autosave,
    .topbar-left,
    .topbar-date,
    .userbox b,
    .side-account b,
    .panel-link,
    .quick-actions-panel b,
    .donut-legend b,
    .chart-row b,
    .login-card dd,
    .login-card b,
    .brand-row b,
    .auth-card label,
    .auth-card .btn,
    .auth-card input::placeholder,
    .auth-alt-link {
        font-weight: 500 !important;
    }

    h1,
    h2,
    h3,
    .side-brand b,
    .content-title h1,
    .page-head h2,
    .panel-title h3,
    .auth-hero h1,
    .auth-card h2,
    .tka-start-card h1,
    .question-top h2,
    .finish-dialog h2,
    .stat-card strong,
    .donut-chart b,
    .summary-meter b,
    .summary-kpis b,
    .score-circle,
    .finish-summary b,
    .num,
    .op-label,
    .token-display b {
        font-weight: 600 !important;
    }

    .side-brand span,
    .content-title p,
    .stat-card span,
    .stat-card em,
    .quick-actions-panel em,
    .donut-legend div,
    .auth-hero p,
    .auth-card p,
    .question-text,
    .mini-list span,
    .mini-list em,
    .summary-meter span,
    .summary-kpis span {
        font-weight: 400 !important;
    }

/* Compact session editor with a dedicated school selection column */
.session-page {
    grid-template-columns: minmax(0, 1fr);
}

.filter-form.session-filter {
    grid-template-columns: minmax(160px, 1.3fr) repeat(5, minmax(90px, 1fr)) auto;
}

.session-form-panel {
    width: 100%;
}

.session-form-layout {
    display: grid;
    grid-template-columns: minmax(360px, .9fr) minmax(500px, 1.1fr);
    gap: 18px;
    align-items: stretch;
}

.session-detail-fields,
.session-school-picker {
    min-width: 0;
}

.session-detail-fields {
    display: grid;
    gap: 10px;
    align-content: start;
}

.session-section-head {
    min-height: 38px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.session-section-head h2,
.session-section-head p {
    margin: 0;
}

.session-section-head p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.session-datetime-grid,
.session-settings-grid,
.session-school-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.session-checks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 34px;
    align-items: center;
}

.session-checks label {
    line-height: 1.35;
}

.session-save-button {
    width: fit-content;
    min-width: 130px;
    margin-top: 2px;
}

.session-school-picker {
    display: grid;
    grid-template-rows: auto auto auto minmax(230px, 1fr);
    gap: 10px;
    padding: 12px;
    border: 1px solid #dce6f1;
    border-radius: 10px;
    background: #f8fbff;
}

.session-package-picker {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #dce6f1;
    border-radius: 10px;
    background: #f8fbff;
}

.session-package-validation {
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #f3c0c0;
    border-radius: 8px;
    background: #fff1f1;
    color: #a51d1d;
    font-size: 12px;
}

.session-package-validation[hidden] {
    display: none;
}

.session-package-list {
    display: grid;
    max-height: 300px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-content: start;
    gap: 7px;
    padding: 8px;
    background: #fff;
}

.session-package-option {
    min-width: 0;
    min-height: 64px;
    align-items: flex-start;
    gap: 8px;
    padding: 9px;
    border: 1px solid #e0e9f3;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}

.session-package-option:hover {
    border-color: #b8d3f4;
    background: #f6faff;
}

.session-package-option:has(input:checked) {
    border-color: #86b8f4;
    background: #eaf4ff;
    box-shadow: inset 0 0 0 1px rgba(11, 111, 232, .1);
}

.session-package-option[hidden] {
    display: none !important;
}

.session-package-option input {
    flex: 0 0 auto;
    margin-top: 2px;
}

.session-package-option span,
.session-package-option b,
.session-package-option small {
    min-width: 0;
    display: block;
}

.session-package-option b {
    overflow: hidden;
    color: #142942;
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
}

.session-package-option small {
    margin-top: 2px;
    color: #6c7b90;
    font-size: 12px;
    line-height: 1.3;
}

.session-package-empty {
    grid-column: 1 / -1;
}

.session-package-empty[hidden] {
    display: none;
}

.session-school-count {
    flex: 0 0 auto;
    padding: 5px 9px;
    border: 1px solid #cfe0f4;
    border-radius: 999px;
    background: #fff;
    color: #526176;
    font-size: 12px;
    white-space: nowrap;
}

.session-school-count b {
    color: #0759bb;
}

.session-school-filters label {
    gap: 4px;
    font-size: 12px;
}

.session-school-filters select {
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
}

.session-school-tools {
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
}

.session-school-tools > div {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.session-school-list {
    display: grid;
    max-height: 390px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 7px;
    padding: 8px;
    background: #fff;
}

.session-school-list .session-school-option {
    min-width: 0;
    min-height: 48px;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 9px;
    border: 1px solid #e0e9f3;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}

.session-school-list .session-school-option:hover {
    border-color: #b8d3f4;
    background: #f6faff;
}

.session-school-list .session-school-option:has(input:checked) {
    border-color: #86b8f4;
    background: #eaf4ff;
    box-shadow: inset 0 0 0 1px rgba(11, 111, 232, .1);
}

.session-school-list .session-school-option[hidden] {
    display: none !important;
}

.session-school-option input {
    flex: 0 0 auto;
    margin-top: 2px;
}

.session-school-option span,
.session-school-option b,
.session-school-option small {
    min-width: 0;
    display: block;
}

.session-school-option b {
    overflow: hidden;
    color: #142942;
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
}

.session-school-option small {
    margin-top: 2px;
    color: #6c7b90;
    font-size: 12px;
    line-height: 1.3;
}

.session-school-empty {
    grid-column: 1 / -1;
}

.session-school-empty[hidden] {
    display: none;
}

.session-edit-actions {
    padding-top: 2px;
}

.detail-list {
    display: grid;
    gap: 8px;
    margin: 10px 0 14px;
}

.detail-list > div {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
    padding: 9px 10px;
    border: 1px solid #e1eaf4;
    border-radius: 8px;
    background: #f8fbff;
}

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

.detail-list dd {
    min-width: 0;
    margin: 0;
    color: #142942;
    font-size: 12px;
    overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
    .session-form-layout {
        grid-template-columns: 1fr;
    }

    .filter-form.session-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-form.session-filter .filter-actions {
        grid-column: 1 / -1;
    }

    .session-school-list {
        max-height: 330px;
    }

    .session-package-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .filter-form.session-filter,
    .session-datetime-grid,
    .session-settings-grid,
    .session-school-filters,
    .session-checks,
    .session-package-list,
    .session-school-list {
        grid-template-columns: 1fr;
    }

    .session-school-tools {
        align-items: flex-start;
        flex-direction: column;
    }

    .session-school-tools > div {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}


/* Compact typography for the taxonomy administration workspace. */
.taxonomy-settings-page {
    display: grid;
    gap: 12px;
    color: var(--color-foreground, var(--text));
    font-size: 13px;
    line-height: 1.5;
}

.taxonomy-settings-page > .page-head,
.taxonomy-settings-page > .panel,
.taxonomy-settings-page .taxonomy-settings-grid > .panel {
    margin: 0 !important;
}

.taxonomy-settings-page .taxonomy-page-head {
    align-items: center;
    gap: 16px;
    padding: 0 0 12px !important;
}

.taxonomy-settings-page .taxonomy-page-head h1 {
    font-size: 24px !important;
    letter-spacing: -.02em;
    line-height: 1.2;
}

.taxonomy-settings-page .taxonomy-page-head p {
    max-width: 74ch;
    margin-top: 4px;
    font-size: 13px !important;
    line-height: 1.5;
}

.taxonomy-settings-page .taxonomy-page-actions {
    gap: 8px;
}

.taxonomy-settings-page .panel {
    padding: 14px !important;
    border-radius: 14px !important;
}

.taxonomy-settings-page .taxonomy-subject-picker {
    align-items: center;
    gap: 12px;
}

.taxonomy-settings-page .taxonomy-import-panel {
    gap: 8px 20px;
}

.taxonomy-settings-page .panel h2,
.taxonomy-settings-page .settings-section-heading h2 {
    margin: 0;
    font-size: 16px !important;
    letter-spacing: -.01em;
    line-height: 1.3;
}

.taxonomy-settings-page .field-help,
.taxonomy-settings-page .settings-section-heading p,
.taxonomy-settings-page label small {
    color: var(--color-muted-foreground, var(--muted));
    font-size: 12px;
    line-height: 1.5;
}

.taxonomy-settings-page .taxonomy-subject-picker .field-help,
.taxonomy-settings-page .taxonomy-import-panel > div > .field-help {
    max-width: 72ch;
    margin: 5px 0 0;
    font-size: 13px;
}

.taxonomy-settings-page .taxonomy-import-panel > .field-help:last-child {
    font-size: 12px;
}

.taxonomy-settings-page label,
.taxonomy-settings-page .inline-upload-file > label {
    gap: 5px;
    color: var(--color-secondary, #334155);
    font-size: 12px;
    font-weight: 700;
}

body:not(.login-bg):not(.exam-body):not(.tka-bg) .taxonomy-settings-page :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.4;
}

.taxonomy-settings-page .taxonomy-node-form textarea {
    min-height: 72px;
}

.taxonomy-settings-page .btn {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 13px;
    line-height: 1.25;
}

.taxonomy-settings-page .btn.tiny {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 12px;
}

.taxonomy-settings-page .taxonomy-settings-grid {
    gap: 12px;
}

.taxonomy-settings-page .taxonomy-node-form {
    gap: 10px;
}

.taxonomy-settings-page .settings-section-heading {
    gap: 12px;
    margin-bottom: 10px;
    padding-bottom: 8px;
}

.taxonomy-settings-page .taxonomy-tree {
    gap: 7px;
}

.taxonomy-settings-page .taxonomy-tree-row {
    gap: 10px;
    padding: 10px;
    border-radius: 11px;
}

.taxonomy-settings-page .taxonomy-type {
    margin-bottom: 3px;
    font-size: 12px;
    letter-spacing: .055em;
}

.taxonomy-settings-page .taxonomy-tree-content strong {
    font-size: 13px;
    line-height: 1.4;
}

.taxonomy-settings-page .taxonomy-tree-content small {
    font-size: 12px;
    line-height: 1.4;
}

.taxonomy-settings-page .taxonomy-tree-row .row-actions {
    gap: 6px;
}

.taxonomy-settings-page .badge {
    font-size: 12px;
}

@media (max-width: 720px) {
    .taxonomy-settings-page {
        font-size: 14px;
    }

    .taxonomy-settings-page .taxonomy-page-head h1 {
        font-size: 20px !important;
    }

    .taxonomy-settings-page .taxonomy-page-head p,
    .taxonomy-settings-page .taxonomy-subject-picker .field-help,
    .taxonomy-settings-page .taxonomy-import-panel > div > .field-help {
        font-size: 13px !important;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .taxonomy-settings-page :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
        min-height: 44px;
        font-size: 16px;
    }

    .taxonomy-settings-page .btn,
    .taxonomy-settings-page .btn.tiny {
        min-height: 44px;
        font-size: 13px;
    }
}

/* Per-student attempt history and score progression. */
.report-attempt-history-panel {
    min-width: 0;
}

.report-attempt-students,
.report-attempt-subjects {
    display: grid;
    gap: 14px;
}

.report-attempt-student {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #d6e3f1;
    border-radius: 14px;
    background: #fbfdff;
}

.report-attempt-student > summary {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(105px, auto)) 24px;
    align-items: center;
    gap: 14px;
    min-height: 72px;
    padding: 14px 16px;
    color: #173a62;
    cursor: pointer;
    list-style: none;
    background: #fff;
}

.report-attempt-student > summary::-webkit-details-marker {
    display: none;
}

.report-attempt-student > summary::after {
    content: "›";
    color: #5f7692;
    font-size: 24px;
    line-height: 1;
    text-align: center;
    transform: rotate(90deg);
    transition: transform .16s ease;
}

.report-attempt-student[open] > summary::after {
    transform: rotate(-90deg);
}

.report-attempt-student > summary:hover {
    background: #f5f9fe;
}

.report-attempt-student > summary:focus-visible {
    outline: 3px solid rgba(35, 124, 240, .28);
    outline-offset: -3px;
}

.report-attempt-identity,
.report-attempt-summary,
.report-attempt-result {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.report-attempt-identity b {
    overflow-wrap: anywhere;
    color: #172033;
    font-size: 14px;
}

.report-attempt-identity small,
.report-attempt-summary small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.report-attempt-summary {
    text-align: center;
}

.report-attempt-summary b {
    color: #0759bb;
    font-size: 18px;
}

.report-attempt-subjects {
    padding: 16px;
    border-top: 1px solid #e1eaf4;
}

.report-attempt-subject {
    min-width: 0;
    padding: 14px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(31, 64, 113, .06);
}

.report-attempt-subject > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.report-attempt-subject > header > div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 5px 8px;
    min-width: 0;
}

.report-attempt-subject h3 {
    margin: 0;
    color: #173a62;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.report-attempt-subject header p {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.report-attempt-trend {
    flex: 0 0 auto;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
}

.report-attempt-trend.is-positive {
    color: #067647;
    background: #ecfdf3;
}

.report-attempt-trend.is-negative {
    color: #b42318;
    background: #fef3f2;
}

.report-attempt-trend.is-neutral {
    color: #53657c;
    background: #eef3f8;
}

.report-attempt-score-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.report-attempt-score-summary span {
    padding: 7px 9px;
    color: #66778c;
    font-size: 12px;
    border-radius: 8px;
    background: #f3f7fb;
}

.report-attempt-score-summary b {
    margin-inline-start: 4px;
    color: #173a62;
}

.report-attempt-timeline {
    display: grid;
    gap: 9px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.report-attempt-timeline > li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 11px;
    border: 1px solid #e2eaf3;
    border-radius: 10px;
    background: #fbfdff;
}

.report-attempt-timeline.can-select > li {
    grid-template-columns: 44px 34px minmax(0, 1fr) auto;
}

.report-attempt-select {
    align-self: stretch;
}

.report-attempt-sequence {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    border-radius: 50%;
    background: #237cf0;
}

.report-attempt-detail {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.report-attempt-detail > div {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.report-attempt-detail b {
    color: #172033;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.report-attempt-detail small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.report-attempt-result {
    grid-template-columns: auto auto;
    align-items: baseline;
    text-align: end;
}

.report-attempt-result span {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.report-attempt-result strong,
.report-attempt-result > b {
    color: #0759bb;
    font-size: 18px;
}

.report-attempt-result .btn {
    grid-column: 1 / -1;
    margin-top: 4px;
}

@media screen and (max-width: 760px) {
    .report-attempt-student > summary {
        grid-template-columns: minmax(0, 1fr) repeat(3, auto) 20px;
        gap: 10px;
        padding: 13px;
    }

    .report-attempt-identity {
        grid-column: 1 / -2;
    }

    .report-attempt-summary {
        text-align: start;
    }

    .report-attempt-student > summary::after {
        grid-column: -1;
        grid-row: 1;
    }

    .report-attempt-subjects {
        padding: 12px;
    }

    .report-attempt-subject > header {
        display: grid;
    }

    .report-attempt-trend {
        width: fit-content;
        white-space: normal;
    }

    .report-attempt-timeline > li {
        grid-template-columns: 34px minmax(0, 1fr);
        align-items: start;
    }

    .report-attempt-timeline.can-select > li {
        grid-template-columns: 44px 34px minmax(0, 1fr);
    }

    .report-attempt-timeline.can-select .report-attempt-detail {
        grid-column: 3;
    }

    .report-attempt-result {
        grid-column: 2;
        grid-template-columns: auto auto minmax(90px, auto);
        justify-content: start;
        text-align: start;
    }

    .report-attempt-timeline.can-select .report-attempt-result {
        grid-column: 3;
    }

    .report-attempt-result .btn {
        grid-column: auto;
        margin-top: 0;
    }
}

@media screen and (max-width: 440px) {
    .report-attempt-student > summary {
        grid-template-columns: repeat(3, minmax(0, 1fr)) 18px;
    }

    .report-attempt-summary b {
        font-size: 15px;
    }

    .report-attempt-identity {
        grid-column: 1 / -2;
        grid-row: 1;
    }

    .report-attempt-student > summary::after {
        grid-column: -1;
        grid-row: 1;
    }

    .report-attempt-student > summary > .report-attempt-summary:nth-of-type(2) {
        grid-column: 1;
        grid-row: 2;
    }

    .report-attempt-student > summary > .report-attempt-summary:nth-of-type(3) {
        grid-column: 2;
        grid-row: 2;
    }

    .report-attempt-student > summary > .report-attempt-summary:nth-of-type(4) {
        grid-column: 3;
        grid-row: 2;
    }

    .report-attempt-result {
        grid-template-columns: auto auto;
    }

    .report-attempt-result .btn {
        grid-column: 1 / -1;
        width: fit-content;
    }
}

/* School session roll-up: school submissions grouped through subdistrict to Dinas. */
.dashboard-school-session-panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid #dbe5f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
}

.dashboard-school-session-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.dashboard-school-session-heading h2,
.dashboard-session-school h3 {
    margin: 0;
    color: #172033;
}

.dashboard-school-session-heading h2 {
    margin-top: 3px;
    font-size: 18px;
}

.dashboard-school-session-heading p,
.dashboard-session-school header p {
    margin: 5px 0 0;
    color: #475569;
    line-height: 1.5;
}

.dashboard-school-session-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 12px;
}

.dashboard-school-session-actions > span,
.dashboard-school-session-actions > a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding-inline: 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 750;
}

.dashboard-school-session-actions > span {
    gap: 5px;
    color: #334155;
    background: #f1f5f9;
}

.dashboard-school-session-actions > a {
    border: 1px solid #cbd5e1;
    color: #0f5ea8;
    background: #fff;
}

.dashboard-school-session-actions > a:hover {
    border-color: #93bde2;
    background: #f7fbff;
}

.dashboard-school-session-actions > a:focus-visible,
.dashboard-session-district-summary button:focus-visible,
.dashboard-session-dialog button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .24);
    outline-offset: 3px;
}

.dashboard-session-districts,
.dashboard-session-list {
    display: grid;
}

.dashboard-session-districts {
    gap: 8px;
}

.dashboard-session-district {
    overflow: hidden;
    border: 1px solid #d8e4f0;
    border-radius: 14px;
    background: linear-gradient(135deg, #fff 0%, #f8fbff 100%);
    box-shadow: 0 2px 8px rgba(15, 60, 104, .035);
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.dashboard-session-district:hover {
    border-color: #b9d2e9;
    box-shadow: 0 7px 18px rgba(15, 60, 104, .075);
}

.dashboard-session-district-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    min-height: 64px;
    padding: 9px 10px;
    color: #1e293b;
}

.dashboard-session-district-identity {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.dashboard-session-district-icon {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid #cfe3f7;
    border-radius: 11px;
    color: #1266ad;
    background: #eaf5ff;
}

.dashboard-session-district-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.dashboard-session-district-copy {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.dashboard-session-district-copy > span {
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.dashboard-session-district-copy h3 {
    margin: 0;
    overflow-wrap: anywhere;
    color: #172033;
    font-size: 14px;
    font-weight: 780;
    letter-spacing: -.01em;
    line-height: 1.3;
}

.dashboard-session-district-copy p {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 1px 0 0;
    color: #475569;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.3;
}

.dashboard-session-district-copy p svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.dashboard-session-district-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.dashboard-session-count {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    flex: 0 0 auto;
    min-width: 54px;
    justify-content: center;
    padding: 6px 9px;
    border: 1px solid #cce8fb;
    border-radius: 999px;
    color: #075985;
    background: #e0f2fe;
    white-space: nowrap;
}

.dashboard-session-count strong {
    font-size: 13px;
    line-height: 1;
}

.dashboard-session-count small {
    font-size: 12px;
    font-weight: 720;
    line-height: 1;
}

.btn.tiny.dashboard-session-detail-button,
.dashboard-session-dialog footer button {
    min-height: 44px;
    padding: 8px 11px;
    border: 1px solid #b9cbe0;
    border-radius: 11px;
    color: #0f5ea8;
    background: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
    touch-action: manipulation;
}

.btn.tiny.dashboard-session-detail-button:hover,
.dashboard-session-dialog footer button:hover {
    border-color: #7faed8;
    background: #eff7ff;
}

.btn.tiny.dashboard-session-detail-button:hover {
    transform: none;
    filter: none;
    box-shadow: 0 4px 12px rgba(15, 94, 168, .1);
}

.btn.tiny.dashboard-session-detail-button:active {
    transform: none;
    filter: none;
    background: #e3f1fd;
    box-shadow: none;
}

.dashboard-session-detail-button svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.dashboard-session-detail-button .dashboard-session-detail-chevron {
    width: 13px;
    height: 13px;
    opacity: .72;
    transition: transform .18s ease;
}

.dashboard-session-detail-button:hover .dashboard-session-detail-chevron {
    transform: translateX(2px);
}

.dashboard-session-dialog {
    width: min(780px, calc(100vw - 32px));
    max-width: none;
    max-height: min(84dvh, 760px);
    padding: 0;
    overflow: hidden;
    border: 1px solid #d7e2ee;
    border-radius: 16px;
    color: #172033;
    background: transparent;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .24);
}

.dashboard-session-dialog::backdrop {
    background: rgba(15, 23, 42, .52);
    backdrop-filter: blur(2px);
}

.dashboard-session-dialog-card {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    max-height: min(84dvh, 760px);
    overflow: hidden;
    background: #f8fafc;
}

.dashboard-session-dialog-card > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.dashboard-session-dialog-card > header h2 {
    margin: 3px 0 0;
    font-size: 20px;
}

.dashboard-session-dialog-card > header p {
    margin: 4px 0 0;
    color: #475569;
    font-size: 12px;
}

.dashboard-session-dialog-close {
    display: grid;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    border: 1px solid #d8e2ec;
    border-radius: 10px;
    color: #475569;
    background: #fff;
    cursor: pointer;
    touch-action: manipulation;
}

.dashboard-session-dialog-close:hover {
    color: #0f5ea8;
    background: #f1f7fd;
}

.dashboard-session-dialog-close svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.dashboard-session-dialog-body {
    display: grid;
    gap: 10px;
    min-height: 0;
    padding: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.dashboard-session-dialog-card > footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.dashboard-session-dialog-card > footer span {
    color: #475569;
    font-size: 12px;
    font-weight: 650;
}

.dashboard-session-school {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}

.dashboard-session-school > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.dashboard-session-school > header > div {
    min-width: 0;
}

.dashboard-session-school > header > span {
    flex: 0 0 auto;
    color: #475569;
    font-size: 12px;
    font-weight: 750;
}

.dashboard-session-level {
    display: inline-flex;
    margin-bottom: 5px;
    padding: 3px 7px;
    border-radius: 6px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 12px;
    font-weight: 800;
}

.dashboard-session-school h3 {
    overflow-wrap: anywhere;
    font-size: 15px;
}

.dashboard-session-school header p {
    font-size: 12px;
}

.dashboard-session-list {
    gap: 9px;
}

.dashboard-session-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    background: #f8fafc;
}

.dashboard-session-main,
.dashboard-session-statuses {
    display: flex;
}

.dashboard-session-main {
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.dashboard-session-main b,
.dashboard-session-main span,
.dashboard-session-main small {
    overflow-wrap: anywhere;
}

.dashboard-session-main b {
    color: #1e293b;
    font-size: 13px;
}

.dashboard-session-main span,
.dashboard-session-main small,
.dashboard-session-statuses small {
    color: #475569;
    font-size: 12px;
    line-height: 1.45;
}

.dashboard-session-statuses {
    max-width: 280px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 7px;
}

.dashboard-session-statuses small {
    flex-basis: 100%;
    text-align: end;
}

@media (max-width: 760px) {
    .dashboard-school-session-panel {
        gap: 12px;
        padding: 14px;
        border-radius: 15px;
    }

    .dashboard-school-session-heading,
    .dashboard-session-school > header {
        flex-direction: column;
        gap: 10px;
    }

    .dashboard-school-session-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .dashboard-school-session-actions > a {
        justify-content: center;
    }

    .dashboard-session-district-summary {
        align-items: center;
        min-height: 58px;
        gap: 8px;
        padding: 8px;
    }

    .btn.tiny.dashboard-session-detail-button,
    .dashboard-session-dialog footer button,
    .dashboard-session-dialog-close {
        min-height: 44px;
    }

    .dashboard-session-district-icon {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
    }

    .dashboard-session-district-actions {
        gap: 6px;
    }

    .dashboard-session-count {
        min-width: 48px;
        padding-inline: 7px;
    }

    .btn.tiny.dashboard-session-detail-button {
        padding-inline: 10px;
    }

    .dashboard-session-detail-chevron {
        display: none;
    }

    .dashboard-session-dialog {
        width: calc(100vw - 16px);
        max-height: calc(100dvh - 16px);
        border-radius: 14px;
    }

    .dashboard-session-dialog-card {
        max-height: calc(100dvh - 16px);
    }

    .dashboard-session-dialog-card > header {
        gap: 12px;
        padding: 14px 12px 12px;
    }

    .dashboard-session-dialog-card > header h2 {
        font-size: 18px;
    }

    .dashboard-session-dialog-body {
        padding: 10px;
    }

    .dashboard-session-dialog-card > footer {
        padding: 8px 10px;
    }

    .dashboard-session-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .dashboard-session-statuses {
        max-width: none;
        justify-content: flex-start;
    }

    .dashboard-session-statuses small {
        text-align: start;
    }
}

/* Staff mobile navigation drawer */
@media screen {
    .menu-button,
    .sidebar-backdrop,
    .sidebar-close {
        display: none;
    }

    @media (max-width: 900px) {
        .menu-button {
            display: inline-grid;
        }

        body:not(.login-bg):not(.exam-body):not(.tka-bg) .sidebar[data-mobile-sidebar] {
            position: fixed;
            z-index: 1100;
            inset: 0 auto 0 0;
            display: flex;
            width: min(86vw, 300px);
            min-width: 0;
            height: 100vh;
            height: 100dvh;
            max-height: 100vh;
            max-height: 100dvh;
            overflow-y: auto;
            overscroll-behavior: contain;
            visibility: hidden;
            pointer-events: none;
            transform: translateX(-105%);
            transition: transform .22s ease, visibility 0s linear .22s;
        }

        body.sidebar-open:not(.login-bg):not(.exam-body):not(.tka-bg) .sidebar[data-mobile-sidebar] {
            visibility: visible;
            pointer-events: auto;
            transform: translateX(0);
            transition-delay: 0s;
        }

        .sidebar-backdrop {
            position: fixed;
            z-index: 1090;
            inset: 0;
            display: block;
            visibility: hidden;
            background: rgba(5, 22, 43, .52);
            opacity: 0;
            pointer-events: none;
            transition: opacity .22s ease, visibility .22s ease;
        }

        body.sidebar-open .sidebar-backdrop {
            visibility: visible;
            opacity: 1;
            pointer-events: auto;
        }

        .sidebar-close {
            width: 34px;
            height: 34px;
            margin-left: auto;
            flex: 0 0 34px;
            border: 1px solid rgba(255, 255, 255, .18);
            border-radius: 8px;
            display: inline-grid;
            place-items: center;
            background: rgba(255, 255, 255, .1);
            color: #fff;
            font-size: 24px;
            line-height: 1;
            cursor: pointer;
        }

        .menu-button:focus-visible,
        .sidebar-close:focus-visible {
            outline: 3px solid #fbbf24;
            outline-offset: 2px;
        }

        body.sidebar-open {
            overflow: hidden;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        body:not(.login-bg):not(.exam-body):not(.tka-bg) .sidebar[data-mobile-sidebar],
        .sidebar-backdrop,
        .dashboard-session-district,
        .dashboard-session-detail-button,
        .dashboard-session-detail-chevron {
            transition: none;
        }
    }

    .toast.success {
        animation: none !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

@media screen and (max-width: 1320px) and (min-width: 901px) {
    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }
}

.filter-form.list-filter-form {
    grid-template-columns: minmax(240px, 1.5fr) repeat(2, minmax(150px, 1fr)) auto;
}

.list-filter-form .filter-actions {
    align-self: end;
    white-space: nowrap;
}

@media screen and (max-width: 900px) {
    .filter-form.list-filter-form {
        grid-template-columns: 1fr;
    }

    .list-filter-form .filter-actions {
        white-space: normal;
    }
}

/* ==========================================================================
   ✨ State-of-the-Art Visual Refinement & Ultra-Elegant CBT Design System
   ========================================================================== */

@media screen {
    :root {
        --font-body: var(--font);
        --font-heading: var(--font);
        --bg: #f4f7fb;
        --panel: #ffffff;
        --line: #e2e8f0;
        --line-soft: #edf2f7;
        --text: #0f172a;
        --muted: #475569;
        --primary: #2563eb;
        --primary-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
        --primary-soft: #eff6ff;
        --primary-border: #bfdbfe;
        --success: #10b981;
        --success-soft: #ecfdf5;
        --success-border: #a7f3d0;
        --warning: #f59e0b;
        --warning-soft: #fffbeb;
        --warning-border: #fde68a;
        --danger: #ef4444;
        --danger-soft: #fef2f2;
        --danger-border: #fecaca;
        --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.03);
        --shadow-md: 0 6px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
        --shadow-lg: 0 16px 36px -4px rgba(15, 23, 42, 0.08), 0 6px 14px -2px rgba(15, 23, 42, 0.04);
        --glass-bg: rgba(255, 255, 255, 0.92);
        --glass-border: rgba(255, 255, 255, 0.8);
        --radius: 16px;
    }

    html {
        font-size: 14px;
    }

    body {
        font-family: var(--font-body);
        color: var(--text);
        font-size: 16px;
        line-height: 1.5;
        letter-spacing: -0.01em;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    h1, h2, h3, h4, h5, h6, .topbar h1, .auth-hero h1, .auth-card h2, .tka-start-card h1 {
        font-family: var(--font-heading);
        letter-spacing: -0.02em;
    }

    /* Proportional Headings */
    h1, .topbar h1, .page-head h2, .page-head h1 {
        font-size: 20px;
        font-weight: 700;
        letter-spacing: -0.015em;
        color: #0f172a;
    }

    .page-head p, .content-title p {
        font-size: 13px;
        font-weight: 400;
        color: #475569;
        margin-top: 2px;
    }

    /* Glassmorphism Cards & Panels */
    .panel, .stat-card, .tka-start-card, .session-card, .userbox, .page-head {
        background: var(--glass-bg);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid var(--glass-border);
        box-shadow: var(--shadow-md);
        border-radius: 14px;
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease;
    }

    .panel:hover, .stat-card:hover, .session-card:hover {
        box-shadow: var(--shadow-lg);
    }

    /* Sleek Proportional Navigation Sidebar */
    .sidebar {
        width: clamp(230px, 13vw, 270px);
        min-width: clamp(230px, 13vw, 270px);
        padding: 16px 14px;
        background: linear-gradient(185deg, #0f172a 0%, #1e293b 60%, #0f172a 100%);
        border-right: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 12px 0 32px rgba(15, 23, 42, 0.15);
    }

    .side-brand {
        padding: 10px 12px 14px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .side-brand b {
        font-family: var(--font-heading);
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 0.01em;
    }

    .side-brand span {
        font-size: 12px;
        color: rgba(255, 255, 255, 0.75) !important;
        margin-top: 2px;
    }

    .sidebar nav a {
        padding: 8px 12px;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 500;
        color: rgba(226, 232, 240, 0.85);
        gap: 10px;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar nav a span {
        width: 24px;
        height: 24px;
        font-size: 14px;
        background: rgba(255, 255, 255, 0.08);
        border-radius: 6px;
        color: #93c5fd;
        transition: all 0.2s ease;
    }

    .sidebar nav a:hover {
        background: rgba(255, 255, 255, 0.12);
        color: #ffffff;
        transform: translateX(3px);
    }

    .sidebar nav a.active {
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(29, 78, 216, 0.95));
        color: #ffffff;
        font-weight: 600;
        box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    }

    .sidebar nav a.active span {
        background: #ffffff;
        color: #1d4ed8;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }

    .side-account, .userbox {
        position: relative;
        cursor: pointer;
        user-select: none;
        transition: background 0.2s ease, border-color 0.2s ease;
    }

    .side-account:hover, .userbox:hover {
        background: rgba(255, 255, 255, 0.12) !important;
    }

    .side-account b {
        font-size: 14px;
    }

    .side-account span {
        font-size: 12px;
        color: rgba(255, 255, 255, 0.75) !important;
    }

    /* Topbar Proportional Scaling */
    .topbar-left span {
        font-size: 14px;
        font-weight: 500;
    }

    .topbar-date {
        font-size: 13px;
        font-weight: 500;
    }

    .userbox b {
        font-size: 14px;
        font-weight: 600;
    }

    .userbox span {
        font-size: 12px;
        color: var(--muted) !important;
    }

    /* Interactive User Profile Dropdown Popover */
    .user-menu-popover {
        display: none;
        position: absolute;
        bottom: calc(100% + 12px);
        left: 0;
        width: 210px;
        background: #ffffff;
        border: 1px solid #cbd5e1;
        border-radius: 12px;
        box-shadow: 0 12px 32px rgba(15, 23, 42, 0.22);
        padding: 10px;
        z-index: 200;
        color: #0f172a;
        animation: popoverFadeIn 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Sidebar Specific Dark Navy Profile Popover */
    .side-account .user-menu-popover {
        background: #1e293b !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45) !important;
        color: #ffffff !important;
    }

    .side-account .user-menu-header {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    .side-account .user-menu-header b {
        color: #ffffff !important;
        font-size: 14px !important;
    }

    .side-account .user-menu-header span {
        color: #475569 !important;
        font-size: 12px !important;
    }

    .side-account .user-menu-profile {
        color: #bfdbfe !important;
        background: rgba(59, 130, 246, 0.15) !important;
        border-color: rgba(96, 165, 250, 0.35) !important;
    }

    .side-account .user-menu-profile:hover {
        color: #ffffff !important;
        background: rgba(59, 130, 246, 0.3) !important;
        border-color: #60a5fa !important;
    }

    .side-account .user-menu-logout {
        background: rgba(239, 68, 68, 0.15) !important;
        border: 1px solid rgba(239, 68, 68, 0.35) !important;
        color: #fca5a5 !important;
    }

    .side-account .user-menu-logout:hover {
        background: rgba(239, 68, 68, 0.3) !important;
        border-color: #ef4444 !important;
        color: #ffffff !important;
        transform: translateY(-1px);
    }

    .userbox .user-menu-popover.topbar-popover {
        bottom: auto;
        top: calc(100% + 12px);
        right: 0;
        left: auto;
    }

    [aria-expanded="true"] > .user-menu-popover {
        display: block !important;
    }

    @keyframes popoverFadeIn {
        from { opacity: 0; transform: translateY(6px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .user-menu-header {
        padding: 8px 10px;
        border-bottom: 1px solid #f1f5f9;
        margin-bottom: 8px;
        text-align: left;
    }

    .user-menu-header b {
        display: block;
        font-size: 14px;
        font-weight: 700;
        color: #0f172a;
    }

    .user-menu-header span {
        display: block;
        font-size: 12px;
        color: #475569;
        margin-top: 2px;
    }

    .user-menu-profile {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        margin-bottom: 6px;
        padding: 8px 12px;
        color: #1d4ed8;
        font-family: var(--font-body);
        font-size: 13px;
        font-weight: 700;
        border: 1px solid #bfdbfe;
        border-radius: 8px;
        background: #eff6ff;
        transition: all 0.2s ease;
    }

    .user-menu-profile:hover {
        color: #1e40af;
        border-color: #93c5fd;
        background: #dbeafe;
        transform: translateY(-1px);
    }

    .user-menu-logout {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        padding: 8px 12px;
        font-family: var(--font-body);
        font-size: 13px;
        font-weight: 700;
        color: #ef4444;
        background: #fef2f2;
        border: 1px solid #fecaca;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .user-menu-logout:hover {
        background: #fee2e2;
        border-color: #fca5a5;
        color: #dc2626;
        transform: translateY(-1px);
    }



    /* Polished Proportional Stat Cards */
    .stat-card {
        padding: 16px 18px;
        border-radius: 14px;
        gap: 12px;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        background: var(--primary-soft);
        color: var(--primary);
        font-size: 18px;
        box-shadow: inset 0 0 0 1px var(--primary-border);
    }

    .stats-grid > div:nth-child(1) .stat-icon {
        background: #eff6ff; color: #2563eb; box-shadow: inset 0 0 0 1px #bfdbfe;
    }
    .stats-grid > div:nth-child(2) .stat-icon {
        background: #ecfdf5; color: #059669; box-shadow: inset 0 0 0 1px #a7f3d0;
    }
    .stats-grid > div:nth-child(3) .stat-icon {
        background: #faf5ff; color: #9333ea; box-shadow: inset 0 0 0 1px #e9d5ff;
    }
    .stats-grid > div:nth-child(4) .stat-icon {
        background: #fffbeb; color: #d97706; box-shadow: inset 0 0 0 1px #fde68a;
    }

    .stat-card span,
    .stat-card em {
        font-size: 13px !important;
        color: #475569 !important;
        font-weight: 500;
    }

    .stat-card strong {
        font-family: var(--font-heading);
        font-size: 28px;
        font-weight: 700;
        margin-top: 2px;
    }

    /* Dashboard Execution Summary & Bar Chart */
    .dashboard-main-grid {
        display: grid;
        grid-template-columns: 1.6fr 1fr;
        gap: 20px;
        margin-bottom: 24px;
    }

    .panel-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 14px;
    }

    .live-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        font-weight: 700;
        color: #059669;
        background: #ecfdf5;
        border: 1px solid #a7f3d0;
        padding: 3px 10px;
        border-radius: 20px;
    }

    .execution-grid {
        display: grid;
        grid-template-columns: 1fr 1.15fr;
        gap: 16px;
        align-items: stretch;
    }

    .mini-card {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 14px;
        border-radius: 12px;
        border: 1px solid #e2e8f0;
        background: #f8fafc;
        transition: all 0.2s ease;
    }

    .mini-card:hover {
        border-color: #cbd5e1;
        background: #ffffff;
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    }

    .mini-card .mini-icon {
        width: 34px;
        height: 34px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 15px;
        font-weight: 700;
        flex: 0 0 34px;
    }

    .status-ok .mini-icon { background: #ecfdf5; color: #059669; }
    .status-active .mini-icon { background: #eff6ff; color: #2563eb; }
    .status-done .mini-icon { background: #fffbeb; color: #d97706; }

    .mini-card span { display: block; font-size: 12px; font-weight: 600; color: #475569; }
    .mini-card b { display: block; font-size: 14px; font-weight: 700; color: #0f172a; margin: 2px 0; }
    .mini-card em { display: block; font-size: 12px; color: #475569; font-style: normal; }

    /* Progress Bar Chart Column */
    .execution-chart {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 14px 16px;
        display: flex;
        flex-direction: column;
    }

    .execution-chart h4 {
        font-family: var(--font-heading);
        font-size: 13px;
        font-weight: 700;
        color: #0f172a;
        margin: 0 0 12px 0;
    }

    .chart-progress-bars {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 12px;
    }

    .bar-group {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .bar-info {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 12px;
        font-weight: 600;
    }

    .bar-info span { color: #475569; }
    .bar-info b { color: #0f172a; }

    .bar-track {
        height: 8px;
        background: #e2e8f0;
        border-radius: 6px;
        overflow: hidden;
        width: 100%;
    }

    .bar-fill {
        height: 100%;
        border-radius: 6px;
        transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .bar-fill.finished { background: linear-gradient(90deg, #f59e0b, #d97706); }
    .bar-fill.working { background: linear-gradient(90deg, #2563eb, #1d4ed8); }
    .bar-fill.pending { background: linear-gradient(90deg, #10b981, #059669); }

    /* Real-time System Metrics Panel */
    .system-metrics-panel {
        margin-bottom: 24px;
    }

    .server-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        font-weight: 700;
        color: #2563eb;
        background: #eff6ff;
        border: 1px solid #bfdbfe;
        padding: 3px 10px;
        border-radius: 20px;
    }

    .metrics-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
        margin-top: 10px;
    }

    .metric-box {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 14px 16px;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .metric-header {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .metric-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        flex: 0 0 36px;
    }

    .metric-icon.cpu { background: #eff6ff; color: #2563eb; }
    .metric-icon.ram { background: #faf5ff; color: #9333ea; }
    .metric-icon.storage { background: #ecfdf5; color: #059669; }

    .metric-header b {
        display: block;
        font-size: 13px;
        font-weight: 700;
        color: #0f172a;
    }

    .metric-header span {
        display: block;
        font-size: 12px;
        font-weight: 600;
        color: #475569;
        margin-top: 2px;
    }

    .metric-bar-track {
        height: 8px;
        background: #e2e8f0;
        border-radius: 6px;
        overflow: hidden;
        width: 100%;
    }

    .metric-bar-fill {
        height: 100%;
        border-radius: 6px;
        transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .metric-bar-fill.cpu { background: linear-gradient(90deg, #2563eb, #1d4ed8); }
    .metric-bar-fill.ram { background: linear-gradient(90deg, #a855f7, #7e22ce); }
    .metric-bar-fill.storage { background: linear-gradient(90deg, #10b981, #047857); }



    .stat-card a, .stat-card .btn-link {
        font-size: 13px;
        font-weight: 600;
    }

    /* Panel & Recap Box Typography */
    .panel-title h3 {
        font-size: 16px;
        font-weight: 600;
    }

    .recap-box {
        padding: 14px 16px;
    }

    .recap-box h4, .recap-box b {
        font-size: 14px;
        font-weight: 600;
    }

    .recap-box span, .recap-box p {
        font-size: 13px;
        color: #475569;
        font-weight: 400;
    }

    /* Tables & Data Lists */
    .table-wrap {
        border-radius: 12px;
        border: 1px solid #e2e8f0;
        box-shadow: var(--shadow-sm);
    }

    th {
        font-family: var(--font-heading);
        font-size: 12px !important;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #475569;
        background: #f8fafc;
        padding: 10px 14px;
    }

    td {
        padding: 10px 14px;
        border-bottom: 1px solid #f1f5f9;
        font-size: 13px;
        font-weight: 400;
    }

    table tbody tr:hover td {
        background: #f8fafc;
    }

    /* Standard Professional Buttons */
    .badge {
        font-family: var(--font-body);
        font-weight: 600;
        font-size: 12px !important;
        padding: 3px 10px;
        border-radius: 9999px;
    }

    .badge.primary { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
    .badge.success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
    .badge.warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
    .badge.danger  { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

    .btn {
        font-family: var(--font-body);
        font-weight: 600;
        font-size: 13px;
        padding: 7px 14px;
        border-radius: 8px;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        letter-spacing: -0.01em;
    }

    /* Compact Proportional Table Action Buttons */
    td .btn,
    td button,
    td a.btn,
    .table-wrap .btn,
    .table-actions .btn,
    .actions-cell .btn,
    td form .btn {
        padding: 4px 10px !important;
        height: 28px !important;
        min-height: 28px !important;
        max-height: 28px !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        border-radius: 6px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        box-shadow: none !important;
    }

    /* Student Form Action Button Spacing */
    .student-form-actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        margin-top: 18px !important;
        width: 100% !important;
    }

    /* Responsive Multi-Field Filter Bar */

    .filter-form.list-filter-form {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: flex-end !important;
        gap: 12px 14px !important;
        margin-bottom: 16px !important;
        background: #f8fafc;
        padding: 12px 16px;
        border-radius: 12px;
        border: 1px solid #e2e8f0;
    }

    .filter-form.list-filter-form label {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        color: #475569 !important;
        min-width: 140px;
        flex: 1 1 auto;
    }

    .filter-form.list-filter-form input,
    .filter-form.list-filter-form select {
        height: 34px !important;
        padding: 4px 10px !important;
        font-size: 13px !important;
        border-radius: 8px !important;
        border: 1px solid #cbd5e1 !important;
        background: #ffffff !important;
    }

    .filter-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-left: auto;
        padding-top: 4px;
    }

    .btn.primary {
        background: var(--primary-gradient);
        color: #ffffff;
        box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
    }


    .btn.primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
        filter: brightness(1.05);
    }

    .btn.ghost {
        background: #eff6ff;
        color: #2563eb;
        border: 1px solid #bfdbfe;
    }

    .btn.ghost:hover {
        background: #dbeafe;
        color: #1d4ed8;
    }

    /* Form Controls & Labels */
    label {
        font-family: var(--font-body);
        font-size: 13px;
        font-weight: 600;
        color: #475569;
    }

    input, select, textarea {
        font-family: var(--font-body);
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        padding: 6px 11px;
        height: 38px;
        background: #ffffff;
        transition: all 0.2s ease;
        font-size: 13px;
        font-weight: 400;
    }

    input:focus, select:focus, textarea:focus {
        border-color: var(--primary);
        background: #ffffff;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    }


    input:focus, select:focus, textarea:focus {
        border-color: var(--primary);
        background: #ffffff;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    }

    /* Login & Auth Screen Glassmorphism */
    .login-bg {
        background: radial-gradient(circle at 50% 0%, #1e3a8a 0%, #0f172a 70%);
    }

    .auth-wrap:before {
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(30, 58, 138, 0.4) 100%);
    }

    .auth-card {
        background: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: 1px solid rgba(255, 255, 255, 0.8);
        border-radius: 24px;
        box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.3);
        padding: clamp(30px, 2vw + 20px, 44px) clamp(32px, 2vw + 24px, 48px);
    }

    .auth-card h2 {
        font-size: 24px;
        font-weight: 800;
        color: #0f172a;
    }

    .auth-card p {
        font-size: 14px;
    }

    /* CBT Student Exam Layout Polish */
    .exam-header {
        background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }

    .timer {
        background: rgba(37, 99, 235, 0.25);
        border: 1px solid rgba(147, 197, 253, 0.3);
        color: #ffffff;
        border-radius: 12px;
        padding: 8px 14px;
        font-family: var(--font-heading);
        font-size: 15px;
        font-weight: 700;
        letter-spacing: 0.04em;
    }

    .autosave {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 12px;
        padding: 7px 12px;
        font-size: 12px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

    .autosave::before {
        content: "";
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #10b981;
        box-shadow: 0 0 8px #10b981;
        display: inline-block;
        animation: pulse-dot 2s infinite;
    }

    @keyframes pulse-dot {
        0%, 100% { transform: scale(1); opacity: 1; }
        50% { transform: scale(1.3); opacity: 0.6; }
    }

    .answers .answer-card {
        border: 1.5px solid #e2e8f0;
        border-radius: 14px;
        padding: 14px 18px;
        background: #ffffff;
        box-shadow: var(--shadow-sm);
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        font-size: 14px;
    }

    .answers .answer-card:hover {
        border-color: var(--primary);
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

    .answers .answer-card:has(input:checked) {
        border-color: var(--primary);
        background: #eff6ff;
        box-shadow: 0 0 0 1px var(--primary);
    }

    .op-label {
        font-family: var(--font-heading);
        font-weight: 800;
        font-size: 14px;
        border-radius: 8px;
        background: #e0e7ff;
        color: #3730a3;
    }

    /* Number Grid Navigation Pills */
    .num {
        border-radius: 10px;
        font-family: var(--font-heading);
        font-weight: 700;
        font-size: 14px;
        transition: all 0.2s ease;
        border: 1px solid #cbd5e1;
    }

    .num.active {
        background: var(--primary-gradient);
        color: #ffffff;
        border-color: var(--primary);
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    }

    .num.answered {
        background: #ecfdf5;
        color: #047857;
        border-color: #a7f3d0;
    }

    .num.doubt {
        background: #fffbeb;
        color: #b45309;
        border-color: #fde68a;
    }

    /* Score Circle Gradient Glow */
    .score-circle {
        font-family: var(--font-heading);
        background: linear-gradient(135deg, #2563eb 0%, #10b981 100%);
        box-shadow: 0 16px 40px rgba(37, 99, 235, 0.3);
    }

    /* Floating Static Footer at Bottom Right Corner */
    .footer {
        position: fixed;
        bottom: 16px;
        right: 24px;
        z-index: 20;
        margin: 0;
        font-size: 12px;
        color: #475569;
        font-weight: 600;
        background: rgba(255, 255, 255, 0.88);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 6px 14px;
        border-radius: 9999px;
        border: 1px solid rgba(226, 232, 240, 0.8);
        box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
        pointer-events: none;
    }

    /* Polished Inline File Upload Form */
    .inline-upload {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: rgba(241, 245, 249, 0.8);
        border: 1px dashed #cbd5e1;
        border-radius: 12px;
        padding: 3px 6px 3px 12px;
        transition: all 0.2s ease;
    }

    .inline-upload:hover {
        background: #eff6ff;
        border-color: #93c5fd;
    }

    .inline-upload input[type="file"] {
        font-size: 13px;
        border: 0;
        background: transparent;
        padding: 0;
        box-shadow: none;
        cursor: pointer;
        max-width: 220px;
        color: #475569;
    }

    .inline-upload input[type="file"]::file-selector-button,
    .inline-upload input[type="file"]::-webkit-file-upload-button {
        font-family: var(--font-body);
        font-size: 12px;
        font-weight: 700;
        color: var(--primary);
        background: #ffffff;
        border: 1px solid var(--primary-border);
        border-radius: 8px;
        padding: 5px 10px;
        margin-right: 8px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .inline-upload input[type="file"]::file-selector-button:hover,
    .inline-upload input[type="file"]::-webkit-file-upload-button:hover {
        background: var(--primary-soft);
        border-color: var(--primary);
    }

    /* Proportional List Filter Form (Flexbox Layout to adapt to variable inputs) */
    .filter-form.list-filter-form {
        display: flex;
        flex-wrap: wrap;
        gap: 14px;
        align-items: flex-end;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        padding: 14px 16px;
        margin-bottom: 16px;
    }

    .filter-form.list-filter-form label {
        flex: 1 1 240px;
        min-width: 200px;
        max-width: 360px;
        font-size: 13px;
        font-weight: 700;
        color: #334155;
        gap: 6px;
    }

    .filter-form.list-filter-form input,
    .filter-form.list-filter-form select {
        width: 100%;
        height: 40px;
        font-size: 14px;
        background: #ffffff;
        border: 1px solid #cbd5e1;
        border-radius: 10px;
    }

    .filter-form.list-filter-form .filter-actions {
        flex: 0 0 auto;
        display: flex;
        gap: 8px;
        align-items: center;
        height: 40px;
    }

    /* Universal Proportional Table System for All Admin & Proktor Pages */
    .table-wrap {
        width: 100%;
        overflow-x: auto;
        border-radius: 14px;
        border: 1px solid #e2e8f0;
        box-shadow: var(--shadow-sm);
        background: #ffffff;
    }

    .table-wrap table {
        width: 100%;
        border-collapse: collapse;
        table-layout: auto;
    }

    .table-wrap th {
        font-family: var(--font-heading);
        font-size: 12px !important;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #475569;
        background: #f8fafc;
        padding: 13px 18px;
        border-bottom: 2px solid #e2e8f0;
        white-space: nowrap;
        text-align: left;
    }

    .table-wrap td {
        padding: 13px 18px;
        border-bottom: 1px solid #f1f5f9;
        font-size: 14px;
        color: #1e293b;
        vertical-align: middle;
        white-space: normal;
        line-height: 1.45;
    }

    .table-wrap table tbody tr:hover td {
        background: #f8fafc;
    }

    /* Primary Data Columns (Names, Codes, IDs) */
    .table-wrap td b,
    .table-wrap td strong {
        color: #0f172a;
        font-weight: 700;
    }

    .table-wrap td small {
        display: block;
        font-size: 12px;
        color: #475569;
        margin-top: 2px;
        font-weight: 500;
    }

    .table-wrap td:first-child {
        font-weight: 700;
        color: #0f172a;
        font-family: var(--font-heading);
        letter-spacing: 0.01em;
        min-width: 140px;
    }

    /* Actions Column Right-Alignment & Compact Fit */
    .table-wrap th.actions-column,
    .table-wrap td.row-actions {
        text-align: right;
        width: 1%;
        min-width: 220px;
        white-space: nowrap;
    }

    .row-actions,
    .monitor-row-actions {
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        white-space: nowrap;
    }

    .btn.tiny {
        padding: 6px 12px;
        font-size: 12px;
        font-weight: 700;
        border-radius: 8px;
        letter-spacing: -0.01em;
    }

    .bulk-delete-form {
        display: inline-flex;
    }

    .table-wrap th.bulk-select-column,
    .table-wrap td.bulk-select-column {
        width: 44px;
        min-width: 44px;
        padding-left: 12px;
        padding-right: 8px;
        text-align: center;
        font-family: inherit;
    }

    .bulk-select-column input {
        width: 17px;
        height: 17px;
        accent-color: var(--primary);
        cursor: pointer;
    }

    /* Empty Table Cell State */
    .table-wrap td.empty {
        text-align: center !important;
        padding: 40px 16px !important;
        color: #475569;
        font-size: 14px;
        font-style: italic;
        background: #fafafa;
    }

    @media (max-width: 900px) {
        .footer {
            position: static;
            display: block;
            text-align: center;
            background: transparent;
            border: 0;
            box-shadow: none;
            margin-top: 24px;
            padding: 0;
        }

        .filter-form.list-filter-form label {
            max-width: 100%;
        }
    }

    /* Standardized Enterprise Form Layout System */
    .form-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px 20px;
        align-items: start;
    }

    .form-grid .span-2 {
        grid-column: span 2;
    }

    .form {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .panel.narrow {
        max-width: 580px;
        margin: 0 auto;
    }

    .form-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
        margin-top: 12px;
        padding-top: 16px;
        border-top: 1px solid #e2e8f0;
    }

    label.checkbox {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
        font-weight: 500;
        color: #1e293b;
        cursor: pointer;
        user-select: none;
    }

    label.checkbox input[type="checkbox"] {
        width: 17px;
        height: 17px;
        border-radius: 4px;
        accent-color: #2563eb;
        cursor: pointer;
    }

    /* Fieldsets & Option Editors */
    fieldset {
        border: 1px solid #cbd5e1;
        border-radius: 10px;
        padding: 16px 18px;
        margin: 8px 0;
        background: #f8fafc;
    }

    legend {
        font-family: var(--font-heading);
        font-size: 13px;
        font-weight: 700;
        color: #1e293b;
        padding: 2px 8px;
        background: #ffffff;
        border-radius: 6px;
        border: 1px solid #cbd5e1;
    }

    .option-edit {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 14px;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        margin-bottom: 12px;
    }

    .option-edit > span {
        font-family: var(--font-heading);
        font-weight: 700;
        font-size: 14px;
        color: #2563eb;
    }

    textarea {
        font-family: var(--font-body);
        font-size: 13px;
        line-height: 1.5;
        padding: 8px 12px;
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        background: #ffffff;
        resize: vertical;
    }

    textarea:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    }

    /* Review Cards */
    .review-card {
        padding: 18px 20px;
        margin-bottom: 16px;
        border-radius: 14px;
    }

    .review-card h3 {
        font-size: 15px;
        font-weight: 600;
        color: #0f172a;
        margin: 10px 0 14px;
        line-height: 1.5;
    }

    .review-actions {
        display: flex;
        gap: 10px;
        align-items: center;
        flex-wrap: wrap;
    }

    .review-actions textarea {
        flex: 1 1 280px;
    }
}


/* ==========================================================================
   🖨️ Ultra-Clean Professional Print & PDF Export Stylesheet
   ========================================================================== */

@media print {
    /* Page setup for clean A4 printing */
    @page {
        size: A4 portrait;
        margin: 10mm 8mm 10mm 8mm;
    }

    /* Force background graphics & crisp borders */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /* Hide non-printable web elements */
    header,
    nav,
    aside,
    footer,
    .sidebar,
    .topbar,
    .no-print,
    .footer,
    .page-head.no-print,
    .actions,
    .btn,
    .side-brand,
    .userbox {
        display: none !important;
        height: 0 !important;
        width: 0 !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }

    /* Reset layout containers & remove scrollbars completely */
    html,
    body,
    main,
    .app-wrap,
    .content-area,
    .page-content,
    .table-wrap,
    .panel,
    .card-sheet {
        background: #ffffff !important;
        color: #000000 !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        border: 0 !important;
        box-shadow: none !important;
        overflow: visible !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }

    ::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }

    /* 8 Student Cards per A4 Page Grid (2 columns x 4 rows) */
    .card-sheet,
    .credential-card-sheet {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 5mm 6mm !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }

    .login-card,
    .credential-card {
        border: 1px solid #1e293b !important;
        border-radius: 10px !important;
        padding: 10px 14px !important;
        background: #ffffff !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        box-sizing: border-box !important;
        font-size: 12px !important;
    }

    .credential-card-brand {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        border-bottom: 1.5px solid #0f172a !important;
        padding-bottom: 6px !important;
        margin-bottom: 8px !important;
    }

    .credential-card-brand img {
        width: 32px !important;
        height: 32px !important;
        object-fit: contain !important;
    }

    .credential-card-brand small {
        font-size: 12px !important;
        font-weight: 800 !important;
        color: #2563eb !important;
        text-transform: uppercase !important;
        letter-spacing: 0.05em !important;
        display: block !important;
    }

    .credential-card-brand b {
        font-size: 12px !important;
        font-weight: 800 !important;
        color: #0f172a !important;
        display: block !important;
    }

    .credential-card-brand span {
        font-size: 12px !important;
        color: #475569 !important;
        display: block !important;
    }

    .credential-card-data {
        display: grid !important;
        grid-template-columns: 85px 1fr !important;
        row-gap: 3px !important;
        column-gap: 6px !important;
        margin: 0 !important;
        font-size: 12px !important;
    }

    .credential-card-data dt {
        color: #475569 !important;
        font-weight: 600 !important;
    }

    .credential-card-data dd {
        margin: 0 !important;
        font-weight: 700 !important;
        color: #0f172a !important;
    }

    .credential-card-data dd.credential-code {
        font-family: var(--font) !important;
        font-size: 12px !important;
        letter-spacing: 0.05em !important;
        color: #1d4ed8 !important;
    }

    /* Print Document Sheets (Daftar Hadir & Berita Acara) */
    .print-document,
    .formal-sheet {
        padding: 0 !important;
        margin: 0 0 15mm 0 !important;
        border: 0 !important;
        box-shadow: none !important;
        page-break-after: always !important;
        break-after: page !important;
    }

    .print-table {
        width: 100% !important;
        border-collapse: collapse !important;
        margin-top: 10px !important;
    }

    .print-table th,
    .print-table td {
        border: 1px solid #000000 !important;
        padding: 6px 10px !important;
        font-size: 12px !important;
    }

    .print-table th {
        background: #f1f5f9 !important;
        font-weight: 800 !important;
    }
}

/* Universal Compact Mobile Filter Bar Fix for ALL Menus (Admin, Proktor, Tim Soal) */
@media screen and (max-width: 900px) {
    body .filter-form,
    body form.filter-form,
    body .list-filter-form,
    body .session-filter,
    body .question-filter,
    body .report-filter {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        align-items: stretch !important;
        align-content: flex-start !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        padding: 12px 14px !important;
        margin: 10px 0 14px !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }

    body .filter-form label,
    body form.filter-form label,
    body .list-filter-form label {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        color: #475569 !important;
    }

    body .filter-form input,
    body .filter-form select,
    body form.filter-form input,
    body form.filter-form select {
        height: 36px !important;
        min-height: 36px !important;
        max-height: 36px !important;
        padding: 6px 10px !important;
        font-size: 13px !important;
        border-radius: 8px !important;
        border: 1px solid #cbd5e1 !important;
        background: #ffffff !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    body .filter-form .filter-actions,
    body form.filter-form .filter-actions {
        margin-left: 0 !important;
        margin-top: 4px !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 8px !important;
    }

    body .filter-form .filter-actions .btn,
    body form.filter-form .filter-actions .btn {
        height: 38px !important;
        min-height: 38px !important;
        padding: 0 14px !important;
        font-size: 13px !important;
    }

    body .report-filter-hierarchy,
    body .report-filter-refinements {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 10px !important;
        width: 100% !important;
    }

    body .report-filter-refinements .filter-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        margin-inline-start: 0 !important;
    }

    body .report-filter-refinements .filter-actions .btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* Peringatan keamanan saat halaman ujian kehilangan fokus */
.exam-security-backdrop {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(31, 9, 9, .82);
    backdrop-filter: blur(5px);
}

.exam-security-backdrop[hidden] {
    display: none;
}

.exam-security-dialog {
    width: min(520px, 100%);
    padding: 28px;
    border: 3px solid #ef4444;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(127, 29, 29, .45);
    color: #341313;
    text-align: center;
}

.exam-security-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #dc2626;
    color: #fff;
    font-size: 28px;
    font-weight: 900;
    animation: security-warning-pulse .8s ease-in-out infinite alternate;
}

.exam-security-dialog h2 {
    margin: 0 0 9px;
    color: #b91c1c;
    font-size: 24px;
}

.exam-security-dialog p {
    margin: 0;
    color: #5f2626;
    font-size: 15px;
    line-height: 1.55;
}

.exam-security-dialog small {
    display: block;
    margin-top: 14px;
    color: #7f1d1d;
    font-size: 12px;
    line-height: 1.5;
}

.exam-security-countdown {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin: 18px 0 4px;
    color: #b91c1c;
}

.exam-security-countdown strong {
    min-width: 58px;
    font-size: 28px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.exam-security-countdown span {
    font-size: 14px;
    font-weight: 700;
}

.security-activity {
    display: block;
    margin-top: 4px;
    color: #b42318;
    font-weight: 700;
}

@keyframes security-warning-pulse {
    from {
        transform: scale(.94);
        box-shadow: 0 0 0 0 rgba(220, 38, 38, .35);
    }
    to {
        transform: scale(1);
        box-shadow: 0 0 0 12px rgba(220, 38, 38, 0);
    }
}

@media (max-width: 600px) {
    .exam-security-dialog {
        padding: 22px 17px;
    }

    .exam-security-dialog h2 {
        font-size: 20px;
    }

    .exam-security-countdown strong {
        font-size: 28px;
    }
}

/* Mobile exam viewport lock: keep controls visible and scroll only the question. */
@media screen and (max-width: 900px) {
    body.exam-body {
        width: 100%;
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 0 !important;
        overflow: hidden !important;
        overscroll-behavior: none;
    }

    body.exam-body .exam-layout {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: auto minmax(0, 1fr) auto !important;
        grid-template-areas:
            "head"
            "question"
            "foot" !important;
        width: 100%;
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 0 !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        overflow: hidden !important;
    }

    body.exam-body .exam-header {
        position: relative;
        z-index: 1100;
        grid-area: head;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto auto;
        grid-template-areas:
            "brand numbers font"
            "student student student"
            "timer timer status";
        align-items: center !important;
        gap: 6px 8px !important;
        width: 100%;
        height: auto !important;
        min-height: 0 !important;
        padding: 7px 9px !important;
        flex: none !important;
    }

    body.exam-body .exam-header .side-brand {
        grid-area: brand;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        gap: 7px;
        overflow: hidden;
    }

    body.exam-body .exam-header .brand-mark {
        width: 32px;
        height: 38px;
        flex: 0 0 32px;
    }

    body.exam-body .exam-header .side-brand > div {
        min-width: 0;
    }

    body.exam-body .exam-header .num-toggle-header-btn {
        grid-area: numbers;
        padding: 5px 8px !important;
        white-space: nowrap;
    }

    body.exam-body .exam-header .font-tools {
        grid-area: font;
        min-width: 0;
    }

    body.exam-body .exam-header .font-tools button {
        min-width: 0 !important;
        padding: 4px 7px !important;
    }

    body.exam-body .exam-header .exam-student-identity {
        grid-area: student;
        width: 100%;
        max-width: none;
        padding: 5px 8px;
    }

    body.exam-body .exam-header .timer {
        grid-area: timer;
        justify-self: start;
        padding: 4px 8px !important;
        font-size: 12px !important;
        line-height: 1.2;
    }

    body.exam-body .exam-header .autosave {
        grid-area: status;
        justify-self: end;
        padding: 4px 8px !important;
        font-size: 12px !important;
        line-height: 1.2;
    }

    body.exam-body .question-panel {
        grid-area: question;
        align-self: stretch;
        width: 100%;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 10px !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    body.exam-body .question-panel .doubt-check {
        margin-bottom: 4px !important;
    }

    body.exam-body .exam-footer {
        position: relative !important;
        z-index: 1100;
        bottom: auto !important;
        grid-area: foot;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch !important;
        gap: 5px 6px !important;
        width: 100%;
        height: auto !important;
        min-height: 0 !important;
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom)) !important;
        flex: none !important;
    }

    body.exam-body .exam-footer .btn {
        width: 100%;
        height: 36px !important;
        min-width: 0 !important;
        padding: 0 8px !important;
        margin: 0;
        font-size: 12px !important;
        line-height: 1.15;
    }

    body.exam-body .number-panel {
        top: 82px !important;
        right: 10px !important;
        bottom: calc(94px + env(safe-area-inset-bottom)) !important;
        left: 10px !important;
        width: auto !important;
        max-height: none !important;
        overflow-y: auto !important;
    }
}
/* End mobile exam viewport lock. */

/* Keep list filters compact when their desktop flex rules stack on mobile. */
@media screen and (max-width: 900px) {
    .filter-form.list-filter-form {
        height: auto !important;
        min-height: 0 !important;
        align-items: stretch !important;
    }

    .filter-form.list-filter-form > label {
        flex: 0 0 auto !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
        min-height: 0 !important;
    }

    .filter-form.list-filter-form > .filter-actions {
        flex: 0 0 auto !important;
        height: auto !important;
        min-height: 0 !important;
    }
}

/* Shared action feedback: validation failures stay on the current page. */
.action-popup {
    width: min(400px, calc(100vw - 24px));
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: transparent;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .24);
}

.action-popup::backdrop {
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(3px);
}

.action-popup-card {
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 0;
    padding: 16px;
    border: 1px solid #fecaca;
    border-radius: 14px;
    background: #fff;
}

.action-popup[data-kind="warning"] .action-popup-card {
    border-color: #fde68a;
}

.action-popup[data-kind="success"] .action-popup-card {
    border-color: #a7f3d0;
}

.action-popup-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fee2e2;
    color: #dc2626;
    font-size: 20px;
    font-weight: 800;
}

.action-popup[data-kind="warning"] .action-popup-icon {
    background: #fef3c7;
    color: #b45309;
}

.action-popup[data-kind="success"] .action-popup-icon {
    background: #d1fae5;
    color: #047857;
}

.action-popup-content {
    min-width: 0;
}

.action-popup-content h2 {
    margin: 0 0 4px;
    color: #172033;
    font-size: 16px;
    line-height: 1.25;
}

.action-popup-content p {
    margin: 0;
    color: #475569;
    font-size: 12px;
    line-height: 1.4;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.action-popup-actions {
    grid-column: 2;
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.action-popup-actions .btn {
    min-width: 76px;
    min-height: 34px;
    padding: 7px 14px;
    border-radius: 9px;
    font-size: 13px;
}

/* Bank Soal needs more rows visible without sacrificing readability. */
body:not(.login-bg):not(.exam-body):not(.tka-bg) table.dense-list-table th {
    min-height: 32px;
    padding: 6px 12px !important;
    line-height: 1.15;
}

body:not(.login-bg):not(.exam-body):not(.tka-bg) table.dense-list-table td {
    min-height: 38px;
    padding: 5px 12px !important;
    font-size: 12px;
    line-height: 1.2;
}

table.dense-list-table .btn.tiny {
    min-height: 28px;
    padding: 4px 9px;
    font-size: 12px;
}

/* Consistent, high-contrast checkboxes across staff and student pages. */
input[type="checkbox"] {
    --checkbox-accent: var(--primary, #2563eb);
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-grid !important;
    place-content: center;
    width: 18px !important;
    min-width: 18px;
    height: 18px !important;
    min-height: 18px !important;
    margin: 0;
    padding: 0 !important;
    flex: 0 0 18px;
    border: 1.5px solid #64748b !important;
    border-radius: 4px !important;
    background: #ffffff !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .12) !important;
    backdrop-filter: none;
    vertical-align: middle;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

input[type="checkbox"]::before {
    content: "";
    width: 10px;
    height: 10px;
    background: #ffffff;
    clip-path: polygon(14% 44%, 0 62%, 42% 100%, 100% 18%, 82% 0, 40% 67%);
    transform: scale(0);
    transform-origin: center;
    transition: transform .12s ease-in-out;
}

input[type="checkbox"]:hover:not(:disabled) {
    border-color: var(--checkbox-accent) !important;
}

input[type="checkbox"]:checked,
input[type="checkbox"]:indeterminate {
    border-color: var(--checkbox-accent) !important;
    background: var(--checkbox-accent) !important;
    box-shadow: 0 1px 3px rgba(37, 99, 235, .22) !important;
}

input[type="checkbox"]:checked::before {
    transform: scale(1);
}

input[type="checkbox"]:indeterminate::before {
    width: 9px;
    height: 2px;
    border-radius: 999px;
    clip-path: none;
    transform: scale(1);
}

input[type="checkbox"]:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .22);
    outline-offset: 2px;
}

input[type="checkbox"]:disabled {
    border-color: #64748b !important;
    background: #e2e8f0 !important;
    box-shadow: none !important;
    cursor: not-allowed;
    opacity: .72;
}

input[type="checkbox"]:disabled:checked {
    background: #94a3b8 !important;
}

.doubt-check input[type="checkbox"] {
    --checkbox-accent: #d97706;
}

/* Admin dashboard evaluation, kept separate for SD and SMP. */
.dashboard-evaluation-section {
    display: grid;
    gap: 14px;
    margin: 0 22px 24px;
}

.dashboard-section-heading,
.dashboard-level-heading {
    display: flex;
    align-items: center;
}

.dashboard-section-heading {
    justify-content: space-between;
    gap: 16px;
    min-height: 52px;
    padding: 11px 14px;
    border: 1px solid #dbe5f0;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 35, 60, .05);
}

.dashboard-section-heading h2 {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
}

.dashboard-report-link {
    display: inline-flex;
    min-height: 30px;
    padding: 6px 11px;
    align-items: center;
    justify-content: center;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    background: #eff6ff;
    color: #0b6fe8;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-report-link:hover {
    border-color: #93c5fd;
    background: #dbeafe;
}

.dashboard-level-block {
    display: grid;
    gap: 10px;
    padding: 0;
}

.dashboard-level-block + .dashboard-level-block {
    margin-top: 4px;
    padding-top: 16px;
    border-top: 1px solid #dbe5f0;
}

.dashboard-level-heading {
    gap: 9px;
    padding: 0 2px;
}

.dashboard-level-heading h3 {
    margin: 0;
    color: #172033;
    font-size: 15px;
}

.dashboard-level-badge {
    display: inline-grid;
    min-width: 42px;
    height: 25px;
    padding: 0 9px;
    place-items: center;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
}

.dashboard-level-block[data-dashboard-level="SMP"] .dashboard-level-badge {
    background: #d1fae5;
    color: #047857;
}

.dashboard-evaluation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-score-panel,
.dashboard-item-panel,
.dashboard-school-ranking-panel {
    min-width: 0;
    margin: 0;
}

.dashboard-evaluation-section .panel-title .panel-link {
    margin-top: 0;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 15px;
}

.dashboard-score-panel .dashboard-kpi-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dashboard-kpi-grid > div {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.dashboard-kpi-grid span,
.dashboard-kpi-grid b {
    display: block;
}

.dashboard-kpi-grid span {
    min-height: 26px;
    color: #475569;
    font-size: 12px;
    line-height: 1.2;
}

.dashboard-kpi-grid b {
    margin-top: 3px;
    color: #0f172a;
    font-size: 15px;
    font-weight: 750;
}

.dashboard-horizontal-chart {
    display: grid;
    gap: 9px;
}

.dashboard-chart-row {
    display: grid;
    grid-template-columns: 58px minmax(80px, 1fr) 30px 43px;
    gap: 8px;
    align-items: center;
    color: #475569;
    font-size: 12px;
}

.dashboard-chart-row > span {
    font-weight: 650;
}

.dashboard-chart-row > b,
.dashboard-chart-row > em {
    color: #172033;
    font-style: normal;
    text-align: right;
}

.dashboard-chart-row > b {
    font-weight: 750;
}

.dashboard-chart-row > em {
    color: #475569;
}

.dashboard-chart-track,
.dashboard-school-track {
    overflow: hidden;
    border-radius: 999px;
    background: #e8eef6;
}

.dashboard-chart-track {
    height: 9px;
}

.dashboard-chart-track i,
.dashboard-school-track i {
    display: block;
    height: 100%;
    min-width: 0;
    border-radius: inherit;
}

.dashboard-chart-track i.score {
    background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.dashboard-level-block[data-dashboard-level="SMP"] .dashboard-chart-track i.score {
    background: linear-gradient(90deg, #059669, #34d399);
}

.dashboard-chart-track i.easy {
    background: #16a34a;
}

.dashboard-chart-track i.medium {
    background: #f59e0b;
}

.dashboard-chart-track i.difficult {
    background: #dc2626;
}

.dashboard-school-ranking {
    display: grid;
}

.dashboard-school-row {
    display: grid;
    grid-template-columns: 32px minmax(210px, 1.3fr) minmax(180px, 2fr) 54px;
    gap: 11px;
    align-items: center;
    min-height: 42px;
    border-top: 1px solid #edf1f6;
}

.dashboard-school-row:first-child {
    border-top: 0;
}

.dashboard-rank {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
}

.dashboard-level-block[data-dashboard-level="SMP"] .dashboard-rank {
    background: #ecfdf5;
    color: #059669;
}

.dashboard-school-name {
    min-width: 0;
}

.dashboard-school-name b,
.dashboard-school-name span {
    display: block;
}

.dashboard-school-name b {
    overflow: hidden;
    color: #172033;
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-school-name span {
    margin-top: 2px;
    color: #475569;
    font-size: 12px;
}

.dashboard-school-track {
    height: 8px;
}

.dashboard-school-track i {
    background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.dashboard-level-block[data-dashboard-level="SMP"] .dashboard-school-track i {
    background: linear-gradient(90deg, #059669, #34d399);
}

.dashboard-school-row strong {
    color: #0f172a;
    font-size: 12px;
    text-align: right;
}

.dashboard-empty {
    margin: 0;
    padding: 18px 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    color: #475569;
    font-size: 12px;
    text-align: center;
}

@media screen and (max-width: 1100px) {
    .dashboard-evaluation-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 900px) {
    .dashboard-evaluation-section {
        margin-right: 12px;
        margin-left: 12px;
    }
}

@media screen and (max-width: 720px) {
    .dashboard-evaluation-section {
        margin: 0 12px 18px;
    }

    .dashboard-section-heading {
        min-height: 48px;
        padding: 9px 11px;
    }

    .dashboard-section-heading h2 {
        font-size: 15px;
    }

    .dashboard-report-link {
        min-height: 36px;
        padding: 7px 11px;
        font-size: 12px;
    }

    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-score-panel .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-school-row {
        grid-template-columns: 30px minmax(0, 1fr) 48px;
        padding: 6px 0;
    }

    .dashboard-school-track {
        display: none;
    }
}

@media screen and (max-width: 460px) {
    .dashboard-chart-row {
        grid-template-columns: 54px minmax(60px, 1fr) 25px;
    }

    .dashboard-chart-row > em {
        display: none;
    }
}

/* Modern Home Page Enhancements */
.home-auth-hero {
    background: linear-gradient(135deg, #0f4c75 0%, #1b262c 50%, #0f4c75 100%) !important;
    position: relative;
    overflow: hidden;
}

.home-auth-hero::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.home-auth-hero .brand-mark.big {
    width: 80px !important;
    height: 80px !important;
    border-radius: 20px;
    background: rgba(255,255,255,0.15);
    padding: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.home-auth-hero .brand-mark.big img {
    max-width: 56px !important;
    max-height: 56px !important;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.home-hero-copy h1 {
    font-size: 24px !important;
    font-weight: 900 !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
}

.home-hero-copy .auth-eyebrow {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.home-card-heading {
    text-align: center;
    margin-bottom: 20px;
}

.home-card-heading .home-card-kicker {
    display: inline-block;
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    color: #0369a1;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 12px;
}

.home-card-heading h2 {
    font-size: 24px !important;
    background: linear-gradient(135deg, #1e293b, #334155);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-portal-grid {
    gap: 16px !important;
}

.auth-portal {
    padding: 20px !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    transition:
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.auth-portal:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1) !important;
    border-color: #3b82f6 !important;
}

.auth-portal-icon {
    width: 48px !important;
    height: 48px !important;
    border-radius: 12px !important;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    margin-bottom: 8px;
}

.auth-portal-icon svg {
    width: 24px;
    height: 24px;
    fill: #2563eb;
}

.auth-portal.student .auth-portal-icon {
    background: linear-gradient(135deg, #dbeafe, #93c5fd);
}
.auth-portal.student .auth-portal-icon svg { fill: #1d4ed8; }

.auth-portal.admin .auth-portal-icon {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
}
.auth-portal.admin .auth-portal-icon svg { fill: #d97706; }

.auth-portal.proctor .auth-portal-icon {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
}
.auth-portal.proctor .auth-portal-icon svg { fill: #059669; }

.auth-portal.team .auth-portal-icon {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
}
.auth-portal.team .auth-portal-icon svg { fill: #7c3aed; }

.auth-portal b {
    font-size: 16px !important;
    color: #1e293b;
    font-weight: 800;
}

.auth-portal small {
    color: #475569 !important;
    font-size: 13px !important;
    line-height: 1.5;
}

.home-card-help {
    text-align: center;
    color: #475569 !important;
    font-size: 13px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

/* Role Login Page Enhancements */
.role-login-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
}

.auth-role-badge {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 28px;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    flex-shrink: 0;
}

.role-login-card.role-admin .auth-role-badge {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.15);
}

.role-login-card.role-proctor .auth-role-badge {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
}

.role-login-card.role-team .auth-role-badge {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

.student-badge {
    background: linear-gradient(135deg, #dbeafe, #93c5fd) !important;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.15) !important;
}

.role-login-heading h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 850;
    color: #1e293b;
}

.role-login-heading .muted {
    margin-top: 4px;
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
}

/* Consistent auth-hero across all login pages */
.auth-hero {
    background: linear-gradient(135deg, #0f4c75 0%, #1b262c 50%, #0f4c75 100%) !important;
    position: relative;
    overflow: hidden;
}

.auth-hero::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

.auth-hero .brand-mark.big {
    width: 64px !important;
    height: 64px !important;
    border-radius: 16px;
    background: rgba(255,255,255,0.15);
    padding: 10px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.auth-hero .brand-mark.big img {
    max-width: 44px !important;
    max-height: 44px !important;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.auth-hero h1 {
    font-size: 18px !important;
    font-weight: 900 !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    margin: 4px 0 !important;
}

.auth-hero .auth-eyebrow {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 3px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.auth-hero p {
    color: rgba(255,255,255,0.8) !important;
    font-size: 12px !important;
}

/* Login card enhancements */
.auth-card {
    border-radius: 24px !important;
    background: rgba(255,255,255,0.95) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(226,232,240,0.8) !important;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.5) inset !important;
    padding: 36px 40px !important;
}

.auth-card label {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #374151 !important;
}

.auth-card input {
    border: 2px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
    background: #f9fafb !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
}

.auth-card input:focus {
    border-color: #3b82f6 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(59,130,246,0.1) !important;
}

.auth-card .btn.primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    padding: 14px 20px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 14px rgba(37,99,235,0.3) !important;
    letter-spacing: 0.3px;
}

.auth-card .btn.primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(37,99,235,0.4) !important;
}

.auth-alt-link {
    display: block;
    text-align: center;
    color: #475569 !important;
    font-size: 14px;
    font-weight: 600;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    margin-top: 8px;
    transition: color 0.2s ease;
}

.auth-alt-link:hover {
    color: #2563eb !important;
}

/* Login card heading for home page */
.home-card-heading {
    text-align: center;
}

.home-card-heading .home-card-kicker {
    display: inline-block;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #1e40af;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 12px;
}

.home-card-heading h2 {
    margin: 0 0 8px;
    font-size: 24px;
    color: #1e293b;
}

.home-card-heading p {
    color: #475569;
    font-size: 14px;
    margin: 0;
}

.home-card-help {
    text-align: center;
    color: #475569;
    font-size: 13px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

/* Portal grid enhancements */
.auth-portal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.auth-portal {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition:
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-portal:hover {
    transform: translateY(-4px);
    border-color: #3b82f6;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
}

.auth-portal-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.auth-portal-icon svg {
    width: 24px;
    height: 24px;
}

.auth-portal.student .auth-portal-icon {
    background: linear-gradient(135deg, #dbeafe, #93c5fd);
}
.auth-portal.student .auth-portal-icon svg { fill: #1d4ed8; }
.auth-portal.student { border-left: 4px solid #3b82f6; }

.auth-portal.admin .auth-portal-icon {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
}
.auth-portal.admin .auth-portal-icon svg { fill: #d97706; }
.auth-portal.admin { border-left: 4px solid #f59e0b; }

.auth-portal.proctor .auth-portal-icon {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
}
.auth-portal.proctor .auth-portal-icon svg { fill: #059669; }
.auth-portal.proctor { border-left: 4px solid #10b981; }

.auth-portal.team .auth-portal-icon {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
}
.auth-portal.team .auth-portal-icon svg { fill: #7c3aed; }
.auth-portal.team { border-left: 4px solid #8b5cf6; }

.auth-portal-copy b {
    display: block;
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 4px;
}

.auth-portal-copy small {
    color: #475569;
    font-size: 13px;
    line-height: 1.5;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .auth-card {
        padding: 28px 20px !important;
        margin: 0 12px !important;
    }
    
    .auth-portal-grid {
        grid-template-columns: 1fr;
    }
    
    .role-login-heading {
        flex-direction: column;
        text-align: center;
    }
}

/* ═══════════════════════════════════════════════════
   MODERN ADMIN DASHBOARD UI v2.0
   ═══════════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-soft: #eff6ff;
    --success: #10b981;
    --success-soft: #ecfdf5;
    --warning: #f59e0b;
    --warning-soft: #fffbeb;
    --danger: #ef4444;
    --danger-soft: #fef2f2;
    --info: #06b6d4;
    --info-soft: #ecfeff;
    
    --bg: #f0f4f8;
    --bg-card: #ffffff;
    --bg-hover: #f8fafc;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    --font: "Atkinson Hyperlegible", "Segoe UI", Arial, sans-serif;
    --font-heading: var(--font);
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Global Reset ── */
* { box-sizing: border-box; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Sidebar Modern ── */
.sidebar {
    width: 260px !important;
    min-width: 260px !important;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%) !important;
    border-right: 1px solid rgba(255,255,255,0.08);
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    overflow-y: auto;
}

.sidebar .side-brand {
    padding: 20px 16px !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.03);
}

.sidebar .side-brand .brand-mark {
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar .side-brand .brand-mark img {
    max-width: 28px !important;
    max-height: 28px !important;
}

.sidebar .side-brand b {
    display: block;
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #ffffff;
    letter-spacing: 0.02em;
}

.sidebar .side-brand span {
    display: block;
    font-size: 12px !important;
    color: rgba(255,255,255,0.5);
    margin-top: 2px;
}

.sidebar nav {
    padding: 8px 8px !important;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar nav a {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 10px 12px !important;
    border-radius: var(--radius-sm) !important;
    color: rgba(255,255,255,0.65) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    transition: var(--transition);
    border: 1px solid transparent !important;
    text-decoration: none;
}

.sidebar nav a:hover {
    background: rgba(255,255,255,0.08) !important;
    color: #ffffff !important;
    transform: none !important;
}

.sidebar nav a.active {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary-light) !important;
    box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}

.sidebar nav a span {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.side-footer {
    margin-top: auto;
    padding: 12px 16px !important;
    border-top: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.68) !important;
    font-size: 12px;
}

/* ── Main Content Area ── */
.main {
    flex: 1;
    min-width: 0;
    padding: 20px 24px 32px !important;
    background: var(--bg);
}

/* ── Topbar ── */
.topbar {
    min-height: 56px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar h1 {
    font-family: var(--font-heading);
    font-size: var(--fs-page) !important;
    font-weight: 700 !important;
    color: var(--text);
    margin: 0;
}

.userbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.userbox b {
    font-size: 13px;
    font-weight: 700;
}

.userbox span {
    font-size: 12px;
    color: var(--text-muted);
}

/* ── Stats Grid ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
}

body:not(.login-bg):not(.exam-body):not(.tka-bg) .metric-school .stat-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

body:not(.login-bg):not(.exam-body):not(.tka-bg) .metric-students .stat-icon {
    background: #dcfce7;
    color: #047857;
}

body:not(.login-bg):not(.exam-body):not(.tka-bg) .metric-sessions .stat-icon {
    background: #fef3c7;
    color: #b45309;
}

body:not(.login-bg):not(.exam-body):not(.tka-bg) .metric-packages .stat-icon {
    background: #ede9fe;
    color: #6d28d9;
}

body:not(.login-bg):not(.exam-body):not(.tka-bg) .metric-score .stat-icon {
    background: #ccfbf1;
    color: #0f766e;
}

/* Rich question editor and self-hosted LaTeX preview. */
.latex-entry-guide {
    display: flex;
    align-items: center;
    gap: 10px 16px;
    flex-wrap: wrap;
    padding: 11px 13px;
    border: 1px solid #bfdbfe;
    border-radius: 9px;
    background: #eff6ff;
    color: #1e3a5f;
    font-size: 12px;
    line-height: 1.45;
}

.latex-entry-guide strong {
    font-size: 13px;
    color: #1d4ed8;
}

.latex-entry-guide code {
    padding: 2px 5px;
    border: 1px solid #bfdbfe;
    border-radius: 5px;
    background: #fff;
    color: #1e3a5f;
    font-size: 12px;
}

.rich-editor-field,
.option-rich-editor {
    min-width: 0;
}

.rich-editor-field > label {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.rich-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 5px;
    border: 1px solid #cbd5e1;
    border-radius: 8px 8px 0 0;
    background: #f8fafc;
}

.rich-editor-tools {
    display: flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
    flex-wrap: wrap;
}

.rich-editor-tools button,
.rich-preview-toggle {
    min-width: 31px;
    min-height: 30px;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #334155;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.rich-editor-tools button:hover,
.rich-editor-tools button:focus-visible,
.rich-preview-toggle:hover,
.rich-preview-toggle:focus-visible,
.rich-preview-toggle[aria-pressed="true"] {
    border-color: #bfdbfe;
    background: #dbeafe;
    color: #1d4ed8;
}

.rich-preview-toggle {
    flex: 0 0 auto;
    border-color: #dbe5ef;
    background: #fff;
    white-space: nowrap;
}

.rich-editor-divider {
    width: 1px;
    height: 22px;
    margin: 0 2px;
    background: #d9e2ec;
}

.rich-editor-symbols {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
}

.rich-editor-symbols button {
    min-width: 30px;
    font-size: 15px;
    line-height: 1;
}

/* Panel penyusun tabel visual */
.rich-table-builder {
    display: grid;
    gap: 10px;
    padding: 12px;
    margin: 6px 0;
    border: 1px solid #cdd9e8;
    border-radius: 10px;
    background: #f7fafd;
}

.rich-table-builder > b {
    color: #1d4ed8;
}

.rich-table-builder-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.rich-table-builder label {
    display: grid;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.rich-table-builder-controls input {
    width: 90px;
}

.rich-table-builder-headers input {
    width: 100%;
}

.rich-table-builder-actions {
    display: flex;
    gap: 8px;
}

/* Tabel yang dirender pada pratinjau/soal/peninjauan */
.rich-table-wrap {
    overflow-x: auto;
    margin: 10px 0;
    max-width: 100%;
}

table.rich-table {
    border-collapse: collapse;
    width: auto;
    min-width: min(100%, 320px);
    background: #fff;
    font-size: 15px;
}

table.rich-table th,
table.rich-table td {
    border: 1px solid #cbd5e1;
    padding: 7px 12px;
    text-align: left;
    vertical-align: top;
}

table.rich-table th {
    background: #eef4fb;
    font-weight: 800;
    color: #0f172a;
}

table.rich-table tbody tr:nth-child(even) td {
    background: #f8fafc;
}

.rich-editor-toolbar + textarea {
    width: 100%;
    margin-top: -1px;
    border-radius: 0 0 8px 8px;
    font-family: var(--font);
    line-height: 1.55;
}

.rich-editor-toolbar + textarea:focus {
    position: relative;
    z-index: 1;
}

.rich-editor-preview {
    min-height: 64px;
    margin-top: 8px;
    padding: 12px 14px;
    overflow-wrap: anywhere;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-size: 13px;
    line-height: 1.65;
}

.rich-editor-preview::before {
    content: "Pratinjau";
    display: block;
    margin-bottom: 8px;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.rich-editor-preview[hidden] {
    display: none;
}

.rich-preview-empty {
    color: #475569;
    font-style: italic;
}

.rich-options-editor {
    display: grid;
    gap: 10px;
}

.rich-options-editor .option-edit {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) minmax(185px, .42fr);
    align-items: start;
    gap: 10px;
    margin: 0;
    padding: 11px;
}

.rich-options-editor .option-edit-label {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 800;
}

.rich-options-editor .media-editor {
    align-self: stretch;
}

.rich-options-editor .option-correct-check {
    grid-column: 2 / -1;
    width: fit-content;
    margin: 0;
    padding: 5px 9px;
    border: 1px solid #bbf7d0;
    border-radius: 7px;
    background: #f0fdf4;
    color: #166534;
    font-weight: 700;
}

.true-false-key {
    grid-column: 2 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    padding: 6px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 12px;
    font-weight: 700;
}

.true-false-key[hidden] {
    display: none;
}

.true-false-key label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.true-false-key input {
    width: auto;
}

.review-answer-key.is-false {
    color: #9f1239;
    background: #ffe4e6;
}

[data-rich-text] {
    overflow-wrap: anywhere;
}

.latex-render-error {
    border-inline-start: 3px solid #d97706;
    padding-inline-start: .65rem;
}

.latex-render-warning {
    display: block;
    margin-top: .4rem;
    color: #92400e;
    font-size: 12px;
    font-weight: 700;
}

.katex-display {
    max-width: 100%;
    margin: .7em 0;
    padding: 2px 0 5px;
    overflow-x: auto;
    overflow-y: hidden;
}

.question-text .katex,
.option-text .katex,
.review-preserve-text .katex,
.rich-editor-preview .katex {
    font-size: 16px;
}

@media screen and (max-width: 900px) {
    .rich-options-editor .option-edit {
        grid-template-columns: 32px minmax(0, 1fr);
    }

    .rich-options-editor .media-editor,
    .rich-options-editor .option-correct-check,
    .rich-options-editor .true-false-key {
        grid-column: 2;
    }
}

@media screen and (max-width: 620px) {
    .rich-editor-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .rich-preview-toggle {
        align-self: flex-end;
    }

    .rich-editor-divider {
        display: none;
    }

    .rich-options-editor .option-edit {
        grid-template-columns: 1fr;
    }

    .rich-options-editor .option-edit-label,
    .rich-options-editor .media-editor,
    .rich-options-editor .option-correct-check,
    .rich-options-editor .true-false-key {
        grid-column: 1;
    }
}

.true-false-answers {
    gap: 0;
    padding: 0;
    overflow-x: auto;
}

.true-false-header,
.true-false-answers .statement-row {
    min-width: 620px;
    display: grid;
    grid-template-columns: 44px minmax(280px, 1fr) 100px 100px;
    align-items: stretch;
}

.true-false-header {
    color: #475569;
    background: #f1f5f9;
    border-bottom: 1px solid #cbd5e1;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.true-false-header span,
.true-false-answers .statement-row > * {
    display: flex;
    align-items: center;
    padding: 12px;
    border-right: 1px solid #e2e8f0;
}

.true-false-header span:nth-child(n+3) {
    justify-content: center;
}

.true-false-answers .statement-row {
    gap: 0;
    padding: 0;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0;
}

.true-false-answers .statement-row:last-child {
    border-bottom: 0;
}

.true-false-answers .statement-row .op-label {
    align-self: center;
    justify-self: center;
    width: 30px;
    min-width: 30px;
    height: 30px;
    padding: 0;
    border-right: 0;
}

.true-false-answers .statement-row .option-content {
    display: grid;
    align-content: center;
    gap: 7px;
}

.true-false-answers .category-choice {
    justify-content: center;
    gap: 7px;
    margin: 0;
    background: #fff;
    cursor: pointer;
    font-weight: 750;
}

.true-false-answers .category-choice:last-child,
.true-false-header span:last-child {
    border-right: 0;
}

.true-false-answers .category-choice:hover {
    background: #eff6ff;
}

.true-false-answers .category-choice:has(input:checked) {
    color: #1d4ed8;
    background: #dbeafe;
}

.true-false-answers .category-choice input {
    width: 18px !important;
    height: 18px !important;
    margin: 0;
    accent-color: #2563eb;
}

@media screen and (max-width: 620px) {
    .true-false-header,
    .true-false-answers .statement-row {
        min-width: 540px;
        grid-template-columns: 40px minmax(240px, 1fr) 90px 90px;
    }

    .true-false-header span,
    .true-false-answers .statement-row > * {
        padding: 10px 8px;
    }
}

.stat-card > div > span {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card > div > strong {
    display: block;
    font-size: 24px !important;
    font-weight: 800 !important;
    color: var(--text);
    line-height: 1.2;
    font-family: var(--font-heading);
}

.stat-card > div > em {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    font-style: normal;
    margin-top: 2px;
}

.stat-card a {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.stat-card a:hover {
    text-decoration: underline;
}

/* ── Panel/Card ── */
.panel {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    padding: 20px !important;
    box-shadow: var(--shadow) !important;
    margin-bottom: 16px;
}

.panel h2, .panel h3 {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--text);
    margin: 0 0 12px;
}

.panel h2 { font-size: 18px; }
.panel h3 { font-size: 16px; }

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn.primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary-dark);
}

.btn.primary:hover {
    background: var(--primary-dark);
}

.btn.ghost {
    background: var(--primary-soft);
    color: var(--primary-dark);
    border-color: #bfdbfe;
}

.btn.danger {
    background: var(--danger-soft);
    color: #b91c1c;
    border-color: #fecaca;
}

.btn.warning {
    background: var(--warning-soft);
    color: #92400e;
    border-color: #fde68a;
}

.btn.tiny {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.btn.full { width: 100%; }

/* ── Tables ── */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 10px 12px;
    text-align: left;
    font-size: 13px;
    border-bottom: 1px solid var(--border-light);
}

th {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 1;
}

tbody tr {
    transition: background 0.15s ease;
}

tbody tr:hover td {
    background: var(--bg-hover);
}

.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* ── Forms ── */
label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
}

input, select, textarea {
    min-height: 38px;
    padding: 10px 12px;
    font-size: 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text);
    transition: var(--transition);
    font-family: var(--font);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.28);
}

input::placeholder, textarea::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.form-grid .span-2 { grid-column: 1 / -1; }

/* ── Filter Form ── */
.filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    padding: 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.filter-form label {
    flex: 1 1 180px;
    min-width: 150px;
    font-size: 12px;
}

.filter-form input, .filter-form select {
    min-height: 36px;
    font-size: 13px;
    padding: 8px 10px;
}

.filter-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

/* ── Dashboard Specific ── */
.dashboard-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.execution-summary-panel .panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--success-soft);
    color: var(--success);
    font-size: 12px;
    font-weight: 700;
    border-radius: 20px;
}

.live-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.execution-grid {
    display: grid;
    gap: 16px;
}

.mini-list {
    display: grid;
    gap: 10px;
}

.mini-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.mini-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: var(--primary-soft);
    flex-shrink: 0;
}

.mini-card b {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
}

.mini-card em {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    font-style: normal;
}

/* ── Progress Bars ── */
.bar-track {
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
}

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

.bar-fill.finished { background: linear-gradient(90deg, #10b981, #059669); }
.bar-fill.working { background: linear-gradient(90deg, #3b82f6, #2563eb); }
.bar-fill.pending { background: linear-gradient(90deg, #94a3b8, #64748b); }

/* ── Chart Rows ── */
.chart-progress-bars {
    display: grid;
    gap: 12px;
}

.bar-group .bar-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.bar-group .bar-info span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.bar-group .bar-info b {
    font-size: 12px;
    color: var(--text-muted);
}

/* ── Quick Actions ── */
.quick-actions-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.quick-actions-panel a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.quick-actions-panel a:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.quick-actions-panel a span {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: var(--primary-soft);
    flex-shrink: 0;
}

.quick-actions-panel a b {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
}

.quick-actions-panel a em {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    font-style: normal;
    margin-top: 2px;
}

/* ── Page Head ── */
.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.page-head h2 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    margin: 0;
}

.page-head .actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Toast/Alert ── */
.toast {
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
    border: 1px solid;
}

.toast.success {
    background: var(--success-soft);
    color: #065f46;
    border-color: #a7f3d0;
}

.toast.error, .toast.danger {
    background: var(--danger-soft);
    color: #991b1b;
    border-color: #fecaca;
}

.toast.warning {
    background: var(--warning-soft);
    color: #92400e;
    border-color: #fde68a;
}

.list-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.list-pagination-size {
    display: flex;
    align-items: center;
    gap: 6px;
}

.list-pagination-size > span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.report-pagination-size {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.report-pagination-size select {
    min-width: 74px;
    min-height: 34px;
    padding: 5px 28px 5px 10px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

.report-pagination-size select:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--primary) 25%, transparent);
    outline-offset: 2px;
}

.list-pagination-summary,
.list-pagination-page {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.list-pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.list-pagination .btn[aria-disabled="true"] {
    opacity: .45;
    pointer-events: none;
}

@media (max-width: 640px) {
    .list-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .list-pagination-controls {
        justify-content: space-between;
    }
}

.avatar {
    flex: 0 0 auto;
    overflow: hidden;
}

.avatar img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.account-profile-heading,
.account-profile-panel {
    max-width: 780px;
}

.account-profile-panel {
    padding: 22px;
}

.account-profile-form {
    display: grid;
    gap: 22px;
}

.account-profile-photo-section {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border-light);
}

.account-profile-photo-preview {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 28px;
    font-weight: 800;
}

.account-profile-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    outline: 1px solid oklch(0 0 0 / .1);
    outline-offset: -1px;
}

.account-profile-photo-preview.is-default {
    padding: 10px;
    border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
    background: #fff;
}

.account-profile-photo-preview.is-default img {
    border-radius: 18px;
    object-fit: contain;
}

.account-profile-photo-copy h2,
.account-profile-section-heading h2 {
    margin: 0 0 5px;
    font-size: 15px;
}

.account-profile-photo-copy p,
.account-profile-section-heading p,
.account-profile-password > p {
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.account-profile-file {
    max-width: 440px;
    font-size: 12px;
}

.account-profile-file input[type="file"] {
    padding: 8px 10px;
    font-size: 12px;
}

.account-profile-section {
    min-width: 0;
}

.account-profile-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.account-profile-fields label {
    font-size: 12px;
}

.account-profile-field-help {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
}

.account-profile-fields input[readonly] {
    color: var(--text-muted);
    background: var(--bg);
    cursor: default;
}

.account-profile-password {
    margin: 0;
    padding: 20px 0 0;
    border: 0;
    border-top: 1px solid var(--border-light);
}

.account-profile-password legend {
    margin: 0 0 5px;
    padding: 0;
    color: var(--text);
    font-size: 15px;
    font-weight: 800;
}

.account-profile-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 18px;
    border-top: 1px solid var(--border-light);
}

@media (max-width: 640px) {
    .account-profile-panel {
        padding: 16px;
    }

    .account-profile-photo-section {
        grid-template-columns: 72px minmax(0, 1fr);
        align-items: start;
        gap: 14px;
    }

    .account-profile-photo-preview {
        width: 72px;
        height: 72px;
        font-size: 24px;
    }

    .account-profile-fields {
        grid-template-columns: 1fr;
    }

    .account-profile-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

/* ── Badges ── */
.badge {
    display: inline-flex;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 800;
    border-radius: 20px;
    background: var(--bg);
    color: var(--text-secondary);
}

.badge.primary { background: var(--primary-soft); color: var(--primary); }
.badge.success { background: var(--success-soft); color: #065f46; }
.badge.warning { background: var(--warning-soft); color: #854d0e; }
.badge.danger { background: var(--danger-soft); color: #b91c1c; }

/* ── Checkbox Grid ── */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.checkbox-grid input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* ── Form Actions ── */
.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    margin-top: 8px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .main {
        padding: 16px !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .topbar {
        flex-wrap: wrap;
    }
    
    .page-head {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════
   MODERN STUDENT EXAM UI v2.0
   ═══════════════════════════════════════════════════ */

/* ── Exam Layout ── */
.exam-body {
    background: #f0f4f8;
    margin: 0;
    overflow: hidden;
}

.exam-layout {
    height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
    grid-template-rows: 64px 1fr 64px;
    grid-template-areas:
        "head head"
        "nums question"
        "foot foot";
}

/* ── Exam Header ── */
.exam-header {
    grid-area: head;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 20px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 10;
}

.exam-header .side-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 !important;
    border: 0 !important;
}

.exam-header .side-brand .brand-mark {
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    padding: 5px;
}

.exam-header .side-brand .brand-mark img {
    max-width: 26px !important;
    max-height: 26px !important;
}

.exam-header .side-brand b {
    display: block;
    font-size: 13px;
    font-weight: 800;
}

.exam-header .side-brand span {
    display: block;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

.exam-student-identity {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 260px;
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
}

.exam-student-identity b {
    min-width: 0;
    overflow: hidden;
    color: #ffffff;
    font-size: 12px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.exam-student-identity span {
    flex: 0 0 auto;
    color: rgba(255,255,255,0.82);
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}

.num-toggle-header-btn {
    display: none;
    padding: 8px 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

@media (min-width: 901px) {
    body.exam-body .num-toggle-header-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 40px;
    }
}

.font-tools {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.font-tools button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s ease;
}

.font-tools button:hover {
    background: rgba(255,255,255,0.2);
}

/* ── Timer ── */
.timer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
}

.timer-icon {
    font-size: 16px;
}

.timer b {
    font-family: var(--font);
    font-variant-numeric: tabular-nums;
    font-size: 18px;
    letter-spacing: 0.05em;
}

/* ── Autosave ── */
.autosave {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #ecfdf5;
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    color: #047857;
}

.autosave-icon {
    font-size: 14px;
}

.autosave[data-state=saving] {
    background: #fffbeb;
    border-color: rgba(245, 158, 11, 0.2);
    color: #92400e;
}

.autosave[data-state=error] {
    background: #fef2f2;
    border-color: rgba(239, 68, 68, 0.2);
    color: #b91c1c;
}

/* ── Number Panel ── */
.number-panel {
    grid-area: nums;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.num-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.num-panel-head h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: #1e293b;
}

.num-panel-close-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: none;
    border-radius: 6px;
    color: #475569;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.num-panel-close-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* ── Number Grid ── */
.num-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.num {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    color: #475569;
    text-decoration: none;
    transition: all 0.15s ease;
}

.num:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.num.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.num.answered {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #059669;
}

.num.doubt {
    background: #fffbeb;
    border-color: #fde68a;
    color: #d97706;
}

.num.question-wait-locked {
    opacity: 0.48;
    cursor: progress;
    filter: grayscale(0.35);
}

.exam-footer .btn.question-wait-locked {
    opacity: .72;
    cursor: pointer;
    filter: saturate(.72);
}

.exam-footer .btn[aria-busy="true"] {
    cursor: wait;
}

/* ── Legend ── */
.legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.legend span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #475569;
}

.l {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    display: inline-block;
    border: 2px solid #e2e8f0;
}

.l.empty { background: #f8fafc; }
.l.answered { background: #ecfdf5; border-color: #a7f3d0; }
.l.doubt { background: #fffbeb; border-color: #fde68a; }
.l.active { background: #3b82f6; border-color: #2563eb; }

/* ── Question Panel ── */
.question-panel {
    grid-area: question;
    overflow-y: auto;
    padding: 20px 24px;
    background: #f8fafc;
}

.question-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.question-top h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
}

.question-counter {
    padding: 6px 14px;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
}

/* ── Stimulus ── */
.stimulus {
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #3b82f6;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.7;
    color: #334155;
}

/* ── Question Media ── */
.question-media {
    display: grid;
    gap: 12px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 16px;
}

.media-card img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.media-caption {
    margin: 8px 0 0;
    font-size: 13px;
    color: #475569;
    text-align: center;
}

/* ── Question Text ── */
.question-text {
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.7;
    color: #1e293b;
}

body.exam-body .stimulus,
body.exam-body .question-text {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    overflow-wrap: break-word;
}

/* ── Answers ── */
.answers {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.answer-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.answer-card:hover {
    border-color: #93c5fd;
    background: #f8fafc;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
}

.answer-card:has(input:checked) {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.answer-card input {
    width: 20px !important;
    height: 20px !important;
    margin-top: 2px;
    accent-color: #3b82f6;
    flex-shrink: 0;
}

.op-label {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 900;
    color: #475569;
    flex-shrink: 0;
}

.answer-card:has(input:checked) .op-label {
    background: #3b82f6;
    color: #ffffff;
}

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

.option-text {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.6;
    color: #334155;
}

.option-media {
    display: block;
    margin-top: 10px;
}

.option-media img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* ── Doubt Check ── */
.doubt-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    cursor: pointer;
}

.doubt-check input {
    width: 18px !important;
    height: 18px !important;
    accent-color: #d97706;
}

.doubt-check span {
    font-size: 14px;
    font-weight: 700;
    color: #92400e;
}

.question-wait-notice {
    margin: 0 0 14px;
    padding: 9px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 12px;
    line-height: 1.45;
}

.question-wait-notice[hidden] {
    display: none;
}

/* ── Exam Footer ── */
.exam-footer {
    grid-area: foot;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
}

.exam-footer .btn {
    flex: 1;
    height: 44px;
    font-size: 14px;
    font-weight: 800;
    border-radius: 10px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .exam-layout {
        grid-template-columns: 1fr;
        grid-template-rows: 64px auto 1fr 64px;
        grid-template-areas:
            "head"
            "nums"
            "question"
            "foot";
        height: auto;
        min-height: 100vh;
    }
    
    .exam-body {
        overflow: auto;
    }
    
    .number-panel {
        border-right: 0;
        border-bottom: 1px solid #e2e8f0;
        padding: 12px;
        max-height: 200px;
    }
    
    .num-grid {
        grid-template-columns: repeat(8, 1fr);
    }
    
    .num-toggle-header-btn {
        display: flex;
    }
    
    .exam-header {
        gap: 10px;
        padding: 0 12px;
    }
    
    .question-panel {
        padding: 16px;
    }
    
    .exam-footer {
        padding: 0 12px;
    }
}

/* Teacher SSO theme overrides. */
.auth-portal.teacher {
    border-left: 4px solid #1a73e8;
}

.auth-portal.teacher .auth-portal-icon {
    background: linear-gradient(135deg, #e8f0fe, #d2e3fc);
}

.auth-portal.teacher .auth-portal-icon svg {
    fill: #1a73e8;
}

.role-login-card.role-teacher {
    --role-accent: #1a73e8;
    --role-soft: #e8f0fe;
}

.role-login-card.role-teacher .auth-role-badge {
    background: linear-gradient(135deg, #e8f0fe, #d2e3fc);
    box-shadow: 0 4px 12px rgba(26, 115, 232, .15);
}

.login-bg.login-teacher .auth-wrap:before {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .13) 0 18%, transparent 18% 100%),
        linear-gradient(126deg, transparent 0 47%, rgba(255, 255, 255, .08) 47% 58%, transparent 58% 100%),
        linear-gradient(105deg, #1559a9 0%, #1a73e8 48%, #3b7dc4 100%) !important;
}

/* Configurable application color themes. */
html[data-theme="blue"] {
    --theme-primary: #0369a1;
    --theme-primary-light: #0369a1;
    --theme-primary-dark: #075985;
    --theme-primary-soft: #e0f2fe;
    --theme-focus: rgba(3, 105, 161, .2);
    --theme-hero-a: #0f172a;
    --theme-hero-b: #0c4a6e;
    --theme-hero-c: #0369a1;
    --theme-sidebar-a: #0f172a;
    --theme-sidebar-b: #16233d;
}

html[data-theme="teal"] {
    --theme-primary: #0f766e;
    --theme-primary-light: #0f766e;
    --theme-primary-dark: #115e59;
    --theme-primary-soft: #f0fdfa;
    --theme-focus: rgba(15, 118, 110, .14);
    --theme-hero-a: #134e4a;
    --theme-hero-b: #0f766e;
    --theme-hero-c: #0f766e;
    --theme-sidebar-a: #0f3d3a;
    --theme-sidebar-b: #134e4a;
}

html[data-theme="purple"] {
    --theme-primary: #7c3aed;
    --theme-primary-light: #7c3aed;
    --theme-primary-dark: #6d28d9;
    --theme-primary-soft: #f5f3ff;
    --theme-focus: rgba(124, 58, 237, .14);
    --theme-hero-a: #312e81;
    --theme-hero-b: #5b21b6;
    --theme-hero-c: #7c3aed;
    --theme-sidebar-a: #1e1b4b;
    --theme-sidebar-b: #312e81;
}

html[data-theme="orange"] {
    --theme-primary: #c2410c;
    --theme-primary-light: #c2410c;
    --theme-primary-dark: #c2410c;
    --theme-primary-soft: #fff7ed;
    --theme-focus: rgba(234, 88, 12, .14);
    --theme-hero-a: #7c2d12;
    --theme-hero-b: #c2410c;
    --theme-hero-c: #c2410c;
    --theme-sidebar-a: #431407;
    --theme-sidebar-b: #7c2d12;
}

html[data-theme="rose"] {
    --theme-primary: #e11d48;
    --theme-primary-light: #be123c;
    --theme-primary-dark: #be123c;
    --theme-primary-soft: #fff1f2;
    --theme-focus: rgba(225, 29, 72, .14);
    --theme-hero-a: #881337;
    --theme-hero-b: #be123c;
    --theme-hero-c: #e11d48;
    --theme-sidebar-a: #4c0519;
    --theme-sidebar-b: #881337;
}

html[data-theme] {
    --primary: var(--theme-primary);
    --primary-light: var(--theme-primary-light);
    --primary-dark: var(--theme-primary-dark);
    --primary-2: var(--theme-primary-dark);
    --primary-soft: var(--theme-primary-soft);
    --soft: var(--theme-primary-soft);
}

html[data-theme] .sidebar {
    background: linear-gradient(180deg, var(--theme-sidebar-a), var(--theme-sidebar-b)) !important;
}

html[data-theme] body.login-bg .auth-wrap::before,
html[data-theme] .login-bg.login-teacher .auth-wrap::before {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .11) 0 18%, transparent 18% 100%),
        linear-gradient(105deg, var(--theme-hero-a), var(--theme-hero-b) 52%, var(--theme-hero-c)) !important;
}

html[data-theme] .btn.primary,
html[data-theme] .auth-card .btn.primary,
html[data-theme] .exam-header,
html[data-theme] .tka-top {
    background: linear-gradient(135deg, var(--theme-primary-light), var(--theme-primary-dark)) !important;
}

html[data-theme] .auth-card input:focus,
html[data-theme] input:focus,
html[data-theme] select:focus,
html[data-theme] textarea:focus {
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 0 3px var(--theme-focus) !important;
}

html[data-theme] .auth-portal:hover {
    border-color: var(--theme-primary) !important;
}

html[data-theme] .home-card-kicker,
html[data-theme] .badge.primary {
    background: var(--theme-primary-soft) !important;
    color: var(--theme-primary-dark) !important;
}

html[data-theme] input[type="checkbox"],
html[data-theme] input[type="radio"] {
    accent-color: var(--theme-primary);
}

/* Clean login identity header: one continuous background, no floating panel. */
.home-auth-hero,
.auth-hero {
    background: transparent !important;
}

.home-auth-hero::before,
.auth-hero::before {
    display: none !important;
}

.home-auth-hero .brand-mark.big,
.auth-hero .brand-mark.big {
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

html[data-theme] body.home-login .home-auth-hero .brand-mark.big.home-brand-mark,
html[data-theme] body.login-bg .auth-hero .brand-mark.big {
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

/* Animated public portal and configurable department-head welcome. */
body.home-login .home-auth-wrap {
    width: min(1180px, 100%);
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto !important;
    gap: clamp(20px, 2.5vw, 30px);
    padding: clamp(28px, 4vw, 56px);
    align-items: center;
}

.home-login .home-top-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(18px, 2vw, 24px);
    align-items: stretch;
}

body.home-login .home-auth-wrap.is-sequenced {
    grid-template-rows: auto !important;
    place-items: center;
}

body.home-login .home-auth-wrap.is-sequenced .home-top-row {
    display: contents;
}

body.home-login .home-auth-wrap.is-sequenced [data-home-stage] {
    position: absolute;
    inset-inline: 0;
    grid-area: 1 / 1;
    width: 100%;
    margin-inline: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(18px);
    transition:
        opacity .32s ease,
        transform .42s cubic-bezier(.2, 0, 0, 1),
        visibility 0s linear .42s;
}

body.home-login .home-auth-wrap.is-sequenced [data-home-stage].is-before {
    transform: translateY(-14px);
}

body.home-login .home-auth-wrap.is-sequenced [data-home-stage].is-active {
    position: relative;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: .06s, .06s, 0s;
    animation: home-stage-enter .5s cubic-bezier(.2, 0, 0, 1) both;
}

@keyframes home-stage-enter {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.home-login .home-auth-wrap.is-sequenced .home-auth-hero {
    max-width: 760px;
}

body.home-login .home-auth-wrap.is-sequenced .department-welcome {
    max-width: 1140px;
}

.home-sequence-button,
.home-welcome-replay {
    display: none;
    appearance: none;
    font: inherit;
    cursor: pointer;
}

body.home-login .home-auth-wrap.is-sequenced .home-sequence-button,
body.home-login .home-auth-wrap.is-sequenced .home-welcome-replay {
    display: inline-flex;
}

.home-sequence-button {
    min-height: 40px;
    margin-top: 20px;
    padding: 9px 15px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    box-shadow: 0 10px 24px rgba(1, 12, 31, .12);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.home-sequence-button:hover {
    border-color: rgba(255, 255, 255, .6);
    background: rgba(255, 255, 255, .2);
    transform: translateY(-1px);
}

.home-sequence-button:focus-visible,
.home-welcome-replay:focus-visible {
    outline: 3px solid rgba(191, 219, 254, .62);
    outline-offset: 3px;
}

.home-sequence-actions {
    display: flex;
    justify-content: flex-start;
}

.home-welcome-replay {
    width: max-content;
    margin: 4px auto 0;
    padding: 6px 10px;
    border: 0;
    border-radius: 999px;
    color: #1d67c7;
    background: #edf5ff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    transition: color .18s ease, background-color .18s ease;
}

.home-welcome-replay:hover {
    color: #124b91;
    background: #dcecff;
}

body.home-login .home-card {
    width: 100% !important;
    max-width: none !important;
    padding: clamp(22px, 2.6vw, 32px) !important;
    gap: 18px;
    border-radius: 24px !important;
}

body.home-login .auth-portal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-rows: minmax(82px, auto) !important;
    gap: 10px !important;
}

body.home-login .auth-portal {
    min-height: 82px !important;
    padding: 12px !important;
    display: flex !important;
    justify-content: center !important;
    gap: 12px !important;
    align-items: center !important;
    border-radius: 15px !important;
    transition-property: transform, border-color, box-shadow, background-color !important;
    transition-duration: .18s !important;
    transition-timing-function: ease !important;
}

body.home-login .auth-portal-icon {
    width: 38px !important;
    height: 38px !important;
    border-radius: 11px !important;
}

body.home-login .auth-portal-icon svg {
    width: 24px !important;
    height: 24px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.home-login .auth-portal-copy {
    gap: 3px;
    text-align: center;
}

body.home-login .auth-portal-copy b {
    margin: 0 !important;
    font-size: 16px !important;
    line-height: 1.3 !important;
    text-wrap: balance;
}

body.home-login .auth-portal-copy small {
    font-size: 12px !important;
    line-height: 1.35 !important;
}

body.home-login .auth-portal.teacher:last-child {
    grid-column: auto;
}

.home-login .auth-portal.office {
    --portal-accent: #b45309;
    --portal-soft: #fff7ed;
}

.home-login .auth-portal.korwil {
    --portal-accent: #0f766e;
    --portal-soft: #ecfdf5;
}

.home-login .auth-portal.teacher {
    --portal-accent: #1a73e8;
    --portal-soft: #e8f0fe;
}

body.home-login .auth-portal:active {
    transform: translateY(-1px) scale(.96) !important;
}

@media (prefers-reduced-motion: reduce) {
    body.home-login .auth-portal {
        transition-duration: 0s !important;
    }

    body.home-login .auth-portal:hover,
    body.home-login .auth-portal:active {
        transform: none !important;
    }
}

.department-welcome {
    display: grid;
    grid-template-columns: clamp(330px, 34vw, 400px) minmax(0, 1fr);
    gap: clamp(30px, 3.2vw, 40px);
    padding: clamp(26px, 3vw, 36px);
    align-items: start;
    color: #eaf4ff;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 20px;
    background: rgba(255, 255, 255, .09);
    box-shadow: 0 18px 44px rgba(1, 12, 31, .16);
    backdrop-filter: blur(12px);
}

.department-head-photo {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 15px;
    background: rgba(255, 255, 255, .14);
}

.department-head-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.department-welcome-kicker {
    display: block;
    margin-bottom: 7px;
    color: #bfdbfe;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.department-welcome h2 {
    margin: 0;
    color: #fff;
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: -.02em;
    text-wrap: balance;
}

.department-welcome p {
    max-width: 72ch;
    margin: 8px 0 0;
    color: rgba(239, 246, 255, .82);
    font-size: 15px;
    line-height: 1.45;
    text-align: left;
    text-align: start;
    word-spacing: normal;
    white-space: pre-line;
    overflow-wrap: break-word;
    hyphens: auto;
}

.department-welcome-copy {
    min-width: 0;
}

.settings-head-welcome-grid {
    display: grid;
    grid-template-columns: minmax(240px, .75fr) minmax(340px, 1.25fr);
    gap: 18px;
    align-items: start;
}

.settings-head-message {
    grid-row: span 2;
}

.settings-head-photo-preview {
    width: 82px;
    height: 98px;
}

.settings-head-photo-preview img {
    object-fit: cover;
}

.settings-head-photo-field {
    display: grid;
    gap: 7px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.settings-photo-remove {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

.user-assignment-scope {
    margin: 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.user-assignment-scope p {
    margin: 4px 0 12px;
    color: var(--muted);
    font-size: 12px;
}

@media screen and (max-width: 980px) {
    body.home-login .home-auth-wrap {
        max-width: 760px;
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .home-login .home-top-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    body.home-login .auth-portal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media screen and (max-width: 660px) {
    body.home-login .auth-portal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .department-welcome {
        grid-template-columns: 190px minmax(0, 1fr);
        gap: 20px;
        padding: 22px;
    }

    .department-head-photo {
        width: 190px;
        height: auto;
    }

    .settings-head-welcome-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media screen and (max-width: 900px) {
    body.home-login {
        overflow-x: clip;
        overflow-y: visible;
    }

    body.home-login .department-welcome {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 22px;
    }

    .department-head-photo {
        grid-column: 1;
        grid-row: 1;
        width: min(300px, 72vw);
        justify-self: center;
    }

    .department-welcome-copy {
        grid-column: 1;
        grid-row: 2;
        width: 100%;
    }

    .department-welcome h2,
    .department-welcome-kicker {
        text-align: center;
    }

    .home-sequence-actions {
        justify-content: center;
    }
}

@media screen and (max-width: 420px) {
    body.home-login .auth-portal-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body.home-login .auth-portal.teacher:last-child {
        grid-column: auto;
    }

    .department-head-photo {
        width: min(220px, 72vw);
    }
}

.home-auth-hero .auth-eyebrow,
.auth-hero .auth-eyebrow {
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.home-auth-hero h1,
.auth-hero h1 {
    text-shadow: none !important;
}

.role-login-heading {
    display: block !important;
    text-align: left !important;
    margin-bottom: 20px;
}

.auth-role-badge,
.student-badge {
    display: none !important;
}

/* Complete question-review workspace. */
.review-card-detailed {
    padding: 0;
    overflow: hidden;
    border-color: #d9e2ef;
    border-radius: 12px;
    margin-bottom: 12px;
}

.review-card-header {
    display: grid;
    gap: 9px;
    padding: 13px 16px;
    background: linear-gradient(135deg, #ffffff, var(--theme-primary-soft));
    border-bottom: 1px solid #dfe7f1;
}

.review-card-header .badge-row {
    align-items: center;
    gap: 4px;
}

.status-review {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.review-submitter {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.review-submitter > div,
.review-meta-grid > div {
    min-width: 0;
    padding: 7px 9px;
    background: rgba(255, 255, 255, .88);
    border: 1px solid #dfe7f1;
    border-radius: 8px;
}

.review-submitter span,
.review-meta-grid span {
    display: block;
    margin-bottom: 2px;
    color: #475569;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.review-submitter strong,
.review-meta-grid strong {
    display: block;
    color: #172033;
    font-size: 13px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.review-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 9px 16px 0;
}

.review-meta-grid > div {
    background: #f8fafc;
}

.review-content-block {
    margin: 8px 16px 0;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #dfe7f1;
    border-radius: 9px;
}

.review-content-block h3 {
    margin: 0 0 5px;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.review-content-block p {
    margin: 0;
}

.review-stimulus {
    background: #f8fbff;
    border-left: 4px solid var(--theme-primary);
}

.review-question-text {
    background: var(--theme-primary-soft);
    border-color: color-mix(in srgb, var(--theme-primary) 24%, #dfe7f1);
}

.review-question-text .review-preserve-text {
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
}

.review-preserve-text {
    color: #27364c;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.review-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
}

.review-media-item,
.review-option-media {
    display: grid;
    gap: 5px;
}

.review-media-item img,
.review-option-media img {
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    background: #f8fafc;
    border: 1px solid #dfe7f1;
    border-radius: 8px;
}

.review-media-item audio,
.review-option-media audio {
    width: 100%;
}

.review-media-item p,
.review-option-media small {
    color: #475569;
    font-size: 12px;
}

.review-option-list {
    display: grid;
    gap: 5px;
}

.review-option {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: start;
    padding: 7px 9px;
    background: #f8fafc;
    border: 1px solid #dfe7f1;
    border-radius: 8px;
}

.review-option.no-label {
    grid-template-columns: minmax(0, 1fr) auto;
}

.review-option.is-correct {
    background: #f0fdf4;
    border-color: #86efac;
}

.review-option-label {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: var(--theme-primary-dark);
    font-weight: 850;
    background: var(--theme-primary-soft);
    border-radius: 7px;
}

.review-option.is-correct .review-option-label {
    color: #166534;
    background: #dcfce7;
}

.review-option-body {
    min-width: 0;
}

.review-option-media {
    max-width: 540px;
    margin-top: 6px;
}

.review-answer-key {
    align-self: center;
    padding: 4px 7px;
    color: #166534;
    background: #dcfce7;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.review-empty-value {
    color: #7b8799;
    font-size: 12px;
    font-style: italic;
}

.review-explanation {
    background: #fffbeb;
    border-color: #fde68a;
}

.review-ai-page-message {
    color: var(--theme-primary-dark);
    font-weight: 700;
}

.review-ai-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 10px 16px 0;
    padding: 12px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: var(--theme-primary-soft);
}

.review-ai-trigger div,
.review-ai-trigger b,
.review-ai-trigger span {
    display: block;
}

.review-ai-trigger b {
    color: var(--theme-primary-dark);
    font-size: 13px;
}

.review-ai-trigger span {
    margin-top: 3px;
    color: #475569;
    font-size: 12px;
    line-height: 1.45;
}

.review-ai-trigger .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.review-ai-result {
    display: grid;
    gap: 12px;
    margin: 10px 16px 0;
    padding: 14px;
    border: 1px solid #bfdbfe;
    border-radius: 11px;
    background: linear-gradient(135deg, #f8fbff, #f5f3ff);
}

.review-ai-result > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dbeafe;
}

.review-ai-result > header span {
    display: block;
    margin-bottom: 3px;
    color: #6366f1;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.review-ai-result > header h3,
.review-ai-result h4 {
    margin: 0;
    color: #172033;
}

.review-ai-result > header h3 {
    font-size: 15px;
}

.review-ai-result h4 {
    margin-bottom: 7px;
    font-size: 12px;
}

.review-ai-verdict {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    white-space: nowrap;
}

.review-ai-verdict.is-valid {
    color: #166534;
    background: #dcfce7;
}

.review-ai-verdict.is-revision {
    color: #b45309;
    background: #fef3c7;
}

.review-ai-summary {
    margin: 0;
    color: #334155;
    font-size: 13px;
    line-height: 1.55;
}

.review-ai-media-warning {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    line-height: 1.45;
}

.review-ai-columns {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) minmax(320px, 1.7fr);
    gap: 12px;
}

.review-ai-columns > div {
    min-width: 0;
    padding: 11px;
    border: 1px solid #dfe7f1;
    border-radius: 9px;
    background: rgba(255, 255, 255, .86);
}

.review-ai-columns ul {
    display: grid;
    gap: 5px;
    margin: 0;
    padding-left: 18px;
    color: #475569;
    font-size: 12px;
    line-height: 1.45;
}

.review-ai-issues {
    display: grid;
    gap: 7px;
}

.review-ai-issues article {
    display: grid;
    gap: 4px;
    padding: 8px 9px;
    border-left: 3px solid #60a5fa;
    border-radius: 7px;
    background: #f8fafc;
}

.review-ai-issues article.severity-warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.review-ai-issues article.severity-danger {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.review-ai-issues article b,
.review-ai-issues article span {
    display: block;
}

.review-ai-issues article b {
    color: #1e293b;
    font-size: 12px;
}

.review-ai-issues article span,
.review-ai-issues article p,
.review-ai-empty {
    margin: 2px 0 0;
    color: #475569;
    font-size: 12px;
    line-height: 1.45;
}

.review-ai-comment {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px dashed #a5b4fc;
    border-radius: 9px;
    background: #ffffff;
}

.review-ai-comment span {
    color: #6366f1;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.review-ai-comment p {
    margin: 3px 0 0;
    color: #334155;
    font-size: 12px;
    line-height: 1.45;
}

.review-ai-disclaimer {
    color: #475569;
    font-size: 12px;
    line-height: 1.4;
}

.review-ai-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.review-ai-refresh {
    margin: 0;
}

.review-ai-alignment {
    margin-top: 6px;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid #dfe7f1;
    border-radius: 8px;
    color: #334155;
    font-size: 12px;
    line-height: 1.45;
}

.review-ai-alignment .badge {
    display: inline-block;
    margin-left: 8px;
}

/* Panel acuan kompetensi TKA pada halaman peninjauan soal. */
.review-guide {
    margin-bottom: 12px;
}

.review-guide > summary {
    padding: 11px 16px;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    user-select: none;
}

.review-guide[open] > summary {
    border-bottom: 1px solid #dfe7f1;
}

.review-guide-body {
    padding: 12px 16px 16px;
    display: grid;
    gap: 14px;
}

.review-guide-intro {
    margin: 0;
    color: #334155;
    font-size: 13px;
    line-height: 1.55;
}

.review-guide-subject {
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.review-guide-subject h3 {
    margin: 0 0 4px;
    font-size: 14px;
    color: #1e293b;
}

.review-guide-ref {
    margin: 0 0 4px;
    color: #475569;
    font-size: 12px;
    font-style: italic;
}

.review-guide-subject p {
    margin: 4px 0;
    color: #475569;
    font-size: 12px;
    line-height: 1.5;
}

.review-guide-list {
    margin: 8px 0 0;
    padding-left: 20px;
    color: #334155;
    font-size: 12px;
    line-height: 1.5;
}

.review-guide-list ul {
    margin: 3px 0 8px;
    padding-left: 18px;
}

.review-guide-block {
    margin-top: 8px;
}

.review-guide-block b {
    display: block;
    margin-bottom: 3px;
    color: #334155;
    font-size: 12px;
}

.review-guide-block ul {
    margin: 0;
    padding-left: 18px;
    columns: 2;
    column-gap: 24px;
    color: #475569;
    font-size: 12px;
    line-height: 1.45;
}

.review-guide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.review-guide-table th,
.review-guide-table td {
    padding: 5px 8px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

.review-guide-table th {
    background: #eff6ff;
    color: #1e40af;
}

.review-guide-elements dt {
    margin-top: 6px;
    color: #1e293b;
    font-size: 12px;
    font-weight: 700;
}

.review-guide-elements dd {
    margin: 2px 0 0;
    color: #475569;
    font-size: 12px;
    line-height: 1.45;
}


/* Guru Kontributor dan rekap soal staf. */
.contributor-profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.contributor-profile-grid > div {
    min-width: 0;
    padding: 9px 11px;
    background: #f8fafc;
    border: 1px solid #dfe7f1;
    border-radius: 9px;
}

.contributor-profile-grid span {
    display: block;
    margin-bottom: 2px;
    color: #475569;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.contributor-profile-grid strong {
    color: #1e293b;
    font-size: 13px;
    word-break: break-word;
}

.section-head {
    display: grid;
    gap: 3px;
    margin-bottom: 12px;
}

.section-head h2 {
    margin: 0;
    color: #1e293b;
    font-size: 16px;
}

.section-head p {
    margin: 0;
    color: #475569;
    font-size: 12px;
}

.contributor-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.contributor-stat {
    padding: 12px 14px;
    background: linear-gradient(135deg, #ffffff, var(--theme-primary-soft, #eff6ff));
    border: 1px solid #dfe7f1;
    border-radius: 10px;
}

.contributor-stat b {
    display: block;
    color: #1e293b;
    font-size: 24px;
    line-height: 1.15;
}

.contributor-stat span {
    display: block;
    margin-top: 3px;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.contributor-stat.is-approved b {
    color: #15803d;
}

.contributor-stat.is-revision b {
    color: #c2410c;
}

.ai-summary-cell {
    display: block;
    max-width: 280px;
    margin-top: 2px;
    color: #475569;
    font-size: 12px;
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
}


.review-actions.review-decision {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(190px, 240px) auto;
    gap: 8px;
    align-items: end;
    margin-top: 10px;
    padding: 11px 16px 13px;
    background: #f8fafc;
    border-top: 1px solid #dfe7f1;
}

.review-decision label {
    display: grid;
    gap: 4px;
    color: #334155;
    font-size: 12px;
    font-weight: 750;
}

.review-decision textarea,
.review-decision select {
    margin: 0;
}

.review-decision .btn {
    min-height: 38px;
    white-space: nowrap;
}

@media (max-width: 980px) {
    .review-submitter,
    .review-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .review-actions.review-decision {
        grid-template-columns: 1fr 210px;
    }

    .review-decision .btn {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .review-ai-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .review-card-header,
    .review-meta-grid,
    .review-actions.review-decision {
        padding-left: 12px;
        padding-right: 12px;
    }

    .review-submitter,
    .review-meta-grid,
    .review-actions.review-decision {
        grid-template-columns: 1fr;
    }

    .review-content-block {
        margin-left: 12px;
        margin-right: 12px;
    }

    .review-option {
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .review-answer-key {
        grid-column: 2;
        justify-self: start;
    }

    .review-decision .btn {
        grid-column: auto;
        width: 100%;
    }

    .review-ai-trigger,
    .review-ai-result {
        margin-left: 12px;
        margin-right: 12px;
    }

    .review-ai-trigger,
    .review-ai-result > header,
    .review-ai-comment {
        align-items: stretch;
        flex-direction: column;
    }

    .review-ai-trigger .btn,
    .review-ai-comment .btn {
        width: 100%;
    }

    .review-ai-media-warning {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}

/* Settings workspace */
.settings-page-head {
    align-items: flex-start;
    padding: 14px 18px;
}

.settings-page-head h1 {
    margin: 0;
    font-size: 24px;
}

.settings-page-head p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

.settings-restart-panel {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) max-content;
    gap: 14px;
    align-items: center;
    margin: 0 0 16px;
    padding: 14px 16px;
    border: 1px solid var(--warning-border);
    border-radius: 14px;
    background: var(--warning-soft);
    box-shadow: inset 3px 0 0 var(--warning);
}

.settings-restart-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 11px;
    background: #fff;
    color: var(--warning);
    box-shadow: 0 1px 3px rgb(15 23 42 / 8%);
}

.settings-restart-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.settings-restart-copy {
    min-width: 0;
}

.settings-restart-copy h2,
.settings-restart-copy p {
    margin: 0;
}

.settings-restart-copy h2 {
    color: var(--text);
    font-size: 14px;
}

.settings-restart-copy p {
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
}

.settings-restart-copy span {
    display: block;
    margin-top: 4px;
    color: #8a5a00;
    font-size: 12px;
    font-weight: 700;
}

.settings-restart-copy span.is-error {
    color: #b42318;
}

.settings-restart-copy span.is-success {
    color: #047857;
}

.settings-restart-panel form {
    margin: 0;
}

.settings-restart-panel .btn {
    min-width: 170px;
    min-height: 40px;
    transition-property: transform, filter, box-shadow, background-color, border-color, color;
    transition-duration: 150ms;
}

.settings-restart-panel .btn:active {
    transform: scale(0.96);
}

.settings-form {
    display: grid;
    gap: var(--sp-3);
    margin-left: 22px;
    margin-right: 22px;
    margin-bottom: 16px;
}

.settings-form .settings-panel {
    margin-bottom: 0;
}

.settings-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: var(--sp-2);
    margin-bottom: var(--sp-3);
    border-bottom: 1px solid var(--border-light);
}

.settings-section-heading h2 {
    margin: 0 0 4px;
}

.settings-section-heading p {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.settings-field-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--sp-3);
}

.settings-field-wide {
    grid-column: auto;
}

.settings-field-grid input,
.settings-field-grid select {
    width: 100%;
}

.settings-support-grid,
.settings-support-toggle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-toggle-section {
    margin-top: var(--sp-4);
    padding-top: var(--sp-3);
    border-top: 1px solid var(--border-light);
}

.settings-subheading h3 {
    margin: 0 0 3px;
    font-size: 14px;
}

.settings-subheading p {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
}

.settings-toggle-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--sp-2);
    margin-top: var(--sp-3);
}

.settings-toggle {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-2);
    min-height: auto;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
    cursor: pointer;
    transition: var(--transition);
}

.settings-toggle:hover {
    border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
    background: color-mix(in srgb, var(--primary-soft) 72%, #ffffff);
}

.settings-toggle:has(input:checked) {
    border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
    background: var(--primary-soft);
    box-shadow: inset 3px 0 0 var(--primary);
}

.settings-toggle:has(input:focus-visible) {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

.settings-toggle-warning:has(input:checked) {
    border-color: #fbbf24;
    background: var(--warning-soft);
    box-shadow: inset 3px 0 0 var(--warning);
}

.settings-toggle input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--primary);
}

.settings-toggle span,
.settings-toggle b,
.settings-toggle small {
    display: block;
}

.settings-toggle b {
    color: var(--text);
    font-size: 13px;
    line-height: 1.35;
}

.settings-toggle small {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}

.settings-logo-field {
    grid-column: auto;
}

.settings-logo-upload {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 70px;
    padding: 10px;
    border: 1px dashed #b8c8dc;
    border-radius: 12px;
    background: var(--bg);
}

.settings-logo-preview {
    display: grid;
    width: 48px;
    height: 48px;
    overflow: hidden;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}

.settings-logo-preview img {
    max-width: 40px;
    max-height: 40px;
    object-fit: contain;
}

.settings-logo-picker {
    position: relative;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 38px;
}

.settings-logo-picker input {
    position: absolute;
    z-index: 2;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.settings-file-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 9px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 750;
}

.settings-logo-picker small {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 550;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-field-help {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}

.settings-save-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: var(--sp-3);
    padding-top: var(--sp-3);
    border-top: 1px solid var(--border-light);
}

.settings-save-bar p {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
}

.settings-primary-action,
.settings-panel-actions .btn {
    width: 210px;
    min-height: 40px;
    border-radius: 10px;
}

.settings-data-panel {
    padding: 0 !important;
    overflow: hidden;
}

.settings-data-panel .settings-section-heading {
    margin: 0;
    padding: 18px 20px;
    background: linear-gradient(180deg, #fff, #fbfdff);
}

.settings-panel-actions,
.settings-panel-actions form {
    display: flex;
    align-items: center;
    margin: 0;
}

.settings-panel-actions .btn {
    min-width: 210px;
}

.settings-data-panel .table-wrap {
    border: 0;
    border-top: 1px solid var(--border-light);
    border-radius: 0;
}

.settings-table {
    min-width: 760px;
}

.settings-history-table {
    min-width: 1060px;
}

.settings-table th {
    position: static;
}

.settings-file-name {
    color: var(--text-secondary);
    overflow-wrap: anywhere;
}

.settings-action-column,
.settings-action-cell {
    width: 110px;
    text-align: right;
}

.settings-backup-table .settings-action-column,
.settings-backup-table .settings-action-cell {
    width: 276px;
    min-width: 276px;
}

.settings-backup-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.settings-backup-actions form,
.settings-backup-delete-only {
    display: inline-flex;
    margin: 0;
}

.settings-backup-actions .btn,
.settings-backup-delete-only .btn {
    min-height: 32px;
    white-space: nowrap;
}

.settings-backup-table .empty b,
.settings-backup-table .empty span {
    display: block;
}

.settings-backup-table .empty span {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
}

.settings-message-cell {
    min-width: 280px;
    line-height: 1.4;
}

.settings-count {
    display: inline-grid;
    min-width: 28px;
    min-height: 26px;
    place-items: center;
    border-radius: 8px;
    font-size: 12px;
}

.settings-count-success {
    color: #047857;
    background: var(--success-soft);
}

.settings-count-failed {
    color: #b42318;
    background: var(--danger-soft);
}

.infrastructure-form {
    margin-top: 0;
}

.deployment-form {
    margin-top: 0;
}

.deployment-panel {
    scroll-margin-top: 20px;
}

.deployment-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.deployment-summary-grid > div {
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg) 92%, #ffffff);
}

.deployment-summary-grid span,
.deployment-summary-grid b,
.deployment-summary-grid small {
    display: block;
}

.deployment-summary-grid span {
    margin-bottom: 5px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 650;
}

.deployment-summary-grid b {
    color: var(--text);
    font-size: 13px;
}

.deployment-summary-grid small {
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.deployment-summary-grid .is-ready {
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.deployment-summary-grid .is-not-ready {
    border-color: #fde68a;
    background: #fffbeb;
}

.deployment-topology-block {
    padding: 12px;
}

.deployment-single-note,
.deployment-auto-state,
.deployment-storage-state {
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: #fff;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.4;
}

.deployment-single-note[hidden],
.deployment-cluster-settings[hidden],
.deployment-public-settings[hidden] {
    display: none;
}

.deployment-cluster-settings {
    margin-top: 12px;
}

.deployment-network-block,
.deployment-ssh-block {
    margin-bottom: 10px;
    padding: 12px;
}

.deployment-control-node-field {
    margin-top: 10px;
}

.deployment-public-settings {
    display: grid;
    grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr);
    gap: 10px;
    min-width: 0;
    margin-top: 10px;
    align-items: start;
}

.deployment-public-settings > * {
    min-width: 0;
}

.deployment-public-settings label,
.deployment-public-settings input {
    width: 100%;
}

.deployment-public-settings small {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
}

.settings-warning {
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 12px;
    line-height: 1.4;
    overflow-wrap: anywhere;
    white-space: normal;
}

.deployment-field-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(220px, .65fr);
    gap: 14px;
    align-items: start;
}

.deployment-field-grid label,
.deployment-field-grid textarea,
.deployment-field-grid input {
    width: 100%;
}

.deployment-field-grid textarea {
    min-height: 132px;
    resize: vertical;
    font-family: var(--font);
    line-height: 1.5;
}

.deployment-field-grid small {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
}

.deployment-node-editor {
    margin-top: 10px;
}

.deployment-node-heading {
    margin-bottom: 8px;
}

.deployment-node-heading h3 {
    margin: 0;
    color: var(--text);
    font-size: 15px;
}

.deployment-node-list {
    display: grid;
    gap: 8px;
}

.deployment-node-row {
    min-width: 0;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: #f8fafc;
}

.deployment-node-row legend {
    padding: 0 6px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 750;
}

.deployment-node-fields {
    display: grid;
    grid-template-columns:
        minmax(96px, 0.7fr)
        minmax(142px, 1.1fr)
        minmax(112px, 0.8fr)
        minmax(112px, 0.85fr)
        minmax(76px, 0.55fr)
        minmax(220px, 1.65fr)
        auto;
    gap: 8px;
    align-items: start;
}

.deployment-node-fields label,
.deployment-node-fields input {
    min-width: 0;
    width: 100%;
}

.deployment-node-fields label {
    gap: 4px;
    font-size: 12px;
}

.deployment-node-fields small {
    display: block;
    margin-top: 1px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.25;
}

.deployment-node-password {
    grid-column: auto;
}

.deployment-node-remove {
    align-self: start;
    min-height: 36px;
    margin-top: 20px;
    padding-inline: 12px;
    white-space: nowrap;
}

.deployment-backend-limit {
    max-width: 480px;
    margin-top: 10px;
    grid-template-columns: minmax(0, 1fr);
}

.deployment-auto-state {
    display: flex;
    align-items: center;
    gap: 8px;
    border-color: #bfdbfe;
    background: var(--primary-soft);
}

.deployment-auto-state > span {
    display: inline-grid;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 6px;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.deployment-auto-state b,
.deployment-auto-state small {
    display: block;
}

.deployment-storage-state span,
.deployment-storage-state b,
.deployment-storage-state code,
.deployment-storage-state small {
    display: block;
}

.deployment-storage-state span {
    margin-bottom: 4px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 650;
}

.deployment-storage-state b {
    color: var(--text);
    font-size: 12px;
}

.deployment-storage-state code {
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.deployment-storage-state small {
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
}

.deployment-auto-state b {
    color: var(--primary-dark);
    font-size: 12px;
}

.deployment-auto-state small {
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
}

.deployment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.deployment-actions .btn {
    min-height: 40px;
}

.google-oauth-form {
    margin-top: 0;
}

.google-oauth-panel {
    scroll-margin-top: 20px;
}

.google-oauth-state.is-disabled {
    border-color: var(--border);
    background: var(--bg);
    color: var(--text-muted);
}

.google-oauth-grid {
    display: grid;
    grid-template-columns: minmax(240px, .85fr) minmax(320px, 1.15fr);
    gap: var(--sp-3);
    align-items: start;
}

.google-oauth-toggle {
    min-height: auto;
}

.google-oauth-upload {
    min-width: 0;
    padding: var(--sp-3);
    border: 1px solid var(--border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg) 92%, #ffffff);
}

.google-oauth-upload > label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 12px;
    font-weight: 750;
}

.google-oauth-file-input {
    width: 100%;
    min-height: 42px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text-secondary);
    font-size: 12px;
}

.google-oauth-file-input::file-selector-button {
    min-height: 32px;
    margin-right: 10px;
    padding: 6px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    cursor: pointer;
    font: inherit;
    font-weight: 750;
}

.google-oauth-file-input:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

.google-oauth-file-name {
    display: block;
    margin-top: 7px;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.google-oauth-upload .settings-field-help {
    display: block;
    margin-top: 7px;
}

.google-oauth-details {
    display: grid;
    grid-template-columns: minmax(160px, .6fr) minmax(280px, 1.4fr);
    gap: 10px;
    margin-top: var(--sp-2);
}

.google-oauth-details > div {
    min-width: 0;
    padding: var(--sp-2);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: #fff;
}

.google-oauth-details span,
.google-oauth-details b,
.google-oauth-details code {
    display: block;
}

.google-oauth-details span {
    margin-bottom: 5px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 650;
}

.google-oauth-details b,
.google-oauth-details code {
    color: var(--text-secondary);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.google-oauth-redirect {
    grid-column: 1 / -1;
}

.infrastructure-panel {
    scroll-margin-top: 20px;
}

.infrastructure-state {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
}

.infrastructure-state.is-pending {
    border-color: #fde68a;
    background: #fffbeb;
    color: #a16207;
}

.infrastructure-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 12px;
}

.infrastructure-block {
    min-width: 0;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--bg) 92%, #ffffff);
}

.infrastructure-block legend {
    padding: 0 7px;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}

.infrastructure-domain-block {
    grid-column: 1 / -1;
}

.infrastructure-block[data-media-settings] {
    grid-column: 1 / -1;
}

.infrastructure-domain-layout {
    display: grid;
    grid-template-columns: minmax(260px, .9fr) minmax(0, 1.1fr);
    gap: 12px;
    align-items: center;
}

.infrastructure-domain-layout > label {
    min-width: 0;
}

.infrastructure-domain-layout input {
    width: 100%;
}

.infrastructure-domain-layout label small {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}

.infrastructure-domain-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.infrastructure-domain-preview > div {
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: #fff;
}

.infrastructure-domain-preview span,
.infrastructure-domain-preview code {
    display: block;
}

.infrastructure-domain-preview span {
    margin-bottom: 3px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 650;
}

.infrastructure-domain-preview code {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.infrastructure-help {
    margin: 0 0 9px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
}

.infrastructure-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.infrastructure-media-choices {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.infrastructure-choice {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 56px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition-property: border-color, background-color, box-shadow;
    transition-duration: 150ms;
}

.infrastructure-choice:hover {
    border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
}

.infrastructure-choice:has(input:checked) {
    border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
    background: var(--primary-soft);
    box-shadow: inset 3px 0 0 var(--primary);
}

.infrastructure-choice:has(input:focus-visible) {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

.infrastructure-choice input {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin: 1px 0 0;
    accent-color: var(--primary);
}

.infrastructure-choice span,
.infrastructure-choice b,
.infrastructure-choice small {
    display: block;
}

.infrastructure-choice b {
    font-size: 12px;
    line-height: 1.35;
}

.infrastructure-choice small {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
}

.infrastructure-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.infrastructure-field-grid[hidden],
.infrastructure-local-note[hidden],
.infrastructure-inline-check[hidden] {
    display: none;
}

.infrastructure-field-grid input,
.infrastructure-field-grid select {
    width: 100%;
}

.infrastructure-field-grid small {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
}

.infrastructure-field-wide {
    grid-column: 1 / -1;
}

.infrastructure-inline-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: #fff;
}

.infrastructure-inline-check input {
    width: 17px;
    height: 17px;
    margin: 1px 0 0;
    accent-color: var(--primary);
}

.infrastructure-inline-check span,
.infrastructure-inline-check b,
.infrastructure-inline-check small {
    display: block;
}

.infrastructure-inline-check b {
    font-size: 12px;
}

.infrastructure-inline-check small {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
}

.infrastructure-path-style {
    grid-column: 1 / -1;
    margin-top: 0;
}

.infrastructure-local-note {
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: #fff;
    color: var(--text-secondary);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.connection-check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
}

.connection-check-row .btn {
    flex: 0 0 auto;
    min-width: 190px;
    min-height: 36px;
    transition-property: transform, border-color, color, background-color;
    transition-duration: 150ms;
}

.connection-check-row .btn:active {
    transform: scale(0.96);
}

.connection-result {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
}

.connection-result.is-checking {
    color: var(--primary-dark);
}

.connection-result.is-success {
    color: #047857;
    font-weight: 700;
}

.connection-result.is-error {
    color: #b42318;
    font-weight: 700;
}

.infrastructure-save-bar {
    margin-top: 14px;
}

@media (prefers-reduced-motion: reduce) {
    .connection-check-row .btn,
    .settings-restart-panel .btn {
        transition-property: border-color, color, background-color;
    }

    .connection-check-row .btn:active,
    .settings-restart-panel .btn:active {
        transform: none;
    }
}

@media (max-width: 1120px) {
    .settings-field-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settings-toggle-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .infrastructure-stack {
        grid-template-columns: minmax(0, 1fr);
    }

    .deployment-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .deployment-node-fields {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .deployment-node-password {
        grid-column: span 2;
    }
}

@media (max-width: 900px) {
    .settings-page-head,
    .settings-restart-panel,
    .settings-form,
    .settings-data-panel {
        margin-left: 12px !important;
        margin-right: 12px !important;
    }
}

@media (max-width: 720px) {
    .settings-restart-panel {
        grid-template-columns: 40px minmax(0, 1fr);
        align-items: start;
        padding: 14px;
    }

    .settings-restart-icon {
        width: 40px;
        height: 40px;
    }

    .settings-restart-panel form {
        grid-column: 1 / -1;
    }

    .settings-restart-panel .btn {
        width: 100%;
    }

    .settings-page-head,
    .settings-section-heading,
    .settings-save-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .settings-page-head,
    .settings-panel {
        padding: 16px;
    }

    .settings-form .settings-panel {
        padding: 16px !important;
    }

    .settings-field-grid,
    .settings-toggle-grid,
    .google-oauth-grid,
    .google-oauth-details,
    .infrastructure-choice-grid,
    .infrastructure-media-choices,
    .infrastructure-field-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .deployment-summary-grid,
    .deployment-field-grid,
    .deployment-public-settings,
    .deployment-node-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .deployment-node-password {
        grid-column: auto;
    }

    .deployment-node-remove {
        width: 100%;
        min-height: 44px;
        margin-top: 0;
    }

    .deployment-actions,
    .deployment-actions .btn {
        width: 100%;
    }

    .infrastructure-domain-layout,
    .infrastructure-domain-preview {
        grid-template-columns: minmax(0, 1fr);
    }

    .settings-field-wide,
    .settings-logo-field,
    .google-oauth-redirect,
    .infrastructure-field-wide,
    .infrastructure-path-style {
        grid-column: auto;
    }

    .connection-check-row {
        align-items: stretch;
        flex-direction: column;
    }

    .connection-check-row .btn {
        width: 100%;
        min-height: 44px;
    }

    .settings-logo-upload {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .settings-logo-preview {
        width: 42px;
        height: 42px;
    }

    .settings-primary-action,
    .settings-panel-actions,
    .settings-panel-actions form,
    .settings-panel-actions .btn {
        width: 100%;
    }

    .settings-data-panel {
        padding: 0 !important;
    }

    .settings-data-panel .settings-section-heading {
        padding: 16px;
    }
}

/* Keep every dashboard section on one continuous left/right boundary. */
.dashboard-v2 > .dashboard-summary-grid,
.dashboard-v2 > .dashboard-operations-grid,
.dashboard-v2 > .dashboard-evaluation-section,
.dashboard-evaluation-live > .dashboard-evaluation-section,
.dashboard-v2 > .dashboard-quick-section {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

.dashboard-v2 > .dashboard-evaluation-section,
.dashboard-evaluation-live > .dashboard-evaluation-section {
    gap: 14px;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.dashboard-v2 .dashboard-section-heading {
    min-height: 0;
    margin: 0;
    padding: 0 2px 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.dashboard-v2 .dashboard-level-block {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
}

.dashboard-v2 .dashboard-level-block + .dashboard-level-block {
    margin-top: 0;
}

@media (max-width: 720px) {
    .dashboard-v2 > .dashboard-evaluation-section,
    .dashboard-evaluation-live > .dashboard-evaluation-section {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    .dashboard-live-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-live-meta .dashboard-summary-hint {
        margin-bottom: 0;
    }
}

/* Optional AI analysis settings and report provenance. */
.settings-ai-panel {
    overflow: hidden;
}

.form-error-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
    border-radius: 12px;
    background: #fef2f2;
    color: #991b1b;
}

.form-error-summary p {
    margin: 3px 0 0;
    color: #7f1d1d;
    line-height: 1.45;
}

.form-error-summary > div {
    min-width: 0;
}

.form-error-summary a {
    flex: 0 0 auto;
    color: #991b1b;
    font-size: 12px;
    font-weight: 750;
	overflow-wrap: anywhere;
}

.settings-ai-grid .has-field-error input,
.settings-ai-grid .has-field-error select {
    border-color: #dc2626;
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.08);
}

.settings-ai-grid .field-error {
    color: #b91c1c;
    font-weight: 650;
}

.settings-ai-state,
.report-ai-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
    white-space: nowrap;
}

.settings-ai-state.is-on,
.report-ai-badge.is-ai {
    border-color: #86efac;
    background: #ecfdf3;
    color: #047857;
}

.settings-ai-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--sp-3);
    align-items: start;
}

.settings-ai-grid > label:not(.settings-toggle) {
    min-width: 0;
}

.settings-ai-grid input,
.settings-ai-grid select {
    width: 100%;
}

.settings-ai-toggle {
    min-height: auto;
    grid-column: span 2;
}

[data-ai-9router-option][hidden] {
    display: none;
}

.settings-ai-url {
    grid-column: span 2;
}

.settings-ai-key-block {
    display: grid;
    grid-column: 1 / -1;
    gap: 6px;
    min-width: 0;
}

.settings-ai-key-label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.settings-ai-key-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 12px;
    align-items: stretch;
    min-width: 0;
}

.settings-ai-key-controls input {
    min-width: 0;
}

.settings-ai-test-button {
    min-height: 44px;
    min-width: 148px;
    white-space: nowrap;
}

.settings-ai-test-button[aria-busy="true"]::before {
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    content: "";
    animation: settings-ai-test-spin .75s linear infinite;
}

@keyframes settings-ai-test-spin {
    to { transform: rotate(360deg); }
}

.settings-ai-key-meta {
    display: block;
    min-width: 0;
}

.settings-ai-key-meta > small {
    min-width: 0;
}

.settings-ai-test-result {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    min-width: 0;
    margin: 0;
    padding: 6px 9px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
    overflow-wrap: anywhere;
    text-align: left;
}

.settings-ai-test-result::before {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    content: "";
}

.settings-ai-test-result.is-checking::before {
    background: var(--primary);
}

.settings-ai-test-result.is-checking {
    border-color: #bfdbfe;
    background: var(--primary-soft);
}

.settings-ai-test-result.is-success::before {
    background: #059669;
}

.settings-ai-test-result.is-success {
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.settings-ai-test-result.is-error::before {
    background: #dc2626;
}

.settings-ai-test-result.is-error {
    border-color: #fecaca;
    background: #fff1f2;
}

.settings-ai-note {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 10px;
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
}

.settings-ai-note b {
    color: var(--primary-dark);
}

.proctor-ai-settings-panel {
    max-width: 1180px;
}

.proctor-ai-settings-actions {
    justify-content: flex-end;
    margin-top: 18px;
}

.report-workspace .section-heading .report-ai-badge {
    margin-left: auto;
}

@media (max-width: 1120px) {
    .settings-ai-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settings-ai-toggle {
        grid-column: auto;
    }
}

@media (max-width: 720px) {
	.form-error-summary {
		flex-direction: column;
		gap: 8px;
	}

    .settings-ai-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .settings-ai-url,
    .settings-ai-key-block {
        grid-column: auto;
    }

    .settings-ai-key-controls {
        grid-template-columns: minmax(0, 1fr);
    }

    .settings-ai-test-button {
        width: 100%;
    }

    .settings-ai-test-result {
        justify-content: flex-start;
        text-align: left;
    }

    .settings-ai-note {
        grid-template-columns: minmax(0, 1fr);
        gap: 3px;
    }

    .report-workspace .section-heading .report-ai-badge {
        align-self: flex-start;
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .settings-ai-test-button[aria-busy="true"]::before {
        animation: none;
    }
}

/* UI clarity and responsive system — jakub.kr skill pass. */
:root {
    --bg: #f4f7fb;
    --bg-card: #ffffff;
    --bg-hover: #f8fafc;
    --border: #dbe4ef;
    --border-light: #edf2f7;
    --text: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --focus-ring: #1d4ed8;
    --shadow-sm: 0 0 0 1px rgba(15, 23, 42, .045), 0 1px 2px rgba(15, 23, 42, .05);
    --shadow: 0 0 0 1px rgba(15, 23, 42, .05), 0 4px 14px rgba(15, 23, 42, .055);
    --shadow-md: 0 0 0 1px rgba(15, 23, 42, .06), 0 8px 22px rgba(15, 23, 42, .09);
    --transition: background-color .15s ease-out, border-color .15s ease-out, color .15s ease-out, box-shadow .15s ease-out, transform .15s ease-out;
    /* Skala tipografi terpusat (ringkas & rapat). Hierarki judul turun
       berjenjang; body dan kontrol dijaga nyaman dibaca. */
    --fs-page: 20px;
    --fs-panel: 16px;
    --fs-sub: 15px;
    --fs-body: 14px;
    --fs-table: 13px;
    --fs-cap: 12px;
    --lh-tight: 1.2;
    --lh-body: 1.55;
    /* Skala jarak terpusat agar padding/gap kartu konsisten & rapat. */
    --sp-1: 6px;
    --sp-2: 10px;
    --sp-3: 12px;
    --sp-4: 16px;
}

html {
    color: var(--text);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    line-height: 1.55;
}

::selection {
    background: #bfdbfe;
    color: #0f172a;
}

a {
    text-decoration-skip-ink: auto;
    text-underline-offset: 3px;
}

p,
.muted,
small {
    overflow-wrap: break-word;
    text-wrap: pretty;
}

h1,
h2,
h3 {
    text-wrap: balance;
}

button,
a,
input,
select,
textarea,
label {
    touch-action: manipulation;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--focus-ring) !important;
    outline-offset: 3px !important;
}

.skip-link {
    position: fixed;
    z-index: 4000;
    inset-block-start: 12px;
    inset-inline-start: -999px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #0f172a;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: var(--shadow-md);
}

.skip-link:focus {
    inset-inline-start: 12px;
}

#main-content {
    min-width: 0;
    scroll-margin-top: 80px;
}

.ui-icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.ui-icon-sprite symbol,
.nav-icon,
.menu-button svg,
.topbar-date-icon,
.side-account-chevron,
.empty-state-icon svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.sidebar nav a {
    min-height: 42px;
    padding: 10px 12px !important;
    border-radius: 10px;
    color: rgba(255, 255, 255, .84) !important;
    font-size: 14px !important;
    font-weight: 650 !important;
    line-height: 1.35;
    transition: background-color .14s ease-out, color .14s ease-out, transform .14s ease-out !important;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    color: #fff !important;
}

.sidebar nav a.active {
    background: rgba(255, 255, 255, .16) !important;
    box-shadow: inset 3px 0 0 #60a5fa;
}

.nav-icon {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
}

.menu-button svg,
.topbar-date-icon {
    width: 20px;
    height: 20px;
}

.side-account {
    position: relative;
    display: block !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.side-account-trigger {
    display: grid;
    width: 100%;
    min-height: 58px;
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 13px;
    background: rgba(255, 255, 255, .07);
    color: #fff;
    font: inherit;
    text-align: start;
    cursor: pointer;
    transition: background-color .15s ease-out, border-color .15s ease-out !important;
}

.side-account-trigger:hover,
.side-account-trigger[aria-expanded="true"] {
    border-color: rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .12);
}

.side-account-trigger .avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-weight: 800;
}

.side-account-trigger .avatar img {
    outline: 1px solid oklch(1 0 0 / .12);
    outline-offset: -1px;
}

.side-account-trigger .avatar-default {
    padding: 4px;
    background: #fff;
}

.side-account-trigger .avatar-default img {
    border-radius: 7px;
    object-fit: contain;
}

.side-account-copy {
    display: block;
    min-width: 0;
}

.side-account-copy b,
.side-account-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-account-copy b {
    color: #fff !important;
    font-size: 13px !important;
    line-height: 1.25;
}

.side-account-copy span {
    margin-top: 2px;
    color: rgba(255, 255, 255, .7) !important;
    font-size: 12px !important;
    line-height: 1.3;
}

.side-account-chevron {
    width: 17px;
    height: 17px;
    transform: rotate(-90deg);
    transition: transform .15s ease-out;
}

.side-account-trigger[aria-expanded="true"] .side-account-chevron {
    transform: rotate(90deg);
}

.side-account .user-menu-popover:not([hidden]) {
    display: block !important;
}

.side-account .user-menu-popover {
    width: min(230px, calc(100vw - 32px));
    padding: 10px;
    border-radius: 15px;
    overscroll-behavior: contain;
}

.user-menu-profile,
.user-menu-logout {
    min-height: 40px;
    font-size: 13px !important;
}

.topbar {
    min-height: 58px;
    padding-block: 10px !important;
}

.topbar-left,
.topbar-date {
    color: var(--text-secondary) !important;
    font-size: 13px !important;
    line-height: 1.4;
}

.page-head,
.content-title {
    gap: 20px;
}

.page-head > div:first-child,
.content-title > div:first-child,
.section-heading > div:first-child {
    min-width: 0;
}

.page-head h1,
.page-head h2,
.content-title h1 {
    margin: 0;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: var(--fs-page) !important;
    font-weight: 700 !important;
    letter-spacing: -.02em;
    line-height: var(--lh-tight);
}

.page-head p,
.content-title p,
.section-heading p {
    max-width: 68ch;
    margin: 6px 0 0;
    color: var(--text-secondary) !important;
    font-size: var(--fs-body) !important;
    line-height: var(--lh-body);
}

.panel,
.page-head {
    border-color: var(--border) !important;
    box-shadow: var(--shadow-sm) !important;
}

.panel {
    padding: clamp(12px, 1vw, 16px) !important;
}

.panel h2 {
    font-size: var(--fs-panel) !important;
    line-height: var(--lh-tight);
}

.panel h3 {
    font-size: var(--fs-sub) !important;
    line-height: 1.3;
}

/* Judul kartu sesi sebelumnya mewarisi ukuran default; disamakan ke sub-judul. */
.session-card h3 {
    font-size: var(--fs-sub);
    line-height: 1.25;
    font-weight: 700;
}

.btn {
    min-height: 40px;
    padding: 9px 15px;
    border-radius: 10px;
    font-size: var(--fs-table);
    line-height: 1.35;
    transition: background-color .15s ease-out, border-color .15s ease-out, color .15s ease-out, box-shadow .15s ease-out, transform .15s ease-out !important;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn.tiny {
    min-height: 34px;
    padding: 7px 10px;
    font-size: var(--fs-cap);
}

input,
select,
textarea {
    min-height: 42px;
    padding: 9px 11px;
    border-color: #cbd5e1;
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.45;
    transition: background-color .15s ease-out, border-color .15s ease-out, box-shadow .15s ease-out !important;
}

textarea {
    min-height: 112px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

label {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
}

label > small,
.settings-field-help {
    color: var(--text-muted) !important;
    font-size: 12px !important;
    font-weight: 500;
    line-height: 1.45;
}

.filter-form,
.list-filter-form {
    gap: 12px !important;
    padding: 14px !important;
    background: #f8fafc !important;
}

.filter-form label,
.list-filter-form label {
    color: var(--text-secondary) !important;
    font-size: var(--fs-cap) !important;
    font-weight: 600;
    letter-spacing: .01em;
}

.filter-form input,
.filter-form select,
.list-filter-form input,
.list-filter-form select {
    min-height: 40px !important;
    font-size: 14px !important;
}

.inline-upload {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    min-width: min(100%, 270px);
}

.inline-upload-file {
    display: grid;
    flex: 1 1 190px;
    min-width: 0;
    gap: 4px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
}

.inline-upload-file > span {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 800;
}

.inline-upload-file input[type="file"] {
    width: 100%;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 12px;
}

.inline-upload-file small {
    display: block;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-scroll-hint {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 8px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 650;
}

.table-scroll-hint::before {
    content: "↔";
    color: var(--primary-dark);
    font-size: 16px;
}

.table-scroll-hint[hidden] {
    display: none;
}

.table-wrap {
    max-width: 100%;
    scrollbar-color: #64748b #eef2f7;
    scrollbar-width: thin;
}

.table-wrap.is-scrollable {
    box-shadow: inset -14px 0 14px -18px rgba(15, 23, 42, .7);
}

th {
    color: #475569 !important;
    font-size: 12px !important;
    line-height: 1.35;
}

td {
    color: var(--text-secondary);
    font-size: var(--fs-table) !important;
    line-height: 1.5;
}

td.empty {
    padding: 30px 18px !important;
    text-align: center;
}

td.empty strong,
td.empty span {
    display: block;
}

td.empty strong {
    color: var(--text);
    font-size: 14px;
}

td.empty span {
    max-width: 52ch;
    margin: 5px auto 0;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

.empty-state {
    display: grid;
    max-width: 520px;
    min-height: 290px;
    place-items: center;
    align-content: center;
    gap: 8px;
    margin-inline: auto;
    padding: 28px 18px;
    text-align: center;
}

.empty-state-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 17px;
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.empty-state-icon svg {
    width: 26px;
    height: 26px;
}

.empty-state h2 {
    margin: 8px 0 0;
    font-size: 20px !important;
}

.empty-state p {
    max-width: 46ch;
    margin: 0 0 10px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.55;
}

.dashboard-summary-hint {
    display: none;
}

.dashboard-live-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 20px;
}

.dashboard-summary-static {
    cursor: default;
}

.dashboard-summary-static:hover {
    border-color: rgba(148, 163, 184, .38);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .07);
    transform: none;
}

.dashboard-summary-static:hover img {
    transform: none;
}

.dashboard-summary-label,
.dashboard-eyebrow {
    font-size: 12px !important;
}

.dashboard-summary-copy small,
.dashboard-card-heading p,
.dashboard-quick-section header p {
    color: var(--text-secondary) !important;
    font-size: 13px !important;
    line-height: 1.5;
}

.dashboard-summary-copy em,
.dashboard-online-badge,
.dashboard-server-badge,
.dashboard-text-link {
    font-size: 12px !important;
}

.dashboard-progress-ring span,
.dashboard-progress-legend span,
.dashboard-progress-legend b,
.dashboard-progress-item > div:first-child,
.dashboard-progress-item > div:first-child b,
.dashboard-system-metric span {
    font-size: 12px !important;
}

.dashboard-progress-item small,
.dashboard-system-metric small,
.dashboard-quick-grid em {
    color: var(--text-muted) !important;
    font-size: 12px !important;
    line-height: 1.45;
}

.dashboard-quick-grid b,
.dashboard-system-metric strong {
    font-size: 13px !important;
}

.dashboard-summary-copy strong,
.dashboard-progress-ring strong,
.dashboard-system-metric strong,
.dashboard-kpi-grid b,
.dashboard-school-row strong,
.settings-count,
.question-counter,
.exam-timer strong,
.timer-box strong {
    font-variant-numeric: tabular-nums;
}

.auth-card input {
    transition: background-color .15s ease-out, border-color .15s ease-out, box-shadow .15s ease-out !important;
}

@media (prefers-reduced-motion: no-preference) {
    .btn:not(:disabled):active,
    .side-account-trigger:active,
    .dashboard-summary-card[href]:active,
    .dashboard-quick-grid > a:active {
        transform: scale(.96);
    }
}

@media (max-width: 900px) {
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .main {
        padding: 16px !important;
    }

    .menu-button,
    .sidebar-close {
        width: 44px !important;
        min-width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
        flex-basis: 44px !important;
    }

    body .filter-form label,
    body form.filter-form label,
    body .list-filter-form label {
        font-size: 13px !important;
    }

    body .filter-form input,
    body .filter-form select,
    body form.filter-form input,
    body form.filter-form select,
    .auth-card input,
    .inline-upload-file input[type="file"],
    input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
    select,
    textarea {
        height: auto !important;
        min-height: 44px !important;
        max-height: none !important;
        font-size: 16px !important;
        line-height: 1.4 !important;
    }

    .inline-upload-file input[type="file"] {
        min-height: 34px !important;
    }

    .btn {
        min-height: 44px;
        font-size: 14px;
    }
}

@media (max-width: 720px) {
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .main {
        padding: 12px !important;
    }

    .topbar {
        min-height: 54px;
        margin-bottom: 12px !important;
    }

    .topbar-date {
        display: none !important;
    }

    .topbar-left {
        width: 100%;
    }

    .topbar-left > span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .page-head,
    .content-title {
        align-items: stretch !important;
        padding: 15px !important;
        border-radius: 14px !important;
    }

    .page-head .actions {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .page-head .actions > *,
    .page-head .actions form,
    .page-head .actions .btn {
        min-width: 0;
        width: 100%;
    }

    .inline-upload {
        display: grid;
        grid-column: 1 / -1;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        width: 100%;
    }

    .responsive-data-table {
        display: block;
        min-width: 0 !important;
    }

    .responsive-data-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .responsive-data-table tbody {
        display: grid;
        gap: 12px;
    }

    .responsive-data-table tbody tr {
        display: grid;
        overflow: hidden;
        border: 1px solid var(--border);
        border-radius: 13px;
        background: #fff;
        box-shadow: var(--shadow-sm);
    }

    .responsive-data-table tbody td {
        display: grid;
        min-width: 0 !important;
        grid-template-columns: minmax(88px, .42fr) minmax(0, 1fr);
        gap: 10px;
        padding: 10px 12px !important;
        border-bottom: 1px solid var(--border-light) !important;
        text-align: start !important;
        white-space: normal !important;
    }

    .responsive-data-table tbody td::before {
        align-self: start;
        color: var(--text-muted);
        content: attr(data-label);
        font-size: 12px;
        font-weight: 800;
        letter-spacing: .04em;
        line-height: 1.4;
        text-transform: uppercase;
    }

    .responsive-data-table tbody td.row-actions {
        display: flex !important;
        justify-content: flex-start !important;
        flex-wrap: wrap;
        gap: 8px;
    }

    .responsive-data-table tbody td.row-actions::before {
        flex: 0 0 100%;
    }

    .responsive-data-table tbody td.row-actions .btn {
        min-height: 40px;
    }

    .responsive-data-table tbody td.empty {
        display: block !important;
        padding: 28px 16px !important;
    }

    .responsive-data-table tbody td.empty::before {
        content: none;
    }

    .table-wrap:has(.responsive-data-table) {
        overflow: visible;
        border: 0;
        box-shadow: none;
    }

    .dashboard-summary-hint {
        display: flex;
        align-items: center;
        gap: 7px;
        margin: -2px 0 -4px;
        color: var(--text-secondary);
        font-size: 12px;
        font-weight: 650;
    }

    .dashboard-summary-hint::before {
        color: var(--primary-dark);
        content: "↔";
        font-size: 16px;
    }

    .dashboard-summary-grid {
        display: flex !important;
        gap: 12px;
        margin-inline: -12px;
        padding-inline: 12px 42px;
        overflow-x: auto;
        scroll-padding-inline: 12px;
        scroll-snap-type: x mandatory;
        scrollbar-width: thin;
    }

    .dashboard-summary-card,
    .dashboard-summary-card:nth-child(4),
    .dashboard-summary-card:nth-child(5) {
        flex: 0 0 min(78vw, 290px);
        min-height: 164px;
        scroll-snap-align: start;
    }

    .dashboard-summary-copy {
        min-height: 164px;
    }

    .dashboard-operations-grid,
    .dashboard-evaluation-grid,
    .report-agency-grid {
        gap: 12px !important;
    }

    .dashboard-progress-visual {
        padding: 12px;
    }

    .dashboard-progress-ring {
        width: 122px;
        height: 122px;
        flex-basis: 122px;
    }
}

/*
 * Tabel data padat (Bank Soal, Peserta, dsb.) memiliki banyak kolom sehingga
 * pada layar sedang (tablet/Chrome sempit) kolom teks terjepit hingga mengalir
 * vertikal. Beralih ke tata letak kartu lebih awal — pada rentang ini kolom
 * tabel sudah berhenti muat, bukan karena angka preset perangkat.
 */
@media (min-width: 721px) and (max-width: 1024px) {
    .responsive-data-table {
        display: block;
        min-width: 0 !important;
    }

    .responsive-data-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .responsive-data-table tbody {
        display: grid;
        gap: 12px;
    }

    .responsive-data-table tbody tr {
        display: grid;
        overflow: hidden;
        border: 1px solid var(--border);
        border-radius: 13px;
        background: #fff;
        box-shadow: var(--shadow-sm);
    }

    .responsive-data-table tbody td {
        display: grid;
        min-width: 0 !important;
        grid-template-columns: minmax(120px, .3fr) minmax(0, 1fr);
        gap: 10px;
        padding: 10px 14px !important;
        border-bottom: 1px solid var(--border-light) !important;
        text-align: start !important;
        white-space: normal !important;
    }

    .responsive-data-table tbody td::before {
        align-self: start;
        color: var(--text-muted);
        content: attr(data-label);
        font-size: 12px;
        font-weight: 800;
        letter-spacing: .04em;
        line-height: 1.4;
        text-transform: uppercase;
    }

    .responsive-data-table tbody td.row-actions {
        display: flex !important;
        justify-content: flex-start !important;
        flex-wrap: wrap;
        gap: 8px;
    }

    .responsive-data-table tbody td.row-actions::before {
        flex: 0 0 100%;
    }

    .responsive-data-table tbody td.row-actions .btn {
        min-height: 40px;
    }

    .responsive-data-table tbody td.empty {
        display: block !important;
        padding: 28px 16px !important;
    }

    .responsive-data-table tbody td.empty::before {
        content: none;
    }

    .table-wrap:has(.responsive-data-table) {
        overflow: visible;
        border: 0;
        box-shadow: none;
    }
}

@media (max-width: 420px) {
    .page-head .actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .inline-upload {
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard-summary-card,
    .dashboard-summary-card:nth-child(4),
    .dashboard-summary-card:nth-child(5) {
        flex-basis: min(82vw, 278px);
    }
}

@media (prefers-contrast: more) {
    :root {
        --border: #94a3b8;
        --text-secondary: #1e293b;
        --text-muted: #334155;
    }
}

@media (forced-colors: active) {
    :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
        outline-color: Highlight !important;
    }
}

.inline-upload-file > label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 800;
}

.inline-upload-control {
    position: relative;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
}

.inline-upload-control:focus-within {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

.inline-upload-button {
    padding: 6px 9px;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    background: #eff6ff;
    color: var(--primary-strong);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
}

.inline-upload-control .inline-upload-input {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0;
    padding: 0 !important;
    cursor: pointer;
    opacity: 0;
}

.inline-upload-control small {
    min-width: 0;
    margin: 0;
}

@media (prefers-reduced-motion: reduce) {
    html *,
    html *::before,
    html *::after,
    html [class],
    html [class]::before,
    html [class]::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* Long-running AI analysis feedback: honest progress without a fake percentage. */
.ai-analysis-loading-popup {
    width: min(520px, calc(100vw - 32px));
    max-width: none;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 20px;
    background: transparent;
    color: var(--text-primary, #172033);
    box-shadow: 0 28px 80px rgba(15, 45, 86, .28);
}

.ai-analysis-loading-popup::backdrop {
    background: rgba(9, 24, 45, .62);
    backdrop-filter: blur(5px);
}

.ai-analysis-loading-card {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    padding: 26px;
    border: 1px solid color-mix(in srgb, var(--primary, #0b6fe8) 22%, #d8e2ef);
    border-radius: 20px;
    background:
        radial-gradient(circle at 92% 8%, rgba(32, 201, 151, .12), transparent 34%),
        var(--surface, #fff);
}

.ai-analysis-loading-visual {
    position: relative;
    width: 76px;
    height: 76px;
}

.ai-analysis-loading-ring {
    position: absolute;
    inset: 0;
    border: 4px solid color-mix(in srgb, var(--primary, #0b6fe8) 18%, transparent);
    border-top-color: var(--primary, #0b6fe8);
    border-right-color: #20a77a;
    border-radius: 50%;
    animation: ai-analysis-loading-spin .9s linear infinite;
}

.ai-analysis-loading-icon {
    position: absolute;
    inset: 10px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #eaf4ff, #e9fbf4);
    color: var(--primary-strong, #0759bb);
    box-shadow: inset 0 0 0 1px rgba(11, 111, 232, .1);
}

.ai-analysis-loading-icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ai-analysis-loading-content {
    min-width: 0;
}

.ai-analysis-loading-eyebrow {
    display: block;
    margin-bottom: 5px;
    color: var(--primary-strong, #0759bb);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ai-analysis-loading-content h2 {
    margin: 0;
    color: var(--text-primary, #172033);
    font-size: 20px;
    line-height: 1.3;
}

.ai-analysis-loading-content p {
    margin: 8px 0 0;
    color: var(--text-secondary, #475569);
    font-size: 13px;
    line-height: 1.55;
}

.ai-analysis-loading-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding: 9px 11px;
    border: 1px solid color-mix(in srgb, var(--primary, #0b6fe8) 18%, #d8e2ef);
    border-radius: 10px;
    background: color-mix(in srgb, var(--primary, #0b6fe8) 6%, #fff);
    color: var(--text-secondary, #334155);
    font-size: 12px;
    font-weight: 750;
}

.ai-analysis-loading-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: #0b9f72;
    box-shadow: 0 0 0 4px rgba(11, 159, 114, .13);
    animation: ai-analysis-loading-pulse 1.2s ease-in-out infinite;
}

.ai-analysis-loading-content small {
    display: block;
    margin-top: 10px;
    color: var(--text-muted, #64748b);
    font-size: 12px;
    line-height: 1.45;
}

@keyframes ai-analysis-loading-spin {
    to { transform: rotate(360deg); }
}

@keyframes ai-analysis-loading-pulse {
    50% { opacity: .5; }
}

@media (max-width: 520px) {
    .ai-analysis-loading-popup {
        width: min(100% - 24px, 420px);
    }

    .ai-analysis-loading-card {
        grid-template-columns: 56px minmax(0, 1fr);
        align-items: start;
        gap: 14px;
        padding: 20px 18px;
        border-radius: 16px;
    }

    .ai-analysis-loading-visual {
        width: 56px;
        height: 56px;
    }

    .ai-analysis-loading-icon {
        inset: 8px;
    }

    .ai-analysis-loading-icon svg {
        width: 20px;
        height: 20px;
    }

    .ai-analysis-loading-content h2 {
        font-size: 18px;
    }

    .ai-analysis-loading-status {
        grid-column: 1 / -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ai-analysis-loading-ring,
    .ai-analysis-loading-dot,
    .student-ai-processing-spinner {
        animation: none;
    }
}

/* Persistent AI reports: clear hierarchy, readable evidence, and exact PDF provenance. */
.report-export-note {
    align-self: center;
    max-width: 280px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.45;
    text-align: right;
}

.student-ai-intro {
    display: grid;
    gap: 10px;
}

.student-ai-list {
    display: grid;
    gap: 8px;
}

.student-ai-card {
    margin: 0;
    padding: 0;
    overflow: clip;
}

.student-ai-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px 7px;
}

.student-ai-identity {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 9px;
}

.student-ai-card .participant-avatar {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    font-size: 13px;
}

.student-ai-identity > div {
    min-width: 0;
}

.student-ai-identity h3,
.student-ai-identity p,
.student-ai-summary h4,
.student-ai-summary p,
.student-ai-result-grid h4,
.student-ai-result-grid p {
    margin: 0;
}

.student-ai-identity h3 {
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.35;
}

.student-ai-identity p {
    margin-top: 1px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.student-ai-score {
    display: grid;
    flex: 0 0 auto;
    min-width: 88px;
    padding: 6px 9px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-subtle);
    text-align: right;
}

.student-ai-score span,
.student-ai-score small {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.student-ai-score strong {
    color: var(--primary-strong);
    font-size: 18px;
    line-height: 1.15;
}

.student-ai-context {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 0 12px 8px;
}

.student-ai-context span {
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--surface-subtle);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
}

.student-ai-result {
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-subtle) 68%, var(--surface));
}

.student-ai-result > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 46px;
    padding: 8px 12px;
    color: var(--text-primary);
    cursor: pointer;
    list-style-position: inside;
}

.student-ai-result > summary:focus-visible {
    border-radius: 8px;
    outline: 3px solid color-mix(in srgb, var(--primary) 34%, transparent);
    outline-offset: -3px;
}

.student-ai-result > summary > span:first-child {
    display: inline-grid;
    gap: 2px;
}

.student-ai-result > summary small {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
}

.student-ai-summary {
    margin: 0 12px 10px;
    padding: 10px;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
    border-radius: 12px;
    background: var(--surface);
}

.student-ai-summary h4,
.student-ai-result-grid h4 {
    color: var(--text-primary);
    font-size: 13px;
}

.student-ai-summary p,
.student-ai-result-grid li,
.student-ai-improvements p,
.student-ai-improvements span {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.student-ai-summary p {
    margin-top: 4px;
}

.student-local-competency-analysis,
.student-local-question-analysis {
    display: grid;
    gap: 8px;
    min-width: 0;
    margin: 0 12px 10px;
}

.student-local-competency-analysis > header h4,
.student-local-competency-analysis > header p,
.student-local-question-analysis > header h4,
.student-local-question-analysis > header p,
.student-local-guidance-grid h4,
.student-local-guidance-grid p,
.student-local-question-card h5,
.student-local-question-card p {
    margin: 0;
}

.student-local-competency-analysis > header h4,
.student-local-question-analysis > header h4 {
    color: var(--text-primary);
    font-size: 14px;
}

.student-local-competency-analysis > header p,
.student-local-question-analysis > header p {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.student-local-reference-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.student-local-reference-grid > section {
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.student-local-reference-grid h5 {
    margin: 0 0 7px;
    color: var(--text-primary);
    font-size: 13px;
}

.student-local-reference-list {
    display: grid;
    gap: 6px;
}

.student-local-reference-list article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 8px;
    min-width: 0;
    padding: 8px;
    border: 1px solid color-mix(in srgb, var(--primary) 13%, var(--border));
    border-radius: 10px;
    background: color-mix(in srgb, var(--primary) 3%, var(--surface));
}

.student-local-reference-list article > div {
    display: flex;
    grid-column: 1 / -1;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.student-local-reference-list b,
.student-local-reference-list p,
.student-local-reference-list strong {
    overflow-wrap: anywhere;
}

.student-local-reference-list b {
    color: var(--text-primary);
    font-size: 13px;
}

.student-local-reference-list p {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
}

.student-local-reference-list strong {
    color: var(--primary-strong);
    font-size: 13px;
}

.student-local-question-list {
    display: grid;
    gap: 8px;
}

.student-local-question-card {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.student-local-question-card > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.student-local-question-card > header > span:first-child {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.student-local-question-card > header b {
    color: var(--text-primary);
    font-size: 13px;
}

.student-local-question-card > header small {
    color: var(--text-muted);
    font-size: 12px;
}

.student-local-question-reference {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.student-local-question-reference span {
    display: inline-grid;
    gap: 2px;
    min-width: 0;
    max-width: 100%;
    padding: 5px 7px;
    border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--border));
    border-radius: 9px;
    background: color-mix(in srgb, var(--primary) 4%, var(--surface));
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.student-local-question-reference b,
.student-local-question-card h5 {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 800;
}

.student-local-feedback {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.student-local-feedback section {
    min-width: 0;
    padding: 8px;
    border-radius: 10px;
    background: var(--surface-subtle);
}

.student-local-feedback p,
.student-local-question-context p,
.student-local-guidance-grid li,
.student-local-guidance-grid .student-ai-improvements p,
.student-local-guidance-grid .student-ai-improvements span {
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.student-local-question-context {
    padding-top: 7px;
    border-top: 1px solid var(--border);
}

.student-local-guidance-grid .student-ai-improvements span {
    font-weight: 400;
}

.student-local-question-context summary {
    color: var(--primary-strong);
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}

.student-local-guidance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0 12px 10px;
}

.student-local-guidance-grid > section {
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.student-local-guidance-grid h4 {
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.45;
}

.student-local-guidance-grid ol {
    display: grid;
    gap: 6px;
    margin: 7px 0 0;
    padding-left: 20px;
}

.student-ai-question-analysis {
    display: grid;
    gap: 8px;
    margin: 0 12px 10px;
}

.student-ai-question-analysis > header h4,
.student-ai-question-analysis > header p,
.student-ai-question-item h5,
.student-ai-question-item p {
    margin: 0;
}

.student-ai-question-analysis > header h4 {
    color: var(--text-primary);
    font-size: 14px;
}

.student-ai-question-analysis > header p,
.student-ai-question-empty {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.student-ai-question-list {
    display: grid;
    gap: 8px;
}

.student-ai-question-item {
    min-width: 0;
    overflow: clip;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.student-ai-question-item > summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 8px 10px;
    color: var(--text-primary);
    cursor: pointer;
}

.student-ai-question-item > summary > span:first-child {
    display: inline-grid;
    min-width: 0;
    gap: 2px;
}

.student-ai-question-item > summary small {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.student-ai-question-body {
    display: grid;
    gap: 10px;
    padding: 10px;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-subtle) 55%, var(--surface));
}

.student-ai-question-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.student-ai-question-meta span {
    display: inline-grid;
    gap: 1px;
    max-width: 100%;
    padding: 5px 7px;
    border-radius: 9px;
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.student-ai-question-meta b,
.student-ai-question-item h5 {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 800;
}

.student-ai-evidence,
.student-ai-answer-grid > section,
.student-ai-item-conclusion > section {
    min-width: 0;
}

.student-ai-evidence p,
.student-ai-answer-grid p,
.student-ai-item-conclusion p,
.student-ai-option-list {
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.student-ai-option-list {
    display: grid;
    gap: 5px;
    padding-inline-start: 20px;
}

.student-ai-answer-grid,
.student-ai-item-conclusion {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.student-ai-answer-grid > section,
.student-ai-item-conclusion > section {
    padding: 8px 9px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.student-ai-answer-grid p + p,
.student-ai-item-conclusion p + p {
    margin-top: 5px;
}

.student-ai-item-conclusion > section:last-child {
    border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
    background: color-mix(in srgb, var(--primary) 5%, var(--surface));
}

.student-ai-result-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 0 12px 10px;
}

.student-ai-result-grid > section {
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.student-ai-result-grid ol {
    display: grid;
    gap: 6px;
    margin: 7px 0 0;
    padding-left: 20px;
}

.student-ai-improvements {
    display: grid;
    gap: 7px;
    margin-top: 7px;
}

.student-ai-improvements article {
    display: grid;
    gap: 3px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--border);
}

.student-ai-improvements article:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.student-ai-improvements b {
    color: var(--text-primary);
    font-size: 13px;
}

.student-ai-improvements span {
    color: var(--primary-strong);
    font-weight: 700;
}

.student-ai-result footer,
.student-ai-pending {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.student-ai-refresh-status {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 10px 12px 0;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
}

.student-ai-refresh-status p {
    margin: 2px 0 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
}

.student-ai-refresh-status .badge {
    margin-left: auto;
}

.student-ai-status-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    margin-left: auto;
}

.student-ai-status-actions .badge {
    margin-left: 0 !important;
}

.student-ai-refresh-status.is-processing {
    border-color: color-mix(in srgb, var(--primary) 22%, var(--border));
    background: color-mix(in srgb, var(--primary) 5%, var(--surface));
}

.student-ai-refresh-status.is-failed {
    border-color: color-mix(in srgb, var(--danger) 24%, var(--border));
    background: color-mix(in srgb, var(--danger) 5%, var(--surface));
}

.student-ai-footer-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-left: auto;
}

.student-ai-footer-actions form {
    margin: 0;
}

.student-ai-result footer > span,
.student-ai-pending p {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.student-ai-pending b {
    color: var(--text-primary);
    font-size: 13px;
}

.student-ai-pending.is-processing {
    justify-content: flex-start;
    border-top-color: color-mix(in srgb, var(--primary) 22%, var(--border));
    background: color-mix(in srgb, var(--primary) 5%, var(--surface));
}

.student-ai-pending.is-processing .badge {
    margin-left: auto;
}

.student-ai-pending.is-failed {
    background: color-mix(in srgb, var(--danger) 5%, var(--surface));
}

.student-ai-processing-spinner {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border: 3px solid color-mix(in srgb, var(--primary) 18%, transparent);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: ai-analysis-loading-spin .9s linear infinite;
}

.student-ai-pending form,
.student-ai-pending .btn,
.student-ai-result footer .btn {
    flex: 0 0 auto;
}

.student-ai-result footer .btn { margin-left: 0; }

@media (max-width: 980px) {
    .student-ai-result-grid,
    .student-local-guidance-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .report-export-note {
        max-width: none;
        text-align: left;
    }

    .student-ai-card-head {
        align-items: flex-start;
        padding: 9px 12px 7px;
    }

    .student-ai-identity {
        align-items: flex-start;
    }

    .student-ai-score {
        min-width: 76px;
        padding: 6px 8px;
    }

    .student-ai-score strong {
        font-size: 18px;
    }

    .student-ai-context {
        padding: 0 12px 8px;
    }

    .student-ai-result footer,
    .student-ai-pending {
        align-items: stretch;
        flex-direction: column;
        padding-inline: 12px;
    }

    .student-ai-result > summary {
        align-items: center;
        flex-direction: row;
        padding-inline: 12px;
    }

    .student-ai-refresh-status {
        align-items: flex-start;
        flex-wrap: wrap;
        margin-inline: 12px;
    }

    .student-ai-status-actions {
        width: 100%;
        margin-left: 0;
    }

    .student-ai-status-actions .btn {
        flex: 1;
        justify-content: center;
    }

    .student-ai-footer-actions {
        display: grid;
        width: 100%;
        margin-left: 0;
    }

    .student-ai-summary {
        margin-inline: 12px;
    }

    .student-ai-question-analysis {
        margin-inline: 12px;
    }

    .student-local-competency-analysis,
    .student-local-question-analysis {
        margin-inline: 12px;
    }

    .student-local-reference-grid,
    .student-local-feedback {
        grid-template-columns: minmax(0, 1fr);
    }

    .student-ai-question-item > summary {
        align-items: start;
    }

    .student-ai-answer-grid,
    .student-ai-item-conclusion {
        grid-template-columns: minmax(0, 1fr);
    }

    .student-ai-result-grid,
    .student-local-guidance-grid {
        padding-inline: 12px;
    }

    .student-ai-pending .btn,
    .student-ai-result footer .btn {
        width: 100%;
        margin-left: 0;
        justify-content: center;
    }
}

/* Dashboard telemetry charts: lightweight Task Manager view and activity heatmap. */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    white-space: nowrap !important;
}

.dashboard-operations-grid {
    gap: 12px;
}

.dashboard-execution-card,
.dashboard-system-card {
    padding: 14px;
}

.dashboard-operations-grid .dashboard-card-heading {
    padding-bottom: 10px;
}

.dashboard-operations-grid .dashboard-card-heading p {
    margin-top: 3px;
    font-size: 12px !important;
}

.dashboard-attempt-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin-top: 10px;
}

.dashboard-attempt-summary > div {
    display: grid;
    min-width: 0;
    gap: 2px;
    padding: 7px 9px;
    border: 1px solid #e2e8f0;
    border-top-width: 3px;
    border-radius: 11px;
    background: #f8fafc;
}

.dashboard-attempt-summary > .finished { border-top-color: #10b981; }
.dashboard-attempt-summary > .unfinished { border-top-color: #f97316; }

.dashboard-attempt-summary span,
.dashboard-attempt-summary small {
    overflow: hidden;
    color: #475569;
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
}

.dashboard-attempt-summary strong {
    color: #0f172a;
    font-family: var(--font);
    font-size: 18px;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.dashboard-attempt-figure {
    margin: 10px 0 8px;
}

.dashboard-chart-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.dashboard-chart-heading h3 {
    margin: 0;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.dashboard-chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px 10px;
}

.dashboard-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-chart-legend i {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

.dashboard-chart-legend .finished i,
.dashboard-attempt-bars .finished { background: #10b981; }
.dashboard-chart-legend .unfinished i,
.dashboard-attempt-bars .unfinished { background: #f97316; }
.dashboard-chart-legend .students-sd i, .dashboard-attempt-bars .students-sd { background: #dc2626; }
.dashboard-chart-legend .students-smp i, .dashboard-attempt-bars .students-smp { background: #2563eb; }
.dashboard-chart-legend .completed-sd i, .dashboard-attempt-bars .completed-sd { background: #059669; }
.dashboard-chart-legend .completed-smp i, .dashboard-attempt-bars .completed-smp { background: #d97706; }
.dashboard-attempt-summary > .students-sd { border-top-color: #dc2626; }
.dashboard-attempt-summary > .students-smp { border-top-color: #2563eb; }
.dashboard-attempt-summary > .completed-sd { border-top-color: #059669; }
.dashboard-attempt-summary > .completed-smp { border-top-color: #d97706; }

.dashboard-attempt-chart {
    display: grid;
    grid-template-columns: repeat(7, minmax(42px, 1fr));
    gap: 4px;
    min-height: 108px;
    padding: 5px 5px 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background-color: #fbfdff;
    background-image: linear-gradient(to top, rgba(148, 163, 184, .18) 1px, transparent 1px);
    background-size: 100% 25%;
}

.dashboard-attempt-day {
    display: grid;
    grid-template-rows: minmax(72px, 1fr) auto;
    min-width: 0;
    gap: 4px;
    text-align: center;
}

.dashboard-attempt-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 72px;
    gap: 2px;
    border-bottom: 1px solid #cbd5e1;
}

.dashboard-attempt-bars i {
    display: block;
    width: min(22%, 14px);
    min-width: 5px;
    border-radius: 3px 3px 0 0;
}

.dashboard-attempt-day > span {
    min-height: 20px;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}

.dashboard-attempt-figure figcaption,
.dashboard-live-chart figcaption,
.dashboard-heatmap-figure figcaption {
    margin-top: 5px;
    color: #475569;
    font-size: 12px;
    line-height: 1.45;
}

.dashboard-system-metric > div {
    display: block;
}

.dashboard-system-list {
    gap: 0;
    margin-top: 10px;
    padding-top: 0;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    background: #f8fafc;
}

.dashboard-system-metric {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
    padding: 6px 8px;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0;
    background: transparent;
}

.dashboard-system-metric:last-child {
    border-bottom: 0;
}

.dashboard-system-metric > svg {
    width: 30px;
    height: 30px;
    padding: 6px;
    border-radius: 9px;
}

.dashboard-system-card .dashboard-system-metric span,
.dashboard-system-card .dashboard-system-metric strong {
    font-size: 12px !important;
}

.dashboard-system-card .dashboard-system-metric small,
.dashboard-system-card .dashboard-live-chart figcaption {
    font-size: 12px !important;
    line-height: 1.3;
}

@media (min-width: 1251px) {
    .dashboard-execution-card {
        grid-column: 1;
        grid-row: 1;
        align-self: start;
    }

    .dashboard-heatmap-panel {
        grid-column: 1;
        grid-row: 2;
    }

    .dashboard-system-card {
        grid-column: 2;
        grid-row: 1 / span 2;
        display: flex;
        align-self: stretch;
        flex-direction: column;
        min-height: 0;
    }

    .dashboard-system-list {
        flex: 1;
        min-height: 0;
        grid-template-rows: repeat(4, minmax(0, 1fr));
    }

    .dashboard-system-metric {
        height: 100%;
        align-items: center;
    }

    .dashboard-system-metric > div {
        width: 100%;
    }

    .dashboard-system-card .dashboard-live-chart > svg {
        height: clamp(48px, 9vh, 66px);
    }
}

@media (min-width: 901px) and (max-width: 1250px) {
    .dashboard-system-metric {
        border-bottom: 0;
        border-inline-end: 1px solid #e2e8f0;
    }

    .dashboard-system-metric:last-child {
        border-inline-end: 0;
    }
}

.dashboard-system-metric-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.dashboard-live-chart {
    margin: 4px 0 0;
}

.dashboard-live-chart > svg {
    display: block;
    width: 100%;
    height: 40px;
    border: 1px solid #dbe5f0;
    border-radius: 7px;
    background-color: #f8fafc;
    background-image:
        linear-gradient(rgba(148, 163, 184, .16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, .16) 1px, transparent 1px);
    background-size: 25% 25%;
}

.dashboard-live-chart path { stroke: none; }
.dashboard-live-chart polyline {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.dashboard-system-metric.cpu .dashboard-live-chart path { fill: rgba(37, 99, 235, .12); }
.dashboard-system-metric.cpu .dashboard-live-chart polyline { stroke: #2563eb; }
.dashboard-system-metric.memory .dashboard-live-chart path { fill: rgba(124, 58, 237, .12); }
.dashboard-system-metric.memory .dashboard-live-chart polyline { stroke: #7c3aed; }
.dashboard-system-metric.storage .dashboard-live-chart path { fill: rgba(15, 118, 110, .12); }
.dashboard-system-metric.storage .dashboard-live-chart polyline { stroke: #0f766e; }
.dashboard-system-metric.disk-io .dashboard-live-chart .disk-read { stroke: #0891b2; }
.dashboard-system-metric.disk-io .dashboard-live-chart .disk-write { stroke: #ea580c; }

.dashboard-io-current {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.dashboard-io-current .read,
.dashboard-io-legend .read {
    color: #0e7490 !important;
}

.dashboard-io-current .write,
.dashboard-io-legend .write {
    color: #c2410c !important;
}

.dashboard-io-legend {
    display: flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 3px 9px;
}

.dashboard-io-legend span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.dashboard-io-legend i {
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: currentColor;
}

.dashboard-io-legend b {
    color: #475569;
    font-size: inherit;
    font-weight: 700;
}

.dashboard-system-metric .dashboard-live-chart + small,
.dashboard-system-metric .dashboard-live-chart ~ small {
    display: block;
    margin-top: 3px;
}

.dashboard-heatmap-panel {
    box-sizing: border-box;
    width: 100%;
    margin-top: 0;
    padding: 18px;
    border: 1px solid var(--border, #dbe3ef);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(15, 23, 42, .055);
}

.dashboard-heatmap-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 13px;
    border-bottom: 1px solid #e2e8f0;
}

.dashboard-heatmap-heading h3 {
    margin: 0;
    color: #0f172a;
    font-family: var(--font);
    font-size: 18px;
    font-weight: 750;
    letter-spacing: -.015em;
    line-height: 1.25;
}

.dashboard-heatmap-heading p {
    margin: 4px 0 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.4;
}

.dashboard-heatmap-total {
    display: grid;
    flex: 0 0 auto;
    gap: 2px;
    min-width: 74px;
    padding: 8px 10px;
    border: 1px solid #dbeafe;
    border-radius: 11px;
    background: #f0f9ff;
    text-align: right;
}

.dashboard-heatmap-total strong {
    color: #0f172a;
    font-family: var(--font);
    font-size: 24px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.dashboard-heatmap-total span {
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-heatmap-scroll-hint {
    display: none;
    margin: 12px 0 0;
    color: #475569;
    font-size: 12px;
}

.dashboard-heatmap-figure {
    display: grid;
    gap: 12px;
    margin: 14px 0 0;
}

.dashboard-heatmap-wrap {
    overflow-x: auto;
    padding: 0 0 3px;
}

.dashboard-heatmap-table {
    width: 100%;
    min-width: 500px;
    border: 0;
    border-collapse: separate;
    border-spacing: 3px 2px;
    table-layout: fixed;
}

.dashboard-heatmap-table th,
.dashboard-heatmap-table td {
    height: 16px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    text-align: center;
    line-height: 1 !important;
}

.dashboard-heatmap-table th {
    position: static;
    z-index: auto;
    font-size: 12px !important;
    letter-spacing: 0;
    text-transform: none;
    vertical-align: middle;
}

.dashboard-heatmap-table td {
    font-size: 0 !important;
}

.dashboard-heatmap-table tbody,
.dashboard-heatmap-table tr {
    height: 16px !important;
    line-height: 1 !important;
}

.dashboard-heatmap-table thead th {
    color: #475569;
    font-size: 12px !important;
    font-weight: 700;
}

.dashboard-heatmap-table th:first-child {
    width: 72px;
    padding-inline-end: 7px !important;
    color: #475569;
    font-size: 12px;
    font-weight: 750;
    text-align: right;
    white-space: nowrap;
}

.dashboard-heat-cell,
.dashboard-heatmap-legend i {
    display: block;
    border: 1px solid rgba(71, 85, 105, .08);
    border-radius: 2px;
}

.dashboard-heat-cell {
    width: 100%;
    height: 15px;
}

.dashboard-heat-cell.level-0,
.dashboard-heatmap-legend .level-0 { background: #edf8f0; }
.dashboard-heat-cell.level-1,
.dashboard-heatmap-legend .level-1 { background: #c9e8d1; }
.dashboard-heat-cell.level-2,
.dashboard-heatmap-legend .level-2 { background: #9bcdaa; }
.dashboard-heat-cell.level-3,
.dashboard-heatmap-legend .level-3 { background: #efc36a; }
.dashboard-heat-cell.level-4,
.dashboard-heatmap-legend .level-4 { background: #df7c35; }

.dashboard-heatmap-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 11px;
    border-top: 1px solid #eef2f7;
}

.dashboard-heatmap-figure .dashboard-heatmap-footer figcaption {
    flex: 1 1 auto;
    margin: 0;
    color: #475569;
    font-size: 12px;
    line-height: 1.45;
}

.dashboard-heatmap-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 4px;
    margin: 0;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-heatmap-legend i {
    width: 10px;
    height: 10px;
}

@media (max-width: 760px) {
    .dashboard-attempt-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-chart-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-chart-legend {
        justify-content: flex-start;
    }

    .dashboard-attempt-chart {
        overflow-x: auto;
        grid-template-columns: repeat(7, minmax(50px, 1fr));
    }

    .dashboard-heatmap-panel {
        padding: 12px;
        border-radius: 17px;
    }

    .dashboard-heatmap-scroll-hint {
        display: block;
    }

    .dashboard-heatmap-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .dashboard-heatmap-legend {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .dashboard-attempt-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-heatmap-heading {
        flex-direction: column;
        gap: 8px;
    }

    .dashboard-heatmap-total {
        text-align: left;
    }
}

/* Compact participant test-card workspace. */
.credential-card-page-head {
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
}

.credential-card-page-head h1 {
    margin: 3px 0 2px;
}

.credential-card-page-head p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

.credential-card-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.credential-card-total {
    display: grid;
    min-width: 78px;
    padding: 7px 12px;
    border: 1px solid #dbe7f5;
    border-radius: 11px;
    background: #f7fbff;
    text-align: right;
}

.credential-card-total strong {
    color: #0f2f57;
    font-size: 18px;
    line-height: 1;
}

.credential-card-total small {
    margin-top: 3px;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.credential-card-filter-panel {
    display: grid;
    gap: 12px;
    padding: 14px 16px;
}

.credential-card-filter-heading,
.credential-card-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.credential-card-filter-heading > div,
.credential-card-status > div {
    display: grid;
    gap: 2px;
}

.credential-card-filter-heading b,
.credential-card-status b {
    color: #102a4c;
    font-size: 13px;
}

.credential-card-filter-heading span,
.credential-card-status span,
.credential-card-status small {
    color: #475569;
    font-size: 12px;
}

.credential-card-page-size,
.credential-card-page-indicator {
    flex: 0 0 auto;
    padding: 6px 9px;
    border: 1px solid #d7e5f5;
    border-radius: 999px;
    background: #f5f9ff;
    color: #1d5fae !important;
    font-weight: 750;
}

.credential-card-filter-panel .list-filter-form {
    display: grid;
    grid-template-columns: minmax(210px, 1.35fr) repeat(3, minmax(145px, 1fr)) auto;
    align-items: end;
    gap: 10px;
}

.credential-card-filter-panel .filter-actions {
    flex-wrap: nowrap;
}

.credential-card-status {
    margin-top: 12px;
    padding: 11px 14px;
    border-color: #dce8f5;
    background: linear-gradient(135deg, #ffffff, #f6faff);
}

.credential-card-status > div > span {
    color: #1d64b4;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.credential-card-sheet {
    margin-top: 12px;
    border: 1px solid #dbe7f3;
    border-radius: 16px;
    background: linear-gradient(160deg, #f7fbff 0%, #eef5fc 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

.credential-card {
    position: relative;
    overflow: hidden;
    border: .3mm solid #b9cce2;
    border-top-color: #2f76c5;
    background:
        radial-gradient(circle at 94% 12%, rgba(47, 118, 197, .08), transparent 18mm),
        #fff;
}

.credential-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 1.2mm;
    background: linear-gradient(#1462b0, #2e86cf 70%, #f0a23a);
    content: "";
}

.credential-card .credential-card-data .credential-code {
    padding: .35mm 1mm;
    border-radius: 1.2mm;
    background: #edf5ff;
}

.credential-card-footer {
    position: absolute;
    right: 4mm;
    bottom: 2.5mm;
    left: 4mm;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.2mm;
    border-top: .2mm solid #d7e2ee;
    color: #475569;
    font-size: 12px;
    line-height: 1;
}

.credential-card-footer span {
    color: #1767b7;
    font-weight: 800;
    letter-spacing: .08em;
}

.credential-card-footer b {
    font-weight: 700;
}

.credential-card-pagination,
.report-pagination {
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid #dbe6f2;
    border-radius: 13px;
    background: #fff;
}

.report-pagination {
    box-shadow: 0 8px 22px rgba(32, 68, 108, .05);
}

@media (max-width: 1120px) {
    .credential-card-filter-panel .list-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .credential-card-filter-panel .filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .credential-card-page-head,
    .credential-card-head-actions,
    .credential-card-filter-heading,
    .credential-card-status {
        align-items: stretch;
        flex-direction: column;
    }

    .credential-card-head-actions .btn,
    .credential-card-total {
        width: 100%;
    }

    .credential-card-total {
        box-sizing: border-box;
        text-align: left;
    }

    .credential-card-filter-panel .list-filter-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .credential-card-filter-panel .filter-actions {
        grid-column: auto;
    }

    .credential-card-page-size,
    .credential-card-page-indicator {
        align-self: flex-start;
    }
}

/* Mobile reflow guard: contain wide dashboard widgets and allow table rows to grow. */
@media (max-width: 720px) {
    .dashboard-v2 {
        width: 100%;
        min-width: 0;
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .dashboard-v2 > * {
        min-width: 0;
        max-width: 100%;
    }

    .dashboard-operations-grid {
        min-width: 0;
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .dashboard-operations-grid > * {
        min-width: 0;
        max-width: 100%;
    }

    .dashboard-heatmap-wrap {
        max-width: 100%;
    }

    .dashboard-heatmap-panel {
        overflow: hidden;
    }

    .responsive-data-table tbody td {
        box-sizing: border-box;
        height: auto !important;
        min-height: 44px;
        align-items: start;
        overflow-wrap: anywhere;
    }
}

@media print {
    .credential-card {
        overflow: hidden !important;
        border-top-color: #2f76c5 !important;
        background: #fff !important;
    }

    .credential-card::before,
    .credential-card-footer {
        display: flex !important;
    }
}

/* Mobile staff drawer: balanced brand header and centered close control. */
@media screen and (max-width: 900px) {
    html.sidebar-open,
    body.sidebar-open {
        overflow: hidden !important;
        overscroll-behavior: none;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .sidebar[data-mobile-sidebar] {
        width: min(88vw, 320px) !important;
        min-width: 0 !important;
        max-width: calc(100vw - 24px) !important;
        padding-bottom: max(16px, env(safe-area-inset-bottom));
        scrollbar-width: none;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .sidebar[data-mobile-sidebar]::-webkit-scrollbar {
        width: 0;
        height: 0;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .sidebar[data-mobile-sidebar] .side-brand {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        align-items: center;
        gap: 12px;
        min-height: 72px;
        padding: 16px !important;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .sidebar[data-mobile-sidebar] .side-brand .brand-mark {
        width: 44px !important;
        height: 44px !important;
        margin: 0;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .sidebar[data-mobile-sidebar] .side-brand-copy {
        min-width: 0;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .sidebar[data-mobile-sidebar] .side-brand-copy b,
    body:not(.login-bg):not(.exam-body):not(.tka-bg) .sidebar[data-mobile-sidebar] .side-brand-copy span {
        max-width: 100%;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .sidebar[data-mobile-sidebar] .side-brand-copy b {
        font-size: 13px;
        line-height: 1.2;
    }

    body:not(.login-bg):not(.exam-body):not(.tka-bg) .sidebar[data-mobile-sidebar] .side-brand-copy span {
        margin-top: 3px;
        font-size: 12px;
        line-height: 1.25;
    }

    .sidebar-close {
        width: 44px !important;
        min-width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
        margin: 0 !important;
        padding: 0;
        border-color: rgba(255, 255, 255, .22);
        border-radius: 12px;
        background: rgba(255, 255, 255, .1);
        line-height: 0;
        transition: background-color .14s ease-out, border-color .14s ease-out, transform .14s ease-out;
    }

    .sidebar-close svg {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-width: 2;
        pointer-events: none;
    }

    .sidebar-close:hover {
        border-color: rgba(255, 255, 255, .34);
        background: rgba(255, 255, 255, .17);
    }

    .sidebar-close:active {
        transform: scale(.96);
    }
}

/* Pratinjau soal seperti layar siswa (Bank Soal & simulasi paket). */
.student-preview-panel .preview-question {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.student-preview-panel .badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.preview-question .answers {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.answer-card.preview-option {
    cursor: default;
}

/* Kunci jawaban disembunyikan sampai pengguna menekan tombol tampilkan kunci. */
.preview-key-flag {
    display: none;
    margin-left: auto;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #16a34a;
    color: #fff;
}

.show-answer-key .answer-card.preview-correct {
    border-color: #16a34a;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, .35) inset;
}

.show-answer-key .preview-option.preview-correct .preview-key-flag {
    display: inline-block;
}

.show-answer-key .statement-row.preview-correct-true {
    box-shadow: 0 0 0 2px rgba(22, 163, 74, .35) inset;
}

.show-answer-key .statement-row.preview-correct-false {
    box-shadow: 0 0 0 2px rgba(220, 38, 38, .28) inset;
}

.preview-explanation {
    display: none;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(22, 163, 74, .24);
    border-radius: 12px;
    background: rgba(22, 163, 74, .06);
}

.preview-explanation h3 {
    margin: 0;
    font-size: 16px;
}

.show-answer-key .preview-explanation {
    display: flex;
}

/* Overlay pratinjau langsung di dalam form soal. */
.student-preview-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 16px;
    overflow-y: auto;
    background: rgba(15, 23, 42, .55);
}

.student-preview-overlay[hidden] {
    display: none;
}

.student-preview-dialog {
    width: min(760px, 100%);
    margin: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(2, 6, 23, .35);
    overflow: hidden;
}

.student-preview-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(15, 23, 42, .1);
}

.student-preview-actions {
    display: flex;
    gap: 8px;
}

.student-preview-body {
    padding: 18px;
}

/* Panel simulasi paket: daftar nomor + panggung soal. */
.package-simulation {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 18px;
    align-items: start;
}

.preview-number-panel .num-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.preview-number-panel .num {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(15, 23, 42, .18);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.preview-number-panel .num.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.preview-sim-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
}

@media (max-width: 900px) {
    .package-simulation {
        grid-template-columns: 1fr;
    }
}

/*
 * Ciutkan menu samping: pada desktop, tombol ini menyembunyikan sidebar
 * sepenuhnya sehingga konten memakai lebar penuh. Klik lagi memunculkannya.
 * Preferensi disimpan di localStorage (class body.sidebar-rail). Di layar kecil
 * (mode overlay) tombol ini disembunyikan karena sidebar memakai hamburger.
 */
.sidebar-rail-toggle {
    display: none;
}

/* Chevron mengarah ke kiri (sembunyikan) saat menu tampil, dan ke kanan
   (tampilkan) saat menu tersembunyi. */
.sidebar-rail-toggle .sidebar-rail-icon {
    transform: rotate(90deg);
    transition: transform .18s ease;
}

body.sidebar-rail .sidebar-rail-toggle .sidebar-rail-icon {
    transform: rotate(-90deg);
}

@media (min-width: 901px) {
    .sidebar-rail-toggle {
        display: inline-flex;
    }

    /* Sembunyikan sidebar sepenuhnya; .main berbasis flex mengisi ruang penuh. */
    body.sidebar-rail .sidebar {
        display: none;
    }
}

/* Daftar soal terpilih pada form paket mode manual. */
[data-manual-questions] {
    display: grid;
    gap: 8px;
}

.manual-question-row {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--line, #d7e2ef);
    border-radius: 10px;
    background: #f8fbff;
}

.manual-question-row.is-excluded {
    opacity: .5;
}

.manual-question-meta {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.manual-question-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

@media (max-width: 640px) {
    .manual-question-row {
        grid-template-columns: 1fr;
    }
    .manual-question-text {
        white-space: normal;
    }
}

/* Tombol tambah/hapus opsi jawaban pada form soal. */
.rich-options-editor .option-remove-btn {
    grid-column: 2 / -1;
    justify-self: end;
}

.rich-options-editor .option-remove-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.options-editor-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

[data-option-template] {
    display: none;
}

/* UI Pro Max redesign: accessible, compact, data-first public and staff UI. */
:root {
    --color-primary: #0f172a;
    --color-on-primary: #ffffff;
    --color-secondary: #334155;
    --color-on-secondary: #ffffff;
    --color-accent: #0369a1;
    --color-on-accent: #ffffff;
    --color-background: #f8fafc;
    --color-foreground: #020617;
    --color-card: #ffffff;
    --color-card-foreground: #020617;
    --color-muted: #e8ecf1;
    --color-muted-foreground: #475569;
    --color-border: #e2e8f0;
    --color-destructive: #dc2626;
    --color-on-destructive: #ffffff;
    --color-ring: #0369a1;
    --bg: var(--color-background);
    --bg-card: var(--color-card);
    --bg-hover: #f1f5f9;
    --border: var(--color-border);
    --border-light: #eef2f7;
    --text: var(--color-foreground);
    --text-secondary: var(--color-secondary);
    --text-muted: var(--color-muted-foreground);
    --focus-ring: var(--color-ring);
    --font: "Atkinson Hyperlegible", "Segoe UI", Arial, sans-serif;
    --font-heading: var(--font);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
    --shadow: 0 8px 24px rgba(15, 23, 42, .06);
    --shadow-md: 0 16px 40px rgba(15, 23, 42, .1);
    --transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
    --fs-page: 24px;
    --fs-panel: 18px;
    --fs-sub: 16px;
    --fs-body: 15px;
    --fs-table: 14px;
    --fs-cap: 13px;
}

html {
    color: var(--color-foreground);
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font);
    color: var(--color-foreground);
    background: var(--color-background);
    font-size: 15px;
    line-height: 1.55;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--color-ring) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, .55) !important;
}

.sidebar :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible,
.auth-wrap :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible,
.exam-header :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline-color: #ffffff !important;
    box-shadow: 0 0 0 6px rgba(3, 105, 161, .55) !important;
}

:where(h1, h2)[tabindex="-1"]:focus-visible {
    outline: none !important;
}

button,
.btn,
[role="button"] {
    cursor: pointer;
}

.app-shell {
    min-height: 100vh;
    background: var(--color-background);
}

body.staff-body {
    overflow-x: clip;
}

html.staff-document {
    overflow-x: clip;
}

.sidebar {
    width: 248px !important;
    min-width: 248px !important;
    border-right: 1px solid rgba(255, 255, 255, .08) !important;
    background: linear-gradient(180deg, #0f172a 0%, #16233d 100%) !important;
    box-shadow: none !important;
}

.sidebar .side-brand {
    min-height: 76px;
    padding: 16px 14px !important;
    border-bottom-color: rgba(255, 255, 255, .09) !important;
    background: transparent !important;
}

.sidebar .side-brand .brand-mark {
    width: 42px !important;
    height: 42px !important;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 11px;
    background: #ffffff !important;
}

.sidebar .side-brand .brand-mark img {
    max-width: 30px !important;
    max-height: 30px !important;
}

.sidebar .side-brand b {
    font-size: 13px !important;
    letter-spacing: .015em;
}

.sidebar .side-brand span {
    color: rgba(255, 255, 255, .68) !important;
    font-size: 12px !important;
}

.sidebar nav {
    gap: 2px;
    padding: 10px 10px 18px !important;
    scrollbar-gutter: stable;
}

.sidebar nav a {
    min-height: 44px;
    gap: 11px;
    padding: 10px 11px !important;
    border: 0 !important;
    border-radius: 9px !important;
    color: rgba(255, 255, 255, .76) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}

.sidebar nav a:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, .08) !important;
}

.sidebar nav a.active {
    color: #fff !important;
    background: rgba(14, 165, 233, .16) !important;
    box-shadow: inset 3px 0 0 #38bdf8 !important;
}

.sidebar .nav-icon {
    width: 19px;
    height: 19px;
    color: rgba(255, 255, 255, .76);
}

.sidebar nav a.active .nav-icon {
    color: #7dd3fc;
}

.side-account {
    margin: 0 10px 10px !important;
}

.side-account-trigger {
    min-height: 62px;
    border-color: rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .05);
}

.side-account .user-menu-popover:not([hidden]) {
    display: grid !important;
}

.side-account .user-menu-popover {
    gap: 10px;
    padding: 14px;
}

.side-account .user-menu-header {
    margin: 0;
    padding: 4px 4px 12px;
}

.side-account .user-menu-profile {
    min-height: 44px;
    margin: 0;
    padding: 10px 12px;
}

.side-account .user-menu-popover form {
    margin: 0;
}

.side-account .user-menu-logout {
    min-height: 44px;
    padding: 10px 12px;
}

.main {
    min-width: 0;
    padding: 0 24px 36px !important;
    background: var(--color-background) !important;
}

.topbar {
    min-height: 64px;
    margin: 0 0 22px !important;
    padding: 10px 0 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--color-border) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.topbar-left {
    min-width: 0;
    gap: 10px;
    color: var(--color-secondary) !important;
    font-size: 14px !important;
    font-weight: 700;
}

.topbar-left > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-date {
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    color: var(--color-muted-foreground) !important;
    background: var(--color-card);
    font-size: 13px !important;
    font-weight: 700;
}

.icon-button,
.sidebar-rail-toggle {
    width: 44px;
    min-width: 44px;
    height: 44px;
    border: 1px solid var(--color-border) !important;
    border-radius: 10px !important;
    color: var(--color-secondary) !important;
    background: var(--color-card) !important;
}

.icon-button:hover,
.sidebar-rail-toggle:hover {
    border-color: #bae6fd !important;
    color: var(--color-accent) !important;
    background: #f0f9ff !important;
}

.sidebar-rail-toggle .sidebar-rail-icon {
    transform: rotate(180deg) !important;
}

body.sidebar-rail .sidebar-rail-toggle .sidebar-rail-icon {
    transform: rotate(0deg) !important;
}

.content-title,
.page-head {
    margin: 0 0 18px !important;
    padding: 0 0 16px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--color-border) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.content-title h1,
.page-head h1,
.page-head h2 {
    color: var(--color-primary) !important;
    font-family: var(--font-heading);
    font-size: var(--fs-page) !important;
    font-weight: 700 !important;
    letter-spacing: -.025em;
    line-height: 1.15;
}

.content-title p,
.page-head p,
.section-heading p {
    margin-top: 5px;
    color: var(--color-muted-foreground) !important;
    font-size: var(--fs-body) !important;
}

.panel,
.dashboard-execution-card,
.dashboard-system-card,
.dashboard-quick-section,
.dashboard-v2 .dashboard-level-block {
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius-lg) !important;
    background: var(--color-card) !important;
    box-shadow: var(--shadow-sm) !important;
}

.panel {
    padding: 18px !important;
}

.panel h2,
.panel-title h2 {
    color: var(--color-primary);
    font-size: var(--fs-panel) !important;
}

.panel h3,
.panel-title h3 {
    color: var(--color-primary);
    font-size: var(--fs-sub) !important;
}

.btn {
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
}

.btn.primary,
button.btn.primary {
    color: var(--color-on-accent) !important;
    background: var(--theme-primary, var(--color-accent)) !important;
    box-shadow: 0 6px 16px rgba(3, 105, 161, .16) !important;
}

.btn.primary:hover,
button.btn.primary:hover {
    background: var(--theme-primary-dark, #075985) !important;
    box-shadow: 0 8px 20px rgba(3, 105, 161, .2) !important;
    transform: translateY(-1px);
}

.btn.ghost {
    border-color: #cbd5e1 !important;
    color: var(--color-secondary) !important;
    background: var(--color-card) !important;
}

.btn.ghost:hover {
    border-color: #7dd3fc !important;
    color: var(--color-accent) !important;
    background: #f0f9ff !important;
}

body:not(.login-bg):not(.exam-body):not(.tka-bg) :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    min-height: 44px;
    border: 1px solid #cbd5e1 !important;
    border-radius: 9px !important;
    color: var(--color-foreground);
    background: var(--color-card);
    font: inherit;
}

body:not(.login-bg):not(.exam-body):not(.tka-bg) :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus {
    border-color: var(--theme-primary, var(--color-accent)) !important;
    box-shadow: 0 0 0 3px var(--theme-focus, rgba(3, 105, 161, .18)) !important;
}

body:not(.login-bg):not(.exam-body):not(.tka-bg) table {
    color: var(--color-secondary);
    font-size: 14px;
}

body:not(.login-bg):not(.exam-body):not(.tka-bg) table th {
    color: #334155 !important;
    background: #f1f5f9 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: .02em;
}

body:not(.login-bg):not(.exam-body):not(.tka-bg) table td,
body:not(.login-bg):not(.exam-body):not(.tka-bg) table th {
    border-color: var(--color-border) !important;
}

body:not(.login-bg):not(.exam-body):not(.tka-bg) table tbody tr:hover td {
    background: #f8fafc;
}

.toast {
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.dashboard-v2 {
    display: grid;
    width: 100%;
    max-width: 1600px;
    min-width: 0;
    gap: 18px;
    margin: 0 auto;
}

.dashboard-live-meta {
    min-height: 28px;
    margin: -6px 0 0;
}

.dashboard-summary-hint {
    display: none !important;
}

.dashboard-live-state,
.dashboard-online-badge,
.dashboard-server-badge {
    min-height: 28px;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    color: #166534 !important;
    background: #f0fdf4 !important;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-summary-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
    gap: 12px !important;
    overflow: visible !important;
    padding: 0 !important;
    scroll-snap-type: none !important;
}

.dashboard-summary-card {
    position: relative;
    min-width: 0 !important;
    min-height: 152px;
    grid-column: auto !important;
    grid-row: auto !important;
    padding: 17px !important;
    overflow: hidden;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius-lg) !important;
    color: var(--color-primary);
    background: var(--color-card) !important;
    box-shadow: var(--shadow-sm) !important;
    isolation: isolate;
}

.dashboard-summary-card::after {
    display: block !important;
}

.dashboard-summary-card:hover {
    border-color: #bae6fd !important;
    box-shadow: var(--shadow) !important;
    transform: translateY(-2px);
}

.dashboard-summary-card:focus-visible {
    outline-color: var(--color-ring) !important;
}

.dashboard-summary-card img {
    position: absolute !important;
    z-index: -2;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 1;
    object-fit: cover;
    object-position: center;
    filter: none;
    transform: none;
}

.dashboard-summary-copy {
    position: relative;
    z-index: 1;
    width: min(72%, 190px);
    min-width: 0;
}

.dashboard-summary-label {
    color: var(--color-muted-foreground) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: .07em !important;
}

.dashboard-summary-copy strong {
    margin-top: 4px;
    color: var(--color-primary) !important;
    font-size: 28px !important;
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1;
}

.dashboard-summary-copy small {
    margin-top: 8px;
    color: var(--color-secondary) !important;
    font-size: 13px !important;
    line-height: 1.35;
}

.dashboard-summary-copy em {
    margin-top: auto;
    padding-top: 13px;
    color: var(--theme-primary, var(--color-accent)) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
}

.dashboard-operations-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 2fr) minmax(310px, .9fr) !important;
    gap: 16px !important;
    align-items: start;
}

.dashboard-execution-card,
.dashboard-system-card {
    padding: 18px !important;
}

.dashboard-card-heading {
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--color-border);
}

.dashboard-eyebrow {
    color: var(--theme-primary, var(--color-accent)) !important;
    font-size: 12px !important;
    letter-spacing: .09em;
}

.dashboard-card-heading h2,
.dashboard-quick-section h2 {
    color: var(--color-primary) !important;
    font-size: 20px !important;
}

.dashboard-card-heading p,
.dashboard-quick-section header p {
    color: var(--color-muted-foreground) !important;
    font-size: 14px !important;
}

.dashboard-progress-item > div:first-child,
.dashboard-system-metric,
.dashboard-kpi-grid > div,
.dashboard-quick-grid > a {
    border-color: var(--color-border) !important;
    background: #f8fafc !important;
}

.dashboard-progress-item > div:first-child,
.dashboard-system-metric {
    border-radius: 11px;
}

.dashboard-quick-section {
    padding: 18px !important;
}

.dashboard-quick-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
    gap: 10px !important;
}

.dashboard-quick-grid > a {
    min-height: 76px;
    padding: 12px !important;
    border-radius: 12px !important;
}

.dashboard-quick-grid > a:hover {
    border-color: #bae6fd !important;
    background: #f0f9ff !important;
    transform: translateY(-1px);
}

.dashboard-level-block {
    padding: 18px !important;
}

body.login-bg {
    min-height: 100vh;
    background: #eef3f8 !important;
}

body.login-bg:not(.home-login) .auth-wrap {
    width: min(920px, calc(100% - 32px)) !important;
    min-height: 100vh !important;
    grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr) !important;
    grid-template-rows: minmax(560px, 620px) !important;
    gap: 0 !important;
    place-content: center !important;
    align-items: stretch !important;
    margin: 0 auto !important;
    padding: 32px 0 !important;
}

body.login-bg:not(.home-login) .auth-wrap::before,
body.login-bg:not(.home-login) .auth-wrap::after {
    display: none !important;
}

html[data-theme] body.login-bg:not(.home-login) .auth-hero.login-auth-hero {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0;
    padding: clamp(36px, 5vw, 58px) !important;
    gap: 0 !important;
    align-items: flex-start !important;
    justify-content: center !important;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 24px 0 0 24px !important;
    color: #fff;
    background:
        radial-gradient(circle at 88% 12%, rgba(56, 189, 248, .24), transparent 32%),
        linear-gradient(145deg, var(--theme-hero-a), var(--theme-hero-b) 62%, var(--theme-hero-c)) !important;
    box-shadow: var(--shadow-md);
}

body.login-bg:not(.home-login) .auth-hero .brand-mark.big {
    width: 74px !important;
    height: 74px !important;
    margin-bottom: 26px;
    padding: 10px !important;
    border: 1px solid rgba(255, 255, 255, .22) !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, .96) !important;
}

body.login-bg:not(.home-login) .auth-hero .brand-mark.big img {
    max-width: 54px !important;
    max-height: 54px !important;
}

body.login-bg:not(.home-login) .login-auth-hero h1 {
    max-width: none;
    margin-top: 10px;
    font-size: 28px !important;
    line-height: 1.02;
    text-transform: none !important;
}

body.login-bg:not(.home-login) .login-auth-hero h1 span {
    display: block;
    white-space: nowrap;
}

body.login-bg:not(.home-login) .auth-hero p {
    max-width: 34ch;
    margin-top: 15px;
    color: #fff !important;
    font-size: 16px !important;
}

body.login-bg:not(.home-login) .auth-card {
    width: 100% !important;
    min-height: 0;
    height: 100%;
    margin: 0 !important;
    padding: clamp(34px, 4vw, 52px) !important;
    justify-content: center;
    border: 1px solid var(--color-border) !important;
    border-left: 0 !important;
    border-radius: 0 24px 24px 0 !important;
    background: var(--color-card) !important;
    box-shadow: var(--shadow-md) !important;
}

body.login-bg:not(.home-login) .role-login-heading {
    margin-bottom: 26px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}

body.login-bg:not(.home-login) .role-login-heading h2 {
    color: var(--color-primary);
    font-size: 28px !important;
    line-height: 1.15;
}

body.login-bg:not(.home-login) .role-login-heading p {
    margin-top: 7px;
    color: var(--color-muted-foreground) !important;
    font-size: 15px !important;
}

body.login-bg:not(.home-login) .auth-card label {
    color: var(--color-secondary) !important;
    font-size: 14px !important;
    font-weight: 700;
}

body.login-bg:not(.home-login) .auth-card input {
    min-height: 48px;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    color: var(--color-foreground);
    background: #fff !important;
    font-family: var(--font);
    font-size: 16px !important;
}

body.login-bg:not(.home-login) .auth-card .btn.primary {
    min-height: 48px;
    margin-top: 4px;
    border-radius: 10px !important;
    font-size: 16px !important;
}

body.login-bg:not(.home-login) .auth-alt-link {
    min-height: 44px;
    margin-top: 20px;
    align-items: center;
    justify-content: center;
    color: var(--color-muted-foreground) !important;
    font-size: 14px !important;
    font-weight: 700;
}

body.home-login {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 88%, rgba(14, 165, 233, .24), transparent 30%),
        radial-gradient(circle at 88% 8%, rgba(56, 189, 248, .18), transparent 26%),
        linear-gradient(135deg, #081426 0%, #0f2d4f 52%, #075985 100%) !important;
}

body.home-login .home-auth-wrap {
    width: min(1120px, 100%) !important;
    min-height: 100vh;
    gap: 0 !important;
    align-content: center;
    padding: 32px !important;
}

body.home-login .home-auth-wrap::before,
body.home-login .home-auth-wrap::after {
    display: none !important;
}

body.home-login .home-auth-wrap.is-sequenced [data-home-stage] {
    inset-inline: 32px;
    width: auto;
    max-width: 1056px;
}

body.home-login .home-auth-wrap.is-sequenced [data-home-stage].is-active {
    margin: auto;
    animation-duration: .28s;
}

body.home-login .home-auth-hero {
    min-height: 430px;
    padding: clamp(34px, 6vw, 72px) !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto;
    gap: 22px !important;
    align-content: center;
    align-items: start;
    justify-items: start;
    border: 1px solid rgba(255, 255, 255, .17) !important;
    border-radius: 24px !important;
    color: #fff;
    background: rgba(15, 23, 42, .62) !important;
    box-shadow: 0 28px 70px rgba(2, 6, 23, .3) !important;
    backdrop-filter: blur(18px);
}

body.home-login .home-auth-hero .brand-mark.big.home-brand-mark {
    width: 96px !important;
    height: 96px !important;
    grid-column: 1;
    grid-row: 1;
    padding: 12px !important;
    border: 1px solid rgba(255, 255, 255, .2) !important;
    border-radius: 22px !important;
    background: #fff !important;
}

body.home-login .home-auth-hero > .home-hero-copy {
    min-width: 0;
    grid-column: 1;
    grid-row: 2;
}

body.home-login .home-auth-hero .brand-mark.big.home-brand-mark img {
    max-width: 72px !important;
    max-height: 72px !important;
}

body.home-login .home-auth-hero h1 {
    max-width: 18ch;
    font-size: 28px !important;
    letter-spacing: -.04em;
    line-height: 1.02;
    text-transform: none !important;
}

body.home-login .home-auth-hero p {
    max-width: 42ch;
    margin-top: 14px;
    color: rgba(255, 255, 255, .78) !important;
    font-size: 18px !important;
}

body.home-login .home-sequence-button,
body.home-login .home-welcome-replay {
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

body.home-login .department-welcome {
    border-color: rgba(255, 255, 255, .18) !important;
    border-radius: 24px !important;
    background: rgba(255, 255, 255, .98) !important;
    box-shadow: 0 28px 70px rgba(2, 6, 23, .3) !important;
}

body.home-login .department-welcome-kicker {
    color: #0369a1 !important;
}

body.home-login .department-welcome h2 {
    color: #0f172a !important;
}

body.home-login .department-welcome p {
    color: #334155 !important;
}

body.home-login .department-welcome .home-sequence-button {
    border-color: #0369a1 !important;
    color: #fff !important;
    background: #0369a1 !important;
}

body.home-login .department-welcome .home-sequence-button:hover {
    border-color: #075985 !important;
    background: #075985 !important;
}

body.home-login .department-welcome .home-sequence-button:focus-visible {
    outline-color: rgba(3, 105, 161, .35);
}

body.home-login .home-card {
    width: 100% !important;
    max-width: 1056px !important;
    padding: 28px !important;
    border: 1px solid rgba(255, 255, 255, .22) !important;
    border-radius: 24px !important;
    background: rgba(255, 255, 255, .98) !important;
    box-shadow: 0 28px 70px rgba(2, 6, 23, .3) !important;
}

.home-card-brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--color-border);
}

.home-card-brand-mark {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-items: center;
    padding: 6px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fff;
}

.home-card-brand-mark img {
    display: block;
    max-width: 34px;
    max-height: 34px;
}

.home-card-brand > span:last-child {
    min-width: 0;
}

.home-card-brand small,
.home-card-brand strong {
    display: block;
}

.home-card-brand small {
    color: var(--theme-primary, var(--color-accent));
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.home-card-brand strong {
    margin-top: 2px;
    overflow: hidden;
    color: var(--color-primary);
    font-size: 15px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.home-login .home-card-heading {
    margin-bottom: 20px;
    text-align: left !important;
}

body.home-login .home-card-heading .home-card-kicker {
    display: inline-flex;
    width: auto;
    min-height: 28px;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--theme-primary-dark, #075985) !important;
    background: var(--theme-primary-soft, #e0f2fe) !important;
    font-size: 12px !important;
}

body.home-login .home-card-heading h2 {
    margin-top: 12px;
    color: var(--color-primary);
    font-size: 24px !important;
    line-height: 1.1;
}

body.home-login .home-card-heading p {
    color: var(--color-muted-foreground) !important;
    font-size: 15px !important;
}

body.home-login .auth-portal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
}

body.home-login .auth-portal {
    min-height: 92px !important;
    gap: 12px !important;
    padding: 14px !important;
    border: 1px solid var(--color-border) !important;
    border-left-width: 1px !important;
    border-radius: 13px !important;
    color: var(--color-secondary);
    background: #f8fafc !important;
    box-shadow: none !important;
}

body.home-login .auth-portal:hover {
    border-color: #7dd3fc !important;
    background: #f0f9ff !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .07) !important;
    transform: translateY(-2px);
}

body.home-login .auth-portal-icon {
    width: 44px !important;
    height: 44px !important;
    flex: 0 0 44px;
    border-radius: 11px !important;
}

body.home-login .auth-portal-icon svg {
    width: 23px !important;
    height: 23px !important;
}

body.home-login .auth-portal-copy {
    text-align: left !important;
}

body.home-login .auth-portal-copy b {
    color: var(--color-primary) !important;
    font-size: 15px !important;
    line-height: 1.25;
}

@media screen and (max-width: 1180px) {
    .dashboard-operations-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .dashboard-system-list {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media screen and (max-width: 900px) {
    .main {
        width: 100%;
        padding: 0 14px 28px !important;
        overflow-x: clip;
    }

    .topbar {
        position: sticky;
        z-index: 40;
        top: 0;
        min-height: 64px;
        margin-inline: -2px !important;
        padding-inline: 2px !important;
        background: rgba(248, 250, 252, .94) !important;
        backdrop-filter: blur(14px);
    }

    .sidebar {
        width: min(304px, 86vw) !important;
        min-width: min(304px, 86vw) !important;
    }

    .content-title,
    .page-head {
        padding-bottom: 14px !important;
    }

    .page-head .actions {
        width: 100%;
    }

    .dashboard-v2 {
        gap: 14px;
    }

    .dashboard-live-meta {
        align-items: flex-start;
    }

    .dashboard-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .dashboard-summary-card {
        min-height: 138px;
    }

    .dashboard-summary-card:last-child:nth-child(odd) {
        grid-column: 1 / -1 !important;
    }

    .dashboard-summary-copy {
        width: 86%;
    }

    body.login-bg:not(.home-login) .auth-wrap {
        width: min(560px, calc(100% - 24px)) !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: auto auto !important;
        align-content: center;
        padding: 20px 0 !important;
    }

    html[data-theme] body.login-bg:not(.home-login) .auth-hero.login-auth-hero {
        height: auto !important;
        min-height: 188px;
        padding: 24px !important;
        flex-direction: column !important;
        gap: 0;
        align-items: flex-start !important;
        justify-content: center !important;
        border-radius: 20px 20px 0 0 !important;
    }

    body.login-bg:not(.home-login) .auth-hero .brand-mark.big {
        width: 58px !important;
        height: 58px !important;
        margin: 0 0 16px;
        padding: 7px !important;
        border-radius: 14px !important;
    }

    body.login-bg:not(.home-login) .auth-hero .brand-mark.big img {
        max-width: 42px !important;
        max-height: 42px !important;
    }

    body.login-bg:not(.home-login) .login-auth-hero h1 {
        max-width: none;
        margin: 4px 0 0;
        font-size: 24px !important;
    }

    body.login-bg:not(.home-login) .login-auth-hero h1 span {
        white-space: normal;
    }

    body.login-bg:not(.home-login) .auth-hero p {
        margin-top: 6px;
        font-size: 14px !important;
    }

    body.login-bg:not(.home-login) .auth-card {
        min-height: 0;
        height: auto;
        padding: 28px 24px !important;
        border-top: 0 !important;
        border-left: 1px solid var(--color-border) !important;
        border-radius: 0 0 20px 20px !important;
    }

    body.home-login .home-auth-wrap {
        padding: 20px !important;
    }

    body.home-login .home-auth-wrap.is-sequenced [data-home-stage] {
        inset-inline: 20px;
    }

    body.home-login .home-auth-hero {
        min-height: 360px;
        padding: 32px !important;
        grid-template-columns: minmax(0, 1fr) !important;
        justify-items: start;
    }

    body.home-login .home-auth-hero .brand-mark.big.home-brand-mark {
        width: 76px !important;
        height: 76px !important;
        border-radius: 18px !important;
    }

    body.home-login .home-card {
        padding: 22px !important;
    }
}

@media screen and (max-width: 620px) {
    .topbar-date {
        display: none;
    }

    .topbar-left {
        width: 100%;
    }

    .content-title h1,
    .page-head h1,
    .page-head h2 {
        font-size: 24px !important;
    }

    .panel,
    .dashboard-execution-card,
    .dashboard-system-card,
    .dashboard-quick-section,
    .dashboard-level-block {
        padding: 14px !important;
        border-radius: 14px !important;
    }

    .dashboard-live-state {
        width: 100%;
        justify-content: flex-start;
        white-space: normal;
    }

    .dashboard-summary-card {
        min-height: 128px;
        padding: 14px !important;
    }

    .dashboard-summary-copy {
        width: 100%;
    }

    .dashboard-summary-copy strong {
        font-size: 28px !important;
    }

    .dashboard-summary-copy small {
        margin-top: 6px;
        font-size: 13px !important;
    }

    .dashboard-summary-copy em {
        padding-top: 10px;
        font-size: 12px !important;
    }

    .dashboard-system-list {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .dashboard-heatmap-scroll-hint {
        display: block !important;
        margin: 10px 0 0;
        font-size: 12px;
    }

    .dashboard-heatmap-table {
        width: 100% !important;
        min-width: 900px !important;
    }

    .dashboard-heatmap-table th:first-child {
        position: sticky;
        left: 0;
        z-index: 1;
        width: 76px !important;
        padding: 0 8px 0 0 !important;
        background: #fff !important;
        text-align: left;
        box-shadow: 4px 0 5px -4px rgba(15, 23, 42, .25);
    }

    .dashboard-heatmap-table th,
    .dashboard-heatmap-table td,
    .dashboard-heatmap-table tr {
        height: 32px !important;
    }

    .dashboard-heatmap-table .dashboard-heat-cell {
        height: 30px !important;
        min-height: 0;
    }

    .dashboard-heatmap-table .dashboard-heat-cell:hover {
        transform: none;
    }

    .dashboard-heatmap-heading {
        flex-direction: row;
        gap: 10px;
    }

    .dashboard-heatmap-total {
        align-self: flex-start;
        min-width: 68px;
        padding: 8px;
    }

    .dashboard-heatmap-legend {
        gap: 6px;
    }

    .dashboard-heatmap-legend i {
        width: 13px;
        height: 13px;
    }

    .dashboard-quick-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body.home-login .home-auth-wrap {
        padding: 14px !important;
    }

    body.home-login .home-auth-wrap.is-sequenced [data-home-stage] {
        inset-inline: 14px;
    }

    body.home-login .home-card {
        padding: 18px !important;
        border-radius: 18px !important;
    }

    .home-card-brand {
        margin-bottom: 18px;
        padding-bottom: 15px;
    }

    .home-card-brand strong {
        font-size: 14px;
    }

    body.home-login .home-card-heading h2 {
        font-size: 24px !important;
    }

    body.home-login .auth-portal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    body.home-login .auth-portal {
        min-height: 104px !important;
        flex-direction: column;
        align-items: flex-start !important;
        gap: 9px !important;
        padding: 12px !important;
    }

    body.home-login .auth-portal-copy {
        width: 100%;
    }

    body.home-login .auth-portal-copy b {
        font-size: 14px !important;
    }

    body.home-login .home-auth-hero {
        min-height: 330px;
        padding: 26px !important;
        border-radius: 18px !important;
    }

    body.home-login .home-auth-hero h1 {
        font-size: 28px !important;
    }

    body.home-login .home-auth-hero p {
        font-size: 15px !important;
    }
}

/* Mobile data-card actions: keep labels and controls readable at touch sizes. */
@media screen and (max-width: 1024px) {
    .responsive-data-table tbody td.row-actions {
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        height: auto !important;
        align-items: stretch;
        gap: 8px;
        overflow-wrap: normal;
    }

    .responsive-data-table tbody td.row-actions::before {
        width: 100%;
        flex-basis: 100%;
        white-space: nowrap;
    }

    .responsive-data-table tbody td.row-actions > form,
    .responsive-data-table tbody td.row-actions > .btn {
        flex: 1 1 144px;
        min-width: 0;
        margin: 0;
    }

    .responsive-data-table tbody td.row-actions > form {
        display: flex;
    }

    .responsive-data-table tbody td.row-actions .btn {
        min-width: 0;
        height: auto !important;
        min-height: 44px !important;
        max-height: none !important;
        padding: 8px 12px !important;
        font-size: 13px !important;
        white-space: nowrap;
        overflow-wrap: normal;
        word-break: normal;
    }

    .responsive-data-table tbody td.row-actions > form .btn {
        width: 100%;
    }
}

@media screen and (max-width: 900px) {
    body .filter-form .filter-actions .btn,
    body form.filter-form .filter-actions .btn {
        height: auto !important;
        min-height: 44px !important;
        flex: 1 1 120px;
        padding: 8px 16px !important;
        font-size: 13px !important;
    }
}

@media screen and (max-width: 720px) {
    .page-head .actions > :only-child {
        grid-column: 1 / -1;
    }
}

/* Guru Kontributor: lead with the latest revision and progressively disclose history. */
.question-review-cell {
    width: 32%;
    min-width: 300px;
    vertical-align: top !important;
}

.question-review-feedback {
    display: grid;
    min-width: 0;
    max-width: none;
    gap: 12px;
}

.question-review-feedback-item {
    min-width: 0;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg-card, #fff);
}

.question-review-feedback-item.is-latest {
    border-color: color-mix(in srgb, var(--theme-primary) 24%, var(--line));
    border-left: 4px solid var(--theme-primary);
    background: color-mix(in srgb, var(--theme-primary-soft) 42%, var(--bg-card, #fff));
}

.question-review-feedback-item header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    gap: 12px;
}

.question-review-feedback-item header > div {
    min-width: 0;
}

.question-review-feedback-item b,
.question-review-feedback-item header span,
.question-review-feedback-item small {
    display: block;
}

.question-review-feedback-item b {
    color: var(--text);
    font-size: 14px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.question-review-feedback-item header div > span,
.question-review-feedback-item small,
.question-review-feedback-none {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.question-review-feedback-item .question-review-feedback-kicker {
    margin-bottom: 3px;
    color: var(--theme-primary-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .045em;
    line-height: 1.35;
    text-transform: uppercase;
}

.question-review-feedback-item .status {
    flex: 0 0 auto;
    min-height: 28px;
    padding: 6px 9px;
    font-size: 12px;
    white-space: nowrap;
}

.question-review-feedback-item p {
    max-width: none;
    margin: 0;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.65;
    overflow-wrap: anywhere;
    text-align: justify;
    text-justify: inter-word;
    white-space: pre-line;
}

.question-review-feedback-copy {
    display: grid;
    gap: 12px;
    margin: 12px 0 9px;
}

.question-review-feedback-item .question-review-feedback-empty {
    margin: 12px 0 9px;
    color: var(--muted);
    font-style: italic;
}

.question-review-feedback-none {
    display: block;
    padding: 12px 14px;
    border: 1px dashed var(--line);
    border-radius: 10px;
    background: var(--bg-hover, #fbfdff);
}

.question-review-feedback-history {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg-card, #fff);
}

.question-review-feedback-history > summary {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-secondary);
    background: var(--bg-hover, #f8fafc);
    font-size: 14px;
    font-weight: 750;
    line-height: 1.4;
    list-style: none;
    cursor: pointer;
}

.question-review-feedback-history > summary::-webkit-details-marker {
    display: none;
}

.question-review-feedback-history > summary::after {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    margin-left: 2px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    content: "";
    transform: rotate(45deg) translateY(-2px);
    transition: transform .16s ease-out;
}

.question-review-feedback-history[open] > summary::after {
    transform: rotate(225deg) translate(-2px, -2px);
}

.question-review-feedback-history-count {
    min-width: 0;
    margin-left: auto;
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--theme-primary-dark);
    background: var(--theme-primary-soft);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.question-review-feedback-history-list {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid var(--line);
}

.question-review-feedback-history:not([open]) > .question-review-feedback-history-list {
    display: none;
}

.question-review-feedback-history-list .question-review-feedback-item {
    padding: 13px 14px;
    background: var(--bg-hover, #fbfdff);
}

.question-review-feedback-history-list .question-review-feedback-item p {
    max-width: 96ch;
    font-size: 14px;
}

body:not(.login-bg):not(.exam-body):not(.tka-bg) table.responsive-data-table.dense-list-table:has(.question-review-cell) tbody td.question-review-cell {
    height: auto !important;
    min-height: 0 !important;
}

body:not(.login-bg):not(.exam-body):not(.tka-bg) table.responsive-data-table.dense-list-table:has(.question-review-cell) tbody td.row-actions {
    height: auto !important;
    min-height: 0 !important;
}

@media screen and (min-width: 1025px) {
    .responsive-data-table:has(.question-review-cell) {
        display: block;
        min-width: 0 !important;
    }

    .responsive-data-table:has(.question-review-cell) thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .responsive-data-table:has(.question-review-cell) tbody {
        display: grid;
        gap: 12px;
    }

    .responsive-data-table:has(.question-review-cell) tbody tr {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: #fff;
        box-shadow: var(--shadow-sm);
    }

    .responsive-data-table:has(.question-review-cell) tbody td {
        display: block;
        width: auto !important;
        height: auto !important;
        min-width: 0 !important;
        min-height: 0;
        padding: 11px 12px !important;
        border-bottom: 0 !important;
        background: #fff !important;
        white-space: normal !important;
    }

    .responsive-data-table:has(.question-review-cell) tbody td::before {
        display: block;
        margin-bottom: 5px;
        color: var(--muted);
        content: attr(data-label);
        font-size: 12px;
        font-weight: 800;
        letter-spacing: .04em;
        line-height: 1.35;
        text-transform: uppercase;
    }

    .responsive-data-table:has(.question-review-cell) tbody td[data-label="Soal"] {
        grid-column: span 2;
    }

    .responsive-data-table:has(.question-review-cell) tbody .question-review-cell,
    .responsive-data-table:has(.question-review-cell) tbody .row-actions {
        grid-column: 1 / -1;
        border-top: 1px solid var(--line) !important;
    }

    .responsive-data-table:has(.question-review-cell) tbody .row-actions {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .responsive-data-table:has(.question-review-cell) tbody .row-actions::before {
        flex: 0 0 100%;
    }

    .responsive-data-table:has(.question-review-cell) .question-review-feedback {
        grid-template-columns: minmax(0, 1fr);
        max-width: none;
    }

    .responsive-data-table:has(.question-review-cell) .question-review-feedback-none {
        grid-column: 1 / -1;
    }

    .table-wrap:has(.question-review-cell) {
        overflow: visible;
        border: 0;
        box-shadow: none;
    }
}

/* Catatan peserta: waktu harus terbaca dan navigasi kembali tetap jelas. */
.participant-log-page-head .actions {
    display: flex;
    align-items: center;
}

.participant-log-back {
    min-height: 44px;
    white-space: nowrap;
}

.participant-log-back svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media screen and (max-width: 900px) {
    .participant-log-page-head .actions,
    .participant-log-back {
        width: 100%;
    }
}

/* Participant form: searchable school picker with school-bound classes. */
body.staff-body .student-school-field {
    display: grid;
    min-width: 0;
    align-content: start;
    gap: 6px;
}

body.staff-body .student-school-field > label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

body.staff-body .student-school-field > label:not(:first-child) {
    margin-top: 2px;
}

body.staff-body .student-school-field input[type="search"] {
    padding-inline-start: 12px;
    background: var(--bg-card);
}

body.staff-body .student-school-field .field-help,
body.staff-body .student-class-field .field-help {
    display: block;
    min-height: 18px;
    color: var(--muted);
    font-weight: 500;
}

body.staff-body [data-student-class-select]:disabled {
    cursor: not-allowed;
    opacity: .55;
    background: var(--bg);
}

@media screen and (max-width: 620px) {
    body.staff-body .student-school-field,
    body.staff-body .student-class-field {
        width: 100%;
    }
}

/* Session list: compact filters and a status-only bulk action toolbar. */
.session-list-head .actions {
    flex: 1 1 560px;
    align-items: flex-end;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.session-list-head .bulk-delete-form {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    min-width: min(100%, 430px);
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #f8fafc;
}

.session-list-head .bulk-delete-form > .btn,
.session-list-head .bulk-status-field select {
    min-height: 44px;
}

.session-list-head .session-bulk-approve {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #047857;
}

.session-list-head .session-bulk-approve:hover {
    border-color: #6ee7b7;
    background: #d1fae5;
    color: #065f46;
}

.session-list-head .question-bulk-selection-status {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding-inline: 10px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fff;
    white-space: nowrap;
}

@media screen and (max-width: 720px) {
    .session-list-head .actions,
    .session-list-head .bulk-delete-form,
    .session-list-head .bulk-status-field,
    .session-list-head .question-bulk-selection-status,
    .session-list-head .bulk-delete-form > .btn {
        width: 100%;
        min-width: 0;
    }

    .session-list-head .actions {
        flex: 0 1 auto;
    }

    .session-list-head .bulk-delete-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Form Paket Soal: pilihan banyak pembuat soal memakai ruang penuh di bawah form. */
.package-form-panel {
    align-items: start;
}

@media (min-width: 901px) {
    form.package-form-panel[data-level-subject-form] {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.package-question-total {
    display: block;
    min-height: 40px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-card);
    font-weight: 700;
}

.package-author-picker {
    min-width: 0;
    margin: 2px 0 0;
    padding: 0 0 10px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-card);
}

.package-author-picker > legend {
    margin-inline-start: 14px;
    padding: 0 7px;
    color: var(--color-foreground);
    font-size: 14px;
    font-weight: 800;
}

.package-author-heading {
    padding: 6px 12px 8px;
}

.package-author-heading p {
    max-width: 760px;
    margin: 0;
    color: var(--color-muted-foreground);
    font-size: 12px;
    line-height: 1.45;
}

.package-author-selection-count {
    display: inline-flex;
    min-height: 36px;
    min-width: 0;
    align-items: center;
    padding: 7px 10px;
    border: 1px solid color-mix(in srgb, var(--theme-primary) 24%, var(--color-border));
    border-radius: 10px;
    color: var(--theme-primary-dark);
    background: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
    text-align: center;
}

.package-author-toolbar {
    display: grid;
    grid-template-columns:
        minmax(0, 1.3fr)
        minmax(0, .8fr)
        minmax(0, 1fr)
        minmax(0, .72fr)
        minmax(138px, max-content)
        max-content;
    align-items: end;
    gap: 8px;
    padding: 0 12px 10px;
}

.package-author-toolbar > label {
    min-width: 0;
    margin: 0;
    font-size: 12px;
}

.package-author-toolbar input[type="search"],
.package-author-toolbar select {
    width: 100%;
    min-height: 36px;
    margin-top: 3px;
    padding-block: 6px;
    font-size: 13px;
}

body.staff-body .package-author-toolbar input[type="search"],
body.staff-body .package-author-toolbar select {
    min-height: 36px !important;
    padding: 6px 8px;
    font-size: 13px;
}

.package-author-actions {
    display: grid;
    grid-template-columns: repeat(2, auto);
    align-items: center;
    justify-self: end;
    gap: 6px;
}

.package-author-actions .btn {
    min-height: 36px;
    padding-inline: 10px;
    font-size: 12px;
    white-space: nowrap;
}

.package-author-table-wrap {
    max-height: 360px;
    margin: 0 12px;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--color-border);
    border-radius: 9px;
    background: var(--color-card);
}

.package-author-table {
    margin: 0;
    table-layout: fixed;
}

.package-author-col-check {
    width: 5%;
}

.package-author-col-name {
    width: 23%;
}

.package-author-col-school {
    width: 28%;
}

.package-author-col-subdistrict {
    width: 17%;
}

.package-author-col-role {
    width: 17%;
}

.package-author-col-count {
    width: 10%;
}

.package-author-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 7px 9px;
    background: color-mix(in srgb, var(--color-muted) 55%, var(--color-card));
    font-size: 12px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .025em;
}

.package-author-table tbody td {
    padding: 0 9px;
    font-size: 12px;
    line-height: 1.3;
}

body.staff-body .package-author-table tbody td {
    padding: 0 9px !important;
    font-size: 12px !important;
    line-height: 1.3;
}

body.staff-body .package-author-table thead th {
    padding: 6px 8px !important;
    font-size: 12px !important;
    line-height: 1.2;
}

.package-author-table tbody tr:last-child td {
    border-bottom: 0;
}

.package-author-table tbody tr:has(input:checked) td {
    background: color-mix(in srgb, var(--theme-primary-soft) 58%, var(--color-card));
}

.package-author-check-column,
.package-author-check-cell {
    width: 50px;
    text-align: center;
}

body.staff-body .package-author-table td.package-author-check-cell {
    width: auto;
    min-width: 0 !important;
}

.package-author-count-column,
.package-author-question-count {
    width: 94px;
    text-align: right;
}

.package-author-checkbox {
    display: inline-grid;
    width: 44px;
    min-height: 44px;
    margin: 0;
    place-items: center;
    cursor: pointer;
}

.package-author-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--theme-primary);
    cursor: pointer;
}

.package-author-identity {
    display: flex;
    min-width: 0;
    min-height: 42px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
}

.package-author-identity strong,
.package-author-identity span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.package-author-identity strong {
    color: var(--color-foreground);
    font-size: 13px;
}

.package-author-identity span {
    color: var(--color-muted-foreground);
    font-size: 12px;
}

.package-author-school,
.package-author-subdistrict {
    overflow: hidden;
    color: var(--color-foreground);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.package-author-missing {
    color: var(--color-muted-foreground);
}

.package-author-role .badge,
.package-author-question-count .badge {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.package-author-question-count .badge {
    min-width: 34px;
    justify-content: center;
    font-variant-numeric: tabular-nums;
}

.package-author-table tr[hidden] {
    display: none !important;
}

@media screen and (max-width: 760px) {
    .package-author-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .package-author-toolbar > label:first-child {
        grid-column: span 2;
    }

}

@media screen and (max-width: 900px) {
    .package-author-heading,
    .package-author-toolbar {
        align-items: stretch;
    }

    .package-author-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: stretch;
    }

    .package-author-actions .btn {
        width: 100%;
        min-height: 44px;
        white-space: normal;
    }

    .package-author-toolbar input[type="search"],
    .package-author-toolbar select {
        min-height: 44px;
        font-size: 16px;
    }

    body.staff-body .package-author-toolbar input[type="search"],
    body.staff-body .package-author-toolbar select {
        min-height: 44px !important;
        font-size: 16px;
    }

    .package-author-table-wrap {
        max-height: 420px;
        margin-inline: 12px;
    }

    .package-author-table,
    .package-author-table tbody {
        display: block;
        width: 100%;
    }

    .package-author-table thead {
        display: none;
    }

    .package-author-table tbody tr[data-package-author-row] {
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr) auto;
        grid-template-rows: 44px 24px 26px;
        align-items: center;
        column-gap: 6px;
        padding: 3px 8px;
        border-bottom: 1px solid var(--color-border);
    }

    .package-author-table tbody tr[data-package-author-row]:has(input:checked) {
        background: color-mix(in srgb, var(--theme-primary-soft) 58%, var(--color-card));
    }

    .package-author-table tbody tr[data-package-author-row]:has(input:checked) td {
        background: transparent;
    }

    .package-author-table tbody tr[data-package-author-row] td {
        display: block;
        width: auto;
        align-self: stretch;
        padding: 2px 4px;
        border: 0;
        text-align: left;
    }

    .package-author-table .package-author-check-cell {
        grid-column: 1;
        grid-row: 1;
        padding: 0;
    }

    .package-author-table .package-author-name-cell {
        grid-column: 2 / 4;
        grid-row: 1;
    }

    .package-author-table .package-author-identity {
        min-height: 44px;
    }

    .package-author-table .package-author-school {
        display: flex;
        grid-column: 2 / 4;
        grid-row: 2;
        align-items: center;
    }

    .package-author-table .package-author-subdistrict {
        display: flex;
        grid-column: 2;
        grid-row: 3;
        align-items: center;
    }

    .package-author-table .package-author-role {
        display: flex;
        grid-column: 3;
        grid-row: 3;
        align-items: center;
        justify-content: flex-end;
        justify-self: end;
    }

    .package-author-table .package-author-question-count {
        display: grid;
        grid-column: 1;
        grid-row: 2 / 4;
        align-self: center;
        justify-self: center;
        place-items: center;
        text-align: center;
    }

    .package-author-table td.empty {
        display: block;
        padding: 18px 12px;
    }

    .package-author-table td[data-label]::before {
        content: attr(data-label) ": ";
        color: var(--color-muted-foreground);
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .025em;
    }

    .package-author-table td.package-author-role::before,
    .package-author-table td.package-author-question-count::before {
        display: none;
    }

    .package-author-table td.package-author-question-count::before {
        display: block;
        content: "Soal";
        font-size: 12px;
        line-height: 1;
    }
}

@media screen and (max-width: 620px) {
    .package-author-toolbar {
        grid-template-columns: minmax(0, 1fr);
    }

    .package-author-toolbar > label:first-child {
        grid-column: 1;
    }

    .package-author-selection-count,
    .package-author-actions {
        width: 100%;
    }

    .package-author-actions {
        justify-self: stretch;
    }
}

@media screen and (max-width: 430px) {
    .package-author-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

/* Bank Soal: separate document, import, primary, and selected-item actions. */
.question-bank-list-head {
    display: grid !important;
    grid-template-columns: minmax(260px, .72fr) minmax(0, 1.78fr);
    align-items: start !important;
    gap: 24px !important;
}

.question-bank-list-head .page-head-copy {
    max-width: 390px;
    padding-block: 9px;
}

.question-bank-list-head .page-head-copy p {
    max-width: 46ch;
    line-height: 1.55;
}

.question-bank-list-head .actions {
    display: grid !important;
    grid-template-columns: max-content minmax(320px, 1fr) max-content;
    grid-template-areas:
        "documents import primary"
        "bulk bulk bulk";
    align-items: end;
    gap: 12px;
    width: 100%;
}

.question-bank-list-head .list-document-actions {
    grid-area: documents;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.question-bank-list-head .list-document-actions .btn {
    min-height: 42px;
    padding-inline: 13px;
    white-space: nowrap;
}

.question-bank-list-head .inline-upload {
    grid-area: import;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
    min-width: 0;
    width: 100%;
    padding: 7px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--theme-primary-soft) 24%, #fff);
}

.question-bank-list-head .inline-upload-file {
    min-width: 0;
    padding: 6px 8px;
    border-color: color-mix(in srgb, var(--theme-primary) 14%, var(--color-border));
    background: #fff;
}

.question-bank-list-head .inline-upload > .btn {
    min-height: 42px;
    white-space: nowrap;
}

.question-bank-list-head .list-primary-action {
    grid-area: primary;
    min-height: 44px;
    padding-inline: 18px;
    white-space: nowrap;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--theme-primary) 20%, transparent);
}

.question-bank-list-head .bulk-delete-form {
    grid-area: bulk;
    display: grid;
    grid-template-columns: max-content minmax(190px, 1fr) max-content max-content max-content;
    grid-template-areas: "selection status apply package delete";
    align-items: end;
    gap: 8px;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #f8fafc;
}

.question-bank-list-head .question-bulk-selection-status {
    grid-area: selection;
    align-self: end;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    min-width: 0;
    padding: 8px 11px;
    border: 1px solid color-mix(in srgb, var(--theme-primary) 18%, var(--color-border));
    border-radius: 10px;
    background: #fff;
    color: var(--color-muted-foreground);
    white-space: nowrap;
}

.question-bank-list-head .question-bulk-status-field {
    grid-area: status;
    min-width: 0;
}

.question-bank-list-head [data-bulk-status-button] {
    grid-area: apply;
}

.question-bank-list-head [data-bulk-create-package-button] {
    grid-area: package;
}

.question-bank-list-head [data-bulk-delete-button] {
    grid-area: delete;
}

.question-bank-list-head .bulk-delete-form > .btn {
    min-height: 40px;
    white-space: nowrap;
}

@media screen and (max-width: 1260px) {
    .question-bank-list-head {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px !important;
    }

    .question-bank-list-head .page-head-copy {
        max-width: none;
        padding-block: 0;
    }
}

@media screen and (max-width: 1040px) {
    .question-bank-list-head .actions {
        grid-template-columns: minmax(0, 1fr) max-content;
        grid-template-areas:
            "documents primary"
            "import import"
            "bulk bulk";
    }

    .question-bank-list-head .bulk-delete-form {
        grid-template-columns: max-content minmax(190px, 1fr) max-content max-content;
        grid-template-areas:
            "selection status apply apply"
            "selection status package delete";
    }
}

@media screen and (max-width: 720px) {
    .question-bank-list-head .actions {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "primary"
            "documents"
            "import"
            "bulk";
    }

    .question-bank-list-head .list-document-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }

    .question-bank-list-head .list-document-actions .btn,
    .question-bank-list-head .list-primary-action {
        width: 100%;
    }

    .question-bank-list-head .inline-upload {
        grid-column: auto;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .question-bank-list-head .bulk-delete-form {
        grid-column: auto;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "selection selection"
            "status status"
            "apply apply"
            "package delete";
    }

    .question-bank-list-head .question-bulk-selection-status,
    .question-bank-list-head .question-bulk-status-field,
    .question-bank-list-head .bulk-delete-form > .btn {
        width: 100%;
    }
}

@media screen and (max-width: 440px) {
    .question-bank-list-head .list-document-actions,
    .question-bank-list-head .inline-upload,
    .question-bank-list-head .bulk-delete-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .question-bank-list-head .bulk-delete-form {
        grid-template-areas:
            "selection"
            "status"
            "apply"
            "package"
            "delete";
    }
}

@media screen and (max-width: 1024px) {
    .question-review-cell,
    .question-review-feedback {
        width: auto;
        min-width: 0;
        max-width: none;
    }
}

@media screen and (max-width: 600px) {
    .responsive-data-table tbody td.question-review-cell {
        display: block !important;
    }

    .responsive-data-table tbody td.question-review-cell::before {
        display: block;
        margin-bottom: 8px;
    }

    .question-review-feedback-item {
        padding: 14px;
    }

    .question-review-feedback-item header {
        align-items: flex-start;
        flex-direction: column;
    }

    .question-review-feedback-item p,
    .question-review-feedback-history-list .question-review-feedback-item p {
        max-width: none;
        font-size: 16px;
        line-height: 1.65;
    }

    .question-review-feedback-history > summary {
        align-items: flex-start;
        flex-wrap: wrap;
        font-size: 14px;
    }

    .question-review-feedback-history-count {
        margin-left: 0;
    }
}

/* Public portal theme sync: every decorative accent follows the selected theme. */
html[data-theme] body.home-login {
    background:
        radial-gradient(circle at 12% 88%, color-mix(in srgb, var(--theme-primary-light) 30%, transparent), transparent 30%),
        radial-gradient(circle at 88% 8%, color-mix(in srgb, var(--theme-primary-light) 22%, transparent), transparent 26%),
        linear-gradient(135deg, var(--theme-hero-a) 0%, var(--theme-hero-b) 52%, var(--theme-hero-c) 100%) !important;
}

html[data-theme] body.home-login .home-auth-hero {
    background: color-mix(in srgb, var(--theme-hero-a) 76%, transparent) !important;
}

html[data-theme] body.home-login .home-welcome-replay {
    color: var(--theme-primary-dark);
    background: var(--theme-primary-soft);
}

html[data-theme] body.home-login .home-welcome-replay:hover {
    color: var(--theme-hero-a);
    background: color-mix(in srgb, var(--theme-primary) 16%, #fff);
}

html[data-theme] body.home-login .department-welcome-kicker {
    color: var(--theme-primary-dark) !important;
}

html[data-theme] body.home-login .department-welcome .home-sequence-button {
    border-color: var(--theme-primary-dark) !important;
    background: var(--theme-primary-dark) !important;
}

html[data-theme] body.home-login .department-welcome .home-sequence-button:hover {
    border-color: var(--theme-hero-a) !important;
    background: var(--theme-hero-a) !important;
}

html[data-theme] body.home-login .department-welcome .home-sequence-button:focus-visible {
    outline-color: var(--theme-focus);
}

html[data-theme] body.home-login .auth-portal {
    --portal-accent: var(--theme-primary);
    --portal-soft: var(--theme-primary-soft);
    border-color: color-mix(in srgb, var(--theme-primary) 18%, var(--color-border)) !important;
    background: color-mix(in srgb, var(--theme-primary-soft) 42%, #fff) !important;
}

html[data-theme] body.home-login .auth-portal:hover {
    border-color: var(--theme-primary) !important;
    background: var(--theme-primary-soft) !important;
}

html[data-theme] body.home-login .auth-portal-icon {
    color: var(--theme-primary) !important;
    background: var(--theme-primary-soft) !important;
}

/* Mobile viewport polish: keep public stages near the top and let data cards grow. */
@media screen and (max-width: 900px) {
    body.home-login .home-auth-wrap {
        min-height: 100svh;
        align-content: start;
        align-items: start;
        padding: max(14px, env(safe-area-inset-top)) 14px max(22px, env(safe-area-inset-bottom)) !important;
    }

    body.home-login .home-auth-wrap.is-sequenced {
        place-items: start center;
    }

    body.home-login .home-auth-wrap.is-sequenced [data-home-stage] {
        inset: auto;
        width: 100%;
        max-width: 1056px;
    }

    body.home-login .home-auth-wrap.is-sequenced [data-home-stage]:not(.is-active) {
        display: none;
    }

    body.home-login .home-auth-wrap.is-sequenced [data-home-stage].is-active {
        position: relative;
        margin: 0 auto;
    }

    body.home-login .home-auth-hero {
        min-height: 0;
        padding: 26px !important;
        align-content: start;
    }

    body.home-login .department-welcome {
        gap: 18px;
        padding: 18px;
    }

    body.home-login .department-head-photo {
        width: min(240px, 62vw);
    }

    body.staff-body table.responsive-data-table.dense-list-table tbody td[data-label] {
        height: auto !important;
        min-height: 44px;
    }

    body.staff-body .responsive-data-table tbody td.row-actions {
        max-height: none !important;
        padding-block: 12px !important;
    }
}

@media screen and (min-width: 901px) and (max-width: 1024px) {
    body.staff-body table.responsive-data-table.dense-list-table tbody td[data-label] {
        height: auto !important;
        min-height: 44px;
    }
}

@media screen and (max-width: 620px) {
    body.home-login .home-auth-hero {
        padding: 22px !important;
        gap: 16px !important;
    }

    body.home-login .home-auth-hero .brand-mark.big.home-brand-mark {
        width: 64px !important;
        height: 64px !important;
        padding: 8px !important;
        border-radius: 16px !important;
    }

    body.home-login .home-auth-hero .brand-mark.big.home-brand-mark img {
        max-width: 48px !important;
        max-height: 48px !important;
    }

    body.home-login .home-auth-hero h1 {
        font-size: 28px !important;
        line-height: 1.04;
    }

    /* Hero beranda di ponsel: logo di atas, teks dan tombol di tengah. */
    body.home-login .home-auth-hero {
        justify-items: center !important;
        text-align: center;
    }

    body.home-login .home-auth-hero .home-hero-copy {
        display: grid;
        justify-items: center;
    }

    body.home-login .home-auth-hero .home-sequence-button {
        margin-inline: auto;
    }

    /* Kartu pilihan masuk: heading dan tombol lanjut rata tengah. */
    body.home-login .home-card {
        text-align: center;
    }

    body.home-login .home-card-heading p {
        margin-inline: auto;
        max-width: 46ch;
    }

    body.home-login .auth-portal-grid {
        text-align: start;
    }

    body.home-login .home-welcome-replay {
        margin-inline: auto;
    }


    body.home-login .home-auth-hero p {
        margin-top: 10px;
        font-size: 14px !important;
        line-height: 1.45;
    }

    body.home-login .home-card {
        padding: 16px !important;
    }

    body.home-login .home-card-brand {
        margin-bottom: 16px;
        padding-bottom: 14px;
    }

    body.home-login .home-card-heading {
        margin-bottom: 16px;
    }

    body.home-login .home-card-heading h2 {
        font-size: 24px !important;
    }

    body.home-login .auth-portal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    body.home-login .auth-portal {
        min-height: 80px !important;
        padding: 10px !important;
        flex-direction: row;
        align-items: center !important;
        gap: 9px !important;
    }

    body.home-login .auth-portal-icon {
        width: 40px !important;
        height: 40px !important;
        flex-basis: 40px;
    }

    body.home-login .auth-portal-copy b {
        font-size: 14px !important;
        overflow-wrap: anywhere;
    }

    body.home-login .department-welcome {
        gap: 16px;
        padding: 16px;
        border-radius: 18px !important;
    }

    body.home-login .department-head-photo {
        width: min(220px, 66vw);
    }

    body.home-login .department-welcome p {
        font-size: 15px !important;
        line-height: 1.5;
    }

    body.staff-body .responsive-data-table tbody td {
        grid-template-columns: minmax(96px, .34fr) minmax(0, 1fr);
        gap: 9px;
    }

    body.staff-body .responsive-data-table tbody td[data-label="Soal"],
    body.staff-body .responsive-data-table tbody td.question-review-cell {
        display: block !important;
    }

    body.staff-body .responsive-data-table tbody td[data-label="Soal"]::before,
    body.staff-body .responsive-data-table tbody td.question-review-cell::before {
        display: block;
        margin-bottom: 7px;
    }

    body.staff-body .responsive-data-table tbody td.bulk-select-column {
        display: flex !important;
        min-height: 48px;
        align-items: center;
        justify-content: space-between;
    }

    body.staff-body .responsive-data-table tbody td.bulk-select-column::before {
        flex: 0 0 auto;
    }
}

@media screen and (max-width: 340px) {
    body.home-login .auth-portal-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

/* Bank Soal responsive workspace: list, authoring, media, review, and preview. */
.question-bank-list-head,
.question-bank-list-head .actions,
.question-bank-list-panel,
.question-bank-form,
.question-bank-form > *,
.question-bank-form fieldset,
.question-bank-form .rich-editor-field,
.question-bank-form .option-edit,
.question-bank-form .option-rich-editor,
.question-bank-form .media-editor,
.question-bank-form .true-false-key,
.review-card-detailed,
.student-preview-panel,
.student-preview-panel .preview-question {
    min-width: 0;
}

.question-bank-list-head .bulk-delete-form {
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.question-bulk-status-field {
    display: grid;
    gap: 4px;
    min-width: 190px;
    text-align: left;
}

.question-bulk-status-field > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.question-bulk-status-field select {
    width: 100%;
    min-height: 40px;
}

.question-bulk-selection-status {
    align-self: center;
    min-width: 88px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.question-bank-form > label,
.question-bank-form input,
.question-bank-form select,
.question-bank-form textarea,
.question-bank-form fieldset,
.question-bank-form .rich-editor-toolbar,
.question-bank-form .option-rich-editor,
.question-bank-form .media-editor {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.question-bank-form .question-taxonomy-input {
    min-height: 76px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.question-bank-form fieldset > legend {
    max-width: calc(100% - 16px);
    padding-inline: 7px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.question-bank-form .latex-entry-guide,
.question-bank-form .rich-editor-toolbar,
.question-bank-form .true-false-key {
    border-color: color-mix(in srgb, var(--theme-primary) 24%, var(--color-border));
    background: color-mix(in srgb, var(--theme-primary-soft) 55%, #fff);
}

.question-bank-form .latex-entry-guide strong,
.question-bank-form .rich-editor-tools button:hover,
.question-bank-form .rich-editor-tools button:focus-visible,
.question-bank-form .rich-preview-toggle:hover,
.question-bank-form .rich-preview-toggle:focus-visible,
.question-bank-form .rich-preview-toggle[aria-pressed="true"],
.question-bank-form .true-false-key {
    color: var(--theme-primary-dark);
}

.question-bank-form .rich-editor-tools button:hover,
.question-bank-form .rich-editor-tools button:focus-visible,
.question-bank-form .rich-preview-toggle:hover,
.question-bank-form .rich-preview-toggle:focus-visible,
.question-bank-form .rich-preview-toggle[aria-pressed="true"] {
    border-color: color-mix(in srgb, var(--theme-primary) 30%, var(--color-border));
    background: var(--theme-primary-soft);
}

.question-bank-form .rich-options-editor .option-edit-label {
    color: var(--theme-primary-dark);
    background: var(--theme-primary-soft);
}

.question-bank-form .option-rich-editor,
.question-bank-form .rich-editor-tools,
.question-bank-form .rich-editor-symbols,
.question-bank-form .media-editor label,
.question-bank-form .selected-media-details,
.question-bank-form .options-editor-actions {
    min-width: 0;
}

.question-bank-form .media-preview img,
.question-bank-form .media-existing img,
.question-bank-form .selected-media-thumbnail,
.review-card-detailed img,
.student-preview-panel img,
.student-preview-body img {
    max-width: 100%;
}

.question-bank-form audio,
.review-card-detailed audio,
.student-preview-panel audio,
.student-preview-body audio {
    width: 100%;
    max-width: 100%;
}

.question-bank-form input[type="file"]::file-selector-button {
    min-height: 36px;
    margin-right: 9px;
    padding: 7px 10px;
    border: 1px solid color-mix(in srgb, var(--theme-primary) 28%, var(--color-border));
    border-radius: 8px;
    color: var(--theme-primary-dark);
    background: var(--theme-primary-soft);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.question-bank-form .form-actions .btn {
    gap: 7px;
}

.question-bank-form .form-actions .btn svg,
.student-preview-actions .btn svg {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

@media screen and (max-width: 900px) {
    .question-bank-list-head .actions,
    .question-bank-list-head .inline-upload,
    .question-bank-list-head .bulk-delete-form {
        min-width: 0;
        max-width: 100%;
    }

    .question-bank-list-panel {
        padding: 12px !important;
    }

    .question-bank-list-panel .list-filter-form {
        margin-top: 0;
    }

    .question-bank-list-panel .list-pagination-size {
        flex-wrap: wrap;
    }

    .question-bank-form {
        gap: 14px;
        padding: 14px !important;
    }

    .question-bank-form .rich-editor-toolbar {
        display: flex;
        align-items: stretch;
        flex-direction: column;
        gap: 7px;
        padding: 6px;
    }

    .question-bank-form .rich-editor-tools {
        width: 100%;
        padding: 1px 1px 5px;
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        gap: 5px;
        overscroll-behavior-inline: contain;
        scrollbar-color: color-mix(in srgb, var(--theme-primary) 45%, #94a3b8) transparent;
        scrollbar-width: thin;
        touch-action: pan-x;
    }

    .question-bank-form .rich-editor-tools button,
    .question-bank-form .rich-preview-toggle {
        min-width: 44px;
        min-height: 44px;
        flex: 0 0 auto;
        padding: 8px 10px;
    }

    .question-bank-form .rich-editor-symbols {
        flex: 0 0 auto;
        flex-wrap: nowrap;
        gap: 5px;
    }

    .question-bank-form .rich-editor-divider {
        display: block !important;
        width: 1px;
        height: 28px;
        flex: 0 0 1px;
        align-self: center;
    }

    .question-bank-form .rich-preview-toggle {
        width: 100%;
        align-self: stretch;
    }

    .question-bank-form .rich-editor-toolbar + textarea {
        min-height: 116px !important;
    }

    .question-bank-form .option-rich-editor .rich-editor-toolbar + textarea {
        min-height: 96px !important;
    }

    .question-bank-form .selected-media-item {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .question-bank-form .selected-media-thumbnail,
    .question-bank-form .selected-media-filetype {
        width: 48px;
        height: 48px;
    }

    .review-card-detailed,
    .review-card-detailed .review-content-block,
    .review-card-detailed .review-ai-result,
    .review-card-detailed .review-option,
    .review-card-detailed .review-option-body {
        min-width: 0;
        max-width: 100%;
    }
}

@media screen and (max-width: 720px) {
    .question-bank-list-head .actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .question-bank-list-head .inline-upload,
    .question-bank-list-head .bulk-delete-form {
        display: grid;
        grid-column: 1;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        width: 100%;
    }

    .question-bank-list-head .inline-upload .btn,
    .question-bank-list-head .bulk-delete-form .btn {
        width: 100%;
    }

    .question-bulk-status-field,
    .question-bulk-selection-status {
        width: 100%;
    }

    body.staff-body .question-bank-form .rich-options-editor .option-edit {
        display: grid;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 10px;
        padding: 12px;
    }

    body.staff-body .question-bank-form .rich-options-editor .option-edit > *,
    body.staff-body .question-bank-form .rich-options-editor .option-rich-editor,
    body.staff-body .question-bank-form .rich-options-editor .media-editor,
    body.staff-body .question-bank-form .rich-options-editor .option-correct-check,
    body.staff-body .question-bank-form .rich-options-editor .true-false-key,
    body.staff-body .question-bank-form .rich-options-editor .option-remove-btn {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        grid-column: 1 !important;
    }

    body.staff-body .question-bank-form .rich-options-editor .option-edit-label {
        width: 44px;
        height: 44px;
    }

    .question-bank-form .true-false-key {
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
        gap: 8px;
        box-sizing: border-box;
        padding: 10px;
    }

    .question-bank-form .true-false-key .category-style-label {
        display: grid;
        flex: 1 0 100%;
        gap: 5px;
    }

    .question-bank-form .true-false-key > span {
        flex: 1 0 100%;
    }

    .question-bank-form .true-false-key > label:not(.category-style-label) {
        min-height: 44px;
        flex: 1 1 110px;
        justify-content: center;
        padding: 8px 10px;
        border: 1px solid color-mix(in srgb, var(--theme-primary) 22%, var(--color-border));
        border-radius: 8px;
        background: #fff;
    }

    .question-bank-form .rich-options-editor .option-remove-btn {
        min-height: 44px;
        justify-self: stretch;
    }

    .question-bank-form .options-editor-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .question-bank-form .options-editor-actions .btn,
    .question-bank-form .form-actions,
    .question-bank-form .form-actions .btn {
        width: 100%;
    }

    .question-bank-form .form-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .student-preview-overlay {
        padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
    }

    .student-preview-dialog {
        width: 100%;
        margin: 0;
        border-radius: 14px;
    }

    .student-preview-bar {
        align-items: stretch;
        flex-direction: column;
        padding: 12px;
    }

    .student-preview-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-preview-actions .btn {
        width: 100%;
        min-width: 0;
        min-height: 44px;
    }

    .student-preview-body,
    .student-preview-panel {
        padding: 12px !important;
    }

    .student-preview-body .true-false-answers,
    .student-preview-panel .true-false-answers {
        gap: 10px;
        padding: 0;
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .student-preview-body .true-false-header,
    .student-preview-panel .true-false-header {
        display: none;
    }

    .student-preview-body .true-false-answers .statement-row,
    .student-preview-panel .true-false-answers .statement-row {
        min-width: 0;
        grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr);
        gap: 0;
        overflow: hidden;
        border: 1px solid var(--color-border);
        border-radius: 12px;
        background: #fff;
    }

    .student-preview-body .true-false-answers .statement-row .op-label,
    .student-preview-panel .true-false-answers .statement-row .op-label {
        grid-column: 1;
        grid-row: 1;
    }

    .student-preview-body .true-false-answers .statement-row .option-content,
    .student-preview-panel .true-false-answers .statement-row .option-content {
        grid-column: 2 / -1;
        grid-row: 1;
        border-right: 0;
    }

    .student-preview-body .true-false-answers .statement-row .category-choice:nth-child(3),
    .student-preview-panel .true-false-answers .statement-row .category-choice:nth-child(3) {
        grid-column: 2;
    }

    .student-preview-body .true-false-answers .statement-row .category-choice:nth-child(4),
    .student-preview-panel .true-false-answers .statement-row .category-choice:nth-child(4) {
        grid-column: 3;
    }

    .student-preview-body .true-false-answers .category-choice,
    .student-preview-panel .true-false-answers .category-choice {
        min-height: 44px;
        border-top: 1px solid var(--color-border);
    }

    .review-card-detailed .review-ai-trigger,
    .review-card-detailed .review-ai-result,
    .review-card-detailed .review-content-block {
        margin-inline: 10px;
    }

    .review-card-detailed .review-decision .btn,
    .review-card-detailed .review-ai-trigger .btn,
    .review-card-detailed .review-ai-comment .btn {
        min-height: 44px;
    }
}

/* Tabel laporan (peringkat & rekap) di layar sempit: kartu per baris. */
@media screen and (max-width: 760px) {
    .report-data-table {
        min-width: 0 !important;
        display: block;
    }

    .report-data-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .report-data-table tbody {
        display: grid;
        gap: 12px;
    }

    .report-data-table tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        overflow: hidden;
        border: 1px solid var(--border);
        border-radius: 13px;
        background: #fff;
        box-shadow: var(--shadow-sm);
    }

    .report-data-table tbody td {
        display: grid;
        min-width: 0 !important;
        grid-template-columns: minmax(96px, .38fr) minmax(0, 1fr);
        gap: 10px;
        padding: 10px 12px !important;
        border-bottom: 1px solid var(--border-light) !important;
        text-align: start !important;
        white-space: normal !important;
        vertical-align: top;
    }

    .report-data-table tbody td::before {
        align-self: start;
        color: var(--text-muted);
        content: attr(data-label);
        font-size: 12px;
        font-weight: 800;
        letter-spacing: .04em;
        line-height: 1.4;
        text-transform: uppercase;
    }

    .report-data-table tbody td:last-child {
        border-bottom: 0 !important;
    }

    .report-data-table td strong {
        font-size: 14px;
    }
}

/* Ujian nyata (bukan pratinjau): susunan kartu benar/salah di layar sempit agar
   tombol Benar-Salah / Sesuai-Tidak Sesuai selalu terlihat tanpa scroll menyamping. */
@media screen and (max-width: 720px) {
    body.exam-body .true-false-answers,
    body.exam-body .answers.true-false-answers {
        gap: 10px;
        padding: 0;
        overflow-x: visible;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    body.exam-body .true-false-header {
        display: none;
    }

    body.exam-body .true-false-answers .statement-row {
        min-width: 0;
        grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr);
        gap: 0;
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: #fff;
    }

    body.exam-body .true-false-answers .statement-row .op-label {
        grid-column: 1;
        grid-row: 1;
        align-self: start;
        width: 44px;
        min-width: 44px;
        height: 44px;
        border-right: 1px solid #e2e8f0;
        border-bottom: 1px solid #e2e8f0;
    }

    body.exam-body .true-false-answers .statement-row .option-content {
        grid-column: 2 / -1;
        grid-row: 1;
        border-right: 0;
    }

    body.exam-body .true-false-answers .statement-row .category-choice:nth-child(3) {
        grid-column: 2;
        grid-row: 2;
    }

    body.exam-body .true-false-answers .statement-row .category-choice:nth-child(4) {
        grid-column: 3;
        grid-row: 2;
    }

    body.exam-body .true-false-answers .category-choice {
        min-height: 46px;
        border-top: 1px solid #e2e8f0;
        font-size: 14px;
        text-align: center;
    }

    body.exam-body .true-false-answers .category-choice span {
        display: inline;
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.25;
        padding: 0 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html *,
    html *::before,
    html *::after,
    html [class],
    html [class]::before,
    html [class]::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* Proktor peserta: selection-first toolbar for safe bulk class moves/deletes. */
.participant-bulk-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fbff;
}

.participant-bulk-selection {
    display: grid;
    gap: 2px;
    min-width: max-content;
}

.bulk-select-all-control,
.bulk-checkbox-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.bulk-select-all-control {
    justify-content: flex-start;
    gap: 9px;
    min-height: 44px;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.bulk-checkbox-control {
    min-width: 44px;
    min-height: 44px;
}

.bulk-select-all-control input,
.bulk-checkbox-control input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--primary);
}

.participant-bulk-status {
    color: var(--muted);
    font-size: 12px;
}

.participant-bulk-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 8px;
}

.participant-bulk-actions > label {
    align-self: center;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.participant-bulk-actions select {
    width: auto;
    min-width: 190px;
    min-height: 42px;
    padding-block: 8px;
}

.participant-bulk-actions .btn {
    min-height: 42px;
}

.participant-bulk-actions .btn.danger {
    margin-left: 4px;
}

@media (max-width: 760px) {
    .participant-bulk-toolbar,
    .participant-bulk-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .participant-bulk-selection {
        min-width: 0;
    }

    .participant-bulk-actions {
        width: 100%;
    }

    .participant-bulk-actions > label {
        align-self: flex-start;
    }

    .participant-bulk-actions select,
    .participant-bulk-actions .btn {
        width: 100%;
    }

    .participant-bulk-actions .btn.danger {
        margin-left: 0;
        margin-top: 4px;
    }
}
.question-taxonomy-picker {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: color-mix(in srgb, var(--panel) 94%, var(--primary) 6%);
}

.package-audit-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.package-audit-stats article {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: var(--panel);
}

.package-audit-stats span,
.package-audit-stats strong {
  display: block;
}

.package-audit-stats span {
  color: var(--muted);
  font-size: 12px;
}

.package-audit-stats strong {
  margin-top: 4px;
  font-size: 24px;
}

.question-taxonomy-heading,
.question-taxonomy-legacy,
.question-taxonomy-fields {
  display: grid;
  gap: 12px;
}

.question-taxonomy-legacy[hidden] {
  display: none;
}

.question-taxonomy-heading {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  margin-bottom: 14px;
}

.question-taxonomy-heading small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.question-taxonomy-fields,
.question-taxonomy-legacy {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 720px) {
  .question-taxonomy-heading,
  .question-taxonomy-fields,
  .question-taxonomy-legacy {
    grid-template-columns: 1fr;
  }
  .package-audit-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Deterministic assessment analytics: dense data with explicit validity. */
.report-analysis-warnings {
    margin-bottom: 16px;
    border-left: 4px solid #c77a06;
    background: #fffaf0;
}

.report-analysis-warnings ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.55;
}

.report-competency-analysis,
.student-analysis-dimensions {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.report-competency-analysis .table-wrap,
.student-analysis-dimensions .table-wrap,
.item-analysis-table {
    max-width: 100%;
}

.table-wrap[tabindex="0"]:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--primary) 35%, transparent);
    outline-offset: 3px;
}

.item-analysis-table {
    min-width: 2200px;
}

.item-analysis-table th:nth-child(3) {
    min-width: 220px;
}

.item-analysis-table th:nth-child(4) {
    min-width: 320px;
}

.item-analysis-table th:nth-child(10) {
    min-width: 280px;
}

.item-analysis-table th:nth-child(12) {
    min-width: 260px;
}

.student-analysis-dimensions {
    margin: 0 18px 16px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.student-analysis-dimensions h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 13px;
}

.settings-analysis-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

@media (max-width: 700px) {
    .report-competency-analysis .table-wrap,
    .student-analysis-dimensions .table-wrap,
    .panel > .table-wrap:has(.item-analysis-table) {
        margin-inline: -12px;
        padding-inline: 12px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
    }

    .student-analysis-dimensions {
        margin-inline: 14px;
        padding: 12px;
    }
}

/* Pengaturan: teks penjelasan kecil di bawah field dan toggle dihilangkan agar
   daftar pengaturan padat dan mudah dipindai. Nilai tetap jelas dari labelnya. */
.settings-panel small,
.settings-toggle span small,
.settings-panel .field-help,
.settings-panel .settings-field-help,
.infrastructure-domain-layout label small {
    display: none;
}

/* Ukuran toggle menyusut tanpa deskripsi: baris jadi ringkas. */
.settings-toggle {
    min-height: 44px;
}

/* Analisis Butir Soal: kartu per butir menggantikan tabel 12 kolom. */
.item-analysis-hint {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 12px;
}

.item-analysis-cards {
    display: grid;
    gap: 12px;
}

.item-analysis-card {
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.item-analysis-card > summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.item-analysis-card > summary::-webkit-details-marker {
    display: none;
}

.item-analysis-card > summary:hover {
    background: #f4f9ff;
}

.item-analysis-id b {
    display: block;
    font-size: 15px;
    color: #0f3f86;
}

.item-analysis-id small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.item-analysis-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 0;
}

.item-analysis-metrics {
    display: flex;
    gap: 18px;
}

.item-analysis-metric {
    display: grid;
    justify-items: center;
    gap: 1px;
    min-width: 58px;
    text-align: center;
}

.item-analysis-metric small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.item-analysis-metric b {
    font-size: 15px;
    color: #14253d;
    font-variant-numeric: tabular-nums;
}

.item-analysis-verdict {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.item-analysis-chevron {
    width: 9px;
    height: 9px;
    border-right: 2px solid #7c8ca3;
    border-bottom: 2px solid #7c8ca3;
    transform: rotate(45deg);
    transition: transform .18s ease;
}

.item-analysis-card[open] .item-analysis-chevron {
    transform: rotate(-135deg);
}

.item-analysis-body {
    display: grid;
    gap: 0;
    border-top: 1px solid var(--border-light);
}

.item-analysis-question {
    padding: 13px 14px;
    display: grid;
    gap: 11px;
}

.item-analysis-competency {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
}

.item-analysis-competency span {
    display: grid;
    gap: 1px;
    font-size: 13px;
    color: #2c3e58;
}

.item-analysis-competency b {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.item-analysis-stimulus h4,
.item-analysis-text h4 {
    margin: 0 0 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.item-analysis-text div,
.item-analysis-stimulus div {
    font-size: 14px;
    line-height: 1.55;
    color: #1c2c42;
}

.item-analysis-stimulus {
    padding: 11px 13px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: #f8fbff;
}

.item-analysis-recommendation {
    margin: 0;
    padding: 9px 12px;
    border-left: 3px solid #2563eb;
    border-radius: 8px;
    background: #eff6ff;
    font-size: 13px;
    line-height: 1.5;
    color: #1e3a5f;
}

.item-analysis-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-top: 1px solid var(--border-light);
    background: #fbfdff;
}

.item-analysis-stats > span {
    display: grid;
    gap: 1px;
    flex: 1 1 150px;
    padding: 9px 13px;
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.item-analysis-stats > span:last-child {
    border-right: 0;
}

.item-analysis-stats small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.item-analysis-stats b {
    font-size: 14px;
    color: #14253d;
    font-variant-numeric: tabular-nums;
}

/* Layar sempit: metrik ringkas di summary, stats jadi grid 2 kolom. */
@media screen and (max-width: 900px) {
    .item-analysis-card > summary {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 9px;
    }

    .item-analysis-metrics {
        display: none;
    }

    .item-analysis-stats > span {
        flex: 1 1 calc(50% - 1px);
    }
}

@media screen and (max-width: 560px) {
    .item-analysis-stats > span {
        flex: 1 1 100%;
        border-right: 0;
    }

    .item-analysis-badges .badge {
        font-size: 12px;
    }
}

/* Perapian Bank Soal di layar sempit: semua tombol fungsi menjadi satu toolbar
   kompak yang bisa digeser samping; teks bantu kecil disembunyikan. */
@media screen and (max-width: 760px) {
    .question-bank-list-head {
        display: block !important;
    }

    /* Satu baris toolbar: Templat Excel | Templat Word | Ekspor Word | Impor |
       Tambah Soal — digeser horizontal bila muat tidak. */
    .question-bank-list-head .actions {
        display: flex !important;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        padding-bottom: 4px;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .question-bank-list-head .list-document-actions {
        display: contents;
    }

    .question-bank-list-head .actions .btn,
    .question-bank-list-head .actions > a,
    .question-bank-list-head .inline-upload > .btn {
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 0 !important;
        min-height: 40px;
        padding-inline: 13px;
        white-space: nowrap;
    }

    /* Unggah berkas jadi satu kontrol kompak di baris yang sama. */
    .question-bank-list-head .inline-upload {
        flex: 0 0 auto !important;
        display: inline-flex !important;
        grid-column: auto;
        align-items: center;
        gap: 6px;
        padding: 3px 6px 3px 10px;
        border: 1px dashed var(--color-border);
        border-radius: 12px;
        background: #fff;
    }

    .question-bank-list-head .inline-upload .inline-upload-file > label,
    .question-bank-list-head .inline-upload small[data-file-name],
    .question-bank-list-head .inline-upload .inline-upload-file > span {
        display: none;
    }

    .question-bank-list-head .inline-upload input[type="file"] {
        max-width: none;
        font-size: 13px;
        color: var(--primary);
        font-weight: 700;
    }

    .question-bank-list-head .inline-upload input[type="file"]::file-selector-button,
    .question-bank-list-head .inline-upload input[type="file"]::-webkit-file-upload-button {
        font-size: 13px;
        padding: 8px 12px;
        margin-right: 6px;
    }

    /* Aksi massal: satu baris scroll-x, hanya berguna saat ada pilihan. */
    .question-bank-list-head .bulk-delete-form {
        display: flex !important;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
        overflow: visible;
        padding: 0;
        border: 0;
        background: transparent;
        scrollbar-width: thin;
    }

    .question-bank-list-head .bulk-status-field {
        align-self: center;
    }

    .question-bank-list-head .question-bulk-selection-status {
        flex: 0 0 auto;
        min-height: 40px;
        white-space: nowrap;
    }

    .question-bank-list-head .bulk-status-field {
        flex: 0 0 170px;
        min-width: 170px;
    }

    .question-bank-list-head .bulk-delete-form .btn {
        flex: 0 0 auto !important;
        width: auto !important;
        min-height: 40px;
        white-space: nowrap;
    }
}

/* Perapian halaman Pemantauan di layar sempit: filter dua kolom, tab ringkas,
   kartu peserta tanpa label ganda, dan empty-state tidak tampil seperti kartu. */
@media screen and (max-width: 760px) {
    .monitoring-page-head {
        gap: 12px;
    }

    .monitoring-toolbar form,
    .monitoring-toolbar form.has-admin-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px 10px;
    }

    .monitoring-toolbar form .monitoring-filter-actions {
        grid-column: 1 / -1;
    }

    .monitoring-tabs {
        gap: 5px;
        padding: 5px;
    }

    .monitoring-tabs a {
        padding: 8px 8px;
        font-size: 12px;
        line-height: 1.25;
    }

    .monitoring-live-state {
        font-size: 12px;
    }

    /* Baris kartu peserta: status dan aksi tetap menonjol, label kolom
       melebar sehingga tidak menekan isi. */
    .monitoring-table tbody td {
        grid-template-columns: minmax(110px, .38fr) minmax(0, 1fr);
    }

    .monitoring-table .monitor-row-actions {
        display: flex !important;
        flex-wrap: wrap;
        gap: 6px;
    }

    .monitoring-table .monitor-row-actions .btn {
        min-height: 38px;
    }

    /* Empty state: satu baris teks biasa, bukan kartu berlabel. */
    .monitoring-table tbody td.empty,
    .proctor-session-table tbody td.empty,
    .participant-picker-table tbody td.empty,
    .review-guide-table tbody td.empty {
        padding: 18px 14px !important;
        text-align: center !important;
    }
}

/* Kartu responsif generik untuk tabel data di layar sempit: satu baris = satu kartu,
   label kolom dari data-label, tanpa scroll horizontal panjang. */
@media screen and (max-width: 760px) {
    .monitoring-table,
    .proctor-session-table,
    .participant-picker-table,
    table.compact-history-table:not(.responsive-data-table),
    .review-guide-table {
        min-width: 0 !important;
        display: block;
    }

    .monitoring-table thead,
    .proctor-session-table thead,
    .participant-picker-table thead,
    table.compact-history-table:not(.responsive-data-table) thead,
    .review-guide-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .monitoring-table tbody,
    .proctor-session-table tbody,
    .participant-picker-table tbody,
    table.compact-history-table:not(.responsive-data-table) tbody,
    .review-guide-table tbody {
        display: grid;
        gap: 12px;
    }

    .monitoring-table tbody tr,
    .proctor-session-table tbody tr,
    .participant-picker-table tbody tr,
    table.compact-history-table:not(.responsive-data-table) tbody tr,
    .review-guide-table tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        overflow: hidden;
        border: 1px solid var(--border);
        border-radius: 13px;
        background: #fff;
        box-shadow: var(--shadow-sm);
    }

    .monitoring-table tbody tr td.empty,
    .proctor-session-table tbody tr td.empty,
    .participant-picker-table tbody tr td.empty,
    table.compact-history-table:not(.responsive-data-table) tbody tr td.empty,
    .review-guide-table tbody tr td.empty {
        display: block;
        border: 0;
    }

    .monitoring-table tbody td,
    .proctor-session-table tbody td,
    .participant-picker-table tbody td,
    table.compact-history-table:not(.responsive-data-table) tbody td,
    .review-guide-table tbody td {
        display: grid;
        min-width: 0 !important;
        grid-template-columns: minmax(88px, .42fr) minmax(0, 1fr);
        gap: 10px;
        padding: 10px 12px !important;
        border-bottom: 1px solid var(--border-light) !important;
        text-align: start !important;
        white-space: normal !important;
    }

    .monitoring-table tbody td::before,
    .proctor-session-table tbody td::before,
    .participant-picker-table tbody td::before,
    table.compact-history-table:not(.responsive-data-table) tbody td::before,
    .review-guide-table tbody td::before {
        align-self: start;
        color: var(--text-muted);
        content: attr(data-label);
        font-size: 12px;
        font-weight: 800;
        letter-spacing: .04em;
        line-height: 1.4;
        text-transform: uppercase;
    }

    .monitoring-table tbody td:last-child,
    .proctor-session-table tbody td:last-child,
    .participant-picker-table tbody td:last-child,
    table.compact-history-table:not(.responsive-data-table) tbody td:last-child,
    .review-guide-table tbody td:last-child {
        border-bottom: 0 !important;
    }

    /* Kolom aksi monitoring: tombol mengalir, tidak menyempit. */
    .monitoring-table .monitor-row-actions {
        display: flex !important;
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Baris pemilih peserta: checkbox sentuh besar di kiri. */
    .participant-picker-table .bulk-select-column {
        grid-template-columns: minmax(60px, .3fr) minmax(0, 1fr);
    }

    .participant-picker-table .bulk-select-column input[type="checkbox"] {
        width: 20px !important;
        height: 20px !important;
    }

    /* Aksi baris tabel sesi proktor: tombol tumpuk rapi. */
    .proctor-session-table .actions-column .btn,
    .monitoring-table .actions-column .btn {
        min-height: 40px;
    }
}

/* Analisis Butir Soal di layar sempit: kartu per butir, tanpa scroll 2200px. */
@media screen and (max-width: 900px) {
    .item-analysis-table {
        min-width: 0;
        display: block;
    }

    .item-analysis-table thead {
        display: none;
    }

    .item-analysis-table tbody {
        display: grid;
        gap: 12px;
    }

    .item-analysis-table tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: #fff;
        overflow: hidden;
    }

    .item-analysis-table td {
        display: block;
        padding: 10px 12px;
        border-bottom: 1px solid #edf3fb;
        font-size: 12px;
    }

    .item-analysis-table td:last-child {
        border-bottom: 0;
    }

    .item-analysis-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: #5d6f87;
        font-size: 12px;
        font-weight: 800;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    .item-analysis-table td b {
        font-size: 13px;
    }

    .item-analysis-table td .badge {
        min-height: 24px;
        align-items: center;
    }
}

/* Project-wide compact balance: one final type and spacing scale for every UI surface. */
:root {
    --theme-primary: #0369a1;
    --theme-primary-light: #0369a1;
    --theme-primary-dark: #075985;
    --theme-primary-soft: #e0f2fe;
    --theme-focus: rgba(3, 105, 161, .2);
    --theme-hero-a: #0f172a;
    --theme-hero-b: #0c4a6e;
    --theme-hero-c: #0369a1;
    --theme-sidebar-a: #0f172a;
    --theme-sidebar-b: #16233d;
    --fs-page: 20px;
    --fs-panel: 16px;
    --fs-sub: 15px;
    --fs-body: 14px;
    --fs-table: 14px;
    --fs-cap: 12px;
    --staff-content-max: 1440px;
    --compact-card-padding: 14px;
    --compact-section-gap: 12px;
}

body.staff-body {
    font-size: var(--fs-body);
}

body.staff-body .main {
    padding: 0 20px 28px !important;
}

body.staff-body .main > :not(dialog) {
    width: min(100%, var(--staff-content-max));
    max-width: var(--staff-content-max);
    margin-inline: auto !important;
}

body.staff-body .topbar {
    min-height: 56px;
    margin-bottom: 14px !important;
    padding-block: 6px !important;
}

body.staff-body .content-title,
body.staff-body .page-head {
    gap: 14px;
    margin-bottom: 14px !important;
    padding-bottom: 12px !important;
}

body.staff-body .content-title h1,
body.staff-body .page-head h1,
body.staff-body .page-head h2 {
    font-size: var(--fs-page) !important;
    line-height: 1.18;
}

body.staff-body .content-title p,
body.staff-body .page-head p,
body.staff-body .section-heading p {
    margin-top: 4px;
    font-size: var(--fs-body) !important;
    line-height: 1.5;
}

body.staff-body .panel,
body.staff-body .dashboard-execution-card,
body.staff-body .dashboard-system-card,
body.staff-body .dashboard-quick-section,
body.staff-body .dashboard-school-session-panel,
body.staff-body .dashboard-v2 .dashboard-level-block {
    border-radius: 14px !important;
}

body.staff-body .panel {
    margin-bottom: var(--compact-section-gap);
    padding: var(--compact-card-padding) !important;
}

body.staff-body .panel h2,
body.staff-body .panel-title h2,
body.staff-body .dashboard-card-heading h2,
body.staff-body .dashboard-school-session-heading h2,
body.staff-body .dashboard-quick-section h2 {
    font-size: var(--fs-panel) !important;
    line-height: 1.25;
}

body.staff-body .panel h3,
body.staff-body .panel-title h3 {
    font-size: var(--fs-sub) !important;
    line-height: 1.35;
}

body.staff-body :where(small, .muted, .field-help, .settings-field-help, .badge, .status),
body.staff-body [class*="-eyebrow"] {
    font-size: 12px !important;
    line-height: 1.45;
}

body.staff-body .sidebar .side-brand span,
body.staff-body .side-account-copy span {
    font-size: 12px !important;
}

body.staff-body .grid,
body.staff-body .form,
body.staff-body .form-grid,
body.staff-body .settings-grid,
body.staff-body .dashboard-v2 {
    gap: var(--compact-section-gap);
}

body.staff-body .grid.two {
    grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
}

body.staff-body .taxonomy-settings-grid {
    grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
}

body.staff-body .filter-form,
body.staff-body .list-filter-form,
body.staff-body .participant-bulk-toolbar {
    gap: 10px !important;
    margin-block: 8px 12px;
    padding: 10px !important;
}

body.staff-body .btn {
    min-height: 40px;
    padding: 8px 13px;
    font-size: 13px;
}

body.staff-body .btn.tiny {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 12px;
}

body.staff-body :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    min-height: 40px !important;
    padding: 8px 10px;
    font-size: 14px;
}

body.staff-body textarea {
    min-height: 88px !important;
}

body.staff-body table {
    font-size: var(--fs-table);
}

body.staff-body table th {
    padding: 7px 9px !important;
    font-size: 12px !important;
    line-height: 1.35;
}

body.staff-body table td {
    padding: 8px 9px !important;
    font-size: var(--fs-table) !important;
    line-height: 1.45;
}

body.staff-body .dashboard-v2 {
    max-width: var(--staff-content-max);
}

body.staff-body .dashboard-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)) !important;
    gap: 10px !important;
}

body.staff-body .dashboard-summary-card {
    min-height: 126px;
    padding: 14px !important;
    border-radius: 14px !important;
}

body.staff-body .dashboard-summary-copy strong {
    font-size: 24px !important;
}

body.staff-body .dashboard-summary-copy small {
    margin-top: 6px;
    font-size: 13px !important;
}

body.staff-body .dashboard-summary-copy em {
    padding-top: 9px;
    font-size: 12px !important;
}

body.staff-body .dashboard-execution-card,
body.staff-body .dashboard-system-card,
body.staff-body .dashboard-quick-section,
body.staff-body .dashboard-school-session-panel,
body.staff-body .dashboard-v2 .dashboard-level-block {
    padding: 14px !important;
}

body.staff-body .dashboard-school-session-panel {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin-inline: 0;
    gap: 10px;
}

body.staff-body .dashboard-school-session-heading {
    gap: 12px;
}

body.staff-body .dashboard-session-districts {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

body.staff-body .dashboard-session-district {
    min-width: 0;
}

body.staff-body .dashboard-session-district-summary {
    grid-template-columns: minmax(0, 1fr);
    align-content: space-between;
    align-items: stretch;
    gap: 10px;
    min-height: 118px;
    padding: 11px;
}

body.staff-body .dashboard-session-district-actions {
    width: 100%;
    justify-content: space-between;
}

body.staff-body .btn.tiny.dashboard-session-detail-button {
    min-height: 44px;
}

@media screen and (max-width: 1280px) {
    body.staff-body .dashboard-session-districts {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media screen and (max-width: 1080px) {
    body.staff-body .dashboard-session-districts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media screen and (max-width: 760px) {
    body.staff-body .dashboard-session-districts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 520px) {
    body.staff-body .dashboard-session-districts {
        grid-template-columns: minmax(0, 1fr);
    }

    body.staff-body .dashboard-session-district-summary {
        min-height: 0;
    }
}

body.staff-body .dashboard-card-heading {
    padding-bottom: 10px;
}

body.staff-body .dashboard-quick-grid {
    grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)) !important;
    gap: 9px !important;
}

body.staff-body .dashboard-quick-grid > a {
    min-height: 64px;
    padding: 10px !important;
}

body.tka-bg {
    font-size: 15px;
}

body.tka-bg .tka-top {
    min-height: 64px;
    height: auto;
    padding-block: 8px;
    padding-inline: 20px;
}

.tka-top .tka-top-subname {
    margin-top: 1px;
    color: rgba(255, 255, 255, .88);
    font-size: 12px;
    line-height: 1.25;
    font-weight: 750;
}

.tka-top .side-brand > div {
    display: grid;
    gap: 1px;
}

body.tka-bg .tka-main {
    max-width: 820px;
    margin-block: 24px;
}

body.tka-bg .tka-start-card {
    padding: 22px 24px;
    border-radius: 18px;
}

body.tka-bg .tka-start-card h1 {
    font-size: 24px;
}

body.tka-bg .student-mini {
    margin-block: 16px;
}

body.tka-bg .simulation-picker,
body.tka-bg .session-grid {
    gap: 12px;
    margin-block: 16px;
}

body.tka-bg .session-card {
    padding: 15px;
    border-radius: 15px;
}

body.login-bg:not(.home-login) .auth-wrap {
    width: min(880px, calc(100% - 32px)) !important;
}

body.login-bg:not(.home-login) .login-auth-hero h1 {
    font-size: 28px !important;
}

body.login-bg:not(.home-login) .auth-card {
    padding: clamp(30px, 3.5vw, 40px) !important;
}

body.login-bg:not(.home-login) .role-login-heading {
    margin-bottom: 20px;
    padding-bottom: 15px;
}

body.login-bg:not(.home-login) .role-login-heading h2 {
    font-size: 24px !important;
}

body.home-login .home-auth-hero {
    min-height: 370px;
    padding: clamp(34px, 5vw, 52px) !important;
}

body.home-login .home-auth-hero .brand-mark.big.home-brand-mark {
    width: 80px !important;
    height: 80px !important;
}

body.home-login .home-auth-hero .brand-mark.big.home-brand-mark img {
    max-width: 58px !important;
    max-height: 58px !important;
}

body.home-login .home-auth-hero h1 {
    font-size: 28px !important;
}

body.home-login .home-auth-hero p {
    font-size: 16px !important;
}

body.home-login .home-card {
    max-width: 980px !important;
    padding: 22px !important;
}

body.home-login .home-card-heading h2 {
    font-size: 24px !important;
}

body.home-login .auth-portal {
    min-height: 80px !important;
    padding: 12px !important;
}

.action-popup {
    width: min(440px, calc(100vw - 24px));
    overscroll-behavior: contain;
}

.action-popup-card {
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 12px;
    padding: 14px;
}

.action-popup-content h2 {
    font-size: 18px;
}

.action-popup-content p {
    font-size: 14px;
    line-height: 1.5;
}

.action-popup-actions {
    gap: 8px;
    margin-top: 12px;
}

.action-popup-actions .btn {
    min-width: 88px;
    min-height: 40px;
    padding: 8px 13px;
    font-size: 13px;
}

.action-popup-actions .btn.primary {
    color: #fff !important;
    background: var(--color-accent, #0369a1) !important;
}

@media screen and (min-width: 901px) {
    body.login-bg:not(.home-login) .auth-wrap {
        grid-template-rows: minmax(500px, 560px) !important;
        place-content: start center !important;
        padding-block: 24px !important;
    }
}

@media screen and (max-width: 900px) {
    body.staff-body .main {
        padding: 0 12px 24px !important;
    }

    body.staff-body .grid.two,
    body.staff-body .taxonomy-settings-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    body.staff-body .btn,
    body.staff-body .btn.tiny,
    body.staff-body :where(input:not([type="checkbox"]):not([type="radio"]), select) {
        min-height: 44px !important;
    }

    body.staff-body :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
        font-size: 16px;
    }

    body.staff-body .dashboard-summary-card {
        min-height: 118px;
        padding: 12px !important;
    }

    body.tka-bg .tka-main {
        margin-block: 16px;
        padding-inline: 12px;
    }

    body.tka-bg .tka-start-card {
        padding: 18px;
    }

    body.login-bg:not(.home-login) .auth-wrap {
        width: min(540px, calc(100% - 24px)) !important;
    }
}

@media screen and (max-width: 620px) {
    body.staff-body .content-title h1,
    body.staff-body .page-head h1,
    body.staff-body .page-head h2 {
        font-size: 20px !important;
    }

    body.staff-body .dashboard-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body.staff-body .dashboard-summary-copy {
        width: min(88%, 180px);
    }

    body.staff-body .dashboard-summary-copy strong {
        font-size: 24px !important;
    }

    body.tka-bg .tka-start-card h1 {
        font-size: 24px;
    }

    body.home-login .home-auth-hero h1 {
        font-size: 28px !important;
    }

    .action-popup-actions {
        grid-column: 1 / -1;
    }

    .action-popup-actions .btn {
        min-height: 44px;
        flex: 1 1 120px;
    }
}

/* Manual AI controls: report pages stay light until a scoped action is requested. */
body.staff-body .report-ai-section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 500px);
    align-items: flex-start;
    gap: 12px 18px;
}

body.staff-body .report-ai-section-actions {
    display: grid;
    justify-items: end;
    gap: 8px;
    width: min(100%, 500px);
}

body.staff-body .report-ai-section-actions form {
    display: flex;
    justify-content: flex-end;
    margin: 0;
}

body.staff-body .report-ai-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    margin: 0;
    color: var(--color-muted-foreground);
    font-size: 12px;
    line-height: 1.45;
    text-align: right;
}

body.staff-body .report-ai-status > span:last-child {
    max-width: 52ch;
}

body.staff-body .report-ai-manual-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
    padding: 9px 10px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-background);
}

body.staff-body .report-ai-manual-note p {
    margin: 0;
    color: var(--color-muted-foreground);
    font-size: 13px;
    line-height: 1.5;
}

/* Keep the subject reference selector and its action on one compact row. */
body.staff-body .taxonomy-settings-page .taxonomy-subject-form {
    width: min(100%, 440px);
    min-width: 0;
}

body.staff-body .taxonomy-settings-page .taxonomy-subject-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    width: 100%;
}

body.staff-body .taxonomy-settings-page .taxonomy-subject-control select {
    width: 100%;
    min-width: 0;
}

body.staff-body .taxonomy-settings-page .taxonomy-subject-control .btn {
    min-width: 92px;
    white-space: nowrap;
}

@media screen and (max-width: 720px) {
    body.staff-body .report-ai-section-heading {
        grid-template-columns: minmax(0, 1fr);
    }

    body.staff-body .report-ai-section-actions {
        justify-items: stretch;
        width: 100%;
    }

    body.staff-body .report-ai-section-actions form,
    body.staff-body .report-ai-section-actions .btn {
        width: 100%;
    }

    body.staff-body .report-ai-status {
        justify-content: flex-start;
        text-align: left;
    }
}

/* Compact centered role login: one cohesive panel without viewport-height gaps. */
body.login-bg:not(.home-login) {
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    place-items: center;
    padding: 24px 16px;
    overflow-x: hidden;
}

body.login-bg:not(.home-login) .auth-wrap {
    width: min(820px, calc(100vw - 32px)) !important;
    min-height: 0 !important;
    grid-template-columns: minmax(0, .92fr) minmax(360px, 1.08fr) !important;
    grid-template-rows: minmax(440px, auto) !important;
    gap: 0 !important;
    place-content: initial !important;
    align-items: stretch !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid color-mix(in srgb, var(--theme-primary) 14%, var(--color-border));
    border-radius: 22px;
    background: var(--color-card) !important;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .14);
}

html[data-theme] body.login-bg:not(.home-login) .auth-hero.login-auth-hero {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 34px !important;
    justify-content: center !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.login-bg:not(.home-login) .auth-hero .brand-mark.big {
    width: 88px !important;
    height: 88px !important;
    align-self: center !important;
    margin: 0 auto 22px !important;
    padding: 10px !important;
    border-radius: 20px !important;
}

body.login-bg:not(.home-login) .auth-hero .brand-mark.big img {
    max-width: 66px !important;
    max-height: 66px !important;
}

body.login-bg:not(.home-login) .login-auth-hero h1 {
    margin-top: 8px;
    font-size: 28px !important;
    line-height: 1.08;
}

body.login-bg:not(.home-login) .auth-hero p {
    margin-top: 12px;
    font-size: 14px !important;
    line-height: 1.45;
}

body.login-bg:not(.home-login) .auth-card {
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    height: 100% !important;
    align-self: stretch !important;
    justify-self: stretch !important;
    align-content: center;
    gap: 14px !important;
    margin: 0 !important;
    padding: 30px 34px !important;
    border: 0 !important;
    border-left: 1px solid var(--color-border) !important;
    border-radius: 0 !important;
    background: var(--color-card) !important;
    box-shadow: none !important;
}

body.login-bg:not(.home-login) .role-login-heading {
    margin: 0 0 14px !important;
    padding: 0 0 14px !important;
}

body.login-bg:not(.home-login) .role-login-heading h2 {
    font-size: 24px !important;
}

body.login-bg:not(.home-login) .role-login-heading p {
    margin-top: 5px;
    font-size: 14px !important;
    line-height: 1.5;
}

body.login-bg:not(.home-login) .role-login-fields {
    gap: 12px;
}

body.login-bg:not(.home-login) .auth-card input,
body.login-bg:not(.home-login) .auth-card .btn.primary {
    height: 45px !important;
    min-height: 45px !important;
}

body.login-bg:not(.home-login) .auth-card input {
    padding: 10px 12px !important;
}

body.login-bg:not(.home-login) .auth-card .btn.primary {
    margin-top: 2px;
    padding: 10px 16px !important;
}

body.login-bg:not(.home-login) .auth-alt-link {
    min-height: 44px;
    margin-top: 8px;
    padding-top: 12px;
}

@media screen and (max-width: 900px) {
    body.login-bg:not(.home-login) {
        padding: 16px 12px;
    }

    body.login-bg:not(.home-login) .auth-wrap {
        width: min(520px, calc(100vw - 24px)) !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: auto auto !important;
    }

    html[data-theme] body.login-bg:not(.home-login) .auth-hero.login-auth-hero {
        min-height: 170px !important;
        height: auto !important;
        padding: 22px 24px !important;
        border-radius: 0 !important;
    }

    body.login-bg:not(.home-login) .auth-hero .brand-mark.big {
        width: 78px !important;
        height: 78px !important;
        align-self: center !important;
        margin: 0 auto 18px !important;
        padding: 9px !important;
        border-radius: 18px !important;
    }

    body.login-bg:not(.home-login) .auth-hero .brand-mark.big img {
        max-width: 58px !important;
        max-height: 58px !important;
    }

    body.login-bg:not(.home-login) .login-auth-hero h1 {
        margin-top: 4px;
        font-size: 24px !important;
    }

    body.login-bg:not(.home-login) .auth-hero p {
        margin-top: 7px;
        font-size: 13px !important;
    }

    body.login-bg:not(.home-login) .auth-card {
        height: auto !important;
        padding: 24px !important;
        border-top: 1px solid rgba(255, 255, 255, .12) !important;
        border-left: 0 !important;
    }
}

@media screen and (max-height: 620px) {
    body.login-bg:not(.home-login) {
        place-items: start center;
    }
}

/* Desktop table action cells: preserve native row height and dividers. */
@media screen and (min-width: 1025px) {
    body.staff-body table.responsive-data-table tbody td.row-actions {
        display: table-cell !important;
        vertical-align: middle;
    }

    body.staff-body table.responsive-data-table tbody td.row-actions > * + * {
        margin-inline-start: 6px;
    }

    body.staff-body table.responsive-data-table.question-bank-list-table tbody tr:not(:last-child) > td {
        border-bottom: 1px solid var(--line) !important;
    }

    body.staff-body table.responsive-data-table.question-bank-list-table tbody td.row-actions {
        display: table-cell !important;
        height: auto !important;
        vertical-align: middle;
    }
}

/* ============================================================
   UI FIX LAYER (audit 2026-08-30)
   ============================================================ */

.timer.urgent,
.exam-header .timer.urgent {
    background: #dc2626 !important;
    color: #ffffff !important;
    animation: timer-urgent-pulse 1s ease-in-out infinite;
}

@keyframes timer-urgent-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.55); }
    50% { box-shadow: 0 0 0 7px rgba(220, 38, 38, 0); }
}

.timer.urgent .timer-text b,
.timer.urgent b {
    color: #ffffff !important;
}

.autosave.error,
.exam-header .autosave.error {
    background: #b91c1c !important;
    color: #ffffff !important;
    font-weight: 800;
}

.autosave.saving,
.exam-header .autosave.saving {
    background: #854d0e !important;
    color: #ffffff !important;
}

.autosave .autosave-icon svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -2px;
}

.password-field-wrap {
    position: relative;
    display: block;
}

.password-field-wrap input {
    width: 100%;
    padding-inline-end: 44px;
}

.password-toggle-btn {
    position: absolute;
    inset-inline-end: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    cursor: pointer;
    color: var(--muted);
    transition: background 0.15s ease, color 0.15s ease;
}

.password-toggle-btn:hover {
    background: rgba(11, 111, 232, 0.08);
    color: var(--primary);
}

.password-toggle-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.password-toggle-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-toggle-btn[data-visible="true"] {
    color: var(--primary);
}

.login-field-error {
    margin: 2px 0 0;
    padding: 9px 12px;
    border: 1px solid #fecaca;
    border-inline-start: 4px solid #dc2626;
    border-radius: 9px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.5;
}

.student-app-download {
    border-top: 1px solid var(--color-border);
    padding-top: 16px;
    text-align: center;
}

.student-app-download p { color: #536783; }
.student-play-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    padding: 10px 18px;
    border: 1px solid #a6a6a6;
    border-radius: 10px;
    background: #111;
    color: #fff;
    text-align: left;
    text-decoration: none;
}
.student-play-link span { display: grid; }
.student-play-link small { font-size: 12px; line-height: 1.4; }
.student-play-link strong { font-size: 20px; line-height: 1.2; }
.student-play-link:hover { background: #252525; color: #fff; }
.student-play-link:focus-visible { outline: 3px solid #0f80f2; outline-offset: 4px; }

.auth-help-note {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    text-align: center;
}

input[aria-invalid="true"],
.auth-card input[aria-invalid="true"] {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
}

.exam-rules {
    margin-top: 4px;
    border: 1px solid var(--line);
    border-inline-start: 4px solid var(--primary);
    border-radius: 12px;
    background: #f8fbff;
    padding: 14px 16px;
}

.exam-rules-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 800;
}

.exam-rules-list {
    margin: 0;
    padding-inline-start: 20px;
    display: grid;
    gap: 6px;
    color: #31445f;
    font-size: 14px;
    line-height: 1.6;
}

.exam-rules-agreement {
    margin-top: 12px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

.exam-rules-agreement input {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 1px;
    accent-color: var(--primary);
}

.exam-security-dialog:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

body.security-violation-active {
    overflow: hidden;
}

.num-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 10px;
}

.num-panel-head h3 {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
}

.num-panel-title-icon {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.num-panel-close-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #ffffff;
    color: var(--muted);
    cursor: pointer;
}

.num-panel-close-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.num-panel-close-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.num-toggle-header-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -3px;
    margin-inline-end: 4px;
}

.btn-icon {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.doubt-check-hint {
    font-weight: 500;
    color: var(--muted);
    font-size: 12px;
}

.finish-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 7px;
    margin: 14px 0 8px;
}

.finish-num-link {
    min-height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #f8fbff;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.finish-num-link:hover,
.finish-num-link:focus-visible {
    border-color: var(--primary);
    background: #eef6ff;
}

.finish-nav-hint {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.attendance-sign-table .col-no { width: 6%; }
.attendance-sign-table .col-nisn { width: 20%; }
.attendance-sign-table .col-name { width: 34%; }
.attendance-sign-table .col-school { width: 26%; }
.attendance-sign-table .col-sign { width: 14%; }

.attendance-sign-row td {
    height: 30px;
}

.attendance-sign-table .signature-cell {
    height: 30px;
}

.student-token-help {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}

@media screen and (max-width: 900px) {
    .true-false-header {
        display: none !important;
    }

    .finish-nav-grid {
        grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
    }
}

.auth-card input:focus-visible,
.role-login-fields input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .timer.urgent,
    .exam-security-icon {
        animation: none !important;
    }
}

/* Unduhan katalog Sekolah/Peserta: aksi selalu terlihat, ringkas, dan tidak
   membuat toolbar melebar di layar sempit. */
.list-download-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 4px;
    border: 1px solid var(--color-border, #d7e0ea);
    border-radius: 10px;
    background: var(--color-muted, #f7f9fc);
}

.list-download-label {
    padding-inline: 7px 5px;
    color: var(--color-muted-foreground, #5e6b7d);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.list-download-actions .btn {
    min-height: 40px;
    padding-inline: 12px;
    white-space: nowrap;
}

@media screen and (max-width: 720px) {
    .page-head .actions .list-download-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(92px, auto) repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .list-download-actions .btn {
        width: 100%;
        min-width: 0;
    }
}

@media screen and (max-width: 420px) {
    .page-head .actions .list-download-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .list-download-label {
        grid-column: 1 / -1;
        padding-block: 4px 1px;
    }
}

.deployment-auto-check {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #07966b;
}

.deployment-auto-check svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: #ffffff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Sort controls are injected into data-table headers by app.js. */
th[data-sort-wired="1"] {
    padding: 0;
}

.table-sort-button {
    width: 100%;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    padding: 10px 8px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-align: left;
    text-transform: inherit;
    cursor: pointer;
    transition: color .16s ease, background .16s ease;
}

.table-sort-button:hover {
    background: #edf5ff;
    color: var(--primary-2);
}

.table-sort-button:focus-visible {
    outline: 3px solid rgba(22, 119, 255, .34);
    outline-offset: -3px;
}

.table-sort-label {
    min-width: 0;
}

.table-sort-indicator {
    position: relative;
    flex: 0 0 10px;
    width: 10px;
    height: 15px;
    color: #8ca0ba;
}

.table-sort-indicator::before,
.table-sort-indicator::after {
    content: "";
    position: absolute;
    left: 1px;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
}

.table-sort-indicator::before {
    top: 1px;
    border-bottom: 5px solid currentColor;
}

.table-sort-indicator::after {
    bottom: 1px;
    border-top: 5px solid currentColor;
}

th[aria-sort="ascending"] .table-sort-indicator,
th[aria-sort="descending"] .table-sort-indicator {
    color: var(--primary);
}

th[aria-sort="ascending"] .table-sort-indicator::after,
th[aria-sort="descending"] .table-sort-indicator::before {
    opacity: .22;
}

.table-sort-mobile {
    display: none;
    align-items: end;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #f8fbff;
}

.table-sort-mobile label {
    display: grid;
    min-width: 0;
    gap: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.table-sort-mobile select,
.table-sort-mobile-direction {
    min-height: 44px;
}

.table-sort-mobile select {
    background: #fff;
    font-size: 13px;
}

.table-sort-mobile-direction {
    white-space: nowrap;
}

@media (min-width: 761px) and (max-width: 1024px) {
    .table-sort-mobile:has(+ .responsive-data-table) {
        display: grid;
    }
}

@media (max-width: 760px) {
    .table-sort-mobile:has(+ .responsive-data-table,
                            + .monitoring-table,
                            + .proctor-session-table,
                            + .participant-picker-table,
                            + table.compact-history-table:not(.responsive-data-table)) {
        display: grid;
    }
}

@media (prefers-reduced-motion: reduce) {
    .table-sort-button {
        transition: none;
    }
}

/* ============================================================
   TABLE POLISH LAYER (2026-08-31)
   Perapian visual semua tabel staf (admin, dinas, korwilcam,
   proktor, tim soal, guru). Menyatukan padding, perataan,
   tipografi sel, dan kolom aksi yang selama ini bertabrakan
   antara rule dasar lama dan blok Universal Proportional.
   ============================================================ */

/* --- 1. Ritme vertikal yang konsisten ---
   Header yang di-wire sort menyerahkan padding penuh ke tombol di dalamnya
   (th padding 0 + .table-sort-button yang mengatur sendiri). */
body.staff-body .table-wrap table th {
    padding: 11px 14px !important;
    line-height: 1.3;
    white-space: nowrap;
}

body.staff-body .table-wrap table th[data-sort-wired="1"] {
    padding: 0 !important;
}

body.staff-body .table-wrap table td {
    padding: 10px 14px !important;
    vertical-align: middle;
    line-height: 1.45;
}

/* Baris lebih rapat pada tabel padat (bank soal, peserta) */
body.staff-body table.dense-list-table th {
    padding: 8px 12px !important;
}

body.staff-body table.dense-list-table td {
    padding: 8px 12px !important;
}

/* --- 2. Hierarki tipografi sel --- */

/* Kolom pertama = identitas utama baris */
body.staff-body .table-wrap td:first-child {
    font-weight: 650;
    color: #0f172a;
    min-width: 120px;
    overflow-wrap: break-word;
}

/* Teks pendukung di dalam sel: seragam, tidak melompat ukuran */
body.staff-body .table-wrap td small {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--muted);
    font-weight: 500;
}

/* Kombinasi badge + small (status + waktu) rapat dan sejajar */
body.staff-body .table-wrap td .badge {
    vertical-align: middle;
}

body.staff-body .table-wrap td .badge + small,
body.staff-body .table-wrap td small + .badge {
    margin-top: 4px;
}

/* Angka sejajar kanan untuk kolom hitungan (Soal, Peserta, Berhasil) */
body.staff-body table td strong,
body.staff-body table td b {
    font-variant-numeric: tabular-nums;
}

/* --- 3. Kolom aksi: rapat, konsisten, tidak pincang --- */
body.staff-body .table-wrap th.actions-column {
    width: 1%;
    min-width: 200px;
}

body.staff-body .table-wrap td.row-actions {
    min-width: 200px;
    padding-top: 9px !important;
    padding-bottom: 9px !important;
}

body.staff-body .row-actions,
body.staff-body .monitor-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
    white-space: nowrap;
}

/* Tombol aksi baris: satu ukuran nyaman, bukan 28px gepeng.
   !important menimpa rule "Compact Proportional" lama (height 28px !important). */
body.staff-body .table-wrap td .btn.tiny,
body.staff-body .table-wrap td.row-actions .btn,
body.staff-body .table-wrap td .btn {
    height: auto !important;
    min-height: 32px !important;
    max-height: none !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
}

/* Form inline di kolom aksi (Setujui/Tolak/Hapus) ikut rapi */
body.staff-body .row-actions form {
    display: inline-flex;
    margin: 0;
}

/* --- 4. Sel tanggal/waktu: tidak melipat di tengah kata --- */
body.staff-body .table-wrap td.history-time,
body.staff-body .table-wrap td[data-label="Mulai"],
body.staff-body .table-wrap td[data-label="Selesai"],
body.staff-body .table-wrap td[data-label="Waktu"] {
    white-space: nowrap;
}

body.staff-body .table-wrap td small + small {
    margin-top: 1px;
}

/* --- 5. Token dan kode: monospace kecil dengan latar lembut --- */
body.staff-body .table-wrap td code,
body.staff-body .table-wrap td .school-token-code {
    font-size: 12px;
    padding: 2px 7px;
    border-radius: 6px;
    white-space: nowrap;
}

/* --- 6. Zebra halus untuk tabel padat agar baris tak salip --- */
body.staff-body table.dense-list-table tbody tr:nth-child(even) td {
    background: #fbfdff;
}

body.staff-body table.dense-list-table tbody tr:hover td {
    background: #f4f8fe;
}

/* --- 7. Sel soal (teks panjang): batas lebar agar kolom lain tak tergencet --- */
body.staff-body table.question-bank-list-table td.question-column {
    min-width: 260px;
    max-width: 420px;
    overflow-wrap: break-word;
    white-space: normal;
}

/* --- 8. Header: hilangkan double-border tebal ganda antar blok rule --- */
body.staff-body .table-wrap table thead th {
    border-bottom: 2px solid #e2e8f0;
    vertical-align: middle;
}

/* --- 9. Pagination & filter di bawah tabel: jarak konsisten --- */
body.staff-body .list-pagination {
    padding-top: 6px;
}

/* --- 10. Perbaiki baris konflik pemilih peserta agar jelas tapi tenang --- */
body.staff-body tr.participant-conflict-row td {
    background: #fffaf0;
}

body.staff-body tr.participant-conflict-row:hover td {
    background: #fff5e0;
}

/* --- Sort header polish: ikon panah kecil rapi di setiap judul --- */

/* Tombol sort mengisi th sepenuhnya; padding mengikuti padding th standar */
body.staff-body .table-wrap table th[data-sort-wired="1"] .table-sort-button {
    width: 100%;
    min-height: 0;
    padding: 11px 14px;
    gap: 6px;
    justify-content: flex-start;
}

body.staff-body table.dense-list-table th[data-sort-wired="1"] .table-sort-button {
    padding: 8px 12px;
}

/* Judul dalam tombol: warna dan case mengikuti th, jangan berubah bentuk */
body.staff-body .table-wrap th .table-sort-label {
    display: inline-block;
    overflow-wrap: normal;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Ikon panah ganda kecil: naik + turun, subtel saat nonaktif */
body.staff-body .table-sort-indicator {
    flex: 0 0 8px;
    width: 8px;
    height: 12px;
    margin-inline-start: auto;
    color: #a3b5cc;
    transition: color .16s ease, transform .16s ease;
}

body.staff-body .table-sort-indicator::before,
body.staff-body .table-sort-indicator::after {
    left: 0;
    border-right-width: 4px;
    border-left-width: 4px;
}

body.staff-body .table-sort-indicator::before {
    top: 0;
    border-bottom-width: 4px;
}

body.staff-body .table-sort-indicator::after {
    bottom: 0;
    border-top-width: 4px;
}

/* Hover header: ikon sedikit menguat */
body.staff-body th .table-sort-button:hover .table-sort-indicator {
    color: var(--primary-2);
}

/* Aktif: ikon berwarna primary, arah nonaktif nyaris hilang */
body.staff-body th[aria-sort="ascending"] .table-sort-indicator,
body.staff-body th[aria-sort="descending"] .table-sort-indicator {
    color: var(--primary);
}

body.staff-body th[aria-sort="ascending"] .table-sort-indicator::after {
    opacity: .25;
}

body.staff-body th[aria-sort="descending"] .table-sort-indicator::before {
    opacity: .25;
}

/* Header aktif diberi latar tipis agar kolom terurut terbaca */
body.staff-body th[aria-sort="ascending"],
body.staff-body th[aria-sort="descending"] {
    background: #f0f6ff;
}

/* ============================================================
   COMPACT TABLE LAYER (2026-08-31)
   Semua tabel staf jadi kompak: tanpa lebar minimum paksa,
   padding rapat, font lebih kecil, kolom aksi sederhat.
   Target: tidak perlu geser kanan-kiri pada layar desktop.
   ============================================================ */

/* --- 1. Bongkar lebar minimum paksa penyebab scroll horizontal --- */
body.staff-body table.monitoring-table,
body.staff-body table.activity-log-table,
body.staff-body table.proctor-session-table,
body.staff-body table.report-data-table,
body.staff-body table.compact-history-table,
body.staff-body table.participant-picker-table,
body.staff-body table.package-author-table,
body.staff-body table.responsive-data-table {
    min-width: 0 !important;
    table-layout: auto;
}

/* Lebar kolom tetap aktivitas log: diserahkan ke konten, bukan px paksa */
body.staff-body table.activity-log-table th:first-child,
body.staff-body table.activity-log-table td:first-child,
body.staff-body table.activity-log-table th:nth-child(n),
body.staff-body table.activity-log-table td:nth-child(n) {
    width: auto;
}

/* --- 2. Padding kompak menyeluruh --- */
body.staff-body .table-wrap table th {
    padding: 7px 10px !important;
    font-size: 12px !important;
    letter-spacing: .03em;
}

body.staff-body .table-wrap table td {
    padding: 6px 10px !important;
    font-size: 13px;
    line-height: 1.4;
}

/* Tabel padat (bank soal, peserta, paket) sedikit lebih rapat lagi */
body.staff-body table.dense-list-table th {
    padding: 6px 8px !important;
}

body.staff-body table.dense-list-table td {
    padding: 5px 8px !important;
    font-size: 12px;
}

/* --- 3. Hapus ruang kosong sia-sia --- */
/* Identitas baris tidak perlu dipaksa lebar */
body.staff-body .table-wrap td:first-child {
    min-width: 0;
    font-weight: 650;
    overflow-wrap: break-word;
}

/* Kolom pendek (jenjang, jumlah, angka) menyesuaikan isi */
body.staff-body .table-wrap td b,
body.staff-body .table-wrap td strong {
    font-variant-numeric: tabular-nums;
}

/* Teks soal: boleh wrap tapi tidak memaksa kolom melebar */
body.staff-body table.question-bank-list-table td.question-column {
    min-width: 0;
    max-width: 360px;
    overflow-wrap: break-word;
    white-space: normal;
}

/* --- 4. Kolom aksi sederhat --- */
body.staff-body .table-wrap th.actions-column {
    width: 1%;
    min-width: 0;
}

body.staff-body .table-wrap td.row-actions {
    min-width: 0;
    padding: 5px 8px !important;
}

body.staff-body .row-actions,
body.staff-body .monitor-row-actions {
    flex-wrap: nowrap;
    gap: 4px;
    justify-content: flex-start;
}

/* Tombol aksi: padat 28px, masih nyaman disentuh */
body.staff-body .table-wrap td .btn.tiny,
body.staff-body .table-wrap td.row-actions .btn,
body.staff-body .table-wrap td .btn {
    min-height: 28px !important;
    max-height: none !important;
    padding: 4px 9px !important;
    font-size: 12px !important;
    border-radius: 7px !important;
}

body.staff-body .row-actions form {
    display: inline-flex;
    margin: 0;
}

/* Checkbox bulk rapat */
body.staff-body .table-wrap th.bulk-select-column,
body.staff-body .table-wrap td.bulk-select-column {
    width: 34px;
    min-width: 34px;
    padding: 6px 4px !important;
    text-align: center;
}

/* --- 5. Nowrap cerdas: hanya konten pendek yang dikunci --- */
body.staff-body .table-wrap td.history-time,
body.staff-body .table-wrap td[data-label="Mulai"],
body.staff-body .table-wrap td[data-label="Selesai"],
body.staff-body .table-wrap td[data-label="Waktu"],
body.staff-body .table-wrap td[data-label="Jenjang"],
body.staff-body .table-wrap td[data-label="NISN"],
body.staff-body .table-wrap td[data-label="Nomor"],
body.staff-body .table-wrap td[data-label="Peringkat"],
body.staff-body .table-wrap td[data-label="Rata-rata"],
body.staff-body .table-wrap td[data-label="Tertinggi"],
body.staff-body .table-wrap td[data-label="Terendah"],
body.staff-body .table-wrap td[data-label="Rentang"],
body.staff-body .table-wrap td[data-label="Menit"],
body.staff-body .table-wrap td[data-label="Soal"]:not(.question-column),
body.staff-body .table-wrap td[data-label="Berhasil"],
body.staff-body .table-wrap td[data-label="Gagal"] {
    white-space: nowrap;
}

/* Teks kaya (nama, sekolah, soal, pesan) bebas wrap */
body.staff-body .table-wrap td[data-label="Nama"],
body.staff-body .table-wrap td[data-label="Peserta"],
body.staff-body .table-wrap td[data-label="Sekolah"],
body.staff-body .table-wrap td[data-label="Sesi"],
body.staff-body .table-wrap td[data-label="Paket"],
body.staff-body .table-wrap td[data-label="Pesan"],
body.staff-body .table-wrap td[data-label="Status"] {
    white-space: normal;
    overflow-wrap: break-word;
}

/* Small pendukung kembali satu baris inline di sel nowrap */
body.staff-body .table-wrap td small {
    display: block;
    margin-top: 1px;
    font-size: 12px;
    line-height: 1.35;
}

/* --- 6. Sel kaya monitoring/proktor: rapat tanpa kehilangan susunan --- */
body.staff-body .monitoring-table td,
body.staff-body .proctor-session-table td {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

body.staff-body .proctor-session-actions {
    min-width: 0;
}

/* --- 7. Table-wrap tanpa decoration berat --- */
body.staff-body .table-wrap {
    border-radius: 10px;
}

/* Scroll hint tidak perlu lagi untuk tabel yang muat; JS tetap mengatur */

/* ============================================================
   DASHBOARD POLISH LAYER (2026-08-31)
   Dasbor kompak & profesional: kartu ringkasan, grafik,
   heatmap, metrik sistem, evaluasi, tindakan cepat.
   ============================================================ */

/* --- 1. Halaman: rapatkan jarak antar section --- */
body.staff-body .dashboard-v2 {
    display: grid;
    gap: 14px;
}

/* --- 2. Kartu ringkasan: kompak, angka dominan --- */
.dashboard-summary-grid {
    gap: 10px !important;
}

.dashboard-summary-card {
    min-height: 148px !important;
    border-radius: 14px !important;
}

.dashboard-summary-copy {
    width: 62%;
    min-height: 148px !important;
    padding: 13px 10px 12px 15px !important;
}

.dashboard-summary-copy strong {
    font-size: 24px !important;
    margin-top: 2px !important;
}

.dashboard-summary-copy small {
    margin-top: 4px !important;
    font-size: 12px !important;
    max-width: 150px;
}

.dashboard-summary-copy em {
    font-size: 12px !important;
}

/* --- 3. Panel sesi sekolah: kartu kecamatan lebih rapat --- */
.dashboard-session-district {
    padding: 0 !important;
}

.dashboard-session-district .dashboard-session-count strong {
    font-variant-numeric: tabular-nums;
}

/* --- 4. Grafik 7 hari: bar tebal, nilai harian, gridline jelas --- */
.dashboard-attempt-summary {
    gap: 8px !important;
    margin-bottom: 10px !important;
}

.dashboard-attempt-summary > div {
    padding: 8px 12px !important;
    border-radius: 10px !important;
}

.dashboard-attempt-summary strong {
    font-variant-numeric: tabular-nums;
    font-size: 20px !important;
}

.dashboard-attempt-summary small {
    font-size: 12px !important;
}

.dashboard-attempt-chart {
    grid-template-columns: repeat(7, minmax(38px, 1fr)) !important;
    gap: 8px !important;
    min-height: 128px !important;
    background-image:
        linear-gradient(to top, rgba(148, 163, 184, .22) 1px, transparent 1px) !important;
    background-size: 100% 25% !important;
}

.dashboard-attempt-day {
    grid-template-rows: minmax(70px, 1fr) auto auto !important;
    gap: 3px !important;
}

.dashboard-attempt-bars i {
    width: 30% !important;
    min-width: 8px !important;
    max-width: 16px;
    border-radius: 3px 3px 0 0 !important;
}

.dashboard-attempt-total {
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.dashboard-attempt-day > span {
    min-height: 0 !important;
    font-size: 12px !important;
    color: #475569 !important;
    font-weight: 700;
}

/* Legend chip lebih tegas */
.dashboard-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}

.dashboard-chart-legend span i {
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

/* --- 5. Heatmap: sel lebih tegas dan sejajar --- */
.dashboard-heatmap-table {
    border-spacing: 3px 3px !important;
}

.dashboard-heat-cell {
    height: 16px !important;
    border-radius: 3px !important;
    transition: transform .12s ease;
}

.dashboard-heat-cell:hover {
    transform: scale(1.18);
}

.dashboard-heatmap-total strong {
    font-variant-numeric: tabular-nums;
    font-size: 24px !important;
}

/* --- 6. Metrik sistem: baris rapat, grafik tetap jelas --- */
.dashboard-system-metric {
    padding: 8px 10px !important;
}

.dashboard-system-metric-head strong {
    font-variant-numeric: tabular-nums;
}

.dashboard-live-chart svg {
    height: 44px !important;
}

/* --- 7. Evaluasi jenjang: heading rapat, bar sejajar --- */
.dashboard-level-block {
    border-radius: 14px !important;
}

.dashboard-chart-row {
    grid-template-columns: 64px minmax(60px, 1fr) 34px 46px !important;
    gap: 7px !important;
    font-size: 12px !important;
}

.dashboard-chart-row .dashboard-chart-track {
    height: 8px !important;
    border-radius: 999px !important;
}

.dashboard-chart-track i {
    border-radius: 999px !important;
}

/* --- 8. Tindakan cepat: kartu kompak --- */
.dashboard-quick-grid {
    gap: 8px !important;
}

.dashboard-quick-grid > a {
    min-height: 62px !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
    gap: 9px !important;
}

.dashboard-quick-icon {
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
}

.dashboard-quick-icon svg {
    width: 20px !important;
    height: 20px !important;
}

.dashboard-quick-grid b {
    font-size: 13px !important;
}

.dashboard-quick-grid em {
    font-size: 12px !important;
    color: #475569 !important;
}

/* --- 9. Heading kartu: eyebrow + judul lebih rapat --- */
.dashboard-card-heading,
.dashboard-heatmap-heading {
    margin-bottom: 10px !important;
}

.dashboard-eyebrow {
    font-size: 12px !important;
    letter-spacing: .08em !important;
}

.dashboard-card-heading h2,
.dashboard-heatmap-heading h3 {
    font-size: 16px !important;
}

.dashboard-card-heading p {
    font-size: 12px !important;
    margin-top: 2px !important;
}

/* --- 10. Mobile: hint geser hanya relevan di layar sempit (double guard) --- */
@media screen and (min-width: 721px) {
    .dashboard-live-meta .dashboard-summary-hint {
        display: none !important;
    }
}

/* ============================================================
   REPORT POLISH LAYER (2026-08-31)
   Menu Laporan Evaluasi & Analisis Butir: kompak, sejajar,
   profesional. Mencakup tab, filter, KPI, rekomendasi AI,
   distribusi nilai, ranking, kartu AI siswa, riwayat pengerjaan.
   ============================================================ */

/* --- 1. Page head & tab: chip aktif tegas, rapat --- */
.report-page-head {
    margin-bottom: 12px !important;
    padding: 14px 18px !important;
}

.report-tabs {
    gap: 3px !important;
    padding: 4px !important;
    border-radius: 11px !important;
    margin-bottom: 12px !important;
}

.report-tabs a {
    padding: 7px 13px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    white-space: nowrap;
}

.report-tabs a b {
    margin-inline-start: 5px !important;
    padding: 1px 7px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-variant-numeric: tabular-nums;
}

/* --- 2. Filter panel: dua baris rapat, tidak makan ruang --- */
.report-filter-panel {
    margin-bottom: 12px !important;
    padding: 12px 14px !important;
}

.report-filter-hierarchy {
    gap: 8px !important;
}

.report-filter-hierarchy label,
.report-filter-refinements label {
    font-size: 12px !important;
    gap: 4px !important;
}

.report-filter-hierarchy select,
.report-filter-hierarchy input,
.report-filter-refinements select,
.report-filter-refinements input {
    height: 34px !important;
    min-height: 34px !important;
    font-size: 13px !important;
}

.report-filter-refinements {
    gap: 8px !important;
    margin-top: 8px !important;
}

.report-filter .filter-actions {
    gap: 6px !important;
}

.report-filter .filter-actions .btn {
    min-height: 34px !important;
    padding: 6px 13px !important;
    font-size: 13px !important;
}

/* --- 3. KPI grid: kartu kompak, angka tabular, warna tegas --- */
.report-kpi-grid {
    gap: 8px !important;
    margin-bottom: 12px !important;
}

.report-kpi-grid article {
    padding: 10px 12px !important;
    border-radius: 11px !important;
    gap: 2px !important;
    box-shadow: none !important;
    background: #fff !important;
}

.report-kpi-grid span {
    font-size: 12px !important;
    letter-spacing: .05em !important;
    text-transform: uppercase;
    font-weight: 800;
    color: #475569 !important;
}

.report-kpi-grid b {
    font-size: 20px !important;
    font-variant-numeric: tabular-nums;
    line-height: 1.1 !important;
}

.report-kpi-grid em {
    font-size: 12px !important;
    line-height: 1.35 !important;
    color: #475569 !important;
}

/* --- 4. Rekomendasi AI: kartu warna lebih tenang, teks seimbang --- */
.report-recommendations {
    padding: 14px 16px !important;
    margin-bottom: 12px !important;
}

.recommendation-grid {
    gap: 8px !important;
}

.recommendation-grid article {
    padding: 10px 12px !important;
    border-radius: 9px !important;
}

.recommendation-grid article b {
    font-size: 13px !important;
}

.recommendation-grid article p {
    margin-top: 3px !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
}

.report-ai-status {
    align-items: center !important;
    gap: 6px !important;
}

.report-ai-status > span:last-child {
    font-size: 12px !important;
}

/* --- 5. Distribusi nilai & agregat: bar sejajar, mini-list rapat --- */
.report-analysis-grid {
    gap: 12px !important;
}

.score-distribution h3,
.report-aggregate-card h3 {
    font-size: 13px !important;
    margin-bottom: 8px !important;
}

.distribution-row {
    grid-template-columns: 62px minmax(70px, 1fr) 32px 44px !important;
    gap: 7px !important;
    min-height: 26px !important;
    font-size: 12px !important;
}

.distribution-row progress {
    height: 8px !important;
}

.distribution-row b,
.distribution-row em {
    font-variant-numeric: tabular-nums;
}

.report-aggregate-card .mini-list {
    gap: 6px !important;
}

.report-aggregate-card .mini-list > div:not(.empty) {
    padding: 7px 10px !important;
    border-radius: 8px !important;
}

.report-aggregate-card .mini-list b {
    font-variant-numeric: tabular-nums;
    font-size: 14px !important;
}

.report-aggregate-card .mini-list span,
.report-aggregate-card .mini-list em {
    font-size: 12px !important;
}

.report-method-note {
    margin-top: 10px !important;
    font-size: 12px !important;
    color: #475569 !important;
}

/* --- 6. Ranking: dua panel sejajar rapat --- */
.report-ranking-grid {
    gap: 12px !important;
}

.report-ranking-grid .section-heading h2 {
    font-size: 15px !important;
}

.report-ranking-grid .section-heading p {
    font-size: 12px !important;
}

.report-ranking-grid td small {
    font-size: 12px !important;
}

.report-ranking-grid td strong {
    font-size: 14px !important;
    font-variant-numeric: tabular-nums;
}

/* --- 7. Kartu AI siswa: header rapat, konteks chip kecil --- */
.student-ai-card-head {
    padding: 11px 13px !important;
    gap: 9px !important;
}

.student-ai-identity h3 {
    font-size: 14px !important;
}

.student-ai-identity p {
    font-size: 12px !important;
}

.student-ai-score {
    min-width: 80px !important;
    padding: 5px 8px !important;
    border-radius: 9px !important;
}

.student-ai-score strong {
    font-size: 18px !important;
    font-variant-numeric: tabular-nums;
}

.student-ai-context {
    gap: 4px !important;
    padding: 0 13px 9px !important;
}

.student-ai-context span {
    padding: 2px 7px !important;
    font-size: 12px !important;
}

.student-ai-summary {
    padding: 9px 13px !important;
}

.student-ai-summary h4 {
    font-size: 12px !important;
}

.student-ai-summary p {
    font-size: 12px !important;
    line-height: 1.5 !important;
}

/* --- 8. Riwayat pengerjaan: summary baris ringkas sejajar --- */
.report-attempt-student > summary {
    min-height: 56px !important;
    padding: 9px 13px !important;
    gap: 10px !important;
}

.report-attempt-identity b {
    font-size: 13px !important;
}

.report-attempt-identity small {
    font-size: 12px !important;
}

.report-attempt-summary b {
    font-size: 15px !important;
    font-variant-numeric: tabular-nums;
}

.report-attempt-summary small {
    font-size: 12px !important;
}

@media screen and (max-width: 760px) {
    .report-attempt-student > summary {
        min-height: 0 !important;
        padding: 8px 11px !important;
        column-gap: 8px !important;
        row-gap: 5px !important;
    }
}

.report-attempt-subject {
    padding: 10px 13px !important;
}

.report-attempt-subject h3 {
    font-size: 13px !important;
}

.report-attempt-score-summary {
    gap: 10px !important;
}

.report-attempt-score-summary b {
    font-variant-numeric: tabular-nums;
}

/* --- 9. Analisis butir: kartu soal ringkas --- */
.item-analysis-card > summary {
    padding: 10px 13px !important;
}

.item-analysis-hint {
    font-size: 12px !important;
    color: #475569 !important;
    margin-bottom: 8px !important;
}

/* --- 10. Warnings panel rapat --- */
.report-analysis-warnings {
    padding: 11px 14px !important;
    margin-bottom: 12px !important;
}

.report-analysis-warnings ul {
    margin: 6px 0 0 !important;
    display: grid;
    gap: 4px;
}

.report-analysis-warnings li {
    font-size: 12px !important;
    line-height: 1.45 !important;
}

/* --- 11. Section heading generik di menu laporan --- */
.report-workspace .section-heading h2 {
    font-size: 16px !important;
}

.report-workspace .section-heading p {
    font-size: 12px !important;
}

/* --- Pengaturan: workspace compact, rapat, dan tetap responsif --- */
.settings-form {
    gap: 10px;
    margin-bottom: 10px;
}

.settings-form > .settings-panel {
    padding: 14px 16px !important;
}

.settings-form .settings-section-heading {
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
    padding-bottom: 8px;
}

.settings-form .settings-section-heading h2 {
    margin-bottom: 2px;
    font-size: 15px;
}

.settings-form .settings-section-heading p,
.settings-form .infrastructure-help {
    font-size: 12px;
    line-height: 1.35;
}

.settings-form label {
    gap: 4px;
    min-width: 0;
    font-size: 12px;
}

.settings-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.settings-form select {
    min-height: 36px;
    padding: 7px 10px;
    border-radius: 9px;
    font-size: 12px;
}

.settings-form .settings-save-bar {
    gap: 10px;
    margin-top: 9px;
    padding-top: 9px;
}

.settings-form .settings-primary-action,
.settings-form .settings-save-bar .btn {
    min-height: 36px;
}

.settings-brand-grid {
    gap: 8px;
    align-items: end;
}

.settings-logo-upload {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 7px;
    min-height: 36px;
    padding: 3px 6px;
    border-radius: 9px;
}

.settings-logo-preview {
    width: 32px;
    height: 32px;
    border-radius: 7px;
}

.settings-logo-preview img {
    max-width: 27px;
    max-height: 27px;
}

.settings-logo-picker {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    min-height: 30px;
}

.settings-file-button {
    min-height: 30px;
    padding: 5px 9px;
    border-radius: 7px;
    font-size: 12px;
    white-space: nowrap;
}

.google-oauth-grid {
    gap: 8px;
    align-items: stretch;
}

.google-oauth-toggle,
.google-oauth-upload {
    min-height: 44px;
    padding: 7px 10px;
    border-radius: 10px;
}

.google-oauth-upload {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 8px;
    align-items: center;
}

.google-oauth-upload > label {
    margin: 0;
    white-space: nowrap;
}

.google-oauth-file-input {
    min-height: 36px;
    border-radius: 8px;
}

.google-oauth-file-input::file-selector-button {
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 6px;
}

.google-oauth-details {
    gap: 8px;
    margin-top: 8px;
}

.google-oauth-details > div {
    padding: 6px 9px;
    border-radius: 8px;
}

.google-oauth-details span {
    margin-bottom: 2px;
}

.deployment-summary-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.deployment-summary-grid > div {
    display: flex;
    flex: 1 1 220px;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 6px 9px;
    border-radius: 9px;
}

.deployment-summary-grid span {
    flex: 0 0 auto;
    margin: 0;
}

.deployment-summary-grid b {
    min-width: 0;
    font-size: 12px;
}

.deployment-topology-block,
.deployment-network-block,
.deployment-ssh-block {
    padding: 9px;
    border-radius: 10px;
}

.deployment-cluster-settings,
.deployment-node-editor,
.deployment-control-node-field,
.deployment-public-settings {
    margin-top: 8px;
}

.infrastructure-choice-grid {
    gap: 6px;
}

.infrastructure-choice {
    min-height: 42px;
    padding: 6px 9px;
    border-radius: 8px;
}

.infrastructure-choice b {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.deployment-public-settings,
.deployment-field-grid {
    gap: 8px;
}

.deployment-node-heading {
    margin-bottom: 6px !important;
    padding-bottom: 6px !important;
}

.deployment-node-heading .btn {
    min-height: 34px;
    padding: 6px 11px;
}

.deployment-node-list {
    gap: 6px;
}

.deployment-node-row {
    padding: 5px 8px 7px;
    border-radius: 8px;
}

.deployment-node-row legend {
    padding-inline: 5px;
    font-size: 12px;
}

.deployment-node-fields {
    gap: 6px;
}

.deployment-node-fields label {
    gap: 3px;
    font-size: 12px;
    white-space: nowrap;
}

.deployment-node-remove {
    min-height: 34px;
    margin-top: 17px;
    padding-inline: 10px;
}

.deployment-runtime-grid {
    display: grid;
    grid-template-columns: minmax(150px, .7fr) minmax(300px, 1.7fr) minmax(220px, 1.05fr) minmax(200px, 1fr);
    gap: 7px;
    align-items: stretch;
    margin-top: 8px;
}

.deployment-runtime-grid > * {
    min-width: 0;
    height: 100%;
    margin: 0;
}

.deployment-runtime-grid .deployment-backend-limit {
    display: grid;
    max-width: none;
    padding: 8px;
    border: 1px solid var(--border-light);
    border-radius: 9px;
    background: #fff;
}

.deployment-runtime-grid .deployment-ssh-block {
    margin: 0;
}

.deployment-runtime-grid .deployment-ssh-block .infrastructure-help {
    margin-bottom: 6px;
}

.deployment-runtime-grid .deployment-auto-state,
.deployment-runtime-grid > .deployment-storage-state {
    margin: 0;
    padding: 7px 9px;
    border-radius: 9px;
}

.deployment-panel > .deployment-topology-block > .connection-check-row {
    margin-top: 8px;
    padding-top: 8px;
}

.deployment-panel > .deployment-topology-block > .connection-check-row .btn {
    min-width: 150px;
    min-height: 36px;
}

.infrastructure-stack {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

.infrastructure-stack > .infrastructure-block {
    grid-column: 1;
}

.infrastructure-block {
    padding: 9px 11px;
    border-radius: 10px;
}

.infrastructure-block legend {
    padding-inline: 6px;
    font-size: 13px;
}

.infrastructure-help {
    margin-bottom: 6px;
}

.infrastructure-domain-layout,
.infrastructure-domain-preview,
.infrastructure-field-grid {
    gap: 6px;
}

.infrastructure-domain-preview > div {
    padding: 6px 8px;
    border-radius: 8px;
}

.infrastructure-field-grid {
    margin-top: 7px;
}

.infrastructure-inline-check {
    min-height: 36px;
    margin-top: 7px;
    padding: 6px 8px;
    border-radius: 8px;
}

.infrastructure-local-note {
    margin-top: 7px;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 12px;
}

.connection-check-row {
    gap: 7px;
    margin-top: 7px;
    padding-top: 7px;
}

.connection-check-row .btn {
    min-width: 170px;
    min-height: 34px;
    padding: 6px 10px;
}

.connection-result {
    font-size: 12px;
}

@media (min-width: 1280px) {
    .settings-brand-grid {
        grid-template-columns: minmax(150px, .75fr) minmax(180px, 1fr) minmax(250px, 1.3fr) minmax(150px, .8fr) minmax(235px, 1.2fr);
    }

    .settings-brand-grid > label {
        white-space: nowrap;
    }

    .google-oauth-grid {
        grid-template-columns: minmax(250px, .7fr) minmax(520px, 1.8fr);
    }

    .google-oauth-details {
        grid-template-columns: minmax(140px, .45fr) minmax(320px, 1.2fr) minmax(420px, 1.55fr);
    }

    .google-oauth-redirect {
        grid-column: auto;
    }

    .deployment-network-block {
        display: grid;
        grid-template-columns: minmax(270px, .8fr) minmax(250px, .75fr) minmax(520px, 1.8fr);
        gap: 7px;
        align-items: end;
    }

    .deployment-network-block > .infrastructure-choice-grid,
    .deployment-network-block > .deployment-control-node-field,
    .deployment-network-block > .deployment-public-settings {
        margin: 0;
    }

    .deployment-network-block > .deployment-control-node-field {
        grid-template-columns: minmax(0, 1fr);
    }

    .deployment-network-block > .deployment-public-settings {
        grid-template-columns: minmax(210px, .75fr) minmax(300px, 1.25fr);
        align-items: end;
    }

    .infrastructure-block[data-database-settings] > .infrastructure-field-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .infrastructure-block[data-dragonfly-settings] > .infrastructure-field-grid {
        grid-template-columns: minmax(180px, 1.1fr) minmax(90px, .55fr) minmax(105px, .65fr) minmax(115px, .7fr) minmax(160px, .95fr) minmax(210px, 1.25fr) minmax(150px, .9fr);
        align-items: end;
    }

    .infrastructure-block[data-dragonfly-settings] .infrastructure-path-style {
        grid-column: auto;
        margin: 0;
    }

    .infrastructure-block[data-media-settings] > .infrastructure-field-grid {
        grid-template-columns: minmax(270px, 1.7fr) minmax(130px, .8fr) minmax(95px, .55fr) minmax(180px, 1.05fr) minmax(220px, 1.35fr) minmax(170px, 1fr);
        align-items: end;
    }

    .infrastructure-block[data-media-settings] .infrastructure-field-wide,
    .infrastructure-block[data-media-settings] .infrastructure-path-style {
        grid-column: auto;
        margin: 0;
    }

    .infrastructure-block[data-media-settings] .infrastructure-local-note {
        grid-column: 1 / -1;
    }
}

@media (min-width: 721px) and (max-width: 1279px) {
    .settings-brand-grid,
    .infrastructure-block[data-database-settings] > .infrastructure-field-grid,
    .infrastructure-block[data-dragonfly-settings] > .infrastructure-field-grid,
    .infrastructure-block[data-media-settings] > .infrastructure-field-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settings-logo-field,
    .infrastructure-field-wide,
    .infrastructure-path-style {
        grid-column: 1 / -1;
    }

    .deployment-runtime-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .settings-form > .settings-panel {
        padding: 12px !important;
    }

    .settings-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    .settings-form select,
    .settings-form .settings-primary-action,
    .settings-form .settings-save-bar .btn,
    .infrastructure-choice {
        min-height: 44px;
    }

    .settings-form .settings-section-heading {
        align-items: stretch;
    }

    .settings-logo-upload {
        grid-template-columns: 42px minmax(0, 1fr);
        min-height: 48px;
    }

    .settings-logo-preview {
        width: 40px;
        height: 40px;
    }

    .google-oauth-upload,
    .deployment-runtime-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .google-oauth-upload > label {
        white-space: normal;
    }

    .deployment-runtime-grid {
        display: grid;
    }

    .deployment-panel > .deployment-topology-block > .connection-check-row .btn {
        width: 100%;
        min-height: 44px;
    }
}
/* Lightweight navigation feedback for expensive dashboard and report reads. */
.page-loading-indicator {
    position: sticky;
    top: .75rem;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    width: max-content;
    max-width: 100%;
    margin: 0 0 .85rem;
    padding: .58rem .8rem;
    border: 1px solid rgba(37, 99, 235, .22);
    border-radius: 999px;
    background: rgba(239, 246, 255, .96);
    color: #1e3a8a;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(30, 64, 175, .1);
}

.page-loading-indicator[hidden] {
    display: none;
}

.page-loading-spinner {
    width: .82rem;
    height: .82rem;
    flex: 0 0 auto;
    border: 2px solid rgba(37, 99, 235, .22);
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: page-loading-spin .7s linear infinite;
}

.dashboard-refresh-state {
    color: var(--text-muted, #64748b);
    font-size: 13px;
    font-weight: 650;
}

.dashboard-refresh-state.is-live {
    color: #166534;
}

.dashboard-refresh-state.is-delayed {
    color: #92400e;
}

.dashboard-refresh-state [data-dashboard-live-time] {
    display: inline-block;
    min-inline-size: 8.5rem;
    margin-inline-start: .35rem;
    font-variant-numeric: tabular-nums;
    text-align: end;
}

/* Pengumuman hanya berupa ticker tepat di atas pilihan menu login beranda. */
body.home-login .home-card-heading.has-announcement-ticker {
    margin-bottom: 12px;
}

.announcement-ticker {
    --announcement-ticker-duration: 28s;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-width: 0;
    min-height: 44px;
    align-items: center;
    overflow: hidden;
    margin: 0 0 14px;
    border: 1px solid color-mix(in srgb, var(--theme-primary, #e11d48) 18%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--theme-primary, #e11d48) 7%, #fff);
    color: var(--color-primary, #172033);
}

.announcement-ticker-label {
    position: relative;
    z-index: 1;
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    border-inline-end: 1px solid color-mix(in srgb, var(--theme-primary, #e11d48) 18%, transparent);
    background: color-mix(in srgb, var(--theme-primary, #e11d48) 12%, #fff);
    color: var(--theme-primary-dark, #9f1239);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .055em;
    text-transform: uppercase;
    white-space: nowrap;
}

.announcement-ticker-label-compact {
    display: none;
}

.announcement-ticker-viewport {
    display: block;
    min-width: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent);
}

.announcement-ticker-track {
    display: inline-flex;
    width: max-content;
    max-width: none;
    align-items: center;
    animation: announcement-ticker-roll var(--announcement-ticker-duration) linear infinite;
    will-change: transform;
}

.announcement-ticker-message {
    display: inline-flex;
    min-inline-size: min(64rem, calc(100vw - 96px));
    align-items: center;
    gap: 10px;
    padding-inline: 24px 64px;
    color: var(--color-secondary, #334155);
    font-size: 14px;
    line-height: 1.25;
    white-space: nowrap;
}

.announcement-ticker-message strong {
    color: var(--theme-primary-dark, #9f1239);
    font-weight: 850;
}

.announcement-ticker-message i {
    color: var(--theme-primary, #e11d48);
    font-size: 16px;
    font-style: normal;
}

.announcement-ticker-toggle {
    position: relative;
    z-index: 1;
    display: inline-flex;
    min-width: 58px;
    min-height: 44px;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 0 11px;
    border: 0;
    border-inline-start: 1px solid color-mix(in srgb, var(--theme-primary, #e11d48) 18%, transparent);
    background: color-mix(in srgb, var(--theme-primary, #e11d48) 4%, #fff);
    color: var(--theme-primary-dark, #9f1239);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.announcement-ticker-toggle:hover {
    background: color-mix(in srgb, var(--theme-primary, #e11d48) 13%, #fff);
}

.announcement-ticker-toggle:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--theme-primary, #e11d48) 28%, transparent);
    outline-offset: -3px;
}

.announcement-ticker:hover .announcement-ticker-track,
.announcement-ticker:focus-within .announcement-ticker-track,
.announcement-ticker.is-paused .announcement-ticker-track {
    animation-play-state: paused;
}

@keyframes announcement-ticker-roll {
    to {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .announcement-ticker.announcement-ticker {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .announcement-ticker-viewport {
        -webkit-mask-image: none;
        mask-image: none;
    }

    .announcement-ticker-track {
        display: block;
        width: auto;
        animation: none;
        transform: none;
        will-change: auto;
    }

    .announcement-ticker-message {
        display: block;
        min-inline-size: 0;
        overflow: hidden;
        padding-inline: 14px;
        text-overflow: ellipsis;
    }

    .announcement-ticker-message + .announcement-ticker-message,
    .announcement-ticker .announcement-ticker-toggle {
        display: none;
    }
}

/* Bank Soal desktop: kolom pendek tetap pendek, isi soal memakai sisa ruang. */
@media screen and (min-width: 761px) {
    body.staff-body table.question-bank-list-table {
        width: 100%;
        min-width: 0 !important;
        table-layout: auto;
    }

    body.staff-body table.question-bank-list-table th,
    body.staff-body table.question-bank-list-table td {
        padding-inline: 6px !important;
    }

    body.staff-body table.question-bank-list-table .bulk-select-column { width: 40px; min-width: 40px; }
    body.staff-body table.question-bank-list-table .list-column-number { width: 64px; max-width: 64px; }
    body.staff-body table.question-bank-list-table .list-column-level { width: 96px; min-width: 96px; max-width: 96px; }
    body.staff-body table.question-bank-list-table .list-column-type { width: 132px; max-width: 132px; }
    body.staff-body table.question-bank-list-table .list-column-difficulty { width: 96px; max-width: 96px; }
    body.staff-body table.question-bank-list-table .list-column-status { width: 140px; max-width: 140px; }
    body.staff-body table.question-bank-list-table .list-column-actions { width: 136px; min-width: 136px; max-width: 136px; }

    body.staff-body table.question-bank-list-table .list-column-subject { width: 12%; }
    body.staff-body table.question-bank-list-table .list-column-contributor { width: 12%; }

    body.staff-body table.question-bank-list-table .list-column-number,
    body.staff-body table.question-bank-list-table .list-column-level,
    body.staff-body table.question-bank-list-table .list-column-type,
    body.staff-body table.question-bank-list-table .list-column-difficulty,
    body.staff-body table.question-bank-list-table .list-column-status {
        line-height: 1.25;
        overflow-wrap: break-word;
        white-space: normal;
    }

    body.staff-body table.question-bank-list-table th.list-column-actions {
        text-align: left;
        white-space: nowrap;
    }

    body.staff-body table.question-bank-list-table thead th {
        overflow-wrap: normal;
        white-space: nowrap;
    }

    body.staff-body table.question-bank-list-table td.list-column-number,
    body.staff-body table.question-bank-list-table td.list-column-level {
        white-space: nowrap;
    }

    body.staff-body table.question-bank-list-table td.row-actions {
        align-content: center;
        flex-wrap: wrap;
        white-space: normal;
    }

    body.staff-body table.question-bank-list-table td.row-actions > a:first-of-type {
        display: block;
        width: max-content;
        margin-block-end: 4px;
        margin-inline-start: 0;
    }

    body.staff-body table.question-bank-list-table td.row-actions > a:first-of-type + * {
        margin-inline-start: 0;
    }

    body.staff-body table.question-bank-list-table .list-column-subject,
    body.staff-body table.question-bank-list-table .list-column-contributor,
    body.staff-body table.question-bank-list-table .list-column-question {
        max-width: none;
        overflow-wrap: anywhere;
        white-space: normal;
    }
}

/* Tindakan soal guru satu baris; status AI tetap di bawah tombol. */
body.staff-body table.teacher-question-list td.row-actions {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    text-align: left;
}

body.staff-body .teacher-question-actions {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    max-width: 100%;
    overflow-x: auto;
}

body.staff-body .teacher-question-actions > *,
body.staff-body .teacher-question-actions .btn {
    flex: 0 0 auto;
    white-space: nowrap;
    margin: 0;
}

.settings-announcement-grid {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr);
    gap: 14px;
    align-items: start;
}

.settings-form .settings-section-heading.settings-announcement-heading {
    flex-direction: row;
    align-items: center;
}

.settings-announcement-heading > div {
    min-width: 0;
}

.settings-form .settings-announcement-header-control {
    display: inline-flex;
    min-width: max-content;
    min-height: 36px;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 4px 5px 4px 10px;
    border: 1px solid var(--border, #dce8f6);
    border-radius: 999px;
    background: var(--bg, #fff);
    color: var(--text, #172033);
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}

.settings-announcement-header-control:hover,
.settings-announcement-header-control:has(input:checked) {
    border-color: color-mix(in srgb, var(--primary, #2563eb) 42%, var(--border, #dce8f6));
    background: color-mix(in srgb, var(--primary-soft, #eff6ff) 78%, #fff);
}

.settings-announcement-header-control:has(input:focus-visible) {
    outline: 3px solid var(--focus-ring, rgba(37, 99, 235, .24));
    outline-offset: 2px;
}

.settings-announcement-header-control input {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 0;
    accent-color: var(--primary, #2563eb);
}

.settings-announcement-body {
    grid-column: auto;
}

.settings-announcement-state {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border: 1px solid var(--line, #dce8f6);
    border-radius: 999px;
    background: #f8fafc;
    color: var(--color-muted-foreground, #475569);
    font-size: 12px;
    font-weight: 800;
}

.settings-announcement-state.is-on {
    border-color: #a7e5c8;
    background: #ecfdf5;
    color: #087451;
}

@media (max-width: 720px) {
    .settings-announcement-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .settings-announcement-body {
        grid-column: auto;
        grid-row: auto;
    }

    .settings-form .settings-announcement-header-control {
        min-height: 44px;
    }

    .announcement-ticker {
        grid-template-columns: auto minmax(0, 1fr) 36px;
    }

    .announcement-ticker-label {
        padding-inline: 10px;
    }

    .announcement-ticker-label-wide {
        display: none;
    }

    .announcement-ticker-label-compact {
        display: inline;
    }

    .announcement-ticker-toggle {
        min-width: 52px;
        justify-content: center;
        padding-inline: 8px;
    }

    .announcement-ticker-message {
        padding-inline: 18px 48px;
        font-size: 13px;
    }
}

[data-dashboard-live-value] {
    display: inline-block;
    min-inline-size: 5ch;
    font-variant-numeric: tabular-nums;
}

.dashboard-summary-copy strong[data-dashboard-live-value],
.dashboard-attempt-summary strong[data-dashboard-live-value] {
    min-inline-size: 6ch;
}

.dashboard-refresh-state a {
    color: var(--primary, #2563eb);
    font-weight: 800;
    text-decoration: none;
}

.dashboard-refresh-state a:hover,
.dashboard-refresh-state a:focus-visible {
    text-decoration: underline;
}

@keyframes page-loading-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .page-loading-spinner { animation: none; }
}

/* Dashboard evaluation premium charts: keren tapi tetap ringan, tanpa JS/dependensi. */
.dashboard-premium {
    position: relative;
    overflow: hidden;
    border: 1px solid #dbe5f0;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 6px 18px rgba(15, 23, 42, .06);
}

.dashboard-premium::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, #0369a1, #38bdf8);
}

.dashboard-level-block[data-dashboard-level="SMP"] .dashboard-premium::before {
    background: linear-gradient(90deg, #047857, #34d399);
}

.dashboard-premium .panel-title h3 {
    letter-spacing: -.01em;
}

.dashboard-kpi-premium {
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.dashboard-kpi-premium > div {
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
    transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.dashboard-kpi-premium > div:hover {
    border-color: #bae6fd;
    box-shadow: 0 4px 12px rgba(3, 105, 161, .10);
    transform: translateY(-1px);
}

.dashboard-kpi-premium > div:first-child {
    border-color: #0f172a;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
}

.dashboard-kpi-premium > div:first-child span,
.dashboard-kpi-premium > div:first-child b {
    color: #fff;
}

.dashboard-kpi-premium > div:first-child span {
    color: #bae6fd;
}

.dashboard-chart-premium {
    gap: 6px;
}

.dashboard-chart-premium .dashboard-chart-row {
    padding: 5px 8px;
    margin: 0 -8px;
    border-radius: 10px;
    transition: background-color 200ms ease;
}

.dashboard-chart-premium .dashboard-chart-row:hover {
    background: #f1f5f9;
}

.dashboard-chart-premium .dashboard-chart-row > span {
    color: #0f172a;
}

.dashboard-chart-premium .dashboard-chart-track {
    position: relative;
    height: 10px;
    background: #e2e8f0;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .10);
}

.dashboard-chart-premium .dashboard-chart-track i {
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 -2px 3px rgba(0, 0, 0, .12);
    transform-origin: left center;
    animation: dashboard-bar-grow 600ms ease-out both;
}

.dashboard-chart-premium .dashboard-chart-track i::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, .38) 0%, rgba(255, 255, 255, 0) 55%);
    border-radius: inherit;
    pointer-events: none;
}

.dashboard-chart-premium .dashboard-chart-track i.score {
    background: linear-gradient(90deg, #0369a1 0%, #0ea5e9 60%, #38bdf8 100%);
}

.dashboard-level-block[data-dashboard-level="SMP"] .dashboard-chart-premium .dashboard-chart-track i.score {
    background: linear-gradient(90deg, #047857 0%, #10b981 60%, #34d399 100%);
}

.dashboard-chart-premium .dashboard-chart-track i.easy {
    background: linear-gradient(90deg, #15803d, #22c55e);
}

.dashboard-chart-premium .dashboard-chart-track i.medium {
    background: linear-gradient(90deg, #b45309, #f59e0b);
}

.dashboard-chart-premium .dashboard-chart-track i.difficult {
    background: linear-gradient(90deg, #b91c1c, #ef4444);
}

.dashboard-chart-premium .dashboard-chart-row > b {
    font-variant-numeric: tabular-nums;
}

.dashboard-chart-premium .dashboard-chart-row > em {
    display: inline-flex;
    min-width: 46px;
    padding: 1px 7px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: #0369a1;
    font-size: 12px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.dashboard-level-block[data-dashboard-level="SMP"] .dashboard-chart-premium .dashboard-chart-row > em {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

.dashboard-chart-difficulty .dashboard-chart-row > span::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 999px;
    background: currentColor;
    vertical-align: 1px;
}

@keyframes dashboard-bar-grow {
    from { transform: scaleX(0); opacity: .4; }
    to { transform: scaleX(1); opacity: 1; }
}

.dashboard-ranking-premium .dashboard-school-row {
    border-radius: 10px;
    transition: background-color 200ms ease;
}

.dashboard-ranking-premium .dashboard-school-row:hover {
    background: #f8fafc;
}

.dashboard-ranking-premium .dashboard-rank {
    border: 1px solid #dbeafe;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}

.dashboard-ranking-premium .dashboard-school-row.is-podium .dashboard-rank {
    border-color: transparent;
    color: #0f172a;
}

.dashboard-ranking-premium .dashboard-school-row.rank-1 .dashboard-rank {
    background: linear-gradient(135deg, #fbbf24, #fde68a);
}

.dashboard-ranking-premium .dashboard-school-row.rank-2 .dashboard-rank {
    background: linear-gradient(135deg, #94a3b8, #e2e8f0);
}

.dashboard-ranking-premium .dashboard-school-row.rank-3 .dashboard-rank {
    background: linear-gradient(135deg, #d97706, #fcd34d);
    color: #fff;
}

.dashboard-ranking-premium .dashboard-school-track {
    height: 10px;
    background: #e2e8f0;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .10);
}

.dashboard-ranking-premium .dashboard-school-track i {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, #0369a1 0%, #0ea5e9 60%, #38bdf8 100%);
    box-shadow: inset 0 -2px 3px rgba(0, 0, 0, .12);
    transform-origin: left center;
    animation: dashboard-bar-grow 600ms ease-out both;
}

.dashboard-level-block[data-dashboard-level="SMP"] .dashboard-ranking-premium .dashboard-school-track i {
    background: linear-gradient(90deg, #047857 0%, #10b981 60%, #34d399 100%);
}

.dashboard-ranking-premium .dashboard-school-row strong {
    display: inline-flex;
    min-width: 52px;
    padding: 2px 8px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
    .dashboard-chart-premium .dashboard-chart-row {
        margin: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-chart-premium .dashboard-chart-track i,
    .dashboard-ranking-premium .dashboard-school-track i,
    .dashboard-donut,
    .dashboard-school-ring {
        animation: none;
    }
    .dashboard-kpi-premium > div:hover {
        transform: none;
    }
}

/* Dashboard donut charts: pie/donat CSS murni, tanpa JS/dependensi. */
.dashboard-donut-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid #dbe5f0;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 100%);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .08), inset 0 1px 0 rgba(255, 255, 255, .9);
}

.dashboard-donut-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, .5) 0%, rgba(255, 255, 255, 0) 90px);
    pointer-events: none;
}

.dashboard-donut-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, #0369a1, #38bdf8);
}

.dashboard-level-block[data-dashboard-level="SMP"] .dashboard-donut-panel::before {
    background: linear-gradient(90deg, #047857, #34d399);
}

.dashboard-kpi-donut {
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.dashboard-kpi-donut > div {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.dashboard-kpi-donut > div:hover {
    border-color: #bae6fd;
    box-shadow: 0 4px 12px rgba(3, 105, 161, .10);
    transform: translateY(-1px);
}

.dashboard-kpi-donut > div:first-child {
    border-color: #0f172a;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
}

.dashboard-kpi-donut > div:first-child span,
.dashboard-kpi-donut > div:first-child b {
    color: #fff;
}

.dashboard-kpi-donut > div:first-child span {
    color: #bae6fd;
}

.dashboard-donut-wrap {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 4px;
}

.dashboard-donut {
    position: relative;
    flex: 0 0 168px;
    width: 168px;
    height: 168px;
    border-radius: 50%;
    box-shadow: inset 0 2px 6px rgba(15, 23, 42, .12), 0 8px 20px rgba(15, 23, 42, .12), inset 0 -6px 12px rgba(15, 23, 42, .10);
    animation: dashboard-donut-pop 500ms ease-out both;
}

.dashboard-donut::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .65) 0%, rgba(255, 255, 255, 0) 42%),
        conic-gradient(from -40deg, rgba(255, 255, 255, .35) 0deg, rgba(255, 255, 255, 0) 40deg, rgba(0, 0, 0, 0) 180deg, rgba(0, 0, 0, .14) 360deg);
    pointer-events: none;
}

.dashboard-donut-hole {
    position: absolute;
    inset: 30px;
    display: grid;
    place-content: center;
    gap: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 28%, #ffffff 0%, #f1f5f9 78%);
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, .08), 0 1px 0 rgba(255, 255, 255, .9), 0 2px 8px rgba(15, 23, 42, .08);
    text-align: center;
}

.dashboard-donut-hole::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 22%;
    right: 22%;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.dashboard-donut-hole b {
    color: #0f172a;
    font-size: 20px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.dashboard-donut-hole span {
    color: #475569;
    font-size: 12px;
}

.dashboard-donut-legend {
    display: grid;
    flex: 1;
    gap: 4px;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dashboard-donut-legend li {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    padding: 6px 8px;
    border-radius: 10px;
    transition: background-color 200ms ease;
}

.dashboard-donut-legend li:hover {
    background: #f1f5f9;
}

.dashboard-donut-legend i {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.dashboard-donut-legend span {
    overflow: hidden;
    color: #0f172a;
    font-size: 12px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-donut-legend b {
    color: #0f172a;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.dashboard-donut-legend em {
    min-width: 48px;
    padding: 1px 7px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eff6ff;
    color: #0369a1;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.dashboard-level-block[data-dashboard-level="SMP"] .dashboard-donut-legend em {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #047857;
}

@keyframes dashboard-donut-pop {
    from { transform: scale(.92); opacity: .4; }
    to { transform: scale(1); opacity: 1; }
}

/* Ranking sekolah: ring skor melingkar, bukan garis. */
.dashboard-podium-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid #dbe5f0;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 100%);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .08), inset 0 1px 0 rgba(255, 255, 255, .9);
}

.dashboard-podium-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, #0369a1, #38bdf8);
}

.dashboard-level-block[data-dashboard-level="SMP"] .dashboard-podium-panel::before {
    background: linear-gradient(90deg, #047857, #34d399);
}

.dashboard-podium-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-podium-list .dashboard-school-row {
    grid-template-columns: 28px minmax(0, 1fr) 48px;
    grid-template-rows: auto auto;
    gap: 2px 8px;
    align-items: center;
    min-height: 0;
    padding: 10px 10px;
    border: 1px solid #e8eef6;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05), inset 0 1px 0 rgba(255, 255, 255, .9);
    transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.dashboard-podium-list .dashboard-school-row:first-child {
    border-top: 1px solid #e8eef6;
}

.dashboard-podium-list .dashboard-rank {
    grid-column: 1;
    grid-row: 1;
}

.dashboard-podium-list .dashboard-school-name {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
}

.dashboard-podium-list .dashboard-school-name b {
    font-size: 12px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.dashboard-podium-list .dashboard-school-name span {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-podium-list .dashboard-school-ring {
    grid-column: 3;
    grid-row: 1 / span 2;
    width: 44px;
    height: 44px;
}

.dashboard-podium-list .dashboard-school-ring b {
    font-size: 12px;
}

.dashboard-podium-list .dashboard-school-row strong {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    text-align: left;
}

.dashboard-podium-list .dashboard-school-row:hover {
    background: linear-gradient(180deg, #ffffff 0%, #eef4fb 100%);
    border-color: #cbd5e1;
    box-shadow: 0 6px 14px rgba(15, 23, 42, .08), inset 0 1px 0 rgba(255, 255, 255, .9);
    transform: translateY(-1px);
}

.dashboard-podium-list .dashboard-rank {
    border: 1px solid #dbeafe;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 1px 2px rgba(15, 23, 42, .08);
}

.dashboard-podium-list .dashboard-school-row.rank-1 .dashboard-rank {
    border-color: transparent;
    background: linear-gradient(180deg, #fef3c7 0%, #fbbf24 45%, #d97706 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 -2px 3px rgba(120, 53, 15, .35), 0 2px 6px rgba(217, 119, 6, .35);
    color: #451a03;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
}

.dashboard-podium-list .dashboard-school-row.rank-2 .dashboard-rank {
    border-color: transparent;
    background: linear-gradient(180deg, #f8fafc 0%, #cbd5e1 45%, #64748b 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -2px 3px rgba(30, 41, 59, .3), 0 2px 6px rgba(100, 116, 139, .35);
    color: #0f172a;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
}

.dashboard-podium-list .dashboard-school-row.rank-3 .dashboard-rank {
    border-color: transparent;
    background: linear-gradient(180deg, #fde68a 0%, #d97706 55%, #92400e 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -2px 3px rgba(69, 26, 3, .4), 0 2px 6px rgba(146, 64, 14, .35);
    color: #fff;
    text-shadow: 0 1px 1px rgba(69, 26, 3, .5);
}

.dashboard-school-ring {
    --ring: #0369a1;
    position: relative;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--ring) calc(var(--p, 0) * 1%), #e2e8f0 0);
    box-shadow: 0 3px 8px rgba(15, 23, 42, .14), inset 0 1px 2px rgba(255, 255, 255, .5), inset 0 -3px 5px rgba(15, 23, 42, .12);
    justify-self: center;
}

.dashboard-level-block[data-dashboard-level="SMP"] .dashboard-school-ring {
    --ring: #059669;
}

.dashboard-school-ring::before {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 28%, #ffffff 0%, #f1f5f9 80%);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .08);
}

.dashboard-school-ring::after {
    content: "";
    position: absolute;
    top: 7px;
    left: 26%;
    right: 26%;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.dashboard-school-ring b {
    position: relative;
    color: #0f172a;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 1100px) {
    .dashboard-podium-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .dashboard-donut-wrap {
        flex-direction: column;
    }

    .dashboard-donut-legend {
        width: 100%;
    }

    .dashboard-podium-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard-podium-list .dashboard-school-row {
        grid-template-columns: 30px minmax(0, 1fr) 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-donut {
        animation: none;
    }
}

/* Operasi AI: satu alur campaign yang tetap terbaca dari desktop ke ponsel. */
.ai-campaign-panel,
.ai-campaign-form,
.ai-campaign-config-grid,
.ai-operation-choice-group,
.ai-campaign-toolbar,
.ai-campaign-table-wrap {
    min-width: 0;
}

.ai-campaign-filter {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
    align-items: end;
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #f8fafc;
}

.ai-campaign-filter .form-actions,
.ai-campaign-toolbar .form-actions {
    margin: 0;
    padding: 0;
    border: 0;
}

.ai-campaign-form {
    display: grid;
    gap: 20px;
}

.ai-campaign-config-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.5fr) repeat(2, minmax(180px, 1fr));
    align-items: start;
    gap: 12px;
}

.ai-operation-choice-group {
    margin: 0;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #f8fafc;
}

.ai-operation-choice-group legend {
    padding-inline: 7px;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 800;
}

.ai-operation-choice-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 6px 10px;
    margin-bottom: 8px;
}

.ai-operation-choice-grid .checkbox {
    min-height: 44px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--color-secondary);
    background: var(--color-card);
}

.ai-operation-choice-grid .checkbox:hover {
    background: #f0f9ff;
}

.ai-operation-choice-grid input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--theme-primary, var(--color-accent));
}

.ai-campaign-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #f8fafc;
}

.ai-campaign-toolbar .participant-bulk-selection {
    min-width: 0;
}

.ai-campaign-question-preview {
    display: -webkit-box;
    max-width: 62ch;
    margin-top: 4px;
    overflow: hidden;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.ai-campaign-candidate-table td:first-child {
    font-weight: inherit !important;
}

@media (max-width: 1100px) {
    .ai-campaign-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ai-campaign-filter .form-actions {
        align-self: end;
    }

    .ai-campaign-config-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ai-campaign-config-grid > label:first-child {
        grid-column: 1 / -1;
    }

    .ai-operation-choice-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .ai-campaign-filter,
    .ai-campaign-config-grid,
    .ai-operation-choice-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ai-campaign-config-grid > label:first-child {
        grid-column: auto;
    }

    .ai-campaign-filter .form-actions,
    .ai-campaign-filter .btn,
    .ai-campaign-toolbar .form-actions,
    .ai-campaign-toolbar .btn {
        width: 100%;
    }

    .ai-campaign-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .ai-operation-choice-grid .checkbox {
        min-height: 48px;
    }

    .ai-campaign-question-preview {
        max-width: none;
        -webkit-line-clamp: 4;
    }
}

/* ============================================================
   PREMIUM CHART LAYER (2026-09-05)
   Interaktivitas & polish chart dashboard: tooltip kustom,
   animasi masuk bertahap, hover states, gradient & dot pulse
   pada sparkline metrik sistem. Animasi hanya aktif setelah
   JS menandai elemen (.chart-anim), jadi tanpa JS chart tetap
   tampil normal. Hormati prefers-reduced-motion.
   ============================================================ */

/* --- 1. Tooltip chart bersama --- */
.chart-tip {
    position: fixed;
    z-index: 2147483000;
    max-width: 260px;
    padding: 7px 11px;
    border-radius: 9px;
    background: rgba(15, 23, 42, .95);
    box-shadow: 0 10px 15px rgba(2, 6, 23, .22), 0 2px 4px rgba(2, 6, 23, .18);
    color: #f8fafc;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
    letter-spacing: .01em;
    pointer-events: none;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity .16s ease, transform .16s ease;
}

.chart-tip.show {
    opacity: 1;
    transform: translateY(0);
}

.chart-tip strong {
    display: block;
    font-size: 12px;
    font-weight: 800;
}

.chart-tip span {
    display: block;
    margin-top: 2px;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* --- 2. Bar aktivitas 7 hari: gradient + hover --- */
.dashboard-attempt-bars .finished {
    background: linear-gradient(180deg, #34d399, #059669);
}

.dashboard-attempt-bars .unfinished {
    background: linear-gradient(180deg, #fb923c, #ea580c);
}

.dashboard-attempt-bars i {
    box-shadow: 0 1px 2px rgba(15, 23, 42, .1);
}

.dashboard-attempt-day {
    border-radius: 9px;
    transition: background-color .18s ease;
}

.dashboard-attempt-day:hover {
    background-color: rgba(59, 130, 246, .07);
}

.dashboard-attempt-day:hover .dashboard-attempt-bars i {
    filter: brightness(1.08) saturate(1.05);
}

/* --- 3. Animasi masuk: bar vertikal --- */
.chart-anim .dashboard-attempt-bars i {
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform .65s cubic-bezier(.22, 1, .36, 1);
}

.chart-anim.in-view .dashboard-attempt-bars i {
    transform: scaleY(1);
}

.chart-anim .dashboard-attempt-day:nth-child(2) i { transition-delay: .05s; }
.chart-anim .dashboard-attempt-day:nth-child(3) i { transition-delay: .1s; }
.chart-anim .dashboard-attempt-day:nth-child(4) i { transition-delay: .15s; }
.chart-anim .dashboard-attempt-day:nth-child(5) i { transition-delay: .2s; }
.chart-anim .dashboard-attempt-day:nth-child(6) i { transition-delay: .25s; }
.chart-anim .dashboard-attempt-day:nth-child(7) i { transition-delay: .3s; }

/* --- 4. Animasi masuk: bar horizontal --- */
.chart-anim .dashboard-chart-track i,
.chart-anim .dashboard-school-track i {
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .7s cubic-bezier(.22, 1, .36, 1);
}

.chart-anim.in-view .dashboard-chart-track i,
.chart-anim.in-view .dashboard-school-track i {
    transform: scaleX(1);
}

.chart-anim .dashboard-chart-row:nth-child(2) .dashboard-chart-track i { transition-delay: .07s; }
.chart-anim .dashboard-chart-row:nth-child(3) .dashboard-chart-track i { transition-delay: .14s; }
.chart-anim .dashboard-chart-row:nth-child(4) .dashboard-chart-track i { transition-delay: .21s; }
.chart-anim .dashboard-chart-row:nth-child(5) .dashboard-chart-track i { transition-delay: .28s; }
.chart-anim .dashboard-chart-row:nth-child(6) .dashboard-chart-track i { transition-delay: .35s; }

.chart-anim .dashboard-school-row:nth-child(2) .dashboard-school-track i { transition-delay: .05s; }
.chart-anim .dashboard-school-row:nth-child(3) .dashboard-school-track i { transition-delay: .1s; }
.chart-anim .dashboard-school-row:nth-child(4) .dashboard-school-track i { transition-delay: .15s; }
.chart-anim .dashboard-school-row:nth-child(5) .dashboard-school-track i { transition-delay: .2s; }
.chart-anim .dashboard-school-row:nth-child(6) .dashboard-school-track i { transition-delay: .25s; }
.chart-anim .dashboard-school-row:nth-child(7) .dashboard-school-track i { transition-delay: .3s; }
.chart-anim .dashboard-school-row:nth-child(8) .dashboard-school-track i { transition-delay: .35s; }
.chart-anim .dashboard-school-row:nth-child(9) .dashboard-school-track i { transition-delay: .4s; }
.chart-anim .dashboard-school-row:nth-child(10) .dashboard-school-track i { transition-delay: .45s; }

/* --- 5. Hover baris bar horizontal --- */
.dashboard-chart-row,
.dashboard-school-row {
    border-radius: 8px;
    transition: background-color .15s ease;
}

.dashboard-chart-row:hover,
.dashboard-school-row:hover {
    background-color: #f1f5f9;
}

.dashboard-chart-row:hover .dashboard-chart-track i {
    filter: brightness(1.08);
}

.dashboard-school-row:hover .dashboard-school-track i {
    filter: brightness(1.08);
}

/* Bar kesukaran: gradient halus mengikuti warna nada --- */
.dashboard-chart-track i.easy {
    background: linear-gradient(90deg, #16a34a, #22c55e);
}

.dashboard-chart-track i.medium {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.dashboard-chart-track i.difficult {
    background: linear-gradient(90deg, #dc2626, #ef4444);
}

/* --- 6. Heatmap: ring saat hover (tooltip menggantikan title) --- */
.dashboard-heat-cell[data-chart-tip] {
    cursor: default;
}

.dashboard-heat-cell:hover {
    box-shadow: 0 0 0 2px rgba(15, 118, 110, .28);
}

/* --- 7. Sparkline metrik sistem: gradient area + dot pulse --- */
.dashboard-system-metric.cpu .dashboard-live-chart path { fill: url(#dash-grad-cpu); }
.dashboard-system-metric.memory .dashboard-live-chart path { fill: url(#dash-grad-memory); }
.dashboard-system-metric.storage .dashboard-live-chart path { fill: url(#dash-grad-storage); }

.dashboard-live-chart polyline {
    filter: drop-shadow(0 1px 1px rgba(15, 23, 42, .14));
}

.dashboard-live-chart .metric-dot {
    stroke: #fff;
    stroke-width: 1.3;
    transform-box: fill-box;
    transform-origin: center;
    animation: dashDotPulse 2.4s ease-in-out infinite;
}

.dashboard-live-chart .metric-dot[data-metric-chart-dot="cpu"] { fill: #2563eb; }
.dashboard-live-chart .metric-dot[data-metric-chart-dot="memory"] { fill: #7c3aed; }
.dashboard-live-chart .metric-dot[data-metric-chart-dot="storage"] { fill: #0f766e; }
.dashboard-live-chart .metric-dot.disk-read { fill: #0891b2; }
.dashboard-live-chart .metric-dot.disk-write { fill: #ea580c; }

@keyframes dashDotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .55; transform: scale(1.4); }
}

/* --- 8. Reduced motion: semua animasi chart dimatikan --- */
@media (prefers-reduced-motion: reduce) {
    .chart-anim .dashboard-attempt-bars i,
    .chart-anim .dashboard-chart-track i,
    .chart-anim .dashboard-school-track i {
        transform: none;
        transition: none;
    }

    .chart-tip,
    .dashboard-attempt-day,
    .dashboard-chart-row,
    .dashboard-school-row,
    .dashboard-heat-cell {
        transition: none;
    }

    .dashboard-live-chart .metric-dot {
        animation: none;
    }
}
/* Parent portal uses the existing form, button and panel design tokens. */
.auth-portal.parent{--portal-color:#0f766e;--portal-soft:#f0fdfa}
.parent-main{max-width:980px;margin-inline:auto;padding-bottom:40px}
.parent-heading{margin:12px 0 24px}.parent-heading h1{margin:6px 0}.parent-heading p{margin:0;color:var(--muted,#64748b)}
.parent-top{gap:16px}.parent-top .side-brand{min-width:0}.parent-top .side-brand div{min-width:0}.parent-top .side-brand span{overflow-wrap:anywhere}
.parent-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:24px}.parent-summary>div{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:20px}.parent-summary span,.parent-summary strong{display:block}.parent-summary strong{font-size:28px;font-variant-numeric:tabular-nums}
.parent-filters{display:flex;align-items:end;flex-wrap:wrap;gap:12px;margin:20px 0}.parent-filters label{flex:1 1 180px;min-width:0}
.parent-attempts{display:grid;gap:16px}.parent-attempt{border:1px solid #e2e8f0;border-radius:12px;padding:18px;min-width:0}.parent-attempt-heading,.parent-attempt-result{display:flex;justify-content:space-between;align-items:start;gap:16px}.parent-attempt-heading h3{margin:6px 0}.parent-attempt-heading p{margin:0 0 4px}.parent-attempt-heading>div{min-width:0;overflow-wrap:anywhere}.parent-attempt-heading .badge{flex-shrink:0}.parent-attempt-result{border-top:1px solid #e2e8f0;margin-top:16px;padding-top:14px;align-items:center}.parent-attempt-result span,.parent-attempt-result strong,.parent-attempt-result small{display:block}.parent-attempt-result strong{margin:4px 0;overflow-wrap:anywhere}.parent-score{font-size:24px;color:#0f766e;font-variant-numeric:tabular-nums}
.parent-pagination{display:flex;align-items:center;justify-content:center;gap:16px;flex-wrap:wrap;margin-top:24px}.parent-empty{text-align:center;padding:32px 12px;color:#475569}.parent-detail{margin-top:20px}.parent-detail-grid,.parent-answer-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:24px 0}.parent-detail-grid dt,.parent-answer-summary dt{color:#475569}.parent-detail-grid dd,.parent-answer-summary dd{margin:4px 0 0;overflow-wrap:anywhere;font-weight:700}.parent-answer-summary{grid-template-columns:repeat(4,minmax(0,1fr));border-block:1px solid #e2e8f0;padding-block:20px}
.parent-access-panel{max-width:800px}.parent-access-form{display:grid;justify-items:start;gap:18px;margin-top:24px}.parent-revoke-form{margin-top:20px;padding-top:20px;border-top:1px solid #e2e8f0}.parent-code-result{padding:20px;background:#f0fdfa;border:1px solid #99f6e4;border-radius:12px;margin:20px 0}.parent-access-code{font-family:var(--font);letter-spacing:.03em;font-size:16px}.parent-portal .btn{min-height:44px}
@media(max-width:600px){.parent-main{padding-inline:14px}.parent-top{padding:12px 14px}.parent-top .side-brand b{font-size:16px}.parent-summary{gap:12px}.parent-summary>div{padding:16px}.parent-history-panel{padding:16px}.parent-attempt{padding:14px}.parent-attempt-heading{flex-wrap:wrap;gap:8px}.parent-attempt-result{align-items:stretch;flex-direction:column;gap:12px}.parent-attempt-result .btn{align-self:start}.parent-detail-grid,.parent-answer-summary{gap:16px;grid-template-columns:repeat(2,minmax(0,1fr))}.parent-filters .btn{flex:1}.parent-access-code{font-size:14px}}

button.dashboard-attempt-day { appearance:none; border:0; padding:0; background:transparent; color:inherit; font:inherit; cursor:pointer; }
button.dashboard-attempt-day:focus-visible { outline:2px solid #2563eb; outline-offset:2px; }
.chart-tip span { white-space:pre-line; }

button.dashboard-heat-cell { appearance:none; padding:0; cursor:pointer; }
button.dashboard-heat-cell:focus-visible, .dashboard-heatmap-wrap:focus-visible { outline:2px solid #2563eb; outline-offset:2px; }

/* Parent cards share the print layout, but remain readable on small screens. */
.parent-access-cards .credential-card-footer span {
    overflow-wrap: anywhere;
    letter-spacing: normal;
}
@media screen {
    .parent-access-cards {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
        padding: 12px;
        gap: 12px;
        overflow: visible;
    }
    .parent-access-cards .credential-card {
        width: 100%;
        min-width: 0;
        max-width: none;
        height: auto;
        min-height: 0;
        max-height: none;
        padding: 16px;
    }
    .parent-access-cards .credential-card-data { grid-template-columns: 95px minmax(0, 1fr); }
    .parent-access-cards .credential-card-data dt,
    .parent-access-cards .credential-card-data dd,
    .parent-access-cards .credential-card-data .credential-code {
        font-size: 14px;
        line-height: 1.5;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .parent-access-cards .credential-card-brand b { font-size: 14px; }
    .parent-access-cards .credential-card-brand small,
    .parent-access-cards .credential-card-brand span { font-size: 12px; }
    .parent-access-cards .credential-card-footer {
        position: static;
        margin-top: 12px;
        gap: 8px;
        flex-wrap: wrap;
        font-size: 12px;
        line-height: 1.4;
    }
}

.parent-reviews { margin-top: 24px; }
.parent-question { margin-top: 16px; overflow-wrap: anywhere; }
.parent-question h3 { margin-top: 0; }
.parent-question h4 { margin: 0 0 8px; }
.parent-question .review-columns { margin: 16px 0; text-align: left; }
.parent-question .review-columns section { min-width: 0; }
.parent-question img, .parent-question audio { max-width: 100%; }
.parent-explanation { border-top: 1px solid #dbe4ed; padding-top: 16px; }
@media (max-width: 640px) { .parent-question .review-columns { display: grid; grid-template-columns: 1fr; gap: 16px; } }

/* Header text stays legible on every application theme. */
.exam-header .side-brand span,
.exam-student-identity span { color: #fff !important; }
.font-tools button { background: #075985; }
.font-tools button:hover { background: #0c4a6e; }

/* One shared filter row; narrow screens scroll instead of wrapping controls. */
body form:is(.filter-form.list-filter-form, .filter-form, .monitoring-filter-form, .report-filter, .filter-bar, .parent-filters, [data-monitoring-report-filter]) {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: flex-end !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    padding-block: 8px;
    scroll-padding-inline: 8px;
}

body form.report-filter :is(.report-filter-hierarchy, .report-filter-refinements) {
    display: contents !important;
}

body form:is(.filter-form.list-filter-form, .filter-form, .monitoring-filter-form, .report-filter, .filter-bar, .parent-filters, [data-monitoring-report-filter]) label {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 0 128px !important;
    width: 128px !important;
    min-width: 128px !important;
    max-width: none !important;
    margin: 0 !important;
    gap: 4px !important;
    white-space: nowrap;
}

body form:is(.filter-form.list-filter-form, .filter-form, .monitoring-filter-form, .report-filter, .filter-bar, .parent-filters, [data-monitoring-report-filter]) :is(input:not([type="hidden"]), select) {
    width: 100% !important;
    min-width: 0;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
}

body form:is(.filter-form.list-filter-form, .filter-form, .monitoring-filter-form, .report-filter, .filter-bar, .parent-filters, [data-monitoring-report-filter]) :is(.filter-actions, .monitoring-filter-actions, .form-actions, .monitoring-report-actions) {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    height: auto !important;
    min-height: 44px;
    width: auto !important;
    margin: 0 !important;
    padding: 0;
    gap: 8px !important;
}

body form:is(.filter-form.list-filter-form, .filter-form, .monitoring-filter-form, .report-filter, .filter-bar, .parent-filters, [data-monitoring-report-filter]) .btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-height: 44px;
    margin: 0 !important;
    white-space: nowrap;
}

body form.report-filter.ai-queue-filter label {
    flex-basis: 200px !important;
    width: 200px !important;
    min-width: 200px !important;
}

/* Keep column titles intact; the existing table wrapper handles narrow screens. */
body.staff-body .table-wrap table thead th {
    white-space: nowrap;
    overflow-wrap: normal;
}

body.staff-body .table-wrap table th[data-sort-wired="1"] .table-sort-button {
    padding: 8px 10px;
    min-height: 44px;
    min-width: max-content;
    width: auto;
    white-space: nowrap;
}

body.staff-body .table-wrap th .table-sort-indicator {
    margin-inline-start: 0;
}

body.staff-body .table-wrap table thead th[data-sort-wired="1"],
body.staff-body .table-wrap table.dense-list-table thead th[data-sort-wired="1"] {
    padding: 0 !important;
}

/* Queue totals have no icon column; keep labels above their values. */
.ai-queue-summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-block: 16px;
}
.ai-queue-metric {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}
.ai-queue-metric span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.ai-queue-metric strong { font-size: 28px; line-height: 1.2; font-variant-numeric: tabular-nums; }
#ai-worker-control .form-actions { margin: 0; padding: 12px 0; border: 0; }
.ai-work-mode-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.ai-work-mode-grid > label { min-width: 0; }
.ai-work-mode-enable { margin-top: 16px; }
.ai-work-mode-tasks { margin: 20px 0 0; padding: 0; border: 0; min-width: 0; background: transparent; }
.ai-work-mode-tasks legend { padding: 0 0 12px; border: 0; background: transparent; font-size: 14px; font-weight: 700; }
.ai-work-mode-grid small { line-height: 1.5; }
.ai-work-mode .settings-toggle span small { display: block; }
.ai-work-mode-details { margin-top: 16px; color: var(--text-muted); }
.ai-work-mode-details summary {
    width: fit-content;
    padding-block: 10px;
    cursor: pointer;
    font-weight: 600;
}
.ai-work-mode-details ul {
    max-width: 85ch;
    margin: 4px 0 8px;
    padding-left: 20px;
    font-size: 13px;
    line-height: 1.6;
}
.ai-work-mode-details li + li { margin-top: 6px; }
.ai-work-mode-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}
.ai-work-mode-actions form { margin: 0; }
@media (max-width: 600px) {
    .ai-work-mode-grid { grid-template-columns: minmax(0, 1fr); }
    .ai-work-mode-actions > *, .ai-work-mode-actions .btn { width: 100%; }
}
@media (max-width: 1200px) { .ai-queue-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ai-queue-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.media-revision-comparison,.media-revision-targets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.media-revision-comparison figure,.media-revision-targets article{margin:0;padding:1rem;border:1px solid var(--line,#d6dfeb);border-radius:12px;min-width:0}.media-revision-comparison figcaption{font-weight:700;margin-bottom:.75rem}.media-revision-comparison img,.media-revision-targets img{display:block;width:100%;height:300px;object-fit:contain;background:#fff}.media-revision-targets label{display:grid;gap:.5rem;margin:1rem 0}@media(max-width:700px){.media-revision-comparison,.media-revision-targets{grid-template-columns:1fr}}

/* Review filters share the question cards' content column. */
.review-filter-form {
    display: grid;
    grid-template-columns: minmax(180px, 1.3fr) minmax(125px, .7fr) minmax(180px, 1fr) minmax(180px, 1fr) auto;
    align-items: end;
    gap: 12px;
    margin: 0;
}
.review-filter-form label { display: grid; gap: 5px; min-width: 0; margin: 0; }
.review-filter-form :is(input:not([type="hidden"]), select) { width: 100%; height: 44px; margin: 0; }
.review-filter-form .filter-actions { display: flex; gap: 8px; margin: 0; }
.review-filter-form .btn { min-height: 44px; margin: 0; white-space: nowrap; }
@media (max-width: 1400px) {
    .review-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .review-filter-form .filter-actions { grid-column: 1 / -1; justify-content: flex-end; }
}
@media (max-width: 600px) {
    .review-filter-form { grid-template-columns: minmax(0, 1fr); }
    .review-filter-form .filter-actions { display: grid; grid-template-columns: 1fr 1fr; }
}

/* Dashboard competency attainment, embedded in each level score card. */
.dashboard-score-competency {
    display: grid;
    gap: 14px;
    min-width: 0;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
}

.dashboard-competency-slot {
    min-height: 118px;
    place-content: center;
    justify-items: center;
    color: #64748b;
    text-align: center;
}

.dashboard-competency-slot p { margin: 0; }

.dashboard-competency-loading-indicator {
    width: 24px;
    height: 24px;
    border: 3px solid #dbeafe;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: page-loading-spin .7s linear infinite;
}

.dashboard-competency-load-error {
    color: #b42318;
    font-size: 13px;
    line-height: 1.5;
}

.dashboard-score-competency-heading,
.dashboard-competency-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.dashboard-score-competency-heading > div > span {
    display: block;
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.dashboard-score-competency-heading h4,
.dashboard-competency-panel-heading h5 {
    margin: 3px 0 0;
    color: #0f172a;
    line-height: 1.35;
}

.dashboard-score-competency-heading h4 { font-size: 16px; }
.dashboard-competency-panel-heading h5 { font-size: 13px; }

.dashboard-score-competency-heading p,
.dashboard-competency-panel-heading p,
.dashboard-competency-note {
    margin: 4px 0 0;
    color: #475569;
    font-size: 12px;
    line-height: 1.5;
}

.dashboard-score-competency-heading label {
    display: grid;
    flex: 0 1 250px;
    gap: 5px;
    min-width: 190px;
    margin: 0;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

body.staff-body .dashboard-score-competency-heading select {
    width: 100%;
    min-height: 44px !important;
    margin: 0;
    border-color: #cbd5e1;
    background-color: #fff;
}

.dashboard-competency-panels { min-width: 0; }

.dashboard-competency-panel {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 13px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.dashboard-competency-panel[hidden] { display: none; }

.dashboard-competency-panel-heading a {
    display: inline-flex;
    min-height: 44px;
    padding: 8px 11px;
    align-items: center;
    justify-content: center;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #075ea8;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: border-color .18s ease, background-color .18s ease;
}

.dashboard-competency-panel-heading a:hover {
    border-color: #7dd3fc;
    background: #e0f2fe;
}

.dashboard-competency-panel-heading a:focus-visible {
    outline: 3px solid rgba(14, 116, 144, .24);
    outline-offset: 2px;
}

.dashboard-competency-figure { margin: 0; }

.dashboard-competency-axis {
    display: flex;
    justify-content: space-between;
    margin: 0 62px 6px min(38%, 230px);
    color: #64748b;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.dashboard-competency-chart {
    display: grid;
    gap: 4px;
}

.dashboard-competency-row {
    display: grid;
    grid-template-columns: minmax(165px, 230px) minmax(120px, 1fr) 56px;
    gap: 10px;
    align-items: center;
    min-height: 50px;
    padding: 6px 7px;
    border-radius: 8px;
    transition: background-color .18s ease;
}

.dashboard-competency-row:hover { background: #eef4fb; }

.dashboard-competency-label { min-width: 0; }

.dashboard-competency-label b,
.dashboard-competency-label span { display: block; }

.dashboard-competency-label b {
    color: #172033;
    font-size: 13px;
    line-height: 1.35;
}

.dashboard-competency-label span {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

.dashboard-competency-track {
    position: relative;
    overflow: hidden;
    height: 13px;
    border-radius: 999px;
    background-color: #e2e8f0;
    background-image: linear-gradient(to right, transparent calc(25% - 1px), rgba(100, 116, 139, .2) 25%, transparent calc(25% + 1px));
    background-size: 25% 100%;
}

.dashboard-competency-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.dashboard-level-block[data-dashboard-level="SMP"] .dashboard-competency-track i {
    background: linear-gradient(90deg, #047857, #34d399);
}

.dashboard-competency-row > strong {
    color: #0f172a;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.dashboard-competency-note {
    padding-top: 1px;
    border-top: 1px solid #edf1f6;
}

@media (max-width: 1100px) {
    .dashboard-score-competency-heading { display: grid; }
    .dashboard-score-competency-heading label {
        width: min(100%, 320px);
        min-width: 0;
    }
    .dashboard-competency-row {
        grid-template-columns: minmax(150px, 210px) minmax(110px, 1fr) 56px;
    }
    .dashboard-competency-axis { margin-left: min(38%, 210px); }
}

@media (max-width: 640px) {
    .dashboard-competency-panel { padding: 11px; }
    .dashboard-competency-panel-heading { display: grid; }
    .dashboard-competency-panel-heading a { width: 100%; }
    .dashboard-competency-axis { display: none; }
    .dashboard-competency-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 7px 12px;
        padding: 8px 3px;
    }
    .dashboard-competency-track {
        grid-column: 1 / -1;
        grid-row: 2;
    }
    .dashboard-competency-row > strong {
        grid-column: 2;
        grid-row: 1;
        align-self: start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-competency-loading-indicator { animation: none; }
}
