:root{
  color-scheme:light;
  --navy-950:#051027;
  --navy-900:#07152e;
  --navy-850:#0a1b39;
  --navy-800:#0d2448;
  --blue-700:#1259c3;
  --blue-600:#1972e8;
  --blue-500:#2987f5;
  --cyan-400:#35c4f7;
  --indigo-500:#6468f5;
  --ink-950:#101828;
  --ink-800:#26344a;
  --ink-700:#3e4c63;
  --ink-600:#58677e;
  --ink-500:#718096;
  --line:#dbe3ee;
  --line-strong:#c9d4e3;
  --canvas:#f2f5fa;
  --surface:#fff;
  --surface-soft:#f8faff;
  --green:#138a55;
  --green-soft:#e5f8ef;
  --amber:#b86b00;
  --amber-soft:#fff5dd;
  --red:#c43745;
  --red-soft:#fff0f1;
  --purple:#7047c8;
  --purple-soft:#f2edff;
  --shadow-sm:0 1px 2px rgba(16,24,40,.04),0 1px 4px rgba(16,24,40,.04);
  --shadow-md:0 8px 28px rgba(31,54,92,.09);
  --shadow-lg:0 28px 80px rgba(4,17,42,.22);
  --radius-sm:8px;
  --radius:12px;
  --radius-lg:18px;
  --sidebar-width:252px;
  --topbar-height:82px;
}

*{box-sizing:border-box}
html{min-height:100%;background:var(--canvas);scroll-behavior:smooth}
body{min-height:100vh;margin:0;color:var(--ink-950);background:var(--canvas);font-family:Inter,"Segoe UI",Roboto,Arial,sans-serif;font-size:15px;line-height:1.5;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit}
button,a,input,select,textarea{outline:none}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.58}
a{color:var(--blue-700);text-decoration:none}
img,svg{display:block}
[hidden]{display:none!important}
.no-script{margin:32px auto;padding:18px;max-width:680px;background:#fff0f1;border:1px solid #f1a4ab;border-radius:12px;color:#9d1c29;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 7% 8%,rgba(53,196,247,.12),transparent 28%),
  radial-gradient(circle at 92% 90%,rgba(100,104,245,.14),transparent 34%),
  var(--navy-950)}
.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:var(--surface);box-shadow:0 34px 100px rgba(0,0,0,.36)}
.login-brand-panel{position:relative;isolation:isolate;padding:52px;display:flex;flex-direction:column;color:#fff;background:
  linear-gradient(151deg,rgba(16,68,133,.58),rgba(3,14,35,.1)),
  linear-gradient(140deg,var(--navy-800),var(--navy-950) 70%)}
.login-brand-panel::before,.login-brand-panel::after{content:"";position:absolute;z-index:-1;border-radius:50%;filter:blur(1px)}
.login-brand-panel::before{width:340px;height:340px;right:-120px;top:145px;background:radial-gradient(circle,rgba(53,196,247,.21),transparent 68%)}
.login-brand-panel::after{width:420px;height:420px;left:-120px;bottom:-190px;background:radial-gradient(circle,rgba(100,104,245,.24),transparent 66%)}
.brand-lockup{display:flex;align-items:center;gap:14px}
.brand-lockup img{width:min(270px,76%);height:auto;padding:7px 9px;border-radius:12px;background:#fff;box-shadow:0 12px 30px rgba(0,0,0,.25);object-fit:contain}
.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}
.eyebrow{margin:0 0 10px;color:var(--blue-600);font-size:11px;font-weight:900;letter-spacing:.15em;text-transform:uppercase}
.login-brand-panel .eyebrow{color:#81defe}
.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}
.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;flex:0 0 auto;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)}
.login-card{width:min(430px,100%);margin:auto}
.login-mobile-brand{display:none}
.login-card h2{margin:0;color:var(--ink-950);font-size:32px;letter-spacing:-.035em}
.login-help{margin:10px 0 30px;color:var(--ink-600)}
.field{display:block;margin-bottom:17px}
.field>span:first-child,.field-label{display:block;margin-bottom:7px;color:var(--ink-800);font-size:13px;font-weight:800}
.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;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.input-wrap input{padding-left:43px;padding-right:46px}
input,select,textarea{width:100%;min-height:44px;padding:10px 12px;border:1px solid var(--line-strong);border-radius:10px;background:#fff;color:var(--ink-950);transition:border-color .18s,box-shadow .18s,background .18s}
textarea{min-height:104px;resize:vertical}
input::placeholder,textarea::placeholder{color:#9aa8ba}
input:focus,select:focus,textarea:focus{border-color:var(--blue-500);box-shadow:0 0 0 3px rgba(41,135,245,.13)}
input[readonly],input:disabled,select:disabled,textarea:disabled{background:#f1f4f8;color:#6d7b8e}
.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(83,102,132,.1)}
.icon-button:focus-visible,.button:focus-visible,.sidebar-link:focus-visible,.nav-link:focus-visible,.account-button:focus-visible,.topbar-button:focus-visible{box-shadow:0 0 0 3px rgba(53,196,247,.28)}
.icon-button svg,.button svg,.sidebar-link svg,.nav-link svg,.topbar-button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.input-action{position:absolute;right:5px;top:50%;transform:translateY(-50%);color:var(--ink-500)}
.remember-row{margin:5px 0 22px;display:flex;align-items:center;gap:10px;color:var(--ink-700);font-size:13px;font-weight:700}
.remember-row input{width:18px;height:18px;min-height:0;margin:0;accent-color:var(--blue-600)}
.button{min-height:41px;padding:9px 15px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid transparent;border-radius:9px;background:var(--blue-600);color:#fff;font-size:12pt;font-weight:800;box-shadow:none;transition:transform .16s,filter .16s,box-shadow .16s}
.button:hover:not(:disabled){filter:brightness(.96);box-shadow:0 5px 14px rgba(25,114,232,.18)}
.button:active:not(:disabled){transform:translateY(1px)}
.button--large{min-height:49px;padding:12px 18px;border-radius:11px}
.button--primary{background:linear-gradient(135deg,var(--blue-600),#555af0);box-shadow:0 10px 24px rgba(30,102,216,.23)}
.login-card .button--primary{width:100%}
.button--secondary{border-color:var(--line-strong);background:#fff;color:var(--ink-800)}
.button--success{background:var(--green)}
.button--danger{background:var(--red)}
.button--warning{background:#d98200}
.button--dark{background:var(--navy-800)}
.button--ghost{border-color:transparent;background:transparent;color:var(--blue-700)}
.button--small{min-height:34px;padding:6px 10px;border-radius:7px;font-size:12pt}
.button.loading{position:relative;color:transparent!important;pointer-events:none}
.button.loading::after{content:"";position:absolute;width:18px;height:18px;border:2px solid rgba(255,255,255,.45);border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite}
.button--secondary.loading::after{border-color:#d3dbe5;border-top-color:var(--blue-600)}
@keyframes spin{to{transform:rotate(360deg)}}
.form-message{min-height:22px;margin-top:14px;color:var(--red);font-size:13px;font-weight:700;text-align:center}
.form-message.success{color:var(--green)}
.login-footer{margin:23px 0 0;color:var(--ink-500);font-size:12px;text-align:center}

/* App shell */
.portal-view{min-height:100vh;display:grid;grid-template-columns:var(--sidebar-width) minmax(0,1fr)}
.sidebar{position:fixed;inset:0 auto 0 0;z-index:40;width:var(--sidebar-width);display:flex;flex-direction:column;overflow:hidden;color:#d8e4f4;background:
  radial-gradient(circle at 20% 0,rgba(40,135,245,.18),transparent 31%),
  linear-gradient(180deg,var(--navy-900),#061226)}
.sidebar-brand{height:82px;padding:17px 20px;display:flex;align-items:center;gap:11px;border-bottom:1px solid rgba(255,255,255,.075)}
.sidebar-brand img{width:178px;height:auto;padding:4px 6px;border-radius:8px;background:#fff;object-fit:contain}
.sidebar-brand div{display:flex;flex-direction:column;line-height:1.1;letter-spacing:.12em}
.sidebar-brand strong{color:#fff;font-size:20px;font-weight:900}
.sidebar-brand span{margin-top:4px;color:#68d1fa;font-size:9px;font-weight:900;letter-spacing:.34em}
.sidebar-close{display:none;margin-left:auto;color:#c7d6e8}
.sidebar-identity{margin:18px 15px 10px;padding:13px;display:flex;align-items:center;gap:11px;border:1px solid rgba(255,255,255,.09);border-radius:13px;background:rgba(255,255,255,.047)}
.avatar{width:42px;height:42px;display:grid;place-items:center;flex:0 0 auto;border:1px solid rgba(255,255,255,.18);border-radius:12px;background:linear-gradient(135deg,#2397ec,#5e59ea);color:#fff;font-size:13px;font-weight:900;letter-spacing:.02em}
.avatar--small{width:34px;height:34px;border-radius:9px}
.sidebar-identity>div:last-child{min-width:0;display:flex;flex-direction:column}
.sidebar-identity strong{overflow:hidden;color:#fff;font-size:13px;text-overflow:ellipsis;white-space:nowrap}
.sidebar-identity span{margin-top:2px;overflow:hidden;color:#8fa8c5;font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.sidebar-nav{padding:8px 12px 22px;flex:1;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#29415f transparent}
.nav-group{margin:12px 0 4px;padding:0 10px;color:#6882a2;font-size:9px;font-weight:900;letter-spacing:.13em;text-transform:uppercase}
.nav-link,.sidebar-link{width:100%;min-height:43px;margin:3px 0;padding:9px 10px;display:flex;align-items:center;gap:11px;border:0;border-radius:9px;background:transparent;color:#aec0d5;font-size:13px;font-weight:700;text-align:left;transition:background .16s,color .16s,transform .16s}
.nav-link:hover,.sidebar-link:hover{background:rgba(255,255,255,.075);color:#fff}
.nav-link.active{position:relative;background:linear-gradient(90deg,rgba(41,135,245,.29),rgba(53,196,247,.10));color:#fff}
.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;height:19px;flex:0 0 auto}
.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;border-top:1px solid rgba(255,255,255,.075)}
.sidebar-link{min-height:38px;margin:1px 0}
.sidebar-link--danger{color:#ff9aa4}
.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;grid-column:2;min-height:100vh;display:flex;flex-direction:column}
.topbar{position:sticky;top:0;z-index:30;height:var(--topbar-height);padding:13px clamp(18px,2.6vw,36px);display:flex;align-items:center;gap:15px;border-bottom:1px solid var(--line);background:rgba(255,255,255,.94);backdrop-filter:blur(16px);box-shadow:0 2px 12px rgba(23,41,73,.035)}
.menu-toggle{display:none;color:var(--ink-700)}
.topbar-title{min-width:0}
.topbar-title>span{display:block;color:var(--blue-600);font-size:10px;font-weight:900;letter-spacing:.11em;text-transform:uppercase}
.topbar-title h1{margin:2px 0 0;overflow:hidden;color:var(--ink-950);font-size:23px;letter-spacing:-.025em;text-overflow:ellipsis;white-space:nowrap}
.topbar-actions{margin-left:auto;display:flex;align-items:center;gap:8px}
.topbar-button{min-height:38px;padding:8px 11px;display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink-700);font-size:12px;font-weight:800}
.topbar-button:hover{border-color:#b9c8db;background:#f8faff}
.notification-button{position:relative;border:1px solid var(--line);background:#fff;color:var(--ink-700)}
.notification-count{position:absolute;right:-4px;top:-5px;min-width:17px;height:17px;padding:1px 4px;border:2px solid #fff;border-radius:999px;background:var(--red);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 transparent;border-radius:10px;background:transparent;color:var(--ink-800);text-align:left}
.account-button:hover{border-color:var(--line);background:#f8faff}
.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}
.account-copy small{color:var(--ink-500);font-size:10px}
.content{width:100%;max-width:1640px;margin:0 auto;padding:clamp(18px,2.3vw,34px);flex:1}
.portal-footer{padding:8px 24px 20px;color:#8a97a9;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)}

/* Page building blocks */
.page-head{margin-bottom:22px;display:flex;align-items:flex-end;justify-content:space-between;gap:18px}
.page-head h2{margin:0;color:var(--ink-950);font-size:clamp(24px,3vw,32px);letter-spacing:-.035em}
.page-head p{margin:5px 0 0;color:var(--ink-600)}
.page-actions,.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{min-width:0;padding:20px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow-sm)}
.card--flush{padding:0;overflow:hidden}
.card--soft{background:var(--surface-soft)}
.card--accent{border:0;color:#fff;background:linear-gradient(135deg,#0b2854,#164d94);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 h3{margin:0;color:var(--ink-950);font-size:17px;letter-spacing:-.015em}
.card-head p{margin:3px 0 0;color:var(--ink-500);font-size:12px}
.card--accent .card-head h3,.card--accent .card-head p{color:#fff}
.section-title{margin:27px 0 12px;color:var(--ink-800);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(--line);border-radius:12px;background:#fff;box-shadow:var(--shadow-sm)}
.kpi-card::after{content:"";position:absolute;right:-22px;bottom:-26px;width:88px;height:88px;border-radius:50%;background:var(--kpi-soft,#edf4ff)}
.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:var(--kpi-soft,#edf4ff);color:var(--kpi-color,var(--blue-600))}
.kpi-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.kpi-trend{padding:3px 6px;border-radius:999px;background:var(--green-soft);color:var(--green);font-size:9px;font-weight:900}
.kpi-card b{position:relative;z-index:1;margin-top:13px;display:block;color:var(--ink-950);font-size:27px;line-height:1.1;letter-spacing:-.03em}
.kpi-card>span{position:relative;z-index:1;margin-top:4px;display:block;color:var(--ink-600);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(--line);border-radius:11px;background:#fff;color:var(--ink-800);text-align:left;transition:transform .16s,border-color .16s,box-shadow .16s}
.quick-card:hover{transform:translateY(-1px);border-color:#a9c2e1;box-shadow:var(--shadow-md)}
.quick-card .kpi-icon{width:36px;height:36px;flex:0 0 auto}
.quick-card strong{display:block;color:var(--ink-950);font-size:13px}
.quick-card small{margin-top:3px;display:block;color:var(--ink-500);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(--line);border-radius:10px;background:var(--surface-soft)}
.programme-card strong{display:block;color:var(--blue-700);font-size:12px}
.programme-card span{margin-top:6px;display:flex;justify-content:space-between;color:var(--ink-500);font-size:10px}
.programme-card b{color:var(--ink-950);font-size:14px}
.empty-state{padding:42px 24px;text-align:center}
.empty-icon{width:52px;height:52px;margin:0 auto 14px;display:grid;place-items:center;border-radius:14px;background:#eef4fb;color:#748aa5}
.empty-icon svg{width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.empty-state h3{margin:0;color:var(--ink-800);font-size:16px}
.empty-state p{max-width:490px;margin:5px auto 0;color:var(--ink-500);font-size:12px}
.loading-block{padding:48px;text-align:center;color:var(--ink-500);font-size:12px}
.loading-block::before{content:"";width:27px;height:27px;margin:0 auto 12px;display:block;border:3px solid #dbe6f2;border-top-color:var(--blue-600);border-radius:50%;animation:spin .75s linear infinite}
.error-state{padding:26px;border:1px solid #f0bdc1;border-radius:12px;background:var(--red-soft);color:#8f2530}
.error-state strong{display:block;margin-bottom:4px}

/* Filters and 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(--line);border-radius:11px;background:#fff}
.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>label,.form-field>.label{margin-bottom:6px;display:block;color:var(--ink-700);font-size:11px;font-weight:900}
.form-field .hint{margin-top:4px;color:var(--ink-500);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(--line);border-radius:9px;background:#f9fbfd;color:var(--ink-700);font-size:11px;font-weight:800}
.check-row input{width:18px;height:18px;min-height:0;margin:0;accent-color:var(--blue-600)}
.teacher-assignment-list{display:grid;gap:12px;margin-top:10px}
.teacher-assignment-row{padding:14px;background:#f8fbff;border-color:#dce7f2}
.teacher-assignment-row .form-grid{align-items:end}
.form-actions{margin-top:18px;padding-top:14px;display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px;border-top:1px solid var(--line)}
.search-wrap{position:relative}
.search-wrap svg{position:absolute;left:11px;top:50%;width:17px;height:17px;transform:translateY(-50%);fill:none;stroke:#8594a8;stroke-width:2;stroke-linecap:round}
.search-wrap input{padding-left:37px}
.segmented{padding:3px;display:inline-flex;flex-wrap:wrap;gap:3px;border:1px solid var(--line);border-radius:9px;background:#f1f4f8}
.segmented button{min-height:31px;padding:5px 10px;border:0;border-radius:6px;background:transparent;color:var(--ink-600);font-size:10px;font-weight:900}
.segmented button.active{background:#fff;color:var(--blue-700);box-shadow:0 1px 4px rgba(29,48,79,.12)}
.file-drop{position:relative;padding:26px 18px;border:1.5px dashed #9db3ce;border-radius:12px;background:#f8fbff;text-align:center;transition:border .16s,background .16s}
.file-drop.drag{border-color:var(--blue-500);background:#edf6ff}
.file-drop input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.file-drop svg{width:33px;height:33px;margin:0 auto 9px;fill:none;stroke:var(--blue-600);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.file-drop strong{display:block;color:var(--ink-800);font-size:13px}
.file-drop small{display:block;margin-top:4px;color:var(--ink-500);font-size:10px}
.import-steps{margin-bottom:16px;display:grid;grid-template-columns:repeat(3,1fr);gap:2px}
.import-step{position:relative;padding:9px;text-align:center;color:var(--ink-500);font-size:10px;font-weight:800}
.import-step::after{content:"";position:absolute;left:50%;right:-50%;top:0;height:3px;background:#dbe4ef}
.import-step:first-child::before{content:"";position:absolute;left:0;right:50%;top:0;height:3px;background:#dbe4ef}
.import-step.active{color:var(--blue-700)}
.import-step.active::after,.import-step.complete::after,.import-step.complete::before,.import-step.active::before{background:var(--blue-500)}

/* Tables */
.table-card{overflow:hidden;border:1px solid var(--line);border-radius:11px;background:#fff}
.table-toolbar{padding:12px 14px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line)}
.table-toolbar strong{color:var(--ink-800);font-size:12px}
.table-toolbar small{margin-left:6px;color:var(--ink-500)}
.table-wrap{width:100%;overflow:auto;-webkit-overflow-scrolling:touch}
table{width:100%;border-collapse:separate;border-spacing:0;font-size:11px}
th{position:sticky;top:0;z-index:1;padding:10px 11px;border-bottom:1px solid var(--line);background:#f3f6fa;color:#53637a;font-size:9px;font-weight:900;letter-spacing:.045em;text-align:left;text-transform:uppercase;white-space:nowrap}
td{padding:10px 11px;border-bottom:1px solid #e8edf4;color:var(--ink-700);vertical-align:middle}
tbody tr:last-child td{border-bottom:0}
tbody tr:hover td{background:#f9fbff}
td strong{color:var(--ink-950)}
td.muted{color:var(--ink-500)}
td.numeric,th.numeric{text-align:right}
td.center,th.center{text-align:center}
.cell-primary{display:block;color:var(--ink-950);font-weight:800}
.cell-secondary{display:block;margin-top:2px;color:var(--ink-500);font-size:9px}
.row-actions{display:flex;align-items:center;gap:5px;white-space:nowrap}
.row-action{min-width:29px;height:29px;padding:0 8px;display:inline-grid;place-items:center;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--ink-600);font-size:9px;font-weight:900}
.row-action:hover{border-color:#9fb7d5;color:var(--blue-700);background:#f4f9ff}
.row-action svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.pagination{padding:11px 13px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid var(--line);color:var(--ink-500);font-size:10px}
.pagination-buttons{display:flex;gap:5px}
.pagination button{min-width:30px;height:29px;padding:0 8px;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--ink-700);font-size:9px;font-weight:800}
.pagination button.active{border-color:var(--blue-600);background:var(--blue-600);color:#fff}

/* Status, notices and report visuals */
.status{padding:4px 7px;display:inline-flex;align-items:center;gap:5px;border-radius:999px;background:#eef2f7;color:#59697d;font-size:9px;font-weight:900;line-height:1.2;white-space:nowrap}
.status::before{content:"";width:5px;height:5px;border-radius:50%;background:currentColor}
.status--active,.status--success,.status--allow,.status--completed,.status--conducted,.status--received,.status--announced{background:var(--green-soft);color:var(--green)}
.status--pending,.status--scheduled,.status--today,.status--in-progress,.status--submitted{background:var(--amber-soft);color:var(--amber)}
.status--inactive,.status--stop,.status--rejected,.status--overdue,.status--not-sent,.status--cancelled{background:var(--red-soft);color:var(--red)}
.status--info,.status--upcoming,.status--draft{background:#eaf3ff;color:var(--blue-700)}
.status--purple{background:var(--purple-soft);color:var(--purple)}
.notice{padding:12px 14px;display:flex;gap:10px;border:1px solid #c8d9ef;border-left:4px solid var(--blue-500);border-radius:9px;background:#f1f7ff;color:#315271;font-size:11px}
.notice--warning{border-color:#efd7a3;border-left-color:#dc8a0c;background:#fff9e9;color:#775416}
.notice--danger{border-color:#f0bbc0;border-left-color:var(--red);background:var(--red-soft);color:#8c3038}
.notice--success{border-color:#b5dfcb;border-left-color:var(--green);background:var(--green-soft);color:#28664a}
.notice svg{width:18px;height:18px;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.notice+.card,.notice+*{margin-top:16px}
.metric-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));overflow:hidden;border:1px solid var(--line);border-radius:11px;background:#fff}
.metric{padding:14px;border-right:1px solid var(--line);text-align:center}
.metric:last-child{border-right:0}
.metric b{display:block;color:var(--ink-950);font-size:19px}
.metric span{display:block;color:var(--ink-500);font-size:9px;font-weight:800}
.progress-row{margin:12px 0}
.progress-copy{margin-bottom:5px;display:flex;justify-content:space-between;gap:10px;color:var(--ink-700);font-size:10px;font-weight:800}
.progress-track{height:7px;overflow:hidden;border-radius:999px;background:#e8edf4}
.progress-track span{height:100%;display:block;border-radius:inherit;background:linear-gradient(90deg,var(--blue-600),var(--cyan-400))}
.result-hero{padding:22px;display:grid;grid-template-columns:1.4fr repeat(3,minmax(110px,.6fr));gap:16px;align-items:center;border-radius:15px;color:#fff;background:linear-gradient(135deg,#09244c,#155ca8)}
.result-hero h2{margin:0;color:#fff;font-size:21px}
.result-hero p{margin:5px 0 0;color:#bad3ec;font-size:11px}
.result-score{padding-left:16px;border-left:1px solid rgba(255,255,255,.17)}
.result-score b{display:block;font-size:24px}
.result-score span{color:#acd0ec;font-size:9px;font-weight:800;text-transform:uppercase}
.subject-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.subject-card{padding:14px;border:1px solid var(--line);border-radius:11px;background:#fff;text-align:center}
.subject-card span{color:var(--ink-500);font-size:9px;font-weight:900}
.subject-card b{margin:5px 0 3px;display:block;color:var(--ink-950);font-size:20px}
.subject-card small{color:var(--ink-500);font-size:9px}
.schedule-list{display:grid;gap:10px}
.schedule-card{padding:14px;display:grid;grid-template-columns:90px minmax(180px,1.4fr) repeat(4,minmax(95px,.75fr));gap:12px;align-items:center;border:1px solid var(--line);border-radius:11px;background:#fff}
.schedule-date{padding:9px;border-radius:9px;background:#eef5ff;color:var(--blue-700);text-align:center}
.schedule-date b{display:block;font-size:17px}
.schedule-date span{font-size:9px;font-weight:900;text-transform:uppercase}
.schedule-cell strong{display:block;color:var(--ink-800);font-size:11px}
.schedule-cell span{display:block;margin-top:2px;color:var(--ink-500);font-size:9px}
.timeline{position:relative;margin-left:7px;padding-left:22px}
.timeline::before{content:"";position:absolute;left:4px;top:5px;bottom:5px;width:2px;background:#dce5ef}
.timeline-item{position:relative;padding:0 0 18px}
.timeline-item:last-child{padding-bottom:0}
.timeline-item::before{content:"";position:absolute;left:-22px;top:5px;width:10px;height:10px;border:3px solid #fff;border-radius:50%;background:var(--blue-500);box-shadow:0 0 0 1px #9ec4ec}
.timeline-item strong{display:block;color:var(--ink-800);font-size:11px}
.timeline-item span{display:block;margin-top:2px;color:var(--ink-500);font-size:9px}
.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(--line);border-radius:11px;background:#fff}
.doc-icon{width:40px;height:44px;display:grid;place-items:center;flex:0 0 auto;border-radius:8px;background:#edf4ff;color:var(--blue-700);font-size:10px;font-weight:900}
.doc-card>div:last-child,.resource-card>div:last-child{min-width:0;flex:1}
.doc-card strong,.resource-card strong{display:block;overflow:hidden;color:var(--ink-950);font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.doc-card small,.resource-card small{margin:4px 0 9px;display:block;color:var(--ink-500);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(--line);border-radius:10px;background:#fff;color:var(--ink-700);text-align:left}
.class-button:hover,.class-button.active{border-color:var(--blue-500);background:#eef6ff;color:var(--blue-700)}
.class-button strong{display:block;font-size:12px}
.class-button span{display:block;margin-top:4px;font-size:9px}

/* Modal, toast */
.app-dialog{width:min(820px,calc(100% - 24px));max-height:min(88vh,900px);padding:0;border:0;border-radius:17px;background:#fff;box-shadow:var(--shadow-lg)}
.app-dialog::backdrop{background:rgba(4,14,32,.62);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(--line)}
.dialog-shell h2{margin:0;font-size:20px;letter-spacing:-.02em}
.dialog-shell .eyebrow{margin-bottom:2px}
.dialog-body{padding:20px;overflow:auto}
.dialog-footer{padding:13px 20px;display:flex;justify-content:flex-end;gap:8px;border-top:1px solid var(--line);background:#fbfcfe}
.toast-region{position:fixed;z-index:100;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 #cbd8e8;border-radius:11px;background:#fff;color:var(--ink-800);font-size:11px;font-weight:700;box-shadow:0 15px 40px rgba(7,22,47,.2);animation:toast-in .2s ease-out;pointer-events:auto}
.toast::before{content:"";width:8px;height:8px;margin-top:4px;flex:0 0 auto;border-radius:50%;background:var(--blue-500)}
.toast.success::before{background:var(--green)}
.toast.error::before{background:var(--red)}
.toast.warning::before{background:#d98200}
.toast button{margin-left:auto;padding:0;border:0;background:transparent;color:var(--ink-500)}
@keyframes toast-in{from{transform:translateY(-8px);opacity:0}}

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

/* 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))}
  .schedule-card{grid-template-columns:82px minmax(160px,1fr) repeat(2,minmax(100px,.65fr))}
  .schedule-card>*:nth-child(5),.schedule-card>*:nth-child(6){display:none}
  .subject-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:1080px){
  .login-stage{grid-template-columns:1fr 460px}
  .login-brand-panel{padding:42px}
  .portal-view{display:block}
  .sidebar{transform:translateX(-102%);transition:transform .22s ease;box-shadow:0 0 50px rgba(0,0,0,.28)}
  .sidebar.open{transform:translateX(0)}
  .sidebar-close,.menu-toggle{display:grid}
  .portal-main{display:flex}
  .layout-main-side{grid-template-columns:1fr}
  .metric-strip{grid-template-columns:repeat(3,minmax(0,1fr))}
  .metric{border-bottom:1px solid var(--line)}
  .doc-grid,.resource-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:820px){
  :root{--topbar-height:70px}
  .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;background:radial-gradient(circle at 100% 0,rgba(41,135,245,.09),transparent 35%),#fff}
  .login-mobile-brand{margin-bottom:46px;display:flex;align-items:center;gap:11px}
  .login-mobile-brand img{width:min(210px,68vw);height:auto;object-fit:contain}
  .login-mobile-brand div{display:flex;flex-direction:column}
  .login-mobile-brand strong{font-size:15px;letter-spacing:.06em}
  .login-mobile-brand span{color:var(--blue-600);font-size:10px;font-weight:800}
  .topbar{padding:10px 14px}
  .topbar-title>span{display:none}
  .topbar-title h1{font-size:19px}
  .topbar-button-label,.account-copy{display:none}
  .topbar-button{width:40px;padding:0;justify-content:center}
  .content{padding:18px 14px}
  .page-head{align-items:flex-start;flex-direction:column}
  .page-head h2{font-size:25px}
  .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))}
  .result-hero{grid-template-columns:1fr 1fr}
  .result-hero>div:first-child{grid-column:1/-1}
  .result-score:nth-last-child(1){display:none}
  .subject-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .class-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:560px){
  .sidebar{width:min(88vw,310px)}
  .content{padding:14px 10px}
  .topbar-actions{gap:4px}
  .notification-button{display:none}
  .card{padding:15px;border-radius:10px}
  .card-head{flex-direction:column}
  .grid--2,.grid--3,.grid--4,.kpi-grid,.quick-grid,.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{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .kpi-card{padding:13px}
  .kpi-icon{width:34px;height:34px}
  .kpi-card b{font-size:23px}
  .quick-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .quick-card{min-height:105px;padding:12px;display:block}
  .quick-card .kpi-icon{margin-bottom:8px}
  .metric-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
  .metric:nth-child(even){border-right:0}
  .form-actions,.page-actions,.actions{align-items:stretch;flex-direction:column}
  .form-actions .button,.page-actions .button,.actions .button{width:100%}
  .schedule-card{grid-template-columns:68px 1fr}
  .schedule-card>*:nth-child(n+3){display:none}
  .result-hero{padding:16px;gap:12px}
  .result-score{padding-left:10px}
  .result-score b{font-size:20px}
  .subject-grid{gap:8px}
  .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%}
  .toast-region{right:10px;top:10px;width:calc(100% - 20px)}
}

/* Super Admin keeps the familiar coral selection and the requested mobile dark theme. */
body[data-portal-role="SUPER_ADMIN"] .nav-link.active{
  background:linear-gradient(100deg,#ff334f,#f22648);
  box-shadow:0 8px 22px rgba(242,38,72,.24);
}
body[data-portal-role="SUPER_ADMIN"] .nav-link.active::before{display:none}

@media(max-width:820px){
  body[data-portal-role="SUPER_ADMIN"],
  body[data-portal-role="SUPER_ADMIN"] .portal-view,
  body[data-portal-role="SUPER_ADMIN"] .portal-main,
  body[data-portal-role="SUPER_ADMIN"] .content{background:#050d1f;color:#edf5ff}
  body[data-portal-role="SUPER_ADMIN"] .topbar{
    border-color:#243a59;
    background:rgba(7,21,46,.96);
    box-shadow:0 4px 18px rgba(0,0,0,.24);
  }
  body[data-portal-role="SUPER_ADMIN"] .topbar-title h1,
  body[data-portal-role="SUPER_ADMIN"] .menu-toggle,
  body[data-portal-role="SUPER_ADMIN"] .account-button{color:#f7fbff}
  body[data-portal-role="SUPER_ADMIN"] .topbar-button,
  body[data-portal-role="SUPER_ADMIN"] .notification-button{
    border-color:#304866;
    background:#0d2448;
    color:#e7f2ff;
  }
  body[data-portal-role="SUPER_ADMIN"] .card,
  body[data-portal-role="SUPER_ADMIN"] .kpi-card,
  body[data-portal-role="SUPER_ADMIN"] .programme-card,
  body[data-portal-role="SUPER_ADMIN"] .filter-bar,
  body[data-portal-role="SUPER_ADMIN"] .table-card,
  body[data-portal-role="SUPER_ADMIN"] .metric-strip,
  body[data-portal-role="SUPER_ADMIN"] .check-row{
    border-color:#263d5c;
    background:#0a1b39;
    color:#d8e7f8;
    box-shadow:none;
  }
  body[data-portal-role="SUPER_ADMIN"] .page-head h2,
  body[data-portal-role="SUPER_ADMIN"] .card-head h3,
  body[data-portal-role="SUPER_ADMIN"] .kpi-card b,
  body[data-portal-role="SUPER_ADMIN"] .programme-card b,
  body[data-portal-role="SUPER_ADMIN"] .table-toolbar strong,
  body[data-portal-role="SUPER_ADMIN"] .cell-primary,
  body[data-portal-role="SUPER_ADMIN"] td strong,
  body[data-portal-role="SUPER_ADMIN"] .form-field>label,
  body[data-portal-role="SUPER_ADMIN"] .form-field>.label{color:#f2f7ff}
  body[data-portal-role="SUPER_ADMIN"] .page-head p,
  body[data-portal-role="SUPER_ADMIN"] .card-head p,
  body[data-portal-role="SUPER_ADMIN"] .kpi-card>span,
  body[data-portal-role="SUPER_ADMIN"] .programme-card span,
  body[data-portal-role="SUPER_ADMIN"] .cell-secondary,
  body[data-portal-role="SUPER_ADMIN"] .form-field .hint,
  body[data-portal-role="SUPER_ADMIN"] .table-toolbar small{color:#9bb1cb}
  body[data-portal-role="SUPER_ADMIN"] input,
  body[data-portal-role="SUPER_ADMIN"] select,
  body[data-portal-role="SUPER_ADMIN"] textarea{
    border-color:#38516f;
    background:#07152e;
    color:#f4f8ff;
  }
  body[data-portal-role="SUPER_ADMIN"] input::placeholder,
  body[data-portal-role="SUPER_ADMIN"] textarea::placeholder{color:#7f97b4}
  body[data-portal-role="SUPER_ADMIN"] input[readonly],
  body[data-portal-role="SUPER_ADMIN"] input:disabled,
  body[data-portal-role="SUPER_ADMIN"] select:disabled,
  body[data-portal-role="SUPER_ADMIN"] textarea:disabled{background:#102541;color:#a8b9cc}
  body[data-portal-role="SUPER_ADMIN"] .button--secondary{
    border-color:#3c5674;
    background:#10294e;
    color:#f3f8ff;
  }
  body[data-portal-role="SUPER_ADMIN"] .table-toolbar,
  body[data-portal-role="SUPER_ADMIN"] .pagination{border-color:#263d5c}
  body[data-portal-role="SUPER_ADMIN"] th{
    border-color:#294665;
    background:#0b477e;
    color:#fff;
  }
  body[data-portal-role="SUPER_ADMIN"] td{
    border-color:#263d5c;
    color:#d2e0f0;
    background:#0a1b39;
  }
  body[data-portal-role="SUPER_ADMIN"] tbody tr:hover td{background:#10294e}
  body[data-portal-role="SUPER_ADMIN"] .app-dialog{background:#07152e;color:#f2f7ff}
  body[data-portal-role="SUPER_ADMIN"] .dialog-shell>header,
  body[data-portal-role="SUPER_ADMIN"] .dialog-footer{border-color:#29415f;background:#0a1b39}
  body[data-portal-role="SUPER_ADMIN"] .dialog-shell h2{color:#fff}
  body[data-portal-role="SUPER_ADMIN"] .portal-footer{color:#718aa8}
}

/* =========================================================
   EDUHUNT OPERATOR V2.1.7 — OLD-PATTERN RESULT BATCH
========================================================= */
.op-result-classes{display:grid;gap:16px;margin-top:16px}
.op-result-class-card{background:#fff;border:1px solid var(--border,#d4deea);border-radius:16px;overflow:hidden;box-shadow:0 4px 16px rgba(21,48,82,.06)}
.op-result-class-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 16px;background:#0d5ca8;color:#fff}
.op-result-class-head strong{font-size:18px;letter-spacing:.2px;color:#fff}
.op-result-class-head .button--secondary{background:#fff!important;color:#0d5ca8!important;border-color:#fff!important}
.op-result-file-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:11px;padding:14px}
.op-result-file-card{border:1px dashed #a9bdd3;border-radius:12px;padding:12px;background:#f8fbff;min-height:158px;display:flex;flex-direction:column;gap:7px}
.op-result-file-card.required{border:2px solid #2583e3;background:#eef7ff}
.op-result-file-card.attendance{background:#fffaf0;border-color:#d6b465}
.op-result-file-card label{font-weight:900;color:#183a60;line-height:1.3}
.op-result-file-card input{width:100%;margin-top:2px}
.op-result-file-card small{display:block;font-size:11px;line-height:1.45;color:#5d7084}
.op-result-file-state{display:block;margin-top:auto;padding:7px 8px;border-radius:7px;background:#eef2f6;color:#4d6074;font-size:11px;font-weight:800;line-height:1.35;word-break:break-word}
.op-result-class-status{padding:10px 14px;border-top:1px solid #dce5ee;background:#fbfdff;color:#4f6479;font-weight:800;line-height:1.45}
.op-result-class-status.ready{background:#eaf8ee;color:#08752a}
.op-result-class-status.uploaded{background:#dcfce7;color:#166534}
.op-result-class-status.failed{background:#fff0f0;color:#a00000}
.op-result-actions{margin-top:16px}
.op-result-preview{display:grid;gap:10px;margin-top:14px}
.op-result-preview-card{margin:0!important;padding:12px!important}
.op-result-preview-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:9px 0}
.op-result-preview-kpis span{border:1px solid #ced9e5;border-radius:10px;padding:9px;text-align:center;background:#f8fbff;font-size:12px;font-weight:800}
.op-result-preview-kpis b{display:block;font-size:20px;color:#0d5ca8;margin-bottom:3px}
@media(max-width:1100px){.op-result-file-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.op-result-file-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.op-result-class-head{align-items:stretch;flex-direction:column}.op-result-class-head .button{width:100%}}
@media(max-width:520px){.op-result-file-grid,.op-result-preview-kpis{grid-template-columns:1fr}.op-result-file-card{min-height:0}}


/* =========================================================
   STUDENT RESULT + SYLLABUS V2.3-WA2 — STUDENT ROLE ONLY
========================================================= */
.student-analysis-v23{max-width:1180px;margin:0 auto}.student-v23-filter{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}.student-v23-filter button{min-height:40px;padding:8px 14px;border:1px solid #b9cce0;border-radius:999px;background:#fff;color:#0b4d86;font-weight:900;cursor:pointer}.student-v23-filter button.active{background:#0b4d86;color:#fff;border-color:#0b4d86}.student-v23-overall{display:grid;grid-template-columns:1fr 1fr;gap:22px;background:linear-gradient(135deg,#0c3263,#0c5884 62%,#0aa8b0);color:#fff;border:0}.student-v23-overall>div+div{border-left:1px solid rgba(255,255,255,.22);padding-left:22px}.student-v23-overall span{font-size:11px;font-weight:900;letter-spacing:.6px}.student-v23-overall strong{display:block;margin:7px 0;font-size:34px;color:#52efdf}.student-v23-overall small{display:block;margin-top:7px;color:#d7edf7}.student-v23-overall-track,.student-v23-track{height:10px;border-radius:999px;background:rgba(202,228,242,.28);overflow:hidden}.student-v23-overall-track i,.student-v23-track i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#27e1d2,#17a5ff)}.student-v23-overall-track.class i{background:linear-gradient(90deg,#ffc14a,#ff7d55)}.student-v23-subject-bars{margin:14px 0 20px}.student-v23-card-head{display:flex;align-items:end;justify-content:space-between;gap:14px;border-bottom:1px solid #d8e4ef;padding-bottom:12px}.student-v23-card-head h3{margin:2px 0 3px}.student-v23-card-head>strong{font-size:28px;color:#0aa69e}.student-v23-bars{display:grid;gap:7px;margin-top:11px}.student-v23-bar-row{display:grid;grid-template-columns:52px minmax(120px,.8fr) minmax(180px,2fr) 78px 92px;gap:10px;align-items:center;padding:7px 0}.student-v23-bar-row>b{color:#0b4d86}.student-v23-bar-row>strong{color:#0aa69e;text-align:right}.student-v23-bar-row>small{text-align:right;color:#6a7e91}.student-v23-formula{margin:10px 0 0;padding-top:9px;border-top:1px solid #d8e4ef;color:#6a7e91;font-size:11px;text-align:center}.student-v23-percent-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.student-v23-percent-card{padding:0;overflow:hidden}.student-v23-percent-card>summary{cursor:pointer;display:grid;grid-template-columns:1fr auto;gap:6px;padding:12px 14px;background:linear-gradient(135deg,#0a4d7f,#0a678d);color:#fff}.student-v23-percent-card>summary span{font-weight:900}.student-v23-percent-card>summary b{color:#55eee0}.student-v23-percent-card>summary small{grid-column:1/-1;color:#d7eafa}.student-v23-percent-card>div{padding:12px 14px}.student-v23-percent-row{display:grid;grid-template-columns:48px 1fr 70px 80px;gap:8px;align-items:center;padding:6px 0}.student-v23-percent-row strong{color:#0aa69e;text-align:right}.student-v23-percent-row small{text-align:right;color:#6a7e91}.student-v23-graphs{margin-top:18px}.student-v23-graph-card{padding:0;overflow:hidden;margin-bottom:11px}.student-v23-graph-card>summary{cursor:pointer;padding:12px 14px;background:linear-gradient(135deg,#0a3c66,#0c567c);color:#fff;font-weight:900}.student-v23-chart{padding:8px 8px 3px;overflow:hidden}.student-v23-chart svg{display:block;width:100%;height:auto;min-height:220px;overflow:visible}.student-v23-grid{stroke:#dfe7ef;stroke-width:1}.student-v23-line,.student-v23-line-class{fill:none;stroke:#12c9c3;stroke-width:4;stroke-linecap:round;stroke-linejoin:round}.student-v23-line-class{stroke:#ff9639}.student-v23-line-point{fill:#0aa8a0;stroke:#fff;stroke-width:3}.student-v23-line-class-point{fill:#f18428;stroke:#fff;stroke-width:3}.student-v23-scale,.student-v23-axis,.student-v23-point-label{fill:#5d7489;font-size:10px;font-weight:800}.student-v23-point-label{font-size:11px;paint-order:stroke;stroke:#fff;stroke-width:3px}.student-v23-chart>small{display:block;text-align:center;color:#6a7e91}.student-v23-legend{display:flex;justify-content:center;gap:16px;font-size:11px;font-weight:800;color:#60778d}.student-v23-legend span{display:flex;gap:5px;align-items:center}.student-v23-legend i{width:18px;height:4px;background:#12c9c3;border-radius:4px}.student-v23-legend .class i{background:#ff9639}.student-v23-result-list{display:grid;gap:13px}.student-v23-result-card{overflow:hidden}.student-v23-result-card>header{display:grid;grid-template-columns:1fr auto;gap:14px;align-items:center}.student-v23-result-card>header span{font-size:11px;font-weight:900;color:#0b4d86}.student-v23-result-card>header h3{margin:3px 0}.student-v23-result-card>header>div:last-child{text-align:right}.student-v23-result-card>header>div:last-child b,.student-v23-result-card>header>div:last-child strong{display:block}.student-v23-result-card>header>div:last-child strong{font-size:24px;color:#0aa69e}.student-v23-subject-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:8px;margin:13px 0}.student-v23-subject-strip>div{border:1px solid #d4e0eb;border-radius:10px;padding:9px;background:#f8fbff}.student-v23-subject-strip small,.student-v23-subject-strip b,.student-v23-subject-strip span{display:block}.student-v23-subject-strip b{margin:4px 0;color:#0b4d86}.student-v23-result-card>footer{display:flex;align-items:center;gap:12px;flex-wrap:wrap;border-top:1px solid #dbe5ee;padding-top:12px}.student-v23-result-card>footer span{font-size:12px}.student-v23-result-card>footer .button{margin-left:auto}.student-v23-empty{padding:18px;text-align:center;color:#687d90}.student-syllabus-v23{max-width:1180px;margin:0 auto}.student-syllabus-lock-v23{display:flex;gap:10px;align-items:center;margin-bottom:12px}.student-syllabus-lock-v23>*{padding:8px 12px;border-radius:999px;background:#e8f3ff;color:#0b4d86;font-weight:900}.student-syllabus-controls-v23{display:grid;grid-template-columns:1fr 220px;gap:14px;align-items:end;margin-bottom:15px}.student-syllabus-controls-v23 label{display:block;font-weight:900;color:#0b4d86}.student-syllabus-controls-v23 select{width:100%;min-height:42px;margin-top:6px}.student-syllabus-controls-v23>div>label{margin-bottom:6px}.student-syllabus-controls-v23>div>div{display:flex;flex-wrap:wrap;gap:7px}.student-syllabus-controls-v23 button{min-height:38px;border:1px solid #b9ccdf;border-radius:999px;background:#fff;color:#0b4d86;font-weight:900;padding:7px 12px}.student-syllabus-controls-v23 button.active{background:#0b4d86;color:#fff}.student-syllabus-cycle-v23{padding:0;overflow:hidden}.student-syllabus-cycle-v23>header{display:flex;justify-content:space-between;gap:12px;padding:14px 16px;background:linear-gradient(135deg,#0a4f80,#0a668d);color:#fff}.student-syllabus-cycle-v23>header h3{margin:3px 0}.student-syllabus-cycle-v23>header span{font-weight:900}.student-syllabus-grid-v23{display:grid;gap:0}.student-syllabus-grid-v23>article{border-top:1px solid #d6e2ed}.student-syllabus-subject-v23{padding:10px 14px;background:#eef6fc;color:#0b4d86}.student-syllabus-details-v23{display:grid;grid-template-columns:1fr 1.5fr 1fr}.student-syllabus-details-v23>div{padding:13px 14px;border-right:1px solid #d6e2ed}.student-syllabus-details-v23>div:last-child{border-right:0}.student-syllabus-details-v23 small{display:block;margin-bottom:7px;color:#0b789e;font-size:10px;font-weight:900;letter-spacing:.6px}.student-syllabus-details-v23 strong{display:block}.student-syllabus-details-v23 ul{margin:0;padding-left:18px}.student-syllabus-details-v23 li{margin:4px 0}
@media(max-width:800px){.student-v23-overall{grid-template-columns:1fr}.student-v23-overall>div+div{border-left:0;border-top:1px solid rgba(255,255,255,.22);padding:15px 0 0}.student-v23-percent-list{grid-template-columns:1fr}.student-v23-bar-row{grid-template-columns:46px 1fr 70px}.student-v23-bar-row>span{grid-column:2}.student-v23-bar-row>.student-v23-track{grid-column:1/4;grid-row:2}.student-v23-bar-row>strong{grid-column:3;grid-row:1}.student-v23-bar-row>small{grid-column:1/4;grid-row:3;text-align:left}.student-syllabus-controls-v23{grid-template-columns:1fr}.student-syllabus-details-v23{grid-template-columns:1fr}.student-syllabus-details-v23>div{border-right:0;border-bottom:1px solid #d6e2ed}.student-syllabus-details-v23>div:last-child{border-bottom:0}.student-v23-chart svg{min-height:190px}}
@media(max-width:520px){.student-v23-result-card>header{grid-template-columns:1fr}.student-v23-result-card>header>div:last-child{text-align:left}.student-v23-result-card>footer .button{width:100%;margin-left:0}.student-v23-percent-row{grid-template-columns:44px 1fr 65px}.student-v23-percent-row small{grid-column:1/-1;text-align:left}.student-v23-chart svg{min-height:175px}}
@media(max-width:1024px){body[data-portal-role="STUDENT"] .student-analysis-v23,body[data-portal-role="STUDENT"] .student-syllabus-v23{color:#eaf4ff}.student-v23-filter button{background:#0b2946;color:#dcecff;border-color:#2c5876}.student-v23-filter button.active{background:linear-gradient(135deg,#087cff,#11c9c8);color:#fff}.student-v23-subject-bars,.student-v23-percent-card,.student-v23-graph-card,.student-v23-result-card,.student-syllabus-cycle-v23{background:#08233b!important;border-color:#2a506b!important}.student-v23-card-head,.student-v23-result-card>footer{border-color:#2a506b}.student-v23-card-head h3,.student-v23-bar-row>span,.student-v23-result-card h3,.student-v23-subject-strip b,.student-syllabus-details-v23 strong,.student-syllabus-details-v23 li{color:#fff}.student-v23-track{background:#173a55}.student-v23-subject-strip>div{background:#0a2944;border-color:#2a506b}.student-v23-chart .student-v23-grid{stroke:#31516a}.student-v23-scale,.student-v23-axis,.student-v23-point-label{fill:#d9ebf7}.student-v23-point-label{stroke:#08233b}.student-v23-chart>small,.student-v23-legend{color:#b4c9da}.student-syllabus-lock-v23>*{background:#0d304d;color:#55eee1}.student-syllabus-controls-v23 label{color:#55eee1}.student-syllabus-controls-v23 button,.student-syllabus-controls-v23 select{background:#0b2946!important;color:#fff!important;border-color:#2c5876!important}.student-syllabus-controls-v23 button.active{background:linear-gradient(135deg,#0c5d9e,#0799ad)}.student-syllabus-subject-v23{background:#0c314f;color:#55eee1}.student-syllabus-details-v23>div{border-color:#2a506b}}

/* =========================================================
   EDUHUNT STUDENT RESULT R1.2 — READABLE SUBJECT CARD TEXT
   Student Portal only. Keeps existing card size/layout.
========================================================= */
body[data-portal-role="STUDENT"] .subject-card span,
body[data-portal-role="STUDENT"] .subject-card small{
  font-size:20px!important;
  line-height:1.25!important;
  font-weight:900!important;
}

body[data-portal-role="STUDENT"] .subject-card b{
  font-size:20px!important;
  line-height:1.25!important;
}

/* ========================================================================== 
   EDUHUNT V2.2.203 - PORTAL RESPONSIVE FIT R12
   Purpose:
   - Prevent right-side controls/cards from leaving the visible portal canvas.
   - Make Operator Result & Analysis five-source uploader fit the REAL content
     width after the desktop sidebar is deducted.
   - Add safe min-width/max-width rules shared by all six authenticated portals.
   - Preserve intentional table scrolling inside .table-wrap.
   ========================================================================== */

/* Shared six-portal width safety. Grid/flex children must be allowed to shrink. */
body[data-portal-role] .portal-view,
body[data-portal-role] .portal-main,
body[data-portal-role] .content,
body[data-portal-role] .page-head,
body[data-portal-role] .card,
body[data-portal-role] .card-head,
body[data-portal-role] .table-card,
body[data-portal-role] .form-grid,
body[data-portal-role] .form-field,
body[data-portal-role] .form-actions,
body[data-portal-role] .filter-bar {
  min-width:0;
}

body[data-portal-role] .content > * {
  max-width:100%;
  box-sizing:border-box;
}

body[data-portal-role] .form-field input,
body[data-portal-role] .form-field select,
body[data-portal-role] .form-field textarea,
body[data-portal-role] .form-field button,
body[data-portal-role] .form-actions .button {
  max-width:100%;
  box-sizing:border-box;
}

/* Keep wide data tables locally scrollable instead of widening the whole page. */
body[data-portal-role] .table-wrap {
  max-width:100%;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;
}

/* OPERATOR / SUPER ADMIN Result & Analysis file upload cards.
   auto-fit reacts to the available CONTENT width, so a desktop with a large
   sidebar never loses the fifth card or the right-side action buttons. */
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-class-card {
  width:100%;
  max-width:100%;
  min-width:0;
  overflow:hidden;
  box-sizing:border-box;
}

body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-grid {
  width:100%;
  max-width:100%;
  min-width:0;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr)) !important;
  gap:11px;
  box-sizing:border-box;
}

body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card {
  width:100%;
  min-width:0;
  max-width:100%;
  overflow:hidden;
  box-sizing:border-box;
}

body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card input[type="file"] {
  display:block;
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  box-sizing:border-box;
  overflow:hidden;
  font-size:12px;
}

body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card input[type="file"]::file-selector-button {
  max-width:100%;
  padding:7px 9px;
  margin-right:7px;
  white-space:nowrap;
}

body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-class-card > .form-actions {
  width:100%;
  max-width:100%;
  min-width:0;
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
  box-sizing:border-box;
}

body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-class-card > .form-actions .button {
  min-width:0;
  max-width:100%;
  white-space:normal;
  text-align:center;
}

/* Small laptops / browser zoom: make upload actions easy to reach. */
@media (max-width:980px) {
  body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-grid {
    grid-template-columns:repeat(auto-fit,minmax(min(210px,100%),1fr)) !important;
  }
}

@media (max-width:620px) {
  body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-grid {
    grid-template-columns:1fr !important;
    padding-left:10px;
    padding-right:10px;
  }
  body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-class-card > .form-actions {
    flex-direction:column;
    align-items:stretch;
  }
  body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-class-card > .form-actions .button {
    width:100%;
  }
}

/* ========================================================================== 
   EDUHUNT V2.2.205 - RESULT UPLOAD PERFECT FIT R14
   Affected screen: OPERATOR / SUPER ADMIN Result & Analysis uploader.
   Fixes a real desktop clipping case where the fixed sidebar reduced the
   usable panel width but the five upload inputs still forced one long row.
   ========================================================================== */

/* The authenticated shell itself must never become wider than the viewport. */
html,
body{
  max-width:100%;
}

body[data-portal-role="OPERATOR"],
body[data-portal-role="SUPER_ADMIN"]{
  overflow-x:hidden!important;
}

@media (min-width:1025px){
  body[data-portal-role="OPERATOR"] #portalView.portal-view,
  body[data-portal-role="SUPER_ADMIN"] #portalView.portal-view{
    width:100vw!important;
    max-width:100vw!important;
    min-width:0!important;
  }

  body[data-portal-role="OPERATOR"] .portal-main,
  body[data-portal-role="SUPER_ADMIN"] .portal-main{
    width:calc(100vw - var(--sidebar-width,252px))!important;
    max-width:calc(100vw - var(--sidebar-width,252px))!important;
    min-width:0!important;
  }

  body[data-portal-role="OPERATOR"] .topbar,
  body[data-portal-role="OPERATOR"] .content,
  body[data-portal-role="OPERATOR"] .portal-footer,
  body[data-portal-role="SUPER_ADMIN"] .topbar,
  body[data-portal-role="SUPER_ADMIN"] .content,
  body[data-portal-role="SUPER_ADMIN"] .portal-footer{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
}

/* Do not use 5 forced columns. Four is the safe desktop maximum inside a
   sidebar layout. The fifth source simply wraps to the next line. */
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:visible!important;
  gap:11px!important;
  padding:14px!important;
}

body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-grid > *,
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card{
  min-width:0!important;
  width:auto!important;
  max-width:100%!important;
}

/* Native file inputs have a large intrinsic minimum width in Chromium.
   Neutralise that intrinsic width so the grid cell, not the browser widget,
   decides the card width. */
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card input[type="file"]{
  display:block!important;
  inline-size:100%!important;
  width:100%!important;
  min-inline-size:0!important;
  min-width:0!important;
  max-inline-size:100%!important;
  max-width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card input[type="file"]::file-selector-button{
  max-width:112px!important;
  padding:7px 8px!important;
  margin-right:6px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

/* Keep status + action area inside the same visible panel. */
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-class-status,
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-class-card > .form-actions{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}

body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-class-card > .form-actions{
  display:flex!important;
  flex-wrap:wrap!important;
  justify-content:flex-end!important;
  align-items:center!important;
  gap:10px!important;
  overflow:visible!important;
}

body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-class-card > .form-actions .button{
  flex:0 1 auto!important;
  min-width:0!important;
  max-width:100%!important;
  white-space:normal!important;
}

/* Smaller laptops and browser zoom levels. Breakpoints use viewport width,
   while the 4-column desktop ceiling protects the sidebar-reduced canvas. */
@media (max-width:1320px){
  body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}

@media (max-width:1024px){
  body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media (max-width:620px){
  body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-grid{
    grid-template-columns:1fr!important;
    padding:10px!important;
  }
  body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-class-card > .form-actions{
    flex-direction:column!important;
    align-items:stretch!important;
  }
  body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-class-card > .form-actions .button{
    width:100%!important;
  }
}

/* ========================================================================== 
   EDUHUNT V2.2.206 - RESULT UPLOAD SAFE GRID R15
   Deterministic repair for Operator/Super Admin Result & Analysis.
   Maximum three upload cards per row. The fourth card can never be clipped.
   ========================================================================== */
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-class-card{
  container-type:inline-size;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-auto-flow:row!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  gap:11px!important;
  padding:14px!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-grid > *,
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card,
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card > *{
  min-width:0!important;
  min-inline-size:0!important;
  max-width:100%!important;
  max-inline-size:100%!important;
  box-sizing:border-box!important;
}
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card label,
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card small,
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-state{
  overflow-wrap:anywhere!important;
}
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card input[type="file"]{
  display:block!important;
  width:100%!important;
  inline-size:100%!important;
  min-width:0!important;
  min-inline-size:0!important;
  max-width:100%!important;
  max-inline-size:100%!important;
  overflow:hidden!important;
  white-space:nowrap!important;
  text-overflow:ellipsis!important;
}
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-class-card > .form-actions{
  display:grid!important;
  grid-template-columns:minmax(0,230px) minmax(0,230px)!important;
  justify-content:end!important;
  align-items:stretch!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  gap:10px!important;
  padding:12px!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-class-card > .form-actions .button{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  margin:0!important;
  white-space:normal!important;
}
@media (max-width:1100px){
  body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media (max-width:680px){
  body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-grid{
    grid-template-columns:1fr!important;
    padding:10px!important;
  }
  body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-class-card > .form-actions{
    grid-template-columns:1fr!important;
  }
}

/* ========================================================================== 
   EDUHUNT V2.2.208 - RESULT HISTORY STABLE R17
   Cross-desktop repair:
   1) Preview / Upload controls stay on the LEFT, away from the scrollbar edge.
   2) Class and Section buttons WRAP inside their card instead of horizontal clipping.
   3) Result uploader remains a deterministic max-3-column grid.
   ========================================================================== */
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-class-card{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}

/* Keep the five source cards deterministic on every desktop. */
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}

/* LEFT-ALIGNED action area. Never park an important button beside the right scrollbar. */
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-class-card > .form-actions.op-result-main-actions,
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-class-card > .form-actions{
  display:grid!important;
  grid-template-columns:minmax(0,210px) minmax(0,210px)!important;
  justify-content:start!important;
  justify-items:stretch!important;
  align-items:stretch!important;
  gap:10px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  padding:12px 14px 16px!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-class-card > .form-actions.op-result-main-actions .button,
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-class-card > .form-actions .button{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  margin:0!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  text-align:center!important;
}

/* Class / Section choices are scope controls, not a horizontal carousel. */
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) #opResultClassButtons,
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) #opResultSectionButtons,
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-scope-buttons{
  display:flex!important;
  flex-wrap:wrap!important;
  justify-content:flex-start!important;
  align-items:stretch!important;
  gap:10px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:visible!important;
  box-sizing:border-box!important;
}
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) #opResultClassButtons > .button,
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) #opResultSectionButtons > .button{
  flex:1 1 220px!important;
  min-width:0!important;
  max-width:100%!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  line-height:1.25!important;
}

/* Chromium file widgets have intrinsic widths. Keep them subordinate to the card. */
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card input[type="file"]{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card input[type="file"]::file-selector-button{
  max-width:108px!important;
  padding:7px 8px!important;
  margin-right:6px!important;
}

@media (max-width:1100px){
  body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media (max-width:680px){
  body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-grid{
    grid-template-columns:1fr!important;
    padding:10px!important;
  }
  body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-class-card > .form-actions.op-result-main-actions,
  body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-class-card > .form-actions{
    grid-template-columns:1fr!important;
  }
  body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) #opResultClassButtons > .button,
  body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) #opResultSectionButtons > .button{
    flex-basis:100%!important;
  }
}

/* ========================================================================== 
   EDUHUNT V2.2.209 - RESULT HISTORY DOWNLOAD + STRICT SLOT LOCK R18
   Uploaded Result & Analysis slots are visibly locked until Replace is ON.
   ========================================================================== */
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card.upload-locked{
  border-style:solid!important;
  border-color:#607b91!important;
  background:color-mix(in srgb,var(--surface,#071a2d) 86%,#94a3b8 14%)!important;
  opacity:.78;
}
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card.upload-locked input[type="file"]{
  cursor:not-allowed!important;
  opacity:.55!important;
  filter:saturate(.45)!important;
}
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card.upload-locked .op-result-file-state{
  background:#263d50!important;
  color:#f7fbff!important;
  border:1px solid #66839b!important;
  letter-spacing:.02em;
}
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card.replace-enabled{
  border-style:solid!important;
  border-color:#f0a52b!important;
  box-shadow:0 0 0 2px rgba(240,165,43,.12)!important;
}
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card.replace-enabled .op-result-file-state{
  background:#62420b!important;
  color:#fff3d0!important;
  border:1px solid #f0a52b!important;
}
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) [data-op-result-history-school-search]{
  flex:0 0 auto!important;
  min-width:96px!important;
}
@media (max-width:620px){
  body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) [data-op-result-history-school-search]{
    min-width:84px!important;
  }
}

/* ========================================================================== 
   EDUHUNT V2.2.210 - AUTHORITATIVE RESULT SLOT SYNC R19
   Exact server status, fail-closed upload controls and high-contrast states.
   ========================================================================== */
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card.upload-ready{
  border-style:solid!important;
  border-color:#2aa86b!important;
  box-shadow:inset 0 0 0 1px rgba(42,168,107,.12)!important;
}
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card.upload-ready .op-result-file-state{
  background:#0d5c3b!important;
  color:#f4fff9!important;
  border:1px solid #44d28f!important;
}
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card.upload-locked{
  opacity:1!important;
  border-style:solid!important;
  border-color:#7895ad!important;
  background:#14283a!important;
  color:#f7fbff!important;
}
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card.upload-locked > label{
  color:#ffffff!important;
}
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card.upload-locked > small{
  color:#d9e7f2!important;
}
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card.status-checking{
  opacity:1!important;
  border:2px solid #e8a21a!important;
  background:#2d260f!important;
  color:#fff7da!important;
}
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card.status-checking input[type="file"],
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card.status-error input[type="file"]{
  pointer-events:none!important;
  cursor:not-allowed!important;
  opacity:.45!important;
}
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card.status-checking .op-result-file-state{
  background:#75520c!important;
  color:#fff8df!important;
  border:1px solid #ffc857!important;
}
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card.status-error{
  opacity:1!important;
  border:2px solid #e25656!important;
  background:#361719!important;
  color:#fff4f4!important;
}
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card.status-error > label,
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card.status-error > small{
  color:#fff4f4!important;
}
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-file-card.status-error .op-result-file-state{
  background:#7e1f25!important;
  color:#ffffff!important;
  border:1px solid #ff8585!important;
}
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-slot-status-notice{
  max-width:100%!important;
  overflow-wrap:anywhere!important;
}
body:is([data-portal-role="OPERATOR"],[data-portal-role="SUPER_ADMIN"]) .op-result-class-status.checking{
  background:#6f4e0b!important;
  color:#fff7dd!important;
  border-color:#e8a21a!important;
}


/* EDUHUNT V2.2.273 R44 — Super Admin / Operator dashboard KPI single-row rule.
   Font sizes are intentionally untouched; only card footprint/gaps are compacted. */
.sa-dashboard-kpis,.operator-dashboard-kpis{display:grid!important;gap:10px!important;align-items:stretch;width:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;padding-bottom:2px}
.sa-dashboard-kpis{grid-template-columns:repeat(5,minmax(0,1fr))!important}
.operator-dashboard-kpis{grid-template-columns:repeat(6,minmax(0,1fr))!important}
.sa-dashboard-kpis .kpi-card,.operator-dashboard-kpis .kpi-card{min-width:0!important;padding:12px 10px!important}
@media(max-width:900px){.sa-dashboard-kpis{grid-template-columns:repeat(5,minmax(125px,1fr))!important}.operator-dashboard-kpis{grid-template-columns:repeat(6,minmax(125px,1fr))!important}.sa-dashboard-kpis .kpi-card,.operator-dashboard-kpis .kpi-card{padding:10px 8px!important}}
@media(max-width:560px){.sa-dashboard-kpis{grid-template-columns:repeat(5,minmax(118px,1fr))!important}.operator-dashboard-kpis{grid-template-columns:repeat(6,minmax(118px,1fr))!important}.sa-dashboard-kpis,.operator-dashboard-kpis{gap:7px!important}}
