@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&display=swap');
:root{--ink:#242640;--muted:#8d8fa2;--line:#e8e7f1;--purple:#6255d9;--bg:#f8f8fc;font-family:'Nunito',sans-serif;color:var(--ink);background:var(--bg)}
*{box-sizing:border-box}body{margin:0;background:linear-gradient(135deg,#f8f8ff,#fffaf7);overflow-x:hidden}button,input,select{font:inherit}.sidebar,.topbar{display:none}.app-shell{min-height:100vh}.main-content{width:100%;padding:28px 48px 45px}.page-heading{width:100%;height:120px;min-height:120px;margin:0 0 18px;padding:14px 28px;overflow:hidden;border:1px solid #e9e7fb;border-radius:17px;background:linear-gradient(110deg,#efefff,#f8f5ff 58%,#fff4eb);box-shadow:0 10px 25px #5149a10d}.banner-copy{height:100%;display:flex;flex-direction:column;justify-content:center}.ai-pill{width:max-content;margin:0 0 4px;padding:3px 8px;border:1px solid #d9d5ff;border-radius:20px;background:#ffffffb8;color:var(--purple);font-size:8px;font-weight:800;letter-spacing:.4px}.ai-pill span{font-size:11px}.eyebrow{margin:0 0 2px;color:var(--purple);font-size:8px;font-weight:800;letter-spacing:.8px}.page-heading h1{margin:0 0 2px;font:800 23px/1.1 'Nunito Sans',sans-serif;letter-spacing:-.4px}.page-heading h1 span{color:#eab458}.page-heading p:not(.eyebrow){margin:0;color:#696b80;font-size:11px}.hero-visual{display:none}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:0 0 18px}.stat-card,.card{border:1px solid #eeeef5;border-radius:15px;background:#fff;box-shadow:0 8px 22px #35306308}.stat-card{display:flex;align-items:center;gap:12px;padding:17px}.stat-icon,.module-symbol{display:grid;place-items:center;border-radius:11px}.stat-icon{width:38px;height:38px;font-size:17px}.purple{background:#efeeff;color:var(--purple)}.blue{background:#eaf4ff;color:#4b91e8}.orange{background:#fff2df;color:#eca542}.green{background:#e5f8ef;color:#42b980}.stat-card span{display:block;color:#9b9cab;font-size:9px;font-weight:800;letter-spacing:.3px}.stat-card strong{display:block;margin:3px 0 1px;font:800 22px Manrope}.stat-card small{color:#a0a1b0;font-size:10px}.stat-card .up{color:#36ad79}.module-bar{display:grid;grid-template-columns:repeat(5,1fr);gap:11px;margin-bottom:18px}.module-card{display:flex;align-items:center;gap:9px;min-height:67px;padding:11px 12px;border:1px solid #ecebf5;border-radius:14px;background:#ffffffcc;color:#55576b;box-shadow:0 7px 18px #35306307;cursor:pointer;transition:.2s}.module-card:hover,.module-card.active{transform:translateY(-2px);background:#fff;box-shadow:0 10px 22px #35306313}.module-card.active{border-color:#d8d3ff}.module-symbol{width:31px;height:31px;flex:0 0 31px;font-size:15px}.purple-symbol{background:#efeeff;color:var(--purple)}.blue-symbol{background:#eaf4ff;color:#4b91e8}.orange-symbol{background:#fff2df;color:#eca542}.green-symbol{background:#e5f8ef;color:#42b980}.pink-symbol{background:#ffedf4;color:#de79a0}.module-card b,.module-card small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.module-card b{font-size:11px}.module-card small{margin-top:2px;color:#a0a1b0;font-size:9px}.module-card i{margin-left:auto;color:#b0b1bf;font-style:normal}.content-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:18px}.card{padding:19px}.card-head{display:flex;justify-content:space-between;align-items:start;margin-bottom:17px}.card h2{margin:0 0 4px;font:800 15px Manrope}.muted{margin:0;color:#a0a1b0;font-size:10px}.view-switch{padding:3px;border-radius:7px;background:#f6f6fa}.view-switch button{padding:6px 11px;border:0;border-radius:5px;background:none;color:#a0a1b0;font-size:10px;cursor:pointer}.view-switch .selected{background:#fff;color:var(--purple);box-shadow:0 2px 5px #0000000b}.filters{display:flex;align-items:end;gap:10px;margin-bottom:14px}.filters label{color:#9b9cab;font-size:9px;font-weight:700}.filters select{display:block;margin-top:4px;padding:7px 20px 7px 9px;border:1px solid var(--line);border-radius:7px;background:#fff;color:#55576b;font-size:10px}.filter-btn{padding:8px 10px;border:1px solid var(--line);border-radius:7px;background:#fff;color:#77798a;font-size:10px}.week-label{display:flex;justify-content:center;align-items:center;gap:14px;margin-bottom:10px;color:#5c5e72;font-size:11px}.week-label button{border:0;background:none;color:#aaa;font-size:20px}.timetable-wrap{overflow:auto;padding:6px;border:1px solid #f0eff6;border-radius:11px}.timetable{min-width:650px;display:grid;grid-template-columns:50px repeat(5,1fr);gap:4px}.day-head,.time-head{text-align:center;color:#999baa;font-size:9px;padding:3px}.slot{min-height:53px;padding:7px;border:1px solid #f0eff6;border-radius:8px;background:#fcfcff}.slot b,.slot small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.slot b{margin-bottom:3px;font-size:10px}.slot small{color:#9193a3;font-size:9px}.slot.purple-slot{border-left:3px solid #7669e2;background:#f1f0ff}.slot.orange-slot{border-left:3px solid #f0ae51;background:#fff5e9}.slot.green-slot{border-left:3px solid #52c58b;background:#eaf9f1}.slot.blue-slot{border-left:3px solid #69a7e9;background:#ebf5ff}.legend{display:flex;flex-wrap:wrap;gap:14px;margin-top:13px;padding-top:11px;border-top:1px solid var(--line);color:#999aaa;font-size:9px}.dot{display:inline-block;width:7px;height:7px;margin-right:4px;border-radius:50%}.purple-dot{background:#7669e2}.orange-dot{background:#f0ae51}.green-dot{background:#52c58b}.blue-dot{background:#69a7e9}.right-column{display:grid;align-content:start;gap:18px}.badge{padding:4px 8px;border-radius:10px;background:#fff0f0;color:#e26c6c;font-size:10px;font-weight:800}.alert-item{display:flex;align-items:center;gap:9px;padding:12px 0;border-bottom:1px solid #f2f1f5}.alert-item:last-of-type{border-bottom:0}.alert-icon{display:grid;place-items:center;width:25px;height:25px;border-radius:8px;font-size:11px;font-weight:800}.red-bg{background:#ffeded;color:#e46c6c}.yellow-bg{background:#fff6de;color:#e7ac3e}.blue-bg{background:#eaf4ff;color:#6fa9e3}.alert-item b,.alert-item p{display:block}.alert-item b{font-size:10px}.alert-item p{margin:3px 0 0;color:#a1a2ae;font-size:9px}.alert-item button{margin-left:auto;border:0;background:none;color:#aaa;font-size:17px}.text-btn{padding:10px 0 0;border:0;background:none;color:var(--purple);font-size:10px;font-weight:800}.quick-action{display:flex;align-items:center;width:100%;gap:10px;margin-top:8px;padding:11px;border:1px solid #f0eff7;border-radius:10px;background:#fbfaff;text-align:left;color:var(--purple);cursor:pointer}.quick-action span b,.quick-action span small{display:block}.quick-action span b{color:#55576b;font-size:10px}.quick-action span small{margin-top:3px;color:#aaaab7;font-size:9px}.quick-action i{margin-left:auto}.activity{margin-top:18px}.activity-row{display:flex;align-items:center;gap:10px;padding:12px 0;border-top:1px solid #f1f0f5}.activity-avatar{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;font-size:10px;font-weight:800}.purple-avatar{background:#efeeff;color:#6a5fe0}.green-avatar{background:#e6f7ef;color:#3dae7b}.activity-row b{font-size:10px}.activity-row p{margin:3px 0 0;color:#a0a1ae;font-size:9px}.activity-row>span{margin-left:auto;color:#aaa;font-size:9px}.toast{position:fixed;right:24px;bottom:22px;z-index:1100;padding:11px 15px;border-radius:10px;background:#282844;color:#fff;font-size:11px;opacity:0;transform:translateY(8px);transition:.2s}.toast.show{opacity:1;transform:none}
.auth-screen{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:24px;overflow:hidden;background:linear-gradient(135deg,#f1efff,#f8f8ff 53%,#fff1e9)}.auth-screen.hidden{display:none}.auth-decoration{position:absolute;border-radius:50%;opacity:.6;filter:blur(2px)}.auth-decoration-one{width:440px;height:440px;left:-160px;bottom:-180px;background:#dcd8ff}.auth-decoration-two{width:350px;height:350px;right:-100px;top:-120px;background:#ffe0d0}.auth-card{position:relative;width:min(410px,100%);padding:32px 36px 22px;border:1px solid #ffffffc9;border-radius:23px;background:#fffffff2;box-shadow:0 25px 70px #4e478a1c;backdrop-filter:blur(18px)}.auth-logo{display:flex;align-items:center;gap:10px;margin-bottom:30px}.auth-logo>span{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:linear-gradient(135deg,#7468e7,#5547c8);color:#fff;font-size:20px}.auth-logo b,.auth-logo small{display:block}.auth-logo b{font:800 14px Manrope}.auth-logo small{margin-top:2px;color:var(--purple);font-size:11px;font-weight:800}.auth-heading h1{margin:7px 0 8px;font:800 26px Manrope}.auth-heading>p:last-child{margin:0 0 22px;color:#9394a4;font-size:12px}.login-form{display:grid;gap:13px}.login-form label{display:grid;gap:6px;color:#4c4e65;font-size:11px;font-weight:800}.login-form input{display:block;width:100%;min-width:0;max-width:100%;padding:12px 13px;border:1px solid #e3e2ee;border-radius:10px;background:#fbfbfe;color:#30324b;font-size:12px;outline:0}.login-form input:focus{border-color:#7669e2;box-shadow:0 0 0 3px #7669e21a}.password-field{position:relative;width:100%}.password-field input{padding-right:54px}.password-field button{position:absolute;right:7px;top:6px;border:0;background:none;color:var(--purple);font-size:10px;font-weight:800}.login-options{display:flex;justify-content:space-between;align-items:center;margin-top:-2px}.remember{display:flex!important;align-items:center;gap:5px;color:#8c8e9e!important;font-size:10px!important;font-weight:500!important}.remember input{width:14px!important;height:14px;padding:0}.forgot-link,.register-switch button{border:0;background:none;color:var(--purple);font-size:10px;font-weight:800;cursor:pointer}.login-submit{border:0;border-radius:10px;padding:13px;background:linear-gradient(135deg,#6c60e1,#5548cc);color:#fff;font-size:12px;font-weight:800;box-shadow:0 10px 20px #6255d933}.login-submit span{float:right;font-size:17px}.login-error{min-height:13px;margin:0;text-align:center;color:#e46c6c;font-size:10px}.register-switch{margin-top:14px;text-align:center;color:#999aaa;font-size:10px}.register-switch button{padding:0}.register-form{margin-top:20px}.auth-footer{margin-top:13px;padding-top:13px;border-top:1px solid #efedf4;text-align:center;color:#abaab8;font-size:9px}.auth-footer b{color:var(--purple)}.register-form[hidden],.login-form[hidden],.auth-card>.register-switch[hidden]{display:none}
@media(max-width:1050px){.main-content{padding:22px 28px 38px}.module-bar{grid-template-columns:repeat(3,1fr)}.stats-grid{grid-template-columns:repeat(2,1fr)}.content-grid{grid-template-columns:1fr}.right-column{grid-template-columns:1fr 1fr}}
@media(max-width:700px){.main-content{padding:16px 12px 30px}.page-heading{height:118px;min-height:118px;padding:12px 18px}.page-heading h1{font-size:20px}.module-bar{grid-template-columns:repeat(2,1fr);gap:8px}.module-card{min-height:62px;padding:9px}.module-card i{display:none}.module-card b{font-size:10px}.module-card small{font-size:8px}.stats-grid{gap:9px}.stat-card{padding:12px 9px}.stat-card span{font-size:8px}.stat-card strong{font-size:18px}.right-column{grid-template-columns:1fr}.card{padding:16px}.auth-card{padding:28px 23px 20px}.auth-logo{margin-bottom:27px}}
.teacher-panel{margin-bottom:18px}.teacher-panel[hidden]{display:none}.teacher-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:14px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.upload-box{display:flex;align-items:center;gap:9px;min-width:245px;padding:10px 13px;border:1px dashed #bdb8f0;border-radius:10px;background:#faf9ff;color:var(--purple);cursor:pointer}.upload-box b,.upload-box small{display:block}.upload-box b{font-size:11px}.upload-box small{margin-top:2px;color:#9c9dad;font-size:9px}.upload-icon{display:grid;place-items:center;width:28px;height:28px;border-radius:8px;background:#eeecff;font-size:17px;font-weight:800}.outline-btn{padding:10px 12px;border:1px solid var(--line);border-radius:9px;background:#fff;color:#66687c;font-size:10px;font-weight:800;cursor:pointer}.teacher-toolbar .btn-primary{padding:10px 13px;font-size:10px}.teacher-meta{display:flex;justify-content:space-between;padding:13px 0 9px;color:#999aaa;font-size:10px}.teacher-meta span:first-child{color:var(--purple);font-weight:800}.teacher-table-wrap{overflow:auto}.teacher-table{width:100%;min-width:650px;border-collapse:collapse}.teacher-table th{padding:9px 10px;background:#fafaff;color:#999aaa;text-align:left;font-size:9px;font-weight:800}.teacher-table td{padding:11px 10px;border-top:1px solid #f0eff5;color:#55576b;font-size:10px}.teacher-table td:first-child{color:#aaaabc}.teacher-status{display:inline-block;padding:4px 7px;border-radius:10px;background:#e8f8ef;color:#36ad79;font-size:9px;font-weight:800}.table-empty{text-align:center!important;color:#aaaab8!important;padding:25px!important}
.module-page{min-height:420px}.back-module{margin-bottom:14px;padding:0;border:0;background:none;color:var(--purple);font-size:11px;font-weight:800;cursor:pointer}.teacher-panel .eyebrow{margin-top:0}
.module-standalone{min-height:100vh;padding-top:48px}.module-standalone .module-view{min-height:520px}.standalone-title{margin:8px 0 6px;font:800 26px Manrope}.standalone-timetable{margin-top:25px;min-width:0}
.teacher-workspace{max-width:1380px;margin:0 auto}.teacher-page-top{display:flex;justify-content:space-between;align-items:start}.teacher-kpi{display:flex;flex-direction:column;align-items:center;min-width:90px;padding:12px 18px;border-radius:15px;background:#f1efff;color:var(--purple)}.teacher-kpi b{font:800 25px Manrope}.teacher-kpi span{font-size:10px}.assignment-count{padding:4px 8px;border-radius:12px;background:#f0efff;color:var(--purple);font-size:9px;font-weight:800}.table-action{padding:6px 9px;border:1px solid #e1defb;border-radius:8px;background:#fff;color:var(--purple);font-size:9px;font-weight:800;cursor:pointer}.assignment-grid{display:grid;grid-template-columns:360px 1fr;gap:18px;margin-top:18px}.assignment-form-card,.assignment-list-card{min-height:390px}.assignment-form{display:grid;gap:12px;margin-top:18px}.assignment-form label{display:grid;gap:6px;color:#62647a;font-size:10px;font-weight:800}.assignment-form input,.assignment-form select{width:100%;padding:10px 11px;border:1px solid var(--line);border-radius:9px;background:#fbfbff;color:#4e5068;font-size:11px;outline:0}.assignment-form input:focus,.assignment-form select:focus{border-color:#7669e2;box-shadow:0 0 0 3px #7669e21a}.form-two{display:grid;grid-template-columns:1fr 1fr;gap:9px}..assign-submit{margin-top:4px;width:100%;font-size:11px}.grade-legend{display:flex;gap:8px;margin:12px 0 13px}.grade-legend span{padding:5px 9px;border-radius:12px;font-size:9px;font-weight:800}.grade-10{background:#efeeff;color:#6255d9}.grade-11{background:#eaf4ff;color:#4088df}.grade-12{background:#fff2df;color:#dd9a33}.assignment-list{display:grid;gap:8px}.assignment-item{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid #f0eff5;border-radius:11px;background:#fff}.class-bubble{display:grid;place-items:center;width:48px;height:35px;border-radius:10px;font-size:10px;font-weight:800}.assignment-item.grade-10 .class-bubble{background:#efeeff;color:#6255d9}.assignment-item.grade-11 .class-bubble{background:#eaf4ff;color:#4088df}.assignment-item.grade-12 .class-bubble{background:#fff2df;color:#dd9a33}.assignment-info b,.assignment-info small{display:block}.assignment-info b{font-size:11px;color:#4d4f67}.assignment-info small{margin-top:3px;color:#999aaa;font-size:9px}.remove-assignment{margin-left:auto;border:0;background:none;color:#c0bfca;font-size:18px;cursor:pointer}.remove-assignment:hover{color:#e36b75}@media(max-width:800px){.assignment-grid{grid-template-columns:1fr}.teacher-page-top{gap:12px}.teacher-kpi{min-width:70px;padding:9px}.teacher-kpi b{font-size:20px}}
.module-view{min-height:400px}.generic-module h2{margin:6px 0}.module-placeholder{display:flex;align-items:center;gap:12px;margin-top:28px;padding:22px;border:1px dashed #d5d1f5;border-radius:14px;background:#faf9ff;color:var(--purple)}.module-placeholder>span{font-size:28px}.module-placeholder b,.module-placeholder small{display:block}.module-placeholder b{font-size:13px;color:#454760}.module-placeholder small{margin-top:4px;color:#999aaa;font-size:10px}.module-placeholder .btn-primary{margin-left:auto}.entity-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:28px}.entity-grid>div{padding:22px;border:1px solid #eeeef5;border-radius:14px;background:#fafaff}.entity-grid b,.entity-grid small{display:block}.entity-grid b{font:800 28px Manrope;color:var(--purple)}.entity-grid small{margin-top:5px;color:#999aaa;font-size:10px}@media(max-width:700px){.module-placeholder{align-items:flex-start;flex-wrap:wrap}.module-placeholder .btn-primary{margin-left:0}.entity-grid{grid-template-columns:1fr}}
.assign-submit{margin-top:4px;width:100%;font-size:11px}
.class-config{margin:22px 0 0;padding:17px;border:1px solid #eeeef6;border-radius:15px;background:linear-gradient(135deg,#fbfaff,#fffdfb)}.class-config h2{margin:3px 0;font:800 14px Manrope}.class-form{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0 11px}.class-form select,.class-form input{padding:9px 10px;border:1px solid var(--line);border-radius:9px;background:#fff;color:#56586d;font-size:10px}.class-form select{min-width:125px}.class-form input{min-width:155px}.btn-soft{padding:9px 12px;border:1px solid #ded9ff;border-radius:9px;background:#f0efff;color:var(--purple);font-size:10px;font-weight:800}.class-chips{display:flex;gap:7px;flex-wrap:wrap}.class-chip{display:flex;align-items:center;gap:6px;padding:6px 8px;border-radius:9px}.class-chip b{font-size:10px}.class-chip small{font-size:8px}.class-chip button{padding:0;border:0;background:none;color:inherit;opacity:.55;cursor:pointer}.class-chip.primary{background:#efeeff;color:#6255d9}.class-chip.middle{background:#eaf4ff;color:#4088df}.class-chip.high{background:#fff2df;color:#dd9a33}.class-empty{color:#aaaab8;font-size:10px}.teacher-assignment-table{min-width:1050px}.teacher-code{display:block;margin-top:3px;color:#a0a1b0;font-size:8px}.inline-select,.inline-input{width:100%;min-width:85px;padding:7px 6px;border:1px solid #e6e5ef;border-radius:7px;background:#fff;color:#56586d;font-size:9px}.inline-input{min-width:105px}.inline-select:focus,.inline-input:focus{border-color:#776ae2;outline:0}.save-row{padding:6px 8px;border:0;border-radius:7px;background:#6255d9;color:#fff;font-size:9px;font-weight:800;cursor:pointer}.save-row:hover{background:#5145c7}
.class-form #class-count{min-width:80px;width:80px}.template-help{margin:-3px 0 11px;color:#999aaa;font-size:9px}.template-help b{color:var(--purple)}
.class-board{margin-top:12px;overflow:auto;border:1px solid #eeedf5;border-radius:12px;background:#fff}.class-board table{width:100%;min-width:650px;border-collapse:collapse}.class-board th{padding:9px 11px;background:#fafaff;color:#999aaa;text-align:left;font-size:9px;font-weight:800}.class-board td{padding:10px 11px;border-top:1px solid #f0eff5;color:#55576b;font-size:10px;vertical-align:middle}.class-board .level-label{font-weight:800}.class-board .grade-label{display:inline-block;padding:5px 8px;border-radius:8px;font-weight:800}.class-board .grade-label.primary{background:#efeeff;color:#6255d9}.class-board .grade-label.middle{background:#eaf4ff;color:#4088df}.class-board .grade-label.high{background:#fff2df;color:#dd9a33}.class-board .class-list{display:flex;flex-wrap:wrap;gap:5px}.class-board .class-pill{padding:5px 7px;border-radius:7px;background:#f7f7fb;color:#55576b;font-size:9px;font-weight:800}.class-board .class-count{color:#999aaa;font-size:9px}.class-board .board-actions button{padding:4px 6px;border:0;background:none;color:#9c9caf;font-size:10px;cursor:pointer}.class-board .board-actions button:hover{color:var(--purple)}
.class-config>.class-chips{display:none}
.home-page{background:#f8f9fd}.home-shell{display:flex;min-height:100vh}.home-sidebar{position:fixed;inset:0 auto 0 0;width:194px;padding:25px 13px;background:linear-gradient(160deg,#263fac,#5b4de0 72%,#7669ee);color:white}.home-brand{display:flex;align-items:center;gap:10px;padding:0 10px;margin-bottom:42px;font:800 22px Manrope}.home-brand span{font-size:28px}.home-nav{display:grid;gap:7px}.home-nav a{display:flex;align-items:center;gap:13px;padding:12px;border-radius:11px;color:#e5e5ff;text-decoration:none;font-size:13px}.home-nav a.active,.home-nav a:hover{background:#ffffff2d;color:white}.home-nav a:first-letter{font-size:18px}.home-sidebar .ai-side-card{position:absolute;left:15px;right:15px;bottom:22px;padding:14px;border:1px solid #ffffff77;border-radius:14px;background:#ffffff16}.home-main{width:calc(100% - 194px);margin-left:194px}.home-topbar{height:58px;display:flex;align-items:center;justify-content:space-between;padding:0 30px;border-bottom:1px solid #e8e8f1;background:#ffffffc9;color:#8e90a1;font-size:11px}.home-topbar b{color:#42445c}.home-user{display:flex;align-items:center;gap:9px;color:#44465d}.home-user b{font-size:11px}.home-user small{display:block;color:#999aaa;font-size:9px;font-weight:400}.notification{position:relative;font-size:19px;margin-right:5px}.notification i{position:absolute;right:-8px;top:-8px;width:18px;height:18px;border-radius:50%;background:#df5e5e;color:#fff;text-align:center;font-size:10px;font-style:normal}.user-avatar{display:grid;place-items:center;width:31px;height:31px;border-radius:50%;background:#f1e4f7}.home-content{max-width:1500px;margin:0 auto;padding:22px 28px 38px}.welcome-row{display:flex;justify-content:space-between;align-items:end;margin-bottom:19px}.welcome-row h1{margin:0;font:800 29px Manrope;letter-spacing:-.7px}.welcome-row p{margin:6px 0 10px;color:#83869b;font-size:13px}.ai-status{display:inline-block;padding:6px 10px;border:1px solid #dceee4;border-radius:8px;background:#f0faf4;color:#43a86f;font-size:10px}.welcome-actions{display:flex;gap:9px}.btn-outline{border:1px solid #7368ed;color:#6255d9;background:#fff}.welcome-actions .btn{padding:12px 15px;border-radius:9px;font-size:11px}.home-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:18px}.home-stats>div{display:flex;align-items:center;gap:12px;padding:17px;border:1px solid #e8e8f2;border-radius:14px;background:#fff}.home-stat-icon{display:grid;place-items:center;width:45px;height:45px;border-radius:50%;font-size:20px}.home-stat-icon.purple{background:#efeeff;color:#6255d9}.home-stat-icon.blue{background:#eaf4ff;color:#4d95eb}.home-stat-icon.orange{background:#fff2df;color:#e49b38}.home-stat-icon.green{background:#e7f7ed;color:#40ad73}.home-stats p{margin:0;color:#9294a6;font-size:11px}.home-stats strong{display:block;margin:3px 0;font:800 26px Manrope;color:#1f2749}.home-stats small{font-size:10px}.positive{color:#3cad76}.home-module-nav{display:flex;gap:8px;margin-bottom:18px}.home-module-nav a{display:flex;align-items:center;gap:8px;padding:9px 14px;border:1px solid #e9e8f2;border-radius:9px;background:#fff;color:#75778a;text-decoration:none;font-size:10px}.home-module-nav a.active,.home-module-nav a:hover{border-color:#c8c2fb;background:#f2f0ff;color:#6255d9}.home-grid{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:18px}.home-schedule{padding:20px}.section-title{display:flex;justify-content:space-between;align-items:start}.section-title h2,.attention-card h2,.activity-card h2{margin:0 0 4px;font:800 16px Manrope;color:#28304d}.section-title p{margin:0;color:#999bab;font-size:10px}.week-tabs{padding:3px;border-radius:8px;background:#f3f3fa}.week-tabs button{padding:7px 12px;border:0;border-radius:6px;background:none;color:#999bab;font-size:10px}.week-tabs .selected{background:#fff;color:#6255d9;box-shadow:0 2px 5px #0000000b}.schedule-filters{display:flex;gap:9px;margin:18px 0 14px}.schedule-filters select,.schedule-filters button{padding:9px 11px;border:1px solid #e6e5ef;border-radius:8px;background:#fff;color:#67697c;font-size:10px}.week-date{display:flex;justify-content:center;align-items:center;gap:16px;margin-bottom:12px;color:#54576d;font-size:11px}.week-date button{border:0;background:none;color:#aaa;font-size:20px}.home-timetable{overflow:auto}.home-timetable .timetable{min-width:600px;display:grid;grid-template-columns:50px repeat(5,1fr);gap:4px}.home-timetable .day-head,.home-timetable .time-head{padding:6px 3px;color:#85889b;text-align:center;font-size:9px}.home-timetable .slot{min-height:56px;padding:8px;border-radius:8px}.home-right{display:grid;gap:18px}.attention-card,.activity-card{padding:20px}.issue-badge{padding:5px 9px;border-radius:12px;background:#fff0f0;color:#dd6969;font-size:10px;font-weight:800}.attention-item{display:flex;align-items:center;gap:9px;padding:13px 0;border-bottom:1px solid #f0eff5}.attention-item>b{display:grid;place-items:center;width:25px;height:25px;border-radius:8px;background:#fff1ed;color:#e17a68}.attention-item:nth-child(3)>b{background:#fff6df;color:#e2a040}.attention-item:nth-child(4)>b{background:#eaf4ff;color:#6ca4df}.attention-item strong,.attention-item small{display:block}.attention-item strong{font-size:10px;color:#44465d}.attention-item small{margin-top:3px;color:#9b9dac;font-size:9px}.attention-item>span{margin-left:auto;color:#aaa;font-size:18px}.link-btn{margin-top:13px;padding:0;border:0;background:none;color:#6255d9;font-size:10px;font-weight:800}.activity-item{display:flex;align-items:center;gap:9px;padding:12px 0;border-bottom:1px solid #f0eff5}.activity-item>b{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#efeeff;color:#6255d9}.activity-item span{font-size:10px;color:#55576b}.activity-item small{display:block;margin-top:3px;color:#999bab;font-size:9px}.activity-item time{margin-left:auto;color:#aaa;font-size:9px}.home-page .auth-screen{z-index:2000}@media(max-width:1050px){.home-sidebar{width:175px}.home-main{width:calc(100% - 175px);margin-left:175px}.home-stats{grid-template-columns:repeat(2,1fr)}.home-grid{grid-template-columns:1fr}.home-right{grid-template-columns:1fr 1fr}}@media(max-width:700px){.home-sidebar{display:none}.home-main{width:100%;margin:0}.home-content{padding:18px 12px}.home-topbar{padding:0 16px}.welcome-row{display:block}.welcome-actions{margin-top:14px}.welcome-row h1{font-size:24px}.home-stats{gap:8px}.home-stats>div{padding:11px 8px}.home-stat-icon{width:34px;height:34px;font-size:15px}.home-stats strong{font-size:19px}.home-stats p{font-size:9px}.home-stats small{font-size:8px}.home-module-nav{overflow:auto}.home-module-nav a{white-space:nowrap}.home-right{grid-template-columns:1fr}.schedule-filters{flex-wrap:wrap}}
#class-board{margin-top:12px;overflow:auto;border:1px solid #eeedf5;border-radius:12px;background:#fff}#class-board table{width:100%;min-width:650px;border-collapse:collapse}#class-board th{padding:10px 12px;background:#fafaff;color:#999aaa;text-align:left;font-size:10px;font-weight:800}#class-board td{padding:12px;border-top:1px solid #f0eff5;color:#55576b;font-size:11px;vertical-align:middle}#class-board .level-label{font-weight:800}#class-board .grade-label{display:inline-block;padding:6px 9px;border-radius:8px;font-weight:800}#class-board .grade-label.primary{background:#efeeff;color:#6255d9}#class-board .grade-label.middle{background:#eaf4ff;color:#4088df}#class-board .grade-label.high{background:#fff2df;color:#dd9a33}#class-board .class-list{display:flex;flex-wrap:wrap;gap:6px}#class-board .class-pill{padding:6px 9px;border-radius:8px;background:#f5f5fb;color:#55576b;font-size:10px;font-weight:800}#class-board .class-count{color:#999aaa;font-size:10px}#class-board .board-actions{white-space:nowrap}#class-board .board-actions button{padding:6px 8px;border:1px solid #e8e6f4;border-radius:7px;background:#fff;color:#77798b;font-size:10px;cursor:pointer}#class-board .board-actions button:hover{border-color:#bcb5f5;color:var(--purple)}
.teacher-page{background:#f6f7fc}.teacher-shell{display:flex;min-height:100vh}.teacher-sidebar{position:fixed;inset:0 auto 0 0;width:210px;padding:25px 14px;background:linear-gradient(160deg,#233eac,#5b4de0 72%,#7669ee);color:#fff}.side-brand{display:flex;align-items:center;gap:10px;padding:0 12px;margin-bottom:45px;font:800 23px Manrope}.side-brand span{font-size:28px}.teacher-sidebar nav{display:grid;gap:9px}.teacher-sidebar nav a{display:flex;align-items:center;gap:13px;padding:13px 14px;border-radius:12px;color:#e4e5ff;text-decoration:none;font-size:13px;cursor:pointer}.teacher-sidebar nav a.active,.teacher-sidebar nav a:hover{background:#ffffff2b;color:#fff;box-shadow:0 5px 15px #162c8a26}.ai-side-card{position:absolute;left:16px;right:16px;bottom:23px;padding:16px;border:1px solid #ffffff77;border-radius:14px;background:#ffffff16}.ai-side-card b,.ai-side-card small{display:block}.ai-side-card b{font-size:12px}.ai-side-card small{margin-top:8px;color:#e3e4ff;font-size:10px;line-height:1.5}.teacher-main{width:calc(100% - 210px);margin-left:210px}.teacher-topbar{height:58px;display:flex;align-items:center;justify-content:space-between;padding:0 32px;border-bottom:1px solid #e8e8f1;background:#ffffffc9;color:#8e90a1;font-size:11px}.teacher-topbar b{color:#3d405a}.user-pill{display:grid;grid-template-columns:auto 1fr auto;align-items:center;column-gap:8px;color:#45475e}.user-pill b,.user-pill small{display:block}.user-pill small{grid-column:2;color:#999aaa;font-size:9px}.teacher-content{max-width:1500px;margin:0 auto;padding:24px 30px 40px}.teacher-title-row{display:flex;justify-content:space-between;align-items:end;margin-bottom:20px}.teacher-title-row h1{margin:0;font:800 29px Manrope;letter-spacing:-.6px}.teacher-title-row p{margin:7px 0 0;color:#8e90a1;font-size:13px}.teacher-title-row .btn{padding:12px 16px}.teacher-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:20px}.teacher-stats>div{display:flex;align-items:center;gap:12px;padding:17px;border:1px solid #ececf5;border-radius:14px;background:#fff}.stats-icon{display:grid;place-items:center;width:43px;height:43px;border-radius:50%;font-size:20px}.stats-icon.purple{background:#efeeff;color:#6255d9}.stats-icon.green{background:#e6f7ed;color:#37a871}.stats-icon.orange{background:#fff1df;color:#e29a36}.teacher-stats p{margin:0;color:#989aaa;font-size:11px}.teacher-stats strong{display:block;margin-top:3px;color:#242640;font:800 26px Manrope}.teacher-main-grid{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:18px}.teacher-list-card,.teacher-upload-card{padding:20px}.section-title{display:flex;justify-content:space-between;align-items:start;gap:15px}.section-title h2,.teacher-upload-card h2{margin:0 0 4px;font:800 16px Manrope}.table-tools{display:flex;gap:8px}.table-tools input,.table-tools select{padding:9px 10px;border:1px solid var(--line);border-radius:8px;background:#fff;color:#6e7082;font-size:10px}.teacher-list-card .teacher-meta{margin-top:15px}.drop-zone{display:grid;place-items:center;gap:8px;height:190px;margin:20px 0 12px;border:1.5px dashed #8d82f1;border-radius:14px;background:#faf9ff;color:#6255d9;text-align:center;cursor:pointer}.drop-zone span{font-size:45px}.drop-zone b{font-size:12px}.drop-zone small{color:#9496aa;font-size:10px}.full-btn{width:100%;margin-top:7px}.or-line{display:flex;align-items:center;gap:10px;margin:16px 0;color:#aaaaba;font-size:10px}.or-line:before,.or-line:after{content:"";height:1px;flex:1;background:#eeeef5}.teacher-page .class-config{margin-top:18px;padding:20px;background:#fff}.teacher-page .class-form{margin:0;display:flex;gap:8px;flex-wrap:wrap}.teacher-page .class-form select,.teacher-page .class-form input{padding:9px 10px}.teacher-page .class-form #class-count{width:75px;min-width:75px}.teacher-page .class-form #class-name{width:175px}.teacher-page .class-config .template-help{margin-bottom:12px}@media(max-width:1000px){.teacher-sidebar{width:175px}.teacher-main{width:calc(100% - 175px);margin-left:175px}.teacher-main-grid{grid-template-columns:1fr}.teacher-upload-card{display:none}.teacher-content{padding:20px}.teacher-title-row h1{font-size:25px}}@media(max-width:700px){.teacher-sidebar{display:none}.teacher-main{width:100%;margin:0}.teacher-topbar{padding:0 16px}.teacher-content{padding:18px 12px}.teacher-stats{gap:8px}.teacher-stats>div{padding:11px 8px}.teacher-stats p{font-size:9px}.teacher-stats strong{font-size:20px}.teacher-title-row{align-items:start;gap:10px}.teacher-title-row .btn{font-size:0;padding:12px}.teacher-title-row .btn:first-letter{font-size:16px}.section-title{display:block}.table-tools{margin-top:12px}.teacher-list-card{padding:14px}.teacher-page .class-config{padding:15px}}
#shared-module-sidebar{width:210px}.shared-module-main{width:calc(100% - 210px);margin-left:210px}.shared-module-shell{min-height:100vh;display:flex}@media(max-width:1000px){#shared-module-sidebar{width:175px}.shared-module-main{width:calc(100% - 175px);margin-left:175px}}@media(max-width:700px){#shared-module-sidebar{display:none}.shared-module-main{width:100%;margin-left:0}}
.home-sidebar{width:210px}.home-main{width:calc(100% - 210px);margin-left:210px}@media(max-width:1000px){.home-sidebar{width:175px}.home-main{width:calc(100% - 175px);margin-left:175px}}@media(max-width:700px){.home-sidebar{display:none}.home-main{width:100%;margin-left:0}}
.teacher-page #schedule-with-teachers{display:none}.teacher-page .teacher-upload-card{order:-1}.teacher-page .teacher-sidebar nav a[href="timetable.html"]{display:none}
.teacher-page .teacher-sidebar nav a[href="timetable.html"]{display:flex!important}.subjects-page #shared-module-sidebar{width:210px;min-width:210px;box-sizing:border-box}.subjects-page .shared-module-main{width:calc(100% - 210px);margin-left:210px}.subjects-page .sidebar-brand{min-height:29px}
.teacher-page .teacher-page-top{align-items:center;margin-bottom:20px}.top-upload{display:flex;align-items:center;gap:9px}.top-upload .upload-box{min-width:280px}.top-upload .outline-btn{white-space:nowrap}.teacher-page .full-teacher-list{width:100%;padding:20px}.teacher-page .teacher-main-grid{display:block}.teacher-page .teacher-list-card{min-width:0}.teacher-page .class-config{width:100%}@media(max-width:800px){.top-upload{margin-top:15px;align-items:stretch;flex-direction:column}.teacher-page .teacher-page-top{display:block}.top-upload .upload-box{min-width:0}.top-upload .outline-btn{width:100%}}

/* Nút mềm mại, đồng nhất cho module Giáo viên */
.teacher-page button,
.teacher-page .btn,
.teacher-page .outline-btn,
.teacher-page .upload-box {
  border-radius: 12px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.teacher-page button:not(:disabled):hover,
.teacher-page .upload-box:hover {
  transform: translateY(-1px);
}
.teacher-page button:focus-visible,
.teacher-page .upload-box:focus-within {
  outline: 3px solid #6255d933;
  outline-offset: 2px;
}
.teacher-page .top-upload .upload-box {
  min-height: 52px;
  padding: 9px 14px;
  border: 1px dashed #aaa1f0;
  background: linear-gradient(135deg,#fbfaff,#f6f4ff);
  box-shadow: 0 5px 14px #6255d90d;
}
.teacher-page .top-upload .outline-btn {
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid #ddd9fa;
  background: #fff;
  color: #6255d9;
  box-shadow: 0 5px 14px #6255d90d;
}
.teacher-page .top-upload .outline-btn:hover {
  border-color: #aaa1f0;
  background: #f8f7ff;
  box-shadow: 0 8px 18px #6255d91a;
}
.teacher-page .class-form .btn-primary,
.teacher-page .save-row {
  border: 0;
  background: linear-gradient(135deg,#7568e8,#5b4bd2);
  color: #fff;
  box-shadow: 0 7px 16px #6255d926;
}
.teacher-page .class-form .btn-primary {
  min-height: 40px;
  padding: 0 16px;
}
.teacher-page .class-form .btn-primary:hover,
.teacher-page .save-row:hover {
  background: linear-gradient(135deg,#8276ee,#6255d9);
  box-shadow: 0 10px 20px #6255d933;
}
.teacher-page .save-row {
  padding: 8px 12px;
}
.teacher-page .board-actions button,
.teacher-page .class-board .board-actions button {
  border: 1px solid #e3e0f5;
  background: #fff;
  color: #716b9d;
  box-shadow: 0 3px 8px #4b438c08;
}
.teacher-page .board-actions button:hover,
.teacher-page .class-board .board-actions button:hover {
  border-color: #bdb5f3;
  background: #f8f7ff;
  color: #6255d9;
}
.teacher-page .class-board .board-actions button[data-delete-group] {
  color: #c77e8a;
}
.teacher-page .class-board .board-actions button[data-delete-group]:hover {
  border-color: #f0cbd1;
  background: #fff6f7;
  color: #c95f70;
}

/* Một font chữ duy nhất, tròn và dễ đọc cho toàn hệ thống */
:root {
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
}
*, *::before, *::after,
button, input, select, textarea {
  font-family: 'Nunito', sans-serif !important;
}
h1, h2, h3, h4, h5, h6, strong, b, button {
  font-weight: 700;
}
.teacher-assignment-table .class-select[multiple],.teacher-assignment-table .grade-select[multiple]{height:78px;min-width:190px;padding:4px}.teacher-assignment-table .grade-select[multiple]{min-width:145px}.teacher-assignment-table .class-select[multiple] option,.teacher-assignment-table .grade-select[multiple] option{padding:4px 3px}.select-help{display:block;margin-top:4px;color:#a0a1b0;font-size:8px}.assignment-summary{display:inline-block;max-width:120px;color:#6c6e83;font-size:9px;line-height:1.4}
.teacher-page .teacher-table-wrap{overflow-x:hidden}.teacher-page .teacher-assignment-table{width:100%;min-width:0;table-layout:fixed}.teacher-page .teacher-assignment-table th,.teacher-page .teacher-assignment-table td{padding:9px 7px;overflow:hidden;vertical-align:top}.teacher-page .teacher-assignment-table th:nth-child(1){width:13%}.teacher-page .teacher-assignment-table th:nth-child(2){width:14%}.teacher-page .teacher-assignment-table th:nth-child(3),.teacher-page .teacher-assignment-table th:nth-child(4){width:13%}.teacher-page .teacher-assignment-table th:nth-child(5){width:19%}.teacher-page .teacher-assignment-table th:nth-child(6){width:11%}.teacher-page .teacher-assignment-table th:nth-child(7){width:11%}.teacher-page .teacher-assignment-table th:nth-child(8){width:6%}.teacher-page .teacher-assignment-table .inline-select{max-width:100%;min-width:0}.teacher-page .teacher-assignment-table .class-select[multiple],.teacher-page .teacher-assignment-table .grade-select[multiple]{width:100%;min-width:0;font-size:8px}.teacher-page .teacher-assignment-table .select-help{white-space:normal;line-height:1.2}.teacher-page .teacher-assignment-table .save-row{padding:7px 8px;font-size:8px}@media(max-width:1050px){.teacher-page .teacher-assignment-table{font-size:9px}.teacher-page .teacher-assignment-table th,.teacher-page .teacher-assignment-table td{padding:7px 4px}.teacher-page .teacher-assignment-table th:nth-child(1){width:12%}.teacher-page .teacher-assignment-table th:nth-child(2){width:13%}.teacher-page .teacher-assignment-table th:nth-child(3),.teacher-page .teacher-assignment-table th:nth-child(4){width:14%}.teacher-page .teacher-assignment-table th:nth-child(5){width:19%}.teacher-page .teacher-assignment-table th:nth-child(6){width:12%}.teacher-page .teacher-assignment-table th:nth-child(7){width:10%}.teacher-page .teacher-assignment-table th:nth-child(8){width:6%}}
.teacher-page .teacher-stats{gap:12px;margin:18px 0 14px}.teacher-page .teacher-stats>div{min-height:76px;padding:12px 16px;border:1px solid transparent;border-radius:15px;box-shadow:0 7px 18px #3530630c}.teacher-page .teacher-stats>div:nth-child(1){border-color:#ddd8ff;background:linear-gradient(135deg,#fff,#f3f1ff)}.teacher-page .teacher-stats>div:nth-child(2){border-color:#cdebdc;background:linear-gradient(135deg,#fff,#f0fbf5)}.teacher-page .teacher-stats>div:nth-child(3){border-color:#f6dfbd;background:linear-gradient(135deg,#fff,#fff7eb)}.teacher-page .teacher-stats .stats-icon{width:38px;height:38px;font-size:18px}.teacher-page .teacher-stats strong{font-size:22px}.teacher-page .manual-teacher-card{margin-top:0;margin-bottom:20px}
.level-config-card{display:flex;align-items:center;justify-content:space-between;gap:25px;margin:18px 0 14px;padding:16px 20px;border:1px solid #dcd8fb;background:linear-gradient(135deg,#fff,#f8f7ff)}.level-config-card h2{margin:3px 0 4px;font-size:17px;color:#28304d}.level-config-controls{display:flex;align-items:end;gap:9px;flex-wrap:wrap}.level-config-controls label{display:grid;gap:5px;color:#77798d;font-size:9px;font-weight:800}.level-config-controls select,.level-config-controls input{min-height:38px;padding:8px 10px;border:1px solid #dfdcf2;border-radius:10px;background:#fff;color:#55576b;font-size:10px}.level-config-controls select{min-width:125px}.level-config-controls input{width:78px}.configured-subjects{display:flex;flex-wrap:wrap;gap:5px;max-width:420px}.configured-subjects label{display:flex;align-items:center;gap:4px;padding:6px 8px;border:1px solid #e4e1f4;border-radius:9px;background:#fff;color:#6d6e84;font-size:8px;font-weight:600;cursor:pointer}.configured-subjects label:has(input:checked){border-color:#bdb5f3;background:#f1efff;color:#6255d9}.configured-subjects input{width:12px;height:12px;min-height:0;accent-color:#6255d9}@media(max-width:1000px){.level-config-card{display:block}.level-config-controls{margin-top:14px}.configured-subjects{max-width:none}}@media(max-width:650px){.level-config-controls{display:grid;grid-template-columns:1fr 1fr}.configured-subjects{grid-column:1/-1}}
.save-config-button{min-height:38px;padding:8px 13px;border:0;border-radius:10px;background:linear-gradient(135deg,#7568e8,#5b4bd2);color:#fff;font-size:10px;font-weight:800;white-space:nowrap;box-shadow:0 7px 16px #6255d926;cursor:pointer;transition:.18s}.save-config-button:hover{transform:translateY(-1px);background:linear-gradient(135deg,#8276ee,#6255d9);box-shadow:0 10px 20px #6255d933}
.active-level-badge{display:inline-flex;align-items:center;width:max-content;margin-top:8px;padding:5px 9px;border:1px solid #d9d3ff;border-radius:20px;background:#f3f1ff;color:#6255d9;font-size:9px;font-weight:800}.teacher-page .manual-teacher-card{display:grid;grid-template-columns:minmax(220px,.72fr) minmax(0,1.8fr);align-items:center;gap:25px;padding:18px 20px;border-color:#dcd8fb;background:linear-gradient(110deg,#fff,#fbfaff 65%,#f5f3ff)}.teacher-page .manual-teacher-card h2{font-size:18px;letter-spacing:-.2px}.teacher-page .manual-teacher-form{grid-template-columns:1.45fr .85fr 1fr 1.1fr auto;gap:9px}.teacher-page .manual-teacher-form input,.teacher-page .manual-teacher-form select{min-height:42px;padding:10px 12px;border-radius:11px;font-size:10px}.teacher-page .manual-teacher-form .btn-primary{min-height:42px;border-radius:11px}.teacher-page .full-teacher-list{padding:0;overflow:hidden;border-color:#e2e0f1}.teacher-page .full-teacher-list .section-title{padding:20px 22px 15px;background:linear-gradient(110deg,#fff,#fbfaff)}.teacher-page .full-teacher-list .teacher-meta{margin:0;padding:12px 22px;background:#faf9ff;border-top:1px solid #f0eef8;border-bottom:1px solid #f0eef8}.teacher-page .full-teacher-list .teacher-table-wrap{padding:0 10px 12px}.teacher-page .teacher-assignment-table th{padding:12px 8px;background:#f6f5fc;color:#777990;letter-spacing:.1px}.teacher-page .teacher-assignment-table td{padding:13px 8px;background:#fff}.teacher-page .teacher-assignment-table tbody tr:hover td{background:#fcfbff}.teacher-page .teacher-assignment-table td:first-child b{color:#29304e;font-size:11px}.teacher-page .teacher-assignment-table .inline-select{border-color:#e2e0ef;background:#fbfbfe}.teacher-page .teacher-assignment-table .inline-select:focus{border-color:#8377e6;box-shadow:0 0 0 3px #6255d91a}.teacher-page .teacher-assignment-table .level-select[multiple],.teacher-page .teacher-assignment-table .grade-select[multiple],.teacher-page .teacher-assignment-table .class-select[multiple]{border-radius:10px;background:#fbfaff}.teacher-page .teacher-assignment-table .level-select[multiple] option:checked,.teacher-page .teacher-assignment-table .grade-select[multiple] option:checked,.teacher-page .teacher-assignment-table .class-select[multiple] option:checked{background:#e9e6ff;color:#5145c7}@media(max-width:1000px){.teacher-page .manual-teacher-card{display:block}.teacher-page .manual-teacher-form{margin-top:15px;grid-template-columns:repeat(2,1fr)}}@media(max-width:650px){.teacher-page .manual-teacher-form{grid-template-columns:1fr}.teacher-page .manual-teacher-form .btn-primary{width:100%}}
.teacher-page .level-config-card{display:grid;grid-template-columns:minmax(235px,.85fr) minmax(0,2.15fr);align-items:center;gap:24px;min-height:168px;padding:20px 24px}.teacher-page .level-config-controls{display:grid;grid-template-columns:145px 82px minmax(240px,1fr) auto;align-items:end;gap:9px}.teacher-page .configured-subjects{max-width:none;max-height:92px;overflow:auto;align-content:start;padding:2px}.teacher-page .save-config-button{align-self:end}.teacher-page .level-config-card .muted{line-height:1.5}@media(max-width:1050px){.teacher-page .level-config-card{grid-template-columns:1fr}.teacher-page .level-config-controls{grid-template-columns:145px 82px 1fr auto}}@media(max-width:700px){.teacher-page .level-config-controls{grid-template-columns:1fr 1fr}.teacher-page .configured-subjects{grid-column:1/-1;max-height:none}.teacher-page .save-config-button{grid-column:1/-1;width:100%}}
.primary-rules-card{display:grid;grid-template-columns:180px 1fr 1fr;align-items:stretch;gap:10px;margin:0 0 14px;padding:12px 16px;border:1px solid #e8e5f3;border-radius:14px;background:#fff;box-shadow:0 6px 16px #35306307}.rule-title{display:flex;flex-direction:column;justify-content:center;gap:4px;color:#7b7d91;font-size:9px;font-weight:800}.rule-title b{color:#6255d9;font-size:13px}.rule-item{display:flex;align-items:center;gap:9px;padding:9px 11px;border-radius:10px;font-size:9px;line-height:1.35}.rule-item strong{display:grid;place-items:center;min-width:58px;padding:5px 6px;border-radius:8px;font-size:9px}.rule-item span{color:#77798d}.rule-item.homeroom{background:#f2f0ff}.rule-item.homeroom strong{background:#e2ddff;color:#5b4ed0}.rule-item.specialist{background:#eaf9f2}.rule-item.specialist strong{background:#d5f1e2;color:#309565}@media(max-width:850px){.primary-rules-card{grid-template-columns:1fr}.rule-title{display:flex;flex-direction:row;justify-content:space-between;align-items:center}}
.teacher-page .manual-teacher-form #manual-subject{height:76px;min-height:76px}.teacher-page .teacher-assignment-table .subject-input[multiple]{height:74px;min-width:0;width:100%;padding:4px}.teacher-page .teacher-assignment-table .subject-input[multiple] option{padding:4px 3px}.teacher-page .teacher-assignment-table .subject-input[multiple] option:checked{background:#e9e6ff;color:#5145c7}
.checkbox-dropdown{position:relative;width:100%;min-width:0}.checkbox-dropdown-source{display:none!important}.checkbox-dropdown-button{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:38px;padding:8px 10px;border:1px solid #e2e0ef;border-radius:10px;background:#fbfbfe;color:#65677b;font-size:9px;text-align:left;cursor:pointer;white-space:nowrap}.checkbox-dropdown-button span{margin-left:6px;color:#8d89ad;font-size:12px}.checkbox-dropdown-button:hover{border-color:#aaa1f0;background:#fff}.checkbox-dropdown.open{z-index:30}.checkbox-dropdown.open .checkbox-dropdown-button{border-color:#8377e6;box-shadow:0 0 0 3px #6255d91a}.checkbox-dropdown-menu{position:absolute;top:calc(100% + 6px);left:0;right:0;display:none;max-height:210px;overflow:auto;padding:7px;border:1px solid #dddaf2;border-radius:12px;background:#fff;box-shadow:0 15px 30px #332b751f}.checkbox-dropdown.open .checkbox-dropdown-menu{display:grid;gap:3px}.checkbox-dropdown-menu label{display:flex;align-items:flex-start;gap:7px;padding:7px 6px;border-radius:8px;color:#62647a;font-size:9px;line-height:1.25;cursor:pointer}.checkbox-dropdown-menu label:hover{background:#f3f1ff;color:#5b4ed0}.checkbox-dropdown-menu input{width:14px;height:14px;margin:0;flex:0 0 14px;accent-color:#6255d9}.teacher-page .manual-teacher-form .checkbox-dropdown{min-height:42px}.teacher-page .teacher-assignment-table .checkbox-dropdown-button{min-height:34px;padding:7px 8px;font-size:8px}.teacher-page .teacher-assignment-table .checkbox-dropdown-menu{min-width:150px}.teacher-page .teacher-assignment-table .checkbox-dropdown-menu label{font-size:8px}
.teacher-page .full-teacher-list,.teacher-page .full-teacher-list .teacher-table-wrap{overflow:visible!important}.teacher-page .full-teacher-list .teacher-table-wrap{position:relative}.teacher-page .checkbox-dropdown.open .checkbox-dropdown-menu{z-index:100;max-height:260px}.teacher-page .teacher-assignment-table td:has(.checkbox-dropdown.open){position:relative;z-index:101}

/* Chuẩn hoá hiển thị desktop ở zoom 100% / màn hình 16:9 */
html{font-size:16px}
.teacher-page{min-width:0}
.teacher-page .teacher-main{min-width:0}
.teacher-page .teacher-content{width:100%;max-width:1440px;padding:22px 28px 36px}
.teacher-page .teacher-page-top{gap:24px}
.teacher-page .top-upload{flex:0 0 auto}
.teacher-page .top-upload .upload-box{min-width:270px}
.teacher-page .teacher-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.teacher-page .manual-teacher-card,.teacher-page .level-config-card,.teacher-page .full-teacher-list,.teacher-page .class-config{min-width:0}
.teacher-page .teacher-assignment-table{table-layout:fixed;width:100%;min-width:0}
.teacher-page .teacher-assignment-table th,.teacher-page .teacher-assignment-table td{word-break:normal;overflow:visible}
.teacher-page .teacher-assignment-table td:first-child{overflow:hidden}
.teacher-page .checkbox-dropdown-menu{max-height:min(280px,38vh);overflow-y:auto;overflow-x:hidden}
.teacher-page .checkbox-dropdown.drop-up .checkbox-dropdown-menu{top:auto;bottom:calc(100% + 6px)}
.teacher-page .checkbox-dropdown-menu label span{overflow-wrap:anywhere}
.teacher-page .checkbox-dropdown-menu label{display:grid;grid-template-columns:14px minmax(0,1fr);align-items:center;gap:8px;min-height:30px;padding:6px 7px}
.teacher-page .checkbox-dropdown-menu label input{width:14px;height:14px;margin:0;align-self:center}
.teacher-page .manual-teacher-form .checkbox-dropdown-button{min-height:42px}
.teacher-page .teacher-assignment-table .checkbox-dropdown-button{display:flex;align-items:center;line-height:1.2}
.teacher-page .teacher-assignment-table .weekly-period-cell{vertical-align:middle}
.teacher-page .teacher-assignment-table .weekly-period{width:58px;max-width:100%;padding:8px 5px;border:1px solid #e2e0ef;border-radius:9px;background:#fbfbfe;color:#56586d;text-align:center;font-size:9px}
.teacher-page .teacher-assignment-table .weekly-period:focus{border-color:#8377e6;outline:0;box-shadow:0 0 0 3px #6255d91a}
.teacher-page .teacher-assignment-table .weekly-period:disabled{background:#f1f1f7;color:#a4a5b2;cursor:not-allowed}
.teacher-page .teacher-assignment-table th:nth-child(1){width:12%}
.teacher-page .teacher-assignment-table th:nth-child(2){width:13%}
.teacher-page .teacher-assignment-table th:nth-child(3),.teacher-page .teacher-assignment-table th:nth-child(4){width:11%}
.teacher-page .teacher-assignment-table th:nth-child(5){width:16%}
.teacher-page .teacher-assignment-table th:nth-child(6){width:10%}
.teacher-page .teacher-assignment-table th:nth-child(7){width:10%}
.teacher-page .teacher-assignment-table th:nth-child(8){width:7%}
.teacher-page .teacher-assignment-table th:nth-child(9){width:5%}

/* Bảng phân công mới: gọn, rõ và cân đối ở zoom 100% */
.teacher-page .full-teacher-list{border-radius:18px;background:#fff;box-shadow:0 12px 30px #34306c0b}
.teacher-page .full-teacher-list .section-title{padding:22px 24px 17px}
.teacher-page .full-teacher-list .section-title h2{font-size:18px;letter-spacing:-.25px;color:#252b4a}
.teacher-page .full-teacher-list .section-title .muted{margin-top:5px;font-size:10px}
.teacher-page .full-teacher-list .teacher-meta{padding:11px 24px;color:#a0a1b1;font-size:9px}
.teacher-page .full-teacher-list .teacher-meta span:first-child{padding:5px 9px;border-radius:999px;background:#f2f0ff;color:#6255d9}
.teacher-page .teacher-assignment-table{border-collapse:separate;border-spacing:0}
.teacher-page .teacher-assignment-table th{padding:12px 10px;background:#f7f7fc;color:#85879b;font-size:9px;letter-spacing:.1px;white-space:nowrap}
.teacher-page .teacher-assignment-table th:first-child{border-radius:10px 0 0 10px}
.teacher-page .teacher-assignment-table th:last-child{border-radius:0 10px 10px 0}
.teacher-page .teacher-assignment-table td{padding:14px 10px;border-top:1px solid #f0eff6;background:#fff;vertical-align:middle}
.teacher-page .teacher-assignment-table tbody tr:hover td{background:#fcfbff}
.teacher-page .teacher-assignment-table td:first-child{border-left:3px solid #7568e8;padding-left:12px}
.teacher-page .teacher-assignment-table td:first-child b{display:block;color:#29304e;font-size:12px;line-height:1.25}
.teacher-page .teacher-assignment-table .teacher-code{margin-top:4px;color:#a5a6b5;font-size:8px}
.teacher-page .teacher-assignment-table .checkbox-dropdown-button{min-height:38px;padding:8px 9px;border-radius:10px;background:#fbfbfe;font-size:9px}
.teacher-page .teacher-assignment-table .role-select{min-height:38px;border-radius:10px;font-size:9px}
.teacher-page .teacher-assignment-table .weekly-period{width:54px;height:38px;border-radius:10px;font-size:9px}
.teacher-page .teacher-assignment-table .save-row{min-width:38px;height:38px;padding:0 9px;border-radius:12px;background:linear-gradient(135deg,#7568e8,#5b4bd2);box-shadow:0 6px 13px #6255d926;font-size:9px}
.teacher-page .teacher-assignment-table .save-row:hover{background:linear-gradient(135deg,#8478ee,#6255d9);transform:translateY(-1px)}
.teacher-page .teacher-assignment-table .select-help{display:none}
/* Môn phụ trách lặp lại nội dung của Bộ môn nên ẩn để bảng thoáng hơn. */
.teacher-page .teacher-assignment-table th:nth-child(7),.teacher-page .teacher-assignment-table td:nth-child(7){display:none}
.teacher-page .teacher-assignment-table th:nth-child(1){width:16%}
.teacher-page .teacher-assignment-table th:nth-child(2){width:11%}
.teacher-page .teacher-assignment-table th:nth-child(3){width:13%}
.teacher-page .teacher-assignment-table th:nth-child(4){width:13%}
.teacher-page .teacher-assignment-table th:nth-child(5){width:18%}
.teacher-page .teacher-assignment-table th:nth-child(6){width:18%}
.teacher-page .teacher-assignment-table th:nth-child(8){width:7%}
.teacher-page .teacher-assignment-table th:nth-child(9){width:4%}
@media(max-width:900px){
  .teacher-page .full-teacher-list .section-title{padding:17px 16px 14px}
  .teacher-page .full-teacher-list .teacher-meta{padding-left:16px;padding-right:16px}
  .teacher-page .full-teacher-list .teacher-table-wrap{padding-left:7px;padding-right:7px}
  .teacher-page .teacher-assignment-table th,.teacher-page .teacher-assignment-table td{padding-left:6px;padding-right:6px}
}

/* Cấp học đã lấy từ cấu hình ban đầu nên không lặp lại trong từng dòng. */
.teacher-page .teacher-assignment-table th:nth-child(4),
.teacher-page .teacher-assignment-table td:nth-child(4){display:none}
.teacher-page .teacher-assignment-table th:nth-child(1){width:16%}
.teacher-page .teacher-assignment-table th:nth-child(2){width:11%}
.teacher-page .teacher-assignment-table th:nth-child(3){width:20%}
.teacher-page .teacher-assignment-table th:nth-child(5){width:14%}
.teacher-page .teacher-assignment-table th:nth-child(6){width:27%}
.teacher-page .teacher-assignment-table th:nth-child(7){width:0}
.teacher-page .teacher-assignment-table th:nth-child(8){width:8%}
.teacher-page .teacher-assignment-table th:nth-child(9){width:4%}
.teacher-page .teacher-assignment-table .checkbox-dropdown-button{min-width:0}
.teacher-page .teacher-assignment-table .checkbox-dropdown-button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Cấu hình cấp học: bố cục hai tầng, không ép chiều cao và không cắt danh sách môn. */
.teacher-page .level-config-card{
  display:grid;
  grid-template-columns:1fr;
  align-items:stretch;
  gap:16px;
  min-height:0;
  height:auto;
  padding:20px 24px 22px;
}
.teacher-page .level-config-card>div:first-of-type{max-width:760px}
.teacher-page .level-config-card h2{font-size:20px;letter-spacing:-.25px}
.teacher-page .level-config-card .muted{max-width:620px;font-size:10px;line-height:1.5}
.teacher-page .level-config-controls{
  display:grid;
  grid-template-columns:minmax(170px,220px) 100px minmax(260px,1fr) auto;
  align-items:end;
  gap:12px;
  width:100%;
  padding-top:2px;
}
.teacher-page .level-config-controls label{font-size:9px}
.teacher-page .level-config-controls select,.teacher-page .level-config-controls input{min-height:40px;font-size:10px}
.teacher-page .configured-subjects{
  display:flex;
  flex-wrap:wrap;
  align-content:flex-start;
  gap:6px;
  max-width:none;
  max-height:116px;
  overflow-y:auto;
  overflow-x:hidden;
  padding:3px 5px 3px 0;
}
.teacher-page .configured-subjects label{min-height:31px;padding:6px 8px;font-size:8px}
.teacher-page .save-config-button{min-height:40px;padding:9px 15px}
.teacher-page .level-config-card{gap:10px;padding:16px 20px 18px}
.teacher-page .level-config-card h2{margin:2px 0 3px;font-size:18px}
.teacher-page .level-config-card .muted{margin:0;font-size:9px}
.teacher-page .level-config-controls{gap:9px;padding-top:0}
.teacher-page .configured-subjects{max-height:none;overflow:visible;gap:5px;padding:0}
.teacher-page .configured-subjects label{min-height:29px;padding:5px 7px}
.teacher-page .class-setup-block{margin-top:12px;margin-bottom:12px}
@media(max-width:700px){
  .teacher-page .level-config-card{padding:18px 16px}
  .teacher-page .level-config-controls{grid-template-columns:1fr 1fr;gap:9px}
  .teacher-page .configured-subjects{grid-column:1/-1;max-height:none}
  .teacher-page .save-config-button{grid-column:1/-1;width:100%}
}

/* BƯỚC 5: bảng phân công dạng thẻ, dễ đọc và thao tác nhanh */
.teacher-page .full-teacher-list{padding:0;border:1px solid #dedaf7;border-radius:18px;background:#fff;overflow:visible}
.teacher-page .full-teacher-list:before{padding:18px 24px 0;margin:0;color:#7568e8}
.teacher-page .full-teacher-list .section-title{align-items:center;gap:18px;padding:14px 24px 16px;background:#fff}
.teacher-page .full-teacher-list .section-title h2{margin:0;font-size:20px;letter-spacing:-.35px;color:#252b4a}
.teacher-page .full-teacher-list .section-title .muted{margin-top:5px;color:#9698aa;font-size:10px}
.teacher-page .full-teacher-list .table-tools{align-items:center;gap:8px}
.teacher-page .full-teacher-list .table-tools input,.teacher-page .full-teacher-list .table-tools select{height:38px;padding:8px 11px;border-radius:10px;font-size:9px}
.teacher-page .full-teacher-list .table-tools input{width:150px}
.teacher-page .full-teacher-list .table-tools select{width:125px}
.teacher-page .full-teacher-list .teacher-meta{display:flex;align-items:center;margin:0;padding:10px 24px;background:#faf9ff;border-top:1px solid #f0eef8;border-bottom:1px solid #f0eef8}
.teacher-page .full-teacher-list .teacher-table-wrap{padding:0 18px 16px}
.teacher-page .teacher-assignment-table{border-collapse:separate;border-spacing:0 7px}
.teacher-page .teacher-assignment-table thead th{padding:9px 9px 5px;border:0;background:transparent;color:#9698aa;font-size:8px;font-weight:900;letter-spacing:.3px;text-transform:uppercase}
.teacher-page .teacher-assignment-table tbody tr{filter:drop-shadow(0 4px 10px #35306308)}
.teacher-page .teacher-assignment-table tbody td{height:66px;padding:10px 9px;border-top:1px solid #ebe9f4;border-bottom:1px solid #ebe9f4;background:#fff;vertical-align:middle}
.teacher-page .teacher-assignment-table tbody td:first-child{border-left:3px solid #7568e8;border-radius:12px 0 0 12px}
.teacher-page .teacher-assignment-table tbody td:last-child{border-right:1px solid #ebe9f4;border-radius:0 12px 12px 0}
.teacher-page .teacher-assignment-table tbody tr:hover td{background:#fcfbff;border-color:#dcd7fa}
.teacher-page .teacher-assignment-table .checkbox-dropdown-button,.teacher-page .teacher-assignment-table .role-select{height:40px;min-height:40px;border-radius:10px}
.teacher-page .teacher-assignment-table .checkbox-dropdown-button{padding:8px 10px;color:#555a72;background:#fbfbfe}
.teacher-page .teacher-assignment-table .weekly-period{height:40px;width:58px}
.teacher-page .teacher-assignment-table .save-row{height:40px;min-width:42px;border-radius:12px}
.teacher-page .teacher-assignment-table{width:100%;max-width:100%}
.teacher-page .teacher-assignment-table th:nth-child(1){width:16%}
.teacher-page .teacher-assignment-table th:nth-child(2){width:11%}
.teacher-page .teacher-assignment-table th:nth-child(3){width:18%}
.teacher-page .teacher-assignment-table th:nth-child(5){width:14%}
.teacher-page .teacher-assignment-table th:nth-child(6){width:25%}
.teacher-page .teacher-assignment-table th:nth-child(8){width:9%}
.teacher-page .teacher-assignment-table th:nth-child(9){width:7%}
.teacher-page .teacher-assignment-table td:last-child{padding-left:4px;padding-right:4px}
.teacher-page .teacher-assignment-table .save-row{width:100%;min-width:0;padding:0 5px}
.teacher-page .clean-assignment-table th:nth-child(1),.teacher-page .clean-assignment-table td:nth-child(1){width:16%;display:table-cell}
.teacher-page .clean-assignment-table th:nth-child(2),.teacher-page .clean-assignment-table td:nth-child(2){width:11%;display:table-cell}
.teacher-page .clean-assignment-table th:nth-child(3),.teacher-page .clean-assignment-table td:nth-child(3){width:20%;display:table-cell}
.teacher-page .clean-assignment-table th:nth-child(4),.teacher-page .clean-assignment-table td:nth-child(4){width:15%;display:table-cell}
.teacher-page .clean-assignment-table th:nth-child(5),.teacher-page .clean-assignment-table td:nth-child(5){width:25%;display:table-cell}
.teacher-page .clean-assignment-table th:nth-child(6),.teacher-page .clean-assignment-table td:nth-child(6){width:8%;display:table-cell}
.teacher-page .clean-assignment-table th:nth-child(7),.teacher-page .clean-assignment-table td:nth-child(7){width:5%;display:table-cell}
.teacher-page .clean-assignment-table .teacher-name-cell{border-left:3px solid #7568e8}
.teacher-page .clean-assignment-table .action-cell{padding-left:3px;padding-right:3px}
.teacher-page .clean-assignment-table .save-row{width:100%;min-width:0;padding:0 3px}
@media(max-width:800px){
  .teacher-page .full-teacher-list .section-title{display:block;padding:13px 16px}
  .teacher-page .full-teacher-list .table-tools{margin-top:11px}
  .teacher-page .full-teacher-list .table-tools input{width:calc(100% - 133px)}
  .teacher-page .full-teacher-list .teacher-meta{padding-left:16px;padding-right:16px}
  .teacher-page .full-teacher-list .teacher-table-wrap{padding-left:8px;padding-right:8px}
}

/* Luồng cấu hình: cấp học → lớp → nhân sự → phân công */
.teacher-page .level-config-card{position:relative;border-color:#d8d2ff;background:linear-gradient(115deg,#fff,#faf9ff 62%,#f3f1ff);box-shadow:0 12px 28px #5149a114}
.teacher-page .level-config-card:before,.teacher-page .class-setup-block:before{display:block;margin-bottom:8px;color:#8e88c8;font-size:9px;font-weight:900;letter-spacing:.8px}
.teacher-page .level-config-card:before{content:'BƯỚC 1 · THIẾT LẬP PHẠM VI'}
.teacher-page .level-config-card:before{grid-column:1/-1;margin-bottom:-4px}
.teacher-page .class-setup-block{margin-top:18px;margin-bottom:18px}
.teacher-page .class-setup-block:before{content:'BƯỚC 2 · KHAI BÁO KHỐI VÀ LỚP';display:block;margin:0 0 8px 4px;color:#4f8fbd}
.teacher-page .class-setup-block .class-config{margin-top:0;border-color:#cfe5f5;background:linear-gradient(115deg,#fff,#f8fcff)}
.teacher-page .class-setup-block .template-help{margin-top:10px;margin-bottom:10px;padding:0 5px}
.teacher-page .class-setup-block #class-board{margin-top:10px}
.teacher-page .primary-rules-card{margin-top:0}
.teacher-page .primary-rules-card:before{content:'BƯỚC 3 · QUY TẮC PHÂN CÔNG';grid-column:1/-1;display:block;margin-bottom:-4px;color:#8e88c8;font-size:9px;font-weight:900;letter-spacing:.8px}
.teacher-page .manual-teacher-card:before,.teacher-page .full-teacher-list:before{display:block;margin-bottom:7px;color:#8e88c8;font-size:9px;font-weight:900;letter-spacing:.8px}
.teacher-page .manual-teacher-card:before{content:'BƯỚC 4 · THÊM GIÁO VIÊN'}
.teacher-page .full-teacher-list:before{content:'BƯỚC 5 · PHÂN CÔNG GIẢNG DẠY'}
.teacher-page .manual-teacher-card:before{grid-column:1/-1;margin-bottom:-4px}
.teacher-page .manual-teacher-card .top-upload{grid-column:2;grid-row:2;justify-content:flex-end;align-self:center}
.teacher-page .manual-teacher-card .top-upload .upload-box{min-width:270px}
.teacher-page .manual-teacher-card .manual-teacher-form{grid-column:1/-1;grid-row:3}
.teacher-page .teacher-page-top .top-upload{display:none}
@media(max-width:1000px){
  .teacher-page .manual-teacher-card .top-upload{grid-column:2;grid-row:2}
  .teacher-page .manual-teacher-card .manual-teacher-form{grid-column:1/-1;grid-row:3}
}
@media(max-width:700px){
  .teacher-page .manual-teacher-card .top-upload{grid-column:1;grid-row:auto;justify-content:stretch;flex-direction:column}
  .teacher-page .manual-teacher-card .top-upload .upload-box,.teacher-page .manual-teacher-card .top-upload .outline-btn{width:100%;min-width:0}
  .teacher-page .manual-teacher-card .manual-teacher-form{grid-column:1;grid-row:auto}
}
@media(min-width:1001px) and (max-width:1450px){
  .teacher-page .teacher-content{padding-left:22px;padding-right:22px}
  .teacher-page .teacher-page-top{gap:16px}
  .teacher-page .top-upload .upload-box{min-width:245px}
  .teacher-page .teacher-title-row h1,.teacher-page .standalone-title{font-size:25px}
  .teacher-page .manual-teacher-card{grid-template-columns:minmax(190px,.65fr) minmax(0,1.8fr);gap:16px;padding:16px}
  .teacher-page .manual-teacher-form{grid-template-columns:1.25fr .75fr 1fr 1fr auto;gap:7px}
  .teacher-page .manual-teacher-form input,.teacher-page .manual-teacher-form select,.teacher-page .manual-teacher-form .btn-primary{min-height:38px;padding:8px 9px}
  .teacher-page .level-config-card{padding:17px 19px;gap:16px}
}
@media(max-width:1000px){
  .teacher-page .teacher-content{max-width:none}
  .teacher-page .teacher-assignment-table{min-width:0}
}
.manual-teacher-card{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:20px;padding:18px 20px;border:1px solid #e9e7f5;border-radius:16px;background:linear-gradient(135deg,#fff,#fbfaff);box-shadow:0 8px 22px #35306308}.manual-teacher-card h2{margin:3px 0 4px;font-size:17px;color:#28304d}.manual-teacher-form{display:grid;grid-template-columns:1.3fr 1fr 1fr 1.25fr auto;align-items:center;gap:8px;flex:1}.manual-teacher-form input,.manual-teacher-form select{width:100%;min-width:0;padding:10px 11px;border:1px solid #e6e4f1;border-radius:10px;background:#fff;color:#4d5068;font-size:10px;outline:0}.manual-teacher-form input:focus,.manual-teacher-form select:focus{border-color:#8b80ea;box-shadow:0 0 0 3px #6255d91a}.manual-teacher-form .btn-primary{min-height:39px;padding:0 14px;white-space:nowrap;border:0;border-radius:10px;background:linear-gradient(135deg,#7568e8,#5b4bd2);color:#fff;font-size:10px;font-weight:800;box-shadow:0 7px 16px #6255d926}.manual-teacher-form .btn-primary:hover{background:linear-gradient(135deg,#8276ee,#6255d9);box-shadow:0 10px 20px #6255d933}.subject-note{color:#77798b;font-size:9px}@media(max-width:1100px){.manual-teacher-card{display:block}.manual-teacher-form{margin-top:14px;grid-template-columns:repeat(2,1fr)}.manual-teacher-form .btn-primary{width:max-content}}@media(max-width:650px){.manual-teacher-form{grid-template-columns:1fr}.manual-teacher-form .btn-primary{width:100%}}
.teacher-page .manual-teacher-form{grid-template-columns:1.45fr 1fr 1.1fr auto}
@media(max-width:1100px){.teacher-page .manual-teacher-form{grid-template-columns:repeat(2,1fr)}}
@media(max-width:650px){.teacher-page .manual-teacher-form{grid-template-columns:1fr}}
.inline-subject-name,.inline-subject-short,.inline-subject-periods,.inline-subject-group{width:100%;height:36px;border:1px solid #e3e1f0;border-radius:9px;background:#fff;color:#37405e;padding:0 9px;font:inherit;font-size:12px;outline:0}.inline-subject-name{min-width:160px;font-weight:800}.inline-subject-short{min-width:70px;text-align:center}.inline-subject-periods{min-width:70px;text-align:center}.inline-subject-group{min-width:130px}.inline-subject-name:focus,.inline-subject-short:focus,.inline-subject-periods:focus,.inline-subject-group:focus{border-color:#7365e8;box-shadow:0 0 0 3px #7365e81c}.inline-check{display:flex;align-items:center;gap:6px;color:#5e9e76;font-size:11px;font-weight:800;white-space:nowrap}.inline-check input{accent-color:#4dae71;width:15px;height:15px}.save-subject{background:#6757dc;color:#fff;border-color:#6757dc}
.subject-filters{display:flex;gap:10px;align-items:flex-end}.subject-filters .compact-field{min-width:150px}.grade-pill{font-size:11px;background:#eaf8ef;color:#31965c;border-radius:20px;padding:6px 10px;white-space:nowrap}.subject-config-panel .panel-heading{align-items:flex-end}
@media(max-width:700px){.subject-filters{display:grid;grid-template-columns:1fr 1fr;margin-top:14px}.subject-filters .compact-field{min-width:0}}
.subjects-page .module-topbar{height:58px;padding:0 32px;border-bottom:1px solid #e7e7f0;background:#fff;color:#7d8297;font-size:13px;display:flex;align-items:center;justify-content:space-between}.subjects-page .profile-mini{display:flex;align-items:center;gap:7px;color:#273056}.subjects-page .profile-mini small{display:block;color:#969bad;font-size:10px}.subjects-page .subjects-view{max-width:1500px;padding:22px 34px 42px}.subjects-page .subjects-title-row{margin:0 0 20px}.subjects-page .subjects-title-row h1{font-size:32px;margin:0 0 5px}.subjects-page .subjects-title-row p{font-size:14px}.title-actions{display:flex;gap:12px;align-items:center}.outline-button{height:42px;padding:0 17px;border:1px solid #7163e7;border-radius:10px;background:#fff;color:#6456dc;font-weight:900;cursor:pointer}.subjects-page .subjects-stats{grid-template-columns:repeat(4,1fr);margin-bottom:18px}.subjects-page .subject-stat{min-height:86px}.subject-stat strong em{font-size:13px;font-style:normal;font-weight:700;color:#6b718a}.stat-blue .stat-icon{background:#eaf2ff;color:#4b86ef}.subjects-layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:20px;align-items:start}.subjects-layout .subjects-panel{margin-bottom:0}.subject-list-panel{padding:18px 20px}.list-toolbar{display:flex;justify-content:space-between;gap:14px;align-items:center}.list-toolbar h2,.quick-config h2,.distribution-card h2{font-size:19px;margin:0 0 4px;color:#202d52}.list-toolbar p{font-size:11px;color:#999eb0;margin:0}.year-select{border:1px solid #e1dff0;border-radius:9px;padding:9px 12px;color:#4c5372;font-size:12px}.subject-tabs{display:flex;align-items:end;gap:8px;border-bottom:1px solid #eeeef6;margin-top:13px}.subject-tabs button{border:0;background:transparent;padding:11px 10px 10px;color:#747b92;font-weight:800;cursor:pointer}.subject-tabs button.active{color:#5f50db;border-bottom:2px solid #6757e5}.subject-tabs .search-field{margin-left:auto;margin-bottom:5px;width:245px;height:36px}.subject-tabs>select{height:36px;border:1px solid #e3e1f0;border-radius:9px;padding:0 10px;color:#69708a;margin-bottom:5px;background:#fff}.table-note{margin-top:10px;padding:9px 12px;border-radius:8px;background:#f1f4ff;color:#57617d;font-size:11px}.table-note span{float:right;font-weight:800}.subject-grid-table{min-width:900px}.subject-grid-table th,.subject-grid-table td{text-align:center;padding:10px 8px;font-size:11px}.subject-grid-table th:first-child,.subject-grid-table td:first-child{text-align:left}.subject-grid-table th{white-space:nowrap}.subject-grid-table td{height:46px}.subject-grid-table td:first-child{min-width:145px}.subject-abbr{display:block;color:#a2a6b6;font-size:9px;margin-top:2px}.grid-group{font-size:10px;color:#606a82}.grid-period{width:42px;height:27px;text-align:center;border:0;background:#f6f7fc;border-radius:7px;color:#303a5b;font-weight:800}.grid-period:disabled{background:transparent;color:#b3b6c1}.subject-grid-table .status-badge{font-size:9px;padding:5px 7px}.subject-grid-table .table-action{padding:6px 8px;margin:0 2px}.table-footer{display:flex;justify-content:space-between;align-items:center;color:#8990a5;font-size:11px;margin-top:13px}.table-footer b{display:inline-grid;place-items:center;width:24px;height:24px;background:#6556df;color:#fff;border-radius:6px}.table-footer select{border:1px solid #e6e4f0;border-radius:7px;padding:5px;background:#fff;color:#6f7489}.subjects-side{display:grid;gap:18px}.quick-config{padding:18px 20px}.quick-config .field{margin-top:13px}.quick-config .field input,.quick-config .field select{height:36px;font-size:12px}.full-button{width:100%;margin-top:15px;height:36px;padding:0;font-size:12px}.distribution-card{padding:18px 20px}.donut-wrap{display:flex;align-items:center;gap:16px;margin:16px 0}.donut{width:125px;height:125px;border-radius:50%;background:conic-gradient(#6958df 0 46%,#4d82ee 46% 73%,#47b77e 73% 98%,#f19051 98%);display:grid;place-items:center;align-content:center;color:#1f2d54;position:relative}.donut:after{content:"";position:absolute;width:78px;height:78px;background:#fff;border-radius:50%}.donut strong,.donut small{position:relative;z-index:1}.donut strong{font-size:22px}.donut small{font-size:10px}.distribution-legend{display:grid;gap:10px;flex:1;font-size:10px;color:#66708b}.distribution-legend span{display:flex;align-items:center;gap:5px}.distribution-legend b{margin-left:auto;color:#273156}.distribution-legend i{width:8px;height:8px;border-radius:50%;display:inline-block}.purple-dot{background:#6958df}.blue-dot{background:#4d82ee}.green-dot{background:#47b77e}.distribution-total{border-top:1px solid #eeeef5;padding-top:12px;text-align:center;color:#757c92;font-size:11px}.distribution-total strong{color:#273156}.detail-button{width:100%;height:35px;border:1px solid #e5e2f1;border-radius:9px;background:#fff;color:#6354dc;font-weight:800;font-size:11px}.subjects-page .add-subject-panel{margin-top:20px;padding:16px 20px}.subjects-page .compact-heading h2{display:inline;margin-left:10px;font-size:18px}.subjects-page .subject-form{margin-top:13px;grid-template-columns:1.5fr .7fr 1fr .9fr .65fr auto}.subjects-page .subject-form .field input,.subjects-page .subject-form .field select{height:36px;font-size:12px}
@media(max-width:1100px){.subjects-page .subjects-view{padding:20px}.subjects-layout{grid-template-columns:1fr}.subjects-side{grid-template-columns:1fr 1fr}.subjects-page .subject-form{grid-template-columns:repeat(3,1fr)}}
@media(max-width:700px){.subjects-page .module-topbar{padding:0 16px}.subjects-page .profile-mini{display:none}.subjects-page .subjects-title-row{display:block}.subjects-page .subjects-title-row h1{font-size:26px}.title-actions{margin-top:14px}.subjects-page .subjects-stats{grid-template-columns:repeat(2,1fr)}.subjects-side{grid-template-columns:1fr}.list-toolbar{display:block}.year-select{display:inline-block;margin-top:10px}.subject-tabs{flex-wrap:wrap}.subject-tabs .search-field{order:5;width:100%;margin-left:0}.subject-tabs>select{order:6;flex:1}.subjects-page .subject-form{grid-template-columns:1fr}.subjects-page .compact-heading h2{display:block;margin:6px 0}}
.subjects-page{overflow-x:hidden}.subjects-page .shared-module-main{min-width:0}.subjects-page .subjects-view{width:100%;box-sizing:border-box}.subjects-page .subjects-layout,.subjects-page .subjects-panel,.subjects-page .subject-list-panel,.subjects-page .subject-table-wrap{min-width:0}.subjects-page .subject-grid-table{min-width:0;table-layout:fixed}.subjects-page .subject-grid-table th,.subjects-page .subject-grid-table td{padding-left:6px;padding-right:6px;overflow:hidden}.subjects-page .subject-grid-table th:nth-child(1),.subjects-page .subject-grid-table td:nth-child(1){width:16%}.subjects-page .subject-grid-table th:nth-child(2),.subjects-page .subject-grid-table td:nth-child(2){width:12%}.subjects-page .subject-grid-table th:nth-child(3),.subjects-page .subject-grid-table td:nth-child(3),.subjects-page .subject-grid-table th:nth-child(4),.subjects-page .subject-grid-table td:nth-child(4),.subjects-page .subject-grid-table th:nth-child(5),.subjects-page .subject-grid-table td:nth-child(5),.subjects-page .subject-grid-table th:nth-child(6),.subjects-page .subject-grid-table td:nth-child(6),.subjects-page .subject-grid-table th:nth-child(7),.subjects-page .subject-grid-table td:nth-child(7){width:7%}.subjects-page .subject-grid-table th:nth-child(8),.subjects-page .subject-grid-table td:nth-child(8){width:11%}.subjects-page .subject-grid-table th:nth-child(9),.subjects-page .subject-grid-table td:nth-child(9){width:13%}.subjects-page .subject-grid-table th:nth-child(10),.subjects-page .subject-grid-table td:nth-child(10){width:9%}.subjects-page .subject-grid-table td:first-child{min-width:0}.subjects-page .grid-period{width:34px;max-width:100%;padding:0}.subjects-page .status-badge{max-width:100%;overflow:hidden;text-overflow:ellipsis}.subjects-page .table-action{padding:5px 6px}.subjects-page .subjects-side{min-width:0}
@media(max-width:1250px){.subjects-page .subjects-view{padding-left:20px;padding-right:20px}.subjects-layout{grid-template-columns:minmax(0,1fr) 285px}.subjects-page .subject-grid-table{font-size:10px}.subjects-page .subject-grid-table th,.subjects-page .subject-grid-table td{padding-left:4px;padding-right:4px}.subjects-page .subject-grid-table .status-badge{font-size:8px}.subjects-page .subject-grid-table .table-action{font-size:10px}}
@media(max-width:1050px){.subjects-layout{grid-template-columns:1fr}.subjects-side{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:18px}.subjects-page .subject-grid-table{font-size:10px}}
@media(max-width:700px){.subjects-page .subjects-side{grid-template-columns:1fr}.subjects-page .subject-grid-table th,.subjects-page .subject-grid-table td{font-size:9px}.subjects-page .subject-grid-table th:nth-child(2),.subjects-page .subject-grid-table td:nth-child(2),.subjects-page .subject-grid-table th:nth-child(9),.subjects-page .subject-grid-table td:nth-child(9){display:none}.subjects-page .subject-grid-table th:nth-child(1),.subjects-page .subject-grid-table td:nth-child(1){width:25%}.subjects-page .subject-grid-table th:nth-child(8),.subjects-page .subject-grid-table td:nth-child(8){width:14%}.subjects-page .subject-grid-table th:nth-child(10),.subjects-page .subject-grid-table td:nth-child(10){width:12%}}
.teacher-page .configured-subjects{display:none!important}
.teacher-page .level-config-card{display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:0;height:auto;padding:14px 20px}.teacher-page .level-config-card:before{display:none}.teacher-page .level-config-card>div:first-of-type{flex:1;max-width:none}.teacher-page .level-config-card h2{margin:2px 0;font-size:18px}.teacher-page .level-config-card .muted{font-size:9px}.teacher-page .level-config-controls{display:flex;align-items:end;gap:9px;width:auto;padding:0}.teacher-page .level-config-controls label{min-width:150px}.teacher-page .level-config-controls label:nth-child(2){min-width:82px}.teacher-page .save-config-button{white-space:nowrap}
@media(max-width:700px){.teacher-page .level-config-card{display:block;padding:16px}.teacher-page .level-config-controls{display:grid;grid-template-columns:1fr 1fr;margin-top:12px}.teacher-page .level-config-controls label,.teacher-page .level-config-controls label:nth-child(2){min-width:0}.teacher-page .save-config-button{width:100%;grid-column:1/-1}}
.subjects-page .subjects-layout{display:block}.subjects-page .subjects-side{display:none}.subjects-page .subject-list-panel{width:100%;box-sizing:border-box}.subjects-page .subject-grid-table{width:100%}
.subjects-page .subjects-stats{display:none}.subjects-page .subject-total-row{background:#f2f3ff;border-top:2px solid #dcd8fb}.subjects-page .subject-total-row td{color:#4f46b8;border-bottom:0}.subjects-page .subject-total-row td:first-child{font-size:11px}.subjects-page .subject-total-row .status-badge{background:#eeecff;color:#5d51ca}
.subjects-page .subject-grid-table th,.subjects-page .subject-grid-table td,.subjects-page .subject-grid-table th:first-child,.subjects-page .subject-grid-table td:first-child{text-align:center}.subjects-page .subject-grid-table td:first-child strong,.subjects-page .subject-grid-table td:first-child small{display:block;text-align:center}.subjects-page .subject-grid-table td:first-child{vertical-align:middle}
.subjects-page #shared-module-sidebar{width:210px;min-width:210px;flex:0 0 210px}.subjects-page .shared-module-main{width:calc(100% - 210px);margin-left:210px}.subjects-page .add-subject-panel{order:0;margin:0 0 18px}.subjects-page .subjects-layout{order:1}
.subjects-page #import-subjects{display:none}.subjects-page .subject-tabs{min-height:42px}.subjects-page .subject-tabs button[style*="display: none"]{display:none!important}
.subjects-page #shared-module-sidebar{position:fixed;inset:0 auto 0 0;padding:25px 14px;box-sizing:content-box;background:linear-gradient(160deg,#233eac,#5b4de0 72%,#7669ee);color:#fff}.subjects-page .sidebar-brand{display:flex;align-items:center;gap:10px;padding:0 12px;margin-bottom:45px;color:#fff;font:800 23px Manrope}.subjects-page .sidebar-brand .brand-mark{font-size:28px}.subjects-page .sidebar-nav{display:grid;gap:9px}.subjects-page .sidebar-nav a{display:flex;align-items:center;gap:13px;padding:13px 14px;border-radius:12px;color:#e4e5ff;text-decoration:none;font-size:13px;cursor:pointer}.subjects-page .sidebar-nav a.active,.subjects-page .sidebar-nav a:hover{background:#ffffff2b;color:#fff;box-shadow:0 5px 15px #162c8a26}.subjects-page .sidebar-assistant{position:absolute;left:16px;right:16px;bottom:23px;padding:16px;border:1px solid #ffffff77;border-radius:14px;background:#ffffff16;color:#fff}.subjects-page .sidebar-assistant strong,.subjects-page .sidebar-assistant span{display:block}.subjects-page .sidebar-assistant strong{font-size:12px}.subjects-page .sidebar-assistant span{margin-top:8px;color:#e3e4ff;font-size:10px;line-height:1.5}
@media(max-width:1000px){.subjects-page #shared-module-sidebar{width:175px;min-width:175px}.subjects-page .shared-module-main{width:calc(100% - 175px);margin-left:175px}}@media(max-width:700px){.subjects-page #shared-module-sidebar{display:none}.subjects-page .shared-module-main{width:100%;margin-left:0}}
.subjects-view{padding-top:22px}.subjects-title-row{margin:4px 0 16px}.subjects-title-row h1{font-size:27px;margin:4px 0}.subjects-title-row p{font-size:12px}.subjects-title-row .primary-button{padding:10px 15px;font-size:12px}.subjects-stats{gap:14px;margin-bottom:14px}.subject-stat{min-height:72px;padding:12px 17px;border-radius:14px}.subject-stat .stat-icon{width:36px;height:36px;font-size:16px}.subject-stat small{font-size:11px;margin-bottom:2px}.subject-stat strong{font-size:24px}.subjects-panel{padding:16px 20px;border-radius:15px;margin-bottom:14px}.panel-heading h2{font-size:18px;margin:5px 0 3px}.subjects-panel p{font-size:12px}.compact-field{min-width:190px}.field span{font-size:11px;margin-bottom:5px}.field select,.field input{height:36px;font-size:12px}.subject-config-panel{padding-top:14px;padding-bottom:14px}.compact-heading{margin-bottom:12px}.subject-form{gap:10px}.check-field{height:36px;font-size:11px;line-height:1.15}.subject-form .primary-button{height:36px;padding:0 14px;font-size:11px;white-space:nowrap}.list-heading{margin-bottom:12px}

/* Module Môn học */
.subjects-page{background:#f7f8ff;color:#1f2949;font-family:'Nunito',sans-serif;font-size:14px}
.subjects-page .shared-module-main{background:linear-gradient(145deg,#f7f8ff 0%,#fff9fb 100%)}
.subjects-view{max-width:1400px;margin:0 auto;padding:34px 42px 70px}
.subjects-page .module-breadcrumb,.subjects-page .section-kicker{color:#6557df;font-size:11px;font-weight:900;letter-spacing:1.4px}
.subjects-title-row{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:8px 0 24px}.subjects-title-row h1{font-size:32px;line-height:1.1;margin:8px 0;color:#1d294e;letter-spacing:-.7px}.subjects-title-row p,.subjects-panel p{margin:0;color:#969bb1;font-size:14px}
.primary-button{border:0;border-radius:12px;padding:13px 18px;background:linear-gradient(135deg,#7365e8,#5948d4);color:#fff;font-weight:900;box-shadow:0 8px 18px #6555d52c;cursor:pointer}.primary-button:hover{filter:brightness(1.05);transform:translateY(-1px)}
.subjects-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-bottom:20px}.subject-stat{min-height:92px;border:1px solid #e7e5f5;border-radius:17px;background:#fff;display:flex;align-items:center;gap:15px;padding:17px 22px;box-shadow:0 8px 24px #3530630a}.subject-stat .stat-icon{width:43px;height:43px;border-radius:50%;display:grid;place-items:center;font-size:20px}.subject-stat small{display:block;color:#9297aa;margin-bottom:4px}.subject-stat strong{display:block;font-size:28px;line-height:1;color:#243056}.stat-purple .stat-icon{background:#efedff;color:#6656dc}.stat-green .stat-icon{background:#e8f8ef;color:#38a565}.stat-orange .stat-icon{background:#fff3df;color:#dc911e}
.subjects-panel{background:#fff;border:1px solid #e6e4f4;border-radius:18px;padding:22px 24px;margin-bottom:20px;box-shadow:0 8px 24px #3530630b}.panel-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px}.panel-heading h2{margin:7px 0 5px;font-size:21px;color:#243056}.compact-field{min-width:190px}.field span{display:block;color:#747a91;font-size:12px;font-weight:800;margin-bottom:7px}.field select,.field input{width:100%;height:42px;border:1px solid #e3e1f0;border-radius:11px;padding:0 13px;color:#3f4560;background:#fff;outline:0;font:inherit}.field select:focus,.field input:focus{border-color:#7365e8;box-shadow:0 0 0 3px #7365e81c}
.add-subject-panel{background:linear-gradient(135deg,#fff,#faf9ff)}.compact-heading{align-items:flex-start;margin-bottom:18px}.subject-form{display:grid;grid-template-columns:1.4fr .7fr 1fr .65fr 1.3fr auto;align-items:end;gap:12px}.check-field{height:42px;display:flex;align-items:center;gap:8px;color:#73788d;font-size:12px}.check-field input{accent-color:#6656df;width:16px;height:16px}
.list-heading{align-items:center;margin-bottom:18px}.list-heading h2{display:flex;align-items:center;gap:10px}.level-pill{font-size:11px;background:#eeecff;color:#6557df;border-radius:20px;padding:6px 10px;white-space:nowrap}.search-field{height:40px;width:230px;border:1px solid #e3e1f0;border-radius:11px;display:flex;align-items:center;gap:7px;padding:0 12px;color:#9297aa}.search-field input{border:0;outline:0;width:100%;font:inherit;color:#3f4560;background:transparent}.subject-table-wrap{overflow-x:auto}.subject-table{width:100%;border-collapse:separate;border-spacing:0;min-width:820px}.subject-table th{background:#f8f8fd;color:#8990a6;text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:.5px;padding:13px 14px}.subject-table th:first-child{border-radius:11px 0 0 11px}.subject-table th:last-child{border-radius:0 11px 11px 0}.subject-table td{padding:14px;border-bottom:1px solid #f0eef7;color:#646b82;vertical-align:middle}.subject-table tbody tr:hover{background:#fcfbff}.subject-table td strong{color:#273156;font-size:14px}.subject-code{display:inline-flex;padding:5px 9px;border-radius:8px;background:#f2f1fc;color:#6557df;font-weight:900;font-size:11px}.group-badge,.assignment-badge,.status-badge{display:inline-flex;align-items:center;border-radius:20px;padding:6px 9px;background:#f1f0ff;color:#6557df;font-size:11px;font-weight:800;white-space:nowrap}.group-badge.specialist,.assignment-badge.specialist{background:#e9f8ef;color:#31965c}.status-badge{background:#eaf8ef;color:#32945b}.table-action{border:1px solid #e5e2f2;border-radius:8px;background:#fff;color:#6557df;padding:7px 9px;margin-right:5px;font:inherit;font-weight:800;cursor:pointer}.table-action.delete{color:#e06767}.table-action:hover{background:#f5f3ff}.empty-subjects{text-align:center;color:#9ba0b2;padding:30px}
@media(max-width:1100px){.subjects-view{padding:28px 24px}.subject-form{grid-template-columns:repeat(3,1fr)}.subject-form .primary-button{width:100%}}
@media(max-width:700px){.subjects-view{padding:22px 15px}.subjects-title-row,.panel-heading,.list-heading{display:block}.subjects-title-row h1{font-size:27px}.subjects-title-row .primary-button{margin-top:16px}.subjects-stats{grid-template-columns:1fr}.compact-field{margin-top:16px;width:100%}.subject-form{grid-template-columns:1fr}.search-field{margin-top:16px;width:100%}}

/* Bước 3: quy tắc và thống kê dùng chung một khung */
.teacher-page .step3-frame{margin:14px 0 18px;padding:14px 16px 16px;border:1px solid #ddd9f8;border-radius:18px;background:linear-gradient(135deg,#fff,#fbfaff);box-shadow:0 8px 24px rgba(52,42,125,.06)}
.teacher-page .step3-frame .primary-rules-card{margin:0;padding:0;border:0;background:transparent;box-shadow:none}
.teacher-page .step3-frame .teacher-stats{margin:12px 0 0;gap:12px}
.teacher-page .step3-frame .teacher-stats>div{min-height:64px;padding:11px 15px;border-radius:14px}
.teacher-page .step3-frame .primary-rules-card:before{margin-bottom:8px}
@media(max-width:700px){.teacher-page .step3-frame{padding:12px}.teacher-page .step3-frame .teacher-stats{grid-template-columns:1fr}.teacher-page .step3-frame .primary-rules-card{display:block}}

/* Module Lớp học */
.classes-page{background:#f7f8ff;color:#202b50;font-family:'Nunito',sans-serif;font-size:14px}.classes-page .shared-module-main{background:linear-gradient(145deg,#f7f8ff,#fff9fb)}.classes-view{max-width:1400px;margin:0 auto;padding:32px 42px 70px}.classes-title-row{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:20px}.classes-title-row h1{margin:5px 0;font-size:32px;line-height:1.1;letter-spacing:-.7px}.classes-title-row .muted{margin:0;font-size:14px}.classes-level-pill{padding:10px 14px;border:1px solid #ddd9fa;border-radius:12px;background:#fff;color:#757a91;white-space:nowrap}.classes-level-pill b{color:#6557df}.classes-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:18px}.class-stat{min-height:76px;display:flex;align-items:center;gap:14px;padding:14px 18px;border:1px solid #e4e2f2;border-radius:16px;background:#fff;box-shadow:0 8px 24px #3530630a}.class-stat>span{width:40px;height:40px;display:grid;place-items:center;border-radius:50%;font-size:19px}.class-stat small,.class-stat strong{display:block}.class-stat small{color:#8e94aa;margin-bottom:3px}.class-stat strong{font-size:26px;color:#253158}.stat-purple>span{background:#efedff;color:#6656dc}.stat-blue>span{background:#eaf4ff;color:#4b8eea}.stat-green>span{background:#e7f8ee;color:#38a466}.class-config-panel,.classes-list-panel{padding:20px 24px;border-radius:18px;margin-bottom:18px}.section-heading h2{margin:5px 0 3px;font-size:21px}.section-heading .muted{margin:0;font-size:13px}.class-form{display:grid;grid-template-columns:1.1fr 1fr .7fr 1.4fr auto;align-items:end;gap:12px;margin-top:18px}.class-form label span{display:block;margin-bottom:6px;color:#737a91;font-size:12px;font-weight:800}.class-form select,.class-form input,.class-filters select,.class-filters input{width:100%;height:42px;box-sizing:border-box;border:1px solid #e2e0ef;border-radius:11px;padding:0 12px;background:#fff;color:#414963;font:inherit;outline:0}.class-form select:focus,.class-form input:focus,.class-filters select:focus,.class-filters input:focus{border-color:#7162e5;box-shadow:0 0 0 3px #7162e51c}.class-form .primary-button{height:42px;white-space:nowrap;padding:0 17px}.form-help{margin:10px 0 0;color:#959aae;font-size:12px}.form-help b{color:#6557df}.list-heading{align-items:center;margin-bottom:18px}.class-filters{display:flex;gap:10px;min-width:390px}.class-filters select{width:160px}.class-filters input{width:220px}.class-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.class-group{padding:15px 16px;border:1px solid #e8e5f4;border-radius:15px;background:#fff}.class-group.level-primary{border-top:3px solid #7365e8}.class-group.level-middle{border-top:3px solid #4b9be8}.class-group.level-high{border-top:3px solid #e89843}.class-group-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.class-group-head>div{display:flex;align-items:center;gap:10px}.grade-badge{padding:7px 10px;border-radius:9px;background:#efedff;color:#6557df;font-weight:900}.level-middle .grade-badge{background:#eaf4ff;color:#3988d9}.level-high .grade-badge{background:#fff2df;color:#cf7c1f}.class-group-head b{font-size:12px;color:#757c91}.class-group-head small{color:#a0a5b5}.class-chip-list{display:flex;flex-wrap:wrap;gap:8px}.class-chip{display:flex;align-items:center;gap:8px;padding:8px 9px 8px 11px;border-radius:10px;background:#f6f5fb;color:#30395c;font-weight:800}.class-chip button{width:22px;height:22px;border:0;border-radius:6px;background:transparent;color:#8b83e4;cursor:pointer}.class-chip button:hover{background:#e9e6ff}.class-chip button[data-delete]{color:#e17676}.empty-state{text-align:center;padding:34px;color:#999fb1;border:1px dashed #ddd9ee;border-radius:13px}.classes-page .eyebrow{margin:0;color:#6557df;font-size:11px;font-weight:900;letter-spacing:1.3px}
@media(max-width:1000px){.classes-view{padding:26px 24px}.class-form{grid-template-columns:repeat(3,1fr)}.class-form .primary-button{width:100%}.class-groups{grid-template-columns:1fr}}
@media(max-width:700px){.classes-view{padding:22px 15px}.classes-title-row{display:block}.classes-level-pill{display:inline-block;margin-top:14px}.classes-stats{grid-template-columns:1fr}.class-form{grid-template-columns:1fr}.class-filters{display:grid;grid-template-columns:1fr;min-width:0}.class-filters select,.class-filters input{width:100%}}
.classes-page .class-chip{align-items:flex-start;justify-content:space-between;width:100%;box-sizing:border-box;padding:10px 10px 10px 12px}.classes-page .class-chip-main{min-width:0}.classes-page .class-chip-main>strong{display:block;font-size:14px}.classes-page .class-teacher-list{display:grid;gap:3px;margin-top:5px;color:#7b8197;font-size:11px;font-weight:500}.classes-page .class-teacher-list span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.classes-page .class-teacher-list .unassigned{color:#a4a8b7;font-style:italic}.classes-page .class-chip-actions{display:flex;gap:3px;flex:0 0 auto}.classes-page .class-chip button{width:22px;height:22px;padding:0}
.classes-page .class-chip-actions{display:none}
.weekly-period-heading{display:flex;align-items:center;justify-content:space-between;margin-top:18px;margin-bottom:8px;padding-top:14px;border-top:1px solid #eeeef6}.weekly-period-heading b,.weekly-period-heading small{display:block}.weekly-period-heading b{font-size:13px;color:#30395b}.weekly-period-heading small{margin-top:3px;color:#9298aa;font-size:10px}.weekly-period-heading>span{padding:7px 10px;border-radius:9px;background:#efedff;color:#6557df;font-size:11px;font-weight:900}.weekly-period-table-wrap{overflow-x:auto}.weekly-period-table{width:100%;min-width:620px;border-collapse:separate;border-spacing:5px}.weekly-period-table th{padding:7px 8px;color:#737a91;background:#f7f7fc;font-size:10px;text-align:center;border-radius:7px}.weekly-period-table tbody th{text-align:left;color:#6557df;background:#efedff}.weekly-period-table td{padding:0}.session-period{width:100%;height:34px;box-sizing:border-box;border:1px solid #e3e1ef;border-radius:8px;background:#fff;color:#30395b;text-align:center;font:800 12px Nunito;outline:0}.session-period:focus{border-color:#7164e5;box-shadow:0 0 0 3px #7164e51c}
.timetable-page{background:#f7f8ff;color:#202b50;font-family:'Nunito',sans-serif;font-size:14px}.timetable-page .shared-module-main{background:linear-gradient(145deg,#f7f8ff,#fff9fb)}.timetable-view{max-width:1400px;margin:0 auto;padding:32px 42px 70px}.timetable-title-row{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:20px}.timetable-title-row h1{margin:5px 0;font-size:32px;line-height:1.1;letter-spacing:-.7px}.timetable-title-row .muted{margin:0}.workflow-steps{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:18px}.workflow-step{display:grid;grid-template-columns:32px 1fr;column-gap:10px;align-items:center;padding:11px 13px;border:1px solid #e5e2f3;border-radius:13px;background:#fff}.workflow-step b{grid-row:span 2;width:30px;height:30px;display:grid;place-items:center;border-radius:50%;background:#efedff;color:#6557df}.workflow-step span{font-weight:900;color:#30395b;font-size:12px}.workflow-step small{color:#999eb0;font-size:10px}.workflow-step.active{border-color:#c9c2ff;box-shadow:0 6px 16px #6555d512}.workflow-step.active b{background:#6557df;color:#fff}.timetable-grid{display:grid;grid-template-columns:1fr 1.25fr;gap:16px}.timetable-data-card,.timetable-rules-card,.timetable-analysis-card,.timetable-result-card{padding:20px 22px;border-radius:17px;margin-bottom:16px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.section-heading h2{margin:5px 0;font-size:20px}.readiness-badge{padding:7px 10px;border-radius:20px;background:#fff2df;color:#c78125;font-size:11px;font-weight:900;white-space:nowrap}.readiness-badge.ready{background:#e8f8ef;color:#32935b}.data-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:18px}.data-summary div{padding:12px 8px;border-radius:11px;background:#f8f8fd;text-align:center}.data-summary b,.data-summary span{display:block}.data-summary b{font-size:23px;color:#29345a}.data-summary span{margin-top:3px;color:#9298aa;font-size:10px}.rule-form{display:grid;grid-template-columns:repeat(3,1fr);gap:11px;margin-top:17px}.rule-form label>span{display:block;margin-bottom:6px;color:#747b91;font-size:11px;font-weight:800}.rule-form select,.rule-form input{width:100%;height:38px;box-sizing:border-box;border:1px solid #e2e0ef;border-radius:10px;padding:0 10px;background:#fff;color:#414963;font:inherit}.check-rule{display:flex;align-items:center;gap:7px;padding:7px 8px;border-radius:9px;background:#fafaff}.check-rule input{width:15px;height:15px;accent-color:#6656df}.check-rule span{margin:0!important;font-size:10px!important;font-weight:700!important}.outline-button{height:36px;padding:0 14px;border:1px solid #7164e5;border-radius:10px;background:#fff;color:#6154d8;font:inherit;font-weight:900;cursor:pointer}.analysis-results{display:grid;gap:8px;margin-top:16px}.analysis-empty{color:#9da2b3;font-size:12px}.analysis-item{padding:11px 13px;border-radius:10px;font-size:12px}.analysis-item.warning{background:#fff5e7;color:#b8781f}.analysis-item.success{background:#eaf8ef;color:#328e59}.timetable-result-card{min-height:230px}.result-actions{display:flex;gap:8px}.result-actions select{height:36px;border:1px solid #e2e0ef;border-radius:10px;padding:0 10px;background:#fff;color:#555d76;font:inherit}.result-empty{text-align:center;padding:65px 20px;color:#9da2b3;font-size:12px}.schedule-meta{margin:15px 0 10px;color:#717990;font-size:11px}.schedule-table-wrap{overflow:auto}.schedule-table{width:100%;min-width:720px;border-collapse:separate;border-spacing:0}.schedule-table th,.schedule-table td{padding:10px;border:1px solid #eeecf5;text-align:center}.schedule-table thead th{background:#f4f3ff;color:#6557df;font-size:11px}.schedule-table tbody th{background:#fafaff;color:#737a91;font-size:11px;white-space:nowrap}.schedule-table td{background:#fff;color:#30395b;font-size:11px;vertical-align:top;min-width:110px}.schedule-table td b,.schedule-table td small{display:block}.schedule-table td small{margin-top:4px;color:#9298aa;font-size:10px}
@media(max-width:1000px){.timetable-view{padding:26px 24px}.timetable-grid{grid-template-columns:1fr}.workflow-steps{grid-template-columns:repeat(2,1fr)}}@media(max-width:700px){.timetable-view{padding:22px 15px}.timetable-title-row{display:block}.timetable-title-row .primary-button{margin-top:16px}.workflow-steps{grid-template-columns:1fr}.data-summary{grid-template-columns:repeat(2,1fr)}.rule-form{grid-template-columns:1fr}.section-heading{display:block}.result-actions{margin-top:12px;display:flex;flex-wrap:wrap}}
.teacher-page .class-setup-block{margin:12px 0 18px}.teacher-page .class-setup-block:before{margin:0 0 7px 4px}.teacher-page .class-setup-block .class-config{display:block;margin:0;padding:16px 20px;border:1px solid #cfe5f5;border-radius:16px;background:linear-gradient(115deg,#fff,#f8fcff);box-shadow:0 7px 20px rgba(53,88,145,.06)}.teacher-page .class-setup-block .class-config .section-title{display:grid;grid-template-columns:minmax(240px,.8fr) minmax(480px,1.6fr);align-items:center;gap:24px}.teacher-page .class-setup-block .class-config .section-title h2{margin:4px 0;font-size:18px}.teacher-page .class-setup-block .class-config .section-title .muted{font-size:10px}.teacher-page .class-setup-block .class-form{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin:0}.teacher-page .class-setup-block .class-form #class-level,.teacher-page .class-setup-block .class-form #class-grade{grid-column:1/-1;width:100%;min-width:0}.teacher-page .class-setup-block .class-form #class-count{grid-column:1/span 1;width:100%;min-width:0}.teacher-page .class-setup-block .class-form #class-name{grid-column:2/span 4;width:100%;min-width:0}.teacher-page .class-setup-block .class-form #class-save{grid-column:6/span 1;white-space:nowrap;padding:9px 12px}.teacher-page .class-setup-block .template-help{margin:8px 4px 0;font-size:9px}.teacher-page .class-setup-block #class-board{margin-top:10px}
@media(max-width:900px){.teacher-page .class-setup-block .class-config .section-title{grid-template-columns:1fr}.teacher-page .class-setup-block .class-form{grid-template-columns:repeat(2,minmax(0,1fr))}.teacher-page .class-setup-block .class-form #class-level,.teacher-page .class-setup-block .class-form #class-grade{grid-column:1/-1}.teacher-page .class-setup-block .class-form #class-count,.teacher-page .class-setup-block .class-form #class-name,.teacher-page .class-setup-block .class-form #class-save{grid-column:auto}}
.home-page .auth-screen{background:radial-gradient(circle at 10% 15%,#eee9ff 0 16%,transparent 38%),linear-gradient(135deg,#f5f2ff 0%,#fbfbff 48%,#fff3ee 100%);padding:32px}.home-page .auth-card{width:min(1120px,100%);min-height:620px;padding:52px 58px 28px;border:1px solid #ffffff;background:#ffffffef;border-radius:28px;box-shadow:0 28px 90px #6255d926;overflow:hidden}.home-page .auth-card::before{content:'HỆ THỐNG XẾP TKB\A tích hợp AI\A\A Giải pháp thông minh\A cho nhà trường hiện đại\A\A Tối ưu thời khóa biểu – Tiết kiệm thời gian\A Nâng cao hiệu quả quản lý giáo dục';white-space:pre-wrap;position:absolute;inset:0 52% 0 0;padding:70px 55px;background:linear-gradient(145deg,#faf9ff,#eeeaff);color:#1f2b61;font:700 16px/1.7 Manrope}.home-page .auth-card::after{content:'🏫';position:absolute;left:15%;bottom:88px;font-size:150px;filter:drop-shadow(0 18px 18px #6255d933)}.home-page .auth-card>*{position:relative;z-index:1;width:calc(48% - 20px);margin-left:52%;box-sizing:border-box}.home-page .auth-card .auth-logo{margin-bottom:38px}.home-page .auth-card .auth-logo>span{width:52px;height:52px;border-radius:16px;font-size:27px;box-shadow:0 10px 24px #6657dc38}.home-page .auth-card .auth-logo b{font-size:19px;letter-spacing:-.3px}.home-page .auth-card .auth-logo small{font-size:13px}.home-page .auth-card .auth-heading .eyebrow{color:#6558dc;font-size:11px;letter-spacing:1px}.home-page .auth-card .auth-heading h1{font-size:36px;letter-spacing:-1px;margin:10px 0;color:#20264a}.home-page .auth-card .auth-heading>p:last-child{font-size:14px;margin-bottom:29px}.home-page .auth-card .login-form{gap:17px}.home-page .auth-card .login-form label{font-size:13px;gap:8px}.home-page .auth-card .login-form input{height:52px;padding:0 17px;border-radius:13px;background:#fff;font-size:14px;box-sizing:border-box}.home-page .auth-card .password-field input{padding-right:65px}.home-page .auth-card .password-field button{right:15px;top:18px;font-size:12px}.home-page .auth-card .remember,.home-page .auth-card .forgot-link{font-size:12px!important}.home-page .auth-card .login-submit{height:54px;border-radius:13px;font-size:15px;box-shadow:0 13px 25px #6556dc42}.home-page .auth-card .register-switch{font-size:12px;margin-top:22px}.home-page .auth-card .register-switch button{font-size:12px}.home-page .auth-card .auth-footer{font-size:11px;margin-top:28px;padding-top:17px}@media(max-width:800px){.home-page .auth-screen{padding:16px}.home-page .auth-card{min-height:0;padding:34px 28px 24px}.home-page .auth-card::before,.home-page .auth-card::after{display:none}.home-page .auth-card>*{width:100%;margin-left:0}.home-page .auth-card .auth-logo{margin-bottom:28px}.home-page .auth-card .auth-heading h1{font-size:30px}}
.home-page .auth-card{width:min(1000px,calc(100vw - 64px));min-height:0;height:min(690px,calc(100vh - 64px));padding:34px 46px 20px}.home-page .auth-card::before{padding:45px 44px;font-size:14px;line-height:1.55}.home-page .auth-card::after{left:13%;bottom:52px;font-size:118px}.home-page .auth-card .auth-logo{margin-bottom:24px}.home-page .auth-card .auth-logo>span{width:44px;height:44px;font-size:23px}.home-page .auth-card .auth-logo b{font-size:17px}.home-page .auth-card .auth-logo small{font-size:12px}.home-page .auth-card .auth-heading h1{font-size:31px;margin:7px 0}.home-page .auth-card .auth-heading>p:last-child{font-size:12px;margin-bottom:19px}.home-page .auth-card .login-form{gap:11px}.home-page .auth-card .login-form label{font-size:12px;gap:5px}.home-page .auth-card .login-form input{height:43px;font-size:12px}.home-page .auth-card .password-field button{top:14px}.home-page .auth-card .login-submit{height:46px;font-size:13px}.home-page .auth-card .register-switch{margin-top:13px;font-size:11px}.home-page .auth-card .auth-footer{margin-top:16px;padding-top:11px;font-size:10px}@media(max-width:800px){.home-page .auth-card{width:100%;height:auto;min-height:0;padding:28px 24px 20px}}
.home-page .auth-card::after{content:'';position:absolute;left:4%;bottom:10px;width:47%;height:310px;background:url('assets/login-school-illustration.png') center bottom/contain no-repeat;filter:drop-shadow(0 18px 18px #6255d933)}@media(max-width:800px){.home-page .auth-card::after{display:none}}
.home-page .auth-card{width:min(1360px,calc(100vw - 80px));height:min(820px,calc(100vh - 80px));padding:48px 62px 28px;border-radius:30px}.home-page .auth-card::before{inset:0 52% 0 0;padding:72px 64px;background-image:linear-gradient(180deg,#f8f6ffed 0%,#f0edffb8 42%,#e8e3ff30 100%),url('assets/login-school-illustration.png');background-size:cover;background-position:center;z-index:0}.home-page .auth-card::after{display:none}.home-page .auth-card>*{width:calc(46% - 12px);margin-left:53%;z-index:1}.home-page .auth-card .auth-logo{margin-bottom:34px}.home-page .auth-card .auth-heading h1{font-size:38px;margin:10px 0 12px}.home-page .auth-card .auth-heading>p:last-child{font-size:14px;margin-bottom:30px}.home-page .auth-card .login-form{gap:16px}.home-page .auth-card .login-form input{height:55px;font-size:14px}.home-page .auth-card .login-submit{height:56px;font-size:15px}.home-page .auth-card .auth-footer{margin-top:24px}@media(max-width:800px){.home-page .auth-card{width:100%;height:auto;padding:30px 26px 22px}.home-page .auth-card::before{display:none}.home-page .auth-card>*{width:100%;margin-left:0}.home-page .auth-card .auth-heading h1{font-size:30px}}
.forgot-modal{position:fixed;inset:0;z-index:3000;display:grid;place-items:center;padding:20px;background:#29224d55;backdrop-filter:blur(6px)}.forgot-card{position:relative;width:min(420px,100%);padding:32px;border:1px solid #fff;border-radius:22px;background:#fff;box-shadow:0 24px 70px #2e235b30}.forgot-close{position:absolute;right:16px;top:12px;border:0;background:none;color:#9294a5;font-size:25px;cursor:pointer}.forgot-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#eeeaff;color:#6557dc;font-size:24px}.forgot-card h2{margin:17px 0 6px;color:#252b4e;font:800 22px Manrope}.forgot-card>p{margin:0 0 20px;color:#9296aa;font-size:12px;line-height:1.6}.forgot-card form{display:grid;gap:12px}.forgot-card input{height:46px;padding:0 13px;border:1px solid #e2e0ef;border-radius:11px;outline:0;font:inherit;color:#303551}.forgot-card input:focus{border-color:#7264e2;box-shadow:0 0 0 3px #7264e21a}.forgot-card .login-submit{height:46px}.forgot-message{min-height:18px;margin:15px 0 0!important;color:#6557dc!important;font-size:11px!important}

/* Login 16:9 - layout chuẩn ở zoom 100% */
.home-page .auth-screen{padding:24px 32px;background:radial-gradient(circle at 8% 12%,#e9e4ff 0 14%,transparent 34%),linear-gradient(135deg,#f5f2ff 0%,#fbfbff 52%,#fff1ec 100%)}
.home-page .auth-card{width:min(1500px,calc(100vw - 64px));height:min(860px,calc(100vh - 48px));min-height:0;padding:0;border:1px solid #ffffff;border-radius:30px;background:#ffffffee;box-shadow:0 28px 90px #6255d926;overflow:hidden}
.home-page .auth-card::before{content:'HỆ THỐNG XẾP TKB\\A tích hợp AI\\A\\A Giải pháp thông minh\\A cho nhà trường hiện đại\\A\\A Tối ưu thời khoá biểu – Tiết kiệm thời gian\\A Nâng cao hiệu quả quản lý giáo dục';white-space:pre-wrap;position:absolute;inset:0 52% 0 0;z-index:0;padding:72px 76px;color:#192861;font:700 clamp(14px,1.05vw,20px)/1.65 Nunito,sans-serif;letter-spacing:.1px;background:linear-gradient(180deg,#f9f7ffeb 0%,#f1edff9b 48%,#e6ddff20 100%),url('assets/login-school-illustration.png') center bottom/cover no-repeat}
.home-page .auth-card::after{display:none}
.home-page .auth-card>*{position:relative;z-index:1;width:calc(43% - 18px);margin-left:55%;box-sizing:border-box}
.home-page .auth-card .auth-logo{padding-top:62px;margin-bottom:34px}
.home-page .auth-card .auth-logo>span{width:54px;height:54px;border-radius:17px;font-size:28px;box-shadow:0 12px 25px #6657dc38}
.home-page .auth-card .auth-logo b{font-size:20px}.home-page .auth-card .auth-logo small{font-size:14px}
.home-page .auth-card .auth-heading h1{font-size:clamp(30px,2.6vw,42px);margin:10px 0 12px;letter-spacing:-1.2px}.home-page .auth-card .auth-heading>p:last-child{font-size:15px;line-height:1.55;margin-bottom:31px}
.home-page .auth-card .login-form{gap:16px}.home-page .auth-card .login-form label{font-size:13px;gap:8px}.home-page .auth-card .login-form input{height:57px;padding:0 17px;border-radius:14px;font-size:14px}.home-page .auth-card .password-field button{top:18px;right:15px;font-size:12px}.home-page .auth-card .login-submit{height:58px;border-radius:14px;font-size:16px}.home-page .auth-card .remember,.home-page .auth-card .forgot-link{font-size:12px!important}.home-page .auth-card .register-switch{margin-top:23px;font-size:12px}.home-page .auth-card .register-switch button{font-size:12px}.home-page .auth-card .auth-footer{margin-top:28px;padding-top:17px;font-size:11px}
@media(max-width:900px){.home-page .auth-screen{padding:16px}.home-page .auth-card{width:min(620px,100%);height:auto;min-height:0;padding:30px 26px 22px}.home-page .auth-card::before{display:none}.home-page .auth-card>*{width:100%;margin-left:0}.home-page .auth-card .auth-logo{padding-top:0;margin-bottom:28px}.home-page .auth-card .auth-heading h1{font-size:31px}.home-page .auth-card .login-form input{height:50px}.home-page .auth-card .login-submit{height:52px}}

.auth-card::before{font-kerning:normal;text-rendering:geometricPrecision}
.home-page .auth-card::before{background-image:linear-gradient(180deg,#f9f7ffef 0%,#f1edff70 48%,#e6ddff12 100%),url('assets/login-school-illustration-v2.png');background-size:100% auto;background-position:center bottom;background-repeat:no-repeat;background-color:#f0edff}
.home-page .auth-card::before{content:'H\1EC6\0020TH\00D4NG\0020X\1EBEP\0020TKB\A t\00EDch\0020h\1EE3p\0020AI\A\A Gi\1EA3i\0020ph\00E1p\0020th\00F4ng\0020minh\A cho\0020nh\00E0\0020tr\01B0\1EDDng\0020hi\1EC7n\0020\0111\1EA1i\A\A T\1ED1i\0020\01B0u\0020th\1EDDi\0020kho\00E1\0020bi\1EC3u\0020\2013\0020Ti\1EBFt\0020ki\1EC7m\0020th\1EDDi\0020gian\A N\00E2ng\0020cao\0020hi\1EC7u\0020qu\1EA3\0020qu\1EA3n\0020l\00FD\0020gi\00E1o\0020d\1EE5c';font-size:clamp(16px,1.18vw,22px);line-height:1.72;font-weight:800;letter-spacing:.15px;text-shadow:0 1px 0 #ffffffaa}
body.home-page:has(.auth-screen:not(.hidden)){overflow:hidden}
.home-page .auth-card::before{content:'';padding:0;background-image:linear-gradient(180deg,#f9f7ff08 0%,#f1edff18 46%,#e6ddff12 100%),url('assets/login-school-illustration-v2.png');background-size:100% auto;background-position:center bottom;background-repeat:no-repeat;background-color:#f0edff}
.home-page .auth-card>.auth-visual{position:absolute;inset:0 52% 0 0;width:auto;margin:0;padding:70px 68px 0;z-index:2;color:#192861;box-sizing:border-box}
.auth-visual-copy{max-width:600px}.auth-visual-brand{display:grid;grid-template-columns:54px auto;grid-template-rows:auto auto;column-gap:14px;align-items:center}.auth-brand-star{grid-row:span 2;display:grid;place-items:center;width:54px;height:54px;border-radius:17px;background:linear-gradient(135deg,#7468e7,#5547c8);color:#fff;font-size:28px;box-shadow:0 12px 25px #6657dc38}.auth-brand-text{font-size:20px;font-weight:900;line-height:1.1}.auth-brand-ai{color:#6557df;font-size:14px;line-height:1.1}.auth-visual h2{margin:68px 0 20px;font-size:clamp(26px,2.2vw,40px);line-height:1.17;letter-spacing:-1px}.auth-visual h2 em{color:#6955e5;font-style:normal}.auth-visual p{margin:0 0 5px;color:#24315e;font-size:clamp(13px,1vw,17px);font-weight:700}.auth-benefits{display:flex;gap:10px;margin-top:30px}.auth-benefit{display:grid;grid-template-columns:30px 1fr;column-gap:8px;align-items:center;min-width:0;padding:12px;border:1px solid #fff;border-radius:13px;background:#ffffffbf;box-shadow:0 8px 20px #6555dc12}.auth-benefit i{grid-row:span 2;display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#eeeaff;color:#6557df;font-style:normal;font-weight:900}.auth-benefit:nth-child(2) i{background:#e8f9ef;color:#2dac72}.auth-benefit:nth-child(3) i{background:#eaf3ff;color:#4b91e8}.auth-benefit b,.auth-benefit small{display:block;white-space:nowrap}.auth-benefit b{font-size:10px}.auth-benefit small{margin-top:2px;color:#727993;font-size:8px}@media(max-width:900px){.home-page .auth-card>.auth-visual{display:none}}
.home-page .auth-card::before{content:'H\1EC6 TH\00D4NG X\1EBEP TKB\A t\00EDch h\1EE3p AI\A\A Gi\1EA3i ph\00E1p th\00F4ng minh\A cho nh\00E0 tr\01B0\1EDDng hi\1EC7n \0111\1EA1i\A\A T\1ED1i \01B0u th\1EDDi kho\00E1 bi\1EC3u \2013 Ti\1EBFt ki\1EC7m th\1EDDi gian\A N\00E2ng cao hi\1EC7u qu\1EA3 qu\1EA3n l\00FD gi\00E1o d\1EE5c';}
.home-page .auth-screen{min-height:100dvh;overflow:hidden}
.home-page .login-submit{position:relative;z-index:5;cursor:pointer;pointer-events:auto}
.home-user,.user-pill{gap:10px;flex-wrap:wrap}.logout-button{min-height:32px;padding:7px 11px;border-color:#dedbfa;background:#fff;color:#6255d9;font-size:10px!important;font-weight:800;cursor:pointer;white-space:nowrap}.logout-button:hover{border-color:#8a7ff0;background:#f5f3ff;transform:translateY(-1px)}
.home-page .auth-card::before{content:''!important;padding:0!important}

/* Chờ xác thực trước khi hiện nội dung để trang chủ không nháy màn hình đăng nhập. */
.home-page .auth-screen{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .28s ease, visibility 0s linear .28s;
}
.home-page .home-shell{
  opacity:0;
  visibility:hidden;
  transform:translateY(8px);
  transition:opacity .32s ease, transform .32s ease, visibility 0s linear .32s;
}
.home-page.auth-ready .home-shell{
  opacity:1;
  visibility:visible;
  transform:none;
  transition-delay:.04s;
}
.home-page.auth-show-login .auth-screen{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transition-delay:.02s;
}
.home-page.auth-show-login .home-shell{display:none}
.home-page:not(.auth-ready):not(.auth-show-login)::before{
  content:'Đang mở hệ thống…';
  position:fixed;
  inset:0;
  z-index:9999;
  display:grid;
  place-items:center;
  color:#6255d9;
  background:linear-gradient(135deg,#f5f2ff,#fffaf7);
  font:800 14px Nunito,sans-serif;
  letter-spacing:.2px;
}

/* Hiển thị trang chủ ngay khi điều hướng. Kiểm tra phiên chạy nền và chỉ
   chuyển sang màn hình đăng nhập nếu phiên không còn hợp lệ. */
.home-page:not(.auth-show-login) .home-shell{
  opacity:1;
  visibility:visible;
  transform:none;
}
.home-page:not(.auth-show-login)::before{display:none}

/* Trang chủ - bố cục dashboard 16:9 */
.home-page{background:#f5f7ff;color:#172650;font-family:'Nunito',sans-serif}
.home-shell{min-height:100vh;background:linear-gradient(145deg,#f6f8ff 0%,#fffafe 100%)}
.home-sidebar{width:220px;padding:26px 14px;background:linear-gradient(165deg,#253eae 0%,#4c45d3 56%,#725ae9 100%);box-shadow:8px 0 30px #3038a326;z-index:20}
.home-main{width:calc(100% - 220px);margin-left:220px}
.home-brand{height:44px;margin:0 8px 42px;padding:0;font-size:24px;letter-spacing:-.4px}.home-brand span{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:#fff;color:#6658df;font-size:25px;box-shadow:0 8px 18px #151c811f}.home-brand b{color:#fff}
.home-nav{gap:8px}.home-nav a{min-height:45px;padding:0 14px;border-radius:12px;font-size:14px;font-weight:800}.home-nav a.active,.home-nav a:hover{background:#ffffff30;box-shadow:0 8px 18px #1c278c28}.home-nav a:first-letter{font-size:19px}
.home-sidebar .ai-side-card{left:14px;right:14px;bottom:23px;padding:17px 16px;border-radius:16px;background:#ffffff18}.home-sidebar .ai-side-card b{font-size:14px}.home-sidebar .ai-side-card small{margin-top:9px;font-size:11px;line-height:1.55}
.home-topbar{height:70px;padding:0 30px;border-bottom:1px solid #e4e7f2;background:#fffffff0;box-shadow:0 4px 16px #313d7e08;font-size:13px}.home-topbar b{color:#1f2b50}.home-user{gap:11px}.home-user b{font-size:13px}.home-user small{font-size:10px}.user-avatar{width:38px;height:38px;border:3px solid #e6e2ff;background:#f2edff}.notification{font-size:22px}
.home-content{max-width:1600px;padding:30px 42px 44px}
.welcome-row{position:relative;min-height:190px;margin-bottom:18px;padding:28px 28px 24px;border:1px solid #e2e7fa;border-radius:22px;background:linear-gradient(105deg,#f0f3ff 0%,#f7f8ff 43%,#ffffff80 70%),url('assets/login-school-illustration-v2.png') right bottom/58% auto no-repeat;box-shadow:0 10px 26px #2734760c;overflow:hidden}.welcome-row>div:first-child{position:relative;z-index:1}.welcome-row h1{font-size:34px;letter-spacing:-1px;color:#142451}.welcome-row p{margin:9px 0 13px;font-size:14px;color:#65708c}.ai-status{padding:8px 12px;border-radius:10px;font-size:11px;font-weight:800}.welcome-actions{position:absolute;right:26px;top:26px;z-index:2}.welcome-actions .btn{padding:13px 17px;border-radius:11px;font-size:12px;font-weight:900}.btn-primary{background:linear-gradient(135deg,#6e60e8,#5446d1);box-shadow:0 10px 22px #6657df33}
.home-stats{gap:14px;margin-bottom:18px}.home-stats>div{min-height:104px;padding:18px 20px;border:1px solid #e4e6f1;border-radius:17px;box-shadow:0 8px 20px #303c7d0a}.home-stat-icon{width:48px;height:48px;font-size:21px}.home-stats p{font-size:12px}.home-stats strong{font-size:29px;margin:3px 0}.home-stats small{font-size:10px}
.home-module-nav{gap:8px;margin-bottom:16px}.home-module-nav a{padding:10px 15px;border-radius:11px;font-size:11px;font-weight:800;box-shadow:0 5px 13px #303c7d08}.home-module-nav a.active{background:#efedff;border-color:#cfc8ff;color:#5d50d8}
.home-grid{grid-template-columns:minmax(0,1fr) 320px;gap:18px}.card{border-color:#e4e6f1;border-radius:18px;box-shadow:0 10px 25px #303c7d0b}.home-schedule{padding:22px}.section-title h2,.attention-card h2,.activity-card h2{font-size:18px}.section-title p{font-size:11px}.week-tabs button{font-size:11px}.schedule-filters{margin:17px 0 13px}.schedule-filters select,.schedule-filters button{padding:10px 12px;font-size:11px}.week-date{font-size:12px}.home-timetable .timetable{min-width:0;gap:5px}.home-timetable .day-head,.home-timetable .time-head{font-size:10px}.home-timetable .slot{min-height:64px;padding:9px}.slot b{font-size:11px}.slot small{font-size:10px}
.attention-card,.activity-card{padding:21px}.issue-badge{font-size:11px}.attention-item{padding:13px 0}.attention-item strong{font-size:11px}.attention-item small{font-size:10px}.activity-item{padding:13px 0}.activity-item span{font-size:11px}.activity-item small{font-size:10px}.activity-item time{font-size:10px}
.home-user .logout-button{margin-left:4px;border-radius:10px;padding:9px 13px;font-size:11px!important}
@media(max-width:1200px){.home-content{padding:24px 26px 38px}.welcome-row{min-height:180px;background-size:63% auto}.welcome-row h1{font-size:30px}.home-grid{grid-template-columns:minmax(0,1fr) 290px}.home-stats>div{padding:15px}.home-stats strong{font-size:25px}}
@media(max-width:950px){.home-sidebar{width:185px}.home-main{width:calc(100% - 185px);margin-left:185px}.home-content{padding:22px 18px 34px}.home-grid{grid-template-columns:1fr}.home-right{grid-template-columns:1fr 1fr}.welcome-row{background-size:70% auto}.welcome-actions{position:static;margin-top:20px}}
@media(max-width:700px){.home-sidebar{display:none}.home-main{width:100%;margin:0}.home-topbar{height:58px;padding:0 15px}.home-content{padding:16px 12px 28px}.welcome-row{min-height:230px;padding:20px;background-size:105% auto;background-position:center bottom}.welcome-row h1{font-size:25px}.welcome-row p{font-size:12px}.welcome-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:13px}.welcome-actions .btn{padding:10px 12px;font-size:10px}.home-stats{grid-template-columns:repeat(2,1fr);gap:8px}.home-stats>div{min-height:78px;padding:11px 9px}.home-stat-icon{width:35px;height:35px;font-size:16px}.home-stats strong{font-size:20px}.home-module-nav{overflow:auto}.home-module-nav a{white-space:nowrap}.home-right{grid-template-columns:1fr}.home-user .logout-button{padding:7px 9px;font-size:10px!important}.home-user b,.home-user small{display:none}}

/* Trang chủ: ưu tiên nội dung chính, không lặp lại điều hướng cạnh sidebar */
.home-page .welcome-actions,
.home-page .home-module-nav{display:none!important}
.home-page .welcome-row{min-height:166px;padding:25px 30px;margin-bottom:14px;background-size:54% auto}
.home-page .welcome-row h1{font-size:32px}
.home-page .home-stats{gap:12px;margin-bottom:16px}
.home-page .home-stats>div{min-height:82px;padding:12px 16px;border-radius:14px;box-shadow:0 5px 14px #303c7d08}
.home-page .home-stat-icon{width:38px;height:38px;font-size:18px}
.home-page .home-stats p{font-size:11px}
.home-page .home-stats strong{font-size:24px;margin:2px 0}
.home-page .home-stats small{font-size:9px}
.home-page .home-stats>div:nth-child(1){background:#f6f4ff;border-color:#e5e0ff}
.home-page .home-stats>div:nth-child(2){background:#f3f8ff;border-color:#deebfa}
.home-page .home-stats>div:nth-child(3){background:#fff9ef;border-color:#f8e8ca}
.home-page .home-stats>div:nth-child(4){background:#f1fbf6;border-color:#d9f0e3}
.home-page .welcome-row{background-color:#f0f3ff;background-image:url('assets/login-school-illustration-v2.png');background-position:right center;background-size:cover;background-repeat:no-repeat}
.home-page .welcome-row::after{content:"";position:absolute;inset:0;z-index:0;background:linear-gradient(90deg,#f0f3ffff 0%,#f3f6fff5 30%,#f7f8ffd9 48%,#f7f8ff55 70%,transparent 100%);pointer-events:none}
.home-page .welcome-row>div{position:relative;z-index:1}
.home-page .home-user{cursor:pointer}
.profile-modal{position:fixed;inset:0;z-index:2200;display:grid;place-items:center;padding:20px;background:#20234b45;backdrop-filter:blur(6px)}
.profile-card{position:relative;width:min(440px,100%);padding:30px;border:1px solid #fff;border-radius:22px;background:#fff;box-shadow:0 24px 70px #30266d2b}
.profile-card h2{margin:7px 0 5px;color:#20284c;font:800 24px Manrope}.profile-note{margin:0 0 22px;color:#9398aa;font-size:12px}.profile-card label{display:grid;gap:7px;margin-top:14px;color:#4a5070;font-size:12px;font-weight:800}.profile-card input{width:100%;height:42px;padding:0 12px;border:1px solid #e1e0ef;border-radius:10px;background:#fbfbff;color:#343b5b;outline:0}.profile-card input:focus{border-color:#7062e7;box-shadow:0 0 0 3px #7062e71c}.profile-card input:disabled{color:#969bad;background:#f3f3f8}.profile-close{position:absolute;right:16px;top:14px;width:30px;height:30px;border:0;border-radius:8px;background:#f4f2ff;color:#6255d9;font-size:20px;cursor:pointer}.profile-card .login-submit{width:100%;margin-top:18px}.profile-error{min-height:16px;margin:10px 0 0;text-align:center;color:#df6c6c;font-size:11px}
@media(max-width:1200px){.home-page .welcome-row{min-height:155px;background-size:58% auto}.home-page .welcome-row h1{font-size:29px}}
@media(max-width:700px){.home-page .welcome-row{min-height:185px;padding:20px;background-size:90% auto}.home-page .welcome-row h1{font-size:25px}.home-page .home-stats>div{min-height:70px;padding:9px}.home-page .home-stats strong{font-size:20px}}
.custom-rules-panel{margin-top:14px;padding-top:14px;border-top:1px solid #eeeef6}.custom-rules-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.custom-rules-heading b,.custom-rules-heading small{display:block}.custom-rules-heading b{font-size:13px;color:#30395b}.custom-rules-heading small{margin-top:3px;color:#9298aa;font-size:10px}.custom-rules-list{display:grid;gap:7px;margin-top:9px}.custom-rule-row{display:flex;align-items:center;gap:8px;padding:7px 9px;border:1px solid #e6e3f4;border-radius:9px;background:#fbfaff}.custom-rule-row label{display:flex;align-items:center;gap:8px;flex:1}.custom-rule-row label>input[type=checkbox]{width:15px;height:15px;accent-color:#6656df}.custom-rule-text{width:100%;border:0;background:transparent;color:#4a516a;font:inherit;outline:0}.remove-custom-rule{width:26px;height:26px;border:0;border-radius:8px;background:#fff0f2;color:#d56b7c;font-size:17px;cursor:pointer}.weekly-period-table tbody tr:first-child th{background:#efedff;color:#6557df}.weekly-period-table tbody tr:last-child th{background:#fff2e5;color:#c27a2d}.weekly-period-table td[hidden],.weekly-period-table th[hidden]{display:none}
.custom-rule-row{display:grid;grid-template-columns:18px minmax(170px,1.05fr) 82px minmax(180px,1.4fr) 28px;align-items:center;gap:8px}.custom-rule-enabled{width:15px;height:15px;accent-color:#6656df}.custom-rule-type,.custom-rule-value,.custom-rule-text{height:32px;box-sizing:border-box;border:1px solid #e2e0ef;border-radius:8px;padding:0 8px;background:#fff;color:#4a516a;font:inherit;font-size:11px;outline:0}.custom-rule-type:focus,.custom-rule-value:focus,.custom-rule-text:focus{border-color:#7164e5;box-shadow:0 0 0 3px #7164e51c}.custom-rule-text{width:100%}.custom-rules-panel{margin-top:15px;padding:14px 0 0}.weekly-period-table-wrap + .weekly-period-heading{margin-top:10px;border-top:1px solid #eeeef6}.weekly-period-heading{margin-top:15px}.weekly-period-heading>span{min-width:86px;text-align:center}@media(max-width:900px){.custom-rule-row{grid-template-columns:18px 1fr 78px 28px}.custom-rule-text{grid-column:2 / 4}.remove-custom-rule{grid-column:4;grid-row:1}.custom-rule-type{grid-column:2}.custom-rule-value{grid-column:3}}
.period-defaults-group>span{display:block;margin-bottom:6px;color:#747b91;font-size:11px;font-weight:800}.period-defaults-group>div{display:grid;grid-template-columns:1fr 1fr;gap:8px}.period-defaults-group label{display:grid;gap:4px;color:#9298aa;font-size:10px;font-weight:800}.period-defaults-group input{width:100%;height:38px;box-sizing:border-box;border:1px solid #e2e0ef;border-radius:10px;padding:0 10px;background:#fff;color:#414963;font:inherit;text-align:center}
.subjects-page #shared-module-sidebar{width:210px!important;min-width:210px!important;box-sizing:border-box!important}.subjects-page .shared-module-main{width:calc(100% - 210px)!important;margin-left:210px!important}.subjects-page .sidebar-brand{height:auto;box-sizing:border-box}

/* Module Môn học: form thêm môn nằm trước danh sách và không lặp nhãn */
.subjects-page .subjects-view{display:flex;flex-direction:column}
.subjects-page .subjects-title-row{order:0}
.subjects-page .add-subject-panel{order:1;margin:0 0 18px}
.subjects-page .subjects-layout{order:2}
.subjects-page .subjects-stats{display:none!important}
.subjects-page .add-subject-panel .section-kicker{display:none}
.subjects-page .add-subject-panel .compact-heading h2{margin-left:0}

/* Sidebar đồng nhất với Giáo viên, Lớp học và Xếp thời khoá biểu */
.subjects-page #shared-module-sidebar{padding:25px 14px!important}
.subjects-page #shared-module-sidebar .sidebar-brand{display:flex;align-items:center;gap:10px;margin:0 0 45px;padding:0 12px;color:#fff;font:800 23px/1.2 Manrope,sans-serif}
.subjects-page #shared-module-sidebar .sidebar-brand .brand-mark{font-size:28px;line-height:1}
.subjects-page #shared-module-sidebar .sidebar-nav{display:grid;gap:9px}
.subjects-page #shared-module-sidebar .sidebar-nav a{display:flex;align-items:center;gap:13px;min-height:43px;box-sizing:border-box;padding:13px 14px;border-radius:12px;color:#e4e5ff;text-decoration:none;font-size:13px}
.subjects-page #shared-module-sidebar .sidebar-nav a.active,.subjects-page #shared-module-sidebar .sidebar-nav a:hover{color:#fff;background:#ffffff2b;box-shadow:0 5px 15px #162c8a26}
.subjects-page #shared-module-sidebar .sidebar-assistant{position:absolute;left:16px;right:16px;bottom:23px;margin:0;padding:16px;border:1px solid #ffffff77;border-radius:14px;background:#ffffff16;color:#fff}
.subjects-page #shared-module-sidebar .sidebar-assistant strong,.subjects-page #shared-module-sidebar .sidebar-assistant span{display:block}
.subjects-page #shared-module-sidebar .sidebar-assistant strong{font-size:12px}
.subjects-page #shared-module-sidebar .sidebar-assistant span{margin-top:8px;color:#e3e4ff;font-size:10px;line-height:1.5}

/* Thông tin người dùng trên module dùng cùng ngôn ngữ thị giác với trang chủ */
.teacher-topbar .user-pill,
.subjects-page .module-topbar .profile-mini{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:38px;
  flex-wrap:nowrap;
  white-space:nowrap;
  color:#3d405a;
  margin-left:auto;
  cursor:pointer;
  user-select:none;
}
.teacher-topbar .user-pill .user-avatar,
.subjects-page .module-topbar .profile-mini .user-avatar{
  display:grid;
  place-items:center;
  flex:0 0 34px;
  width:34px;
  height:34px;
  border:3px solid #e6e2ff;
  border-radius:50%;
  background:#f2edff;
  font-size:16px;
  box-sizing:border-box;
}
.teacher-topbar .module-user-copy,
.subjects-page .module-topbar .profile-mini strong{
  display:block;
  min-width:112px;
}
.teacher-topbar .profile-role-icon{
  color:#7d8198;
  font-size:13px;
  line-height:1;
}
.teacher-topbar .profile-chevron,
.subjects-page .module-topbar .profile-mini > :last-child{
  color:#747995;
  font-size:14px;
  line-height:1;
}
.teacher-topbar .user-pill .logout-button,
.subjects-page .module-topbar .profile-mini .logout-button{
  margin-left:8px;
  min-height:38px;
  padding:0 16px;
  border-radius:10px;
  font-size:11px!important;
  white-space:nowrap;
}
.shared-user .user-avatar{
  display:grid;
  place-items:center;
  flex:0 0 34px;
  width:34px;
  height:34px;
  border:3px solid #e6e2ff;
  border-radius:50%;
  background:#f2edff;
  font-size:16px;
}
.shared-user b,
.shared-user strong{
  display:block;
  color:#252b4e;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}
.shared-user b small,
.shared-user strong small{
  display:block;
  margin-top:2px;
  color:#999aaa;
  font-size:9px;
  font-weight:400;
}
.shared-user .logout-button{
  margin-left:8px;
  min-height:34px;
  padding:8px 13px;
  border-radius:10px;
  font-size:10px!important;
}
.teacher-topbar .user-pill,
.subjects-page .module-topbar .profile-mini,
.home-topbar .home-user{
  flex-wrap:nowrap!important;
  white-space:nowrap;
}
.subjects-page .module-topbar .profile-mini .user-avatar{order:-2}

/* Lưới quy tắc xếp lịch: các ô có cùng kích thước và luôn thẳng cột ở zoom 100%. */
.timetable-rules-card .rule-form{grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}
.timetable-rules-card .rule-form>label{min-width:0}
.weekly-period-table{width:100%;table-layout:fixed;border-spacing:5px}
.weekly-period-table th,.weekly-period-table td{width:14.2857%;box-sizing:border-box}
.weekly-period-table th{height:30px;padding:6px 4px;white-space:nowrap}
.weekly-period-table td{height:40px}
.weekly-period-table .session-period{width:100%;height:36px;box-sizing:border-box;padding:0 6px}
.custom-rule-row{grid-template-columns:32px repeat(3,minmax(0,1fr)) 32px}
.custom-rule-row>*{min-width:0}
.custom-rule-enabled,.remove-custom-rule{justify-self:center}
@media(max-width:900px){.custom-rule-row{grid-template-columns:28px repeat(3,minmax(0,1fr)) 28px}}
.timetable-rules-card .section-heading{align-items:center}
.timetable-rules-card .save-condition-button{height:36px;min-width:148px;padding:0 14px;white-space:nowrap;font-size:11px}
.timetable-rules-card .period-defaults-group{min-width:0;width:100%;box-sizing:border-box}
.timetable-rules-card .period-defaults-group>div{width:100%;grid-template-columns:repeat(2,minmax(0,1fr))}
.timetable-rules-card .period-defaults-group input{width:100%;box-sizing:border-box}
.timetable-rules-card .rule-form>label:not(.check-rule){min-height:72px;display:grid;grid-template-rows:26px 1fr;align-content:start}
.timetable-rules-card .rule-form>label:not(.check-rule)>span{display:flex;align-items:flex-start;min-height:26px;margin-bottom:0}
.timetable-rules-card .rule-form>label:not(.check-rule)>select,
.timetable-rules-card .rule-form>label:not(.check-rule)>input{align-self:end}
.timetable-rules-card .period-defaults-group{display:grid;grid-template-rows:26px 1fr;align-content:start}
.timetable-rules-card .period-defaults-group>span{display:flex;align-items:flex-start;min-height:26px;margin-bottom:0}
.timetable-rules-card .period-defaults-group>div{align-self:end}
@media(max-width:700px){.timetable-rules-card .section-heading{display:flex;flex-wrap:wrap;gap:10px}.timetable-rules-card .save-condition-button{margin-left:auto}}

/* Khu vực tài khoản dùng chung trên toàn bộ hệ thống */
.account-area{display:flex!important;align-items:center;gap:9px;min-height:40px;flex-wrap:nowrap!important;white-space:nowrap;color:#343a59;cursor:pointer;user-select:none}
.account-avatar{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;border:3px solid #e7e3ff;border-radius:50%;background:#f2efff;font-size:16px;box-sizing:border-box}
.account-copy{display:flex;flex-direction:column;justify-content:center;min-width:112px;line-height:1.15}
.account-name{display:block;color:#252b4e;font-size:12px;font-weight:800}
.account-school{display:block;margin-top:3px;color:#999aaa;font-size:9px;font-weight:400}
.account-chevron{color:#747995;font-size:13px;line-height:1}
.account-area .logout-button{margin-left:8px;min-height:36px;padding:0 14px;border:1px solid #dedbfa;border-radius:10px;background:#fff;color:#6255d9;font-size:10px!important;font-weight:800;white-space:nowrap;cursor:pointer}
.account-area .logout-button:hover{border-color:#8a7ff0;background:#f5f3ff}
.home-sidebar{width:210px}.home-main{width:calc(100% - 210px);margin-left:210px}
.home-topbar .account-area{gap:9px}.home-topbar .account-copy{min-width:112px}
.settings-view{max-width:1500px;padding:30px 34px 48px}
.settings-title-row{margin-bottom:22px}.settings-title-row h1{margin:0;font:800 32px Manrope;color:#20284c;letter-spacing:-.7px}.settings-title-row p.muted{margin:7px 0 0;color:#8e94aa;font-size:13px}
.settings-grid{display:grid;grid-template-columns:minmax(280px,.8fr) minmax(480px,1.2fr);gap:18px;align-items:start}
.settings-card{padding:22px 24px}.settings-card-heading{display:flex;align-items:center;gap:12px;margin-bottom:20px}.settings-card-heading h2{margin:0 0 5px;color:#273052;font:800 17px Manrope}.settings-card-heading p{margin:0;color:#9499ad;font-size:11px}.settings-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;font-size:19px}.settings-icon.purple{background:#efedff;color:#6354dc}.settings-icon.blue{background:#eaf4ff;color:#4d91e9}
.account-summary{display:flex;align-items:center;gap:12px;padding:14px;border:1px solid #ebeaf5;border-radius:13px;background:#fbfbff}.account-summary .account-avatar{flex-basis:42px;width:42px;height:42px}.account-summary>div{min-width:0;flex:1}.account-summary b,.account-summary small{display:block}.account-summary b{color:#293253;font-size:13px}.account-summary small{margin-top:4px;color:#989daf;font-size:10px;overflow:hidden;text-overflow:ellipsis}.account-summary .outline-button{height:34px;padding:0 12px;font-size:10px}
.settings-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.settings-form-grid label{display:grid;gap:7px;color:#565d78;font-size:11px;font-weight:800}.settings-form-grid input,.settings-form-grid select{width:100%;height:38px;box-sizing:border-box;padding:0 11px;border:1px solid #e2e0ef;border-radius:9px;background:#fff;color:#434a67;font:inherit;font-weight:500;outline:0}.settings-form-grid input:focus,.settings-form-grid select:focus{border-color:#7164e5;box-shadow:0 0 0 3px #7164e51c}.settings-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:20px}.settings-actions span{margin-right:auto;color:#43a86f;font-size:11px}.settings-actions .primary-button{height:38px;padding:0 16px}
@media(max-width:950px){.settings-grid{grid-template-columns:1fr}.settings-view{padding:24px 20px 40px}}
@media(max-width:700px){.account-copy{min-width:0}.account-school{display:none}.account-name{font-size:10px}.account-area .logout-button{padding:0 9px;font-size:9px!important}.settings-view{padding:18px 12px 30px}.settings-title-row h1{font-size:26px}.settings-card{padding:18px 16px}.settings-form-grid{grid-template-columns:1fr}.account-summary .outline-button{padding:0 9px}}
@media(max-width:1050px) and (min-width:701px){.home-sidebar{width:175px}.home-main{width:calc(100% - 175px);margin-left:175px}}
@media(max-width:700px){.home-sidebar{display:none}.home-main{width:100%;margin-left:0}}
@media(min-width:901px){.home-page .auth-card::before{content:'HỆ THỐNG XẾP TKB\A tích hợp AI\A\A Giải pháp thông minh\A cho nhà trường hiện đại\A\A Tối ưu thời khóa biểu - Tiết kiệm thời gian\A Nâng cao hiệu quả quản lý giáo dục' !important;}}

/* Login page: balanced 16:9 layout at 100% zoom. */
.home-page .auth-screen{padding:18px 24px;background:radial-gradient(circle at 6% 10%,#e9e4ff 0 13%,transparent 33%),linear-gradient(135deg,#f4f1ff,#fbfbff 52%,#fff0eb);}
.home-page .auth-card{width:min(1440px,calc(100vw - 48px));height:min(820px,calc(100vh - 36px));border-radius:28px;}
.home-page .auth-card::before{content:'H\\1EC6 TH\\00D4NG X\\1EBEP TKB\\A t\\00EDch h\\1EE3p AI\\A\\A Gi\\1EA3i ph\\00E1p th\\00F4ng minh\\A cho nh\\00E0 tr\\01B0\\1EDDng hi\\1EC7n \0111\\1EA1i\\A\\A T\\1ED1i \01B0u th\\1EDDi kho\\00E1 bi\\1EC3u  \\2013  Ti\\1EBFt ki\\1EC7m th\\1EDDi gian\\A N\\00E2ng cao hi\\1EC7u qu\\1EA3 qu\\1EA3n l\\00FD gi\\00E1o d\\1EE5c';position:absolute;inset:0 52% 0 0;padding:66px 68px;white-space:pre-wrap;color:#18265e;font:800 clamp(16px,1.2vw,22px)/1.65 'Nunito Sans',sans-serif;letter-spacing:.1px;text-shadow:0 1px #fff9;background:linear-gradient(180deg,#f8f6ffcc 0%,#f0edff66 48%,#e8e1ff10 100%),url('assets/login-school-illustration-v2.png') center bottom/100% auto no-repeat;background-color:#f0edff;}
.home-page .auth-card::after{content:'';display:block;position:absolute;left:0;bottom:0;width:52%;height:58%;background:url('assets/login-school-illustration-v2.png') center bottom/100% auto no-repeat;filter:drop-shadow(0 16px 18px #6255d926);pointer-events:none;}
.home-page .auth-card>*{position:relative;z-index:2;width:calc(43% - 18px);margin-left:55%;}
.home-page .auth-card .auth-logo{padding-top:62px;margin-bottom:34px;}
.home-page .auth-card .auth-logo>span{width:54px;height:54px;border-radius:17px;font-size:28px;box-shadow:0 12px 25px #6657dc38;}
.home-page .auth-card .auth-logo b{font-size:20px}.home-page .auth-card .auth-logo small{font-size:14px}
.home-page .auth-card .auth-heading h1{font-size:clamp(30px,2.6vw,42px);margin:10px 0 12px;letter-spacing:-1.2px}.home-page .auth-card .auth-heading>p:last-child{font-size:15px;line-height:1.55;margin-bottom:31px}
.home-page .auth-card .login-form{gap:16px}.home-page .auth-card .login-form label{font-size:13px;gap:8px}.home-page .auth-card .login-form input{height:57px;padding:0 17px;border-radius:14px;font-size:14px}.home-page .auth-card .password-field button{top:18px;right:15px;font-size:12px}.home-page .auth-card .login-submit{height:58px;border-radius:14px;font-size:16px}.home-page .auth-card .register-switch{margin-top:23px;font-size:12px}.home-page .auth-card .auth-footer{margin-top:28px;padding-top:17px;font-size:11px}
@media(max-width:900px){.home-page .auth-screen{padding:14px}.home-page .auth-card{width:min(620px,100%);height:auto;min-height:0;padding:30px 26px 22px}.home-page .auth-card::before,.home-page .auth-card::after{display:none}.home-page .auth-card>*{width:100%;margin-left:0}.home-page .auth-card .auth-logo{padding-top:0;margin-bottom:28px}.home-page .auth-card .auth-heading h1{font-size:31px}.home-page .auth-card .login-form input{height:50px}.home-page .auth-card .login-submit{height:52px}}

/* Stable first paint on narrow screens: keep the login form in one vertical flow. */
@media(max-width:900px){
  .home-page .auth-screen{display:grid!important;place-items:center!important;min-height:100dvh!important;height:auto!important;padding:12px!important;overflow:auto!important}
  .home-page .auth-card{display:block!important;width:min(560px,100%)!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;padding:0!important}
  .home-page .auth-card>*{display:block!important;width:auto!important;min-height:0!important;margin-left:28px!important;margin-right:28px!important;position:relative!important;grid-column:auto!important;grid-row:auto!important}
  .home-page .auth-card>.auth-visual,.home-page .auth-card>.auth-logo{display:none!important}
  .home-page .auth-card .auth-logo{display:none!important;padding-top:0!important;margin-top:28px!important;margin-bottom:22px!important}
  .home-page .auth-card .auth-heading{margin-top:26px!important;margin-bottom:18px!important}
  .home-page .auth-card .auth-heading h1{font-size:clamp(28px,8vw,36px)!important;line-height:1.1!important}
  .home-page .auth-card .login-form{margin-top:0!important;margin-bottom:0!important;gap:12px!important}
  .home-page .auth-card .login-submit{position:relative!important;z-index:5!important;pointer-events:auto!important}
  .home-page .auth-card .register-switch{margin-top:16px!important;margin-bottom:0!important;line-height:1.4!important}
  .home-page .auth-card .auth-footer{margin-top:16px!important;margin-bottom:22px!important;padding-top:14px!important}
}

@media(min-width:901px){.home-page .auth-card::before{content:'H\\1EC6 TH\\00D4NG X\\1EBEP TKB\\A t\\00EDch h\\1EE3p AI\\A\\A Gi\\1EA3i ph\\00E1p th\\00F4ng minh\\A cho nh\\00E0 tr\\01B0\\1EDDng hi\\1EC7n \0111\\1EA1i\\A\\A T\\1ED1i \01B0u th\\1EDDi kho\\00E1 bi\\1EC3u  \\2013  Ti\\1EBFt ki\\1EC7m th\\1EDDi gian\\A N\\00E2ng cao hi\\1EC7u qu\\00E1 qu\\1EA3 qu\\00E1n l\\00FD gi\\00E1o d\\1EE5c' !important;}}
