@import url('https://fonts.googleapis.com/css2?family=Anuphan:wght@400;500;600;700&display=swap');
:root{--bg:#f5f7fb;--card:#fff;--text:#172033;--muted:#667085;--line:#e5e7eb;--brand:#135846;--brand2:#0f766e;--danger:#b42318;--warn:#fff4e5}*{box-sizing:border-box}body{margin:0;font-family:Anuphan,system-ui,sans-serif;color:var(--text);background:var(--bg)}a{color:var(--brand);text-decoration:none}.bg{background:linear-gradient(135deg,#eef8f4,#f7f8fc)}.container{max-width:1180px;margin:auto;padding:28px}.topbar{height:68px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 28px;position:sticky;top:0;z-index:20}.topbar nav{display:flex;gap:18px;align-items:center}.tag{font-size:11px;background:#eef5f3;color:var(--brand);padding:4px 8px;border-radius:999px;margin-left:10px}.card{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:22px;box-shadow:0 8px 30px rgba(16,24,40,.05)}.login-wrap,.setup-wrap{min-height:100vh;display:grid;place-items:center;padding:24px}.login-card,.setup-card{width:min(460px,100%)}.setup-card{width:min(680px,100%)}.brand-mark{width:58px;height:58px;border-radius:16px;display:grid;place-items:center;background:var(--brand);color:#fff;font-weight:800;letter-spacing:1px}.muted{color:var(--muted)}.small{font-size:12px}.stack{display:grid;gap:14px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.form-grid h3,.form-grid .full{grid-column:1/-1}label{display:grid;gap:7px;font-size:14px;font-weight:600}input,textarea,select{width:100%;padding:11px 13px;border:1px solid #d0d5dd;border-radius:11px;font:inherit;background:#fff}textarea{min-height:90px;resize:vertical}.check{display:flex;align-items:center;gap:8px}.check input{width:auto}.btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid #cfd6dd;border-radius:11px;padding:10px 14px;background:#fff;color:#273142;font:inherit;font-weight:700;cursor:pointer}.btn.primary{background:var(--brand);border-color:var(--brand);color:#fff}.btn.danger{background:var(--danger);border-color:var(--danger);color:#fff}.btn.big{padding:13px 18px;font-size:16px}.alert{padding:12px 14px;border-radius:11px;background:#f2f4f7;margin:12px 0}.alert.danger{background:#fef3f2;color:#b42318}.alert.success{background:#ecfdf3;color:#067647}.hero{padding:22px 0 12px}.hero h1{font-size:34px;margin:0 0 6px}.grid.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}.eyebrow{font-size:12px;color:var(--brand);font-weight:800;text-transform:uppercase}.meta{margin:16px 0}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;max-width:760px}.stat{background:#fff;border:1px solid var(--line);border-radius:16px;padding:22px}.stat b{font-size:30px;display:block}.stat span{color:var(--muted)}.row-between{display:flex;justify-content:space-between;align-items:center;gap:16px}.split{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:22px}.table-wrap{overflow:auto;background:#fff;border:1px solid var(--line);border-radius:16px}table{border-collapse:collapse;width:100%;min-width:760px}th,td{padding:13px 14px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}th{background:#f8fafc;font-size:13px;color:#475467}.actions{display:flex;gap:10px;flex-wrap:wrap}.code{font-family:ui-monospace,monospace;font-size:16px;font-weight:800;letter-spacing:1px;background:#eef5f3;padding:5px 9px;border-radius:8px}.badge{display:inline-block;padding:4px 8px;border-radius:999px;font-size:12px;background:#f2f4f7}.badge.open,.badge.in_progress{background:#ecfdf3;color:#067647}.badge.closed,.badge.forced,.badge.expired{background:#fef3f2;color:#b42318}.narrow{max-width:780px;margin:auto}.center{text-align:center}.exam-rules{display:grid;gap:8px;text-align:left;background:#f8fafc;border-radius:14px;padding:16px;margin:18px 0}.qcard{margin-bottom:12px}.link{background:none;border:0;font:inherit;cursor:pointer}.danger-text{color:var(--danger)}.flag-row{background:#fff7ed}.score-big{font-size:38px;font-weight:800;color:var(--brand);margin:16px}.exam-body{background:#f3f5f8}.exam-head{height:64px;background:#fff;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;padding:0 22px;position:sticky;top:0;z-index:30}.timer{font-size:22px;font-weight:800;font-variant-numeric:tabular-nums}.exam-shell{display:grid;grid-template-columns:210px minmax(0,820px);gap:22px;max-width:1080px;margin:22px auto;padding:0 18px}.navigator{position:sticky;top:86px;align-self:start;background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px}.nav-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:7px;margin:12px 0}.nav-dot{aspect-ratio:1;display:grid;place-items:center;border:1px solid var(--line);border-radius:8px;font-size:12px;color:#344054}.nav-dot.answered{background:#ecfdf3;border-color:#abefc6}.small-btn{width:100%;font-size:12px;margin-bottom:10px}.question-card{background:#fff;border:1px solid var(--line);border-radius:17px;padding:22px;margin-bottom:15px}.question-card h3{display:flex;justify-content:space-between}.question-card h3 span{font-size:12px;color:var(--muted);font-weight:500}.qtext{font-size:17px;line-height:1.7}.choice{display:flex;grid-template:none;align-items:flex-start;gap:8px;padding:11px;border:1px solid #eaecf0;border-radius:11px;margin:8px 0;font-weight:400;cursor:pointer}.choice input{width:auto;margin-top:4px}.text-answer{min-height:120px}.submit-panel{text-align:center;padding:24px}.toast{position:fixed;right:18px;bottom:18px;background:#172033;color:#fff;padding:10px 14px;border-radius:10px;opacity:0;transform:translateY(10px);transition:.2s;pointer-events:none}.toast.show{opacity:1;transform:none}@media(max-width:820px){.topbar{height:auto;align-items:flex-start;padding:14px 16px;gap:10px}.topbar nav{gap:10px;flex-wrap:wrap}.container{padding:18px}.split,.form-grid,.stats{grid-template-columns:1fr}.form-grid h3,.form-grid .full{grid-column:auto}.exam-shell{grid-template-columns:1fr}.navigator{position:static}.nav-grid{grid-template-columns:repeat(8,1fr)}.hero h1{font-size:28px}}@media(max-width:520px){.nav-grid{grid-template-columns:repeat(6,1fr)}.exam-head{padding:0 12px}.exam-head .muted{display:none}.question-card{padding:16px}}
.external-shell{max-width:1280px;margin:18px auto;padding:0 18px}.external-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;background:#fff;border:1px solid var(--line);border-radius:14px 14px 0 0;padding:12px 14px}.external-toolbar .small-btn{width:auto;margin:0}.external-frame-wrap{height:calc(100vh - 205px);min-height:520px;background:#fff;border-left:1px solid var(--line);border-right:1px solid var(--line)}.external-frame{width:100%;height:100%;border:0;background:#fff}.external-exam .submit-panel{background:#fff;border:1px solid var(--line);border-radius:0 0 14px 14px;padding:14px}.external-exam .submit-panel p{margin-top:0}@media(max-width:720px){.external-toolbar{align-items:flex-start;flex-direction:column}.external-frame-wrap{height:calc(100vh - 260px);min-height:500px}.external-toolbar .actions{width:100%}.external-toolbar .btn{flex:1}}

.preflight-list{display:grid;gap:10px;margin:18px 0}.check-row{display:flex;justify-content:space-between;gap:14px;padding:13px 14px;border:1px solid var(--line);border-radius:12px;background:#f8fafc}.check-row.ok{background:#ecfdf3;border-color:#abefc6}.check-row.warn{background:#fff7ed;border-color:#fed7aa}.security-overlay{display:none;position:fixed;inset:0;background:rgba(15,23,42,.82);z-index:9999;align-items:center;justify-content:center;padding:20px}.security-overlay.active{display:flex}.security-box{width:min(460px,100%);background:#fff;border-radius:20px;padding:28px;text-align:center;box-shadow:0 24px 80px rgba(0,0,0,.28)}.security-box .shield{font-size:46px}.security-box h2{margin:8px 0}.code-list{display:grid;gap:8px;margin:12px 0}.code-list>div{padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#f8fafc}.readable{line-height:1.8;padding-left:22px}.badge.not_started{background:#f2f4f7;color:#475467}

.exam-head-right{display:flex;align-items:center;gap:9px}.sync-pill{display:inline-flex;align-items:center;padding:5px 8px;border-radius:999px;background:#f2f4f7;color:#475467;font-size:11px;font-weight:700}.sync-pill.ok{background:#ecfdf3;color:#067647}.sync-pill.warn{background:#fff7ed;color:#b54708}.sync-pill.bad{background:#fef3f2;color:#b42318}.monitor-stats{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:10px;margin:14px 0}.mini-stat{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px}.mini-stat b{font-size:26px;display:block}.mini-stat span{font-size:12px;color:var(--muted)}.mini-stat.issue{background:#fff7ed;border-color:#fed7aa}.live-dot{font-size:11px;font-weight:700;padding:4px 7px;border-radius:999px;background:#f2f4f7}.live-dot.live{background:#ecfdf3;color:#067647}.live-dot.warn{background:#fff7ed;color:#b54708}.live-dot.offline{background:#fef3f2;color:#b42318}@media(max-width:820px){.monitor-stats{grid-template-columns:repeat(2,1fr)}.exam-head-right{gap:5px}.sync-pill{display:none}}

/* =========================================================
   AIAS Secure Exam v7 — Official UI Refresh
   ========================================================= */
:root{
 --bg:#f4f7fb;--card:#fff;--text:#13223b;--muted:#6b778c;--line:#e4eaf1;
 --brand:#078b86;--brand2:#04766f;--brand-soft:#e8f7f5;--navy:#14233d;
 --gold:#d7a32a;--danger:#c5362f;--warn:#fff6e8;--shadow:0 12px 36px rgba(17,35,63,.07)
}
body{background:linear-gradient(180deg,#f7f9fc 0,#f3f7fb 100%);color:var(--text)}
a{transition:color .18s ease,background .18s ease,border-color .18s ease,transform .18s ease,box-shadow .18s ease}
.container{max-width:1580px;padding:30px 36px 46px}
.card,.table-wrap{box-shadow:var(--shadow)}
.btn{gap:9px;border-color:#dfe5ec;border-radius:12px;padding:10px 16px;color:#25344d;box-shadow:0 2px 7px rgba(15,23,42,.03)}
.btn:hover{transform:translateY(-1px);box-shadow:0 7px 18px rgba(15,23,42,.08)}
.btn.primary{background:linear-gradient(135deg,#07958f,#057b75);border-color:transparent;color:#fff;box-shadow:0 10px 22px rgba(7,139,134,.18)}
.btn.compact{padding:8px 13px;font-size:13px}
.btn-icon,.nav-icon,.panel-title-icon{display:inline-grid;place-items:center;flex:none}
.btn-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* Official header */
.topbar{height:auto;min-height:92px;padding:0;background:rgba(255,255,255,.98);border-bottom:1px solid #e6ebf1;box-shadow:0 2px 14px rgba(19,34,59,.035);backdrop-filter:blur(12px)}
.topbar-inner{width:100%;max-width:1660px;margin:auto;padding:0 34px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.app-brand{display:flex;align-items:center;min-width:0;color:var(--navy);white-space:nowrap}
.app-brand:hover{color:var(--navy)}
.app-brand img{width:420px;height:auto;display:block;object-fit:contain}
.app-brand-divider{width:1px;height:36px;background:#e0b34d;margin:0 22px}
.app-brand-title{font-size:17px;font-weight:700;letter-spacing:-.1px}
.tag{font-size:11px;background:#edf7f6;color:#10746f;padding:5px 9px;border-radius:999px;margin-left:10px;font-weight:700;letter-spacing:.3px}
.main-nav{display:flex;align-items:stretch!important;gap:3px!important;white-space:nowrap}
.nav-link{height:91px;padding:0 12px;display:flex;align-items:center;gap:8px;color:#384860!important;font-size:14px;font-weight:600;border-bottom:3px solid transparent;position:relative}
.nav-link:hover{color:var(--brand)!important;background:#f8fbfb}
.nav-link.active{color:var(--brand)!important;border-bottom-color:var(--brand)}
.nav-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nav-separator{width:1px;height:30px;background:#e4e9ef;margin:31px 8px 0}
.nav-link.logout{color:#526075!important}
.app-footer{max-width:1580px;margin:0 auto;padding:0 36px 28px;display:flex;justify-content:space-between;gap:20px;color:#98a2b3;font-size:11px}

/* Dashboard hero */
.dashboard-hero{min-height:320px;border:1px solid #e9eef4;border-radius:0 0 24px 24px;background:#fff;overflow:hidden;display:grid;grid-template-columns:minmax(560px,1.12fr) minmax(500px,.88fr);position:relative;margin:-30px -36px 0;box-shadow:0 8px 25px rgba(15,23,42,.035)}
.dashboard-hero:after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(116deg,transparent 0 54%,rgba(7,139,134,.05) 54.2% 61%,transparent 61.2%),linear-gradient(116deg,transparent 0 59%,rgba(215,163,42,.045) 59.2% 64%,transparent 64.2%)}
.dashboard-hero-content{padding:52px 26px 42px 56px;position:relative;z-index:2;display:flex;flex-direction:column;justify-content:center}
.section-kicker{font-size:11px;letter-spacing:1.8px;color:var(--brand);font-weight:800;text-transform:uppercase;margin-bottom:7px}
.dashboard-hero h1{font-size:44px;line-height:1.08;letter-spacing:-1.6px;margin:0 0 9px;color:#10213b}
.hero-lead{font-size:20px;line-height:1.6;margin:0 0 7px;color:#34455e;font-weight:500}
.hero-sub{font-size:14px;line-height:1.75;margin:0;color:#718096}
.hero-actions{display:flex;gap:12px;margin-top:24px}.hero-actions .btn{min-width:160px}
.dashboard-hero-visual{position:relative;background-image:linear-gradient(90deg,#fff 0%,rgba(255,255,255,.65) 10%,rgba(255,255,255,.12) 38%,rgba(255,255,255,.05) 100%),url('aias-building.jpg');background-size:cover;background-position:center 48%;min-height:320px}
.dashboard-hero-visual:before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.18));pointer-events:none}
.dashboard-hero-visual:after{content:"";position:absolute;right:0;top:0;width:130px;height:100%;opacity:.22;background-image:linear-gradient(30deg,rgba(7,139,134,.14) 12%,transparent 12.5%,transparent 87%,rgba(7,139,134,.14) 87.5%),linear-gradient(150deg,rgba(7,139,134,.14) 12%,transparent 12.5%,transparent 87%,rgba(7,139,134,.14) 87.5%);background-size:28px 48px}
.hero-quote{position:absolute;right:48px;top:72px;z-index:2;padding:0 0 14px;color:#536277;text-shadow:0 1px 2px rgba(255,255,255,.8)}
.hero-quote:after{content:"";position:absolute;left:0;bottom:0;width:48px;height:3px;background:var(--gold);border-radius:3px}
.hero-quote span,.hero-quote strong{display:block;font-weight:500;font-size:16px;line-height:1.55}.hero-quote strong{font-weight:600}

/* KPI cards */
.dashboard-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin:0 18px;transform:translateY(-1px);position:relative;z-index:3;padding-top:0}
.dash-stat-card{min-height:122px;background:rgba(255,255,255,.97);border:1px solid #e2e8ef;border-radius:16px;padding:20px 22px;display:flex;align-items:center;gap:18px;color:var(--text);box-shadow:0 12px 28px rgba(28,45,72,.07)}
a.dash-stat-card:hover{color:var(--text);border-color:#d3e5e3;transform:translateY(-2px);box-shadow:0 16px 34px rgba(28,45,72,.11)}
.stat-icon{width:76px;height:76px;border-radius:17px}.stat-icon svg{width:34px;height:34px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.stat-icon.teal{background:#dcf6f1;color:#078b86}.stat-icon.blue{background:#e8f3ff;color:#1471c9}.stat-icon.amber{background:#fff1d4;color:#d39317}.stat-icon.violet{background:#f0eaff;color:#7653d6}
.stat-copy{display:flex;flex-direction:column;gap:2px}.stat-copy b{font-size:32px;line-height:1;font-weight:750;color:#11233e}.stat-copy span{font-size:15px;color:#53637a}
.stat-arrow{margin-left:auto;font-size:34px;font-weight:200;color:#41536b;line-height:1}
.status-pill{display:inline-flex;align-items:center;gap:7px;border-radius:999px;padding:6px 10px;font-size:11px;font-weight:700;white-space:nowrap;margin-left:auto}.status-pill.live{background:#e7f8ee;color:#198754}.status-pill i{display:block;width:7px;height:7px;border-radius:50%;background:currentColor;box-shadow:0 0 0 3px rgba(25,135,84,.08)}

/* Dashboard panels */
.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.75fr) minmax(380px,1fr);gap:20px;margin:22px 18px 0}
.dashboard-panel{background:#fff;border:1px solid #e3e9ef;border-radius:18px;box-shadow:0 10px 30px rgba(24,39,64,.055);overflow:hidden}
.panel-head{min-height:72px;padding:17px 20px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #eef2f6}
.panel-head>div{display:flex;align-items:center;gap:10px}.panel-head h2{font-size:18px;margin:0;color:#162640}.panel-title-icon{width:28px;height:28px;color:var(--brand)}.panel-title-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.panel-title-icon.pulse{color:#008a84}
.dashboard-table-wrap{overflow:auto}.dashboard-table{min-width:760px}.dashboard-table th{padding:13px 17px;background:#f6f8fb;color:#59687e;font-size:12px;font-weight:700}.dashboard-table td{padding:14px 17px;font-size:13px;color:#3c4c64}.dashboard-table td strong{display:block;color:#17263f;margin-bottom:3px}.dashboard-table td small{display:block;color:#8a95a6}.dashboard-table tr:last-child td{border-bottom:0}.manage-link{font-weight:700;color:var(--brand)}
.exam-status{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:700;background:#f2f4f7;color:#596579}.exam-status.open{background:#e8f7ef;color:#1a7f52}.exam-status.draft{background:#f1f3f6;color:#697386}.exam-status.closed{background:#fff0ef;color:#b5473f}
.dashboard-empty{min-height:260px;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:30px;color:#8390a3}.dashboard-empty strong{color:#58677c;margin-top:12px;font-size:15px}.dashboard-empty p{margin:6px 0 16px;font-size:13px}.empty-icon{width:58px;height:58px;border-radius:16px;background:#f4f7fa;color:#b2bdca;display:grid;place-items:center}.empty-icon svg{width:32px;height:32px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.empty-icon.users{border-radius:50%}
.realtime-head{align-items:flex-start}.last-update{font-size:10px;color:#9aa4b2;margin-top:4px;white-space:nowrap}.realtime-summary{margin:16px 18px 10px;border-radius:14px;background:linear-gradient(135deg,#eaf9f6,#f3fbfa);min-height:105px;padding:20px;display:flex;align-items:center;justify-content:space-between;gap:16px}.realtime-summary>div{display:flex;flex-direction:column}.realtime-summary b{font-size:32px;line-height:1;color:#14263e}.realtime-summary span:not(.status-pill){font-size:13px;color:#607087;margin-top:7px}.live-list{padding:0 18px 17px}.live-item{display:flex;align-items:center;gap:11px;padding:12px 4px;border-bottom:1px solid #eef2f6;color:var(--text)}.live-item:last-child{border-bottom:0}.live-item:hover{background:#fbfcfd}.live-avatar{width:38px;height:38px;border-radius:12px;background:#e9f7f5;color:#087e78;display:grid;place-items:center;font-weight:800}.live-info{min-width:0;display:flex;flex-direction:column;flex:1}.live-info strong{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.live-info small{font-size:10px;color:#8a96a8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.live-list .live-dot{font-size:9px}.realtime-empty{min-height:165px;margin:0 18px 18px;background:#f9fafc;border-radius:14px}.realtime-empty p{margin-bottom:0}

/* Student home */
.student-hero{background:linear-gradient(135deg,#eef9f7,#fff);border:1px solid #e2ecea;border-radius:22px;padding:34px 38px;margin-bottom:20px;display:flex;align-items:center;justify-content:space-between;overflow:hidden}.student-hero h1{font-size:36px;margin:3px 0 6px}.student-hero p{margin:0;color:#66758b}.student-hero-mark{width:100px;height:100px;border-radius:28px;background:#dff4f0;color:var(--brand);display:grid;place-items:center}.student-hero-mark svg{width:52px;height:52px;fill:none;stroke:currentColor;stroke-width:1.5}.exam-card-grid{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}.exam-card{border-top:3px solid #dbeeea}.empty-card{grid-column:1/-1}

/* Login / activation */
.bg{background:linear-gradient(90deg,rgba(247,250,252,.98),rgba(247,250,252,.90)),url('aias-building.jpg') center/cover fixed}
.login-wrap:before{content:"";position:fixed;inset:0;pointer-events:none;background:linear-gradient(135deg,rgba(7,139,134,.03),transparent 55%)}
.login-card{width:min(520px,100%);padding:34px;border-radius:22px;box-shadow:0 24px 80px rgba(24,39,64,.14)}
.login-brand{padding-bottom:20px;border-bottom:1px solid #edf0f4;margin-bottom:22px}.login-brand img{width:100%;max-width:430px;height:auto;display:block}
.login-card h1{font-size:30px;margin:0 0 7px;color:#14243e}.login-card .btn.primary{min-height:46px}.setup-card{border-radius:22px}

/* General polish */
.card{border-radius:16px;border-color:#e2e8ef}.table-wrap{border-color:#e2e8ef;border-radius:16px;box-shadow:0 8px 25px rgba(15,23,42,.045)}
th{background:#f6f8fb;color:#56657b}.row-between h1,.narrow>h1,.split h1{color:#15253f;letter-spacing:-.4px}
input,textarea,select{border-color:#d8e0e8;border-radius:10px;transition:border .18s,box-shadow .18s}input:focus,textarea:focus,select:focus{outline:none;border-color:#55aaa5;box-shadow:0 0 0 3px rgba(7,139,134,.10)}

@media(max-width:1380px){
 .app-brand img{width:350px}.app-brand-divider{margin:0 14px}.app-brand-title{font-size:15px}.nav-link{padding:0 8px;font-size:13px}.dashboard-hero{grid-template-columns:1.05fr .95fr}.dashboard-grid{grid-template-columns:minmax(0,1.6fr) minmax(350px,1fr)}
}
@media(max-width:1120px){
 .topbar-inner{padding:0 18px}.app-brand img{width:310px}.app-brand-title{display:none}.app-brand-divider{display:none}.nav-link{padding:0 7px}.nav-link span:last-child{font-size:12px}.dashboard-hero{grid-template-columns:1fr 1fr}.dashboard-hero-content{padding-left:38px}.dashboard-hero h1{font-size:38px}.dashboard-stats{grid-template-columns:repeat(2,1fr)}.dashboard-grid{grid-template-columns:1fr}.realtime-panel{min-height:260px}
}
@media(max-width:860px){
 .topbar{position:sticky;min-height:0}.topbar-inner{padding:12px 14px;display:block}.app-brand{justify-content:space-between}.app-brand img{width:min(330px,78vw)}.tag{margin-left:auto}.main-nav{margin-top:9px;overflow-x:auto;display:flex!important;gap:2px!important;padding-bottom:2px}.nav-link{height:45px;min-width:max-content;border-bottom-width:2px;padding:0 10px}.nav-separator{height:26px;margin:9px 5px 0}.container{padding:18px 14px 34px}.dashboard-hero{margin:-18px -14px 0;border-radius:0;grid-template-columns:1fr;min-height:auto}.dashboard-hero-content{padding:34px 22px 30px}.dashboard-hero-visual{min-height:230px}.hero-quote{top:34px;right:24px}.dashboard-stats{margin:14px 0 0;transform:none;gap:12px}.dashboard-grid{margin:14px 0 0;gap:14px}.app-footer{padding:0 14px 20px;flex-direction:column;gap:4px}.hero-lead{font-size:18px}.dashboard-hero h1{font-size:34px}.stat-icon{width:62px;height:62px}.dash-stat-card{min-height:100px;padding:15px}.stat-copy b{font-size:28px}
}
@media(max-width:580px){
 .dashboard-stats{grid-template-columns:1fr}.dashboard-hero-visual{min-height:190px}.hero-quote{display:none}.hero-actions{flex-direction:column}.hero-actions .btn{width:100%}.dashboard-hero h1{font-size:30px}.hero-lead{font-size:16px}.hero-sub br{display:none}.dash-stat-card{min-height:90px}.stat-icon{width:56px;height:56px;border-radius:14px}.stat-icon svg{width:28px;height:28px}.status-pill{margin-left:auto}.student-hero{padding:26px 22px}.student-hero-mark{display:none}.student-hero h1{font-size:30px}.login-card{padding:25px 20px}.panel-head{align-items:flex-start}.realtime-head{flex-direction:column}.last-update{margin-left:38px}
}


/* === v7.1 HIGH-FIDELITY DASHBOARD MATCH === */
body.dashboard-page{background:#f5f8fb;overflow-x:hidden}
body.dashboard-page .dashboard-container{max-width:none!important;margin:0!important;padding:0 0 46px!important}
body.dashboard-page .topbar{min-height:98px;box-shadow:none;border-bottom:1px solid #e6ebf1}
body.dashboard-page .topbar-inner{max-width:none;padding:0 48px}
body.dashboard-page .app-brand img{width:430px}
body.dashboard-page .main-nav{align-self:stretch}
body.dashboard-page .nav-link{height:98px}
body.dashboard-page .nav-separator{height:38px;margin-top:30px}

.dashboard-top-zone{position:relative;background:linear-gradient(180deg,#fff 0,#f6f9fc 72%,#f5f8fb 100%);padding:0 0 24px;overflow:hidden}
.dashboard-top-zone:after{content:"";position:absolute;right:-36px;top:98px;width:175px;height:430px;opacity:.14;pointer-events:none;background-image:linear-gradient(30deg,rgba(7,139,134,.20) 12%,transparent 12.5%,transparent 87%,rgba(7,139,134,.20) 87.5%),linear-gradient(150deg,rgba(7,139,134,.20) 12%,transparent 12.5%,transparent 87%,rgba(7,139,134,.20) 87.5%);background-size:32px 56px}
body.dashboard-page .dashboard-hero{min-height:332px;margin:0;border:0;border-radius:0;box-shadow:none;grid-template-columns:minmax(650px,1.17fr) minmax(620px,.83fr);background:#fff;overflow:hidden}
body.dashboard-page .dashboard-hero:after{background:linear-gradient(118deg,transparent 0 50%,rgba(7,139,134,.065) 50.2% 56.7%,transparent 56.9%),linear-gradient(118deg,transparent 0 54%,rgba(215,163,42,.048) 54.2% 59.2%,transparent 59.4%);z-index:1}
body.dashboard-page .dashboard-hero-content{padding:50px 28px 30px 56px;justify-content:center}
body.dashboard-page .dashboard-hero .section-kicker{display:none}
body.dashboard-page .dashboard-hero h1{font-size:54px;line-height:1.04;letter-spacing:-2px;margin:0 0 10px;color:#10213b;font-weight:700}
body.dashboard-page .hero-lead{font-size:23px;line-height:1.5;margin:0 0 12px;color:#374862;font-weight:500}
body.dashboard-page .hero-sub{font-size:15px;line-height:1.7;margin:0 0 24px;color:#738198}
body.dashboard-page .hero-actions{gap:12px}
body.dashboard-page .hero-actions .btn.big{min-height:58px;padding:0 28px;border-radius:11px;font-size:18px;box-shadow:0 8px 20px rgba(7,139,134,.10)}
body.dashboard-page .hero-actions .btn.primary{background:#078b86;border-color:#078b86}
body.dashboard-page .dashboard-hero-visual{min-height:332px;background-image:linear-gradient(90deg,#fff 0%,rgba(255,255,255,.92) 5%,rgba(255,255,255,.62) 15%,rgba(255,255,255,.18) 36%,rgba(255,255,255,.03) 58%),linear-gradient(180deg,rgba(255,255,255,0) 72%,rgba(246,249,252,.78) 100%),url('aias-building.jpg');background-size:auto,auto,cover;background-position:center,center,center 44%}
body.dashboard-page .dashboard-hero-visual:before{background:linear-gradient(180deg,rgba(255,255,255,.00) 0,rgba(255,255,255,.02) 60%,rgba(255,255,255,.18) 100%)}
body.dashboard-page .dashboard-hero-visual:after{width:120px;opacity:.12}
body.dashboard-page .hero-quote{right:58px;top:82px;color:#59667a}
body.dashboard-page .hero-quote span,body.dashboard-page .hero-quote strong{font-size:17px;line-height:1.55}

body.dashboard-page .dashboard-stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin:0 56px;transform:none;padding:0;position:relative;z-index:5}
body.dashboard-page .dash-stat-card{min-height:124px;border-radius:14px;padding:20px 22px;background:rgba(255,255,255,.985);box-shadow:0 10px 24px rgba(31,48,77,.07);border-color:#e0e7ee}
body.dashboard-page .stat-icon{width:78px;height:78px;border-radius:17px}
body.dashboard-page .stat-copy b{font-size:34px}
body.dashboard-page .stat-copy span{font-size:15px}

body.dashboard-page .dashboard-grid{max-width:none;grid-template-columns:minmax(0,1.78fr) minmax(390px,1fr);gap:20px;margin:0;padding:0 56px}
body.dashboard-page .dashboard-panel{border-radius:16px;box-shadow:0 8px 24px rgba(25,43,70,.055)}
body.dashboard-page .app-footer{max-width:none;padding-left:56px;padding-right:56px}

@media(max-width:1380px){
 body.dashboard-page .topbar-inner{padding:0 32px}
 body.dashboard-page .app-brand img{width:370px}
 body.dashboard-page .dashboard-hero{grid-template-columns:1.07fr .93fr}
 body.dashboard-page .dashboard-hero-content{padding-left:44px}
 body.dashboard-page .dashboard-hero h1{font-size:48px}
 body.dashboard-page .dashboard-stats,body.dashboard-page .dashboard-grid{margin-left:36px;margin-right:36px;padding-left:0;padding-right:0}
 body.dashboard-page .dashboard-grid{margin-top:0}
}
@media(max-width:1120px){
 body.dashboard-page .topbar{min-height:90px}
 body.dashboard-page .nav-link{height:90px}
 body.dashboard-page .dashboard-hero{grid-template-columns:1fr 1fr}
 body.dashboard-page .dashboard-hero-content{padding:40px 30px}
 body.dashboard-page .dashboard-hero h1{font-size:42px}
 body.dashboard-page .hero-lead{font-size:20px}
 body.dashboard-page .dashboard-stats{grid-template-columns:repeat(2,1fr);margin:18px 24px 0}
 body.dashboard-page .dashboard-grid{padding:0;margin:0 24px;grid-template-columns:1fr}
}
@media(max-width:860px){
 body.dashboard-page .topbar-inner{padding:12px 14px}
 body.dashboard-page .nav-link{height:45px}
 body.dashboard-page .dashboard-hero{grid-template-columns:1fr;min-height:auto}
 body.dashboard-page .dashboard-hero-content{padding:32px 22px 28px}
 body.dashboard-page .dashboard-hero h1{font-size:34px;letter-spacing:-1px}
 body.dashboard-page .dashboard-hero-visual{min-height:220px}
 body.dashboard-page .dashboard-stats{margin:14px 14px 0}
 body.dashboard-page .dashboard-grid{margin:0 14px}
 body.dashboard-page .app-footer{padding-left:14px;padding-right:14px}
}
@media(max-width:580px){
 body.dashboard-page .dashboard-stats{grid-template-columns:1fr}
 body.dashboard-page .dashboard-hero-visual{min-height:185px}
}

/* === v7.2 PIXEL-MATCH DASHBOARD ===
   Reference target: approved AIAS dashboard mockup, desktop ~1695px wide.
   These overrides intentionally supersede v7/v7.1 desktop dashboard rules only. */
@media (min-width:861px){
 body.dashboard-page{background:#f4f7fb;overflow-x:hidden}
 body.dashboard-page .dashboard-container{max-width:none!important;width:100%!important;margin:0!important;padding:0 0 48px!important}

 /* Header: 88px target height */
 body.dashboard-page .topbar{height:88px!important;min-height:88px!important;background:#fff!important;border-bottom:1px solid #e7ebf0!important;box-shadow:none!important;position:sticky;top:0}
 body.dashboard-page .topbar-inner{width:100%!important;max-width:none!important;height:88px!important;padding:0 32px!important;gap:22px!important}
 body.dashboard-page .app-brand{height:88px!important;flex:none}
 body.dashboard-page .app-brand img{width:425px!important;max-height:82px!important;object-fit:contain!important}
 body.dashboard-page .app-brand-divider{height:38px!important;margin:0 20px!important;background:#d7a52c!important}
 body.dashboard-page .app-brand-title{font-size:17px!important;font-weight:700!important;color:#152740!important}
 body.dashboard-page .tag{font-size:10px!important;padding:5px 9px!important;margin-left:10px!important}
 body.dashboard-page .main-nav{height:88px!important;align-items:stretch!important;margin-left:auto!important}
 body.dashboard-page .nav-link{height:88px!important;padding:0 12px!important;gap:8px!important;font-size:14px!important;border-bottom-width:3px!important}
 body.dashboard-page .nav-icon svg{width:19px!important;height:19px!important}
 body.dashboard-page .nav-separator{height:30px!important;margin:29px 7px 0!important}

 /* Whole upper zone */
 body.dashboard-page .dashboard-top-zone{position:relative!important;background:linear-gradient(180deg,#fff 0%,#fff 69%,#f5f8fb 100%)!important;padding:0 0 24px!important;overflow:hidden!important}
 body.dashboard-page .dashboard-top-zone:after{right:-28px!important;top:90px!important;width:150px!important;height:455px!important;opacity:.13!important;background-size:30px 52px!important}

 /* Hero: full-width, 372px high, image overlays right half exactly like mockup */
 body.dashboard-page .dashboard-hero{height:372px!important;min-height:372px!important;margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:linear-gradient(105deg,#fff 0%,#fff 47%,rgba(255,255,255,.98) 51%,rgba(255,255,255,.48) 61%,rgba(255,255,255,0) 73%)!important;display:block!important;position:relative!important;overflow:hidden!important}
 body.dashboard-page .dashboard-hero:before{content:""!important;position:absolute!important;inset:0!important;z-index:1!important;pointer-events:none!important;background:
   linear-gradient(116deg,transparent 0 48.5%,rgba(14,142,136,.055) 48.7% 55%,transparent 55.2%),
   linear-gradient(116deg,transparent 0 53%,rgba(223,178,63,.038) 53.2% 58.7%,transparent 58.9%)!important}
 body.dashboard-page .dashboard-hero:after{content:""!important;position:absolute!important;left:31%!important;bottom:-56px!important;width:250px!important;height:250px!important;z-index:1!important;opacity:.07!important;pointer-events:none!important;background-image:linear-gradient(30deg,rgba(7,139,134,.35) 12%,transparent 12.5%,transparent 87%,rgba(7,139,134,.35) 87.5%),linear-gradient(150deg,rgba(7,139,134,.35) 12%,transparent 12.5%,transparent 87%,rgba(7,139,134,.35) 87.5%)!important;background-size:32px 56px!important}
 body.dashboard-page .dashboard-hero-content{position:relative!important;z-index:4!important;width:52%!important;height:372px!important;padding:68px 20px 34px 64px!important;display:flex!important;flex-direction:column!important;justify-content:flex-start!important}
 body.dashboard-page .dashboard-hero .section-kicker{display:block!important;font-size:11px!important;line-height:1!important;letter-spacing:2.5px!important;color:#078b86!important;font-weight:800!important;margin:0 0 14px!important}
 body.dashboard-page .dashboard-hero h1{font-size:58px!important;line-height:1.03!important;letter-spacing:-2.6px!important;margin:0 0 13px!important;color:#10213b!important;font-weight:750!important}
 body.dashboard-page .hero-lead{font-size:23px!important;line-height:1.5!important;margin:0 0 8px!important;color:#33445d!important;font-weight:500!important;white-space:nowrap!important}
 body.dashboard-page .hero-sub{font-size:15px!important;line-height:1.7!important;margin:0!important;color:#718096!important}
 body.dashboard-page .hero-actions{display:flex!important;gap:12px!important;margin-top:23px!important}
 body.dashboard-page .hero-actions .btn.big{height:58px!important;min-height:58px!important;min-width:196px!important;padding:0 28px!important;border-radius:11px!important;font-size:18px!important;box-shadow:0 8px 20px rgba(7,139,134,.10)!important}
 body.dashboard-page .hero-actions .btn.primary{background:#078d88!important;border-color:#078d88!important}

 body.dashboard-page .dashboard-hero-visual{position:absolute!important;z-index:0!important;right:0!important;top:0!important;width:57.5%!important;height:372px!important;min-height:372px!important;background-image:
   linear-gradient(90deg,#fff 0%,rgba(255,255,255,.95) 5%,rgba(255,255,255,.67) 15%,rgba(255,255,255,.25) 28%,rgba(255,255,255,.03) 46%,rgba(255,255,255,0) 62%),
   linear-gradient(180deg,rgba(255,255,255,0) 67%,rgba(245,248,251,.32) 86%,rgba(245,248,251,.78) 100%),
   url('aias-building.jpg')!important;
 background-size:auto,auto,cover!important;background-position:center,center,center 48%!important;background-repeat:no-repeat!important}
 body.dashboard-page .dashboard-hero-visual:before{content:""!important;position:absolute!important;inset:0!important;background:linear-gradient(180deg,rgba(255,255,255,0),rgba(255,255,255,0) 69%,rgba(245,248,251,.32) 100%)!important;pointer-events:none!important}
 body.dashboard-page .dashboard-hero-visual:after{content:""!important;position:absolute!important;right:0!important;top:0!important;width:106px!important;height:100%!important;opacity:.14!important;background-size:27px 47px!important}
 body.dashboard-page .hero-quote{right:52px!important;top:78px!important;padding-bottom:13px!important;color:#536178!important;text-shadow:0 1px 3px rgba(255,255,255,.95)!important}
 body.dashboard-page .hero-quote:after{width:47px!important;height:3px!important}
 body.dashboard-page .hero-quote span,body.dashboard-page .hero-quote strong{font-size:17px!important;line-height:1.55!important;font-weight:500!important}
 body.dashboard-page .hero-quote strong{font-weight:600!important}

 /* KPI cards: 4 across, start exactly at hero bottom */
 body.dashboard-page .dashboard-stats{height:114px!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:18px!important;margin:0 62px!important;padding:0!important;transform:none!important;position:relative!important;z-index:5!important}
 body.dashboard-page .dash-stat-card{height:114px!important;min-height:114px!important;border-radius:14px!important;padding:17px 20px!important;gap:18px!important;background:rgba(255,255,255,.99)!important;border:1px solid #e0e7ee!important;box-shadow:0 9px 24px rgba(31,48,77,.065)!important}
 body.dashboard-page .stat-icon{width:76px!important;height:76px!important;border-radius:17px!important;flex:none!important}
 body.dashboard-page .stat-icon svg{width:34px!important;height:34px!important}
 body.dashboard-page .stat-copy{gap:3px!important}
 body.dashboard-page .stat-copy b{font-size:33px!important;line-height:1!important;font-weight:750!important}
 body.dashboard-page .stat-copy span{font-size:15px!important;line-height:1.3!important}
 body.dashboard-page .stat-arrow{font-size:32px!important}
 body.dashboard-page .status-pill{padding:6px 10px!important;font-size:11px!important}

 /* Lower panels: 24px under KPI, target proportion ~64/36 */
 body.dashboard-page .dashboard-grid{max-width:none!important;grid-template-columns:minmax(0,1.68fr) minmax(420px,1fr)!important;gap:20px!important;margin:0!important;padding:0 62px!important}
 body.dashboard-page .dashboard-panel{border-radius:16px!important;border-color:#e1e7ed!important;box-shadow:0 8px 24px rgba(25,43,70,.05)!important}
 body.dashboard-page .panel-head{min-height:61px!important;padding:14px 20px!important}
 body.dashboard-page .panel-head h2{font-size:18px!important}
 body.dashboard-page .dashboard-empty{min-height:270px!important}
 body.dashboard-page .realtime-summary{min-height:106px!important;margin:16px 18px 10px!important}
 body.dashboard-page .realtime-empty{min-height:166px!important}
 body.dashboard-page .app-footer{max-width:none!important;padding-left:62px!important;padding-right:62px!important}
}

/* Fit same composition down to common laptop widths without reverting to v7.1 layout. */
@media (min-width:1121px) and (max-width:1450px){
 body.dashboard-page .topbar-inner{padding:0 24px!important}
 body.dashboard-page .app-brand img{width:350px!important}
 body.dashboard-page .app-brand-divider{margin:0 14px!important}
 body.dashboard-page .app-brand-title{font-size:15px!important}
 body.dashboard-page .nav-link{padding:0 8px!important;font-size:13px!important}
 body.dashboard-page .dashboard-hero-content{padding-left:48px!important;width:54%!important}
 body.dashboard-page .dashboard-hero h1{font-size:50px!important}
 body.dashboard-page .hero-lead{font-size:20px!important;white-space:normal!important}
 body.dashboard-page .dashboard-stats{margin-left:42px!important;margin-right:42px!important}
 body.dashboard-page .dashboard-grid{padding-left:42px!important;padding-right:42px!important}
}

@media (min-width:861px) and (max-width:1120px){
 body.dashboard-page .topbar{height:auto!important;min-height:88px!important}
 body.dashboard-page .topbar-inner{padding:0 18px!important}
 body.dashboard-page .app-brand img{width:300px!important}
 body.dashboard-page .app-brand-divider,body.dashboard-page .app-brand-title{display:none!important}
 body.dashboard-page .nav-link{padding:0 7px!important;font-size:12px!important}
 body.dashboard-page .dashboard-hero{height:340px!important;min-height:340px!important}
 body.dashboard-page .dashboard-hero-content{height:340px!important;width:58%!important;padding:52px 24px 28px 32px!important}
 body.dashboard-page .dashboard-hero h1{font-size:44px!important}
 body.dashboard-page .hero-lead{font-size:19px!important;white-space:normal!important}
 body.dashboard-page .hero-sub{font-size:13px!important}
 body.dashboard-page .dashboard-hero-visual{height:340px!important;min-height:340px!important;width:54%!important}
 body.dashboard-page .hero-quote{right:24px!important;top:50px!important}
 body.dashboard-page .dashboard-stats{height:auto!important;grid-template-columns:repeat(2,1fr)!important;margin:16px 24px 0!important;gap:12px!important}
 body.dashboard-page .dash-stat-card{height:104px!important;min-height:104px!important}
 body.dashboard-page .dashboard-grid{padding:0 24px!important;grid-template-columns:1fr!important;margin-top:18px!important}
}
