﻿:root{--primary:#1e40af;--secondary:#006a61;--bg:#f8fafc;--surface:#fff;--line:#e2e8f0;--text:#1a1b22;--muted:#64748b;--danger:#ba1a1a;--teal:#0d9488}*{box-sizing:border-box}body{margin:0;font-family:Inter,Arial,sans-serif;background:var(--bg);color:var(--text)}a{color:inherit;text-decoration:none}.sidebar{position:fixed;inset:0 auto 0 0;width:280px;background:#fff;border-right:1px solid var(--line);padding:24px 14px;overflow:auto}.brand{display:flex;gap:12px;align-items:center;padding:0 10px 24px}.brand .material-symbols-outlined{background:var(--primary);color:#fff;padding:8px;border-radius:10px}.brand strong{display:block;color:var(--primary);font-size:24px}.brand small{display:block;color:var(--muted);font-size:12px}.nav{display:flex;align-items:center;gap:12px;padding:12px 16px;margin:3px 0;border-radius:10px;color:#475569;font-weight:600}.nav:hover,.nav.active{background:#dff7f3;color:#005049;border-left:4px solid var(--primary)}.main{margin-left:280px;min-height:100vh;display:flex;flex-direction:column}.topbar{height:64px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 32px;position:sticky;top:0;z-index:3}.userbox{display:flex;gap:16px;align-items:center;color:var(--muted);font-size:14px}.userbox a{color:var(--primary);font-weight:700}.content{padding:32px;flex:1}.footer{padding:16px 32px;border-top:1px solid var(--line);color:var(--muted);font-size:13px}.grid{display:grid;gap:24px}.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))}.card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:24px;box-shadow:0 1px 3px rgba(0,0,0,.08)}.stat{display:flex;justify-content:space-between;align-items:flex-start}.stat h3{font-size:32px;margin:12px 0 0}.muted{color:var(--muted)}.btn{display:inline-flex;align-items:center;gap:8px;border:0;border-radius:10px;padding:10px 14px;font-weight:700;cursor:pointer;background:#e2e8f0}.btn.primary{background:var(--primary);color:#fff}.btn.secondary{background:var(--secondary);color:#fff}.btn.danger{background:var(--danger);color:#fff}.btn.ghost{background:#eef2ff;color:var(--primary)}.actions{display:flex;gap:8px;flex-wrap:wrap}input,select,textarea{width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fff;font:inherit}textarea{min-height:110px}.form-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:16px}label{font-weight:700;font-size:13px;display:block;margin-bottom:6px}.table{width:100%;border-collapse:collapse;background:#fff}.table th{background:#f1f5f9;color:#475569;text-transform:uppercase;font-size:12px;text-align:left}.table th,.table td{padding:12px;border-bottom:1px solid var(--line);vertical-align:top}.badge{display:inline-block;border-radius:999px;padding:4px 10px;font-size:12px;font-weight:700;background:#e2e8f0}.badge.easy{background:#dcfce7;color:#166534}.badge.medium{background:#fef3c7;color:#92400e}.badge.hard{background:#fee2e2;color:#991b1b}.alert{padding:12px 14px;border-radius:12px;margin-bottom:18px;background:#e0f2fe;color:#075985}.alert.error{background:#fee2e2;color:#991b1b}.alert.success{background:#dcfce7;color:#166534}.login{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#eef2ff,#f8fafc)}.login-card{width:min(460px,92vw);background:#fff;border-radius:18px;padding:32px;border:1px solid var(--line);box-shadow:0 20px 60px rgba(30,64,175,.15)}.exam-paper{max-width:900px;margin:auto;background:#fff;border:1px solid var(--line);border-radius:16px;padding:32px}.question{padding:14px 0;border-bottom:1px solid var(--line)}.choice{margin:8px 0 0 24px}.matrix{font-size:13px}.matrix th,.matrix td{text-align:center}.matrix td:first-child,.matrix th:first-child{text-align:left}@media(max-width:900px){.sidebar{position:static;width:auto;height:auto}.main{margin-left:0}.grid-2,.grid-3,.grid-4,.form-row{grid-template-columns:1fr}.topbar{padding:0 16px}.content{padding:16px}}
/* Modern login screen */
.login.login-pro{padding:32px;background:linear-gradient(135deg,#fbf8ff 0%,#eef2ff 48%,#e0f7f4 100%)}
.login-shell{width:min(1080px,100%);min-height:640px;display:grid;grid-template-columns:1.12fr .88fr;background:rgba(255,255,255,.72);border:1px solid rgba(196,197,213,.8);border-radius:24px;box-shadow:0 28px 80px rgba(30,64,175,.18);overflow:hidden}
.login-showcase{position:relative;padding:42px;display:flex;flex-direction:column;justify-content:space-between;background:linear-gradient(145deg,#00288e,#1e40af 54%,#006a61);color:#fff}
.login-showcase:after{content:"";position:absolute;right:-120px;bottom:-140px;width:360px;height:360px;border-radius:50%;background:rgba(137,245,231,.2)}
.login-brand,.login-panel-head,.login-options{display:flex;align-items:center}
.login-brand{gap:14px;position:relative;z-index:1}
.login-brand .material-symbols-outlined,.login-icon{width:48px;height:48px;display:grid;place-items:center;border-radius:12px;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.28)}
.brand-logo{width:42px;height:42px;border-radius:10px;object-fit:cover;display:block;flex:0 0 auto;box-shadow:0 8px 18px rgba(30,64,175,.16)}
.login-logo{width:48px;height:48px;border-radius:12px;border:1px solid rgba(255,255,255,.28);box-shadow:0 12px 26px rgba(0,0,0,.18)}
.login-brand strong{display:block;font-size:26px;font-weight:800}
.login-brand small{display:block;color:#dde1ff;font-size:13px}
.login-copy{position:relative;z-index:1;max-width:620px}
.eyebrow{display:inline-flex;padding:8px 12px;border-radius:999px;background:rgba(255,255,255,.14);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.login-copy h1{font-size:44px;line-height:1.1;margin:22px 0 16px;letter-spacing:0}
.login-copy p{font-size:17px;line-height:1.7;color:#eef2ff;margin:0}
.login-metrics{position:relative;z-index:1;display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.login-metrics div{padding:16px;border-radius:16px;background:rgba(255,255,255,.13);border:1px solid rgba(255,255,255,.18)}
.login-metrics span{color:#89f5e7}
.login-metrics strong{display:block;margin-top:10px;font-size:24px}
.login-metrics small{color:#dde1ff}
.login-panel{padding:46px;background:#fff;display:flex;flex-direction:column;justify-content:center}
.login-panel-head{gap:14px;margin-bottom:28px}
.login-icon{background:#eef2ff;color:var(--primary);border-color:#dde1ff}
.login-panel h2{font-size:32px;line-height:1.2;margin:0}
.login-panel p{margin:4px 0 0}
.login-form label{margin-top:16px}
.input-icon{position:relative}
.input-icon .material-symbols-outlined{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:#757684;font-size:21px}
.input-icon input{height:48px;border-radius:14px;padding-left:46px;background:#f8fafc}
.input-icon input[type="password"],.input-icon input[type="text"]{padding-right:48px}
.password-toggle{position:absolute;right:10px;top:50%;transform:translateY(-50%);width:34px;height:34px;border:0;border-radius:10px;background:transparent;color:#64748b;display:grid;place-items:center;cursor:pointer}
.password-toggle:hover{background:#eef2ff;color:#1e40af}
.password-toggle .material-symbols-outlined{position:static;transform:none;font-size:20px}
.password-note{margin:8px 0 0;font-size:12px;line-height:1.45}
.input-icon input:focus{outline:0;border-color:var(--primary);box-shadow:0 0 0 4px rgba(30,64,175,.12);background:#fff}
.login-options{justify-content:space-between;gap:12px;margin:16px 0 22px;font-size:13px}
.remember{display:flex;align-items:center;gap:8px;margin:0;color:#475569}
.remember input{width:16px;height:16px}
.login-options a{color:var(--primary);font-weight:800}
.login-submit{width:100%;height:50px;justify-content:center;border-radius:14px;font-size:15px;box-shadow:0 12px 28px rgba(30,64,175,.25)}
.login-form{display:grid;gap:10px}
.login-form label{margin:8px 0 2px}
.login-form .input-icon{margin-bottom:10px}
.login-form .login-submit{margin-top:8px}
@media(max-width:900px){.login.login-pro{padding:16px;align-items:start}.login-shell{grid-template-columns:1fr;min-height:0}.login-showcase{padding:28px;gap:34px}.login-copy h1{font-size:30px}.login-metrics{grid-template-columns:1fr}.login-panel{padding:28px}.login-options{align-items:flex-start;flex-direction:column}}
.compact-login{min-height:620px}
.admin-showcase{background:linear-gradient(145deg,#111827,#1e40af 58%,#00288e)}
.user-showcase{background:linear-gradient(145deg,#005049,#006a61 52%,#1e40af)}
.back-link{display:inline-flex;align-items:center;gap:6px;margin-bottom:22px;color:var(--primary);font-weight:800;font-size:13px}
.back-link .material-symbols-outlined{font-size:18px}
.portal-login{padding:32px}
.portal-shell{width:min(1040px,100%);padding:42px;border-radius:24px;background:rgba(255,255,255,.76);border:1px solid rgba(196,197,213,.8);box-shadow:0 28px 80px rgba(30,64,175,.16)}
.portal-head{max-width:720px;margin:0 auto 30px;text-align:center}
.portal-brand{justify-content:center;margin-bottom:22px;color:#1e40af}
.portal-brand .material-symbols-outlined{background:#1e40af;color:#fff}
.portal-head h1{font-size:42px;line-height:1.12;margin:18px 0 12px;letter-spacing:0}
.portal-head p{margin:0;color:#475569;font-size:16px;line-height:1.7}
.portal-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}
.portal-card{position:relative;min-height:300px;padding:28px;border-radius:20px;background:#fff;border:1px solid var(--line);box-shadow:0 16px 45px rgba(15,23,42,.08);transition:.2s ease;overflow:hidden}
.portal-card:after{content:"";position:absolute;right:-64px;top:-64px;width:160px;height:160px;border-radius:50%;background:#eef2ff}
.portal-card:hover{transform:translateY(-4px);box-shadow:0 24px 60px rgba(30,64,175,.16)}
.portal-icon{width:56px;height:56px;display:grid;place-items:center;border-radius:16px;background:#eef2ff;color:var(--primary);font-size:32px;position:relative;z-index:1}
.portal-card small{display:block;margin-top:22px;color:#64748b;font-weight:800;text-transform:uppercase;font-size:12px;letter-spacing:.08em}
.portal-card strong{display:block;margin-top:8px;font-size:28px;color:#111827}
.portal-card p{color:#475569;line-height:1.65;margin:12px 0 28px}
.portal-action{display:inline-flex;align-items:center;gap:8px;color:var(--primary);font-weight:800}
.portal-action .material-symbols-outlined{font-size:18px}
.admin-portal .portal-icon{background:#eff6ff;color:#1e40af}
.user-portal .portal-icon{background:#dff7f3;color:#006a61}
.admin-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:30px;border-radius:20px;background:linear-gradient(135deg,#00288e,#1e40af 58%,#006a61);color:#fff;box-shadow:0 22px 55px rgba(30,64,175,.18)}
.admin-hero h1{font-size:34px;line-height:1.15;margin:12px 0}
.admin-hero p{max-width:760px;color:#eef2ff;line-height:1.7;margin:0}
.admin-hero .eyebrow{background:rgba(255,255,255,.14)}
.admin-hero .btn.primary{background:#fff;color:#1e40af;white-space:nowrap}
.admin-actions{margin-top:24px}
.admin-action{display:flex;flex-direction:column;gap:10px;color:inherit;transition:.2s ease}
.admin-action:hover{transform:translateY(-3px);box-shadow:0 18px 45px rgba(30,64,175,.12)}
.admin-action .material-symbols-outlined{width:46px;height:46px;display:grid;place-items:center;border-radius:12px;background:#eef2ff;color:var(--primary)}
.admin-action strong{font-size:20px}
.admin-action small{color:var(--muted)}
@media(max-width:900px){.portal-login{padding:16px}.portal-shell{padding:26px}.portal-head h1{font-size:30px}.portal-grid{grid-template-columns:1fr}.admin-hero{align-items:flex-start;flex-direction:column}.admin-hero h1{font-size:28px}}
/* Dashboard shell refresh */
body{background:#fbf8ff}
.sidebar{width:280px;background:#fbf8ff;border-right:1px solid #c4c5d5;box-shadow:0 1px 10px rgba(15,23,42,.04);padding:24px 0}
.brand{padding:0 24px 28px}
.brand .material-symbols-outlined{width:40px;height:40px;display:grid;place-items:center;border-radius:10px;background:#1e40af;color:#fff;padding:0}
.brand .brand-logo{width:40px;height:40px}
.brand strong{font-size:25px;color:#00288e;line-height:1}
.brand small{color:#444653;font-weight:600}
.nav{border-radius:0;margin:0;padding:14px 24px;color:#444653;border-left:4px solid transparent;font-size:14px;letter-spacing:.02em}
.nav:hover{background:#e8e7f1;color:#1a1b22;border-left-color:#b8c4ff}
.nav.active{background:#86f2e4;color:#006f66;border-left-color:#1e40af}
.main{background:#f8fafc}
.topbar{height:64px;background:#fbf8ff;border-bottom:1px solid #c4c5d5;box-shadow:0 1px 10px rgba(15,23,42,.04);padding:0 32px;gap:18px}
.topbar{justify-content:space-between}
.top-actions,.userbox{display:flex;align-items:center}
.top-actions{gap:18px}
.icon-btn{position:relative;width:40px;height:40px;border:0;border-radius:999px;background:transparent;color:#444653;display:grid;place-items:center;cursor:pointer}
.icon-btn:hover{background:#f4f2fc;color:#1e40af}
.icon-btn i{position:absolute;top:2px;right:0;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#ba1a1a;color:#fff;border:2px solid #fbf8ff;font-size:10px;font-style:normal;font-weight:800;line-height:14px;text-align:center}
.notification-shell{position:relative}
.notification-popover{position:absolute;top:50px;right:-8px;width:min(400px,calc(100vw - 24px));max-height:72vh;background:#fff;border:1px solid #d7dce8;border-radius:8px;box-shadow:0 18px 48px rgba(15,23,42,.22);z-index:80;display:none;overflow:hidden}
.notification-shell.open .notification-popover{display:block}
.notification-popover-head{display:flex;align-items:center;justify-content:space-between;padding:18px 20px 12px;color:#0f2d5c}
.notification-popover-head strong{font-size:20px}
.notification-popover-list{max-height:calc(72vh - 58px);overflow:auto;padding:0 10px 10px}
.notification-popover-item{width:100%;display:grid;grid-template-columns:48px minmax(0,1fr);gap:14px;align-items:center;border:0;border-bottom:1px solid #e5e7eb;background:#fff;text-align:left;padding:16px 10px;cursor:pointer;color:#52627a}
.notification-popover-item:hover,.notification-popover-item.unread{background:#f5f7fb}
.notification-popover-item strong{display:block;color:#53627a;font-size:14px;line-height:1.45;text-transform:uppercase;font-weight:600}
.notification-popover-item small{display:block;margin-top:5px;color:#7b879a;font-size:12px}
.notification-popover-icon{width:48px;height:48px;border-radius:999px;background:#0d4380;color:#fff;display:grid;place-items:center}
.notification-empty{padding:18px;text-align:center}
.notification-modal{position:fixed;inset:0;z-index:90;display:none}
.notification-modal.open{display:block}
.notification-modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.55)}
.notification-modal-card{position:relative;margin:7vh auto;width:min(760px,calc(100vw - 32px));max-height:84vh;overflow:auto;background:#fff;border-radius:6px;padding:28px 30px;box-shadow:0 24px 70px rgba(0,0,0,.28);color:#59677f}
.notification-modal-card h2{margin:0 42px 12px 0;color:#102449;font-size:22px}
.notification-modal-content{font-size:16px;line-height:1.75;white-space:pre-wrap}
.notification-modal-close{position:absolute;top:14px;right:14px}
.userbox{gap:12px;padding-left:18px;border-left:1px solid #c4c5d5}
.user-meta{text-align:right}
.user-meta strong{display:block;font-size:14px;color:#1a1b22}
.user-meta small{display:block;font-size:12px;color:#64748b}
.avatar{width:40px;height:40px;border-radius:999px;background:#dde1ff;color:#00288e;display:grid;place-items:center;font-weight:800;border:1px solid #c4c5d5}
.userbox a{font-size:13px;color:#1e40af;font-weight:800}
.content{padding:32px}
.footer{background:#f4f2fc;border-top:1px solid #c4c5d5}
.page-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:24px}
.page-heading h1{font-size:34px;line-height:1.18;margin:0 0 8px;color:#1a1b22;letter-spacing:0}
.page-heading p{margin:0;color:#444653;font-size:16px;line-height:1.6}
.heading-actions{display:flex;gap:10px;flex-wrap:wrap}
.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:24px;margin-bottom:24px}
.dash-card{background:#fff;border:1px solid #c4c5d5;border-radius:12px;box-shadow:0 1px 4px rgba(15,23,42,.05);padding:24px}
.stat-card{display:block;transition:.18s ease;color:inherit}
.stat-card:hover{transform:translateY(-2px);box-shadow:0 14px 30px rgba(15,23,42,.08)}
.stat-top{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:18px}
.stat-icon{width:42px;height:42px;border-radius:10px;display:grid;place-items:center}
.stat-icon.blue{background:#dbeafe;color:#1d4ed8}.stat-icon.teal{background:#ccfbf1;color:#0f766e}.stat-icon.amber{background:#fef3c7;color:#b45309}.stat-icon.purple{background:#f3e8ff;color:#7e22ce}.stat-icon.rose{background:#ffe4e6;color:#be123c}.stat-icon.indigo{background:#e0e7ff;color:#4338ca}
.trend{display:inline-flex;align-items:center;gap:2px;color:#006a61;font-weight:800;font-size:12px}
.trend.down{color:#ba1a1a}
.trend .material-symbols-outlined{font-size:15px}
.stat-card p{margin:0 0 6px;color:#64748b;font-size:12px;text-transform:uppercase;font-weight:800;letter-spacing:.06em}
.stat-card h3{margin:0;color:#1a1b22;font-size:28px;line-height:1.1}
.dashboard-grid{display:grid;grid-template-columns:2fr 1fr;gap:24px;margin-bottom:24px}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:22px}
.section-head h2{margin:0;color:#1a1b22;font-size:20px}
.section-head a{display:inline-flex;align-items:center;gap:4px;color:#1e40af;font-weight:800;font-size:14px}
.section-head a .material-symbols-outlined{font-size:18px}
.segmented{display:flex;gap:8px;flex-wrap:wrap}
.segmented button{border:0;border-radius:999px;padding:7px 12px;background:transparent;color:#64748b;font-weight:700;cursor:pointer}
.segmented button.active{background:#e8e7f1;color:#1a1b22}
.chart-wrap{height:250px;display:flex;align-items:flex-end;gap:14px;padding:18px 12px 0;border-bottom:1px solid #e2e8f0;background:linear-gradient(to top,rgba(226,232,240,.65) 1px,transparent 1px);background-size:100% 25%}
.month-chart{gap:5px;overflow-x:auto}
.month-chart .chart-col{min-width:24px}
.month-chart .chart-col span{font-size:10px}
.chart-col{height:100%;flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:9px}
.chart-bar{width:100%;max-width:42px;min-height:14px;border-radius:7px 7px 0 0;background:rgba(30,64,175,.22);transition:.2s ease}
.chart-col:hover .chart-bar{background:#1e40af;transform:scaleY(1.03);transform-origin:bottom}
.chart-col span{font-size:12px;color:#64748b;font-weight:700}
.activity-list{display:grid;gap:18px}
.activity-item{position:relative;padding-left:18px}
.activity-item:before{content:"";position:absolute;left:0;top:7px;width:8px;height:8px;border-radius:999px;background:#1e40af}
.activity-item.teal:before{background:#006a61}.activity-item.amber:before{background:#f59e0b}.activity-item.danger:before{background:#ba1a1a}
.activity-item strong{display:block;color:#1a1b22;font-size:14px;margin-bottom:3px}
.activity-item span{display:block;color:#64748b;font-size:13px;line-height:1.5}
.table-card{overflow:hidden}
.table-scroll{overflow-x:auto}
.modern-table th{background:#f8fafc;color:#64748b;font-size:12px;text-transform:uppercase;letter-spacing:.04em}
.modern-table tr:hover td{background:#f8fafc}
.status-pill{display:inline-flex;align-items:center;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:800;background:#e8e7f1;color:#444653}
.status-pill.published,.status-pill.active{background:#86f2e4;color:#006f66}
.status-pill.closed,.status-pill.locked{background:#ffdad6;color:#93000a}
.status-pill.draft{background:#dde1ff;color:#173bab}
.admin-heading{padding:30px;border-radius:18px;background:linear-gradient(135deg,#00288e,#1e40af 58%,#006a61);color:#fff;box-shadow:0 20px 46px rgba(30,64,175,.18)}
.admin-heading h1,.admin-heading p{color:#fff}
.admin-heading p{color:#eef2ff}
.admin-heading .btn.primary{background:#fff;color:#1e40af}
.admin-heading .btn.ghost{background:rgba(255,255,255,.14);color:#fff}
.admin-shortcuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin-bottom:24px}
.shortcut-card{display:flex;flex-direction:column;gap:10px;color:inherit;transition:.18s ease}
.shortcut-card:hover{transform:translateY(-2px);box-shadow:0 14px 30px rgba(15,23,42,.08)}
.shortcut-card>.material-symbols-outlined{width:46px;height:46px;border-radius:12px;background:#eef2ff;color:#1e40af;display:grid;place-items:center}
.shortcut-card strong{font-size:18px}
.shortcut-card small{color:#64748b;line-height:1.5}
.dashboard-tables{gap:24px}
@media(max-width:1200px){.stats-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.dashboard-grid{grid-template-columns:1fr}.admin-shortcuts{grid-template-columns:1fr 1fr}}
@media(max-width:900px){.topbar{height:auto;padding:14px 16px;align-items:stretch;flex-direction:column}.top-actions{justify-content:space-between}.userbox{border-left:0;padding-left:0}.user-meta{text-align:left}.content{padding:18px}.page-heading{flex-direction:column}.stats-grid{grid-template-columns:1fr}.admin-shortcuts{grid-template-columns:1fr}.chart-wrap{height:220px}}
/* Global UI polish pass */
:root{--radius-sm:8px;--radius-md:10px;--radius-lg:12px;--shadow-sm:0 1px 3px rgba(15,23,42,.06);--shadow-md:0 10px 26px rgba(15,23,42,.08)}
body{font-size:14px;line-height:1.55}
h1,h2,h3{letter-spacing:0;color:#1a1b22}
h2{font-size:20px;line-height:1.3;margin:0 0 18px}
h3{font-size:16px;line-height:1.35;margin:18px 0 12px}
p{line-height:1.65}
.content{max-width:1480px;width:100%;margin:0 auto}
.grid{gap:20px}
.grid-2{gap:22px}
.grid-3{gap:22px}
.grid-4{gap:18px}
.card,.dash-card{border-radius:var(--radius-lg);padding:22px;border-color:#d7d9e5;box-shadow:var(--shadow-sm)}
.card + .card{margin-top:22px}
.grid>.card + .card,.grid>.dash-card + .dash-card,.stats-grid>.dash-card + .dash-card,.admin-shortcuts>.dash-card + .dash-card{margin-top:0}
.card:hover{box-shadow:0 8px 20px rgba(15,23,42,.06)}
.card h2:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px}
.btn{min-height:34px;border-radius:var(--radius-sm);padding:7px 11px;font-size:13px;line-height:1.2;font-weight:700;box-shadow:none;transition:background .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease;white-space:nowrap}
.btn:hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(15,23,42,.08)}
.btn:active{transform:translateY(0);box-shadow:none}
.btn .material-symbols-outlined{font-size:18px}
.btn.primary{background:#1e40af}
.btn.primary:hover{background:#173bab}
.btn.secondary{background:#006a61}
.btn.secondary:hover{background:#005049}
.btn.ghost{background:#eef2ff;color:#173bab}
.btn.ghost:hover{background:#dde1ff}
.btn.danger{background:#fee2e2;color:#991b1b}
.btn.danger:hover{background:#fecaca;color:#7f1d1d}
.actions{gap:7px;align-items:center}
.actions form{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
input,select,textarea{min-height:40px;border-radius:var(--radius-sm);border-color:#d7d9e5;background:#fff;padding:9px 11px;font-size:14px;transition:border-color .18s ease,box-shadow .18s ease,background .18s ease}
select{cursor:pointer}
textarea{min-height:104px;resize:vertical}
input:focus,select:focus,textarea:focus{outline:0;border-color:#1e40af;box-shadow:0 0 0 3px rgba(30,64,175,.12);background:#fff}
label{font-size:12px;letter-spacing:.02em;color:#334155;margin-bottom:6px}
.inline-create-label{margin-top:10px}
.new-lesson-field{display:none}
.form-row{gap:14px;margin-bottom:14px}
form>.btn,form>button.btn{margin-top:4px}
.table{border-collapse:separate;border-spacing:0;border:1px solid #e2e8f0;border-radius:var(--radius-lg);overflow:hidden}
.table th{background:#f8fafc;color:#64748b;font-size:11px;letter-spacing:.05em;font-weight:800}
.table th,.table td{padding:10px 12px}
.table td{font-size:13px;color:#273449}
.table tr:last-child td{border-bottom:0}
.table tr:hover td{background:#fbfcff}
.table .actions{justify-content:flex-start}
.table .btn{min-height:30px;padding:6px 9px;font-size:12px}
.badge,.status-pill{border-radius:999px;padding:4px 9px;font-size:11px;font-weight:800;text-transform:none}
.alert{border-radius:var(--radius-lg);padding:11px 14px;margin-bottom:18px;border:1px solid transparent;box-shadow:var(--shadow-sm)}
.alert.success{border-color:#bbf7d0}.alert.error{border-color:#fecaca}
.question{padding:16px 0;border-bottom-color:#e7eaf2}
.question:last-child{border-bottom:0}
.choice{margin:9px 0 0 18px;color:#334155}
.question-image{margin:12px 0 14px 18px}
.question-image img{display:block;max-width:100%;max-height:none;width:auto;height:auto;border:1px solid #d7d9e5;border-radius:8px;background:#fff;object-fit:contain}
.question-content-field{border:1px solid var(--line);border-radius:10px;background:#fff;padding:10px 12px;margin-bottom:14px}
.question-content-field>label{margin-bottom:8px}
.question-content-field textarea{border:0;border-radius:0;padding:0;min-height:86px;box-shadow:none}
.question-content-field textarea:focus{outline:none}
.question-content-field .question-image{margin:10px 0 0}
.question-content-field .question-image img{max-width:100%;max-height:none}
.question-content-render{font-size:18px;line-height:1.75;margin:4px 0 14px;color:#111827;font-family:"Times New Roman",Cambria,serif;max-width:100%;overflow-wrap:break-word}
.question-content-render.option-render{font-size:16px;line-height:1.45;margin:0;padding:7px 10px;min-height:38px;border:1px solid #d7d9e5;border-radius:8px;background:#fff}
.question-inline-image{display:inline-block;max-width:min(620px,100%);height:auto;max-height:80px;width:auto;vertical-align:middle;margin:0 5px;border:0;background:#fff;object-fit:contain}
.option-render .question-inline-image{height:auto;max-height:60px;margin:0 3px;vertical-align:middle}
.question-inline-image.question-inline-diagram{height:auto;max-width:min(520px,100%);max-height:130px;vertical-align:middle;margin:6px 8px 6px 0}
.option-render .question-inline-image.question-inline-diagram{height:auto;max-height:72px}
.question label.choice{display:flex;align-items:flex-start;gap:8px;font-size:14px;font-weight:500;line-height:1.5}
.question .choice input[type="radio"]{flex:0 0 14px;width:14px;height:14px;min-height:14px;margin:3px 0 0;padding:0;border-radius:50%}
.question .choice select{width:auto;min-width:110px;min-height:34px;padding:6px 9px}
.exam-paper{border-radius:var(--radius-lg);padding:28px;box-shadow:var(--shadow-sm);border-color:#d7d9e5}
.stat h3{font-size:28px}
.login-submit{height:44px;min-height:44px;border-radius:var(--radius-md)}
.topbar .icon-btn:hover,.nav:hover,.nav.active{box-shadow:none;transform:none}
@media(max-width:1100px){.content{max-width:none}.grid-2,.grid-3,.grid-4{grid-template-columns:1fr}.card,.dash-card{padding:18px}.actions{align-items:flex-start}.actions form{width:100%}.actions form select{flex:1;min-width:180px}}
@media(max-width:640px){body{font-size:13px}.content{padding:14px}.card,.dash-card{padding:16px}.btn{width:auto;min-height:32px;padding:6px 9px;font-size:12px}.actions{gap:6px}.actions .btn{flex:0 0 auto}.table{display:block;overflow-x:auto;white-space:nowrap}.form-row{gap:12px}.login-panel{padding:22px}.login-copy h1{font-size:27px}}
/* Quiz/question editor */
.question-editor textarea[name="content"],.preview-editor textarea[name$="[content]"]{min-height:86px;font-size:14px}
.question-type-panel{margin:16px 0;padding:16px;border:1px dashed #d7d9e5;border-radius:12px;background:#fbfcff}
.question-type-panel h3{margin-top:0}
.preview-editor .question-type-panel[data-panel="mc"],.question-editor .question-type-panel[data-panel="mc"]{display:block}
.question-type-panel[data-panel="mc"] [data-add-option]{margin-top:12px;width:max-content;min-height:34px;padding:7px 10px;font-size:13px;background:#eef4ff}
.preview-editor{display:grid;gap:16px}
.question-edit-card{padding:18px;border:1px solid #d7d9e5;border-radius:12px;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.04)}
.question-edit-head{display:flex;align-items:center;gap:10px;justify-content:space-between;margin-bottom:12px}
.question-edit-head strong{font-size:15px;color:#1e40af}
.question-edit-head select{width:auto;min-width:150px}
.question-edit-card textarea{margin-bottom:10px}
.question-edit-card .grid{gap:12px}
.option-row{margin-bottom:10px}
.option-row:last-child{margin-bottom:0}
@media(max-width:700px){.question-edit-head{align-items:stretch;flex-direction:column}.question-edit-head select{width:100%}}
/* Interactions: dark mode, mobile sidebar, test room */
.sidebar-toggle{display:none}
.check-row{display:flex;align-items:center;gap:8px;margin:10px 0;color:#334155}
.check-row input{width:16px;height:16px;min-height:16px}
.test-layout{display:grid;grid-template-columns:280px 1fr;gap:22px;align-items:start}
.test-panel{position:sticky;top:84px}
.timer{font-size:34px;font-weight:800;color:#1e40af;margin:18px 0;padding:14px;border-radius:12px;background:#eef2ff;text-align:center}
.timer.danger{color:#991b1b;background:#fee2e2}
.question-nav{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin:16px 0}
.question-nav a{height:34px;border-radius:8px;background:#f1f5f9;display:grid;place-items:center;font-weight:800;color:#475569}
.question-nav a.answered{background:#86f2e4;color:#006f66}
.test-paper .question{scroll-margin-top:90px}
body.dark{--bg:#111827;--surface:#1f2937;--text:#e5e7eb;--muted:#9ca3af;background:#111827;color:#e5e7eb}
body.dark .main,body.dark body{background:#111827}
body.dark .sidebar,body.dark .topbar,body.dark .footer{background:#0f172a;border-color:#334155;color:#e5e7eb}
body.dark .card,body.dark .dash-card,body.dark .login-panel,body.dark .question-edit-card{background:#1f2937;border-color:#334155;color:#e5e7eb}
body.dark h1,body.dark h2,body.dark h3,body.dark .table td,body.dark .user-meta strong,body.dark .activity-item strong{color:#e5e7eb}
body.dark .muted,body.dark .page-heading p,body.dark .table th,body.dark .activity-item span{color:#9ca3af}
body.dark input,body.dark select,body.dark textarea{background:#111827;border-color:#334155;color:#e5e7eb}
body.dark .table,body.dark .modern-table th{background:#1f2937;border-color:#334155}
body.dark .table th{background:#111827}
body.dark .nav{color:#cbd5e1}
body.dark .nav:hover{background:#1f2937}
@media(max-width:900px){.sidebar-toggle{display:grid}.sidebar{position:fixed;transform:translateX(-105%);transition:transform .2s ease;z-index:20;height:100vh}.sidebar-open .sidebar{transform:translateX(0)}.main{margin-left:0}.test-layout{grid-template-columns:1fr}.test-panel{position:static}.question-nav{grid-template-columns:repeat(8,1fr)}}
/* Collapsible sidebar */
.sidebar,.main{transition:width .2s ease,margin-left .2s ease,transform .2s ease}
.sidebar-toggle{display:grid;flex:0 0 40px}
body.sidebar-collapsed .sidebar{width:76px;overflow-x:hidden}
html.sidebar-collapsed .sidebar{width:76px;overflow-x:hidden}
body.sidebar-collapsed .main{margin-left:76px}
html.sidebar-collapsed .main{margin-left:76px}
body.sidebar-collapsed .brand{padding:0 14px 24px;justify-content:center}
html.sidebar-collapsed .brand{padding:0 14px 24px;justify-content:center}
body.sidebar-collapsed .brand div{display:none}
html.sidebar-collapsed .brand div{display:none}
body.sidebar-collapsed .brand .material-symbols-outlined{width:44px;height:44px}
html.sidebar-collapsed .brand .material-symbols-outlined{width:44px;height:44px}
body.sidebar-collapsed .brand .brand-logo,html.sidebar-collapsed .brand .brand-logo{width:44px;height:44px}
body.sidebar-collapsed .nav{justify-content:center;padding:14px 0;gap:0}
html.sidebar-collapsed .nav{justify-content:center;padding:14px 0;gap:0}
body.sidebar-collapsed .nav span:not(.material-symbols-outlined){display:none}
html.sidebar-collapsed .nav span:not(.material-symbols-outlined){display:none}
body.sidebar-collapsed .nav .material-symbols-outlined{font-size:25px}
html.sidebar-collapsed .nav .material-symbols-outlined{font-size:25px}
body.sidebar-collapsed .nav:hover::after{content:attr(data-label);position:fixed;left:82px;background:#111827;color:#fff;padding:7px 10px;border-radius:8px;font-size:12px;white-space:nowrap;z-index:50;box-shadow:0 10px 24px rgba(15,23,42,.2)}
html.sidebar-collapsed .nav:hover::after{content:attr(data-label);position:fixed;left:82px;background:#111827;color:#fff;padding:7px 10px;border-radius:8px;font-size:12px;white-space:nowrap;z-index:50;box-shadow:0 10px 24px rgba(15,23,42,.2)}
body.sidebar-collapsed .sidebar-toggle,html.sidebar-collapsed .sidebar-toggle{background:#eef2ff;color:#1e40af}
@media(max-width:900px){body.sidebar-collapsed .sidebar{width:280px}body.sidebar-collapsed .main{margin-left:0}body.sidebar-collapsed .brand div{display:block}body.sidebar-collapsed .nav{justify-content:flex-start;padding:14px 24px;gap:12px}body.sidebar-collapsed .nav span:not(.material-symbols-outlined){display:inline}body.sidebar-collapsed .nav:hover::after{display:none}}
/* Question bank grouped browser */
.question-browser{margin-top:24px}
.question-browser-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}
.question-browser-head h2{margin-bottom:6px}
.question-browser-head p{margin:0}
.question-filter{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.question-filter select{min-width:160px}
.subject-accordion{display:grid;gap:12px}
.subject-group,.lesson-group{border:1px solid #dbe1ec;border-radius:12px;background:#fff;overflow:hidden}
.subject-toggle,.lesson-toggle{width:100%;border:0;background:#fff;color:#172033;display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:12px;text-align:left;cursor:pointer}
.subject-toggle{padding:16px 18px;font-size:15px;font-weight:600;line-height:1.35}
.lesson-toggle{padding:12px 14px;font-size:14px;font-weight:800;background:#fbfcff}
.subject-toggle:hover,.lesson-toggle:hover{background:#f6f8ff}
.subject-toggle .material-symbols-outlined:first-child,.lesson-toggle .material-symbols-outlined:first-child{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:#eef2ff;color:#1e40af}
.lesson-toggle .material-symbols-outlined:first-child{width:30px;height:30px;background:#e8fff9;color:#006a61}
.subject-title,.lesson-toggle span:nth-child(2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.subject-title{color:#102449;font-weight:650}
.group-count{border-radius:999px;background:#eef2ff;color:#173bab;padding:5px 10px;font-size:12px;font-weight:800;white-space:nowrap}
.lesson-toggle .group-count{background:#f1f5f9;color:#475569}
.chevron{transition:transform .18s ease;color:#64748b}
.subject-body,.lesson-body{display:none}
.subject-group.open>.subject-toggle .chevron,.lesson-group.open>.lesson-toggle .chevron{transform:rotate(180deg)}
.subject-group.open>.subject-body,.lesson-group.open>.lesson-body{display:block}
.subject-body{padding:0 14px 14px;background:#f8fafc;border-top:1px solid #e7eaf2}
.lesson-group{margin-top:12px}
.lesson-body{padding:12px;background:#fff;border-top:1px solid #e7eaf2}
.lesson-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;padding:10px 12px;border:1px solid #e7eaf2;border-radius:10px;background:#fbfcff}
.lesson-actions strong{color:#172033}
.question-table{margin:0;border-radius:10px}
.question-table td:first-child{min-width:360px;line-height:1.55}
.empty-state{display:grid;place-items:center;text-align:center;gap:8px;padding:36px 16px;border:1px dashed #d7d9e5;border-radius:12px;background:#fbfcff}
.empty-state .material-symbols-outlined{width:48px;height:48px;display:grid;place-items:center;border-radius:12px;background:#eef2ff;color:#1e40af;font-size:28px}
.empty-state strong{font-size:16px;color:#1a1b22}
body.dark .subject-group,body.dark .lesson-group,body.dark .subject-toggle{background:#1f2937;border-color:#334155;color:#e5e7eb}
body.dark .lesson-toggle,body.dark .subject-body{background:#111827;color:#e5e7eb}
body.dark .lesson-body,body.dark .empty-state{background:#1f2937;border-color:#334155}
body.dark .lesson-actions{background:#111827;border-color:#334155}
body.dark .lesson-actions strong{color:#e5e7eb}
body.dark .subject-toggle:hover,body.dark .lesson-toggle:hover{background:#273449}
@media(max-width:900px){.question-browser-head{flex-direction:column}.question-filter{width:100%;justify-content:flex-start}.question-filter select{flex:1;min-width:150px}.question-table td:first-child{min-width:260px}}
@media(max-width:640px){.subject-toggle,.lesson-toggle{grid-template-columns:auto minmax(0,1fr) auto}.subject-toggle{padding:13px 12px}.lesson-toggle{padding:11px 10px}.group-count{grid-column:2/3;width:max-content}.subject-toggle .chevron,.lesson-toggle .chevron{grid-column:3;grid-row:1/3}.question-filter select,.question-filter .btn{width:100%}}
/* Assignment page */
.assignment-layout{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(340px,.8fr);gap:22px;align-items:start}
.assignment-picker,.assignment-recipients{margin:0}
.assignment-filter{display:grid;grid-template-columns:minmax(220px,1fr) 170px 170px auto;gap:8px;margin-bottom:16px}
.exam-choice-list{display:grid;gap:10px;max-height:620px;overflow:auto;padding-right:4px}
.exam-choice{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;padding:13px;border:1px solid #dbe1ec;border-radius:12px;background:#fff;cursor:pointer;transition:.18s ease}
.exam-choice:hover{border-color:#b8c4ff;background:#fbfcff}
.exam-choice.selected{border-color:#1e40af;background:#eef2ff;box-shadow:0 0 0 3px rgba(30,64,175,.08)}
.exam-choice input{width:16px;height:16px;min-height:16px}
.exam-choice-main{display:grid;gap:3px;min-width:0}
.exam-choice-main strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#172033}
.exam-choice-main small{color:#64748b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.recipient-tabs{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:16px}
.recipient-panel{border:1px solid #dbe1ec;border-radius:12px;background:#fbfcff;padding:14px}
.recipient-panel-full{margin-bottom:16px}
.recipient-panel h3{margin:0 0 10px}
.recipient-list{display:grid;gap:8px;max-height:260px;overflow:auto;padding-right:4px}
.recipient-row{display:flex;align-items:flex-start;gap:9px;padding:9px;border-radius:10px;background:#fff;border:1px solid #edf1f7;margin:0;cursor:pointer}
.recipient-row:hover{border-color:#b8c4ff;background:#f8fbff}
.recipient-row input{width:16px;height:16px;min-height:16px;margin-top:3px}
.recipient-row span{display:grid;gap:2px;min-width:0}
.recipient-row strong{font-size:13px;color:#172033;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.recipient-row small{font-size:12px;color:#64748b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.notification-compose{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,.95fr);gap:18px;align-items:start}
.notification-compose.split-compose{margin-top:0}
.notification-compose-main{display:grid;gap:14px}
.notification-compose-main textarea{min-height:128px;max-height:190px}
.notification-compose-main .btn{width:max-content}
.notification-compose-classes .recipient-list{max-height:330px}
.notification-teacher-list{max-height:180px;margin-bottom:14px}
.notification-submit{margin-top:14px;width:max-content}
.assigned-table{margin-top:24px}
body.dark .exam-choice,body.dark .recipient-row{background:#1f2937;border-color:#334155}
body.dark .notification-popover,body.dark .notification-modal-card{background:#111827;border-color:#334155;color:#d1d5db}
body.dark .notification-popover-item{background:#111827;border-color:#334155}
body.dark .notification-popover-item:hover,body.dark .notification-popover-item.unread{background:#1f2937}
body.dark .notification-popover-item strong,body.dark .notification-popover-head strong,body.dark .notification-modal-card h2{color:#e5e7eb}
body.dark .exam-choice:hover,body.dark .exam-choice.selected,body.dark .recipient-row:hover{background:#273449}
body.dark .recipient-panel{background:#111827;border-color:#334155}
body.dark .exam-choice-main strong,body.dark .recipient-row strong{color:#e5e7eb}
@media(max-width:1150px){.assignment-layout{grid-template-columns:1fr}.assignment-filter{grid-template-columns:1fr 1fr}.assignment-filter input{grid-column:1/-1}.recipient-list{max-height:220px}}
@media(max-width:900px){.notification-compose{grid-template-columns:1fr}.notification-compose-main .btn{width:100%}}
@media(max-width:700px){.assignment-filter,.recipient-tabs{grid-template-columns:1fr}.exam-choice{grid-template-columns:auto minmax(0,1fr)}.exam-choice .status-pill{grid-column:2;width:max-content}.exam-choice-main strong,.exam-choice-main small{white-space:normal}}
/* Core product workflow */
.nav-section{padding:6px 0 12px}
.nav-section-label{display:block;padding:10px 24px 6px;color:#64748b;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}
body.sidebar-collapsed .nav-section-label,html.sidebar-collapsed .nav-section-label{display:none}
.core-workflow{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:0 0 22px}
.workflow-step{display:flex;align-items:center;gap:12px;padding:16px;border:1px solid #dbe1ec;border-radius:12px;background:#fff;color:#172033;box-shadow:0 1px 3px rgba(15,23,42,.04);transition:.18s ease}
.workflow-step:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(15,23,42,.08);border-color:#b8c4ff}
.workflow-step.active{background:#0b7cff;color:#fff;border-color:#0b7cff}
.workflow-step .material-symbols-outlined{width:38px;height:38px;display:grid;place-items:center;border-radius:10px;background:#eef2ff;color:#1e40af}
.workflow-step.active .material-symbols-outlined{background:rgba(255,255,255,.18);color:#fff}
.workflow-step strong{display:block;font-size:15px;line-height:1.25}
.workflow-step small{display:block;color:#64748b;font-size:12px;line-height:1.35;margin-top:2px}
.workflow-step.active small{color:#eaf2ff}
.exam-builder-table input{min-width:76px}
.exam-count-cell{display:grid;gap:5px}
.exam-count-cell span{color:#64748b;font-size:11px;font-weight:800}
.exam-type-disabled{opacity:.38;background:#f8fafc}
.exam-type-disabled input{cursor:not-allowed}
body.dark .workflow-step{background:#1f2937;border-color:#334155;color:#e5e7eb}
body.dark .workflow-step small,.dark .exam-count-cell span{color:#9ca3af}
body.dark .exam-type-disabled{background:#111827}
body.dark .workflow-step.active{background:#1e40af;border-color:#1e40af}
@media(max-width:900px){.core-workflow{grid-template-columns:1fr}.workflow-step{padding:13px}}

/* EduQuest LaTeX/MathJax preview */
.math-live-preview {
  margin: 8px 0 12px;
  padding: 12px 14px;
  border: 1px dashed #93c5fd;
  border-radius: 12px;
  background: #f8fbff;
  color: #111827;
  line-height: 1.7;
}

.math-live-title {
  font-size: 12px;
  font-weight: 800;
  color: #1e40af;
  margin-bottom: 6px;
}

.math-live-content {
  font-size: 15px;
}

.question .MathJax,
.exam-paper .MathJax,
.question-content-render .MathJax,
.math-live-preview .MathJax {
  font-size: 1.08em !important;
}

body.dark .math-live-preview {
  background: #0f172a;
  border-color: #334155;
  color: #e5e7eb;
}

/* Phóng to ảnh công thức/hình được import từ Word/PDF */
.question-content img,
.question-preview img,
.import-preview img,
.preview-question img,
.formula-image,
.question-image,
img[src*="uploads/questions/"] {
  max-width: 100%;
  height: auto;
}

/* Ảnh công thức nhỏ thì phóng to nhẹ để dễ nhìn */
.question-content img[src*="uploads/questions/"],
.import-preview img[src*="uploads/questions/"],
.preview-question img[src*="uploads/questions/"],
.question-preview img[src*="uploads/questions/"] {
  min-width: 180px;
  max-height: 360px;
  object-fit: contain;
  transform: scale(1.35);
  transform-origin: left center;
  margin: 10px 0 18px 0;
}

/* Nếu ảnh nằm trong khung câu hỏi thì chừa khoảng trống sau khi phóng */
.question-content,
.import-preview,
.preview-question,
.question-preview {
  overflow: visible;
}


/* ===== EduQuest: phóng to ảnh công thức import từ Word/PDF ===== */

img[src*="uploads/questions/"] {
  max-width: 100% !important;
  height: auto;
  vertical-align: middle !important;
}

/* Ảnh công thức nhỏ trong nội dung câu hỏi */
img.eq-formula-img,
.question-content img.eq-formula-img,
.import-preview img.eq-formula-img,
.preview-question img.eq-formula-img,
.question-preview img.eq-formula-img,
.card img.eq-formula-img {
  width: auto !important;
  height: 120px !important;
  min-height: 120px !important;
  max-height: 160px !important;
  max-width: 95% !important;
  object-fit: contain !important;
  vertical-align: middle !important;
  display: inline-block !important;
  margin: 0 10px !important;
}

/* Ảnh công thức trong đáp án A/B/C/D */
.answer-option img.eq-formula-img,
.options img.eq-formula-img,
.option-row img.eq-formula-img,
label img.eq-formula-img {
  width: auto !important;
  height: 95px !important;
  min-height: 95px !important;
  max-height: 130px !important;
  max-width: 95% !important;
  object-fit: contain !important;
  vertical-align: middle !important;
  display: inline-block !important;
  margin: 0 8px !important;
}

/* Ảnh hình học/sơ đồ thì không ép cao cố định */
img.eq-diagram-img {
  max-width: 100% !important;
  height: auto !important;
  max-height: 520px !important;
  display: block !important;
  margin: 10px 0 !important;
}

