:root{
    --primary:#1476d4;
    --primary-dark:#0b579f;
    --primary-soft:#eaf4ff;
    --bg:#f4f8fc;
    --surface:#fff;
    --border:#dce9f5;
    --text:#103f6c;
    --muted:#708ca7;
    --success:#22b36a;
    --success-soft:#e8f8ef;
    --warning:#f4b51c;
    --warning-soft:#fff6d9;
    --danger:#ef4c56;
    --danger-soft:#ffebed;
    --violet:#7666dd;
    --shadow:0 8px 25px rgba(31,98,158,.07);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:"Segoe UI",Arial,sans-serif;background:var(--bg);color:var(--text)}
a{text-decoration:none;color:inherit}
button,input{font:inherit}
button{cursor:pointer}
.app-shell{display:flex;min-height:100vh}
.sidebar{
    width:250px;background:#fff;border-right:1px solid #e5eef7;
    display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0;z-index:50
}
.brand{height:78px;padding:0 20px;display:flex;align-items:center;gap:12px;border-bottom:1px solid #edf3f8}
.brand-logo,.login-logo{
    width:42px;height:42px;border-radius:12px;background:linear-gradient(135deg,#1683e8,#0a5fb2);
    color:#fff;font-weight:800;display:flex;align-items:center;justify-content:center;box-shadow:0 6px 14px rgba(20,118,212,.2)
}
.brand div:last-child{display:flex;flex-direction:column;gap:2px}
.brand strong{font-size:14px;color:#0b477e}
.brand span{font-size:14px;color:#7d96ad}
.main-nav{padding:18px 12px;display:grid;gap:7px}
.main-nav a{height:48px;padding:0 14px;border-radius:11px;display:flex;align-items:center;gap:12px;color:#587a9a}
.main-nav a span{width:24px;text-align:center;font-size:18px}
.main-nav a b{font-size:14px}
.main-nav a:hover{background:#f5faff;color:var(--primary)}
.main-nav a.active{background:var(--primary-soft);color:var(--primary)}
.sidebar-footer{margin-top:auto;padding:16px;border-top:1px solid #edf3f8}
.student-mini{display:flex;align-items:center;gap:10px}
.avatar,.top-avatar{border-radius:50%;background:linear-gradient(135deg,#1683e8,#0a5fb2);color:#fff;font-weight:800;display:flex;align-items:center;justify-content:center}
.avatar{width:38px;height:38px}
.student-mini div:last-child{display:flex;flex-direction:column;min-width:0}
.student-mini strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.student-mini span{font-size:14px;color:#7b96af}
.logout-link{display:block;margin-top:12px;padding:9px;text-align:center;border-radius:9px;color:#d94b55;background:#fff2f3;font-size:14px;font-weight:700}
.main-area{margin-left:250px;min-width:0;flex:1}
.topbar{height:78px;background:#fff;border-bottom:1px solid #e5eef7;display:flex;align-items:center;gap:14px;padding:0 24px;position:sticky;top:0;z-index:40}
.menu-toggle{display:none;border:0;background:#eef6fd;color:var(--primary);width:40px;height:40px;border-radius:10px}
.topbar-title{display:flex;flex-direction:column;gap:3px}
.topbar-title strong{font-size:19px;color:#0b4378}
.topbar-title span{font-size:14px;color:#7a94ab}
.topbar-actions{margin-left:auto;display:flex;align-items:center;gap:14px}
.status-pill{height:34px;padding:0 12px;border-radius:18px;background:#f2faf6;color:#438266;display:flex;align-items:center;gap:7px;font-size:14px}
.status-pill i{width:7px;height:7px;background:var(--success);border-radius:50%}
.top-avatar{width:38px;height:38px}
.content{padding:22px;max-width:1540px;margin:auto}
.panel{background:#fff;border:1px solid var(--border);border-radius:18px;box-shadow:var(--shadow)}
.welcome-banner{background:linear-gradient(135deg,#0f75d2,#0a5ca9);border-radius:20px;padding:28px;color:#fff;display:flex;justify-content:space-between;align-items:center;box-shadow:0 10px 28px rgba(20,118,212,.17)}
.welcome-banner h1{font-size:27px;margin:4px 0 8px}.welcome-banner p{margin:0;color:#dcebfa;max-width:720px;line-height:1.55}.eyebrow,.section-kicker{font-size:14px;letter-spacing:.12em;font-weight:800}.welcome-badge{min-width:170px;padding:16px 18px;border-radius:15px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);display:flex;flex-direction:column;gap:5px;text-align:right}.welcome-badge strong{font-size:20px}.welcome-badge span{font-size:14px;color:#dcecfb}
.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:16px 0}.stat-card{min-height:126px;border-radius:17px;padding:18px;display:flex;align-items:center;gap:14px;border:1px solid var(--border);background:#fff}.stat-icon{width:48px;height:48px;border-radius:14px;display:flex;align-items:center;justify-content:center;font-size:22px}.stat-card div:last-child{display:flex;flex-direction:column;gap:4px}.stat-card span{font-size:14px;color:#6484a3}.stat-card strong{font-size:25px}.stat-card small{font-size:14px;color:#93a9bd}.stat-card.blue .stat-icon{background:#e9f4ff}.stat-card.green .stat-icon{background:#e9f9f0}.stat-card.yellow .stat-icon{background:#fff7df}.stat-card.violet .stat-icon{background:#f0edff}
.two-column{display:grid;grid-template-columns:1.25fr 1fr;gap:16px}.panel{padding:18px}.panel-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:14px}.panel-head h2{margin:4px 0 0;font-size:18px}.section-kicker{color:var(--primary)}.panel-head a{font-size:14px;color:var(--primary);font-weight:700}
.exam-list,.result-list{display:grid;gap:10px}.exam-item,.result-item{display:flex;align-items:center;gap:12px;padding:13px;border:1px solid #e8f0f7;border-radius:13px}.exam-date-box{width:62px;height:60px;border-radius:12px;background:#edf6ff;display:flex;flex-direction:column;align-items:center;justify-content:center}.exam-date-box strong{font-size:20px;color:var(--primary)}.exam-date-box span{font-size:14px;color:#6f8fac}.exam-item-main,.result-info{flex:1;min-width:0}.exam-item h3,.result-item h3{font-size:14px;margin:0 0 5px}.exam-item p,.result-item p{font-size:14px;margin:0;color:#8198ad}.status-chip{font-size:14px;padding:6px 9px;border-radius:20px}.status-chip.pending{background:#fff6d9;color:#9b6b00}.score-box{width:48px;height:48px;border-radius:12px;background:#e8f8ef;color:#168b4f;font-weight:800;display:flex;align-items:center;justify-content:center}
.quick-actions{margin-top:16px}.quick-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.quick-card{border:1px solid var(--border);border-radius:14px;padding:18px;display:flex;flex-direction:column;gap:7px}.quick-card>span{font-size:24px}.quick-card strong{font-size:14px}.quick-card small{font-size:14px;color:#7993aa}.quick-card:hover{border-color:#9bc8ef;background:#f9fcff}
.btn{height:42px;border-radius:10px;padding:0 16px;border:1px solid var(--primary);font-weight:700}.btn.primary{background:var(--primary);color:#fff}.btn.outline{background:#fff;color:var(--primary)}
.review-layout{display:grid;grid-template-columns:360px minmax(0,1fr);gap:16px}.history-list{display:grid;gap:9px}.history-item{padding:13px;border:1px solid #e4edf5;border-radius:13px;display:flex;align-items:center;gap:10px}.history-item.selected{border-color:#8bc2ef;background:#f3f9ff}.history-item div:first-child{flex:1}.history-item h3{margin:0 0 5px;font-size:14px}.history-item p{margin:0;font-size:14px;color:#8099af}.history-score{width:46px;height:46px;border-radius:11px;background:#e9f8ef;color:#138a4d;font-weight:800;display:flex;align-items:center;justify-content:center}.review-summary{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #ecf2f7;padding-bottom:16px}.review-summary h2{margin:5px 0 5px}.review-summary p{margin:0;font-size:14px;color:#7992aa}.big-score{width:94px;height:94px;border-radius:18px;background:#edf7ff;display:flex;flex-direction:column;align-items:center;justify-content:center}.big-score span{font-size:14px}.big-score strong{font-size:31px;color:var(--primary)}.review-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:16px 0}.review-stats div{padding:12px;border:1px solid var(--border);border-radius:12px;display:flex;flex-direction:column;gap:4px}.review-stats span{font-size:14px;color:#7991a8}.review-stats strong{font-size:18px}.review-question{padding:16px 0;border-top:1px solid #edf2f7}.review-question-head{display:flex;justify-content:space-between}.review-question p{line-height:1.55}.correct-badge,.wrong-badge{font-size:14px;padding:5px 8px;border-radius:20px}.correct-badge{background:#e8f8ef;color:#18894f}.wrong-badge{background:#ffebed;color:#cc3945}.review-answer{padding:11px 13px;margin:7px 0;border:1px solid #e1ebf4;border-radius:10px;font-size:14px}.review-answer.correct{background:#edf9f2;border-color:#bce8cf}.review-answer.wrong{background:#fff0f1;border-color:#f1c3c7}.review-answer span{float:right;font-size:14px;color:#66839f}.explanation{margin-top:10px;padding:12px;border-radius:10px;background:#f7faff;font-size:14px;color:#5e7d9b;line-height:1.55}
.profile-layout{display:grid;grid-template-columns:310px minmax(0,1fr);gap:16px}.profile-card{text-align:center;padding:28px 20px}.profile-avatar{width:92px;height:92px;border-radius:50%;background:linear-gradient(135deg,#1683e8,#0a5fb2);color:#fff;font-size:34px;font-weight:800;display:flex;align-items:center;justify-content:center;margin:0 auto 12px}.profile-card h2{margin:0 0 5px}.profile-card p{margin:0;color:#8299ad;font-size:14px}.profile-meta{margin-top:22px;display:grid;gap:8px}.profile-meta div{display:flex;justify-content:space-between;padding:10px 0;border-top:1px solid #edf2f7}.profile-meta span{font-size:14px;color:#7892aa}.profile-meta strong{font-size:14px;text-align:right}.profile-form{margin-top:10px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.form-grid label{display:flex;flex-direction:column;gap:7px}.form-grid label.full{grid-column:1/-1}.form-grid span{font-size:14px;font-weight:700}.form-grid input{height:44px;border:1px solid #d7e5f2;border-radius:10px;padding:0 12px;color:#244f78;background:#fff}.form-grid input:disabled{background:#f5f8fb;color:#8499ad}.form-grid input.profile-locked-field,.form-grid input.profile-locked-field[readonly]{background:#f5f8fb;color:#8499ad;cursor:not-allowed;box-shadow:none}.form-grid input.profile-locked-field:focus{border-color:#d7e5f2;box-shadow:none;outline:none}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.success-alert{padding:11px 13px;border-radius:10px;background:#e9f9f0;color:#14894d;font-size:14px;margin-bottom:12px}.password-section{margin-top:24px;padding-top:18px;border-top:1px solid #edf2f7;display:flex;align-items:center;justify-content:space-between}.password-section h3{margin:0 0 4px}.password-section p{margin:0;color:#8197ac;font-size:14px}
@media(max-width:1100px){.stat-grid{grid-template-columns:1fr 1fr}.two-column,.review-layout,.profile-layout{grid-template-columns:1fr}.review-layout .history-panel{order:2}}
@media(max-width:800px){.sidebar{transform:translateX(-100%);transition:.2s}.sidebar.open{transform:translateX(0)}.main-area{margin-left:0}.menu-toggle{display:block}.topbar{padding:0 14px}.content{padding:14px}.topbar-actions .status-pill{display:none}.welcome-banner{align-items:flex-start;gap:18px;flex-direction:column}.welcome-badge{text-align:left}.quick-grid{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.form-grid label.full{grid-column:auto}}
@media(max-width:520px){.stat-grid{grid-template-columns:1fr}.review-stats{grid-template-columns:1fr 1fr}}

.status-chip.active{background:#e8f8ef;color:#16894f}.status-chip.closed{background:#eef2f5;color:#75899b}.empty-state{padding:24px;text-align:center;color:#7a92aa;font-size:14px}
.exam-item .btn{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap}


/* =========================================================
   V3 - STUDENT HOME BASED ON FrmTrangChuHocSinh WINFORMS
   ========================================================= */

/* Brand: bỏ dòng "Học sinh" ở khu vực TT */
.brand-name-only{
    display:flex!important;
    flex-direction:row!important;
    align-items:center;
}
.brand-name-only strong{
    font-size:14px;
    color:#0b477e;
    white-space:nowrap;
}

/* Topbar: không còn trạng thái online và avatar góc phải */
.topbar{
    min-height:72px;
    height:72px;
}
.topbar-title{
    margin-right:auto;
}

/* Sidebar student identity: dòng dưới tên là "Học sinh" */
.student-mini span{
    color:#7891a9;
    font-weight:600;
}

/* Trang chủ riêng */
.student-home-winforms{
    display:grid;
    gap:14px;
}

.wf-home-top{
    display:grid;
    grid-template-columns:minmax(0,1fr) 255px;
    gap:14px;
}

.wf-welcome-card,
.wf-clock-card,
.wf-card{
    background:#fff;
    border:1px solid #d8e9f7;
    border-radius:12px;
    box-shadow:0 3px 12px rgba(26,91,148,.035);
}

.wf-welcome-card{
    min-height:112px;
    display:flex;
    align-items:center;
    gap:17px;
    padding:20px 22px;
    background:
        linear-gradient(90deg,#f7fbff 0%,#ffffff 76%);
}

.wf-welcome-icon{
    flex:0 0 52px;
    width:52px;
    height:52px;
    border-radius:12px;
    background:#e8f4ff;
    color:#1a7aec;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:25px;
    font-weight:800;
}

.wf-welcome-copy{
    min-width:0;
}

.wf-welcome-label{
    display:block;
    margin-bottom:5px;
    color:#1a7aec;
    font-size:14px;
    font-weight:800;
    letter-spacing:.10em;
}

.wf-welcome-copy h1{
    margin:0;
    color:#123e70;
    font-size:22px;
    line-height:1.3;
}

.wf-welcome-copy p{
    margin:7px 0 0;
    color:#6b88a5;
    font-size:14px;
    line-height:1.5;
}

.wf-clock-card{
    min-height:112px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:13px;
    padding:18px;
}

.wf-clock-icon{
    width:40px;
    height:40px;
    border-radius:10px;
    background:#edf6ff;
    color:#1676d7;
    display:flex;
    justify-content:center;
    align-items:center;
    font-size:20px;
}

.wf-clock-copy{
    display:flex;
    flex-direction:column;
    gap:2px;
}

.wf-clock-copy span{
    color:#718ca6;
    font-size:14px;
}

.wf-clock-copy strong{
    color:#154b80;
    font-size:14px;
}

.wf-clock-copy b{
    color:#1676d7;
    font-size:22px;
    letter-spacing:.02em;
}

/* Stats giống 4 pnlStat trong WinForms */
.wf-stat-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
}

.wf-stat-card{
    min-height:100px;
    padding:14px 16px;
    border:1px solid;
    border-radius:10px;
    display:flex;
    align-items:center;
    gap:13px;
    background:#fff;
}

.wf-stat-icon{
    width:42px;
    height:42px;
    flex:0 0 42px;
    border-radius:10px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:20px;
    font-weight:800;
}

.wf-stat-copy{
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:2px;
}

.wf-stat-copy span{
    color:#4f7191;
    font-size:14px;
    font-weight:700;
}

.wf-stat-copy strong{
    color:#113f70;
    font-size:23px;
    line-height:1.1;
}

.wf-stat-copy small{
    color:#8ba1b5;
    font-size:14px;
}

.stat-blue{
    background:#f4f9ff;
    border-color:#c7e0f9;
}
.stat-blue .wf-stat-icon{
    background:#e4f1fe;
    color:#1a7aec;
}

.stat-green{
    background:#f1fcf7;
    border-color:#bdebd7;
}
.stat-green .wf-stat-icon{
    background:#dff6eb;
    color:#1cac66;
}

.stat-red{
    background:#fff9ee;
    border-color:#f0d39a;
}
.stat-red .wf-stat-icon{
    background:#ffedc7;
    color:#c98508;
}

.stat-yellow{
    background:#fffaf0;
    border-color:#f5e0aa;
}
.stat-yellow .wf-stat-icon{
    background:#fff0c9;
    color:#d79600;
}

/* Card chung */
.wf-card{
    padding:0;
    overflow:hidden;
}

.wf-card-titlebar{
    min-height:70px;
    padding:14px 16px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:14px;
    border-bottom:1px solid #e7f0f8;
}

.wf-card-titlebar.simple{
    min-height:61px;
}

.wf-card-titlebar h2{
    margin:0;
    color:#164b7e;
    font-size:15px;
}

.wf-card-titlebar p{
    margin:4px 0 0;
    color:#8299ae;
    font-size:14px;
}

.wf-card-titlebar a{
    color:#1676d7;
    font-size:14px;
    font-weight:700;
}

/* Search/filter giống pnlSearch + cboSubject WinForms */
.wf-exam-tools{
    display:flex;
    align-items:center;
    gap:9px;
}

.wf-search-box{
    width:235px;
    height:38px;
    display:flex;
    align-items:center;
    gap:7px;
    padding:0 11px;
    border:1px solid #b8d3eb;
    border-radius:8px;
    background:#fff;
}

.wf-search-box span{
    color:#6f91af;
    font-size:18px;
}

.wf-search-box input{
    min-width:0;
    flex:1;
    border:0;
    outline:0;
    color:#194c7b;
    background:transparent;
    font-size:14px;
}

.wf-search-box input::placeholder{
    color:#92a7b9;
}

.wf-filter-select{
    height:38px;
    min-width:145px;
    padding:0 31px 0 10px;
    border:1px solid #b8d3eb;
    border-radius:8px;
    color:#285a87;
    background:#fff;
    outline:0;
    font-size:14px;
}

/* Bảng đề thi giống tblExamHeader + rows WinForms */
.wf-exam-table-wrap{
    width:100%;
    overflow-x:auto;
}

.wf-exam-table{
    width:100%;
    min-width:900px;
    border-collapse:collapse;
    table-layout:fixed;
}

.wf-exam-table thead{
    background:#edf6fd;
}

.wf-exam-table th{
    height:38px;
    padding:0 9px;
    text-align:left;
    color:#24577f;
    font-size:14px;
    font-weight:800;
    border-bottom:1px solid #d9e9f6;
    white-space:nowrap;
}

.wf-exam-table td{
    height:48px;
    padding:7px 9px;
    color:#244f77;
    font-size:14px;
    border-bottom:1px solid #edf3f8;
    vertical-align:middle;
}

.wf-exam-table tbody tr:last-child td{
    border-bottom:0;
}

.wf-exam-row:hover{
    background:#fbfdff;
}

.wf-exam-table .col-stt{
    width:5%;
}

.wf-exam-table th:nth-child(2){width:28%}
.wf-exam-table th:nth-child(3){width:11%}
.wf-exam-table th:nth-child(4){width:8%}
.wf-exam-table th:nth-child(5){width:10%}
.wf-exam-table th:nth-child(6){width:12%}
.wf-exam-table th:nth-child(7){width:13%}
.wf-exam-table th:nth-child(8){width:13%}

.center{
    text-align:center!important;
}

.exam-name-cell{
    overflow:hidden;
}

.exam-name-cell strong{
    display:block;
    color:#153f6b;
    font-size:14px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.exam-name-cell small{
    display:block;
    margin-top:3px;
    color:#93a6b8;
    font-size:14px;
}

.wf-subject-pill{
    display:inline-flex;
    min-height:25px;
    padding:0 9px;
    border-radius:8px;
    background:#e1f1ff;
    color:#0e5fc7;
    justify-content:center;
    align-items:center;
    font-size:14px;
    font-weight:700;
    white-space:nowrap;
}

.wf-subject-pill.compact{
    min-height:21px;
    padding:0 7px;
    font-size:14px;
}

.wf-status-pill{
    display:inline-flex;
    min-height:27px;
    min-width:85px;
    padding:0 9px;
    border-radius:9px;
    justify-content:center;
    align-items:center;
    font-size:14px;
    font-weight:700;
    white-space:nowrap;
}

.wf-status-pill.upcoming,
.wf-status-pill.inprogress{
    background:#eef6ff;
    color:#2f6eae;
}

.wf-status-pill.expired{
    background:#fff0f1;
    color:#b84952;
}

.wf-status-pill.done{
    background:#eefaf4;
    color:#287c55;
}

.wf-status-pill.notstarted{
    background:#fff8e8;
    color:#9a6a17;
}

.wf-exam-action{
    min-width:78px;
    height:31px;
    padding:0 9px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:8px;
    background:#1a7aec;
    border:1px solid #1a7aec;
    color:#fff;
    font-size:14px;
    font-weight:700;
    white-space:nowrap;
}

.wf-exam-action:hover{
    background:#1268ce;
}

.wf-exam-action.disabled{
    background:#e2f0fa;
    border-color:#e2f0fa;
    color:#708ba3;
    cursor:not-allowed;
}

.wf-empty-row,
.wf-empty-state{
    padding:24px!important;
    text-align:center;
    color:#8298ac!important;
    font-size:14px!important;
}

/* Hai card cuối */
.wf-bottom-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px;
}

.wf-activity-list,
.wf-recent-list{
    padding:5px 15px 12px;
}

.wf-activity-row{
    min-height:52px;
    display:flex;
    align-items:center;
    gap:11px;
    border-bottom:1px solid #edf3f8;
}

.wf-activity-row:last-child{
    border-bottom:0;
}

.wf-activity-dot{
    width:9px;
    height:9px;
    flex:0 0 9px;
    border-radius:50%;
}

.wf-activity-dot.working{
    background:#1a7aec;
}

.wf-activity-dot.finished{
    background:#20ac66;
}

.wf-activity-copy{
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:3px;
}

.wf-activity-copy strong{
    color:#234f78;
    font-size:14px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.wf-activity-copy span{
    color:#8a9fb1;
    font-size:14px;
}

.wf-recent-row{
    min-height:58px;
    display:flex;
    align-items:center;
    gap:12px;
    border-bottom:1px solid #edf3f8;
}

.wf-recent-row:last-child{
    border-bottom:0;
}

.wf-recent-row:hover{
    background:#fbfdff;
}

.wf-recent-main{
    flex:1;
    min-width:0;
}

.wf-recent-main>strong{
    display:block;
    margin-bottom:6px;
    color:#234f78;
    font-size:14px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.wf-recent-main>div{
    display:flex;
    align-items:center;
    gap:8px;
}

.wf-recent-main small{
    color:#8a9fb1;
    font-size:14px;
}

.wf-score-pill{
    min-width:45px;
    height:30px;
    border-radius:9px;
    background:#eefaf4;
    color:#287c55;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:14px;
    font-weight:800;
}

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

    .wf-home-top{
        grid-template-columns:minmax(0,1fr) 220px;
    }

    .wf-exam-tools{
        align-items:stretch;
        flex-direction:column;
    }

    .wf-search-box,
    .wf-filter-select{
        width:190px;
    }
}

@media(max-width:850px){
    .wf-home-top,
    .wf-bottom-grid{
        grid-template-columns:1fr;
    }

    .wf-clock-card{
        justify-content:flex-start;
    }

    .wf-card-titlebar{
        align-items:stretch;
        flex-direction:column;
    }

    .wf-exam-tools{
        flex-direction:row;
    }

    .wf-search-box{
        flex:1;
        width:auto;
    }
}

@media(max-width:560px){
    .wf-stat-grid{
        grid-template-columns:1fr;
    }

    .wf-exam-tools{
        flex-direction:column;
    }

    .wf-search-box,
    .wf-filter-select{
        width:100%;
    }

    .wf-welcome-card{
        align-items:flex-start;
        padding:16px;
    }

    .wf-welcome-copy h1{
        font-size:18px;
    }
}

/* FULL-FIX compatibility: review media remains visible; FLAT V2 visual language retained. */
.review-question-subtitle{margin:.55rem 0;padding:.65rem .8rem;border-radius:10px;background:#f6f9fc;color:#526579;line-height:1.55}
.review-media{margin:.7rem 0}.review-media img{max-width:min(100%,620px);max-height:420px;object-fit:contain;border-radius:10px;border:1px solid #dbe6ef;background:#fff;box-shadow:none}
.review-answer-image{display:block;max-width:min(100%,340px);max-height:220px;object-fit:contain;margin:.55rem 0;border-radius:9px;border:1px solid #dce7ef;background:#fff;box-shadow:none}
.review-answer-tags{display:flex;gap:6px;flex-wrap:wrap}


/* V19 - Tài khoản học sinh */
.account-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0 0 16px}.account-tab{display:flex;align-items:center;gap:12px;padding:14px 16px;border:1px solid #d9e7f5;border-radius:14px;background:#fff;color:#315777;text-decoration:none;box-shadow:0 4px 16px rgba(20,72,115,.04);transition:.18s ease}.account-tab:hover{border-color:#9bc9ee;background:#f7fbff;transform:translateY(-1px)}.account-tab.active{border-color:#1683e8;background:#edf7ff;box-shadow:0 0 0 2px rgba(22,131,232,.08)}.account-tab img{width:28px;height:28px;object-fit:contain;flex:0 0 28px}.account-tab span{display:flex;min-width:0;flex-direction:column;gap:3px}.account-tab strong{font-size:15px;color:#174f80}.account-tab small{font-size:14px;color:#7892aa;line-height:1.35}.account-password-card{max-width:760px;margin:0 auto}.account-password-form{display:grid;gap:15px}.account-password-field{display:flex;flex-direction:column;gap:7px}.account-password-field>span{font-size:14px;font-weight:800;color:#315777}.account-password-box{display:flex;align-items:center;border:1px solid #d7e5f2;border-radius:10px;background:#fff;overflow:hidden}.account-password-box:focus-within{border-color:#1683e8;box-shadow:0 0 0 3px rgba(22,131,232,.1)}.account-password-box input{min-width:0;flex:1;height:44px;border:0;outline:0;padding:0 12px;color:#244f78;background:transparent;font:inherit}.account-password-toggle{height:44px;padding:0 14px;border:0;border-left:1px solid #e1ebf4;background:#f7fbff;color:#126abd;font-weight:800;cursor:pointer}.account-password-toggle:hover{background:#eaf5ff}.account-security-note{padding:12px 14px;border:1px solid #dbe9f5;border-radius:10px;background:#f7fbff;color:#5e7890;font-size:14px;line-height:1.5}

/* V19 - bộ lọc trang xem lại bài thi */
.review-filter-card{margin-bottom:14px;padding:14px 16px;background:#fff;border:1px solid #d9e7f5;border-radius:14px;box-shadow:0 4px 16px rgba(20,72,115,.04)}.review-filter-grid{display:grid;grid-template-columns:minmax(220px,1.7fr) minmax(180px,1fr) minmax(160px,.8fr) minmax(170px,.9fr) auto;gap:12px;align-items:end}.review-filter-field{display:flex;min-width:0;flex-direction:column;gap:6px}.review-filter-field label{font-size:14px;font-weight:800;color:#315777}.review-filter-field input,.review-filter-field select{width:100%;height:42px;border:1px solid #d7e5f2;border-radius:9px;padding:0 11px;background:#fff;color:#244f78;font:inherit}.review-filter-actions{display:flex;gap:8px;align-items:center}.review-filter-btn{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:0 16px;border-radius:9px;border:1px solid #1683e8;background:#1683e8;color:#fff;font-weight:800;text-decoration:none;cursor:pointer}.review-filter-btn.secondary{border-color:#c6d9ea;background:#fff;color:#315777}.review-status-badge{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;font-size:14px;font-weight:800;white-space:nowrap}.review-status-badge.submitted{background:#e8f8ef;color:#16834d}.review-status-badge.expired{background:#fff4df;color:#a96600}.review-pagination{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:14px;color:#6f879c;font-size:14px}.review-pagination-actions{display:flex;gap:8px}.review-pagination a{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:0 12px;border:1px solid #c6d9ea;border-radius:8px;background:#fff;color:#315777;text-decoration:none;font-weight:800}
@media(max-width:1050px){.review-filter-grid{grid-template-columns:1fr 1fr}.review-filter-actions{grid-column:1/-1}.account-tabs{grid-template-columns:1fr 1fr}}
@media(max-width:700px){.account-tabs,.review-filter-grid{grid-template-columns:1fr}.review-filter-actions{grid-column:auto;flex-wrap:wrap}.review-pagination{align-items:flex-start;flex-direction:column}}


/* V24: không để password manager tô nền xanh ở form đổi mật khẩu trong Tài khoản */
.account-password-box input:-webkit-autofill,
.account-password-box input:-webkit-autofill:hover,
.account-password-box input:-webkit-autofill:focus,
.account-password-box input:-webkit-autofill:active{
    -webkit-text-fill-color:#244f78!important;
    caret-color:#244f78!important;
    -webkit-box-shadow:0 0 0 1000px #fff inset!important;
    box-shadow:0 0 0 1000px #fff inset!important;
    background-color:#fff!important;
    transition:background-color 9999s ease-out 0s!important;
}

/* V26 - Student portal redesign */
.student-sidebar-v26{background:#fff}.student-nav-v26{gap:5px;overflow-y:auto;overflow-x:hidden;padding-bottom:10px}.student-nav-v26>a,.student-nav-group{width:100%;height:46px;padding:0 14px;border:0;border-radius:10px;display:flex;align-items:center;gap:12px;background:transparent;color:#587a9a;text-align:left}.student-nav-v26>a:hover,.student-nav-group:hover{background:#f5faff;color:var(--primary)}.student-nav-v26>a.active,.student-nav-group.open{background:var(--primary-soft);color:var(--primary)}.student-nav-v26 .nav-image-wrap,.student-nav-group .nav-image-wrap{width:24px;height:24px;display:flex;align-items:center;justify-content:center;flex:0 0 24px}.student-nav-v26 .nav-image-wrap img,.student-nav-group .nav-image-wrap img{width:21px;height:21px;object-fit:contain}.student-nav-v26>a b,.student-nav-group b{font-size:14px;flex:1}.student-nav-group{font:inherit;font-weight:700}.student-nav-chevron{width:18px;height:18px;display:flex;align-items:center;justify-content:center;transition:transform .18s}.student-nav-chevron img{width:16px;height:16px}.student-nav-group.open .student-nav-chevron{transform:rotate(90deg)}.student-submenu{display:none;margin:0 0 4px 42px;padding-left:10px;border-left:1px solid #dce9f5}.student-submenu.open{display:grid;gap:3px}.student-submenu a{min-height:36px;padding:8px 10px;border-radius:8px;color:#67849f;font-size:14px;font-weight:700;display:flex;align-items:center}.student-submenu a:hover{background:#f6fbff;color:#1476d4}.student-submenu a.active{background:#edf7ff;color:#1476d4}.student-nav-notification em{min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#ef4c56;color:#fff;font-size:14px;font-style:normal;font-weight:800;display:flex;align-items:center;justify-content:center}.student-topbar-v26{z-index:55}.student-topbar-actions{margin-left:auto;display:flex;align-items:center;gap:10px}.student-bell{width:42px;height:42px;border-radius:11px;border:1px solid #dce9f5;background:#fff;display:flex;align-items:center;justify-content:center;position:relative}.student-bell:hover{background:#f4f9ff;border-color:#b9d7ef}.student-bell img{width:22px;height:22px}.student-bell>span{position:absolute;right:-4px;top:-5px;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:#ef4c56;color:#fff;font-size:14px;font-weight:800;display:flex;align-items:center;justify-content:center;border:2px solid #fff}.student-account-menu{position:relative}.student-account-trigger{height:48px;min-width:230px;padding:4px 8px 4px 6px;border:1px solid transparent;border-radius:12px;background:#fff;display:flex;align-items:center;gap:9px;color:#244f78}.student-account-trigger:hover,.student-account-trigger[aria-expanded="true"]{background:#f7fbff;border-color:#d9e7f5}.student-account-trigger .top-avatar{width:38px;height:38px;flex:0 0 38px}.student-account-trigger .top-avatar img{width:100%;height:100%;object-fit:contain}.student-account-copy{min-width:0;display:flex;flex:1;flex-direction:column;align-items:flex-start;gap:2px}.student-account-copy strong,.student-account-copy small{max-width:155px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.student-account-copy strong{font-size:14px;color:#174f80}.student-account-copy small{font-size:14px;color:#7892aa}.student-account-arrow{width:16px;height:16px}.student-account-dropdown{position:absolute;right:0;top:54px;width:235px;padding:8px;border:1px solid #d9e7f5;border-radius:12px;background:#fff;box-shadow:0 16px 36px rgba(27,75,119,.14);z-index:100}.student-account-dropdown a{display:flex;min-height:39px;padding:8px 10px;border-radius:8px;align-items:center;color:#315777;font-size:14px;font-weight:700}.student-account-dropdown a:hover{background:#f3f9ff;color:#1476d4}.student-account-dropdown a.danger{color:#d94852}.student-account-dropdown span{display:block;height:1px;margin:5px 0;background:#e8eff6}

.student-page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:16px}.student-page-head h1{margin:0;color:#174f80;font-size:24px}.student-page-head p{margin:5px 0 0;color:#7892aa;font-size:14px;line-height:1.5}.student-page-actions{display:flex;gap:8px;flex-wrap:wrap}.student-card{background:#fff;border:1px solid #d9e7f5;border-radius:15px;box-shadow:0 5px 18px rgba(20,72,115,.05)}.student-card-head{padding:15px 17px;border-bottom:1px solid #e8eff6;display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.student-card-head h2,.student-card-head h3{margin:0;color:#174f80;font-size:18px}.student-card-head p{margin:4px 0 0;color:#7a91a6;font-size:14px}.student-card-body{padding:17px}.student-empty{padding:32px 18px;text-align:center;color:#7c94aa;font-size:14px}.student-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}.student-grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.student-grid-4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.student-metric{min-height:116px;padding:17px;border:1px solid #dce9f5;border-radius:14px;background:#fff;display:flex;flex-direction:column;justify-content:center;gap:5px}.student-metric span{color:#6d8aa4;font-size:14px;font-weight:700}.student-metric strong{color:#174f80;font-size:26px}.student-metric small{color:#8ba0b4;font-size:14px}.student-metric.blue{background:#f5faff}.student-metric.green{background:#f3fbf6}.student-metric.yellow{background:#fffbef}.student-metric.violet{background:#f8f6ff}

.student-table-wrap{overflow:auto}.student-data-table{width:100%;border-collapse:collapse;min-width:820px}.student-data-table th{padding:11px 12px;background:#edf6ff;color:#275b87;text-align:left;font-size:14px;font-weight:800;white-space:nowrap}.student-data-table td{padding:11px 12px;border-top:1px solid #e8eff6;color:#315777;font-size:14px;vertical-align:middle}.student-data-table .title{font-weight:800;color:#174d7b}.student-muted{color:#8198ad;font-size:14px}.student-badge{display:inline-flex;align-items:center;justify-content:center;min-height:27px;padding:4px 9px;border-radius:999px;font-size:14px;font-weight:800;white-space:nowrap}.student-badge.green{background:#e8f8ef;color:#16834d}.student-badge.blue{background:#e9f4ff;color:#1470c5}.student-badge.yellow{background:#fff6d9;color:#9b6b00}.student-badge.red{background:#ffebed;color:#cc3945}.student-badge.gray{background:#eef2f6;color:#6e8499}.student-badge.violet{background:#f0edff;color:#6956d0}.student-inline-link{color:#1476d4;font-weight:800;font-size:14px}.student-inline-link:hover{text-decoration:underline}

.student-filter-bar{padding:14px 16px;margin-bottom:14px;background:#fff;border:1px solid #d9e7f5;border-radius:14px;display:grid;grid-template-columns:minmax(220px,1.5fr) repeat(3,minmax(150px,.8fr)) auto;gap:10px;align-items:end}.student-filter-field{display:flex;min-width:0;flex-direction:column;gap:6px}.student-filter-field label{font-size:14px;font-weight:800;color:#315777}.student-filter-field input,.student-filter-field select,.student-form input,.student-form select,.student-form textarea{width:100%;border:1px solid #d7e5f2;border-radius:9px;background:#fff;color:#244f78;font:inherit}.student-filter-field input,.student-filter-field select,.student-form input,.student-form select{height:42px;padding:0 11px}.student-form textarea{min-height:125px;padding:11px;resize:vertical}.student-filter-actions{display:flex;gap:8px}.student-button{min-height:42px;padding:0 15px;border-radius:9px;border:1px solid #1683e8;background:#1683e8;color:#fff;font-size:14px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;gap:7px}.student-button.secondary{background:#fff;color:#315777;border-color:#c6d9ea}.student-button.danger{background:#e84c56;border-color:#e84c56;color:#fff}.student-button:hover{filter:brightness(.98)}

.student-notification-list{display:grid}.student-notification-row{display:flex;gap:13px;padding:14px 16px;border-bottom:1px solid #e8eff6;background:#fff}.student-notification-row:last-child{border-bottom:0}.student-notification-row.unread{background:#f5faff}.student-notification-icon{width:42px;height:42px;border-radius:12px;background:#eaf4ff;display:flex;align-items:center;justify-content:center;flex:0 0 42px}.student-notification-icon img{width:22px;height:22px}.student-notification-copy{min-width:0;flex:1}.student-notification-copy strong{display:block;color:#174f80;font-size:14px;margin-bottom:4px}.student-notification-copy p{margin:0;color:#587995;font-size:14px;line-height:1.5}.student-notification-copy small{display:block;margin-top:5px;color:#8aa0b4;font-size:14px}

.student-schedule-list{display:grid;gap:11px}.student-schedule-item{display:grid;grid-template-columns:88px minmax(0,1fr) auto;gap:14px;align-items:center;padding:14px 16px;border:1px solid #e0ebf5;border-radius:13px;background:#fff}.student-schedule-date{height:68px;border-radius:12px;background:#edf6ff;color:#1476d4;display:flex;flex-direction:column;align-items:center;justify-content:center}.student-schedule-date strong{font-size:22px}.student-schedule-date span{font-size:14px;font-weight:700}.student-schedule-main h3{margin:0 0 5px;font-size:16px;color:#174f80}.student-schedule-main p{margin:0;color:#7892aa;font-size:14px;line-height:1.5}.student-schedule-meta{text-align:right;display:flex;flex-direction:column;gap:7px;align-items:flex-end}

.student-stat-trend{display:grid;gap:9px}.student-trend-row{display:grid;grid-template-columns:minmax(180px,1fr) 180px 70px;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid #edf2f7}.student-trend-row:last-child{border-bottom:0}.student-trend-title{min-width:0}.student-trend-title strong{display:block;color:#244f78;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.student-trend-title small{display:block;color:#8aa0b4;font-size:14px;margin-top:3px}.student-score-track{height:10px;border-radius:999px;background:#edf3f8;overflow:hidden}.student-score-track span{display:block;height:100%;border-radius:999px;background:#1683e8}.student-trend-score{text-align:right;font-size:16px;font-weight:900;color:#1476d4}

.student-session-list{display:grid;gap:10px}.student-session-row{padding:14px;border:1px solid #dce9f5;border-radius:13px;background:#fff;display:grid;grid-template-columns:46px minmax(0,1fr) auto;gap:12px;align-items:center}.student-session-row.revoked{opacity:.65;background:#f8fafc}.student-session-icon{width:46px;height:46px;border-radius:12px;background:#edf6ff;display:flex;align-items:center;justify-content:center}.student-session-icon img{width:24px;height:24px}.student-session-main strong{display:block;color:#174f80;font-size:14px}.student-session-main span,.student-session-main small{display:block;color:#7892aa;font-size:14px;margin-top:4px}.student-session-side{text-align:right}

.student-form{display:grid;gap:14px}.student-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.student-form-field{display:flex;flex-direction:column;gap:6px}.student-form-field.full{grid-column:1/-1}.student-form-field>span{font-size:14px;font-weight:800;color:#315777}.student-support-note{padding:12px 14px;border-radius:10px;background:#f7fbff;border:1px solid #dbe9f5;color:#5e7890;font-size:14px;line-height:1.55}.student-ticket-list{display:grid;gap:10px}.student-ticket{padding:14px;border:1px solid #dce9f5;border-radius:12px;background:#fff}.student-ticket-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.student-ticket h3{margin:0;color:#174f80;font-size:15px}.student-ticket p{margin:8px 0 0;color:#5c7993;font-size:14px;line-height:1.55}.student-ticket small{display:block;margin-top:7px;color:#8aa0b4;font-size:14px}.student-ticket-reply{margin-top:10px;padding:10px 12px;border-radius:9px;background:#f3f9ff;color:#315777;font-size:14px;line-height:1.5}

.exam-center-hero{padding:22px;border-radius:17px;background:linear-gradient(135deg,#0f75d2,#0b5ca8);color:#fff;margin-bottom:14px}.exam-center-hero h1{margin:5px 0 8px;font-size:24px}.exam-center-hero p{margin:0;color:#dbeeff;font-size:14px}.exam-center-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:14px}.exam-center-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.exam-center-meta div{padding:13px;border:1px solid #e0ebf5;border-radius:11px}.exam-center-meta span{display:block;color:#7892aa;font-size:14px}.exam-center-meta strong{display:block;margin-top:5px;color:#174f80;font-size:15px}.exam-center-action{padding:18px;text-align:center}.exam-center-action .student-button{width:100%;margin-top:10px}.exam-center-action strong{font-size:22px;color:#174f80}.exam-center-action p{font-size:14px;color:#7892aa;line-height:1.5}

@media(max-width:1100px){.student-grid-4{grid-template-columns:1fr 1fr}.student-grid-3{grid-template-columns:1fr 1fr}.student-filter-bar{grid-template-columns:1fr 1fr}.student-filter-actions{grid-column:1/-1}.exam-center-grid{grid-template-columns:1fr}.account-tabs{grid-template-columns:1fr 1fr 1fr}}
@media(max-width:800px){.student-account-copy{display:none}.student-account-trigger{min-width:48px;width:48px;padding:4px}.student-account-arrow{display:none}.student-account-dropdown{right:0}.student-page-head{flex-direction:column}.student-grid-3,.student-grid-4,.student-grid-2{grid-template-columns:1fr}.student-schedule-item{grid-template-columns:76px minmax(0,1fr)}.student-schedule-meta{grid-column:1/-1;align-items:flex-start;text-align:left}.student-trend-row{grid-template-columns:1fr 70px}.student-score-track{grid-column:1/-1;grid-row:2}.student-form-grid{grid-template-columns:1fr}.student-form-field.full{grid-column:auto}}
@media(max-width:650px){.student-filter-bar{grid-template-columns:1fr}.student-filter-actions{grid-column:auto;flex-wrap:wrap}.account-tabs{grid-template-columns:1fr}.student-session-row{grid-template-columns:42px minmax(0,1fr)}.student-session-side{grid-column:1/-1;text-align:left}.student-schedule-date{height:62px}.exam-center-meta{grid-template-columns:1fr}}

/* V26 account tabs: 3 chức năng trên desktop, 1 cột trên mobile */
.account-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:800px){.account-tabs{grid-template-columns:1fr}}
body.sidebar-collapsed .student-nav-group{width:50px;margin:0 auto;padding:0;justify-content:center}
body.sidebar-collapsed .student-nav-group b,
body.sidebar-collapsed .student-nav-group .student-nav-chevron,
body.sidebar-collapsed .student-submenu,
body.sidebar-collapsed .student-nav-notification em{display:none!important}


/* V27 - tinh chỉnh sidebar học sinh */
.student-sidebar-v26{z-index:70!important}
.student-nav-v26 .nav-image-wrap,.student-nav-group .nav-image-wrap{width:24px!important;height:24px!important;flex:0 0 24px!important}
.student-nav-v26 .nav-image-wrap img,.student-nav-group .nav-image-wrap img{width:22px!important;height:22px!important;object-fit:contain!important;filter:none!important;box-shadow:none!important}
.student-sidebar-v26 .sidebar-collapse{z-index:90!important}
@media(min-width:801px){.student-sidebar-v26 .sidebar-collapse{top:42px!important}}

/* V29 - đảm bảo nhãn Trung tâm bài thi luôn tương phản với nền hero. */
.exam-center-hero .section-kicker{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:4px 10px;
  border:1px solid rgba(255,255,255,.28);
  border-radius:999px;
  background:rgba(255,255,255,.14);
  color:#fff!important;
  text-shadow:0 1px 1px rgba(0,0,0,.08);
}


/* V37 - làm nổi rõ nhãn Trung tâm đề thi trên nền hero. */
.exam-center-hero .exam-center-kicker{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:30px!important;
  padding:5px 12px!important;
  margin-bottom:2px!important;
  border:1px solid rgba(255,255,255,.82)!important;
  border-radius:999px!important;
  background:#fff!important;
  color:#0b67b8!important;
  opacity:1!important;
  text-shadow:none!important;
  box-shadow:0 4px 14px rgba(0,48,92,.14)!important;
  font-size:14px!important;
  font-weight:900!important;
  letter-spacing:.11em!important;
  line-height:1!important;
}


/* V42 - Student portal UI consistency: filters, badges, actions, score formatting and tables. */
:root{
  --student-control-h:42px;
  --student-action-w:96px;
  --student-status-w:108px;
}
.student-filter-bar.student-filter-schedule{
  grid-template-columns:minmax(260px,1fr) 204px;
}
.student-filter-bar.student-filter-results{
  grid-template-columns:minmax(260px,1.35fr) minmax(220px,1fr) minmax(190px,.85fr) 204px;
}
.student-filter-actions,
.review-filter-actions{
  align-items:center;
  justify-content:flex-end;
}
.student-filter-actions .student-button,
.review-filter-actions .review-filter-btn{
  width:96px;
  min-width:96px;
  height:var(--student-control-h);
  min-height:var(--student-control-h);
  padding:0 12px;
  box-sizing:border-box;
}
.review-filter-grid{
  grid-template-columns:minmax(260px,1.35fr) minmax(220px,1fr) minmax(170px,.75fr) minmax(190px,.85fr) 204px;
}
.student-filter-field input,
.student-filter-field select,
.review-filter-field input,
.review-filter-field select{
  height:var(--student-control-h);
  box-sizing:border-box;
}
.student-status-badge,
.review-status-badge{
  width:var(--student-status-w);
  min-width:var(--student-status-w);
  min-height:30px;
  padding:0 10px;
  box-sizing:border-box;
  justify-content:center;
  text-align:center;
}
.student-action-btn,
.student-action-muted,
.review-open-btn{
  width:var(--student-action-w);
  min-width:var(--student-action-w);
  height:34px;
  min-height:34px;
  padding:0 10px;
  box-sizing:border-box;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  white-space:nowrap;
  font-size:14px;
  font-weight:800;
  text-decoration:none;
}
.student-action-btn,
.review-open-btn{
  border:1px solid #9ec8e9;
  background:#fff;
  color:#126abd;
}
.student-action-btn:hover,
.review-open-btn:hover{background:#edf7ff}
.student-action-muted{
  border:1px solid #dde8f1;
  background:#f3f7fa;
  color:#8aa0b4;
}
.student-score-badge{
  width:64px;
  min-width:64px;
  justify-content:center;
  font-variant-numeric:tabular-nums;
}
.student-schedule-meta{
  width:118px;
  min-width:118px;
  align-items:center;
  text-align:center;
}
.student-schedule-meta .student-status-badge,
.student-schedule-meta .student-action-btn{margin-inline:auto}
.student-schedule-date{
  width:88px;
  min-width:88px;
  box-sizing:border-box;
}
.student-schedule-date strong,
.student-schedule-date span{line-height:1.15;text-align:center}
.student-results-table th:nth-child(3),
.student-results-table td:nth-child(3),
.student-results-table th:nth-child(4),
.student-results-table td:nth-child(4),
.student-results-table th:nth-child(5),
.student-results-table td:nth-child(5),
.student-results-table th:nth-child(8),
.student-results-table td:nth-child(8){text-align:center}
.student-results-table th:nth-child(3),.student-results-table td:nth-child(3){width:76px}
.student-results-table th:nth-child(4),.student-results-table td:nth-child(4){width:86px}
.student-results-table th:nth-child(5),.student-results-table td:nth-child(5){width:126px;font-variant-numeric:tabular-nums}
.student-results-table th:nth-child(6),.student-results-table td:nth-child(6){width:130px;white-space:nowrap}
.student-results-table th:nth-child(7),.student-results-table td:nth-child(7){width:132px;white-space:nowrap}
.student-results-table th:nth-child(8),.student-results-table td:nth-child(8){width:116px}
.review-total-count{font-size:14px;color:#6f879c;white-space:nowrap}
.review-table th:nth-child(3),.review-table td:nth-child(3),
.review-table th:nth-child(5),.review-table td:nth-child(5),
.review-table th:nth-child(6),.review-table td:nth-child(6),
.review-table th:nth-child(7),.review-table td:nth-child(7),
.review-table th:nth-child(8),.review-table td:nth-child(8),
.review-table th:nth-child(9),.review-table td:nth-child(9),
.review-table th:nth-child(10),.review-table td:nth-child(10){text-align:center}
.review-table th:nth-child(3),.review-table td:nth-child(3){width:62px}
.review-table th:nth-child(4),.review-table td:nth-child(4){width:148px;white-space:nowrap}
.review-table th:nth-child(5),.review-table td:nth-child(5){width:126px}
.review-table th:nth-child(6),.review-table td:nth-child(6),
.review-table th:nth-child(7),.review-table td:nth-child(7){width:58px}
.review-table th:nth-child(8),.review-table td:nth-child(8){width:78px}
.review-table th:nth-child(9),.review-table td:nth-child(9){width:72px;font-variant-numeric:tabular-nums}
.review-table th:nth-child(10),.review-table td:nth-child(10){width:116px}
.review-table .score{display:inline-block;min-width:48px;text-align:center;font-variant-numeric:tabular-nums}
.review-pagination-inside{
  margin:0;
  padding:12px 16px;
  border-top:1px solid #e8eff6;
  background:#fbfdff;
}
@media(max-width:1100px){
  .student-filter-bar.student-filter-schedule,
  .student-filter-bar.student-filter-results,
  .review-filter-grid{grid-template-columns:1fr 1fr}
  .student-filter-actions,.review-filter-actions{grid-column:1/-1;justify-content:flex-start}
}
@media(max-width:800px){
  .student-schedule-meta{width:auto;min-width:0;align-items:flex-start;text-align:left}
  .student-schedule-meta .student-status-badge,
  .student-schedule-meta .student-action-btn{margin-inline:0}
}
@media(max-width:650px){
  .student-filter-bar.student-filter-schedule,
  .student-filter-bar.student-filter-results,
  .review-filter-grid{grid-template-columns:1fr}
  .student-filter-actions,.review-filter-actions{grid-column:auto;justify-content:flex-start}
}

/* V63: typography thống nhất bằng system font, không phụ thuộc một font OS cụ thể. */
html,body,button,input,select,textarea{font-family:"Segoe UI",-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;}
button,input,select,textarea{font:inherit;}
html,body{font-synthesis:none;text-rendering:optimizeLegibility;}


/* ===== V65 native mobile date/time controls ===== */
input[type=date],input[type=time],input[type=datetime-local]{
  -webkit-appearance:auto;appearance:auto;min-width:0;font-variant-numeric:tabular-nums;color-scheme:light;
}
@media(max-width:900px){input[type=date],input[type=time],input[type=datetime-local]{font-size:16px!important;min-height:44px}}


/* ===== V66 mobile date/datetime containment + stable dd/MM/yyyy DOB ===== */
input[type=date],input[type=time],input[type=datetime-local],
.native-datetime-input{
  display:block;
  width:100%;
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}
.date-ddmmyyyy-control{
  position:relative;
  display:block;
  width:100%;
  min-width:0;
  max-width:100%;
}
.date-ddmmyyyy-display{
  display:block;
  width:100%;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}
.date-ddmmyyyy-native{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  max-width:100%!important;
  opacity:0!important;
  cursor:pointer;
  z-index:2;
}
.date-ddmmyyyy-control:focus-within .date-ddmmyyyy-display{
  border-color:#67a9df!important;
  box-shadow:0 0 0 3px rgba(25,118,210,.07)!important;
}
input[type=date]::-webkit-date-and-time-value,
input[type=time]::-webkit-date-and-time-value,
input[type=datetime-local]::-webkit-date-and-time-value{
  min-width:0;
  text-align:left;
}
input[type=datetime-local]::-webkit-datetime-edit,
input[type=date]::-webkit-datetime-edit,
input[type=time]::-webkit-datetime-edit{min-width:0;overflow:hidden}
@media(max-width:900px){
  input[type=date],input[type=time],input[type=datetime-local],.native-datetime-input{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden;
  }
}

/* ===== V69 unified Vietnamese date / datetime inputs ===== */
.date-entry-control,.datetime-entry-control{
  position:relative;
  display:block;
  width:100%;
  min-width:0;
  max-width:100%;
}
.date-entry-text,.datetime-entry-text{
  display:block;
  width:100%;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
  padding-right:52px!important;
}
.date-entry-icon,.datetime-entry-icon{
  position:absolute;
  top:50%;
  right:14px;
  transform:translateY(-50%);
  width:24px;
  height:24px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#176bb7;
  pointer-events:none;
  z-index:2;
}
.date-entry-native,.datetime-entry-native{
  position:absolute!important;
  top:0!important;
  right:0!important;
  left:auto!important;
  bottom:auto!important;
  display:block!important;
  width:50px!important;
  min-width:50px!important;
  max-width:50px!important;
  height:100%!important;
  min-height:0!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  outline:0!important;
  opacity:0!important;
  z-index:3!important;
  cursor:pointer!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
  -webkit-appearance:auto;
  appearance:auto;
}
.date-entry-control:focus-within .date-entry-text,
.datetime-entry-control:focus-within .datetime-entry-text{
  border-color:#67a9df!important;
  box-shadow:0 0 0 3px rgba(25,118,210,.07)!important;
}
@media(max-width:900px){
  .date-entry-text,.datetime-entry-text{font-size:16px!important;min-height:44px}
  .date-entry-native,.datetime-entry-native{width:52px!important;min-width:52px!important;max-width:52px!important}
}


/* ===== V70 reliable Vietnamese date/datetime controls ===== */
.date-entry-control,
.datetime-entry-control{
  position:relative;
  display:block;
  width:100%;
  min-width:0;
  max-width:100%;
}
.date-entry-text,
.datetime-entry-text{
  display:block;
  width:100%;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
  padding-right:48px!important;
  font-variant-numeric:tabular-nums;
}
.date-entry-button,
.datetime-entry-button{
  position:absolute;
  top:50%;
  right:4px;
  transform:translateY(-50%);
  width:40px;
  height:36px;
  min-width:40px;
  min-height:36px;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:8px;
  background:transparent!important;
  color:#176bb7;
  display:grid;
  place-items:center;
  cursor:pointer;
  z-index:2;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
.date-entry-button:hover,
.datetime-entry-button:hover{background:#eef6fd!important}
.date-entry-button:focus-visible,
.datetime-entry-button:focus-visible{
  outline:2px solid #5a9fd8!important;
  outline-offset:1px;
}
.date-entry-control:focus-within .date-entry-text,
.datetime-entry-control:focus-within .datetime-entry-text{
  border-color:#67a9df!important;
  box-shadow:0 0 0 3px rgba(25,118,210,.07)!important;
}

/* Shared picker. Native date controls are visible only inside this dialog,
   never layered over the editable field. */
.date-picker-overlay[hidden]{display:none!important}
.date-picker-overlay{
  position:fixed;
  inset:0;
  z-index:100000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(14,35,55,.42);
  backdrop-filter:blur(2px);
  -webkit-backdrop-filter:blur(2px);
}
.date-picker-sheet{
  width:min(430px,100%);
  background:#fff;
  border:1px solid #d4e3ef;
  border-radius:16px;
  box-shadow:0 24px 70px rgba(12,48,82,.25);
  overflow:hidden;
}
.date-picker-head{
  min-height:54px;
  padding:0 14px 0 18px;
  display:flex;
  align-items:center;
  gap:12px;
  border-bottom:1px solid #e7eef5;
}
.date-picker-head strong{
  flex:1;
  color:#123f6f;
  font-size:17px;
}
.date-picker-close{
  width:38px;
  height:38px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:#607b95;
  font-size:28px;
  line-height:1;
  cursor:pointer;
}
.date-picker-close:hover{background:#f1f6fa}
.date-picker-body{padding:18px}
.date-picker-native{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  min-height:46px!important;
  box-sizing:border-box!important;
  border:1px solid #cdddeb!important;
  border-radius:10px!important;
  padding:0 12px!important;
  background:#fff!important;
  color:#234e75!important;
  font:inherit!important;
  opacity:1!important;
  visibility:visible!important;
  position:static!important;
  -webkit-appearance:auto!important;
  appearance:auto!important;
  color-scheme:light;
}
.date-picker-native[hidden]{display:none!important}
.date-picker-body p{
  margin:10px 0 0;
  color:#71889e;
  font-size:14px;
  line-height:1.45;
}
.date-picker-actions{
  padding:12px 14px 14px;
  display:flex;
  align-items:center;
  gap:8px;
  border-top:1px solid #edf2f7;
}
.date-picker-spacer{flex:1}
.date-picker-btn{
  min-height:40px;
  padding:0 14px;
  border-radius:9px;
  border:1px solid #c8dceb;
  background:#fff;
  color:#205b8e;
  font-weight:700;
  cursor:pointer;
}
.date-picker-btn.primary{
  border-color:#1976d2;
  background:#1976d2;
  color:#fff;
}
.date-picker-open{overflow:hidden!important}
@media(max-width:640px){
  .date-picker-overlay{
    align-items:flex-end;
    padding:0;
  }
  .date-picker-sheet{
    width:100%;
    border-radius:18px 18px 0 0;
    border-left:0;
    border-right:0;
    border-bottom:0;
    padding-bottom:max(10px,env(safe-area-inset-bottom));
  }
  .date-picker-body{padding:16px}
  .date-picker-native{font-size:16px!important;min-height:50px!important}
  .date-entry-text,.datetime-entry-text{font-size:16px!important;min-height:44px}
  .date-entry-button,.datetime-entry-button{width:42px;height:40px;min-width:42px;min-height:40px}
}


/* ===== V71 custom Vietnamese calendar (locale-independent) ===== */
.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;
}
.custom-calendar-overlay.date-picker-overlay{
  align-items:center!important;
  justify-content:center!important;
  padding:16px!important;
  background:rgba(20,30,42,.48)!important;
  backdrop-filter:blur(1.5px);
  -webkit-backdrop-filter:blur(1.5px);
}
.custom-calendar-sheet.date-picker-sheet{
  width:min(390px,calc(100vw - 24px))!important;
  max-height:min(680px,calc(100vh - 28px));
  overflow:auto!important;
  border-radius:10px!important;
  border:1px solid #d6e1ec!important;
  background:#fff!important;
  box-shadow:0 22px 70px rgba(17,42,70,.28)!important;
}
.custom-calendar-header{
  min-height:58px;
  padding:10px 12px 8px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border-bottom:1px solid #edf1f5;
}
.custom-calendar-period{display:flex;align-items:center;gap:4px;min-width:0}
.custom-calendar-period select{
  appearance:none;-webkit-appearance:none;
  border:0!important;background:transparent!important;box-shadow:none!important;
  color:#24313d!important;font:700 15px/1.2 inherit!important;
  min-height:38px!important;height:38px!important;padding:0 22px 0 6px!important;
  border-radius:6px!important;cursor:pointer;
  background-image:linear-gradient(45deg,transparent 50%,#73808d 50%),linear-gradient(135deg,#73808d 50%,transparent 50%)!important;
  background-position:calc(100% - 11px) 16px,calc(100% - 7px) 16px!important;
  background-size:4px 4px,4px 4px!important;background-repeat:no-repeat!important;
}
.custom-calendar-period select:hover,.custom-calendar-period select:focus{background-color:#f4f7fa!important;outline:0!important}
.custom-calendar-period [data-calendar-month]{width:88px}
.custom-calendar-period [data-calendar-year]{width:84px}
.custom-calendar-nav{display:flex;align-items:center;gap:4px}
.custom-calendar-nav button{
  width:40px;height:40px;display:grid;place-items:center;border:0;border-radius:50%;
  background:transparent;color:#36536f;font-size:32px;line-height:1;cursor:pointer;padding:0;
}
.custom-calendar-nav button:hover,.custom-calendar-nav button:focus-visible{background:#edf5ff;outline:0;color:#1976d2}
.custom-calendar-weekdays,.custom-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));}
.custom-calendar-weekdays{padding:12px 14px 6px;color:#7b8792;font-size:14px;font-weight:700;text-align:center}
.custom-calendar-weekdays span{display:grid;place-items:center;min-height:26px}
.custom-calendar-grid{padding:2px 12px 12px;gap:2px}
.custom-calendar-day{
  aspect-ratio:1/1;min-width:0;min-height:38px;border:0;border-radius:50%;background:transparent;
  color:#26333e;font:500 14px/1 inherit;display:grid;place-items:center;cursor:pointer;padding:0;
}
.custom-calendar-day:hover,.custom-calendar-day:focus-visible{background:#edf4ff;outline:0;color:#0d67c2}
.custom-calendar-day.is-outside{color:#bdc5cc}
.custom-calendar-day.is-today{box-shadow:inset 0 0 0 1px #76aee7;color:#0d67c2;font-weight:700}
.custom-calendar-day.is-selected{background:#4285f4!important;color:#fff!important;box-shadow:none!important;font-weight:800}
.custom-calendar-time{
  display:flex;align-items:center;justify-content:center;gap:8px;
  padding:12px 16px;border-top:1px solid #edf1f5;background:#fafcfe;color:#3f566d;font-weight:700;
}
.custom-calendar-time[hidden]{display:none!important}
.custom-calendar-time>span{margin-right:6px}
.custom-calendar-time select{
  width:72px;height:40px;border:1px solid #cbddeb;border-radius:8px;background:#fff;color:#244f78;
  font:700 15px/1 inherit;padding:0 10px;outline:0;text-align:center;
}
.custom-calendar-time select:focus{border-color:#4b98dc;box-shadow:0 0 0 3px rgba(25,118,210,.08)}
.custom-calendar-actions.date-picker-actions{padding:10px 12px 12px!important;gap:6px!important;background:#fff}
.custom-calendar-actions .date-picker-btn{min-height:38px!important;padding:0 12px!important;border-radius:7px!important}
.custom-calendar-actions .date-picker-btn.primary{background:#3155c6!important;border-color:#3155c6!important}
@media(max-width:640px){
  .custom-calendar-overlay.date-picker-overlay{align-items:center!important;padding:10px!important}
  .custom-calendar-sheet.date-picker-sheet{width:min(390px,calc(100vw - 20px))!important;border-radius:10px!important;padding-bottom:max(4px,env(safe-area-inset-bottom))!important}
  .custom-calendar-header{padding-left:12px}
  .custom-calendar-grid{padding-left:10px;padding-right:10px}
  .custom-calendar-day{min-height:40px;font-size:15px}
  .custom-calendar-actions .date-picker-btn{padding:0 9px!important;font-size:14px}
}

/* ===== V73 balanced date/datetime typography ===== */
.form-grid .date-entry-control,
.form-grid .datetime-entry-control{
  font-size:inherit!important;
  font-weight:400!important;
  color:inherit!important;
  line-height:normal!important;
}
.form-grid .date-entry-text,
.form-grid .datetime-entry-text{
  font-size:14px!important;
  font-weight:400!important;
  line-height:1.2!important;
  letter-spacing:0!important;
  font-variant-numeric:tabular-nums;
}


.system-maintenance-banner{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:0 0 14px;padding:12px 15px;border:1px solid #f2c76c;border-radius:10px;background:#fff8df;color:#77520d}.system-maintenance-banner strong{font-size:14px}.system-maintenance-banner span{font-size:14px;line-height:1.45}


/* V88.2 - Student Portal centered alert / confirmation UI. */
.student-dialog-backdrop{position:fixed;inset:0;z-index:15000;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(14,35,55,.46);backdrop-filter:blur(2px);opacity:0;transition:opacity .16s ease}
.student-dialog-backdrop[hidden]{display:none!important}
.student-dialog-backdrop:not(.is-open){pointer-events:none}
.student-dialog-backdrop.is-open{opacity:1;pointer-events:auto}
.student-dialog{width:min(460px,calc(100vw - 32px));max-height:calc(100dvh - 36px);overflow:auto;background:#fff;border:1px solid #dbe7f2;border-radius:18px;box-shadow:0 24px 70px rgba(12,48,82,.25);padding:22px;transform:translateY(8px) scale(.985);transition:transform .16s ease;text-align:left}
.student-dialog-backdrop.is-open .student-dialog{transform:none}
.student-dialog-icon{width:48px;height:48px;border-radius:15px;display:flex;align-items:center;justify-content:center;margin-bottom:14px;background:#eef6ff;color:#1674cf;font-size:23px;font-weight:900}
.student-dialog.is-danger .student-dialog-icon{background:#fff0f1;color:#c94a55}
.student-dialog h3{margin:0 0 8px;font-size:20px;color:#123f69}.student-dialog p{margin:0;color:#58758e;line-height:1.55;white-space:pre-line;overflow-wrap:anywhere}
.student-dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.student-dialog-actions .student-button{min-width:100px}
.student-dialog-lock{overflow:hidden}
@media(max-width:480px){.student-dialog{padding:18px;border-radius:15px}.student-dialog-actions{display:grid;grid-template-columns:1fr 1fr}.student-dialog-actions .student-button{width:100%;min-width:0;font-size:16px}}
