/* Accessible theme tokens supplement Tailwind, so the layout also works if its CDN is unavailable. */
:root{--bg:#f5f8f8;--surface:#fff;--surface-alt:#f8fafb;--ink:#203c3a;--muted:#82918f;--line:#e5eeeb;--teal:#14786c;--teal-soft:#e5f3ee;--shadow:0 3px 12px #123a3003;--danger:#b7434c;--sidebar:250px;color-scheme:light}
html.dark{--bg:#0b141c;--surface:#13212b;--surface-alt:#182a35;--ink:#e7f0ee;--muted:#9aacaf;--line:#253943;--teal:#79cabc;--teal-soft:#163d39;--shadow:0 3px 12px #0000000a;--danger:#f099a0;color-scheme:dark}
*{box-sizing:border-box}body{margin:0;background:var(--bg)!important;color:var(--ink)!important;font-family:Tajawal,Arial,sans-serif;font-size:15px;line-height:1.55}body h1,body h2,body h3,body p{margin:0}body h1{font-size:30px;line-height:1.45;font-weight:800;letter-spacing:-.65px}body h2{font-size:19px;font-weight:700}body h3{font-size:17px;font-weight:700}button,input,select,textarea{font:inherit}button,a{touch-action:manipulation;transition:background .18s,color .18s,transform .18s,box-shadow .18s}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #6bbbac;outline-offset:4px}input:focus,select:focus,textarea:focus{outline:2px solid #7cbcad;outline-offset:1px}a{color:inherit;text-decoration:none}button{border:0}button:not(:disabled):hover{filter:brightness(.98)}[hidden]{display:none!important}.icon{width:20px;height:20px;flex-shrink:0}.skip-link{position:fixed;z-index:300;top:-70px;right:20px;background:var(--surface);padding:15px}.skip-link:focus{top:10px}
.sidebar{width:var(--sidebar);position:fixed;right:0;top:0;bottom:0;background:var(--surface)!important;border-left:1px solid var(--line);z-index:40;padding:30px 20px 18px;display:flex;flex-direction:column;overflow:auto;transition:width .2s}.brand{display:flex;gap:12px;align-items:center;padding:0 4px;margin-bottom:35px;white-space:nowrap}.brand img{width:52px;height:58px;object-fit:contain}.brand strong{font-size:20px;font-weight:800;display:block}.brand small{color:var(--muted);font-size:12px}.nav-label{color:var(--muted);font-size:11px;margin:7px 12px 14px}.nav-link{width:100%;display:flex;gap:12px;align-items:center;position:relative;background:transparent;color:var(--muted);padding:13px 14px;border-radius:12px;margin:4px 0;text-align:right;font-size:14px;white-space:nowrap}.nav-link.active{background:var(--teal-soft);color:var(--teal);font-weight:700}.nav-link.active:after{content:'';width:5px;height:5px;border-radius:99px;background:currentColor;margin-right:auto}.sidebar-bottom{margin-top:auto;padding-top:30px}.sidebar-note{padding:18px 14px;border-radius:15px;background:linear-gradient(140deg,var(--teal-soft),var(--surface));font-size:12px;margin-bottom:14px}.sidebar-note span{font-size:23px;color:var(--teal);display:block;margin-bottom:8px}.sidebar-note strong{font-size:13px}.sidebar-note p{color:var(--muted);margin-top:5px}.shell{margin-right:var(--sidebar);transition:margin .2s}.topbar{height:87px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line);padding:0 38px;background:var(--surface)!important;position:sticky;top:0;z-index:25}.header-path,.header-actions{display:flex;align-items:center;gap:16px}.breadcrumbs{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:10px;flex-wrap:wrap}.breadcrumbs b{color:var(--ink);font-weight:600}.breadcrumbs button{background:none;color:var(--muted);padding:0}.header-actions{gap:9px}.header-divider{height:27px;width:1px;background:var(--line);margin:0 6px}.icon-button{width:38px;height:38px;border-radius:11px;background:transparent;color:var(--muted);display:inline-grid;place-items:center;font-size:23px}.icon-button:hover{background:var(--surface-alt)}.notification-button{position:relative}.notification-count{position:absolute;top:0;right:0;border:2px solid var(--surface);min-width:17px;height:17px;border-radius:99px;background:#cf9450;color:white;line-height:13px;font-size:9px}.profile-button{background:transparent;display:flex;align-items:center;gap:10px;text-align:right;color:var(--ink)}.avatar{height:40px;width:40px;border-radius:14px;background:var(--teal-soft);display:inline-grid;place-items:center;color:var(--teal);font-size:21px;font-weight:700}.profile-copy strong,.profile-copy small{display:block}.profile-copy strong{font-size:12px}.profile-copy small{font-size:10px;color:var(--muted)}.mobile-menu{display:none}main{max-width:1510px;margin:auto;padding:35px 38px 75px;min-height:calc(100vh - 150px)}.page-footer{padding:0 38px 105px;font-size:11px;color:var(--muted)}.page-footer span{margin:0 9px}.view{animation:reveal .25s ease}@keyframes reveal{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:28px}.heading p{margin-top:7px}.muted{color:var(--muted);font-size:13px;line-height:1.8}.eyebrow{font-size:11px;color:var(--teal);letter-spacing:1px;margin-bottom:7px!important}.actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.btn{border-radius:10px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:13px;font-weight:700;padding:11px 17px;min-height:41px;background:#17776b;color:white;white-space:nowrap}.btn:hover:not(:disabled){transform:translateY(-1px)}.btn.secondary{background:var(--teal-soft);color:var(--teal)}.btn.outline{border:1px solid var(--line);background:var(--surface);color:var(--ink)}.btn.danger{background:#b74950;color:white}.btn.small{padding:7px 11px;min-height:33px;font-size:12px}.text-btn{background:none;color:var(--teal);font-size:12px;display:inline-flex;align-items:center;gap:6px;padding:6px 0}.text-btn.danger{color:var(--danger)}.card{border:1px solid var(--line);border-radius:20px;background:var(--surface)!important;padding:24px;box-shadow:var(--shadow)}.card+.card.stack{margin-top:22px}.grid3,.grid2,.grid4{display:grid;gap:20px}.grid3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid4{grid-template-columns:repeat(4,minmax(0,1fr))}.dashboard-lower{display:grid;grid-template-columns:1.45fr 1fr;gap:23px;margin-top:25px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:29px 0 16px}.section-heading h2 small{color:var(--muted);font-size:12px;font-weight:400;margin-right:6px}.stat{display:flex;align-items:center;gap:16px}.stat-icon{width:49px;height:49px;border-radius:15px;display:grid;place-items:center;background:var(--teal-soft);color:var(--teal)}.stat small{font-size:12px;color:var(--muted)}.stat strong{display:block;font-size:27px;font-weight:800;line-height:1.5}.stat .trend{margin-right:auto;font-size:11px;color:var(--teal);background:var(--teal-soft);padding:4px 7px;border-radius:7px}.welcome-banner{border:1px solid var(--line);background:linear-gradient(110deg,#f8f2e5,#edf5f3 55%,#e7f1f1);border-radius:20px;margin-bottom:26px;padding:23px 29px;display:flex;align-items:center;justify-content:space-between;gap:20px;position:relative;overflow:hidden;color:#3a635a}.welcome-banner .banner-art{font-size:55px;font-family:Georgia,serif;color:#93b2a1}.welcome-banner h2{font-size:21px}.welcome-banner p{font-size:12px;margin-top:4px;color:#788e85}.dark .welcome-banner{background:linear-gradient(110deg,#343225,#163d36 65%,#17323b);color:#c0dbd0}.dark .welcome-banner p{color:#a6bbae}.holiday{background:linear-gradient(110deg,#edf4fa,#fff4d9);border:1px solid #ede7d4;border-radius:18px;padding:21px;margin-bottom:25px;text-align:center;color:#827041;display:flex;gap:20px;justify-content:center;align-items:center}.holiday strong{font-size:20px}.holiday p{font-size:12px;margin-top:5px}.holiday .moon{font-size:45px;color:#b49b60}.dark .holiday{background:linear-gradient(110deg,#1e3546,#3f3721);border-color:#514a35;color:#e1d3a5}.course{padding:0;overflow:hidden;transition:transform .2s,box-shadow .2s}.course:hover{transform:translateY(-4px);box-shadow:0 14px 35px #153c3310}.course-cover{height:122px;display:flex;align-items:center;justify-content:space-between;padding:22px 25px;background:#e0eee8;color:#678d7d;position:relative;overflow:hidden}.course-cover:after{content:'';position:absolute;left:-20px;top:-30px;width:180px;height:180px;border:1px solid #ffffff70;border-radius:50%;box-shadow:0 0 0 20px #ffffff20,0 0 0 40px #ffffff20}.course-cover .icon{width:47px;height:47px;stroke-width:1.15;z-index:1}.course-cover.blue{background:#e4edf4;color:#708ca4}.course-cover.sand{background:#f1e9db;color:#a89470}.dark .course-cover{background:#1a4438;color:#a7cbba}.dark .course-cover.blue{background:#263e50;color:#a1bdcf}.dark .course-cover.sand{background:#443c2c;color:#d1bb8f}.course-cover .pill{background:#ffffff88;color:inherit;z-index:1}.dark .course-cover .pill{background:#ffffff12}.course-body{padding:22px}.course-body h3{font-size:20px}.teacher-line{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:12px;margin:10px 0 20px}.small-avatar{display:inline-grid;place-items:center;width:25px;height:25px;background:var(--surface-alt);border-radius:50%;color:var(--teal)}.progress{height:5px;background:var(--surface-alt);border-radius:6px;overflow:hidden;margin:8px 0 18px}.progress span{height:100%;display:block;background:#74a98e;border-radius:6px}.progress-caption{display:flex;justify-content:space-between;font-size:10px;color:var(--muted)}.course-open{width:100%;justify-content:space-between;background:var(--teal-soft);color:var(--teal);font-size:12px}.pill{display:inline-flex;align-items:center;gap:5px;border-radius:7px;padding:4px 8px;background:var(--teal-soft);color:var(--teal);font-size:10px;line-height:1.7;white-space:nowrap}.pill.warning{background:#f9eed7;color:#967629}.pill.gray{background:var(--surface-alt);color:var(--muted)}.pill.danger{background:#fbe8e9;color:#ad4a51}.dark .pill.warning{background:#413923;color:#dfc47e}.dark .pill.danger{background:#44242c;color:#efadb0}.team-top{display:flex;align-items:center;gap:12px}.team-number{width:43px;height:43px;display:grid;place-items:center;background:var(--teal-soft);color:var(--teal);border-radius:13px;font-size:20px;font-weight:700}.team-meta{display:flex;gap:13px;justify-content:space-between;margin-top:19px;border-top:1px solid var(--line);padding-top:15px;font-size:11px;color:var(--muted)}.team-meta b{color:var(--ink);font-weight:600}.list-row{display:flex;gap:13px;padding:16px 0;align-items:center;border-bottom:1px solid var(--line)}.list-row:last-child{border:0;padding-bottom:0}.list-row h3{font-size:13px}.list-row p{font-size:11px;color:var(--muted);margin-top:4px}.list-row .actions{margin-right:auto}.date-box{width:44px;height:48px;border-radius:11px;flex-shrink:0;background:var(--surface-alt);text-align:center;padding:5px;color:var(--teal);font-size:10px}.date-box b{display:block;font-size:18px;line-height:1.4}.empty{padding:35px 20px;text-align:center;color:var(--muted);font-size:13px}.empty-icon{display:block;width:49px;height:49px;margin:0 auto 13px;border-radius:16px;background:var(--surface-alt);color:var(--teal);font-size:29px;line-height:49px}.empty strong{color:var(--ink);display:block;font-size:14px;margin-bottom:5px}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:15px}table{width:100%;border-collapse:collapse;text-align:right;font-size:12px;white-space:nowrap}th{background:var(--surface-alt);color:var(--muted);font-weight:500;padding:14px 15px}td{padding:14px 15px;border-bottom:1px solid var(--line)}tr:last-child td{border-bottom:0}td .muted{font-size:10px}.status-group{display:flex;gap:5px}.status-button{border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--muted);padding:7px 9px;font-size:11px;white-space:nowrap}.status-button[aria-checked=true].present{background:#e3f4e9;border-color:#b8dfc7;color:#2b8552}.status-button[aria-checked=true].late{background:#fff0db;border-color:#eed2a8;color:#b57621}.status-button[aria-checked=true].absent{background:#fce6e7;border-color:#edc1c4;color:#bb4d56}.status-button[aria-checked=true].excused{background:#e9edf1;border-color:#cbd3da;color:#687582}.dark .status-button[aria-checked=true].present{background:#153d2f;color:#97d0ac;border-color:#2f6248}.dark .status-button[aria-checked=true].late{background:#43321a;color:#dfbb79;border-color:#5b482c}.dark .status-button[aria-checked=true].absent{background:#42232d;color:#eca4af;border-color:#5d323e}.dark .status-button[aria-checked=true].excused{background:#303c45;color:#c4d0d5;border-color:#455864}.toolbar{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:18px 0}.toolbar .field{margin:0;flex:1;min-width:140px}.field{display:flex;flex-direction:column;gap:7px;font-size:12px;margin:15px 0;color:var(--ink)}.field small{color:var(--muted);font-size:11px}input,select,textarea{background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:11px;color:var(--ink);width:100%;max-width:100%;min-width:0}input[type=checkbox]{width:16px;accent-color:var(--teal)}input[type=file]{font-size:11px;padding:9px}textarea{min-height:105px;resize:vertical}select{padding-left:27px}.tabs{display:flex;gap:21px;border-bottom:1px solid var(--line);overflow:auto;margin:5px 0 20px}.tab{padding:12px 2px;background:none;color:var(--muted);font-size:13px;white-space:nowrap;border-bottom:2px solid transparent}.tab.active{border-color:var(--teal);color:var(--teal);font-weight:700}.week{border:1px solid var(--line);border-radius:15px;background:var(--surface);margin:12px 0;overflow:hidden}.week summary{padding:18px 21px;display:flex;align-items:center;gap:16px;cursor:pointer;list-style:none}.week summary::-webkit-details-marker{display:none}.week summary:after{content:'⌄';margin-right:auto;color:var(--muted);font-size:19px}.week[open] summary:after{transform:rotate(180deg)}.week[open] summary{border-bottom:1px solid var(--line)}.week-number{width:41px;height:41px;flex-shrink:0;display:grid;place-items:center;background:var(--surface-alt);color:var(--teal);border-radius:12px;font-size:15px;font-weight:700}.week summary h3{font-size:14px}.week summary p{font-size:10px;color:var(--muted);margin-top:3px}.week-body{padding:22px}.week-body .source-note{font-size:11px;color:var(--muted);line-height:1.8;padding:12px 14px;border-radius:9px;background:var(--surface-alt);margin:12px 0}.attachment{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid var(--line);border-radius:10px;font-size:12px;margin:9px 0}.attachment .icon{color:var(--teal)}.attachment .file-name{flex:1;overflow-wrap:anywhere}.assignment-box{background:var(--surface-alt);border:1px solid var(--line);border-radius:13px;padding:18px;margin-top:17px}.drop-zone{display:block;text-align:center;border:1px dashed #a8c5b9;border-radius:11px;padding:22px;font-size:12px;color:var(--muted);margin:15px 0}.drop-zone.drag-over{background:var(--teal-soft);border-color:var(--teal)}.drop-zone input{border:0;background:transparent;margin-top:11px;max-width:310px}.info-banner{padding:14px 18px;background:var(--teal-soft);border:1px solid var(--line);border-radius:12px;color:var(--teal);font-size:12px;line-height:1.85;margin:15px 0}.notice-warning{background:#fff6df;color:#8f762e}.dark .notice-warning{background:#3c3520;color:#d8c184}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line);border-radius:14px;overflow:hidden}.calendar-day{min-height:92px;background:var(--surface);padding:9px;font-size:11px}.calendar-day.empty-day{background:var(--surface-alt)}.calendar-day.today{background:var(--teal-soft)}.calendar-day strong{display:inline-block;width:24px;height:24px;line-height:24px;text-align:center;font-size:12px}.calendar-day.today strong{background:#17776b;color:white;border-radius:50%}.calendar-weekday{text-align:center;font-size:11px;padding:12px 0;background:var(--surface-alt);color:var(--muted)}.calendar-event{display:block;background:var(--teal-soft);color:var(--teal);font-size:10px;border-radius:5px;padding:4px 6px;margin-top:4px;overflow-wrap:anywhere}.notification-card{border:1px solid var(--line);border-radius:14px;padding:18px;margin:13px 0;background:var(--surface)}.notification-card.unread{border-right:3px solid var(--teal)}.notification-card p{white-space:pre-wrap;font-size:13px;line-height:1.9;color:var(--muted);margin:9px 0}.note-card{border-right:3px solid #c4b383;border-radius:13px;background:var(--surface-alt);padding:19px;margin:13px 0}.note-card p{margin:10px 0;font-size:13px;white-space:pre-wrap;line-height:1.8}.inline-grade{display:flex;align-items:center;gap:8px}.inline-grade input{width:72px;padding:8px}.switch-line{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:18px 0;border-bottom:1px solid var(--line)}.switch-line:last-child{border:0}.toggle{background:#c4d0cc;width:45px;height:26px;border-radius:30px;padding:3px;direction:ltr;flex-shrink:0}.toggle:before{content:'';display:block;width:20px;height:20px;border-radius:50%;background:white;transition:transform .2s}.toggle[aria-checked=true]{background:#267d6f}.toggle[aria-checked=true]:before{transform:translateX(19px)}.auth-wrap{max-width:460px;margin:40px auto}.auth-wrap>img{width:78px;height:84px;object-fit:contain;display:block;margin:0 auto 22px}.auth-wrap h1{text-align:center;font-size:26px}.auth-wrap .muted{text-align:center;margin:8px 0 23px}.auth-wrap .btn{width:100%}.demo-credentials{font-size:12px;border-top:1px solid var(--line);margin-top:20px;padding-top:17px}.demo-credentials div{display:flex;justify-content:space-between;padding:6px 0}.dev-menu{position:fixed;left:18px;bottom:16px;z-index:45;padding:10px;border:1px solid var(--line);border-radius:15px;background:var(--surface)!important;box-shadow:0 8px 34px #14372e12;max-width:calc(100vw - 30px)}.dev-caption{display:flex;justify-content:space-between;gap:30px;font-size:10px;color:var(--muted);margin:0 4px 7px}.dev-caption small{font-size:9px}.role-buttons{display:flex;gap:4px;flex-wrap:wrap}.role-buttons button{background:transparent;color:var(--muted);border-radius:8px;font-size:10px;padding:8px 10px}.role-buttons button.active{background:#1a796b;color:white}.modal-overlay{position:fixed;inset:0;z-index:100;background:#10282066;backdrop-filter:blur(7px);display:flex;justify-content:center;align-items:center;padding:22px}.modal{width:560px;max-width:100%;max-height:calc(100dvh - 44px);overflow:auto;border-radius:23px;border:1px solid var(--line);background:var(--surface);box-shadow:0 30px 90px #0002;animation:reveal .18s ease}.modal-header{position:sticky;top:0;background:var(--surface);z-index:2;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding:19px 25px}.modal-body{padding:7px 25px 25px}.modal-actions{display:flex;gap:9px;justify-content:flex-end;border-top:1px solid var(--line);padding-top:18px;margin-top:21px}.modal-intro{color:var(--muted);font-size:12px;line-height:1.8;margin:13px 0!important}.modal-error{font-size:12px;padding:11px 13px;background:#fce8e9;color:#a14149;border-radius:9px;line-height:1.8;margin:13px 0}.dark .modal-error{background:#44242e;color:#f3afb5}.toast{position:fixed;bottom:24px;right:24px;z-index:200;border-radius:13px;background:#175e50;color:#fff;padding:14px 21px;box-shadow:0 9px 30px #0002;font-size:13px;max-width:min(430px,calc(100vw - 40px));animation:reveal .2s ease}.toast.error{background:#923f49}.spinner{display:inline-block;border:2px solid var(--line);border-top-color:var(--teal);width:24px;height:24px;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.loading{min-height:300px;display:flex;gap:14px;align-items:center;justify-content:center;flex-direction:column;color:var(--muted);font-size:13px}.saving{pointer-events:none;opacity:.6}.certificate-preview{background:white;color:#163a36;border:1px solid #dedfda;padding:45px;max-width:800px;margin:20px auto;font-family:Tajawal,Arial,sans-serif;position:relative}.certificate-border{border:3px double #98ac9d;padding:35px 27px;min-height:650px}.certificate-head{text-align:center}.certificate-head img{width:74px;height:88px;object-fit:contain;margin:0 auto 10px}.certificate-head h2{font-size:29px;margin:14px 0}.certificate-head p{color:#77877d;font-size:13px}.certificate-watermark{text-align:center;color:#b19b6c;font-size:12px;letter-spacing:3px;margin:14px 0}.certificate-info{display:grid;grid-template-columns:1fr 1fr;gap:15px;font-size:13px;line-height:1.8;margin:30px 0}.certificate-info b{display:block;font-size:11px;color:#7d8b81;font-weight:400}.certificate-preview table{white-space:normal;color:#24473e}.certificate-preview th{background:#eef4ef;color:#4d7163}.certificate-preview td{border-color:#dfe6df}.certificate-footer{display:flex;justify-content:space-between;gap:25px;margin-top:60px;font-size:12px}.signature{width:180px;text-align:center}.signature-line{height:45px;border-bottom:1px solid #8c9e91;margin-bottom:8px}.certificate-warning{text-align:center;border:1px solid #dbc794;background:#fffaf0;padding:12px;margin-top:25px;color:#8c7134;font-size:12px}#print-certificate{display:none}.noscript{position:fixed;inset:0;background:white;color:black;z-index:1000;padding:70px;font-size:24px}.collapsed{--sidebar:88px}.collapsed .brand span,.collapsed .nav-label,.collapsed .nav-text,.collapsed .sidebar-note{display:none}.collapsed .sidebar{padding:27px 15px}.collapsed .brand{padding:0;justify-content:center}.collapsed .brand img{width:48px}.collapsed .nav-link{justify-content:center;padding:14px}.collapsed .nav-link:after{display:none}
@media(min-width:1550px){main{padding-top:42px}.topbar{padding-right:48px;padding-left:48px}}
@media(max-width:1150px){:root{--sidebar:220px}main{padding:27px 25px 70px}.topbar{padding:0 25px}.grid4{grid-template-columns:repeat(2,minmax(0,1fr))}.grid3{gap:15px}.course-body{padding:18px}.grid2,.dashboard-lower{gap:17px}.card{padding:20px}.course{padding:0}.brand strong{font-size:18px}}
@media(max-width:900px){:root{--sidebar:0px}.sidebar{width:250px;transform:translateX(100%)}.sidebar-open .sidebar{transform:translateX(0)}.sidebar-open .sidebar-scrim{position:fixed;inset:0;display:block!important;background:#0c211d66;z-index:35}.mobile-menu{display:inline-grid}.collapsed{--sidebar:0px}.collapsed .sidebar{width:250px}.collapsed .brand span,.collapsed .nav-label,.collapsed .nav-text,.collapsed .sidebar-note{display:block}.collapsed .nav-link{justify-content:start}.grid3{grid-template-columns:repeat(3,minmax(0,1fr))}.sidebar-bottom #collapse{display:none}.dashboard-lower{grid-template-columns:1fr 1fr}}
@media(max-width:680px){body h1{font-size:25px}.topbar{height:75px;padding:0 16px}.header-actions{gap:2px}.header-path{gap:5px}.breadcrumbs{font-size:10px;gap:5px}.profile-copy{display:none}.header-divider{margin:0 3px}.avatar{width:35px;height:35px;font-size:18px}.icon-button{width:33px;height:35px}main{padding:25px 17px 60px}.heading{align-items:flex-start;flex-direction:column;gap:14px;margin-bottom:22px}.heading .actions{width:100%}.heading .actions .btn{font-size:11px}.grid3,.grid2,.grid4,.dashboard-lower{grid-template-columns:1fr;gap:16px}.stat{padding:18px}.grid3.stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.stats .stat{flex-direction:column;align-items:flex-start;gap:7px;padding:14px}.stats .stat strong{font-size:24px}.stats .stat small{font-size:9px}.stats .stat-icon{width:32px;height:32px;border-radius:10px}.stats .stat-icon .icon{width:16px;height:16px}.stats .trend{display:none}.welcome-banner{padding:20px}.welcome-banner .banner-art{font-size:42px}.welcome-banner h2{font-size:18px}.course-cover{height:105px}.course-body{padding:21px}.card{padding:19px}.course{padding:0}.calendar-day{min-height:65px;padding:5px 3px}.calendar-event{font-size:8px;padding:3px}.calendar-weekday{font-size:9px}.calendar-day strong{width:20px;height:20px;line-height:20px}.calendar-day{font-size:9px}.dev-menu{left:10px;bottom:10px;padding:8px;max-width:calc(100vw - 20px)}.role-buttons{gap:0;justify-content:space-between}.role-buttons button{font-size:9px;padding:7px 9px}.dev-caption{font-size:9px;margin-bottom:5px}.dev-caption small{font-size:8px}.toast{bottom:100px;right:15px;font-size:12px}.week summary{padding:15px;gap:11px}.week-body{padding:15px}.week summary h3{font-size:12px}.week-number{width:34px;height:34px;font-size:13px}.week summary .pill{display:none}.modal-overlay{padding:13px}.modal{max-height:calc(100dvh - 26px);border-radius:18px}.modal-header{padding:16px 18px}.modal-body{padding:7px 18px 21px}.modal .grid2{gap:0}.page-footer{padding:0 17px 100px;font-size:10px}.certificate-preview{padding:12px}.certificate-border{padding:21px 15px;min-height:600px}.certificate-info{font-size:11px;gap:12px}.certificate-head h2{font-size:24px}.certificate-footer{margin-top:40px}.certificate-preview table{font-size:11px}.certificate-preview td,.certificate-preview th{padding:12px 8px}.certificate-warning{font-size:10px}.holiday{padding:18px;gap:14px}.holiday strong{font-size:17px}.holiday p{font-size:11px}.section-heading{align-items:start}.section-heading h2{font-size:17px}.toolbar .field{min-width:120px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
/* Comfortable form controls: class specificity also protects against CDN resets. */
@media screen {
  .field {font-size:15px;gap:10px;min-width:0;line-height:1.6}
  .field > span {font-weight:600}
  .field input:not([type="checkbox"]):not([type="hidden"]),
  .field select,.field textarea,.inline-grade input {
    min-height:54px;padding:13px 16px;border:1.5px solid var(--line);
    border-radius:13px;background:var(--surface-alt);color:var(--ink);
    font:inherit;font-size:16px;line-height:1.5;box-sizing:border-box;
    width:100%;max-width:100%;min-width:0;
  }
  .field select {padding-inline-end:38px;cursor:pointer}
  .field textarea {min-height:132px}
  .field small {font-size:13px;line-height:1.7}
  .field input:focus,.field select:focus,.field textarea:focus {
    border-color:var(--teal);outline:3px solid var(--teal-soft);outline-offset:2px;
  }
  .selected-lesson {display:none}
  .toolbar {gap:18px;align-items:start}
  .toolbar .field {margin:0;min-width:0}
  #attendance-filters {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-bottom:26px}
  #attendance-filters .field:last-child {grid-column:1 / -1}
  .card {min-width:0}
  .btn {min-height:48px;font-size:15px;padding:12px 19px}
  .btn.small {min-height:44px;font-size:14px;padding:10px 14px}
  .status-group {gap:8px}
  .status-button {min-height:46px;font-size:14px;padding:10px 13px;border-radius:11px}
  .attendance-card table {font-size:15px}
  .attendance-card th,.attendance-card td {padding:18px 16px}
  .attendance-card td .muted {font-size:12px}
  .inline-grade input {width:88px}
  @media(max-width:900px) {
    .grid3:not(.stats) {grid-template-columns:repeat(2,minmax(0,1fr))}
    .header-path,.breadcrumbs {min-width:0}
    .breadcrumbs {overflow-wrap:anywhere}
  }
  @media(max-width:680px) {
    main {padding:24px 16px 40px}
    .card {padding:20px;border-radius:20px}
    .course {padding:0}
    .grid3:not(.stats),.grid3.stats,.grid2,.grid4,.dashboard-lower {grid-template-columns:1fr;gap:18px}
    .grid3.stats .stat {flex-direction:row;align-items:center;padding:20px;gap:16px}
    .stats .stat small {font-size:14px}
    .course-body {padding:24px}
    .course-body .muted {font-size:14px!important;line-height:1.8}
    .teacher-line,.progress-caption {font-size:13px}
    .heading .actions .btn {font-size:15px}
    .muted {font-size:14px}
    .topbar {padding-inline:12px;gap:8px;height:auto;min-height:76px}
    .icon-button {width:44px;height:44px;flex-shrink:0}
    .header-actions {flex-shrink:0}
    .header-divider {display:none}
    .breadcrumbs {font-size:12px}
    #attendance-filters {grid-template-columns:minmax(0,1fr);gap:18px;margin-bottom:24px}
    .toolbar {display:grid;grid-template-columns:minmax(0,1fr);width:100%}
    .toolbar .field {min-width:0;width:100%}
    .field select,.field input:not([type="checkbox"]):not([type="hidden"]) {min-height:56px}
    .selected-lesson {display:block;background:var(--teal-soft);color:var(--ink);padding:14px;border-radius:12px;font-size:15px;line-height:1.8;margin:0 0 20px;overflow-wrap:anywhere}
    .selected-lesson strong {display:block;color:var(--teal);font-size:13px;margin-bottom:4px}
    .attendance-card .table-wrap {border:0;overflow:visible;border-radius:0}
    .attendance-card table,.attendance-card tbody {display:block;width:100%;white-space:normal}
    .attendance-card thead {display:none}
    .attendance-card tr {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:18px 14px;margin-bottom:14px;border:1px solid var(--line);border-radius:16px;background:var(--surface-alt)}
    .attendance-card td {padding:0;border:0;min-width:0;font-size:15px;overflow-wrap:anywhere}
    .attendance-card td:nth-child(2) {font-size:13px;direction:ltr;padding-top:3px}
    .attendance-card td:last-child {grid-column:1 / -1}
    .attendance-card .status-group {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
    .attendance-card .status-button {width:100%;min-height:48px;font-size:15px;padding:10px 6px}
    .week summary {padding:20px 16px}
    .week summary h3 {font-size:16px;line-height:1.7}
    .week summary p {font-size:12px}
    .week-body {padding:20px}
    .modal-overlay {padding:12px}
    .modal-header {padding:18px}
    .modal-body {padding:12px 20px 24px}
    .modal-actions .btn {flex:1}
    .dev-menu {left:10px;right:10px;bottom:max(10px,env(safe-area-inset-bottom));max-width:none;padding:10px}
    .role-buttons {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
    .role-buttons button {min-height:44px;font-size:13px;padding:9px 5px}
    .dev-caption {font-size:11px;margin-bottom:8px}
    .dev-caption small {font-size:10px}
    .page-footer {padding-bottom:calc(170px + env(safe-area-inset-bottom));font-size:12px}
    .toast {bottom:calc(160px + env(safe-area-inset-bottom))}
  }
}

/* A certificate is printed from a dedicated surface populated only after the API responds. */
@page{size:A4 portrait;margin:14mm}
@media print{html,body{background:#fff!important;color:#183b34!important;width:100%!important;height:auto!important;margin:0!important;padding:0!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}body>*:not(#print-certificate){display:none!important}#print-certificate{display:block!important;position:static!important;width:100%!important;font-size:12pt}#print-certificate .certificate-preview{border:0!important;margin:0!important;padding:0!important;width:100%!important;max-width:none!important;background:white!important;color:#183b34!important}#print-certificate .certificate-border{min-height:255mm!important;padding:15mm 10mm!important;border:1.5pt double #87a38f!important}#print-certificate .certificate-info{margin:12mm 0!important}#print-certificate .certificate-head img{width:22mm!important;height:26mm!important}#print-certificate .certificate-head h2{font-size:26pt!important}#print-certificate .certificate-footer{margin-top:28mm!important}#print-certificate table{width:100%!important;color:#183b34!important;font-size:12pt!important}#print-certificate th{background:#eef4ef!important;color:#426250!important}#print-certificate td{padding:5mm 4mm!important;border-bottom:1px solid #dde5dd!important}#print-certificate .certificate-warning{background:#fffaf0!important;color:#806c36!important}#print-certificate .certificate-watermark{color:#ac996e!important}button,nav,.dev-menu,.toast,.modal-overlay{display:none!important}a:after{content:none!important}tr,.certificate-info,.certificate-footer{break-inside:avoid;page-break-inside:avoid}}

@media screen{.list-search{margin-bottom:24px;max-width:640px}.list-search input{width:100%}.attendance-save-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:20px 0}.attendance-save-bar .btn{min-height:52px}#app tr[hidden]{display:none!important}@media(max-width:680px){.attendance-save-bar .btn{width:100%}.list-search{max-width:none}}}

.recipient-fieldset{border:0;padding:0;margin:20px 0}.recipient-fieldset legend{font-size:17px;font-weight:700;margin-bottom:10px}.recipient-groups{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:16px 0}.recipient-summary{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:12px 0;font-size:14px}.recipient-list{max-height:240px;overflow:auto;border:1px solid var(--line);border-radius:14px;padding:8px}.recipient-row{display:flex;align-items:center;gap:12px;padding:12px;font-size:15px;cursor:pointer}.recipient-row input{width:20px;height:20px;accent-color:var(--teal)}.recipient-row small{display:block;margin-top:4px}.recipient-row[hidden],#recipient-empty[hidden]{display:none!important}

.enrollment-badge{display:flex;flex-direction:column;gap:8px;margin-top:15px;color:var(--teal);font-size:14px}.portal-eyebrow{font-size:13px;letter-spacing:.3px}.homework-question{font-size:18px;line-height:1.9;margin:20px 0}.feedback-card{background:var(--teal-soft);padding:16px;border-radius:14px;margin-top:16px;font-size:14px}.rubric-breakdown{min-width:220px;margin:12px 0;font-size:13px}.rubric-breakdown>div{display:flex;justify-content:space-between;gap:18px;padding:5px 0;border-bottom:1px solid var(--line)}.rubric-form{display:grid;grid-template-columns:repeat(2,minmax(130px,1fr));gap:12px;min-width:300px}.inline-grade{flex-wrap:wrap}.inline-grade .field{width:100%}.calendar-legend{display:flex;gap:20px;margin-bottom:18px}.event-lesson{color:#2563eb;background:#dbeafe}.event-exam{color:#b91c1c;background:#fee2e2}.event-activity{color:#047857;background:#d1fae5}.calendar-legend span{padding:6px 12px;border-radius:10px}.dark .event-lesson{background:#172f52;color:#93c5fd}.dark .event-exam{background:#48252d;color:#fca5a5}.dark .event-activity{background:#123b34;color:#6ee7b7}@media(max-width:680px){.calendar-legend{gap:5px;font-size:12px}.list-row{flex-wrap:wrap}.rubric-form{min-width:240px}.welcome-banner .banner-art{display:none}}@media print{.rubric-breakdown{font-size:9pt;min-width:0;margin:3px 0}.rubric-breakdown>div{padding:1px 0}.certificate-preview td{padding:6px!important}.certificate-footer{margin-top:20px!important}}

/* Teacher workspace — navy, gold, generous touch targets. */
.teacher-call-button{background:var(--teal-soft);color:var(--teal);border:1px solid var(--line);white-space:nowrap}.teacher-call-button[hidden]{display:none!important}
.teacher-heading{display:flex;justify-content:space-between;gap:24px;align-items:start;margin-bottom:24px}.teacher-heading .heading{margin:0}.teacher-filters{display:flex;gap:14px;flex-wrap:wrap;max-width:500px}.teacher-filters .field{min-width:150px;flex:1}.teacher-heading h1{font-size:29px}.teacher-heading p{line-height:1.8}
.stars-hero{display:grid;grid-template-columns:1fr 1.5fr;gap:20px;padding:32px 36px 0;border:1px solid var(--line);border-radius:24px;background:linear-gradient(130deg,var(--surface-alt),var(--teal-soft));margin-bottom:24px;overflow:hidden;align-items:center}.dark .stars-hero{background:linear-gradient(130deg,var(--surface-alt),var(--teal-soft));border-color:var(--line)}.stars-hero h2{font-size:27px;line-height:1.6;margin:10px 0}.stars-hero p{color:var(--muted);font-size:15px;line-height:1.9}.teacher-eyebrow{color:var(--teal);font-size:13px;font-weight:700}.podium{display:flex;justify-content:center;align-items:end;gap:12px;padding-top:10px}.podium-place{width:32%;text-align:center}.podium .pupil-identity{flex-direction:column;gap:8px}.podium .pupil-identity strong{font-size:13px}.podium .pupil-identity small{font-size:10px}.podium .pupil-photo{height:65px;width:65px}.podium .rank-1 .pupil-photo{height:84px;width:84px;border:4px solid var(--teal)}.podium-crown{font-size:26px;color:var(--teal);margin-bottom:6px}.podium-score{display:block;color:var(--teal);margin:10px}.pedestal{border-radius:15px 15px 0 0;height:65px;background:#e4e9ef;padding-top:14px;color:#6c7c90;font-size:28px}.rank-1 .pedestal{height:105px;background:var(--teal-soft);color:var(--teal)}.rank-3 .pedestal{height:45px;background:#e9d7c4;color:#987855}.teacher-tools{display:flex;align-items:center;gap:12px;margin:22px 0;flex-wrap:wrap}.teacher-tools>p{flex:1}.teacher-tools .btn{background:var(--surface);min-height:48px}.teacher-rewards .section-heading{margin-top:0}.reward-categories{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:18px 0}.reward-category{padding:16px;display:flex;align-items:center;justify-content:center;gap:10px;border:1px solid var(--line);border-radius:14px;background:var(--surface-alt);font-weight:700}.reward-category span{font-size:22px}.reward-category.selected{background:var(--teal-soft);border-color:var(--teal);color:var(--teal)}.dark .reward-category.selected{background:var(--teal-soft);color:var(--teal)}.teacher-search{max-width:420px;margin:22px 0}.pupil-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.teacher-student-card{position:relative;border:1px solid var(--line);background:var(--surface);border-radius:18px;padding:24px;text-align:center;transition:transform .18s,box-shadow .18s}.reward-pupil:hover{transform:translateY(-3px);box-shadow:0 7px 20px #0a19300c;border-color:var(--teal)}.pupil-identity{display:flex;align-items:center;gap:13px;text-align:right;min-width:0}.pupil-photo{width:48px;height:48px;border-radius:50%;object-fit:cover;border:3px solid var(--surface-alt);flex-shrink:0;background:#dbe5ed}.pupil-identity strong{display:block;font-size:15px;line-height:1.6}.pupil-identity small{display:block;color:var(--muted);font-size:11px;margin-top:4px;letter-spacing:.4px}.pupil-identity.large{flex-direction:column;text-align:center}.pupil-identity.large .pupil-photo{width:80px;height:80px}.star-count{display:inline-block;margin-top:18px;background:var(--teal-soft);color:var(--teal);border-radius:20px;font-size:16px;font-weight:800;padding:7px 20px}.teacher-student-card dl{margin:22px 0;text-align:right}.teacher-student-card dl>div{display:flex;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px solid var(--line);font-size:13px}.teacher-student-card dt{color:var(--muted)}.teacher-student-card .btn{width:100%}.teacher-student-card[hidden],[data-pupil-search][hidden]{display:none!important}
.teacher-plan{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:26px}.plan-week h2{display:flex;justify-content:space-between;margin:5px 0 15px;font-size:19px}.plan-week h2 small{font-size:12px;color:var(--muted);font-weight:400}.plan-lesson{position:relative;padding:27px}.lesson-time{position:absolute;left:22px;top:22px;font-size:14px;font-weight:700;background:#edf2f9;color:#425c7d;border-radius:9px;padding:9px 12px}.dark .lesson-time{background:#243955;color:#c4d9f3}.plan-date{display:flex;flex-direction:column;gap:5px;padding-left:160px;font-size:14px}.plan-date span{font-size:12px;color:var(--muted)}.plan-lesson h3{margin:25px 0;font-size:18px}.plan-instructions{border-right:3px solid var(--teal);background:var(--surface-alt);padding:16px;border-radius:10px;font-size:14px;line-height:1.9}.plan-instructions p{color:var(--muted)}.teacher-attendance-list{display:grid;gap:13px}.teacher-attendance-row{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:22px 25px}.pupil-attendance-controls{text-align:left;min-width:300px}.pupil-attendance-controls .status-group{justify-content:flex-end;gap:8px;margin:7px 0}.teacher-mode .status-button{min-width:94px}.teacher-mode .status-button[aria-pressed=true].present{background:#e2f4ea;border-color:#64ac88;color:#197448}.teacher-mode .status-button[aria-pressed=true].late{background:#fff0ce;border-color:#dbac48;color:#9a6810}.teacher-mode .status-button[aria-pressed=true].absent{background:#fee5e5;border-color:#dc8b8b;color:#b13d3d}.attendance-audit{font-size:11px;color:var(--muted)}.teacher-gradebook table{width:100%;min-width:760px}.teacher-gradebook th{background:var(--surface-alt);font-size:14px;padding:18px}.teacher-gradebook input{max-width:95px;border:1px solid var(--line);border-radius:10px;background:var(--surface-alt);color:var(--ink);font-size:17px;padding:13px;min-height:48px}.teacher-total{color:var(--teal);font-size:20px;display:block}
.teacher-report-layout{display:grid;grid-template-columns:300px minmax(0,1fr);gap:24px;align-items:start}.report-roster{padding:20px}.report-roster h2{font-size:19px}.report-roster-list{max-height:700px;overflow:auto;display:grid;gap:8px}.report-student{padding:13px 10px;border-radius:13px;border:1px solid transparent;text-align:right}.report-student.selected{background:var(--teal-soft);border-color:var(--teal)}.report-detail-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:24px;margin-bottom:24px;border-bottom:1px solid var(--line)}.report-detail-header .pupil-identity.large{flex-direction:row;text-align:right}.report-detail h2{font-size:19px;margin:12px 0}.attendance-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:20px 0 32px}.attendance-summary>div{text-align:center;padding:20px 8px;border-radius:13px;background:var(--surface-alt);border:1px solid var(--line)}.attendance-summary strong{display:block;font-size:27px;margin-bottom:5px}.attendance-summary span{font-size:13px;color:var(--muted)}.summary-present strong{color:#278760}.summary-absent strong{color:#c55454}.summary-late strong{color:#b7841d}.summary-excused strong{color:#697e99}.report-detail td select{min-height:43px;width:100%;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--surface-alt);color:var(--ink)}.report-notes{margin-top:28px;background:var(--surface-alt);padding:24px;border-radius:17px}.behavior-options{display:flex;gap:12px;margin:18px 0}.behavior-options label{display:flex;gap:9px;align-items:center;background:var(--surface);border:1px solid var(--line);padding:12px 20px;border-radius:11px}.behavior-options label:has(input:checked){background:var(--teal-soft);border-color:var(--teal)}.behavior-options input{accent-color:var(--teal);width:17px;height:17px}.teacher-timer{text-align:center}.teacher-timer>strong{display:block;font-size:68px;color:var(--teal);font-variant-numeric:tabular-nums;margin:20px}.teacher-timer .actions{justify-content:center;margin:20px}.random-pupil{text-align:center;padding:25px}.random-pupil p{margin:18px}.random-group{padding:18px;margin-top:15px;background:var(--surface-alt);border-radius:14px}.random-group h3{margin-bottom:14px}.random-group .pupil-identity{padding:10px 0}
@media(max-width:1150px){.pupil-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.teacher-report-layout{grid-template-columns:245px minmax(0,1fr)}.stars-hero{grid-template-columns:1fr 1.4fr}.teacher-heading{flex-wrap:wrap}}
@media(max-width:900px){.teacher-report-layout{grid-template-columns:1fr}.report-roster-list{max-height:240px;grid-template-columns:repeat(2,minmax(0,1fr))}.stars-hero{grid-template-columns:1fr;text-align:center;padding-top:25px}.podium{max-width:600px;width:100%;margin:auto}.teacher-plan{grid-template-columns:1fr}.teacher-mode .topbar{flex-wrap:wrap;height:auto;min-height:90px;padding-top:12px;padding-bottom:12px}}
@media(max-width:680px){.pupil-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.teacher-student-card{padding:17px 10px}.pupil-identity.large .pupil-photo{width:62px;height:62px}.pupil-identity strong{font-size:13px}.pupil-identity small{font-size:10px}.reward-categories{grid-template-columns:1fr 1fr;gap:9px}.reward-category{font-size:13px;padding:13px 8px}.teacher-rewards{padding:17px}.teacher-rewards .section-heading{flex-direction:column}.teacher-heading h1{font-size:25px}.teacher-filters{width:100%;max-width:none}.teacher-filters .field{min-width:130px}.stars-hero{padding:22px 12px 0}.stars-hero h2{font-size:22px}.podium{gap:6px}.podium .pupil-identity strong{font-size:11px}.podium .pupil-identity small{font-size:8px}.podium .pupil-photo{width:50px;height:50px}.podium .rank-1 .pupil-photo{width:66px;height:66px}.teacher-attendance-row{flex-direction:column;align-items:stretch;padding:18px}.pupil-attendance-controls{min-width:0;text-align:right}.pupil-attendance-controls .status-group{justify-content:stretch;display:grid;grid-template-columns:repeat(3,1fr)}.teacher-mode .status-button{min-width:0;padding:9px}.attendance-summary{grid-template-columns:1fr 1fr}.report-detail{padding:18px}.report-detail-header{align-items:start;gap:10px;flex-wrap:wrap}.report-notes{padding:15px}.behavior-options{gap:6px}.behavior-options label{padding:10px;font-size:13px;flex:1}.report-roster-list{grid-template-columns:1fr}.teacher-call-button{font-size:12px;min-height:40px;padding:8px 10px}.teacher-mode .header-actions{gap:3px}.plan-date{padding-left:135px}.lesson-time{font-size:12px;padding:8px;left:15px}.plan-lesson{padding:20px}.directory-grid{grid-template-columns:1fr}.teacher-mode .heading{width:100%}.teacher-mode .report-detail table{min-width:0}.teacher-tools .btn{flex:1;font-size:13px}.teacher-gradebook{padding:14px}}

.teacher-gradebook small{display:block}


.classroom-evaluation{margin-bottom:30px}.monthly-rating{border:1px solid var(--line);border-radius:14px;padding:16px;margin-top:18px;min-width:0}.monthly-rating legend{font-size:16px;font-weight:700;padding:0 8px}.monthly-rating p{font-size:13px}.monthly-rating .behavior-options{flex-wrap:wrap;margin-bottom:0}.monthly-rating .behavior-options label{font-size:13px;padding:10px 12px}@media(max-width:680px){.monthly-rating .behavior-options{display:grid;grid-template-columns:1fr 1fr}.monthly-rating .behavior-options label{white-space:normal}}

/* ═══════════ Polish layer · October 2026 ═══════════
   Same teal identity; refines contrast, rhythm, states and touch targets.
   Appended last so it can be removed as one block to restore the previous look. */
:root{--muted:#5f716e;--line:#e1ebe8;--shadow:0 1px 2px #0f2e2808,0 4px 16px #0f2e280a;--shadow-lift:0 2px 4px #0f2e280a,0 14px 34px #0f2e2814;--radius:16px;--ease:cubic-bezier(.2,.7,.2,1);--amber:#e9a514;--amber-deep:#c97a06;--coral:#e5484d}
html.dark{--muted:#a9babc;--shadow:0 1px 2px #0006,0 4px 16px #0004;--shadow-lift:0 2px 6px #0007,0 16px 36px #0006}
body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
.view{animation:view-in .28s var(--ease)}
@keyframes view-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.heading h1{letter-spacing:-.4px}
.heading p.muted{font-size:14px;margin-top:4px}
.btn{border-radius:12px;font-size:14px;min-height:44px;padding:11px 18px;box-shadow:0 1px 0 #0000000d;transition:background .18s,color .18s,box-shadow .18s,transform .12s var(--ease)}
.btn:not(:disabled):hover{box-shadow:0 6px 16px #14786c26;transform:translateY(-1px);filter:none}
.btn:not(:disabled):active{transform:translateY(0) scale(.98)}
.btn.small{min-height:36px;padding:7px 13px;font-size:13px;border-radius:10px}
.btn.outline{background:var(--surface);color:var(--ink);border:1.5px solid var(--line);box-shadow:none}
/* Tailwind CDN ships a utility also named .outline (outline-style:solid) that drew a heavy dark ring on every outline button. */
.btn.outline:not(:focus-visible){outline:0}
.btn.outline:not(:disabled):hover{border-color:var(--teal);color:var(--teal);box-shadow:none}
.btn.secondary:not(:disabled):hover{box-shadow:none;background:color-mix(in srgb,var(--teal-soft) 75%,var(--teal) 12%)}
.card{border-radius:var(--radius);box-shadow:var(--shadow)}
.section-heading h2{display:flex;align-items:center;gap:8px}
.pill{font-size:11.5px;padding:4px 9px;border-radius:8px;font-weight:600}
.muted,small{color:var(--muted)}
.field{font-size:13px;font-weight:600}
.field input,.field select,.field textarea,.toolbar input,.toolbar select,.teacher-filters select,.teacher-filters input{border-radius:11px;min-height:44px;border:1.5px solid var(--line);background:var(--surface);color:var(--ink);padding:9px 12px;transition:border-color .15s,box-shadow .15s}
.field input:focus,.field select:focus,.field textarea:focus,.teacher-filters select:focus{outline:none;border-color:var(--teal);box-shadow:0 0 0 4px color-mix(in srgb,var(--teal) 16%,transparent)}
table th{font-size:12.5px;font-weight:700;color:var(--muted);background:var(--surface-alt)}
table tbody tr{transition:background .12s}
table tbody tr:hover{background:color-mix(in srgb,var(--teal-soft) 45%,transparent)}
.nav-link{transition:background .15s,color .15s}
.nav-link:not(.active):hover{background:var(--surface-alt);color:var(--ink)}
.icon-button:hover{background:var(--surface-alt);color:var(--ink)}
.modal{border-radius:22px;box-shadow:0 30px 80px #0b201c33}
.modal-overlay{backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.modal-header h2{font-size:20px}
.toast{border-radius:14px;font-size:14px;font-weight:600;box-shadow:0 12px 32px #0b201c40}
.toast.error{background:#9f2f39}
.info-banner{font-size:13px}
.empty{font-size:14px}
.note-card{border-right-width:4px}
.list-row h3{font-size:14px}
.status-button{min-height:40px;border-radius:10px;font-weight:600}

/* ═══════════ نجوم الصف v2 ═══════════ */
.stars-page{display:flex;flex-direction:column;gap:22px}
.stars-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.stars-stats{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.stars-stats>span{background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:6px 14px;font-size:13px;color:var(--muted)}
.stars-stats b{color:var(--ink);font-variant-numeric:tabular-nums}
.stars-toolbar-actions{display:flex;gap:8px;align-items:center}
.icon-btn{width:42px;height:42px;display:inline-grid;place-items:center;border-radius:12px;background:var(--surface);border:1.5px solid var(--line);color:var(--ink);font-size:18px;line-height:1}
.icon-btn:hover{border-color:var(--teal);color:var(--teal)}
.icon-btn[aria-pressed=false]{color:var(--muted)}
.timer-chip{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:6px 14px;background:var(--teal-soft);color:var(--teal);font-weight:700;font-variant-numeric:tabular-nums;border:1px solid transparent}
.timer-chip.running{background:var(--teal);color:#fff;animation:pulse-soft 2s ease-in-out infinite}
@keyframes pulse-soft{50%{box-shadow:0 0 0 6px color-mix(in srgb,var(--teal) 18%,transparent)}}
.stars-page .stars-hero{margin:0;padding:28px 32px 0;border:0;border-radius:24px;color:#fff;background:radial-gradient(120% 140% at 85% 0%,#1f9a89 0%,#14786c 45%,#0d4f47 100%);box-shadow:0 18px 40px #0d4f4733;position:relative;isolation:isolate}
.stars-page .stars-hero:before{content:'';position:absolute;inset:0;z-index:-1;background:radial-gradient(circle at 12% 30%,#ffffff1f 0 2px,transparent 3px) 0 0/46px 46px,radial-gradient(circle at 60% 70%,#ffffff14 0 1.5px,transparent 2.5px) 0 0/34px 34px;opacity:.8}
.stars-page .stars-hero h2{color:#fff;font-size:26px}
.stars-page .stars-hero p{color:#d6efe9}
.stars-page .teacher-eyebrow{color:#f6d77a;font-weight:700;font-size:13px}
.stars-page .podium .pupil-identity strong{color:#fff;font-size:14px}
.stars-page .podium .pupil-identity small{color:#bfe3db}
.stars-page .podium .pupil-photo{border:3px solid #ffffff55;box-shadow:0 6px 16px #0003}
.stars-page .podium .rank-1 .pupil-photo{border:4px solid #f6c34a;box-shadow:0 0 0 6px #f6c34a33,0 10px 24px #0004}
.podium-medal{width:26px;height:26px;margin:0 auto 6px;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:13px;color:#5a3b00;background:linear-gradient(145deg,#ffe08a,#e7a81a);box-shadow:0 3px 8px #0003}
.rank-2 .podium-medal{background:linear-gradient(145deg,#f1f4f6,#aab6c0);color:#3d4a55}
.rank-3 .podium-medal{background:linear-gradient(145deg,#f3c9a0,#c27a3e);color:#4b2a10}
.stars-page .podium-score{color:#fff;background:#ffffff1f;border-radius:999px;display:inline-block;padding:2px 12px;margin:10px auto;font-variant-numeric:tabular-nums}
.stars-page .pedestal{border-radius:16px 16px 0 0;color:#fff;font-weight:800;background:linear-gradient(180deg,#ffffff33,#ffffff12);height:70px;font-size:26px;padding-top:12px}
.stars-page .rank-1 .pedestal{height:108px;background:linear-gradient(180deg,#f6c34a,#d9941a);color:#5a3b00}
.stars-page .rank-3 .pedestal{height:50px}
.class-tools{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.class-tool{display:flex;align-items:center;gap:14px;padding:16px 18px;border-radius:18px;background:var(--surface);border:1.5px solid var(--line);color:var(--ink);text-align:right;box-shadow:var(--shadow)}
.class-tool:hover{border-color:var(--teal);transform:translateY(-2px);box-shadow:var(--shadow-lift)}
.class-tool b{display:block;font-size:15px}
.class-tool small{font-size:12.5px}
.class-tool-icon{width:46px;height:46px;flex-shrink:0;border-radius:14px;display:grid;place-items:center;font-size:22px;background:var(--teal-soft);color:var(--teal)}
.mode-switch{display:inline-flex;align-self:center;gap:4px;padding:5px;border-radius:16px;background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow)}
.mode-option{min-width:130px;min-height:44px;border-radius:12px;background:transparent;color:var(--muted);font-weight:700;font-size:15px}
.mode-option.reward.active{background:#12a36f;color:#fff;box-shadow:0 6px 16px #12a36f40}
.mode-option.penalty.active{background:var(--coral);color:#fff;box-shadow:0 6px 16px #e5484d40}
.category-panel{padding:22px}
.category-panel .section-heading{margin:0 0 16px}
.category-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px}
.category-card{display:flex;flex-direction:column;align-items:center;gap:4px;padding:16px 10px;border-radius:16px;background:var(--surface-alt);border:1.5px solid transparent;color:var(--ink);transition:transform .15s var(--ease),box-shadow .15s,background .15s}
.category-card:hover{transform:translateY(-2px);border-color:var(--line);box-shadow:var(--shadow)}
.category-emoji{font-size:30px;line-height:1.2}
.category-card strong{font-size:14px}
.category-card small{font-weight:700;font-variant-numeric:tabular-nums}
.category-card.selected{background:linear-gradient(145deg,#fbc531,#f39c12);color:#fff;box-shadow:0 10px 22px #f39c1240;transform:translateY(-2px)}
.category-card.selected small{color:#fff}
.is-penalty .category-card.selected{background:linear-gradient(145deg,#7b8ca8,#55667f);box-shadow:0 10px 22px #55667f40}
.category-hint{text-align:center;margin-top:16px;font-size:13.5px;color:var(--muted)}
.category-hint b{color:#12a36f}.is-penalty .category-hint b{color:var(--coral)}
.stars-page .teacher-search{margin:0}
.stars-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:16px}
.star-pupil{--tint:#e6f6ef;--tint-ring:#7fd1ad;position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;padding:22px 12px 18px;border-radius:22px;background:linear-gradient(180deg,var(--tint),color-mix(in srgb,var(--tint) 35%,var(--surface)));border:1.5px solid color-mix(in srgb,var(--tint-ring) 35%,transparent);color:var(--ink);transition:transform .18s var(--ease),box-shadow .18s}
.star-pupil:hover{transform:translateY(-3px);box-shadow:var(--shadow-lift)}
.star-pupil:active{transform:scale(.97)}
.star-pupil[aria-disabled=true]{opacity:.55}
.tint-mint{--tint:#e3f6ec;--tint-ring:#5cc18f}.tint-sky{--tint:#e3f0fb;--tint-ring:#5a9ee0}.tint-sand{--tint:#fbf1dc;--tint-ring:#e0a93b}.tint-rose{--tint:#fbe6ea;--tint-ring:#e0708a}.tint-lilac{--tint:#eee8fb;--tint-ring:#9a7fe0}.tint-peach{--tint:#fdeadf;--tint-ring:#ef9461}
html.dark .star-pupil{--tint:color-mix(in srgb,var(--tint-ring) 16%,var(--surface))}
.star-pupil-photo{width:92px;height:92px;border-radius:50%;padding:4px;background:conic-gradient(from 210deg,var(--tint-ring),color-mix(in srgb,var(--tint-ring) 30%,#fff),var(--tint-ring));box-shadow:0 6px 14px #0000001a}
.star-pupil-photo img{width:100%;height:100%;border-radius:50%;object-fit:cover;border:3px solid var(--surface);display:block}
.star-pupil strong{font-size:15.5px;margin-top:6px}
.star-pupil>small{font-size:11.5px}
.star-pill{margin-top:4px;display:inline-flex;align-items:center;gap:4px;background:var(--surface);border-radius:999px;padding:4px 14px;font-weight:800;font-variant-numeric:tabular-nums;box-shadow:0 2px 6px #0000000f}
.star-pill span{color:var(--amber)}
.today-delta{position:absolute;top:12px;left:12px;font-size:11px;font-weight:700;border-radius:999px;padding:2px 8px;background:#12a36f1f;color:#0d7e55}
.today-delta.down{background:#e5484d1f;color:#b3262c}
.float-delta{position:absolute;top:26%;left:50%;transform:translateX(-50%);font-size:30px;font-weight:900;pointer-events:none;animation:float-up 1.2s var(--ease) forwards;text-shadow:0 2px 8px #0003}
.flash-up .float-delta{color:#12a36f}.flash-down .float-delta{color:var(--coral)}
.flash-up{animation:pop-up .5s var(--ease)}.flash-down{animation:shake .45s}
@keyframes float-up{0%{opacity:0;transform:translate(-50%,10px) scale(.6)}25%{opacity:1;transform:translate(-50%,-6px) scale(1.15)}100%{opacity:0;transform:translate(-50%,-48px) scale(1)}}
@keyframes pop-up{40%{transform:scale(1.05)}}
@keyframes shake{20%,60%{transform:translateX(-5px)}40%,80%{transform:translateX(5px)}}
/* Timer */
.timer-panel{text-align:center;padding-bottom:6px}
.sound-pill{border-radius:999px;padding:6px 16px;font-weight:700;font-size:13px;background:var(--surface-alt);color:var(--muted);border:1.5px solid var(--line)}
.sound-pill.on{background:#e5f6ee;color:#0d7e55;border-color:#9fd9bd}
.timer-ring{position:relative;width:220px;height:220px;margin:18px auto 6px}
.timer-ring svg{width:100%;height:100%;transform:rotate(-90deg)}
.ring-track{fill:none;stroke:var(--surface-alt);stroke-width:12}
.ring-progress{fill:none;stroke:var(--teal);stroke-width:12;stroke-linecap:round;transition:stroke-dashoffset .25s linear}
.timer-display{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);font-size:52px;font-weight:800;font-variant-numeric:tabular-nums;color:var(--ink);background:transparent;border-radius:12px;padding:0 8px;direction:ltr}
.timer-display:not(:disabled):hover{background:var(--surface-alt)}
.timer-display:disabled{opacity:1;cursor:default}
.timer-input{width:150px;text-align:center;border:2px solid var(--teal);background:var(--surface)}
.timer-help{font-size:12.5px}
.timer-presets{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin:16px 0 12px}
.preset{min-width:56px;min-height:40px;border-radius:999px;background:var(--surface);border:1.5px solid var(--line);font-weight:700;color:var(--ink)}
.preset.active{background:var(--teal);border-color:var(--teal);color:#fff}
.timer-nudge{display:flex;align-items:center;justify-content:center;gap:12px;font-size:13px;color:var(--muted)}
.timer-actions{display:grid;grid-template-columns:2fr 1fr;gap:10px;margin-top:20px}
.timer-start{background:linear-gradient(135deg,#f0b429,#d9820a);min-height:50px;font-size:16px}
.timer-start:not(:disabled):hover{box-shadow:0 8px 20px #d9820a40}
/* Random pupil & groups */
.random-pupil .pupil-photo{width:110px!important;height:110px!important;border:4px solid var(--teal);animation:pop-up .5s var(--ease)}
.random-pupil p{font-size:17px;font-weight:700;color:var(--teal)}
.random-group{border:1px solid var(--line)}
/* Categories editor */
.category-editor{display:flex;flex-direction:column;gap:8px;margin:6px 0 14px;max-height:46vh;overflow:auto;padding:2px}
.category-row{display:grid;grid-template-columns:96px 56px 1fr 64px 40px;gap:8px;align-items:center}
.category-row input,.category-row select{min-height:42px;border-radius:10px;border:1.5px solid var(--line);background:var(--surface);color:var(--ink);padding:6px 9px;width:100%}
.emoji-input{text-align:center;font-size:20px}
.category-row select{padding-left:26px}
:fullscreen .shell{margin-right:0}:fullscreen .sidebar,:fullscreen .topbar{display:none}
@media(max-width:900px){.class-tools{grid-template-columns:1fr}.stars-page .stars-hero{padding:22px 14px 0}.stars-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}.star-pupil-photo{width:76px;height:76px}}
@media(max-width:680px){.mode-option{min-width:0;flex:1}.mode-switch{align-self:stretch}.category-grid{grid-template-columns:repeat(2,1fr)}.stars-grid{grid-template-columns:repeat(2,1fr)}.category-row{grid-template-columns:1fr 56px 64px 40px}.category-row input[name^=label]{grid-column:1/-1;order:-1}.timer-ring{width:190px;height:190px}.timer-display{font-size:44px}.stars-toolbar{flex-direction:column;align-items:stretch}.stars-toolbar-actions{justify-content:flex-end}}
@media(prefers-reduced-motion:reduce){.view,.float-delta,.flash-up,.flash-down,.timer-chip.running,.random-pupil .pupil-photo{animation:none!important}.star-pupil,.class-tool,.category-card,.btn{transition:none!important}}

/* ═══════════ ملاحظات الطلاب v2 ═══════════ */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.notes-tabs{display:inline-flex;gap:4px;padding:5px;border-radius:14px;background:var(--surface);border:1px solid var(--line);margin-bottom:18px}
.notes-tabs button,.segmented button{border-radius:10px;padding:8px 16px;min-height:40px;background:transparent;color:var(--muted);font-weight:700;font-size:14px}
.notes-tabs button.active,.segmented button.active{background:var(--teal);color:#fff}
.segmented{display:inline-flex;gap:3px;padding:4px;border-radius:12px;background:var(--surface-alt);border:1px solid var(--line)}
.segmented.small button{min-height:34px;padding:5px 12px;font-size:13px}
.notes-filters{margin-bottom:18px;display:flex;gap:14px;flex-wrap:wrap}
.notes-filters .field{margin:0;min-width:200px}
.notes-layout{display:grid;grid-template-columns:320px minmax(0,1fr);gap:20px;align-items:start}
.notes-roster{padding:16px;position:sticky;top:105px;max-height:calc(100dvh - 125px);display:flex;flex-direction:column}
.roster-head h2{font-size:17px;display:flex;align-items:center;gap:8px}
.roster-head small{background:var(--teal-soft);color:var(--teal);border-radius:999px;padding:1px 10px;font-size:12px;font-weight:700}
.roster-search input{width:100%;margin:12px 0 8px;min-height:44px;border-radius:12px;border:1.5px solid var(--line);background:var(--surface-alt);padding:9px 14px;color:var(--ink)}
.roster-search input:focus{outline:none;border-color:var(--teal);background:var(--surface);box-shadow:0 0 0 4px color-mix(in srgb,var(--teal) 15%,transparent)}
.roster-list{overflow:auto;display:flex;flex-direction:column;gap:4px;margin:0 -6px;padding:0 6px}
.roster-item{display:flex;align-items:center;gap:12px;padding:10px;border-radius:14px;background:transparent;color:var(--ink);text-align:right;border:1.5px solid transparent;width:100%}
.roster-item:hover{background:var(--surface-alt)}
.roster-item.selected{background:var(--teal-soft);border-color:color-mix(in srgb,var(--teal) 35%,transparent)}
.roster-item img{width:44px;height:44px;border-radius:50%;object-fit:cover;flex-shrink:0;border:2px solid var(--surface);box-shadow:0 0 0 2px var(--line)}
.roster-item.selected img{box-shadow:0 0 0 2px var(--teal)}
.roster-name{flex:1;min-width:0;display:flex;flex-direction:column}
.roster-name strong{font-size:14.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.roster-name small{font-size:12px}
.roster-badges{display:flex;gap:4px}
.mini-badge{min-width:26px;height:24px;border-radius:999px;display:inline-grid;place-items:center;padding:0 7px;font-size:12px;font-weight:800;background:var(--surface-alt);color:var(--muted);font-variant-numeric:tabular-nums}
.roster-item.selected .mini-badge{background:var(--surface)}
.mini-badge.concern{background:#fdecec;color:#b3262c}
.notes-detail{display:flex;flex-direction:column;gap:18px;min-width:0}
.student-strip{display:flex;align-items:center;gap:18px;flex-wrap:wrap;padding:20px 22px;background:linear-gradient(120deg,var(--surface),var(--teal-soft))!important}
.strip-photo{width:72px;height:72px;border-radius:50%;object-fit:cover;border:3px solid var(--surface);box-shadow:0 0 0 3px var(--teal)}
.strip-id{display:flex;flex-direction:column;flex:1;min-width:160px}
.strip-id h2{font-size:21px}
.strip-stats{display:grid;grid-template-columns:repeat(4,auto);gap:8px;margin:0}
.strip-stats div{background:var(--surface);border-radius:14px;padding:8px 14px;text-align:center;min-width:84px;border:1px solid var(--line)}
.strip-stats dt{font-size:11.5px;color:var(--muted)}
.strip-stats dd{margin:0;font-size:20px;font-weight:800;font-variant-numeric:tabular-nums}
.strip-stats .positive dd{color:#0d7e55}.strip-stats .concern dd{color:#b3262c}
.timeline-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.lesson-timeline{list-style:none;margin:0;padding:0;position:relative}
.lesson-timeline:before{content:'';position:absolute;top:18px;bottom:18px;right:19px;width:2px;background:var(--line)}
.lesson-row{position:relative;display:flex;gap:16px;padding-bottom:14px}
.week-dot{position:relative;z-index:1;width:40px;height:40px;flex-shrink:0;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:14px;background:var(--surface);border:2px solid var(--line);color:var(--muted)}
.lesson-row.has-notes .week-dot{background:var(--teal);border-color:var(--teal);color:#fff}
.lesson-row.composing .week-dot{border-color:var(--amber);background:#fff6e0;color:#9a6200}
.lesson-body{flex:1;min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:14px 16px;box-shadow:var(--shadow)}
.lesson-row:not(.has-notes):not(.composing) .lesson-body{background:transparent;box-shadow:none;border-style:dashed}
.lesson-row.composing .lesson-body{border-color:color-mix(in srgb,var(--amber) 60%,transparent);box-shadow:0 8px 24px #e9a51418}
.lesson-row-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.lesson-row-head h3{font-size:15px;line-height:1.6}
.lesson-empty{font-size:12.5px}
.lesson-note{margin-top:12px;padding:12px 14px;border-radius:12px;background:var(--surface-alt);border-right:4px solid var(--line)}
.lesson-note.tone-positive{border-right-color:#12a36f;background:color-mix(in srgb,#12a36f 7%,var(--surface))}
.lesson-note.tone-concern{border-right-color:var(--coral);background:color-mix(in srgb,#e5484d 7%,var(--surface))}
.lesson-note.tone-neutral{border-right-color:#7b8ca8}
.lesson-note p{margin:8px 0 4px!important;font-size:14.5px;line-height:1.85;white-space:pre-wrap}
.lesson-note-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:12.5px;color:var(--muted)}
.note-tools{margin-right:auto;display:flex;gap:4px}
.icon-btn.small{width:32px;height:32px;font-size:14px;border-radius:9px}
.tone-badge{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:2px 10px;font-size:12px;font-weight:700;background:#eef1f6;color:#4b5b74}
.tone-badge.tone-positive{background:#e3f6ec;color:#0d7e55}.tone-badge.tone-concern{background:#fdecec;color:#b3262c}
.note-composer{margin-top:12px;display:flex;flex-direction:column;gap:12px}
.tone-switch{display:flex;gap:6px;flex-wrap:wrap}
.tone-option{display:inline-flex;align-items:center;gap:6px;min-height:38px;padding:6px 14px;border-radius:999px;background:var(--surface-alt);color:var(--muted);font-weight:700;font-size:13px;border:1.5px solid var(--line)}
.tone-option.active.tone-positive{background:#12a36f;border-color:#12a36f;color:#fff}
.tone-option.active.tone-neutral{background:#55667f;border-color:#55667f;color:#fff}
.tone-option.active.tone-concern{background:var(--coral);border-color:var(--coral);color:#fff}
.phrase-chips{display:flex;gap:6px;flex-wrap:wrap}
.phrase-chip{border-radius:999px;padding:5px 12px;font-size:12.5px;background:var(--surface);border:1px dashed color-mix(in srgb,var(--teal) 45%,var(--line));color:var(--teal);font-weight:600}
.phrase-chip:hover{background:var(--teal-soft);border-style:solid}
.note-text{position:relative;display:block}
.note-text textarea{width:100%;min-height:96px;resize:vertical;border-radius:14px;border:1.5px solid var(--line);background:var(--surface);color:var(--ink);padding:12px 14px 26px;font-size:15px;line-height:1.8}
.note-text textarea:focus{outline:none;border-color:var(--teal);box-shadow:0 0 0 4px color-mix(in srgb,var(--teal) 15%,transparent)}
.char-count{position:absolute;bottom:8px;left:12px;font-size:11px}
.composer-footer{display:flex;align-items:end;justify-content:space-between;gap:12px;flex-wrap:wrap}
.composer-date{display:flex;flex-direction:column;gap:4px;font-size:12.5px;font-weight:600}
.composer-date input{min-height:38px;border-radius:10px;border:1.5px solid var(--line);background:var(--surface);color:var(--ink);padding:5px 10px}
.composer-footer .actions{display:flex;gap:8px}
.notes-feed .lesson-note{margin:0 0 12px}
.notes-feed .lesson-note-head strong{color:var(--ink);font-size:14.5px}
@media(max-width:1150px){.notes-layout{grid-template-columns:270px minmax(0,1fr)}.strip-stats{grid-template-columns:repeat(2,auto)}}
@media(max-width:900px){.notes-layout{grid-template-columns:1fr}.notes-roster{position:static;max-height:none}.roster-list{flex-direction:row;overflow-x:auto;padding-bottom:6px;scroll-snap-type:x mandatory}.roster-item{flex-direction:column;width:auto;min-width:104px;text-align:center;scroll-snap-align:start}.roster-name small,.roster-badges .mini-badge:not(.concern){display:none}.roster-name strong{font-size:12.5px;max-width:96px}}
@media(max-width:680px){.strip-stats{grid-template-columns:repeat(2,1fr);width:100%}.lesson-timeline:before{right:15px}.week-dot{width:32px;height:32px;font-size:12px}.lesson-row{gap:10px}.lesson-row-head{flex-direction:column;align-items:flex-start}.composer-footer .actions{width:100%}.composer-footer .actions .btn{flex:1}.notes-tabs{display:flex}.notes-tabs button{flex:1}}
.notes-filters .field{max-width:320px;flex:1}
.composing-label{font-size:12.5px;font-weight:700;color:#9a6200;background:#fff6e0;border-radius:999px;padding:3px 10px}

/* ═══════════ توقيت الدروس في الرئيسية ═══════════ */
.schedule-card{margin-bottom:24px;padding:20px 22px}
.schedule-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.schedule-head h2{display:flex;align-items:center;gap:8px;font-size:18px}
.schedule-head h2 span{color:var(--teal)}
.schedule-date{font-size:13px;color:var(--muted);background:var(--surface-alt);border:1px solid var(--line);border-radius:999px;padding:4px 12px}
.today-lessons{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.today-lesson{display:flex;align-items:center;gap:16px;padding:12px 14px;border-radius:14px;border:1.5px solid var(--line);background:var(--surface)}
.today-lesson.live{border-color:var(--teal);background:linear-gradient(120deg,var(--teal-soft),var(--surface));box-shadow:0 8px 22px color-mix(in srgb,var(--teal) 14%,transparent)}
.today-lesson.done{opacity:.65}
.lesson-clock{display:flex;flex-direction:column;align-items:center;min-width:64px;padding:6px 8px;border-radius:12px;background:var(--surface-alt);font-variant-numeric:tabular-nums}
.lesson-clock b{font-size:18px;line-height:1.3}
.lesson-clock small{font-size:12px}
.today-lesson.live .lesson-clock{background:var(--teal);color:#fff}.today-lesson.live .lesson-clock small{color:#d6efe9}
.lesson-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.lesson-info strong{font-size:15.5px}
.lesson-info small{font-size:12.5px}
.lesson-progress{height:6px;border-radius:99px;background:color-mix(in srgb,var(--teal) 15%,transparent);margin-top:6px;overflow:hidden}
.lesson-progress span{display:block;height:100%;background:var(--teal);border-radius:99px;transition:width .4s}
.lesson-status{flex-shrink:0;font-size:12.5px;font-weight:700;border-radius:999px;padding:4px 12px;white-space:nowrap}
.lesson-status.upcoming{background:#fff6e0;color:#9a6200}
.lesson-status.done{background:var(--surface-alt);color:var(--muted)}
.lesson-status.live{background:var(--teal);color:#fff;display:inline-flex;align-items:center;gap:6px}
.lesson-status.live i{width:8px;height:8px;border-radius:50%;background:#fff;animation:live-dot 1.4s ease-in-out infinite}
@keyframes live-dot{50%{opacity:.25}}
.no-lesson{display:flex;align-items:center;gap:14px;padding:14px 16px;border-radius:14px;background:var(--surface-alt);border:1.5px dashed var(--line)}
.no-lesson-icon{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;font-size:22px;background:var(--surface);color:var(--teal);flex-shrink:0}
.no-lesson strong{font-size:16px}
.no-lesson p{font-size:13px;color:var(--muted);margin-top:2px!important}
.next-lesson{display:flex;align-items:center;gap:14px;margin-top:12px;padding:12px 16px;border-radius:14px;border:1.5px solid color-mix(in srgb,var(--teal) 30%,var(--line));background:var(--surface)}
.next-label{font-size:12px;font-weight:800;color:var(--teal);background:var(--teal-soft);border-radius:10px;padding:6px 10px;white-space:nowrap}
.next-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.next-body strong{font-size:15px}.next-body span{font-size:13.5px}.next-body small{font-size:12px}
.next-when{font-size:13px;font-weight:700;color:var(--teal);white-space:nowrap}
.all-done{text-align:center;font-size:13px;color:var(--muted);margin-top:10px!important}
@media(max-width:680px){.today-lesson{flex-wrap:wrap;gap:10px}.lesson-status{margin-right:80px}.next-lesson{flex-wrap:wrap}.next-when{width:100%}}
@media(prefers-reduced-motion:reduce){.lesson-status.live i{animation:none}}
.time-range{display:inline-block;direction:ltr;unicode-bidi:isolate;font-variant-numeric:tabular-nums}

/* ═══════════ نجوم الصف الشهرية ═══════════ */
.month-stepper{display:inline-flex;align-items:center;gap:6px;background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:3px}
.month-stepper .icon-btn.small{width:30px;height:30px;border-radius:50%;border:0;font-size:18px;font-weight:800}
.month-stepper .icon-btn:disabled{opacity:.3}
.month-name{font-weight:800;font-size:13.5px;color:var(--teal);min-width:104px;text-align:center}
.archive-banner{display:flex;align-items:center;gap:14px;padding:14px 18px;border-radius:16px;background:#fff6e0;border:1.5px solid #f2d48a;color:#6b4a00}
html.dark .archive-banner{background:#3a2f12;border-color:#6b5520;color:#f6d77a}
.archive-banner>span{font-size:24px}
.archive-banner div{flex:1}
.archive-banner p{font-size:13px;opacity:.85}
.stars-page .podium-empty{color:#d6efe9;padding:30px 0 40px;font-size:15px}
.star-pupil[aria-disabled=true]:hover{transform:none;box-shadow:none}
@media(max-width:680px){.archive-banner{flex-wrap:wrap}.archive-banner .btn{width:100%}.month-stepper{width:100%;justify-content:space-between}}
.stars-page .pedestal .pedestal-month{display:block;font-size:19px;font-weight:800;letter-spacing:-.2px}
.stars-page .rank-1 .pedestal .pedestal-month{font-size:24px}
@media(max-width:680px){.stars-page .pedestal .pedestal-month{font-size:14px}.stars-page .rank-1 .pedestal .pedestal-month{font-size:17px}}
/* الطالب المثالي: منصة واحدة */
.stars-page .podium.single{justify-content:center}
.stars-page .podium.single .podium-place{width:min(280px,80%)}
.ideal-crown{font-size:30px;color:#f6c34a;line-height:1;margin-bottom:6px;text-shadow:0 4px 12px #0003}
.stars-page .podium.single .pupil-photo{width:104px!important;height:104px!important}
.stars-page .podium.single .pupil-identity strong{font-size:17px}
.tie-note{display:block;color:#f6d77a;font-size:12.5px;margin:-4px 0 8px}
.stars-page .podium.single .pedestal{height:92px}

/* ═══════════ فحص الجودة · أكتوبر 2026 ═══════════ */
/* Gradebook: one row per student instead of a tall form per student */
.gradebook-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:6px 0 4px}
.gradebook-progress{font-size:13px;background:var(--teal-soft);color:var(--teal);border-radius:999px;padding:4px 12px;font-weight:700}
.gradebook{margin-top:12px;border:1px solid var(--line);border-radius:14px}
.gradebook table{width:100%;border-collapse:collapse}
.gradebook th,.gradebook td{padding:10px 8px;border-bottom:1px solid var(--line);text-align:right;vertical-align:middle}
.gradebook thead th{position:sticky;top:0;z-index:1;white-space:nowrap}
.gradebook th small{display:block;font-weight:600;font-size:11px;color:var(--muted)}
.gradebook tbody th{font-weight:700;min-width:160px}
.gradebook tbody th small{display:block;font-weight:500}
.gradebook .num{text-align:center}
.gradebook input[type=number]{width:72px;min-height:40px;text-align:center;border-radius:10px;border:1.5px solid var(--line);background:var(--surface);color:var(--ink);font-variant-numeric:tabular-nums;padding:6px}
.gradebook input[type=number]:focus{outline:none;border-color:var(--teal);box-shadow:0 0 0 3px color-mix(in srgb,var(--teal) 18%,transparent)}
.gradebook input:invalid:not(:placeholder-shown):not(:focus){border-color:var(--coral)}
.gradebook .teacher-total{font-size:17px;font-variant-numeric:tabular-nums}
.gradebook tbody tr:last-child>*{border-bottom:0}
/* Contrast fixes found by axe */
.mode-option.reward.active{background:#0b7f56}
.status-button.late,.status-button[aria-pressed=true].late{color:#6f4a05}
.calendar-legend .event-lesson{color:#1d4ed8}
.pupil-identity small{font-size:11px}
/* Larger touch target for switches */
.toggle{min-height:28px;width:48px}
/* Collapsible demo role switcher */
.dev-toggle{margin-inline-start:auto;border-radius:8px;padding:3px 9px;font-size:12px;font-weight:700;background:var(--surface-alt);color:var(--muted);border:1px solid var(--line)}
.dev-caption{display:flex;align-items:center;gap:8px}
body.dev-collapsed #role-buttons,body.dev-collapsed .dev-caption small{display:none}
body.dev-collapsed .dev-menu{padding:6px 10px}
.gradebook tbody th,.gradebook thead th:first-child{position:sticky;right:0;background:var(--surface);z-index:2;box-shadow:-1px 0 0 var(--line)}
.gradebook thead th:first-child{z-index:3;background:var(--surface-alt)}
@media(max-width:1200px){.gradebook input[type=number]{width:56px;min-height:38px}.gradebook th,.gradebook td{padding:8px 5px}.gradebook tbody th{min-width:130px}}

/* ═══════════ إرسال إشعار v2 ═══════════ */
.modal.modal-wide{width:min(1040px,100%)}
.notify-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);gap:22px;align-items:start}
.notify-compose,.notify-recipients{display:flex;flex-direction:column;gap:10px;min-width:0}
.notify-recipients{background:var(--surface-alt);border:1px solid var(--line);border-radius:18px;padding:16px}
.notify-step{display:flex;align-items:center;gap:9px;font-size:15.5px;margin:6px 0 2px}
.notify-step span{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:var(--teal);color:#fff;font-size:13px;font-weight:800}
.notify-templates{display:flex;gap:6px;flex-wrap:wrap}
.notify-form .field{margin:4px 0}
.notify-form .field>span{display:flex;justify-content:space-between;align-items:baseline}
.char-hint{font-weight:500;font-size:11.5px;color:var(--muted);font-variant-numeric:tabular-nums}
.notify-form textarea{min-height:120px;resize:vertical}
.send-mode{display:flex;width:100%}
.send-mode label{flex:1;cursor:pointer}
.send-mode input{position:absolute;opacity:0;pointer-events:none}
.send-mode span{display:block;text-align:center;border-radius:10px;padding:9px 12px;font-weight:700;font-size:14px;color:var(--muted)}
.send-mode input:checked+span{background:var(--teal);color:#fff}
.send-mode input:focus-visible+span{outline:3px solid #6bbbac;outline-offset:2px}
.notify-schedule{display:flex;flex-direction:column;gap:4px}
.notify-schedule input{min-height:44px;border-radius:11px;border:1.5px solid var(--line);background:var(--surface);color:var(--ink);padding:8px 12px}
.notify-preview{margin-top:6px;border:1.5px dashed var(--line);border-radius:16px;padding:12px}
.notify-preview-label{font-size:11.5px;font-weight:700;color:var(--muted)}
.notify-preview-card{display:flex;gap:12px;margin-top:8px;background:var(--surface);border-radius:14px;padding:12px 14px;box-shadow:var(--shadow);border-right:4px solid var(--teal)}
.notify-bell{width:38px;height:38px;flex-shrink:0;border-radius:12px;display:grid;place-items:center;background:var(--teal-soft)}
.notify-preview-card strong{font-size:14.5px;display:block}
.notify-preview-card p{font-size:13.5px;color:var(--muted);margin:3px 0!important;white-space:pre-wrap;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.recipient-groups{display:flex;gap:6px;flex-wrap:wrap}
.audience-chip{min-height:36px!important;padding:6px 12px!important;border-radius:999px!important;background:var(--surface)!important;color:var(--ink)!important;border:1.5px solid var(--line)!important;font-size:13px!important;box-shadow:none!important}
.audience-chip:not(:disabled):hover{border-color:var(--teal)!important;color:var(--teal)!important;transform:none}
.recipient-filters{display:flex;gap:10px;flex-wrap:wrap}
.recipient-filters .field{flex:1;min-width:150px}
.recipient-filters .grow{flex:1.4}
#select-team-recipients:disabled{display:none}
.recipient-summary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px;border-radius:12px;background:var(--surface);border:1px solid var(--line);font-size:13px}
.recipient-summary b{color:var(--teal);font-size:15px}
.notify-recipients .recipient-list{max-height:340px;overflow:auto;display:flex;flex-direction:column;gap:10px;padding:2px;margin:0;border:0;background:transparent}
.recipient-block{display:flex;flex-direction:column;gap:4px}
.recipient-block:not(:has(.recipient-row:not([hidden]))){display:none}
.recipient-block-head{position:sticky;top:0;z-index:1;font-size:12.5px;font-weight:800;color:var(--muted);background:var(--surface-alt);padding:4px 2px}
.recipient-block-head small{background:var(--surface);border-radius:999px;padding:0 7px;margin-inline-start:4px}
.notify-recipients .recipient-row{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:12px;background:var(--surface);border:1.5px solid transparent;cursor:pointer;margin:0}
.notify-recipients .recipient-row:hover{border-color:var(--line)}
.notify-recipients .recipient-row input{position:absolute;opacity:0;pointer-events:none}
.notify-recipients .recipient-row:has(input:checked){border-color:var(--teal);background:color-mix(in srgb,var(--teal-soft) 70%,var(--surface))}
.notify-recipients .recipient-row:has(input:focus-visible){outline:3px solid #6bbbac;outline-offset:1px}
.recipient-avatar{width:34px;height:34px;flex-shrink:0;border-radius:50%;display:grid;place-items:center;background:var(--teal-soft);color:var(--teal);font-weight:800}
.recipient-name{flex:1;min-width:0;display:flex;flex-direction:column;font-size:14px;font-weight:600}
.recipient-name small{font-size:11.5px;font-weight:500;color:var(--muted)}
.recipient-check{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;border:2px solid var(--line);color:transparent;font-size:13px;font-weight:900;flex-shrink:0}
.recipient-row:has(input:checked) .recipient-check{background:var(--teal);border-color:var(--teal);color:#fff}
.notify-actions{position:sticky;bottom:-25px;background:var(--surface);padding:14px 0 25px;margin:16px 0 -25px;border-top:1px solid var(--line);z-index:3}
#notify-submit{min-width:190px}
@media(max-width:900px){.notify-grid{grid-template-columns:1fr}.notify-recipients{order:0}.notify-recipients .recipient-list{max-height:300px}}

/* ═══════════ لوحة المشرف v2 ═══════════ */
/* Smoother modals: blurred backdrop fades, dialog rises */
.modal-overlay{animation:overlay-in .22s ease both;background:rgba(10,25,30,.42)}
.modal{animation:modal-in .28s var(--ease) both}
@keyframes overlay-in{from{opacity:0;backdrop-filter:blur(0)}to{opacity:1}}
@keyframes modal-in{from{opacity:0;transform:translateY(14px) scale(.97)}to{opacity:1;transform:none}}
.modal.modal-medium{width:min(720px,100%)}
/* Badges shown everywhere a pupil appears */
.pupil-badge{display:inline-flex;align-items:center;gap:3px;margin-inline-start:6px;vertical-align:middle;border-radius:999px;padding:1px 8px;font-size:11px;font-weight:800;white-space:nowrap;line-height:1.7}
.pupil-badge.ideal{background:linear-gradient(135deg,#fff3c4,#fde68a);color:#7a5200;border:1px solid #f4d06f}
.pupil-badge.monitor{background:#e0ecff;color:#1e4fa8;border:1px solid #b9d0f6}
html.dark .pupil-badge.ideal{background:#3d3214;color:#f6d77a;border-color:#6b5520}
html.dark .pupil-badge.monitor{background:#16284a;color:#9cc0ff;border-color:#2b4677}
.star-pupil .pupil-badge{margin:0}
/* Ideal student premium card */
.ideal-card{position:relative;overflow:hidden;isolation:isolate;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:28px 32px;border-radius:24px;margin-bottom:24px;color:#fff;background:linear-gradient(120deg,#0d4f47 0%,#14786c 55%,#1f9a89 100%);box-shadow:0 18px 40px #0d4f4733}
.ideal-glow{position:absolute;inset:-40% -10% auto auto;width:420px;height:420px;border-radius:50%;background:radial-gradient(circle,#f6c34a55,transparent 65%);z-index:-1}
.ideal-card:after{content:'';position:absolute;inset:0;z-index:-1;background:radial-gradient(circle at 12% 30%,#ffffff1f 0 2px,transparent 3px) 0 0/46px 46px;opacity:.7}
.ideal-eyebrow{color:#f6d77a;font-weight:800;font-size:13px}
.ideal-copy h2{font-size:28px;margin:8px 0 4px;color:#fff}
.ideal-copy p{color:#d6efe9;font-size:14.5px;max-width:520px}
.ideal-copy .actions{margin-top:18px;display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.ideal-btn{background:linear-gradient(135deg,#f6c34a,#d9941a)!important;color:#4a3000!important;font-weight:800;box-shadow:0 8px 20px #d9941a55!important}
.ideal-meta{font-size:13px;color:#d6efe9;background:#ffffff1a;border-radius:999px;padding:5px 12px}
.ideal-portrait{position:relative;flex-shrink:0}
.ideal-portrait img{width:128px;height:128px;border-radius:50%;object-fit:cover;border:5px solid #f6c34a;box-shadow:0 0 0 8px #f6c34a33,0 14px 30px #0005}
.ideal-medal{position:absolute;bottom:2px;left:2px;width:40px;height:40px;border-radius:50%;display:grid;place-items:center;font-size:20px;color:#5a3b00;background:linear-gradient(145deg,#ffe08a,#e7a81a);box-shadow:0 4px 10px #0004}
.ideal-placeholder{width:128px;height:128px;border-radius:50%;display:grid;place-items:center;font-size:44px;font-weight:800;color:#f6d77a;border:3px dashed #f6d77a88;background:#ffffff12}
/* Teachers */
.teacher-mini{display:flex;align-items:center;gap:12px}
.teacher-mini>div{flex:1;min-width:0}
.teacher-mini h3{font-size:15px}
/* Behaviour log */
.behavior-log{margin-bottom:22px}
.behavior-log>.muted{font-size:13px;margin:-6px 0 12px}
.clickable-row{cursor:pointer;transition:background .15s}
.clickable-row:hover,.clickable-row:focus-visible{background:color-mix(in srgb,#e5484d 6%,var(--surface))!important;outline:none}
.clickable-row:focus-visible{box-shadow:inset 3px 0 0 var(--coral)}
.row-pupil{display:flex;align-items:center;gap:10px;font-weight:700}
.row-pupil img{width:36px;height:36px;border-radius:50%;object-fit:cover;flex-shrink:0}
.behavior-table td small{color:var(--muted);font-size:11px}
.severity{display:inline-block;border-radius:999px;padding:2px 10px;font-size:12px;font-weight:800}
.severity.high{background:#fdecec;color:#a8232a}.severity.mid{background:#fff3d6;color:#7a5200}.severity.low{background:var(--surface-alt);color:var(--muted)}
/* Directory */
.student-directory .section-heading{flex-wrap:wrap}
.export-btn{background:linear-gradient(135deg,#1d8a4e,#146c3c)!important}
.phone-cell{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}
.wa-link{display:inline-flex;align-items:center;gap:6px;color:#128c4b;font-weight:700;border-radius:999px;padding:4px 10px;background:#e7f8ee;text-decoration:none;font-variant-numeric:tabular-nums}
.wa-link:hover{background:#d2f2df}
.wa-link.demo{color:var(--muted);background:var(--surface-alt)}
.wa-icon{width:18px;height:18px;flex-shrink:0}
.mono{font-variant-numeric:tabular-nums}
.toggle[aria-checked=true]{background:#2f6fd6}
/* Notify teacher modal */
.teacher-picker{border:0;padding:0;margin:0 0 12px;display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
.teacher-picker legend{font-weight:700;font-size:13px;margin-bottom:8px}
.teacher-option{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:14px;border:1.5px solid var(--line);cursor:pointer;background:var(--surface)}
.teacher-option input{position:absolute;opacity:0;pointer-events:none}
.teacher-option:has(input:checked){border-color:var(--teal);background:var(--teal-soft)}
.teacher-option:has(input:focus-visible){outline:3px solid #6bbbac;outline-offset:2px}
.teacher-option .avatar{width:38px;height:38px;font-size:16px}
.teacher-option strong{display:block;font-size:14px}.teacher-option small{color:var(--muted);font-size:12px}
.teacher-option.all{border-style:dashed}
/* Ideal candidates */
.candidate-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.candidate{display:flex;align-items:center;gap:12px;padding:12px;border-radius:16px;border:1.5px solid var(--line);background:var(--surface)}
.candidate.top{border-color:#f4d06f;background:linear-gradient(120deg,#fffbeb,var(--surface))}
html.dark .candidate.top{background:linear-gradient(120deg,#2d2611,var(--surface))}
.candidate .rank{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;font-weight:800;background:var(--surface-alt);flex-shrink:0}
.candidate.top .rank{background:linear-gradient(145deg,#ffe08a,#e7a81a);color:#5a3b00}
.candidate img{width:44px;height:44px;border-radius:50%;object-fit:cover;flex-shrink:0}
.candidate-info{flex:1;min-width:0}
.candidate-metrics{display:flex;gap:10px;flex-wrap:wrap;font-size:12px;color:var(--muted);margin:2px 0 6px}
.score-bar{height:6px;border-radius:99px;background:var(--surface-alt);overflow:hidden}
.score-bar span{display:block;height:100%;background:linear-gradient(90deg,var(--teal),#f6c34a);border-radius:99px}
.candidate-score{text-align:center;min-width:48px}
.candidate-score b{display:block;font-size:20px;font-variant-numeric:tabular-nums}.candidate-score small{color:var(--muted);font-size:11px}
/* Behaviour detail modal */
.behavior-head{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:12px;border-radius:16px;background:var(--surface-alt);margin:8px 0 14px}
.behavior-head img{width:56px;height:56px;border-radius:50%;object-fit:cover}
.behavior-head>div{flex:1;display:flex;flex-direction:column;gap:2px}
.behavior-head dl{display:flex;gap:8px;margin:0}
.behavior-head dl div{background:var(--surface);border-radius:12px;padding:6px 12px;text-align:center;border:1px solid var(--line)}
.behavior-head dt{font-size:11px;color:var(--muted)}.behavior-head dd{margin:0;font-weight:800;font-size:18px}
.behavior-timeline{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px;max-height:46vh;overflow:auto}
.behavior-timeline li{display:flex;gap:12px;padding:12px;border-radius:14px;border:1px solid var(--line);border-right:4px solid var(--coral);background:color-mix(in srgb,#e5484d 5%,var(--surface))}
.behavior-timeline li.note{border-right-color:#d9941a;background:color-mix(in srgb,#e9a514 6%,var(--surface))}
.behavior-timeline .dot{width:34px;height:34px;flex-shrink:0;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:13px;background:#fdecec;color:#a8232a}
.behavior-timeline li.note .dot{background:#fff3d6;color:#7a5200}
.behavior-timeline li>div{flex:1;min-width:0}
.entry-meta{display:flex;justify-content:space-between;gap:8px;font-size:13px}.entry-meta time{color:var(--muted)}
.behavior-timeline p{margin:4px 0!important;font-size:14.5px}
.behavior-timeline .empty-entry{border:0;background:none}
.wa-btn{color:#128c4b!important;border-color:#a7e3c2!important;gap:6px;text-decoration:none}
@media(max-width:900px){.ideal-card{flex-direction:column-reverse;text-align:center;padding:24px 18px}.ideal-copy .actions{justify-content:center}.ideal-copy p{margin:auto}.teacher-picker{grid-template-columns:1fr}}
@media(max-width:680px){.candidate{flex-wrap:wrap}.candidate .btn{width:100%}.behavior-head dl{width:100%}.behavior-head dl div{flex:1}}
@media(prefers-reduced-motion:reduce){.modal,.modal-overlay{animation:none}}
.behavior-head>div .pupil-badge{align-self:flex-start;margin:2px 0}
.phone-cell{flex-wrap:nowrap}
.wa-link{white-space:nowrap}
.student-directory table{min-width:600px}
.student-directory .wa-link{font-size:14.5px;padding:6px 12px}
.behavior-head .wa-link{align-self:flex-start;margin-top:4px}
.wa-link.compact{font-size:12.5px;padding:2px 9px;gap:4px}.wa-link.compact .wa-icon{width:15px;height:15px}
.report-student{background:var(--surface)}

/* ── Drive course-progress sheets (v7.3) ── */
.drive-banner{border-inline-start:3px solid var(--teal)}
.drive-banner strong{display:flex;align-items:center;gap:6px}
.drive-banner p{margin:6px 0 0}
.week-pills{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end;align-items:center;margin-inline-start:auto}
.week-occasion{display:inline-block;margin:0 0 10px;padding:4px 10px;border-radius:8px;background:var(--surface-alt);color:var(--ink);font-size:13px}
.plan-date .pill{align-self:flex-start;width:fit-content;margin-top:4px}
.dev-menu[hidden]{display:none!important}

/* ── v8.1: login by ID, team-scoped events ── */
.login-hints{display:grid;gap:6px;margin:-4px 0 16px;padding:12px 14px;border-radius:12px;background:var(--teal-soft);font-size:13px;color:var(--ink);text-align:start}
.login-hints span{display:flex;align-items:center;gap:8px}
.login-hints .icon{width:16px;height:16px;color:var(--teal)}
.team-range{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.team-range select:disabled{opacity:.55}
.event-audience{color:var(--teal);font-weight:600}
.calendar-event small{display:block;font-size:10.5px;opacity:.8;font-weight:500}
@media(max-width:520px){.team-range{grid-template-columns:1fr}}
