/* EDUHUNT R384 — self-contained Six-Portals core recovery stylesheet.
   Purpose: keep the full portal professionally usable even when older historical
   CSS patch files are missing from Hostinger. No business logic is changed. */
:root{
  color-scheme:dark;
  --eh-sidebar:252px;--eh-topbar:82px;
  --eh-bg:#020813;--eh-bg2:#061426;--eh-panel:#071b2f;--eh-panel2:#0b2741;
  --eh-border:#214662;--eh-border-soft:#17374f;--eh-text:#f4f8ff;--eh-muted:#9db3c9;
  --eh-blue:#238eea;--eh-cyan:#41d9ff;--eh-green:#14a36f;--eh-red:#d83a49;--eh-gold:#f5c344;
  --eh-shadow:0 12px 34px rgba(0,0,0,.22);--eh-radius:14px;
}
*{box-sizing:border-box}
html{min-height:100%;background:var(--eh-bg);scroll-behavior:smooth}
body{min-height:100vh;margin:0;background:var(--eh-bg);color:var(--eh-text);font-family:Inter,"Segoe UI",Roboto,Arial,sans-serif;font-size:14px;line-height:1.45;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.58}
a{color:#62cfff;text-decoration:none}img,svg{display:block;max-width:100%}[hidden]{display:none!important}
.no-script{margin:28px auto;padding:16px;max-width:680px;border:1px solid #9b3340;border-radius:12px;background:#37141d;color:#ffe9ec;text-align:center;font-weight:800}
.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;white-space:nowrap!important;border:0!important}

/* Login */
.login-view{min-height:100vh;padding:24px;display:grid;place-items:center;background:radial-gradient(circle at 8% 8%,rgba(35,142,234,.18),transparent 28%),radial-gradient(circle at 92% 88%,rgba(107,81,245,.18),transparent 34%),#030d1e}
.login-stage{width:min(1180px,100%);min-height:min(760px,calc(100vh - 48px));display:grid;grid-template-columns:minmax(0,1.03fr) minmax(430px,.97fr);overflow:hidden;border:1px solid rgba(255,255,255,.12);border-radius:26px;background:#fff;box-shadow:0 34px 100px rgba(0,0,0,.36)}
.login-brand-panel{position:relative;padding:52px;display:flex;flex-direction:column;color:#fff;background:linear-gradient(151deg,rgba(16,68,133,.64),rgba(3,14,35,.08)),linear-gradient(140deg,#0d2448,#051027 70%)}
.brand-lockup{display:flex;align-items:center;gap:14px}.brand-lockup img{width:min(270px,76%);height:auto!important;max-height:76px;object-fit:contain;padding:7px 9px;border-radius:12px;background:#fff;box-shadow:0 12px 30px rgba(0,0,0,.25)}
.brand-lockup div{display:flex;flex-direction:column;letter-spacing:.14em;line-height:1.1}.brand-lockup strong{font-size:27px;font-weight:900}.brand-lockup span{margin-top:5px;color:#91dffd;font-size:12px;font-weight:900;letter-spacing:.38em}
.login-copy{margin:auto 0 32px;max-width:565px}.login-copy h1{margin:0;color:#fff;font-size:clamp(38px,4.6vw,64px);line-height:1.04;letter-spacing:-.045em}.login-copy>p:last-child{margin:24px 0 0;max-width:510px;color:#bfcee3;font-size:17px;line-height:1.7}
.eyebrow{margin:0 0 10px;color:#41d9ff;font-size:11px;font-weight:900;letter-spacing:.15em;text-transform:uppercase}.login-role-list{display:flex;flex-wrap:wrap;gap:9px;margin-bottom:30px}.login-role-list span{padding:7px 10px;border:1px solid rgba(255,255,255,.17);border-radius:999px;background:rgba(255,255,255,.06);color:#d5e6f6;font-size:11px;font-weight:800}.login-security{display:flex;align-items:center;gap:9px;color:#9eb4ce;font-size:12px;font-weight:800}.status-dot{width:8px;height:8px;display:inline-block;border-radius:50%;background:#2ad28a;box-shadow:0 0 0 4px rgba(42,210,138,.12)}
.login-form-panel{padding:56px;display:flex;flex-direction:column;justify-content:center;background:linear-gradient(180deg,#fff,#fbfcff);color:#101828}.login-card{width:min(430px,100%);margin:auto}.login-mobile-brand{display:none}.login-card h2{margin:0;color:#101828;font-size:32px;letter-spacing:-.035em}.login-help{margin:10px 0 30px;color:#58677e}

/* Core fields/buttons */
input,select,textarea{width:100%;min-height:44px;padding:10px 12px;border:1px solid #34546e;border-radius:10px;background:#04172a;color:#f3f8ff;outline:0;transition:border-color .16s,box-shadow .16s}textarea{min-height:104px;resize:vertical}input::placeholder,textarea::placeholder{color:#7791a9}input:focus,select:focus,textarea:focus{border-color:#39bdf5;box-shadow:0 0 0 3px rgba(57,189,245,.15)}input[readonly],input:disabled,select:disabled,textarea:disabled{background:#10263a;color:#9ab0c4}
.login-form-panel input,.login-form-panel select,.login-form-panel textarea{border-color:#c9d4e3;background:#fff;color:#101828}.login-form-panel input::placeholder{color:#9aa8ba}.login-form-panel input:focus{border-color:#2987f5;box-shadow:0 0 0 3px rgba(41,135,245,.13)}
.field{display:block;margin-bottom:17px}.field>span:first-child,.field-label,.form-field>label,.form-field>.label{display:block;margin-bottom:7px;color:#cfe2f4;font-size:13px;font-weight:800}.login-form-panel .field>span:first-child{color:#26344a}.input-wrap{position:relative;display:block}.input-wrap>svg{position:absolute;z-index:1;left:14px;top:50%;width:19px;height:19px;transform:translateY(-50%);fill:none;stroke:#78899f;stroke-width:1.8;pointer-events:none}.input-wrap input{padding-left:43px;padding-right:46px}.input-action{position:absolute;right:5px;top:50%;transform:translateY(-50%)}
.remember-row{margin:5px 0 22px;display:flex;align-items:center;gap:10px;color:#3e4c63;font-size:13px;font-weight:700}.remember-row input{width:18px;height:18px;min-height:0;margin:0;accent-color:#1972e8}
.button,.topbar-button{min-height:40px;padding:9px 14px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid #315675;border-radius:9px;background:#0b3150;color:#f5fbff;font-size:13px;font-weight:800;line-height:1.2;box-shadow:none;transition:filter .16s,transform .16s,border-color .16s}.button:hover:not(:disabled),.topbar-button:hover:not(:disabled){filter:brightness(1.08);border-color:#4ca7df}.button:active:not(:disabled),.topbar-button:active:not(:disabled){transform:translateY(1px)}.button--primary{border-color:#258ce2;background:linear-gradient(135deg,#1972e8,#5f59ee)}.button--secondary{border-color:#315675;background:#0b2841;color:#eaf5ff}.button--success{border-color:#16a36e;background:#11845c}.button--danger{border-color:#d83a49;background:#b92737}.button--warning{border-color:#d9941d;background:#bd7400}.button--dark{background:#061426}.button--ghost{border-color:transparent;background:transparent;color:#62cfff}.button--small{min-height:34px;padding:6px 10px}.button--large{min-height:49px;padding:12px 18px;border-radius:11px}.login-card .button--primary{width:100%}
.icon-button{width:40px;height:40px;padding:0;display:grid;place-items:center;border:0;border-radius:10px;background:transparent;color:inherit}.icon-button:hover{background:rgba(255,255,255,.08)}.icon-button svg,.button svg,.topbar-button svg,.nav-link svg,.sidebar-link svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.form-message{min-height:22px;margin-top:14px;color:#c43745;font-size:13px;font-weight:700;text-align:center}.form-message.success{color:#138a55}.login-footer{margin:23px 0 0;color:#718096;font-size:12px;text-align:center}

/* Desktop portal shell: this is the critical recovery layer. */
.portal-view{min-height:100vh;display:grid!important;grid-template-columns:var(--eh-sidebar) minmax(0,1fr);background:var(--eh-bg);color:var(--eh-text)}
.sidebar{position:fixed!important;inset:0 auto 0 0!important;z-index:40!important;width:var(--eh-sidebar)!important;max-width:var(--eh-sidebar)!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;color:#d8e4f4!important;background:radial-gradient(circle at 20% 0,rgba(40,135,245,.15),transparent 31%),linear-gradient(180deg,#07172b,#03101f)!important;border-right:1px solid #183a54!important}
.sidebar-brand{height:82px!important;min-height:82px!important;padding:14px 18px!important;display:flex!important;align-items:center!important;gap:11px!important;border-bottom:1px solid rgba(255,255,255,.08)!important;background:transparent!important}
.sidebar-brand img{display:block!important;width:178px!important;max-width:178px!important;height:50px!important;max-height:50px!important;padding:4px 6px!important;border:0!important;border-radius:9px!important;background:#fff!important;object-fit:contain!important;box-shadow:none!important}
.sidebar-close{display:none!important;margin-left:auto;color:#c7d6e8}.sidebar-identity{margin:18px 14px 10px!important;padding:12px!important;display:flex!important;align-items:center!important;gap:11px!important;border:1px solid #234760!important;border-radius:13px!important;background:#0a2439!important;min-width:0!important}.avatar{width:42px!important;height:42px!important;display:grid!important;place-items:center!important;flex:0 0 auto!important;border:1px solid rgba(255,255,255,.18)!important;border-radius:12px!important;background:linear-gradient(135deg,#2397ec,#5e59ea)!important;color:#fff!important;font-size:13px!important;font-weight:900!important}.avatar--small{width:34px!important;height:34px!important;border-radius:9px!important}.sidebar-identity>div:last-child{min-width:0!important;display:flex!important;flex-direction:column!important}.sidebar-identity strong{overflow:hidden!important;color:#fff!important;font-family:Inter,"Segoe UI",Arial,sans-serif!important;font-size:13px!important;font-weight:800!important;text-overflow:ellipsis!important;white-space:nowrap!important}.sidebar-identity span{margin-top:2px!important;overflow:hidden!important;color:#8fa8c5!important;font-size:11px!important;text-overflow:ellipsis!important;white-space:nowrap!important}
.sidebar-nav{padding:8px 12px 22px!important;flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#29415f transparent}.nav-group{margin:12px 0 4px!important;padding:0 10px!important;color:#718ba7!important;font-size:9px!important;font-weight:900!important;letter-spacing:.13em!important;text-transform:uppercase!important}.nav-link,.sidebar-link{width:100%!important;min-height:43px!important;margin:3px 0!important;padding:9px 10px!important;display:flex!important;align-items:center!important;gap:11px!important;border:0!important;border-radius:9px!important;background:transparent!important;color:#aec0d5!important;font-family:Inter,"Segoe UI",Arial,sans-serif!important;font-size:13px!important;font-weight:700!important;text-align:left!important;line-height:1.2!important}.nav-link:hover,.sidebar-link:hover{background:rgba(255,255,255,.075)!important;color:#fff!important}.nav-link.active{position:relative!important;background:linear-gradient(90deg,rgba(41,135,245,.32),rgba(53,196,247,.10))!important;color:#fff!important}.nav-link.active::before{content:"";position:absolute;left:-3px;top:9px;bottom:9px;width:3px;border-radius:0 3px 3px 0;background:#45c5f4;box-shadow:0 0 12px rgba(69,197,244,.6)}.nav-link svg,.sidebar-link svg{width:19px!important;height:19px!important;flex:0 0 auto!important}.nav-link .nav-badge{margin-left:auto;min-width:20px;padding:1px 6px;border-radius:999px;background:#e54e5d;color:#fff;font-size:9px;text-align:center}.sidebar-bottom{padding:9px 12px 16px!important;border-top:1px solid rgba(255,255,255,.075)!important}.sidebar-link{min-height:38px!important;margin:1px 0!important}.sidebar-link--danger{color:#ff9aa4!important}.sidebar-version{margin-top:8px;padding:9px 10px;display:flex;align-items:center;gap:8px;border-radius:8px;background:rgba(0,0,0,.16);color:#758dab;font-size:9px;font-weight:800;letter-spacing:.06em}.sidebar-version b{margin-left:auto;color:#91a8c2}
.portal-main{min-width:0!important;grid-column:2!important;min-height:100vh!important;display:flex!important;flex-direction:column!important;background:var(--eh-bg)!important;color:var(--eh-text)!important}.topbar{position:sticky!important;top:0!important;z-index:30!important;height:var(--eh-topbar)!important;min-height:var(--eh-topbar)!important;padding:13px clamp(18px,2.6vw,36px)!important;display:flex!important;align-items:center!important;gap:15px!important;border-bottom:1px solid #1c4059!important;background:rgba(4,18,33,.96)!important;backdrop-filter:blur(16px);box-shadow:0 2px 14px rgba(0,0,0,.18)!important;color:#fff!important}.menu-toggle{display:none!important;color:#d8e8f8!important}.topbar-title{min-width:0!important}.topbar-title>span{display:block!important;color:#38a8ff!important;font-size:11px!important;font-weight:900!important;letter-spacing:.11em!important;text-transform:uppercase!important}.topbar-title h1{margin:2px 0 0!important;overflow:hidden!important;color:#fff!important;font-size:23px!important;font-weight:800!important;letter-spacing:-.025em!important;text-overflow:ellipsis!important;white-space:nowrap!important}.topbar-actions{margin-left:auto!important;display:flex!important;align-items:center!important;gap:8px!important}.topbar-button{background:#09253b!important;color:#eaf6ff!important;border-color:#28516e!important}.notification-button{position:relative!important;border:1px solid #28516e!important;background:#09253b!important;color:#eaf6ff!important}.notification-count{position:absolute;right:-4px;top:-5px;min-width:17px;height:17px;padding:1px 4px;border:2px solid #061426;border-radius:999px;background:#d83a49;color:#fff;font-size:8px;font-weight:900;line-height:13px}.account-button{min-width:0;margin-left:4px;padding:4px 7px 4px 4px;display:flex;align-items:center;gap:8px;border:1px solid #28516e;border-radius:10px;background:#09253b;color:#eaf6ff;text-align:left}.account-copy{min-width:0;max-width:160px;display:flex;flex-direction:column}.account-copy strong,.account-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-copy strong{font-size:12px;color:#fff}.account-copy small{color:#8ea9c0;font-size:10px}
.content{width:100%!important;max-width:1640px!important;margin:0 auto!important;padding:clamp(18px,2.3vw,34px)!important;flex:1 1 auto!important;min-width:0!important;background:transparent!important;color:var(--eh-text)!important}.portal-footer{padding:8px 24px 20px;color:#718aa2;font-size:10px;text-align:center}.drawer-backdrop{position:fixed;inset:0;z-index:35;background:rgba(3,12,29,.61);backdrop-filter:blur(2px)}

/* Never show mobile bottom navigation on desktop. */
@media(min-width:1025px){#roleBottomNav,.role-bottom-nav,#principalBottomNav,.principal-bottom-nav,#studentBottomNav,.student-bottom-nav{display:none!important}.sidebar{transform:none!important}.portal-main{margin-left:0!important}}

/* Page blocks */
.page-head{margin-bottom:22px;display:flex;align-items:flex-end;justify-content:space-between;gap:18px}.page-head h2{margin:0;color:#fff;font-size:clamp(24px,3vw,32px);font-weight:850;letter-spacing:-.035em}.page-head p{margin:5px 0 0;color:var(--eh-muted)}.page-actions,.actions,.form-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.grid{display:grid;gap:16px}.grid--2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid--3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid--4{grid-template-columns:repeat(4,minmax(0,1fr))}.layout-main-side{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:18px;align-items:start}
.card,.table-card{min-width:0;padding:20px;border:1px solid var(--eh-border);border-radius:var(--eh-radius);background:linear-gradient(180deg,#08233a,#061b2e);color:#eaf4ff;box-shadow:0 2px 4px rgba(0,0,0,.08)}.card--flush{padding:0;overflow:hidden}.card--soft{background:#0a2439}.card--accent{border-color:#22658e;background:linear-gradient(135deg,#0b2854,#164d94);color:#fff;box-shadow:0 14px 34px rgba(11,40,84,.19)}.card+.card{margin-top:16px}.card-head{margin-bottom:16px;display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.card-head h2,.card-head h3{margin:0;color:#fff;font-size:18px;font-weight:850;letter-spacing:-.015em}.card-head p{margin:3px 0 0;color:#94abc1;font-size:12px}.section-title{margin:27px 0 12px;color:#cfe0f0;font-size:12px;font-weight:900;letter-spacing:.1em;text-transform:uppercase}
.kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.kpi-card{position:relative;min-width:0;padding:17px;overflow:hidden;border:1px solid var(--eh-border);border-radius:12px;background:#082239;color:#fff}.kpi-card::after{content:"";position:absolute;right:-22px;bottom:-26px;width:88px;height:88px;border-radius:50%;background:rgba(58,161,224,.08)}.kpi-top{position:relative;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:10px}.kpi-icon{width:39px;height:39px;display:grid;place-items:center;border-radius:10px;background:#0c3552;color:#5dd8ff}.kpi-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8}.kpi-card b{position:relative;z-index:1;margin-top:13px;display:block;color:#fff;font-size:27px;line-height:1.1;letter-spacing:-.03em}.kpi-card>span{position:relative;z-index:1;margin-top:4px;display:block;color:#9ab1c7;font-size:11px;font-weight:700}.quick-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.quick-card{min-height:86px;padding:13px;display:flex;align-items:flex-start;gap:12px;border:1px solid var(--eh-border);border-radius:11px;background:#082239;color:#dcecf9;text-align:left}.quick-card strong{display:block;color:#fff;font-size:13px}.quick-card small{margin-top:3px;display:block;color:#91a9bf;font-size:10px;line-height:1.45}.programme-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.programme-card{padding:13px;border:1px solid var(--eh-border);border-radius:10px;background:#082239}.programme-card strong{display:block;color:#61d0ff;font-size:12px}.programme-card span{margin-top:6px;display:flex;justify-content:space-between;color:#91a9bf;font-size:10px}.programme-card b{color:#fff;font-size:14px}

/* Filters/forms */
.filter-bar{margin-bottom:16px;padding:14px;display:grid;grid-template-columns:minmax(220px,1.5fr) repeat(3,minmax(135px,.7fr)) auto;gap:10px;align-items:end;border:1px solid var(--eh-border);border-radius:11px;background:#071e33}.filter-bar--wrap{grid-template-columns:repeat(4,minmax(150px,1fr))}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.form-grid--3{grid-template-columns:repeat(3,minmax(0,1fr))}.form-grid--4{grid-template-columns:repeat(4,minmax(0,1fr))}.form-field{min-width:0}.form-field .hint{margin-top:4px;color:#8ca4b9;font-size:10px}.form-field--wide{grid-column:1/-1}.check-row{min-height:44px;padding:9px 11px;display:flex;align-items:center;gap:9px;border:1px solid var(--eh-border);border-radius:9px;background:#082239;color:#d8e7f6;font-size:11px;font-weight:800}.check-row input{width:18px;height:18px;min-height:0;margin:0;accent-color:#238eea}

/* Tables */
.table-card{padding:0;overflow:hidden}.table-toolbar{padding:14px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--eh-border);background:#082239}.table-toolbar strong{color:#fff}.table-toolbar small{color:#91a9bf}.table-wrap,.pa-table-wrap{width:100%;max-width:100%;overflow:auto;border-radius:10px}.table-wrap table,.pa-table,table.data-table{width:100%;border-collapse:collapse;border-spacing:0;font-size:12px;color:#e8f2fb}.table-wrap th,.pa-table th,table.data-table th{padding:10px 11px;border:1px solid #2b5673;background:#0b4b77;color:#fff;font-size:11px;font-weight:900;text-align:left;white-space:nowrap}.table-wrap td,.pa-table td,table.data-table td{padding:10px 11px;border:1px solid #24465e;background:#071e33;color:#dbe9f5;vertical-align:middle}.table-wrap tbody tr:hover td,.pa-table tbody tr:hover td{background:#0a2b45}.cell-primary{color:#fff;font-weight:800}.cell-secondary{color:#92aac0;font-size:10px}.badge,.pill,.status-badge{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:24px;padding:4px 8px;border:1px solid #315b76;border-radius:999px;background:#0c304b;color:#dff5ff;font-size:10px;font-weight:900}.badge--success,.status-success{border-color:#268967;background:#0e513d;color:#c7ffe9}.badge--danger,.status-danger{border-color:#a9444d;background:#551e27;color:#ffe4e7}.badge--warning,.status-warning{border-color:#a9782b;background:#4b3515;color:#ffe8ae}
.pagination,.pa-pager{padding:12px 15px;display:flex;align-items:center;justify-content:center;gap:10px;border-top:1px solid var(--eh-border);color:#9cb4ca}

/* Activity page, the page shown in the latest screenshot */
.pa-view{max-width:100%;overflow:hidden}.pa-note{margin:8px 0 14px;color:#91abc2;font-size:12px;line-height:1.5}.pa-filters{display:grid;grid-template-columns:repeat(2,minmax(180px,1fr));gap:12px;padding:14px;border:1px solid var(--eh-border);border-radius:12px;background:#061a2d}.pa-filters label{display:block;color:#cfe2f4;font-size:11px;font-weight:850}.pa-filters label input,.pa-filters label select{margin-top:6px}.pa-filters .pa-wide{grid-column:1/-1}.pa-filters>.button{align-self:end}.pa-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:10px 0 18px}.pa-kpis>div{min-width:0;padding:14px;border:1px solid #28516b;border-radius:11px;background:#09263e}.pa-kpis span{display:block;color:#91abc2;font-size:10px;font-weight:800}.pa-kpis strong{display:block;margin-top:7px;color:#fff;font-size:21px;line-height:1.2}.pa-modules{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:9px 0 18px}.pa-modules>div{padding:12px;border:1px solid #244b65;border-radius:10px;background:#082239}.pa-modules b{display:block;color:#fff;font-size:12px}.pa-modules span,.pa-modules small{display:block;margin-top:4px;color:#93acc2;font-size:10px}.pa-timeline{margin:12px 0;padding-left:28px}.pa-timeline li{margin:0 0 8px;padding:10px 12px;border:1px solid #244b65;border-radius:9px;background:#082239}.pa-timeline time{display:block;color:#60d1ff;font-size:10px;font-weight:900}.pa-timeline span{display:block;margin-top:3px;color:#fff;font-weight:750}.pa-timeline small{display:block;margin-top:3px;color:#93acc2}

/* Common generated structures */
.empty-state{padding:42px 24px;text-align:center;color:#9ab2c8}.empty-state h3{margin:0;color:#fff;font-size:16px}.empty-state p{max-width:490px;margin:5px auto 0;color:#91a9bf;font-size:12px}.empty-icon{width:52px;height:52px;margin:0 auto 14px;display:grid;place-items:center;border-radius:14px;background:#0c3150;color:#75ddff}.loading-block{padding:48px;text-align:center;color:#91a9bf;font-size:12px}.loading-block::before{content:"";width:27px;height:27px;margin:0 auto 12px;display:block;border:3px solid #234a65;border-top-color:#46caff;border-radius:50%;animation:eh-spin .75s linear infinite}.error-state{padding:26px;border:1px solid #94404a;border-radius:12px;background:#38161e;color:#ffd9dd}.error-state strong{display:block;margin-bottom:4px}@keyframes eh-spin{to{transform:rotate(360deg)}}
.doc-grid,.resource-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.doc-card,.resource-card{padding:15px;display:flex;gap:12px;border:1px solid var(--eh-border);border-radius:11px;background:#082239}.doc-icon{width:40px;height:44px;display:grid;place-items:center;flex:0 0 auto;border-radius:8px;background:#0d3654;color:#5bd5ff;font-size:10px;font-weight:900}.doc-card strong,.resource-card strong{display:block;color:#fff;font-size:11px}.doc-card small,.resource-card small{margin:4px 0 9px;display:block;color:#91a9bf;font-size:9px}.class-buttons{display:grid;grid-template-columns:repeat(4,minmax(90px,1fr));gap:9px}.class-button{min-height:66px;padding:10px;border:1px solid var(--eh-border);border-radius:10px;background:#082239;color:#cfe2f4;text-align:left}.class-button:hover,.class-button.active{border-color:#2ba7ef;background:#0b3555;color:#fff}.class-button strong{display:block;font-size:12px}.class-button span{display:block;margin-top:4px;font-size:9px}

/* Dialog/toast */
.app-dialog{width:min(820px,calc(100% - 24px));max-height:min(88vh,900px);padding:0;border:1px solid #28516e;border-radius:17px;background:#06192b;color:#eff7ff;box-shadow:0 28px 80px rgba(0,0,0,.55)}.app-dialog::backdrop{background:rgba(2,8,18,.72);backdrop-filter:blur(3px)}.dialog-shell{margin:0;display:flex;flex-direction:column;max-height:88vh}.dialog-shell>header{padding:17px 20px;display:flex;align-items:center;justify-content:space-between;gap:14px;border-bottom:1px solid var(--eh-border)}.dialog-shell h2{margin:0;color:#fff;font-size:20px}.dialog-body{padding:20px;overflow:auto}.dialog-footer{padding:13px 20px;display:flex;justify-content:flex-end;gap:8px;border-top:1px solid var(--eh-border);background:#082239}.toast-region{position:fixed;z-index:2000;right:20px;top:18px;width:min(380px,calc(100% - 40px));display:grid;gap:8px;pointer-events:none}.toast{padding:12px 14px;display:flex;align-items:flex-start;gap:10px;border:1px solid #315675;border-radius:11px;background:#082239;color:#eaf4ff;font-size:11px;font-weight:700;box-shadow:0 15px 40px rgba(0,0,0,.35);pointer-events:auto}

/* Coordinator desktop recovery */
body[data-portal-role="ACADEMIC_COORDINATOR"] .content{background:#030c18!important}body[data-portal-role="ACADEMIC_COORDINATOR"] .topbar{background:#f4f4f2!important;color:#061426!important;border-bottom-color:#d8dfe7!important}body[data-portal-role="ACADEMIC_COORDINATOR"] .topbar-title h1{color:#071425!important}body[data-portal-role="ACADEMIC_COORDINATOR"] .topbar-title>span{color:#2079df!important}body[data-portal-role="ACADEMIC_COORDINATOR"] .topbar-button,body[data-portal-role="ACADEMIC_COORDINATOR"] .notification-button,body[data-portal-role="ACADEMIC_COORDINATOR"] .account-button{background:#fff!important;border-color:#cbd6e1!important;color:#0a2035!important}

/* Manufacturer/Super Admin/Operator dark desktop readability */
body[data-portal-role="SUPER_ADMIN"] .content,body[data-portal-role="OPERATOR"] .content,body[data-portal-role="MEDALS_MANUFACTURER"] .content,body[data-portal-role="MEDAL_MANUFACTURER"] .content{background:#030c18!important}

/* Responsive */
@media(max-width:1260px){.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.programme-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.filter-bar{grid-template-columns:repeat(3,minmax(140px,1fr))}.form-grid--4{grid-template-columns:repeat(2,minmax(0,1fr))}.pa-modules{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1024px){:root{--eh-topbar:70px}.portal-view{display:block!important}.sidebar{width:min(88vw,310px)!important;max-width:min(88vw,310px)!important;transform:translateX(-102%);transition:transform .22s ease;box-shadow:0 0 50px rgba(0,0,0,.35)}.sidebar.open{transform:translateX(0)!important}.sidebar-close,.menu-toggle{display:grid!important}.portal-main{display:flex!important;grid-column:auto!important}.topbar{height:70px!important;min-height:70px!important;padding:10px 14px!important}.topbar-title>span{display:none!important}.topbar-title h1{font-size:19px!important}.topbar-button-label,.account-copy{display:none!important}.topbar-button{width:40px;padding:0!important}.content{padding:18px 14px!important}.layout-main-side{grid-template-columns:1fr}.doc-grid,.resource-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.pa-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.pa-modules{grid-template-columns:repeat(2,minmax(0,1fr))}.pa-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.role-bottom-nav,#roleBottomNav,.principal-bottom-nav,#principalBottomNav,.student-bottom-nav,#studentBottomNav{font-family:Inter,"Segoe UI",Arial,sans-serif!important}}
@media(max-width:820px){.login-view{padding:0;background:#fff}.login-stage{min-height:100vh;grid-template-columns:1fr;border:0;border-radius:0;box-shadow:none}.login-brand-panel{display:none}.login-form-panel{padding:34px 22px}.login-mobile-brand{margin-bottom:46px;display:flex;align-items:center;gap:11px}.login-mobile-brand img{width:min(210px,68vw);height:auto!important;max-height:64px;object-fit:contain}.page-head{align-items:flex-start;flex-direction:column}.grid--3,.grid--4,.quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.filter-bar,.filter-bar--wrap{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid--3{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.content{padding:14px 10px!important}.card{padding:15px;border-radius:10px}.grid--2,.grid--3,.grid--4,.programme-grid,.filter-bar,.filter-bar--wrap,.form-grid,.form-grid--3,.form-grid--4,.doc-grid,.resource-grid{grid-template-columns:1fr}.kpi-grid,.quick-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.pa-kpis,.pa-modules,.pa-filters{grid-template-columns:1fr}.pa-filters .pa-wide{grid-column:auto}.form-actions,.page-actions,.actions{align-items:stretch;flex-direction:column}.form-actions .button,.page-actions .button,.actions .button{width:100%}.app-dialog{width:calc(100% - 12px);max-height:94vh;border-radius:13px}.dialog-shell{max-height:94vh}.dialog-body{padding:14px}.dialog-footer{align-items:stretch;flex-direction:column-reverse}.dialog-footer .button{width:100%}}

/* Print */
@media print{body{background:#fff!important;color:#111!important;font-size:11pt}.sidebar,.topbar,.portal-footer,.page-actions,.actions,.filter-bar,.form-actions,.row-actions,.pagination,.toast-region,#roleBottomNav,#principalBottomNav,#studentBottomNav{display:none!important}.portal-view{display:block!important}.portal-main{display:block!important}.content{max-width:none!important;padding:0!important}.card,.table-card{break-inside:avoid;box-shadow:none!important}.table-wrap{overflow:visible!important}}

/* EDUHUNT R385 — stability-only repair. */
#loginView[hidden],#portalView[hidden]{display:none!important;visibility:hidden!important;pointer-events:none!important}
body:not([data-portal-role]) #portalView{display:none!important;visibility:hidden!important;pointer-events:none!important}
body[data-portal-role] #loginView{display:none!important;visibility:hidden!important;pointer-events:none!important}
body:not([data-portal-role]) #loginView{position:relative;z-index:1}
#appDialog .logout-confirm-copy{display:grid!important;gap:8px!important;padding:4px 0 2px!important;min-height:0!important;color:inherit!important}
#appDialog .logout-confirm-copy p{margin:0!important;font-size:15px!important;line-height:1.55!important;font-weight:700!important}
#appDialog .logout-confirm-copy .logout-confirm-icon{display:none!important}
#appDialog .dialog-body:has(.logout-confirm-copy){min-height:0!important;padding:20px!important}
#appDialog:has(.logout-confirm-copy){width:min(520px,calc(100vw - 28px))!important;max-height:none!important;overflow:hidden!important}
#appDialog:has(.logout-confirm-copy) .dialog-shell{max-height:none!important}
#appDialog:has(.logout-confirm-copy) .dialog-footer{position:static!important}
#appDialog:has(.logout-confirm-copy) svg{width:20px!important;height:20px!important;max-width:20px!important;max-height:20px!important;flex:0 0 20px!important;fill:none!important;stroke:currentColor!important}
#appDialog svg{max-width:28px;max-height:28px}
#appDialog .button svg{width:18px!important;height:18px!important}
@media(min-width:1025px){#roleBottomNav,#principalBottomNav,#studentBottomNav,.principal-bottom-nav,.student-bottom-nav,.role-bottom-nav{display:none!important}}
body:not([data-portal-role]) #portalView,body:not([data-portal-role]) .principal-bottom-nav,body:not([data-portal-role]) .student-bottom-nav,body:not([data-portal-role]) #roleBottomNav{display:none!important}

/* EDUHUNT R391 — SEARCH FIELD ICON/LAYOUT REPAIR
   Repairs the unstyled SVG produced by searchField(). Without this rule the
   browser gives the SVG its intrinsic size and default black fill, creating
   the large black circle and excessive filter height seen in School Directory.
   Layout, colours, data logic and all non-search UI remain unchanged. */
.search-wrap{position:relative;display:block;width:100%}
.search-wrap>svg{position:absolute;z-index:1;left:13px;top:50%;width:18px!important;height:18px!important;max-width:18px!important;max-height:18px!important;transform:translateY(-50%);fill:none!important;stroke:#78899f!important;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.search-wrap>input{width:100%;padding-left:42px}

/* ========================================================================
   EDUHUNT R395 — GLOBAL LIGHT / DARK THEME + CONTRAST CONTRACT
   Scope: authenticated portal shell only. Login and business logic untouched.
   This block also restores legacy --surface/--text/--muted variables used by
   older inline module UI so white-on-white / dark-on-dark text cannot occur.
   ======================================================================== */
body[data-portal-role][data-desktop-theme="dark"]{
  color-scheme:dark;
  --eh-bg:#020813;--eh-bg2:#061426;--eh-panel:#071b2f;--eh-panel2:#0b2741;
  --eh-border:#2b506b;--eh-border-soft:#1d4058;--eh-text:#f4f8ff;--eh-muted:#a6bbcf;
  --surface:#071b2f;--surface-2:#0a2439;--surface-soft:#0b2942;--panel:#071b2f;--card:#082239;
  --border:#2b506b;--line:#2b506b;--text:#f4f8ff;--muted:#a6bbcf;--ink-700:#dbeaf7;--green:#19a873;
}
body[data-portal-role][data-desktop-theme="light"]{
  color-scheme:light;
  --eh-bg:#f3f7fb;--eh-bg2:#edf3f8;--eh-panel:#ffffff;--eh-panel2:#f6f9fc;
  --eh-border:#c7d5e2;--eh-border-soft:#d9e3ec;--eh-text:#14283f;--eh-muted:#60758a;
  --surface:#ffffff;--surface-2:#f4f7fb;--surface-soft:#edf4fa;--panel:#ffffff;--card:#ffffff;
  --border:#c7d5e2;--line:#c7d5e2;--text:#14283f;--muted:#60758a;--ink-700:#29445f;--green:#12845d;
}

/* One switch, same position, every authenticated role. */
body[data-portal-role][data-desktop-theme] #desktopThemeSwitcher:not([hidden]){
  display:inline-flex!important;
  visibility:visible!important;
  pointer-events:auto!important;
  align-items:center!important;
  gap:3px!important;
  flex:0 0 auto!important;
  padding:3px!important;
  border:1px solid var(--eh-border)!important;
  border-radius:10px!important;
  background:var(--eh-panel2)!important;
  box-shadow:none!important;
}
body[data-portal-role] #desktopThemeSwitcher .desktop-theme-choice{
  min-width:0!important;
  min-height:32px!important;
  height:32px!important;
  padding:5px 9px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  border:1px solid transparent!important;
  border-radius:7px!important;
  background:transparent!important;
  color:var(--eh-muted)!important;
  box-shadow:none!important;
  font-size:11px!important;
  font-weight:850!important;
  line-height:1!important;
  white-space:nowrap!important;
}
body[data-portal-role] #desktopThemeSwitcher .desktop-theme-choice>span{font-size:14px!important;line-height:1!important}
body[data-portal-role] #desktopThemeSwitcher .desktop-theme-choice> b{color:inherit!important;font:inherit!important}
body[data-portal-role][data-desktop-theme="dark"] #desktopThemeSwitcher .desktop-theme-choice[data-desktop-theme-choice="dark"],
body[data-portal-role][data-desktop-theme="light"] #desktopThemeSwitcher .desktop-theme-choice[data-desktop-theme-choice="light"]{
  border-color:#6757ad!important;
  background:#443970!important;
  color:#ffffff!important;
}
body[data-portal-role][data-desktop-theme="light"] #desktopThemeSwitcher{
  background:#f7f9fc!important;
  border-color:#cbd7e3!important;
}
body[data-portal-role][data-desktop-theme="light"] #desktopThemeSwitcher .desktop-theme-choice{color:#51667b!important}
body[data-portal-role][data-desktop-theme="light"] #desktopThemeSwitcher .desktop-theme-choice[data-desktop-theme-choice="light"]{
  border-color:#9fb6ca!important;
  background:#ffffff!important;
  color:#132a43!important;
  box-shadow:0 1px 2px rgba(18,43,67,.08)!important;
}
/* R395 retires the old Student-only toggle to avoid duplicate controls. */
body[data-portal-role] #studentThemeToggle{display:none!important}

/* Portal shell. Sidebar intentionally remains the established navy brand shell. */
body[data-portal-role][data-desktop-theme="dark"],
body[data-portal-role][data-desktop-theme="dark"] .portal-view,
body[data-portal-role][data-desktop-theme="dark"] .portal-main,
body[data-portal-role][data-desktop-theme="dark"] .content{
  background:#020813!important;color:#f4f8ff!important;
}
body[data-portal-role][data-desktop-theme="light"],
body[data-portal-role][data-desktop-theme="light"] .portal-view,
body[data-portal-role][data-desktop-theme="light"] .portal-main,
body[data-portal-role][data-desktop-theme="light"] .content{
  background:#f3f7fb!important;color:#14283f!important;
}

/* Header / account controls. This deliberately overrides old role-specific
   hardcoded header colors, including the Coordinator recovery rule. */
body[data-portal-role][data-desktop-theme="dark"] .topbar{
  background:rgba(4,18,33,.97)!important;color:#f5fbff!important;border-bottom-color:#1f425b!important;
}
body[data-portal-role][data-desktop-theme="dark"] .topbar-title h1{color:#ffffff!important}
body[data-portal-role][data-desktop-theme="dark"] .topbar-title>span{color:#38a8ff!important}
body[data-portal-role][data-desktop-theme="dark"] :is(.topbar-button,.notification-button,.account-button){
  background:#09253b!important;color:#eaf6ff!important;border-color:#28516e!important;
}
body[data-portal-role][data-desktop-theme="dark"] .account-copy strong{color:#ffffff!important}
body[data-portal-role][data-desktop-theme="dark"] .account-copy small{color:#9bb1c5!important}

body[data-portal-role][data-desktop-theme="light"] .topbar{
  background:rgba(255,255,255,.98)!important;color:#132940!important;border-bottom-color:#d2dde7!important;
  box-shadow:0 2px 12px rgba(24,49,72,.07)!important;
}
body[data-portal-role][data-desktop-theme="light"] .topbar-title h1{color:#132940!important}
body[data-portal-role][data-desktop-theme="light"] .topbar-title>span{color:#0d78c7!important}
body[data-portal-role][data-desktop-theme="light"] :is(.topbar-button,.notification-button,.account-button){
  background:#ffffff!important;color:#17324e!important;border-color:#bfd0df!important;
}
body[data-portal-role][data-desktop-theme="light"] .account-copy strong{color:#17324e!important}
body[data-portal-role][data-desktop-theme="light"] .account-copy small{color:#61768a!important}
body[data-portal-role][data-desktop-theme="light"] .menu-toggle{color:#17324e!important}

/* Core page typography. */
body[data-portal-role][data-desktop-theme="dark"] #content :is(.page-head h2,.page-head h3,.card-head h2,.card-head h3,.section-title,.cell-primary,.table-toolbar strong,.empty-state h3){color:#f7fbff!important}
body[data-portal-role][data-desktop-theme="dark"] #content :is(.page-head p,.card-head p,.cell-secondary,.table-toolbar small,.form-field .hint,.empty-state p,.pa-note){color:#a3b9cc!important}
body[data-portal-role][data-desktop-theme="light"] #content :is(.page-head h2,.page-head h3,.card-head h2,.card-head h3,.section-title,.cell-primary,.table-toolbar strong,.empty-state h3){color:#14283f!important;text-shadow:none!important}
body[data-portal-role][data-desktop-theme="light"] #content :is(.page-head p,.card-head p,.cell-secondary,.table-toolbar small,.form-field .hint,.empty-state p,.pa-note){color:#60758a!important;text-shadow:none!important}
body[data-portal-role][data-desktop-theme="light"] #content :is(.field-label,.form-field>label,.form-field>.label){color:#29445f!important}
body[data-portal-role][data-desktop-theme="dark"] #content :is(.field-label,.form-field>label,.form-field>.label){color:#cfe2f4!important}

/* Cards, filters and generated content blocks. */
body[data-portal-role][data-desktop-theme="dark"] #content :is(.card,.table-card,.kpi-card,.quick-card,.programme-card,.doc-card,.resource-card,.filter-bar,.check-row,.pa-filters,.pa-kpis>div,.pa-modules>div,.pa-timeline li){
  background:#071e33!important;color:#eaf4ff!important;border-color:#2b506b!important;
}
body[data-portal-role][data-desktop-theme="light"] #content :is(.card,.table-card,.kpi-card,.quick-card,.programme-card,.doc-card,.resource-card,.filter-bar,.check-row,.pa-filters,.pa-kpis>div,.pa-modules>div,.pa-timeline li){
  background:#ffffff!important;color:#14283f!important;border-color:#c7d5e2!important;box-shadow:0 2px 5px rgba(31,60,86,.05)!important;
}
body[data-portal-role][data-desktop-theme="dark"] #content :is(.kpi-card b,.quick-card strong,.programme-card b,.doc-card strong,.resource-card strong,.pa-kpis strong,.pa-modules b,.pa-timeline span){color:#ffffff!important}
body[data-portal-role][data-desktop-theme="dark"] #content :is(.kpi-card>span,.quick-card small,.programme-card span,.doc-card small,.resource-card small,.pa-kpis span,.pa-modules span,.pa-modules small,.pa-timeline small){color:#9fb5c9!important}
body[data-portal-role][data-desktop-theme="light"] #content :is(.kpi-card b,.quick-card strong,.programme-card b,.doc-card strong,.resource-card strong,.pa-kpis strong,.pa-modules b,.pa-timeline span){color:#14283f!important}
body[data-portal-role][data-desktop-theme="light"] #content :is(.kpi-card>span,.quick-card small,.programme-card span,.doc-card small,.resource-card small,.pa-kpis span,.pa-modules span,.pa-modules small,.pa-timeline small){color:#60758a!important}
body[data-portal-role][data-desktop-theme="light"] #content .programme-card strong{color:#0878bd!important}

/* Form controls + old inline modules that use inherited color. */
body[data-portal-role][data-desktop-theme="dark"] #content :is(input,select,textarea),
body[data-portal-role][data-desktop-theme="dark"] .app-dialog :is(input,select,textarea){
  background:#061b2e!important;color:#f4f8ff!important;border-color:#355b75!important;
}
body[data-portal-role][data-desktop-theme="dark"] #content :is(input,textarea)::placeholder,
body[data-portal-role][data-desktop-theme="dark"] .app-dialog :is(input,textarea)::placeholder{color:#829bb1!important}
body[data-portal-role][data-desktop-theme="dark"] #content select option,
body[data-portal-role][data-desktop-theme="dark"] .app-dialog select option{background:#061b2e!important;color:#f4f8ff!important}

body[data-portal-role][data-desktop-theme="light"] #content :is(input,select,textarea),
body[data-portal-role][data-desktop-theme="light"] .app-dialog :is(input,select,textarea){
  background:#ffffff!important;color:#14283f!important;border-color:#b8cad9!important;
}
body[data-portal-role][data-desktop-theme="light"] #content :is(input,textarea)::placeholder,
body[data-portal-role][data-desktop-theme="light"] .app-dialog :is(input,textarea)::placeholder{color:#7d91a4!important}
body[data-portal-role][data-desktop-theme="light"] #content select option,
body[data-portal-role][data-desktop-theme="light"] .app-dialog select option{background:#ffffff!important;color:#14283f!important}
body[data-portal-role][data-desktop-theme="light"] #content :is(input,select,textarea):disabled{background:#eaf0f5!important;color:#6e8294!important}
body[data-portal-role][data-desktop-theme="dark"] #content :is(input,select,textarea):disabled{background:#10263a!important;color:#9ab0c4!important}

/* Secondary / neutral actions. Branded success/danger/primary colors stay intact. */
body[data-portal-role][data-desktop-theme="light"] :is(.button--secondary,.button--ghost){
  background:#ffffff!important;color:#173a58!important;border-color:#b9cbd9!important;
}
body[data-portal-role][data-desktop-theme="dark"] :is(.button--secondary,.button--ghost){
  background:#0b2841!important;color:#eaf5ff!important;border-color:#315675!important;
}

/* Tables. */
body[data-portal-role][data-desktop-theme="dark"] #content :is(.table-wrap,.pa-table-wrap){background:#071e33!important}
body[data-portal-role][data-desktop-theme="dark"] #content :is(.table-wrap table,.pa-table,table.data-table){color:#e8f2fb!important}
body[data-portal-role][data-desktop-theme="dark"] #content :is(.table-wrap th,.pa-table th,table.data-table th){background:#0b4b77!important;color:#ffffff!important;border-color:#2b5673!important}
body[data-portal-role][data-desktop-theme="dark"] #content :is(.table-wrap td,.pa-table td,table.data-table td){background:#071e33!important;color:#dbe9f5!important;border-color:#24465e!important}
body[data-portal-role][data-desktop-theme="dark"] #content :is(.table-wrap tbody tr:hover td,.pa-table tbody tr:hover td){background:#0a2b45!important}

body[data-portal-role][data-desktop-theme="light"] #content :is(.table-wrap,.pa-table-wrap){background:#ffffff!important}
body[data-portal-role][data-desktop-theme="light"] #content :is(.table-wrap table,.pa-table,table.data-table){background:#ffffff!important;color:#14283f!important}
body[data-portal-role][data-desktop-theme="light"] #content :is(.table-wrap th,.pa-table th,table.data-table th){background:#e8f1f8!important;color:#183650!important;border-color:#b8cad9!important}
body[data-portal-role][data-desktop-theme="light"] #content :is(.table-wrap td,.pa-table td,table.data-table td){background:#ffffff!important;color:#20384f!important;border-color:#d3dee8!important}
body[data-portal-role][data-desktop-theme="light"] #content :is(.table-wrap tbody tr:hover td,.pa-table tbody tr:hover td){background:#f2f7fb!important}

/* Notices / neutral helper blocks, including Super Admin > Staff > School Allocation. */
body[data-portal-role][data-desktop-theme="dark"] :is(.notice,.info-box,.helper-box){background:#0a2942!important;color:#e8f5ff!important;border-color:#315a75!important}
body[data-portal-role][data-desktop-theme="light"] :is(.notice,.info-box,.helper-box){background:#eef6fc!important;color:#27445f!important;border-color:#bfd3e3!important}
body[data-portal-role][data-desktop-theme="dark"] #saStaffAllocationToggle{background:var(--surface-2)!important;color:#f4f8ff!important}
body[data-portal-role][data-desktop-theme="light"] #saStaffAllocationToggle{background:var(--surface-2)!important;color:#14283f!important}
body[data-portal-role][data-desktop-theme="dark"] #saStaffAllocationToggle small{color:#a6bbcf!important}
body[data-portal-role][data-desktop-theme="light"] #saStaffAllocationToggle small{color:#60758a!important}

/* Dialogs and toasts follow the selected mode. */
body[data-portal-role][data-desktop-theme="dark"] .app-dialog{background:#06192b!important;color:#eff7ff!important;border-color:#28516e!important}
body[data-portal-role][data-desktop-theme="dark"] .app-dialog .dialog-footer{background:#082239!important;border-color:#2b506b!important}
body[data-portal-role][data-desktop-theme="dark"] .app-dialog h2{color:#ffffff!important}
body[data-portal-role][data-desktop-theme="dark"] .toast{background:#082239!important;color:#eaf4ff!important;border-color:#315675!important}
body[data-portal-role][data-desktop-theme="light"] .app-dialog{background:#ffffff!important;color:#14283f!important;border-color:#bfd0df!important}
body[data-portal-role][data-desktop-theme="light"] .app-dialog .dialog-shell>header{border-color:#d3dee8!important}
body[data-portal-role][data-desktop-theme="light"] .app-dialog .dialog-footer{background:#f5f8fb!important;border-color:#d3dee8!important}
body[data-portal-role][data-desktop-theme="light"] .app-dialog h2{color:#14283f!important}
body[data-portal-role][data-desktop-theme="light"] .toast{background:#ffffff!important;color:#20384f!important;border-color:#bfd0df!important;box-shadow:0 12px 28px rgba(28,54,77,.16)!important}

/* Mobile: keep both theme choices available but compact enough for every role. */
@media(max-width:1024px){
  body[data-portal-role][data-desktop-theme] #desktopThemeSwitcher:not([hidden]){gap:2px!important;padding:2px!important;border-radius:9px!important}
  body[data-portal-role] #desktopThemeSwitcher .desktop-theme-choice{width:34px!important;height:34px!important;min-height:34px!important;padding:0!important}
  body[data-portal-role] #desktopThemeSwitcher .desktop-theme-choice>b{display:none!important}
  body[data-portal-role] #desktopThemeSwitcher .desktop-theme-choice>span{font-size:15px!important}
}
@media(max-width:560px){
  body[data-portal-role] .topbar-actions{gap:5px!important}
  body[data-portal-role] #desktopThemeSwitcher .desktop-theme-choice{width:31px!important;height:31px!important;min-height:31px!important}
  body[data-portal-role] #desktopThemeSwitcher .desktop-theme-choice>span{font-size:14px!important}
}

/* ========================================================================
   EDUHUNT UI RESTORE R396 — missing button / navigation / icon presentation.
   Baseline: the user's _public_html (12)(1).zip, R395 index / R389 application.
   The original stylesheet above is preserved byte-for-byte.
   No event handlers, labels, permissions, data, API calls or states are changed.
   Deliberately NOT a global button reset: only existing, unstyled components.
   ======================================================================== */
:where(body[data-portal-role]) {
  --eh-ui-control-bg: var(--eh-panel2, #0b2741);
  --eh-ui-control-text: var(--eh-text, #f4f8ff);
  --eh-ui-control-border: var(--eh-border, #2b506b);
  --eh-ui-hover: #103853;
  --eh-ui-selected-bg: #103b5f;
  --eh-ui-selected-text: #9adeff;
  --eh-ui-selected-border: #3599df;
  --eh-ui-green-bg: #0b382f;
  --eh-ui-green-text: #84ecc0;
  --eh-ui-green-border: #248a68;
  --eh-ui-red-bg: #391b29;
  --eh-ui-red-text: #ffa7b2;
  --eh-ui-red-border: #9a4558;
  --eh-ui-focus: #41caff;
}
:where(body[data-portal-role][data-desktop-theme="light"]) {
  --eh-ui-hover: #edf5fb;
  --eh-ui-selected-bg: #e5f3ff;
  --eh-ui-selected-text: #075e98;
  --eh-ui-selected-border: #4b9bd0;
  --eh-ui-green-bg: #e8f8f0;
  --eh-ui-green-text: #076847;
  --eh-ui-green-border: #72b99b;
  --eh-ui-red-bg: #fff0f2;
  --eh-ui-red-text: #ab243a;
  --eh-ui-red-border: #d99aa5;
  --eh-ui-focus: #126fac;
}

/* icon() emits this precise SVG signature. Restore its original line-icon
   contract at ZERO specificity so existing component icon sizes/colours win.
   Logos, photos, charts and SVGs with explicit fill/stroke are not reset. */
:where(body[data-portal-role]) :where(svg[aria-hidden="true"][viewBox="0 0 24 24"]:not([fill]):not([stroke])) {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
:where(body[data-portal-role]) :is(.staff-directory-card-icon,.role-report-icon,.principal-hub-emoji) {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--eh-ui-selected-bg);
  color: var(--eh-ui-selected-text);
}
:where(body[data-portal-role]) :is(.staff-directory-card-icon,.role-report-icon,.principal-hub-emoji) > svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
:where(body[data-portal-role]) .notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 16px;
  padding: 13px 15px;
  border: 1px solid var(--eh-ui-control-border);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
}
:where(body[data-portal-role]) .notice > svg {
  width: 20px;
  height: 20px;
  min-width: 20px;
  max-width: 20px;
  margin-top: 1px;
  color: var(--eh-ui-selected-text);
}
:where(body[data-portal-role]) .notice > div { min-width: 0; overflow-wrap: break-word; }

/* Square actions: view, edit, download, contact and existing back controls. */
:where(body[data-portal-role]) :is(.row-actions,.principal-teacher-row-actions,.credential-forward-actions) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}
:where(body[data-portal-role]) :is(.row-action,.principal-icon-action,.staff-square-action,.eh-r242-date-edit,.principal-inner-back,.principal-single-theme-toggle,.principal-profile-edit,.result-class-clear,.r862-camera-button) {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid var(--eh-ui-control-border);
  border-radius: 8px;
  background: var(--eh-ui-control-bg);
  color: var(--eh-ui-selected-text);
  font: inherit;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
}
:where(body[data-portal-role]) :is(.row-action,.principal-icon-action,.staff-square-action,.eh-r242-date-edit,.principal-inner-back,.principal-single-theme-toggle,.principal-profile-edit,.result-class-clear,.r862-camera-button) > svg { width: 18px; height: 18px; }
:where(body[data-portal-role]) :is(.row-action,.principal-icon-action,.staff-square-action,.principal-inner-back):hover:not(:disabled) { background: var(--eh-ui-hover); border-color: var(--eh-ui-selected-border); }
:where(body[data-portal-role]) :is(.principal-icon-action--edit,.principal-icon-action--password,.staff-square-action--call) { background: var(--eh-ui-selected-bg); color: var(--eh-ui-selected-text); border-color: var(--eh-ui-selected-border); }
:where(body[data-portal-role]) :is(.principal-icon-action--deactivate,.result-class-clear) { background: var(--eh-ui-red-bg); color: var(--eh-ui-red-text); border-color: var(--eh-ui-red-border); }
:where(body[data-portal-role]) :is(.whatsapp-forward,.principal-icon-action--whatsapp,.principal-icon-action--activate,.staff-square-action--whatsapp) { background: var(--eh-ui-green-bg); color: var(--eh-ui-green-text); border-color: var(--eh-ui-green-border); }
:where(body[data-portal-role]) :is(.button--whatsapp,.credential-whatsapp-button) { background: #11845c; color: #fff; border-color: #16a36e; }
:where(body[data-portal-role]) .staff-call-emoji { display: inline-block; font-size: 20px; line-height: 1; }

/* Existing compact selectors / tabs. Active/selected is READ, never written. */
:where(body[data-portal-role]) :is(.test-type-chips,.exam-v3-test-type-tabs,.exam-v3-test-chips,.exam-v3-mini-filters,.exam-v3-coordinator-summary-chips,.principal-teacher-subjects,.principal-teacher-sections) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
:where(body[data-portal-role]) :is(.test-type-chips,.exam-v3-test-type-tabs,.exam-v3-test-chips) { margin-bottom: 14px; }
:where(body[data-portal-role]) :is(.test-type-chip,.exam-v3-test-type-button,.exam-v3-test-chip,.exam-v3-mini-filter,.exam-v3-coordinator-summary-chip,.exam-v3-principal-type-tab,.principal-result-test-chip,.principal-teacher-subject,.sa-any-class,.rwa-class-chip,.principal-hub-messages) {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--eh-ui-control-border);
  border-radius: 9px;
  background: var(--eh-ui-control-bg);
  color: var(--eh-ui-control-text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
:where(body[data-portal-role]) :is(.test-type-chip,.exam-v3-test-type-button,.exam-v3-test-chip,.exam-v3-mini-filter,.exam-v3-coordinator-summary-chip,.exam-v3-principal-type-tab,.principal-result-test-chip,.principal-teacher-subject,.sa-any-class,.rwa-class-chip):is(.active,.is-active,.selected,[aria-pressed="true"],[aria-selected="true"]) {
  border-color: var(--eh-ui-selected-border);
  background: var(--eh-ui-selected-bg);
  color: var(--eh-ui-selected-text);
}
:where(body[data-portal-role]) :is(.test-type-chip,.exam-v3-test-type-button,.exam-v3-test-chip,.exam-v3-mini-filter,.exam-v3-coordinator-summary-chip,.principal-teacher-subject):hover:not(:disabled) { border-color: var(--eh-ui-selected-border); }
:where(body[data-portal-role]) :is(.exam-v3-mini-filter,.exam-v3-coordinator-summary-chip,.principal-teacher-subject) > b {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  min-height: 24px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--eh-ui-selected-bg);
  color: var(--eh-ui-selected-text);
  font-size: 12px;
}
:where(body[data-portal-role]) .exam-v3-test-type-button { flex: 1 1 90px; flex-wrap: wrap; }
:where(body[data-portal-role]) .exam-v3-test-type-button small { font-size: 11px; font-weight: 500; color: inherit; }
:where(body[data-portal-role]) .principal-teacher-sections > button {
  min-width: 36px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--eh-ui-control-border);
  border-radius: 7px;
  background: var(--eh-ui-control-bg);
  color: var(--eh-ui-control-text);
  font: inherit;
  cursor: pointer;
}
:where(body[data-portal-role]) .principal-teacher-sections > button.selected { background: var(--eh-ui-selected-bg); color: var(--eh-ui-selected-text); border-color: var(--eh-ui-selected-border); }

/* Execution Status: restore the two existing large summary buttons. */
:where(body[data-portal-role]) .r160-execution-summary-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
:where(body[data-portal-role]) .exam-v3-coordinator-summary-toggle {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid var(--eh-ui-selected-border);
  border-radius: 11px;
  background: var(--eh-ui-selected-bg);
  color: var(--eh-ui-selected-text);
  box-shadow: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}
:where(body[data-portal-role]) .exam-v3-coordinator-summary-toggle.is-editable,
:where(body[data-portal-role]) .is-editable > .exam-v3-coordinator-summary-toggle {
  border-color: var(--eh-ui-green-border);
  background: var(--eh-ui-green-bg);
  color: var(--eh-ui-green-text);
}
:where(body[data-portal-role]) .exam-v3-coordinator-summary-toggle > span { min-width: 0; overflow-wrap: break-word; }
:where(body[data-portal-role]) .exam-v3-coordinator-summary-toggle > b {
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border: 1px solid currentColor;
  border-radius: 6px;
  font-size: 21px;
  font-weight: 500;
  line-height: 1;
}
:where(body[data-portal-role]) .exam-v3-coordinator-summary-toggle:is(.is-active,[aria-expanded="true"]) { box-shadow: inset 0 -3px 0 currentColor; }
:where(body[data-portal-role]) .exam-v3-coordinator-summary-toggle:hover:not(:disabled) { filter: brightness(1.08); }
:where(body[data-portal-role]) :is(.exam-v3-coordinator-type-toggle,.exam-v3-coordinator-cdf-toggle,.exam-v3-mobile-cdf-toggle,.exam-v3-mobile-ft-toggle,.exam-v3-principal-test-toggle,.exam-v3-principal-cdf-class-toggle,.exam-v3-principal-type-heading) {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--eh-ui-control-border);
  border-radius: 9px;
  background: var(--eh-ui-control-bg);
  color: var(--eh-ui-control-text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}
:where(body[data-portal-role]) :is(.exam-v3-coordinator-type-toggle,.exam-v3-coordinator-cdf-toggle,.exam-v3-mobile-cdf-toggle,.exam-v3-mobile-ft-toggle,.exam-v3-principal-test-toggle,.exam-v3-principal-cdf-class-toggle) > span:first-child { flex: 1 1 auto; min-width: 0; }
:where(body[data-portal-role]) :is(.exam-v3-coordinator-type-toggle,.exam-v3-coordinator-cdf-toggle,.exam-v3-mobile-cdf-toggle,.exam-v3-mobile-ft-toggle,.exam-v3-principal-test-toggle,.exam-v3-principal-cdf-class-toggle) > b:last-child { flex: 0 0 auto; font-size: 18px; }
:where(body[data-portal-role]) :is(.exam-v3-coordinator-type-toggle,.exam-v3-coordinator-cdf-toggle,.exam-v3-mobile-cdf-toggle,.exam-v3-mobile-ft-toggle,.exam-v3-principal-test-toggle,.exam-v3-principal-cdf-class-toggle)[aria-expanded="true"] { background: var(--eh-ui-selected-bg); color: var(--eh-ui-selected-text); border-color: var(--eh-ui-selected-border); }
:where(body[data-portal-role]) .exam-v3-choice-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 5px 0;
  padding: 10px 12px;
  border: 1px solid var(--eh-ui-control-border);
  border-radius: 8px;
  background: var(--eh-ui-control-bg);
  color: var(--eh-ui-control-text);
  font: inherit;
  text-align: left;
}
:where(body[data-portal-role]) .exam-v3-choice-row:is(.is-active,.selected,[aria-pressed="true"]) { border-color: var(--eh-ui-selected-border); background: var(--eh-ui-selected-bg); color: var(--eh-ui-selected-text); }
:where(body[data-portal-role]) .exam-v3-principal-cell.is-actionable { border: 1px solid var(--eh-ui-selected-border); border-radius: 7px; background: var(--eh-ui-selected-bg); color: var(--eh-ui-selected-text); padding: 7px 9px; font: inherit; }

/* Existing hub buttons (same modules, labels and ordering). */
:where(body[data-portal-role="PRINCIPAL"]) .principal-hub-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-hub-item {
  --eh-hub-accent: var(--eh-ui-selected-text);
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  min-height: 104px;
  padding: 14px 8px;
  border: 1px solid var(--eh-ui-control-border);
  border-radius: 12px;
  background: var(--eh-ui-control-bg);
  color: var(--eh-ui-control-text);
  font-family: inherit;
  text-align: center;
  cursor: pointer;
}
:where(body[data-portal-role="PRINCIPAL"]) .principal-hub-item > b { max-width: 100%; font-size: 17px; font-weight: 700; line-height: 1.3; overflow-wrap: break-word; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-hub-item .principal-hub-emoji { color: var(--eh-hub-accent); }
:where(body[data-portal-role="PRINCIPAL"]) .principal-hub-item:hover { border-color: var(--eh-hub-accent); }
:where(body[data-portal-role="PRINCIPAL"]) .principal-app-page-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-app-page-head > div { flex: 1 1 auto; min-width: 0; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-app-page-head h2 { margin: 0; color: var(--eh-ui-control-text); }
:where(body[data-portal-role="PRINCIPAL"]) .principal-app-page-head > button[data-principal-back] {
  display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px;
  padding: 0; border: 1px solid var(--eh-ui-control-border); border-radius: 8px;
  background: var(--eh-ui-control-bg); color: var(--eh-ui-selected-text); font-size: 28px; line-height: 1;
}
:where(body[data-portal-role]) .role-report-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
:where(body[data-portal-role]) .role-report-card {
  display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 86px; padding: 15px;
  border: 1px solid var(--eh-ui-control-border); border-radius: 11px;
  background: var(--eh-ui-control-bg); color: var(--eh-ui-control-text); font: inherit; text-align: left;
}
:where(body[data-portal-role]) .role-report-card > span:nth-child(2) { flex: 1 1 auto; min-width: 0; }
:where(body[data-portal-role]) .role-report-card strong { display: block; font-size: 14px; }
:where(body[data-portal-role]) .role-report-card small { display: block; margin-top: 4px; color: var(--eh-muted); font-size: 12px; line-height: 1.4; }
:where(body[data-portal-role]) .role-report-arrow { color: var(--eh-ui-selected-text); font-size: 24px; }
:where(body[data-portal-role]) .profile-logout-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 14px;
  border: 1px solid var(--eh-ui-red-border); border-radius: 9px; background: var(--eh-ui-red-bg); color: var(--eh-ui-red-text); font: inherit;
}
:where(body[data-portal-role]) .schedule-kpi-card { text-align: left; }
:where(body[data-portal-role]) .schedule-kpi-card:is(.is-active,[aria-pressed="true"]) { outline: 2px solid var(--eh-ui-selected-border); outline-offset: -2px; }

/* Fixed app navigation. Desktop keeps the existing sidebar; no second menu.
   Student/Coordinator's existing injected CSS remains authoritative. */
:where(body[data-portal-role]) :is(#principalBottomNav,#roleBottomNav) { display: none; }

@media (max-width:1024px) {

:where(body[data-portal-role]) :is(#principalBottomNav,#roleBottomNav):not([hidden]) {
  display: grid !important;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1400;
  grid-template-columns: repeat(5,minmax(0,1fr));
  align-items: stretch;
  gap: 3px;
  width: 100%;
  min-height: 74px;
  padding: 7px 6px max(7px,env(safe-area-inset-bottom));
  border-top: 1px solid var(--eh-ui-control-border) !important;
  background: var(--eh-panel, #071b2f) !important;
  box-shadow: 0 -5px 18px rgba(0,0,0,.16);
}
:where(body[data-portal-role]) :is(#principalBottomNav,#roleBottomNav) > button {
  appearance: none;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 55px;
  margin: 0;
  padding: 4px 1px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--eh-muted, #a6bbcf);
  font-family: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}
:where(body[data-portal-role]) :is(#principalBottomNav,#roleBottomNav) > button > i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 28px;
  flex: 0 0 auto;
  color: var(--eh-nav-accent, var(--eh-ui-selected-text));
  font-size: 22px;
  font-style: normal;
  line-height: 1;
}
:where(body[data-portal-role]) :is(#principalBottomNav,#roleBottomNav) > button > i > svg { width: 22px; height: 22px; }
:where(body[data-portal-role]) :is(#principalBottomNav,#roleBottomNav) > button > span {
  display: block;
  width: 100%;
  min-width: 0;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
}
:where(body[data-portal-role]) :is(#principalBottomNav,#roleBottomNav) > button.active {
  background: var(--eh-ui-selected-bg);
  color: var(--eh-ui-control-text);
}
:where(body[data-portal-role]):not([data-portal-role="STUDENT"]):not([data-portal-role="ACADEMIC_COORDINATOR"]):has(#principalBottomNav:not([hidden]),#roleBottomNav:not([hidden])) #content { padding-bottom: calc(100px + env(safe-area-inset-bottom)) !important; }

}


html.eh-force-mobile body[data-portal-role] :is(#principalBottomNav,#roleBottomNav):not([hidden]) {
  display: grid !important;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1400;
  grid-template-columns: repeat(5,minmax(0,1fr));
  align-items: stretch;
  gap: 3px;
  width: 100%;
  min-height: 74px;
  padding: 7px 6px max(7px,env(safe-area-inset-bottom));
  border-top: 1px solid var(--eh-ui-control-border) !important;
  background: var(--eh-panel, #071b2f) !important;
  box-shadow: 0 -5px 18px rgba(0,0,0,.16);
}
html.eh-force-mobile body[data-portal-role] :is(#principalBottomNav,#roleBottomNav) > button {
  appearance: none;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 55px;
  margin: 0;
  padding: 4px 1px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--eh-muted, #a6bbcf);
  font-family: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}
html.eh-force-mobile body[data-portal-role] :is(#principalBottomNav,#roleBottomNav) > button > i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 28px;
  flex: 0 0 auto;
  color: var(--eh-nav-accent, var(--eh-ui-selected-text));
  font-size: 22px;
  font-style: normal;
  line-height: 1;
}
html.eh-force-mobile body[data-portal-role] :is(#principalBottomNav,#roleBottomNav) > button > i > svg { width: 22px; height: 22px; }
html.eh-force-mobile body[data-portal-role] :is(#principalBottomNav,#roleBottomNav) > button > span {
  display: block;
  width: 100%;
  min-width: 0;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
}
html.eh-force-mobile body[data-portal-role] :is(#principalBottomNav,#roleBottomNav) > button.active {
  background: var(--eh-ui-selected-bg);
  color: var(--eh-ui-control-text);
}
html.eh-force-mobile body[data-portal-role]:not([data-portal-role="STUDENT"]):not([data-portal-role="ACADEMIC_COORDINATOR"]):has(#principalBottomNav:not([hidden]),#roleBottomNav:not([hidden])) #content { padding-bottom: calc(100px + env(safe-area-inset-bottom)) !important; }

:where(body[data-portal-role]) :is(#principalBottomNav,#roleBottomNav) > button:nth-child(1) { --eh-nav-accent: #ffcf4d; }
:where(body[data-portal-role]) :is(#principalBottomNav,#roleBottomNav) > button:nth-child(2) { --eh-nav-accent: #54e7ff; }
:where(body[data-portal-role]) :is(#principalBottomNav,#roleBottomNav) > button:nth-child(3) { --eh-nav-accent: #ff9b62; }
:where(body[data-portal-role]) :is(#principalBottomNav,#roleBottomNav) > button:nth-child(4) { --eh-nav-accent: #b99cff; }
:where(body[data-portal-role]) :is(#principalBottomNav,#roleBottomNav) > button:nth-child(5) { --eh-nav-accent: #55efc5; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-hub-color-1 { --eh-hub-accent: #60c8ff; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-hub-color-2 { --eh-hub-accent: #55efc5; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-hub-color-3 { --eh-hub-accent: #ffcf4d; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-hub-color-4 { --eh-hub-accent: #b99cff; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-hub-color-5 { --eh-hub-accent: #ff9b62; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-hub-color-6 { --eh-hub-accent: #54e7ff; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-hub-color-7 { --eh-hub-accent: #fba0c7; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-hub-color-8 { --eh-hub-accent: #a9d875; }
:where(body[data-portal-role][data-desktop-theme="light"]) :is(#principalBottomNav,#roleBottomNav) > button:nth-child(1) { --eh-nav-accent: #966300; }
:where(body[data-portal-role][data-desktop-theme="light"]) :is(#principalBottomNav,#roleBottomNav) > button:nth-child(2) { --eh-nav-accent: #006c88; }
:where(body[data-portal-role][data-desktop-theme="light"]) :is(#principalBottomNav,#roleBottomNav) > button:nth-child(3) { --eh-nav-accent: #b25317; }
:where(body[data-portal-role][data-desktop-theme="light"]) :is(#principalBottomNav,#roleBottomNav) > button:nth-child(4) { --eh-nav-accent: #7050b0; }
:where(body[data-portal-role][data-desktop-theme="light"]) :is(#principalBottomNav,#roleBottomNav) > button:nth-child(5) { --eh-nav-accent: #05765b; }
:where(body[data-portal-role="PRINCIPAL"][data-desktop-theme="light"]) .principal-hub-item { --eh-hub-accent: #096ca5; }

@media (max-width:1024px) {
  :where(body[data-portal-role="ACADEMIC_COORDINATOR"]) .coordinator-mobile-hub { grid-template-columns: repeat(3,minmax(0,1fr)); }
  :where(body[data-portal-role="ACADEMIC_COORDINATOR"]) .coordinator-mobile-hub-card { flex-direction: column; align-items: center; justify-content: center; text-align: center; }
}
html.eh-force-mobile body[data-portal-role="ACADEMIC_COORDINATOR"] .coordinator-mobile-hub { grid-template-columns: repeat(3,minmax(0,1fr)); }
html.eh-force-mobile body[data-portal-role="ACADEMIC_COORDINATOR"] .coordinator-mobile-hub-card { flex-direction: column; align-items: center; justify-content: center; text-align: center; }
@media (max-width:359px) {
  :where(body[data-portal-role]) :is(#principalBottomNav,#roleBottomNav) > button > span { font-size: 10px; }
  html.eh-force-mobile body[data-portal-role] :is(#principalBottomNav,#roleBottomNav) > button > span { font-size: 10px; }
}
@media (max-width:700px) {
  :where(body[data-portal-role]) .r160-execution-summary-tabs { grid-template-columns: minmax(0,1fr); gap: 10px; }
  :where(body[data-portal-role]) .exam-v3-coordinator-summary-toggle { padding: 11px 12px; min-height: 52px; }
  :where(body[data-portal-role]) .role-report-grid { grid-template-columns: minmax(0,1fr); }
}

/* Clear keyboard focus without changing click targets or enabled states. */
:where(body[data-portal-role]) :is(.row-action,.principal-icon-action,.staff-square-action,.test-type-chip,.exam-v3-test-type-button,.exam-v3-test-chip,.exam-v3-coordinator-summary-toggle,.exam-v3-coordinator-type-toggle,.principal-hub-item,.coordinator-mobile-hub-card,.role-report-card,.principal-teacher-subject):focus-visible,
:where(body[data-portal-role]) :is(#principalBottomNav,#roleBottomNav) > button:focus-visible {
  outline: 2px solid var(--eh-ui-focus);
  outline-offset: 2px;
}
/* Respect hidden navigation even when the existing force-mobile rules use !important. */
body[data-portal-role] :is(#principalBottomNav,#roleBottomNav)[hidden] { display: none !important; }
/* Never override disabled, collapsed, permission or print states. */
@media print {
  :where(body[data-portal-role]) :is(#principalBottomNav,#roleBottomNav):not([hidden]) { display: none !important; }
  html.eh-force-mobile body[data-portal-role] :is(#principalBottomNav,#roleBottomNav):not([hidden]) { display: none !important; }
}
/* END EDUHUNT UI RESTORE R396 */

/* ========================================================================
   EDUHUNT UI RESTORE R397 | 2026-10-02
   Cumulative with R396. Missing presentation for the EXISTING result tabs,
   summaries and execution rows. No new controls, handlers or data operations.
   The complete R396 stylesheet above is retained byte-for-byte.
   Colours/shape follow the surviving Principal result selectors/core controls.
   ======================================================================== */

/* Result report navigation: the source intentionally contains two label lines. */
:where(body[data-portal-role="PRINCIPAL"]) .principal-result-report { min-width:0; max-width:100%; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-result-nav {
  display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); gap:8px;
  width:100%; margin:14px 0 18px; padding:0; align-items:stretch;
}
:where(body[data-portal-role="PRINCIPAL"]) .principal-result-nav > button {
  appearance:none; display:flex; align-items:center; justify-content:center;
  min-width:0; min-height:56px; height:auto; margin:0; padding:9px 6px;
  border:1px solid var(--eh-ui-control-border); border-radius:10px;
  background:var(--eh-ui-control-bg); color:var(--eh-ui-control-text);
  font-family:inherit; font-size:12px; font-weight:800; line-height:1.3;
  text-align:center; white-space:normal; cursor:pointer;
}
:where(body[data-portal-role="PRINCIPAL"]) .principal-result-tab-label { display:grid; gap:2px; min-width:0; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-result-tab-label > span { display:block; overflow-wrap:normal; word-break:normal; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-result-nav > button:hover:not(:disabled) { background:var(--eh-ui-hover); border-color:var(--eh-ui-selected-border); }
:where(body[data-portal-role="PRINCIPAL"]) .principal-result-nav > button.active:not(:disabled) {
  background:linear-gradient(120deg,#0873be,#14a9b8); border-color:#45c8ef; color:#fff;
  box-shadow:0 3px 10px rgba(6,101,165,.16);
}
:where(body[data-portal-role="PRINCIPAL"]) .principal-result-nav > button:is(:disabled,[aria-disabled="true"]) {
  background:var(--eh-panel); color:var(--eh-muted); border-color:var(--eh-ui-control-border);
  opacity:.62; cursor:not-allowed; box-shadow:none;
}
:where(body[data-portal-role="PRINCIPAL"]) .principal-result-class-action-strip { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-result-class-action-strip > .principal-result-class-grid { flex:1 1 360px; width:auto; min-width:0; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-result-class-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex:0 1 auto; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-result-class-actions > button { min-height:44px; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-approve-short { display:none; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-approve-long { display:inline; }

/* Display existing totals as separate cards, never concatenated label/value text. */
:where(body[data-portal-role="PRINCIPAL"]) :is(.principal-result-summary,.principal-analysis-summary) {
  display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; width:100%; margin:0 0 18px;
}
:where(body[data-portal-role="PRINCIPAL"]) :is(.principal-result-summary,.principal-analysis-summary) > div {
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px;
  min-width:0; min-height:96px; padding:14px 9px; text-align:center;
  border:1px solid var(--eh-ui-control-border); border-radius:12px;
  background:var(--eh-panel); color:var(--eh-ui-control-text);
}
:where(body[data-portal-role="PRINCIPAL"]) :is(.principal-result-summary,.principal-analysis-summary) > div > span {
  display:block; max-width:100%; color:var(--eh-muted); font-size:13px; font-weight:600; line-height:1.35;
}
:where(body[data-portal-role="PRINCIPAL"]) :is(.principal-result-summary,.principal-analysis-summary) > div > b {
  display:block; max-width:100%; color:var(--eh-ui-selected-text); font-size:26px;
  font-weight:800; line-height:1.1; font-variant-numeric:tabular-nums; overflow-wrap:anywhere;
}
:where(body[data-portal-role="PRINCIPAL"]) .principal-analysis-card { margin:0 0 14px; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-analysis-card > h3 { margin:0 0 13px; font-size:17px; line-height:1.35; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-analysis-insights { margin:0; padding-left:21px; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-analysis-insights > li + li { margin-top:7px; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-analysis-bars { display:grid; gap:13px; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-analysis-bars > div { display:grid; grid-template-columns:minmax(60px,100px) minmax(0,1fr) 70px; gap:10px; align-items:center; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-analysis-bars > div > b { text-align:right; font-variant-numeric:tabular-nums; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-analysis-track { height:13px; overflow:hidden; border-radius:20px; background:var(--eh-panel2); }
:where(body[data-portal-role="PRINCIPAL"]) .principal-analysis-track > i { display:block; height:100%; max-width:100%; border-radius:inherit; background:linear-gradient(120deg,#0873be,#14a9b8); }
:where(body[data-portal-role="PRINCIPAL"]) .principal-performance-groups { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-performance-groups > div { display:grid; gap:8px; min-width:0; padding:14px 10px; text-align:center; background:var(--eh-panel2); border:1px solid var(--eh-border); border-radius:10px; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-performance-groups > div > b { display:block; font-size:24px; line-height:1.2; }
:where(body[data-portal-role="PRINCIPAL"]) :is(.principal-result-compact-table,.principal-mobile-horizontal-table,.principal-marks-table,.principal-analysis-table) { min-width:0; max-width:100%; overflow-x:auto; overscroll-behavior-inline:contain; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-result-student-name { overflow-wrap:break-word; }

/* Principal execution table: 9 FT/CT/GT columns, 7 CDF columns, 5 fallback.
   Grid counts correspond exactly to the existing renderer. No date or status
   is generated here. Open/closed state comes only from the existing JS classes. */
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-shell { min-width:0; width:100%; }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-type-tabs { display:grid; grid-template-columns:repeat(var(--principal-exam-type-count,4),minmax(0,1fr)); gap:9px; margin:0 0 14px; }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-type-tab { min-height:46px; }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-type-tab > small { padding:2px 7px; border-radius:20px; background:var(--eh-panel); color:inherit; font-size:11px; }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-type-stack { min-width:0; }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-type { min-width:0; border:1px solid var(--eh-ui-control-border); border-radius:12px; background:var(--eh-panel); overflow:hidden; }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-type-heading { width:100%; min-height:52px; border:0; border-radius:0; background:#0b4b77; color:#fff; }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-type-heading > span { flex:1 1 auto; min-width:0; font-size:18px; font-weight:800; }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-type-heading > small { flex:0 0 auto; font-size:11px; }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-type-collapse { display:grid; place-items:center; flex:0 0 28px; height:28px; border:1px solid #68a8cc; border-radius:7px; font-size:18px; }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-table-scroll { max-width:100%; overflow-x:auto; overscroll-behavior-inline:contain; }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-table { width:100%; min-width:540px; }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-table.is-extended { min-width:830px; }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-table.is-cdf { min-width:740px; }
:where(body[data-portal-role="PRINCIPAL"]) :is(.exam-v3-principal-table-head,.exam-v3-principal-table-row) { display:grid; grid-template-columns:minmax(76px,.9fr) repeat(4,minmax(88px,1fr)); align-items:stretch; gap:1px; background:var(--eh-border); }
:where(body[data-portal-role="PRINCIPAL"]) :is(.exam-v3-principal-table-head,.exam-v3-principal-table-row).is-extended { grid-template-columns:minmax(76px,.9fr) repeat(8,minmax(88px,1fr)); }
:where(body[data-portal-role="PRINCIPAL"]) :is(.exam-v3-principal-table-head,.exam-v3-principal-table-row).is-cdf { grid-template-columns:minmax(86px,1fr) minmax(76px,.9fr) repeat(5,minmax(88px,1fr)); }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-table-head > span { display:flex; align-items:center; justify-content:center; min-width:0; min-height:40px; padding:9px 4px; background:var(--eh-panel2); color:var(--eh-ui-control-text); font-size:11px; font-weight:800; text-align:center; line-height:1.25; }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-table-row { border-top:1px solid var(--eh-border); }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-identity { display:flex; align-items:center; justify-content:center; min-width:0; padding:10px 5px; background:var(--eh-panel); color:var(--eh-ui-control-text); font-size:13px; font-weight:800; text-align:center; }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-cdf-mobile-head { display:none; }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-test-accordion { margin:0; }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-test-accordion + .exam-v3-principal-test-accordion { border-top:1px solid var(--eh-border); }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-test-toggle { border:0; border-radius:0; min-height:40px; }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-test-toggle > small { font-size:10px; color:inherit; opacity:.8; }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-test-accordion:not(.is-open) > .exam-v3-principal-test-panel { display:none; }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-cdf-class-stack { padding:10px; }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-cdf-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-bottom:10px; }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-cdf-class-toggle { flex-direction:column; justify-content:center; gap:4px; text-align:center; }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-cdf-class-toggle > span:first-child { flex:0 0 auto; }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-cdf-class-toggle.is-active { background:var(--eh-ui-selected-bg); color:var(--eh-ui-selected-text); border-color:var(--eh-ui-selected-border); }
:where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-empty { margin:0; padding:20px 14px; color:var(--eh-muted); text-align:center; }

/* Existing stage tones, scoped to execution cells only. */
:where(body[data-portal-role]) { --eh-stage-complete-bg:#0e513d; --eh-stage-complete-text:#fff; --eh-stage-complete-border:#268967; --eh-stage-wait-bg:#443415; --eh-stage-wait-text:#ffe4a0; --eh-stage-wait-border:#987832; }
:where(body[data-portal-role][data-desktop-theme="light"]) { --eh-stage-complete-bg:#116044; --eh-stage-complete-text:#fff; --eh-stage-complete-border:#2b8b65; --eh-stage-wait-bg:#fff4d5; --eh-stage-wait-text:#755000; --eh-stage-wait-border:#d7b869; }
:where(body[data-portal-role]) :is(.exam-v3-principal-cell,.exam-v3-coordinator-cell) {
  appearance:none; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:4px; min-width:0; min-height:58px; width:100%; height:auto; margin:0; padding:9px 5px;
  border:0; border-radius:0; background:var(--eh-panel); color:var(--eh-muted);
  font-family:inherit; line-height:1.3; text-align:center; box-shadow:none;
}
:where(body[data-portal-role]) :is(.exam-v3-principal-cell,.exam-v3-coordinator-cell) > b { display:block; max-width:100%; font-size:13px; font-weight:800; line-height:1.3; overflow-wrap:break-word; }
:where(body[data-portal-role]) .exam-v3-coordinator-cell > small { display:block; max-width:100%; font-size:9px; line-height:1.35; overflow-wrap:break-word; }
:where(body[data-portal-role]) :is(.exam-v3-principal-cell,.exam-v3-coordinator-cell).is-complete { background:var(--eh-stage-complete-bg); color:var(--eh-stage-complete-text); border-color:var(--eh-stage-complete-border); }
:where(body[data-portal-role]) :is(.exam-v3-principal-cell,.exam-v3-coordinator-cell).is-date { background:var(--eh-ui-selected-bg); color:var(--eh-ui-selected-text); border-color:var(--eh-ui-selected-border); }
:where(body[data-portal-role]) :is(.exam-v3-principal-cell,.exam-v3-coordinator-cell).is-pending { background:var(--eh-ui-red-bg); color:var(--eh-ui-red-text); border-color:var(--eh-ui-red-border); }
:where(body[data-portal-role]) :is(.exam-v3-principal-cell,.exam-v3-coordinator-cell).is-waiting { background:var(--eh-stage-wait-bg); color:var(--eh-stage-wait-text); border-color:var(--eh-stage-wait-border); }
:where(body[data-portal-role]) :is(.exam-v3-principal-cell,.exam-v3-coordinator-cell).is-actionable { border-style:solid; border-width:1px; border-radius:6px; cursor:pointer; }
:where(body[data-portal-role]) :is(.exam-v3-principal-cell,.exam-v3-coordinator-cell).is-actionable:hover:not(:disabled) { filter:brightness(1.12); }

/* Other genuinely unstyled controls found in the same source. No global reset. */
:where(body[data-portal-role]) .dispatch-programme-chips { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0; }
:where(body[data-portal-role]) .dispatch-programme-chip { appearance:none; display:inline-flex; align-items:center; justify-content:center; min-height:38px; padding:8px 12px; border:1px solid var(--eh-ui-control-border); border-radius:9px; background:var(--eh-ui-control-bg); color:var(--eh-ui-control-text); font:inherit; font-size:13px; font-weight:800; }
:where(body[data-portal-role]) .dispatch-programme-chip.active { background:var(--eh-ui-selected-bg); color:var(--eh-ui-selected-text); border-color:var(--eh-ui-selected-border); }
:where(body[data-portal-role]) :is(.principal-strength-grid,.r27-reminder-kpis,.r27-medal-kpis) { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:10px; margin:0 0 16px; }
:where(body[data-portal-role]) :is(.principal-strength-grid > button,.r27-reminder-kpi,.r27-medal-kpi) { appearance:none; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; min-width:0; min-height:94px; padding:13px 9px; border:1px solid var(--eh-ui-control-border); border-radius:12px; background:var(--eh-panel); color:var(--eh-ui-control-text); font:inherit; text-align:center; }
:where(body[data-portal-role]) :is(.principal-strength-grid > button,.r27-reminder-kpi,.r27-medal-kpi) > b { font-size:25px; line-height:1.1; font-weight:800; font-variant-numeric:tabular-nums; }
:where(body[data-portal-role]) :is(.principal-strength-grid > button,.r27-reminder-kpi,.r27-medal-kpi) > span { font-size:13px; font-weight:700; line-height:1.3; }
:where(body[data-portal-role]) :is(.principal-strength-grid > button.active,.r27-reminder-kpi.is-active,.r27-medal-kpi.is-active) { background:var(--eh-ui-selected-bg); color:var(--eh-ui-selected-text); border-color:var(--eh-ui-selected-border); }
:where(body[data-portal-role]) .r27-medal-kpi > .r29-medal-icon { font-size:23px; line-height:1; }
:where(body[data-portal-role]) .rwa-row-kpi-button { appearance:none; display:inline-flex; align-items:center; justify-content:center; min-width:36px; min-height:32px; padding:5px 8px; border:1px solid var(--eh-ui-selected-border); border-radius:7px; background:var(--eh-ui-selected-bg); color:var(--eh-ui-selected-text); font:inherit; font-weight:800; font-variant-numeric:tabular-nums; }
:where(body[data-portal-role]) :is(.edu-video-topic,.edu-video-list-row) { appearance:none; display:flex; align-items:center; gap:11px; min-width:0; width:100%; min-height:54px; padding:12px; border:1px solid var(--eh-ui-control-border); border-radius:10px; background:var(--eh-panel); color:var(--eh-ui-control-text); font:inherit; text-align:left; }
:where(body[data-portal-role]) :is(.edu-video-topic,.edu-video-list-row) + :is(.edu-video-topic,.edu-video-list-row) { margin-top:8px; }
:where(body[data-portal-role]) :is(.edu-video-topic,.edu-video-list-row) > :is(div,span:nth-child(2)) { flex:1 1 auto; min-width:0; }
:where(body[data-portal-role]) :is(.edu-video-topic,.edu-video-list-row) strong { display:block; font-size:14px; line-height:1.35; overflow-wrap:break-word; }
:where(body[data-portal-role]) :is(.edu-video-topic,.edu-video-list-row) small { display:block; margin-top:4px; color:var(--eh-muted); font-size:12px; }
:where(body[data-portal-role]) .edu-video-topic-number { display:grid; place-items:center; flex:0 0 30px; height:30px; border-radius:8px; background:var(--eh-ui-selected-bg); color:var(--eh-ui-selected-text); font-weight:800; }
:where(body[data-portal-role]) :is(.edu-video-topic,.edu-video-list-row):is(.active,.is-active,[aria-pressed="true"]) { border-color:var(--eh-ui-selected-border); background:var(--eh-ui-selected-bg); }
:where(body[data-portal-role]) :is(.principal-result-nav > button,.exam-v3-principal-test-toggle,.exam-v3-principal-type-heading,.exam-v3-principal-cdf-class-toggle,.exam-v3-principal-cell.is-actionable,.exam-v3-coordinator-cell.is-actionable,.dispatch-programme-chip,.principal-strength-grid > button,.r27-reminder-kpi,.r27-medal-kpi,.rwa-row-kpi-button,.edu-video-topic,.edu-video-list-row):focus-visible { outline:3px solid var(--eh-ui-focus); outline-offset:-3px; }


/* Shared schoolwise execution renderer: same stored stages, preserved actions.
   CDF has 10 columns except Coordinator's existing compact 8-column variant. */
:where(body[data-portal-role]) .exam-v3-coordinator-table-wrap { width:100%; max-width:100%; overflow-x:auto; overscroll-behavior-inline:contain; }
:where(body[data-portal-role]) .exam-v3-coordinator-table { width:100%; min-width:920px; }
:where(body[data-portal-role]) .exam-v3-coordinator-table.is-cdf { min-width:1020px; }
:where(body[data-portal-role]) .exam-v3-coordinator-table.is-cdf-compact { min-width:820px; }
:where(body[data-portal-role]) :is(.exam-v3-coordinator-table-head,.exam-v3-coordinator-table-row) { display:grid; grid-template-columns:minmax(80px,.9fr) repeat(8,minmax(90px,1fr)); align-items:stretch; gap:1px; background:var(--eh-border); }
:where(body[data-portal-role]) :is(.exam-v3-coordinator-table-head,.exam-v3-coordinator-table-row).is-cdf { grid-template-columns:minmax(90px,1fr) minmax(80px,.9fr) repeat(8,minmax(90px,1fr)); }
:where(body[data-portal-role]) :is(.exam-v3-coordinator-table-head,.exam-v3-coordinator-table-row).is-cdf-compact { grid-template-columns:minmax(90px,1fr) minmax(80px,.9fr) repeat(6,minmax(90px,1fr)); }
:where(body[data-portal-role]) .exam-v3-coordinator-table-head > span { display:flex; align-items:center; justify-content:center; min-width:0; min-height:44px; padding:9px 4px; text-align:center; background:var(--eh-panel2); color:var(--eh-ui-control-text); font-size:11px; font-weight:800; line-height:1.3; }
:where(body[data-portal-role]) .exam-v3-coordinator-table-row { border-top:1px solid var(--eh-border); }
:where(body[data-portal-role]) .exam-v3-coordinator-identity { display:flex; align-items:center; justify-content:center; min-width:0; padding:9px 6px; text-align:center; background:var(--eh-panel); color:var(--eh-ui-control-text); font-size:13px; font-weight:800; }
:where(body[data-portal-role]) .exam-v3-coordinator-cell.eh-r242-paper-date-cell { flex-wrap:wrap; flex-direction:row; align-items:center; justify-content:center; gap:5px; }
:where(body[data-portal-role]) :is(.exam-v3-mobile-ft-list,.exam-v3-mobile-cdf-list,.exam-v3-coordinator-cdf-stack) { display:grid; gap:9px; }
:where(body[data-portal-role]) :is(.exam-v3-mobile-ft-item,.exam-v3-mobile-cdf-item,.exam-v3-coordinator-cdf) { min-width:0; }
:where(body[data-portal-role]) .exam-v3-mobile-cdf-toggle > span > small { display:block; margin-top:3px; font-size:11px; }
:where(body[data-portal-role]) .exam-v3-coordinator-empty { display:grid; gap:6px; padding:20px 14px; color:var(--eh-muted); text-align:center; }

/* The existing OMR guide uses two buttons and two state-driven panels. */
:where(body[data-portal-role="PRINCIPAL"]) .principal-omr-guide-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; margin:14px 0; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-omr-guide-tabs > button { appearance:none; display:grid; place-items:center; gap:4px; min-height:56px; min-width:0; padding:9px; border:1px solid var(--eh-ui-control-border); border-radius:10px; background:var(--eh-ui-control-bg); color:var(--eh-ui-control-text); font:inherit; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-omr-guide-tabs > button.is-active { background:var(--eh-ui-selected-bg); border-color:var(--eh-ui-selected-border); color:var(--eh-ui-selected-text); }
:where(body[data-portal-role="PRINCIPAL"]) .principal-omr-guide-tabs > button > span { font-size:12px; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-omr-guide-panel:not(.is-active) { display:none; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-guide-grid > .principal-omr-guide-panel { grid-column:1/-1; }
:where(body[data-portal-role="PRINCIPAL"]) .principal-omr-guide-tabs > button:focus-visible { outline:3px solid var(--eh-ui-focus); outline-offset:-3px; }

@media(max-width:900px) {
  :where(body[data-portal-role="ACADEMIC_COORDINATOR"]) :is(.exam-v3-mobile-ft-body,.exam-v3-mobile-cdf-body) > .exam-v3-coordinator-table-row { grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; padding:9px; background:var(--eh-panel); }
  :where(body[data-portal-role="ACADEMIC_COORDINATOR"]) :is(.exam-v3-mobile-ft-body,.exam-v3-mobile-cdf-body) .exam-v3-coordinator-identity { grid-column:1/-1; justify-content:flex-start; padding:4px; }
  :where(body[data-portal-role="ACADEMIC_COORDINATOR"]) :is(.exam-v3-mobile-ft-body,.exam-v3-mobile-cdf-body) .exam-v3-coordinator-cell { min-height:72px; border-radius:8px; }
}

@media(max-width:1200px) {
  :where(body[data-portal-role="PRINCIPAL"]) .principal-result-nav { grid-template-columns:repeat(4,minmax(0,1fr)); }
  :where(body[data-portal-role="PRINCIPAL"]) :is(.principal-result-summary,.principal-analysis-summary) { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:900px) {
  :where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-table { min-width:0; }
  :where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-table:is(.is-extended,.is-cdf) { min-width:0; }
  :where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-table-head { display:none; }
  :where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-table-row,
  :where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-table-row:is(.is-extended,.is-cdf) { grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; padding:10px; background:var(--eh-panel); }
  :where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-table-row > .exam-v3-principal-identity { grid-column:1/-1; justify-content:flex-start; padding:3px 0 5px; font-size:15px; }
  :where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-table-row > .exam-v3-principal-cell { min-height:74px; padding:9px 7px; border-radius:8px; }
  :where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-table-row > .exam-v3-principal-cell > b { font-size:15px; }
  :where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-cell[data-mobile-label]::before { content:attr(data-mobile-label); display:block; max-width:100%; font-size:11px; font-weight:600; line-height:1.35; }
  :where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-cdf-mobile-head { display:grid; grid-column:1/-1; grid-template-columns:1fr 1fr 1fr; gap:4px; align-items:center; text-align:center; background:var(--eh-panel2); border-radius:8px; }
  :where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-table-row.is-cdf > .exam-v3-principal-identity { display:none; }
  :where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-table-row.is-cdf > .exam-v3-principal-cell::before { display:block; font-size:11px; font-weight:600; line-height:1.35; }
  :where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-table-row.is-cdf > .exam-v3-principal-cell:nth-child(4)::before { content:"DISPATCH"; }
  :where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-table-row.is-cdf > .exam-v3-principal-cell:nth-child(5)::before { content:"SCHOOL RECEIVED"; }
  :where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-table-row.is-cdf > .exam-v3-principal-cell:nth-child(6)::before { content:"TEST DATE"; }
  :where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-table-row.is-cdf > .exam-v3-principal-cell:nth-child(7)::before { content:"TEST CONDUCTED"; }
  :where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-table-row.is-cdf > .exam-v3-principal-cell:nth-child(8)::before { content:"RESULT UPLOADED"; }
  :where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-table-row.is-cdf > .exam-v3-principal-cell:last-child { grid-column:1/-1; }
  :where(body[data-portal-role="PRINCIPAL"]) .principal-result-nav > button { font-size:13px; }
}
@media(min-width:601px) and (max-width:900px) {
  :where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-table-row.is-extended { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media(max-width:540px) {
  :where(body[data-portal-role="PRINCIPAL"]) .principal-result-nav { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  :where(body[data-portal-role="PRINCIPAL"]) .principal-result-nav > button { font-size:13pt; min-height:64px; }
  :where(body[data-portal-role="PRINCIPAL"]) :is(.principal-result-summary,.principal-analysis-summary,.principal-performance-groups) { grid-template-columns:repeat(2,minmax(0,1fr)); }
  :where(body[data-portal-role="PRINCIPAL"]) .principal-result-class-actions { flex:1 1 100%; }
  :where(body[data-portal-role="PRINCIPAL"]) .principal-result-class-actions > button { min-width:110px; }
  :where(body[data-portal-role="PRINCIPAL"]) .principal-approve-long { display:none; }
  :where(body[data-portal-role="PRINCIPAL"]) .principal-approve-short { display:inline; }
  :where(body[data-portal-role="PRINCIPAL"]) .exam-v3-principal-cdf-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); }
  :where(body[data-portal-role="PRINCIPAL"]) .principal-analysis-bars > div { grid-template-columns:64px minmax(0,1fr) 58px; gap:7px; font-size:12px; }
  :where(body[data-portal-role]) :is(.principal-strength-grid,.r27-reminder-kpis,.r27-medal-kpis) { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
}

@media print {
  :where(body[data-portal-role="PRINCIPAL"]) :is(.principal-result-nav,.principal-result-class-actions,.exam-v3-principal-type-tabs) { display:none!important; }
  :where(body[data-portal-role="PRINCIPAL"]) :is(.principal-result-summary,.principal-analysis-summary) { grid-template-columns:repeat(3,minmax(0,1fr)); }
  :where(body[data-portal-role="PRINCIPAL"]) :is(.principal-result-summary,.principal-analysis-summary,.principal-performance-groups) > div { background:#fff!important; color:#111!important; border-color:#777!important; box-shadow:none!important; break-inside:avoid; }
  :where(body[data-portal-role="PRINCIPAL"]) :is(.principal-result-summary,.principal-analysis-summary) > div > :is(span,b) { color:#111!important; }
}
/* END EDUHUNT R397 PRESENTATION RESTORATION */

/* Keep surviving test/class/version selector colours consistent with the
   selected theme, including when an old external theme file is absent. */
body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] :is(.principal-result-test-chip,.principal-result-class-chip,.principal-result-version-chip):not(.active) { background:#0a263f; color:#f3f9ff; border-color:#355b77; }
body[data-portal-role="PRINCIPAL"][data-desktop-theme="dark"] :is(.principal-result-test-chip,.principal-result-class-chip,.principal-result-version-chip):not(.active):hover { background:#0d3150; border-color:#62b7e5; }
body[data-portal-role="PRINCIPAL"][data-desktop-theme="light"] :is(.principal-result-test-chip,.principal-result-class-chip,.principal-result-version-chip):not(.active) { background:#f7fbff; color:#123d66; border-color:#a9c2d8; }
body[data-portal-role="PRINCIPAL"][data-desktop-theme="light"] :is(.principal-result-test-chip,.principal-result-class-chip,.principal-result-version-chip):not(.active):hover { background:#ecf8ff; border-color:#0b87d1; }
@media(max-width:900px) {
  /* R104's inline nowrap override otherwise lets long subjects cover a date. */
  body[data-portal-role="PRINCIPAL"] #content .exam-v3-principal-cdf-mobile-head > * { min-width:0; white-space:normal!important; overflow-wrap:anywhere!important; word-break:normal!important; }
}

/* ========================================================================
   EDUHUNT R398 — Principal UI restoration follow-up
   Only presentation + scoped reporting filters. No data/permission logic changed.
   ======================================================================== */

/* Principal sidebar main buttons: larger and dark yellow for clear grouping. */
body[data-portal-role="PRINCIPAL"] #sidebarNav .principal-nav-direct,
body[data-portal-role="PRINCIPAL"] #sidebarNav .principal-nav-toggle{
  min-height: 44px !important;
}
body[data-portal-role="PRINCIPAL"] #sidebarNav .principal-nav-direct > span,
body[data-portal-role="PRINCIPAL"] #sidebarNav .principal-nav-toggle > span{
  font-size: 17px !important;
  font-weight: 800 !important;
  color: #c99a15 !important;
}
body[data-portal-role="PRINCIPAL"] #sidebarNav .principal-nav-direct > svg,
body[data-portal-role="PRINCIPAL"] #sidebarNav .principal-nav-toggle > svg,
body[data-portal-role="PRINCIPAL"] #sidebarNav .principal-nav-chevron{
  color: #c99a15 !important;
}
body[data-portal-role="PRINCIPAL"] #sidebarNav .principal-nav-child > span{
  font-size: 14px !important;
}
body[data-portal-role="PRINCIPAL"] #sidebarNav [data-module="announcements"]{
  display: none !important;
}

/* Dispatch history filters: short, clear, one row on desktop. */
.exam-v3-dispatch-filter-card .form-grid--4{
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
}
.exam-v3-dispatch-filter-card .row-actions{justify-content:flex-start}
@media (max-width: 980px){
  .exam-v3-dispatch-filter-card .form-grid--4{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
}
@media (max-width: 620px){
  .exam-v3-dispatch-filter-card .form-grid--4{grid-template-columns:1fr !important}
}

/* Online test participation follow-up cleanup. */
.otr344-principal-filters{
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-items: end !important;
}
.otr344-principal-filters .otr82-actions{
  grid-column: auto !important;
  align-self: end !important;
}
.otr82-class-block{display:grid;gap:0;margin-top:14px}
.otr82-class-heading{
  padding:12px 14px;
  border:1px solid #d8e3ee;
  border-bottom:0;
  border-radius:14px 14px 0 0;
  background:#0e3658;
  color:#fff;
  font-size:18px;
  font-weight:900;
  letter-spacing:.02em;
}
.otr82-class-block .otr82-table-wrap{
  border:1px solid #d8e3ee;
  border-top:0;
  border-radius:0 0 14px 14px;
  overflow:auto;
}
body[data-desktop-theme="dark"] .otr82-class-heading{
  background:#0d2e4b;
  color:#f4fbff;
  border-color:#335771;
}
body[data-desktop-theme="dark"] .otr82-class-block .otr82-table-wrap{
  border-color:#335771;
}
@media (max-width: 1100px){
  .otr344-principal-filters{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
  .otr344-principal-filters .otr82-actions{grid-column:1 / -1 !important}
}
@media (max-width: 650px){
  .otr344-principal-filters{grid-template-columns:1fr !important}
}

/* ========================================================================
   EDUHUNT R399 — Principal sidebar submenu alignment only
   Requested: child/sub-buttons begin slightly to the right of main buttons.
   No navigation route, click handler, permission, data or module logic changed.
   ======================================================================== */
body[data-portal-role="PRINCIPAL"] #sidebarNav .principal-nav-submenu{
  margin-left: 24px !important;
  margin-right: 0 !important;
  width: calc(100% - 24px) !important;
  padding-left: 0 !important;
  box-sizing: border-box !important;
}
body[data-portal-role="PRINCIPAL"] #sidebarNav .principal-nav-submenu .principal-nav-child{
  width: 100% !important;
  margin-left: 0 !important;
  padding-left: 9px !important;
  box-sizing: border-box !important;
}
/* Keep the same inset on compact desktop/tablet sidebars without squeezing text. */
@media (max-width: 1180px){
  body[data-portal-role="PRINCIPAL"] #sidebarNav .principal-nav-submenu{
    margin-left: 22px !important;
    width: calc(100% - 22px) !important;
  }
}

/* ========================================================================
   EDUHUNT R400 — Principal sidebar typography follow-up
   Main buttons only: white, bold, +2px. R399 submenu inset is preserved.
   ======================================================================== */
body[data-portal-role="PRINCIPAL"] #sidebarNav .principal-nav-direct > span,
body[data-portal-role="PRINCIPAL"] #sidebarNav .principal-nav-toggle > span{
  font-size:19px!important;
  font-weight:900!important;
  color:#ffffff!important;
}
body[data-portal-role="PRINCIPAL"] #sidebarNav .principal-nav-direct > svg,
body[data-portal-role="PRINCIPAL"] #sidebarNav .principal-nav-toggle > svg,
body[data-portal-role="PRINCIPAL"] #sidebarNav .principal-nav-chevron{
  color:#ffffff!important;
}

/* ========================================================================
   EDUHUNT R401 — Principal Student History + OLT mobile/tablet refinement
   ======================================================================== */

/* Principal main navigation: keep white/bold and increase another 2px. */
body[data-portal-role="PRINCIPAL"] #sidebarNav .principal-nav-direct > span,
body[data-portal-role="PRINCIPAL"] #sidebarNav .principal-nav-toggle > span{
  font-size:21px!important;
  font-weight:900!important;
  color:#fff!important;
}

/* Principal OLT KPI cards: centered, compact and five-up on desktop. */
body[data-portal-role="PRINCIPAL"] .otr82-kpis{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
}
body[data-portal-role="PRINCIPAL"] .otr82-kpi{
  text-align:center!important;
  display:grid!important;
  place-items:center!important;
  align-content:center!important;
}
body[data-portal-role="PRINCIPAL"] .otr82-kpi b,
body[data-portal-role="PRINCIPAL"] .otr82-kpi span{
  width:100%!important;
  text-align:center!important;
}
body[data-portal-role="PRINCIPAL"] .otr82-tabs button{
  text-align:center!important;
  justify-content:center!important;
}

/* Principal OLT filters are auto-applied. Four controls share one clean row. */
body[data-portal-role="PRINCIPAL"] .otr344-principal-filters{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  align-items:end!important;
}

/* Principal Student Activity table: all columns stay visible, numeric columns centered. */
body[data-portal-role="PRINCIPAL"] .otr82-principal-table-wrap{
  width:100%!important;
  max-width:100%!important;
  overflow-x:hidden!important;
}
body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table{
  width:100%!important;
  min-width:0!important;
  table-layout:fixed!important;
}
body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table th,
body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table td{
  min-width:0!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
}
body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table th.num,
body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table td.num{
  text-align:center!important;
}
body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table th:nth-child(1),
body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table td:nth-child(1){width:30%!important}
body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table th:nth-child(2),
body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table td:nth-child(2),
body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table th:nth-child(3),
body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table td:nth-child(3){width:12%!important}
body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table th:nth-child(4),
body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table td:nth-child(4),
body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table th:nth-child(5),
body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table td:nth-child(5),
body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table th:nth-child(6),
body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table td:nth-child(6){width:10%!important}
body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table th:nth-child(7),
body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table td:nth-child(7){width:16%!important;text-align:center!important}

@media(max-width:1000px){
  body[data-portal-role="PRINCIPAL"] .otr82-kpis{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body[data-portal-role="PRINCIPAL"] .otr344-principal-filters{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table th{font-size:9px!important;padding:7px 3px!important;line-height:1.15!important}
  body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table td{font-size:10.5px!important;padding:7px 3px!important;line-height:1.2!important}
  body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table .otr82-student strong{font-size:11px!important}
  body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table .otr82-student small{font-size:8px!important}
}
@media(max-width:650px){
  body[data-portal-role="PRINCIPAL"] .otr82-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body[data-portal-role="PRINCIPAL"] .otr344-principal-filters{grid-template-columns:1fr!important}
  body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table th{font-size:7px!important;padding:5px 1px!important;letter-spacing:0!important;line-height:1.08!important}
  body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table td{font-size:8px!important;padding:6px 1px!important;line-height:1.12!important;text-align:center!important}
  body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table td:first-child,
  body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table th:first-child{text-align:left!important}
  body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table .otr82-student strong{font-size:9px!important;line-height:1.1!important}
  body[data-portal-role="PRINCIPAL"] .otr82-principal-student-table .otr82-student small{font-size:7px!important;line-height:1.1!important}
  body[data-portal-role="PRINCIPAL"] .otr82-class-heading{font-size:16px!important;padding:9px 10px!important}
}

/* ========================================================================
   EDUHUNT R402 — Online Test alignment / participation filter / video spacing
   Presentation only. No write, permission, result or examination logic changed.
   ======================================================================== */

/* Principal / Teacher Online Tests: keep View & Start on the same horizontal
   row as the test information on desktop. */
body:is([data-portal-role="PRINCIPAL"],[data-portal-role="TEACHER"]) .eh-oltstaff-card{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) max-content!important;
  grid-template-areas:
    "head foot"
    "context foot"!important;
  align-items:center!important;
  column-gap:18px!important;
  row-gap:4px!important;
}
body:is([data-portal-role="PRINCIPAL"],[data-portal-role="TEACHER"]) .eh-oltstaff-card-head{
  grid-area:head!important;
  min-width:0!important;
}
body:is([data-portal-role="PRINCIPAL"],[data-portal-role="TEACHER"]) .eh-oltstaff-context{
  grid-area:context!important;
  min-width:0!important;
  margin:0!important;
}
body:is([data-portal-role="PRINCIPAL"],[data-portal-role="TEACHER"]) .eh-oltstaff-card-foot{
  grid-area:foot!important;
  align-self:center!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  margin:0!important;
  padding:0!important;
  border-top:0!important;
}
body:is([data-portal-role="PRINCIPAL"],[data-portal-role="TEACHER"]) .eh-oltstaff-card-foot .eh-oltstaff-start{
  margin:0!important;
  white-space:nowrap!important;
}
@media(max-width:700px){
  body:is([data-portal-role="PRINCIPAL"],[data-portal-role="TEACHER"]) .eh-oltstaff-card{
    grid-template-columns:1fr!important;
    grid-template-areas:"head" "context" "foot"!important;
    row-gap:10px!important;
  }
  body:is([data-portal-role="PRINCIPAL"],[data-portal-role="TEACHER"]) .eh-oltstaff-card-foot{
    justify-content:flex-start!important;
  }
}

/* Principal Online Test Participation: five meaningful filters fit in one row
   on desktop. There is no Apply button; every control auto-filters. */
body[data-portal-role="PRINCIPAL"] .otr344-principal-filters{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  align-items:end!important;
}
body[data-portal-role="PRINCIPAL"] .otr82-kpi,
body[data-portal-role="PRINCIPAL"] .otr82-kpi b,
body[data-portal-role="PRINCIPAL"] .otr82-kpi span{
  text-align:center!important;
  justify-items:center!important;
  justify-content:center!important;
}
@media(max-width:1100px){
  body[data-portal-role="PRINCIPAL"] .otr344-principal-filters{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:650px){
  body[data-portal-role="PRINCIPAL"] .otr344-principal-filters{
    grid-template-columns:1fr!important;
  }
}

/* Keep 5 mm breathing room around embedded learning/exam videos wherever they
   appear in Principal, Teacher or Student portals. */
body:is([data-portal-role="PRINCIPAL"],[data-portal-role="TEACHER"],[data-portal-role="STUDENT"]) .principal-video{
  margin-top:5mm!important;
  margin-bottom:5mm!important;
}
body:is([data-portal-role="PRINCIPAL"],[data-portal-role="TEACHER"],[data-portal-role="STUDENT"]) .edu-video-player{
  margin-top:5mm!important;
}
body:is([data-portal-role="PRINCIPAL"],[data-portal-role="TEACHER"],[data-portal-role="STUDENT"]) .edu-video-frame{
  margin-bottom:5mm!important;
}

/* ========================================================================
   EDUHUNT R403 — Principal result tables + compact student rows
   UI-only follow-up. No result, student, exam, permission or database writes.
   ======================================================================== */

/* Result metric boxes: center the whole group and every value inside a box. */
body[data-portal-role="PRINCIPAL"] .principal-history-metrics{
  grid-template-columns:repeat(auto-fit,minmax(135px,160px))!important;
  justify-content:center!important;
  align-items:stretch!important;
}
body[data-portal-role="PRINCIPAL"] .principal-history-metrics article{
  place-items:center!important;
  align-content:center!important;
  text-align:center!important;
}
body[data-portal-role="PRINCIPAL"] .principal-history-metrics article span,
body[data-portal-role="PRINCIPAL"] .principal-history-metrics article b{
  width:100%!important;
  text-align:center!important;
}

/* Subject Performance and Question-wise Response keep the SAME table
   presentation on desktop, tablet and mobile. They do not turn into cards. */
body[data-portal-role="PRINCIPAL"] :is(.principal-history-subject-table,.principal-history-response-table) .table-card{
  width:100%!important;
  max-width:100%!important;
  overflow:hidden!important;
}
body[data-portal-role="PRINCIPAL"] :is(.principal-history-subject-table,.principal-history-response-table) .table-wrap{
  width:100%!important;
  max-width:100%!important;
  overflow-x:hidden!important;
  border-radius:0 0 10px 10px!important;
}
body[data-portal-role="PRINCIPAL"] :is(.principal-history-subject-table,.principal-history-response-table) table{
  display:table!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  table-layout:fixed!important;
  border-collapse:collapse!important;
}
body[data-portal-role="PRINCIPAL"] :is(.principal-history-subject-table,.principal-history-response-table) thead{
  display:table-header-group!important;
}
body[data-portal-role="PRINCIPAL"] :is(.principal-history-subject-table,.principal-history-response-table) tbody{
  display:table-row-group!important;
}
body[data-portal-role="PRINCIPAL"] :is(.principal-history-subject-table,.principal-history-response-table) tr{
  display:table-row!important;
}
body[data-portal-role="PRINCIPAL"] :is(.principal-history-subject-table,.principal-history-response-table) th,
body[data-portal-role="PRINCIPAL"] :is(.principal-history-subject-table,.principal-history-response-table) td{
  display:table-cell!important;
  min-width:0!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  vertical-align:middle!important;
}

/* Subject Performance proportions. */
body[data-portal-role="PRINCIPAL"] .principal-history-subject-table th:nth-child(1),
body[data-portal-role="PRINCIPAL"] .principal-history-subject-table td:nth-child(1){width:13%!important}
body[data-portal-role="PRINCIPAL"] .principal-history-subject-table th:nth-child(2),
body[data-portal-role="PRINCIPAL"] .principal-history-subject-table td:nth-child(2){width:25%!important}
body[data-portal-role="PRINCIPAL"] .principal-history-subject-table th:nth-child(3),
body[data-portal-role="PRINCIPAL"] .principal-history-subject-table td:nth-child(3){width:12%!important}
body[data-portal-role="PRINCIPAL"] .principal-history-subject-table th:nth-child(n+4),
body[data-portal-role="PRINCIPAL"] .principal-history-subject-table td:nth-child(n+4){text-align:center!important}

/* Question-wise table proportions. Compact Result column uses symbols. */
body[data-portal-role="PRINCIPAL"] .principal-history-response-table th:nth-child(1),
body[data-portal-role="PRINCIPAL"] .principal-history-response-table td:nth-child(1){width:10%!important;text-align:center!important}
body[data-portal-role="PRINCIPAL"] .principal-history-response-table th:nth-child(2),
body[data-portal-role="PRINCIPAL"] .principal-history-response-table td:nth-child(2){width:12%!important;text-align:center!important}
body[data-portal-role="PRINCIPAL"] .principal-history-response-table th:nth-child(3),
body[data-portal-role="PRINCIPAL"] .principal-history-response-table td:nth-child(3){width:24%!important;text-align:center!important}
body[data-portal-role="PRINCIPAL"] .principal-history-response-table th:nth-child(4),
body[data-portal-role="PRINCIPAL"] .principal-history-response-table td:nth-child(4){width:24%!important;text-align:center!important}
body[data-portal-role="PRINCIPAL"] .principal-history-response-table th:nth-child(5),
body[data-portal-role="PRINCIPAL"] .principal-history-response-table td:nth-child(5){width:12%!important;text-align:center!important}
body[data-portal-role="PRINCIPAL"] .principal-history-response-table th:nth-child(6),
body[data-portal-role="PRINCIPAL"] .principal-history-response-table td:nth-child(6){width:12%!important;text-align:center!important}

body[data-portal-role="PRINCIPAL"] .principal-history-result-symbol{
  display:inline-grid!important;
  place-items:center!important;
  width:26px!important;
  height:26px!important;
  border-radius:50%!important;
  font-size:18px!important;
  line-height:1!important;
  font-weight:950!important;
  margin:auto!important;
}
body[data-portal-role="PRINCIPAL"] .principal-history-result-symbol.is-right{
  color:#71f0b7!important;
  background:#0b4b39!important;
  border:1px solid #268d67!important;
}
body[data-portal-role="PRINCIPAL"] .principal-history-result-symbol.is-wrong{
  color:#ff9aa8!important;
  background:#4b1f29!important;
  border:1px solid #9d4659!important;
}
body[data-portal-role="PRINCIPAL"] .principal-history-result-symbol.is-bonus{
  color:#ffe69a!important;
  background:#4a3914!important;
  border:1px solid #9a762e!important;
}
body[data-portal-role="PRINCIPAL"] .principal-history-result-symbol.is-blank{
  color:#b8cbd9!important;
  background:#17364d!important;
  border:1px solid #496a82!important;
}

/* Existing Students: no HALL TICKET / STUDENT NAME field labels. Keep
   Hall Ticket, Student Name and Results in one horizontal row on every device. */
body[data-portal-role="PRINCIPAL"] .principal-student-compact-card{
  overflow:hidden!important;
}
body[data-portal-role="PRINCIPAL"] .principal-student-compact-list{
  display:grid!important;
  gap:8px!important;
  padding:10px!important;
}
body[data-portal-role="PRINCIPAL"] .principal-student-compact-row{
  display:grid!important;
  grid-template-columns:minmax(82px,.75fr) minmax(120px,1.55fr) max-content!important;
  align-items:center!important;
  gap:10px!important;
  width:100%!important;
  min-width:0!important;
  padding:10px 12px!important;
  border:1px solid #315873!important;
  border-radius:11px!important;
  background:#09243b!important;
}
body[data-portal-role="PRINCIPAL"] .principal-student-compact-ht{
  min-width:0!important;
  color:#72def5!important;
  font-size:14px!important;
  white-space:nowrap!important;
}
body[data-portal-role="PRINCIPAL"] .principal-student-compact-name{
  min-width:0!important;
  color:#fff!important;
  font-size:14px!important;
  font-weight:850!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
body[data-portal-role="PRINCIPAL"] .principal-student-compact-result{
  justify-self:end!important;
  white-space:nowrap!important;
  margin:0!important;
}
body[data-portal-role="PRINCIPAL"][data-desktop-theme="light"] .principal-student-compact-row{
  background:#fff!important;
  border-color:#c3d5e4!important;
}
body[data-portal-role="PRINCIPAL"][data-desktop-theme="light"] .principal-student-compact-ht{color:#075f9d!important}
body[data-portal-role="PRINCIPAL"][data-desktop-theme="light"] .principal-student-compact-name{color:#15324d!important}
body[data-portal-role="PRINCIPAL"] .principal-student-compact-empty{
  padding:18px!important;
  text-align:center!important;
  color:#9eb5c7!important;
}

@media(max-width:720px){
  body[data-portal-role="PRINCIPAL"] .principal-history-metrics{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body[data-portal-role="PRINCIPAL"] :is(.principal-history-subject-table,.principal-history-response-table) .table-toolbar{
    padding:9px 8px!important;
  }
  body[data-portal-role="PRINCIPAL"] :is(.principal-history-subject-table,.principal-history-response-table) .table-toolbar strong{
    font-size:11px!important;
  }
  body[data-portal-role="PRINCIPAL"] :is(.principal-history-subject-table,.principal-history-response-table) th{
    padding:7px 3px!important;
    font-size:8px!important;
    line-height:1.08!important;
    letter-spacing:0!important;
  }
  body[data-portal-role="PRINCIPAL"] :is(.principal-history-subject-table,.principal-history-response-table) td{
    padding:7px 3px!important;
    font-size:9px!important;
    line-height:1.12!important;
  }
  body[data-portal-role="PRINCIPAL"] .principal-history-result-symbol{
    width:22px!important;
    height:22px!important;
    font-size:15px!important;
  }
  body[data-portal-role="PRINCIPAL"] .principal-student-compact-row{
    grid-template-columns:minmax(70px,.72fr) minmax(0,1.4fr) max-content!important;
    gap:6px!important;
    padding:8px!important;
  }
  body[data-portal-role="PRINCIPAL"] .principal-student-compact-ht,
  body[data-portal-role="PRINCIPAL"] .principal-student-compact-name{
    font-size:11px!important;
  }
  body[data-portal-role="PRINCIPAL"] .principal-student-compact-result{
    min-height:34px!important;
    padding:6px 8px!important;
    font-size:10px!important;
  }
  body[data-portal-role="PRINCIPAL"] .principal-student-compact-result svg{
    width:15px!important;
    height:15px!important;
  }
}

@media(max-width:430px){
  body[data-portal-role="PRINCIPAL"] .principal-history-subject-table th,
  body[data-portal-role="PRINCIPAL"] .principal-history-response-table th{
    font-size:7px!important;
    padding:6px 2px!important;
  }
  body[data-portal-role="PRINCIPAL"] .principal-history-subject-table td,
  body[data-portal-role="PRINCIPAL"] .principal-history-response-table td{
    font-size:8px!important;
    padding:6px 2px!important;
  }
  body[data-portal-role="PRINCIPAL"] .principal-history-result-symbol{
    width:20px!important;
    height:20px!important;
    font-size:14px!important;
  }
  body[data-portal-role="PRINCIPAL"] .principal-student-compact-row{
    grid-template-columns:74px minmax(0,1fr) 78px!important;
    gap:5px!important;
  }
  body[data-portal-role="PRINCIPAL"] .principal-student-compact-ht,
  body[data-portal-role="PRINCIPAL"] .principal-student-compact-name{
    font-size:10px!important;
  }
  body[data-portal-role="PRINCIPAL"] .principal-student-compact-result{
    width:78px!important;
    min-width:78px!important;
    padding:5px!important;
  }
}

/* ========================================================================
   EDUHUNT R404 — Principal/Teacher Online Tests compact mobile+tablet layout
   UI only. Mobile instruction applies to tablet as requested.
   ======================================================================== */

/* Keep View & Start in the right-hand lane on desktop, tablet and mobile. */
@media (max-width:1100px){
  body:is([data-portal-role="PRINCIPAL"],[data-portal-role="TEACHER"]) .eh-oltstaff-card{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) max-content!important;
    grid-template-areas:
      "head foot"
      "context foot"!important;
    align-items:center!important;
    column-gap:8px!important;
    row-gap:3px!important;
    padding:13px 14px!important;
  }
  body:is([data-portal-role="PRINCIPAL"],[data-portal-role="TEACHER"]) .eh-oltstaff-card-head{
    grid-area:head!important;
    min-width:0!important;
  }
  body:is([data-portal-role="PRINCIPAL"],[data-portal-role="TEACHER"]) .eh-oltstaff-context{
    grid-area:context!important;
    min-width:0!important;
    margin:0!important;
  }
  body:is([data-portal-role="PRINCIPAL"],[data-portal-role="TEACHER"]) .eh-oltstaff-card-foot{
    grid-area:foot!important;
    align-self:center!important;
    justify-self:end!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
  }
  body:is([data-portal-role="PRINCIPAL"],[data-portal-role="TEACHER"]) .eh-oltstaff-card-foot .eh-oltstaff-start{
    margin:0!important;
    min-height:38px!important;
    padding:8px 10px!important;
    font-size:12px!important;
    white-space:nowrap!important;
  }
  body:is([data-portal-role="PRINCIPAL"],[data-portal-role="TEACHER"]) .eh-oltstaff-title-line{
    min-width:0!important;
  }
  body:is([data-portal-role="PRINCIPAL"],[data-portal-role="TEACHER"]) .eh-oltstaff-title-line h3{
    min-width:0!important;
    overflow-wrap:anywhere!important;
  }
}

@media (max-width:520px){
  body:is([data-portal-role="PRINCIPAL"],[data-portal-role="TEACHER"]) .eh-oltstaff-card{
    column-gap:6px!important;
    padding:11px 12px!important;
  }
  body:is([data-portal-role="PRINCIPAL"],[data-portal-role="TEACHER"]) .eh-oltstaff-card-foot .eh-oltstaff-start{
    min-height:36px!important;
    padding:7px 8px!important;
    font-size:11px!important;
  }
  body:is([data-portal-role="PRINCIPAL"],[data-portal-role="TEACHER"]) .eh-oltstaff-card-foot .eh-oltstaff-start svg{
    width:16px!important;
    height:16px!important;
  }
}

/* Principal OLT participation: Class / Test Type / Test Mode / Test Name stay
   in ONE row on tablet and mobile. Student Search, when present, uses its own row. */
body[data-portal-role="PRINCIPAL"] .otr344-principal-filters{
  display:grid!important;
  grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr) minmax(0,1.28fr) minmax(0,1fr)!important;
  gap:8px!important;
  align-items:end!important;
}
body[data-portal-role="PRINCIPAL"] .otr344-principal-filters .form-field{
  min-width:0!important;
}
body[data-portal-role="PRINCIPAL"] .otr344-principal-filters .otr344-student-search{
  grid-column:1 / -1!important;
}

@media (max-width:1100px){
  body[data-portal-role="PRINCIPAL"] .otr344-principal-filters{
    grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr) minmax(0,1.28fr) minmax(0,1fr)!important;
    gap:6px!important;
    padding:12px!important;
  }
  body[data-portal-role="PRINCIPAL"] .otr344-principal-filters .form-field label{
    font-size:10px!important;
    line-height:1.1!important;
    margin-bottom:5px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body[data-portal-role="PRINCIPAL"] .otr344-principal-filters select{
    width:100%!important;
    min-width:0!important;
    height:42px!important;
    min-height:42px!important;
    padding:6px 24px 6px 7px!important;
    font-size:11px!important;
  }
}

@media (max-width:560px){
  body[data-portal-role="PRINCIPAL"] .otr344-principal-filters{
    grid-template-columns:minmax(0,.9fr) minmax(0,1.05fr) minmax(0,1.3fr) minmax(0,.95fr)!important;
    gap:4px!important;
    padding:10px 8px!important;
  }
  body[data-portal-role="PRINCIPAL"] .otr344-principal-filters .form-field label{
    font-size:8.5px!important;
    margin-bottom:4px!important;
  }
  body[data-portal-role="PRINCIPAL"] .otr344-principal-filters select{
    height:38px!important;
    min-height:38px!important;
    padding:5px 18px 5px 5px!important;
    font-size:9.5px!important;
    border-radius:8px!important;
  }
}

/* =============================================================
   EduHunt R590 | Super Admin -> Exam Operations -> Execution Status
   Visual-only restoration: four filters on one desktop row and
   eight properly styled, clickable status counters.
   No JavaScript selectors, data attributes or server calls changed.
   ============================================================= */
body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick {
  display: grid !important;
  gap: 15px !important;
  min-width: 0 !important;
  width: 100% !important;
  margin: 0 0 18px !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  border: 1px solid #274763 !important;
  border-radius: 14px !important;
  background: #071b2e !important;
}
/* The original generated HTML uses four LABEL/SELECT pairs.
   Force GRID rather than relying on missing legacy layout styles. */
body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-controls {
  display: grid !important;
  grid-template-columns: minmax(0,1.05fr) minmax(0,1.18fr) minmax(0,.72fr) minmax(0,1fr) !important;
  align-items: end !important;
  column-gap: 12px !important;
  row-gap: 10px !important;
  min-width: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-controls > label {
  display: flex !important;
  flex-direction: column !important;
  gap: 7px !important;
  min-width: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-controls > label > span {
  display: block !important;
  min-width: 0 !important;
  font-size: 11px !important;
  line-height: 1.3 !important;
  font-weight: 850 !important;
  letter-spacing: .045em !important;
  color: #9fc0dc !important;
  white-space: nowrap !important;
}
body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-controls select {
  appearance: auto !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 44px !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  box-sizing: border-box !important;
  font: inherit !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  border: 1px solid #355c79 !important;
  border-radius: 9px !important;
  background: #09243c !important;
  color: #f5fbff !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-controls select:focus-visible {
  outline: 2px solid #38bdf8 !important;
  outline-offset: 2px !important;
  border-color: #38bdf8 !important;
}
body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-controls select:disabled {
  opacity: .68 !important;
  cursor: not-allowed !important;
}
/* Restore an eight-card row on wider screens, wrapping responsively
   rather than allowing horizontal scrolling or overlapping text. */
body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-stages {
  display: grid !important;
  grid-template-columns: repeat(8,minmax(0,1fr)) !important;
  gap: 9px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-stage {
  --r590-accent: #38bdf8;
  appearance: none !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 9px !important;
  min-width: 0 !important;
  width: 100% !important;
  min-height: 100px !important;
  padding: 14px 10px 11px !important;
  box-sizing: border-box !important;
  text-align: left !important;
  border: 1px solid #2b506f !important;
  border-radius: 12px !important;
  background: linear-gradient(160deg,#0f304b 0%,#092137 100%) !important;
  color: #e9f7ff !important;
  box-shadow: inset 0 3px 0 var(--r590-accent) !important;
  cursor: pointer !important;
  white-space: normal !important;
  transition: background .18s ease,border-color .18s ease,transform .18s ease !important;
}
body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-stage > span {
  display: block !important;
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
  font-size: 11px !important;
  line-height: 1.28 !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  color: #c0d8eb !important;
}
body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-stage > b {
  display: block !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: clamp(19px,2vw,27px) !important;
  line-height: 1 !important;
  letter-spacing: -.025em !important;
  font-weight: 950 !important;
  color: #fff !important;
}
body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-stage[data-stage="ALLOTTED_SCHOOLS"] { --r590-accent:#38bdf8; }
body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-stage[data-stage="PAPER_SENT"] { --r590-accent:#60a5fa; }
body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-stage[data-stage="SCHOOL_RECEIVED"] { --r590-accent:#22d3ee; }
body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-stage[data-stage="EXAM_CONDUCTED"] { --r590-accent:#a78bfa; }
body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-stage[data-stage="OMR_SENT"] { --r590-accent:#fbbf24; }
body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-stage[data-stage="OMR_RECEIVED"] { --r590-accent:#34d399; }
body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-stage[data-stage="RESULT_GIVEN"] { --r590-accent:#fb923c; }
body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-stage[data-stage="PRINCIPAL_APPROVED"] { --r590-accent:#4ade80; }
body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-stage:hover:not(:disabled) {
  border-color: var(--r590-accent) !important;
  background: #124061 !important;
  transform: translateY(-1px) !important;
}
body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-stage:focus-visible {
  outline: 3px solid #7dd3fc !important;
  outline-offset: 2px !important;
}
body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-stage:disabled {
  opacity: .65 !important;
  cursor: not-allowed !important;
  transform: none !important;
}
/* Explicit support for the existing Light theme. */
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .r160-execution-summary-shell .exam-v3-coordinator-quick {
  border-color: #c8d9e8 !important;
  background: #f7fbff !important;
}
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .r160-execution-summary-shell .exam-v3-coordinator-quick-controls > label > span { color: #365571 !important; }
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .r160-execution-summary-shell .exam-v3-coordinator-quick-controls select {
  color: #173653 !important;
  border-color: #b5ccdf !important;
  background: #fff !important;
}
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .r160-execution-summary-shell .exam-v3-coordinator-quick-stage {
  border-color: #c6d8e7 !important;
  background: linear-gradient(165deg,#fff,#edf6fd) !important;
  color: #173653 !important;
}
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .r160-execution-summary-shell .exam-v3-coordinator-quick-stage > span { color: #355675 !important; }
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .r160-execution-summary-shell .exam-v3-coordinator-quick-stage > b { color: #0a3457 !important; }
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .r160-execution-summary-shell .exam-v3-coordinator-quick-stage:hover:not(:disabled) { background: #e3f2fd !important; }
/* Responsive, but keep all four in a single row on ordinary desktops. */
@media (max-width: 1080px) {
  body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-stages {
    grid-template-columns: repeat(4,minmax(0,1fr)) !important;
  }
}
@media (max-width: 780px) {
  body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-controls {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }
  body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-stages {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }
}
@media (max-width: 440px) {
  body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick { padding: 11px !important; }
  body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-controls {
    grid-template-columns: 1fr !important;
  }
  body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-stage { min-height: 88px !important; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-portal-role="SUPER_ADMIN"] .r160-execution-summary-shell .exam-v3-coordinator-quick-stage { transition: none !important; }
}


/* =======================================================================
   EDUHUNT R591 | Super Admin Exam Operations UI refinements
   Image 1: Consolidated Status five stage cards + responsive chip layout
   Image 2: Dispatch History filter toolbar + independent parcel cards
   PURE CSS: no data, action, permissions or service changes.
   Scoped exclusively to SUPER_ADMIN. Append after R590 styles.
   ======================================================================= */

/* 1. CONSOLIDATED STATUS: legible header + five well-spaced stage cards. */
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-consolidated-panel > .exam-v3-coordinator-summary-body {
  padding: 14px 2px 12px !important;
  min-width: 0 !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-consolidated {
  display: grid !important;
  gap: 16px !important;
  min-width: 0 !important;
  width: 100% !important;
  color: #eaf4ff !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-consolidated-head {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: 8px 24px !important;
  margin: 0 !important;
  padding: 12px 15px !important;
  border: 1px solid #315371 !important;
  border-radius: 12px !important;
  background: #0b2943 !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-consolidated-head > div > span {
  display: none !important; /* The opened panel button already says CONSOLIDATED STATUS. */
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-consolidated-head h3 {
  margin: 0 !important;
  color: #f8fbff !important;
  font-size: 16px !important;
  line-height: 1.35 !important;
  font-weight: 900 !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-consolidated-head > small {
  display: block !important;
  flex: 1 1 440px !important;
  max-width: 690px !important;
  margin: 0 !important;
  color: #b8d1e4 !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
  font-weight: 550 !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-summary-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,290px),1fr)) !important;
  align-items: stretch !important;
  gap: 14px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-summary-card {
  --r591-stage: #38bdf8;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  min-width: 0 !important;
  padding: 17px !important;
  overflow: hidden !important;
  border: 1px solid #315570 !important;
  border-radius: 15px !important;
  background: linear-gradient(155deg,#10324e,#071d32) !important;
  box-shadow: 0 8px 20px rgba(0,0,0,.12) !important;
  color: #ecf7ff !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-summary-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--r591-stage);
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-summary-card.is-paper { --r591-stage:#52c8ff; }
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-summary-card.is-exam { --r591-stage:#a88bff; }
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-summary-card.is-omr { --r591-stage:#23d6b2; }
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-summary-card.is-result { --r591-stage:#ffc56b; }
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-summary-card.is-approval { --r591-stage:#76df88; }
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-summary-card > header {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) auto !important;
  align-items: center !important;
  gap: 6px 10px !important;
  margin: 0 !important;
  padding: 0 0 12px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(165,205,232,.19) !important;
  background: transparent !important;
  min-height: 68px !important;
  text-align: left !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-summary-card > header > span {
  display: block !important;
  min-width: 0 !important;
  color: #f2f9ff !important;
  font-size: 16px !important;
  line-height: 1.25 !important;
  font-weight: 850 !important;
  overflow-wrap: anywhere !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-summary-card > header > b {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 7px 10px !important;
  min-width: 64px !important;
  border: 1px solid color-mix(in srgb,var(--r591-stage) 55%,transparent) !important;
  border-radius: 9px !important;
  background: rgba(20,73,106,.5) !important;
  color: var(--r591-stage) !important;
  font-size: 23px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  font-variant-numeric: tabular-nums !important;
  white-space: nowrap !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-summary-card > header > small {
  display: block !important;
  grid-column: 1 / -1 !important;
  color: #a8c6dc !important;
  font-size: 11px !important;
  line-height: 1.3 !important;
  font-weight: 700 !important;
  letter-spacing: .015em !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-summary-chips {
  display: grid !important;
  grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  align-items: stretch !important;
  gap: 8px !important;
  width: 100% !important;
  margin: 0 !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-summary-chips > .exam-v3-coordinator-summary-chip {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
  width: 100% !important;
  min-height: 43px !important;
  padding: 8px 10px !important;
  margin: 0 !important;
  border: 1px solid #416786 !important;
  border-radius: 10px !important;
  background: #123a58 !important;
  color: #dcefff !important;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  text-align: left !important;
  box-shadow: none !important;
  transition: background .15s ease, border-color .15s ease, transform .15s ease !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-summary-chips > .exam-v3-coordinator-summary-chip > b {
  display: block !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  font-weight: 750 !important;
  overflow-wrap: anywhere !important;
  text-align: left !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-summary-chips > .exam-v3-coordinator-summary-chip > strong {
  display: block !important;
  flex: none !important;
  color: #ffffff !important;
  font-size: 18px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  font-variant-numeric: tabular-nums !important;
  white-space: nowrap !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-summary-chips > .exam-v3-coordinator-summary-chip:last-child:nth-child(odd) {
  grid-column: 1 / -1 !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-summary-chips > .exam-v3-coordinator-summary-chip:not(:disabled):hover {
  background: #1b5479 !important;
  border-color: var(--r591-stage) !important;
  transform: translateY(-1px) !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-summary-chips > .exam-v3-coordinator-summary-chip:focus-visible {
  outline: 3px solid #82d8ff !important;
  outline-offset: 2px !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-summary-chips > .exam-v3-coordinator-summary-chip:disabled {
  opacity: 1 !important;
  border-color: #294860 !important;
  background: #102a40 !important;
  color: #93afc3 !important;
  cursor: not-allowed !important;
  transform: none !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-summary-chips > .exam-v3-coordinator-summary-chip:disabled > strong {
  color: #adbed0 !important;
}

/* 2. DISPATCH HISTORY: filters, parcels, contents and LR actions. */
body[data-portal-role="SUPER_ADMIN"] .exam-v3-dispatch-filter-card {
  padding: 18px !important;
  border: 1px solid #2e5470 !important;
  border-radius: 15px !important;
  background: #0b263f !important;
  color: #edf7ff !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-dispatch-filter-card .card-head {
  display: flex !important;
  align-items: center !important;
  margin: 0 0 13px !important;
  padding: 0 0 11px !important;
  border-bottom: 1px solid #254763 !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-dispatch-filter-card .card-head h3 {
  margin: 0 0 3px !important;
  color: #f4fbff !important;
  font-size: 19px !important;
  line-height: 1.2 !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-dispatch-filter-card .card-head p {
  margin: 0 !important;
  color: #a8c5db !important;
  font-size: 12px !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-dispatch-filter-card .form-grid--4 {
  display: grid !important;
  grid-template-columns: minmax(0,1.25fr) minmax(0,1fr) minmax(0,1fr) minmax(126px,.56fr) !important;
  gap: 12px !important;
  align-items: end !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-dispatch-filter-card .form-field {
  min-width: 0 !important;
  width: 100% !important;
  margin: 0 !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-dispatch-filter-card .form-field label {
  display: block !important;
  margin: 0 0 6px !important;
  color: #c9e0f2 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-dispatch-filter-card select {
  display: block !important;
  min-width: 0 !important;
  width: 100% !important;
  height: 43px !important;
  min-height: 43px !important;
  padding: 8px 11px !important;
  border: 1px solid #426786 !important;
  border-radius: 9px !important;
  background: #082038 !important;
  color: #f3faff !important;
  font-size: 13px !important;
  font-weight: 750 !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-dispatch-filter-card .row-actions,
body[data-portal-role="SUPER_ADMIN"] .exam-v3-dispatch-filter-card #examV3DispatchFilterApply {
  width: 100% !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-dispatch-filter-card #examV3DispatchFilterApply {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 43px !important;
  min-height: 43px !important;
  border-radius: 9px !important;
  font-weight: 850 !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-history-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,440px),1fr)) !important;
  gap: 15px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 14px 0 !important;
  align-items: stretch !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-history-list > article {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(0,1fr) !important;
  grid-template-rows: auto auto 1fr auto !important;
  align-content: start !important;
  gap: 13px !important;
  padding: 18px !important;
  min-width: 0 !important;
  overflow: hidden !important;
  border: 1px solid #315975 !important;
  border-radius: 15px !important;
  background: linear-gradient(155deg,#0d2c46,#071b2f) !important;
  color: #edf8ff !important;
  box-shadow: 0 8px 22px rgba(0,0,0,.14) !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-history-list > article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,#32bafb,#24d6bb) !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-history-list .exam-v3-history-school {
  display: block !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 0 12px !important;
  border-bottom: 1px solid #31526d !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-history-list .exam-v3-history-school strong {
  display: block !important;
  color: #fff !important;
  font-size: 16px !important;
  line-height: 1.35 !important;
  font-weight: 900 !important;
  overflow-wrap: anywhere !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-history-list .exam-v3-parcel-contents {
  display: block !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-history-list .exam-v3-parcel-label {
  display: block !important;
  margin: 0 0 7px !important;
  color: #7ed6f8 !important;
  font-size: 10px !important;
  line-height: 1.3 !important;
  font-weight: 950 !important;
  letter-spacing: .09em !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-history-list .exam-v3-parcel-contents h3 {
  display: inline-flex !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 8px 11px !important;
  border: 1px solid #355c7e !important;
  border-radius: 9px !important;
  background: #144365 !important;
  color: #f4fbff !important;
  font-size: 15px !important;
  line-height: 1.3 !important;
  font-weight: 800 !important;
  overflow-wrap: anywhere !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-history-list .exam-v3-parcel-contents p {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 7px !important;
  margin: 9px 0 0 !important;
  padding: 0 !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-history-list .exam-v3-parcel-contents p > span {
  display: inline-flex !important;
  max-width: 100% !important;
  padding: 6px 9px !important;
  border: 1px solid #365772 !important;
  border-radius: 8px !important;
  background: #0e2b46 !important;
  color: #ccdeec !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  line-height: 1.25 !important;
  overflow-wrap: anywhere !important;
}
/* The third div is the courier name and LR tracking/date meta in the actual renderer. */
body[data-portal-role="SUPER_ADMIN"] .exam-v3-history-list > article > div:nth-child(3) {
  display: flex !important;
  flex-direction: column !important;
  justify-content: end !important;
  gap: 5px !important;
  min-width: 0 !important;
  padding: 11px 12px !important;
  border: 1px solid #284b65 !important;
  border-radius: 9px !important;
  background: #09243b !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-history-list > article > div:nth-child(3) > b {
  display: block !important;
  color: #f3faff !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  font-weight: 850 !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-history-list > article > div:nth-child(3) > small {
  display: block !important;
  color: #b4d1e4 !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
  overflow-wrap: anywhere !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-history-list > article > .row-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-history-list > article > .row-actions .button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  min-height: 39px !important;
  margin: 0 !important;
  padding: 8px 13px !important;
  border: 1px solid #426b8d !important;
  border-radius: 9px !important;
  background: #123e61 !important;
  color: #eff9ff !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  text-decoration: none !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-history-list > article > .row-actions .button:hover:not(:disabled) {
  border-color: #51cdfd !important;
  background: #19527b !important;
}
body[data-portal-role="SUPER_ADMIN"] .exam-v3-history-list > article > .row-actions .button:focus-visible,
body[data-portal-role="SUPER_ADMIN"] .exam-v3-dispatch-filter-card :is(select,button):focus-visible {
  outline: 3px solid #79d9ff !important;
  outline-offset: 2px !important;
}

/* Light-theme compatibility for the same two Super Admin panels. */
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .exam-v3-coordinator-consolidated-head,
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .exam-v3-dispatch-filter-card {
  background: #f2f8fe !important;
  border-color: #c3d7e7 !important;
  color: #153550 !important;
}
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .exam-v3-coordinator-consolidated-head h3,
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .exam-v3-dispatch-filter-card .card-head h3 {
  color: #123657 !important;
}
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .exam-v3-coordinator-consolidated-head > small,
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .exam-v3-dispatch-filter-card .card-head p {
  color: #4b657b !important;
}
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .exam-v3-coordinator-summary-card,
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .exam-v3-history-list > article {
  background: #fff !important;
  border-color: #c4d7e7 !important;
  color: #183a57 !important;
  box-shadow: 0 5px 16px rgba(22,64,100,.08) !important;
}
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .exam-v3-coordinator-summary-card > header {
  border-bottom-color: #d8e6f2 !important;
}
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .exam-v3-coordinator-summary-card > header > span,
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .exam-v3-history-list .exam-v3-history-school strong {
  color: #143c60 !important;
}
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .exam-v3-coordinator-summary-card > header > b {
  background: #ebf5fc !important;
  color: #145783 !important;
}
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .exam-v3-coordinator-summary-card > header > small,
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .exam-v3-dispatch-filter-card .form-field label {
  color: #496981 !important;
}
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .exam-v3-coordinator-summary-chips > .exam-v3-coordinator-summary-chip {
  background: #eff6fc !important;
  color: #1a4868 !important;
  border-color: #c8dce9 !important;
}
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .exam-v3-coordinator-summary-chips > .exam-v3-coordinator-summary-chip > strong {
  color: #11436d !important;
}
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .exam-v3-coordinator-summary-chips > .exam-v3-coordinator-summary-chip:disabled {
  background: #f7fafc !important;
  color: #738a9c !important;
  border-color: #dae6ef !important;
}
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .exam-v3-coordinator-summary-chips > .exam-v3-coordinator-summary-chip:disabled > strong {
  color: #6d8596 !important;
}
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .exam-v3-dispatch-filter-card select,
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .exam-v3-history-list > article > div:nth-child(3),
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .exam-v3-history-list .exam-v3-parcel-contents p > span {
  background: #f3f8fd !important;
  border-color: #c9dce9 !important;
  color: #1a435f !important;
}
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .exam-v3-history-list > article > div:nth-child(3) > b,
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .exam-v3-history-list .exam-v3-parcel-contents h3 {
  color: #103b61 !important;
}
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .exam-v3-history-list .exam-v3-parcel-contents h3 {
  background: #e6f3fe !important;
  border-color: #b6d9f3 !important;
}
body[data-portal-role="SUPER_ADMIN"][data-desktop-theme="light"] .exam-v3-history-list > article > div:nth-child(3) > small {
  color: #526f84 !important;
}

@media (max-width: 1090px) {
  body[data-portal-role="SUPER_ADMIN"] .exam-v3-dispatch-filter-card .form-grid--4 {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }
}
@media (max-width: 650px) {
  body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-consolidated-head { padding: 12px !important; }
  body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-summary-card { padding: 14px !important; }
  body[data-portal-role="SUPER_ADMIN"] .exam-v3-dispatch-filter-card .form-grid--4 {
    grid-template-columns: minmax(0,1fr) !important;
  }
  body[data-portal-role="SUPER_ADMIN"] .exam-v3-dispatch-filter-card { padding: 12px !important; }
  body[data-portal-role="SUPER_ADMIN"] .exam-v3-history-list > article { padding: 14px !important; }
  body[data-portal-role="SUPER_ADMIN"] .exam-v3-history-list > article > .row-actions .button { flex: 1 1 120px !important; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-summary-chips > .exam-v3-coordinator-summary-chip {
    transition: none !important;
  }
}
@media print {
  body[data-portal-role="SUPER_ADMIN"] .exam-v3-history-list > article,
  body[data-portal-role="SUPER_ADMIN"] .exam-v3-coordinator-summary-card {
    break-inside: avoid !important;
    box-shadow: none !important;
  }
}

