/* V31: layout/footer/toast/actions/modal refinements */
:root{--modal-overlay-layer:5000;--modal-content-layer:5100;--toast-layer:99999}
#toastRoot{z-index:var(--toast-layer)!important;isolation:isolate}.toast{z-index:calc(var(--toast-layer) + 1)!important}.modal{z-index:var(--modal-overlay-layer)!important}.modal .modal-box{z-index:var(--modal-content-layer)!important}

.main{min-height:100dvh}.main>.page-enter{min-width:0}.page-enter,.panel,.table-card,.side-card,.stat-card,.quick-tile,.task-card,.student-cell,.user-cell{min-width:0}.page-enter b,.page-enter small,.quick-tile b,.quick-tile small,.task-card b,.task-card small,.student-cell b,.student-cell small,.user-cell b,.user-cell small{overflow-wrap:anywhere}.truncate-one,.quick-tile b,.quick-tile small,.task-card b,.task-card small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}

.teacher-dashboard{display:grid;gap:18px}.teacher-dashboard-hero{min-height:142px;padding:28px 32px}.teacher-dashboard-stats{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(210px,1fr))!important;gap:14px!important;margin-bottom:0!important}.teacher-dashboard-stats .stat-card{min-height:116px;padding:16px 18px}.teacher-dashboard-stats .stat-card strong{font-size:28px}.teacher-dashboard-stats .stat-card span{line-height:1.55}.teacher-dashboard-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,.75fr);gap:18px;align-items:stretch}.teacher-dashboard-panel{margin:0!important}.teacher-class-list,.teacher-task-list{display:grid;gap:12px}.teacher-class-tile{display:grid!important;grid-template-columns:48px minmax(0,1fr) 64px;gap:14px;align-items:center;padding:16px!important;border:1px solid var(--border);border-radius:18px;background:var(--surface-2)}.teacher-class-tile>i{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;background:var(--primary-soft);color:var(--primary);font-size:23px}.teacher-class-tile span{min-width:0}.teacher-class-tile strong{justify-self:end;font-size:16px}.teacher-class-tile .progress{margin-top:7px}.schedule-row{min-width:0}.schedule-row b,.schedule-row small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}

.site-footer{margin:38px 0 16px;border:1px solid color-mix(in srgb,var(--primary) 14%,var(--border));border-radius:30px;background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 7%,transparent),color-mix(in srgb,var(--gold) 5%,transparent)),var(--surface);box-shadow:var(--shadow-soft);overflow:hidden;flex-shrink:0}.site-footer__main{display:grid;grid-template-columns:1.2fr repeat(3,minmax(170px,.75fr));gap:24px;padding:26px}.site-footer__brand{display:flex;align-items:flex-start;gap:14px;min-width:0}.site-footer__brand img{width:58px;height:58px;object-fit:contain;filter:drop-shadow(0 10px 20px rgba(0,169,199,.14))}.site-footer h2,.site-footer h3{margin:0;color:var(--text);font-weight:900}.site-footer h2{font-size:20px}.site-footer h3{font-size:14px;margin-bottom:12px}.site-footer p{margin:6px 0 0;color:var(--text-muted);line-height:1.9;font-size:12px}.site-footer nav,.site-footer__contact{display:grid;gap:8px}.site-footer a,.site-footer__contact span{display:flex;align-items:center;gap:9px;color:var(--text-muted);font-size:12px;font-weight:800;min-width:0}.site-footer a:hover{color:var(--primary)}.site-footer i{width:24px;height:24px;min-width:24px;border-radius:9px;display:grid;place-items:center;background:var(--surface-2);color:var(--primary)}.site-footer__contact b,.site-footer a span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.site-footer__bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 22px;background:linear-gradient(90deg,color-mix(in srgb,var(--primary) 88%,#092236),color-mix(in srgb,var(--primary) 62%,#092236));color:#fff}.site-footer__bottom span,.site-footer__bottom a{color:#fff;font-size:12px;font-weight:900}.site-footer__bottom a i{background:rgba(255,255,255,.12);color:#fff}

.table-card,.table-scroll{contain:layout}.table-card.menu-open,.table-card:has(.row-menu[open]),.table-scroll.menu-open,.table-scroll:has(.row-menu[open]){overflow:visible!important;contain:none!important;z-index:300!important;position:relative}.row-actions.compact-row-actions{display:inline-flex;gap:7px;align-items:center;flex-wrap:nowrap}.row-menu{position:relative;z-index:400}.row-menu-pop{z-index:9000!important;max-height:min(70vh,420px);overflow:auto;overscroll-behavior:contain}.row-menu-pop a,.row-menu-pop button{white-space:normal!important;line-height:1.5}.row-menu-pop .danger-text{color:var(--danger)!important}.row-menu[open] .row-menu-pop{animation:rowMenuIn .12s ease both}@keyframes rowMenuIn{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}

.modal-box{border-radius:28px!important;padding:0!important;overflow:hidden}.modal-box>h2,.modal-box>.modal-title-row,.modal-box>.class-form-head{margin:0!important;padding:22px 24px 16px;border-bottom:1px solid var(--border);background:radial-gradient(circle at top right,color-mix(in srgb,var(--primary) 10%,transparent),transparent 44%),var(--surface)}.modal-box>h2{font-size:21px}.modal-box>p.muted,.modal-box>.muted{margin:0;padding:12px 24px;border-bottom:1px solid var(--border);background:var(--surface-2)}.modal-box>form,.modal-box>.form,.modal-box>.modal-form-body{padding:20px 24px 24px}.modal-box .form{gap:14px}.modal-box .actions.full,.modal-box .form .actions.full{margin-top:4px;padding-top:14px;border-top:1px solid var(--border)}.modal-close{z-index:3}.modal-box .class-form-head{border-radius:0!important;border-width:0 0 1px!important;background:radial-gradient(circle at top right,color-mix(in srgb,var(--primary) 10%,transparent),transparent 44%),var(--surface)!important}.class-form-head h2{font-size:22px}.class-form-actions .btn{min-width:190px}.form-section-title{grid-column:1/-1;display:flex;align-items:center;gap:8px;margin:2px 0 -2px;padding:9px 12px;border-radius:14px;background:var(--surface-2);color:var(--text);font-size:13px;font-weight:900}.form-section-title i{color:var(--primary)}.student-form{gap:14px}.student-form .btn.full{margin-top:6px}.enrollment-form .info-card,.lifecycle-form .info-card{grid-column:1/-1}

.progress-attendance-choice{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;padding:10px;border:1px solid var(--border);border-radius:18px;background:var(--surface-2)}.progress-attendance-choice label{display:flex!important;align-items:center;justify-content:center;gap:8px;border:1px solid var(--border);border-radius:14px;padding:11px;background:var(--surface);cursor:pointer;text-align:center}.progress-attendance-choice input{width:auto!important}.progress-attendance-choice label:has(input:checked){border-color:color-mix(in srgb,var(--primary) 55%,var(--border));background:var(--primary-soft);color:var(--primary)}

@media(max-width:1100px){.teacher-dashboard-grid,.site-footer__main{grid-template-columns:1fr 1fr}.site-footer__brand{grid-column:1/-1}.teacher-dashboard-hero{padding:22px}}
@media(max-width:720px){.teacher-dashboard-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}.teacher-dashboard-grid,.site-footer__main{grid-template-columns:1fr}.teacher-class-tile{grid-template-columns:42px minmax(0,1fr)}.teacher-class-tile strong{grid-column:2;justify-self:start}.site-footer{border-radius:22px;margin-top:24px}.site-footer__main{padding:20px}.site-footer__bottom{align-items:stretch;flex-direction:column;text-align:center}.modal-box>h2,.modal-box>.class-form-head{padding:18px 18px 13px}.modal-box>form,.modal-box>.form,.modal-box>.modal-form-body{padding:16px 18px 20px}.progress-attendance-choice{grid-template-columns:1fr}.grid-form{grid-template-columns:1fr!important}}
