@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;600;700;800&display=swap");
:root{--ink:#10233e;--muted:#65738a;--line:#dbe3ed;--accent:#1a66ff;--accent2:#0b45b5;--bg:#eef3f9;--danger:#b42318;--success:#067647}*{box-sizing:border-box}body{margin:0;font-family:"Noto Sans",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;background:var(--bg);color:var(--ink)}button,input,select{font:inherit}.shell{min-height:100vh;display:grid;grid-template-columns:minmax(320px,.9fr) minmax(520px,1.1fr)}.brand-panel{background:linear-gradient(145deg,#071b36,#0d3c76 70%,#1260b7);color:#fff;padding:clamp(42px,7vw,100px);display:flex;flex-direction:column;justify-content:center;position:relative;overflow:hidden}.brand-panel:after{content:"";position:absolute;width:420px;height:420px;border:1px solid rgba(255,255,255,.15);border-radius:50%;right:-180px;bottom:-180px;box-shadow:0 0 0 70px rgba(255,255,255,.04),0 0 0 140px rgba(255,255,255,.03)}.brand-mark{width:54px;height:54px;border-radius:16px;background:#fff;color:#0d3c76;display:grid;place-items:center;font-weight:900;font-size:20px;margin-bottom:40px}.eyebrow{font-weight:800;letter-spacing:.16em;font-size:12px;opacity:.8}.eyebrow.dark{color:var(--accent);opacity:1}.brand-panel h1{font-size:clamp(36px,5vw,68px);line-height:1.02;max-width:760px;margin:10px 0 24px}.brand-panel>p:not(.eyebrow){font-size:18px;line-height:1.7;max-width:620px;color:#d9e6f7;margin-bottom:36px}.feature{margin:12px 0;color:#eaf2ff}.feature span{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;background:rgba(255,255,255,.15);margin-right:10px}.auth-panel{background:#fff;padding:clamp(28px,6vw,80px);overflow:auto}.tabs{display:flex;border-bottom:1px solid var(--line);margin-bottom:34px}.tab{border:0;background:transparent;padding:14px 20px;font-weight:800;color:var(--muted);border-bottom:3px solid transparent;cursor:pointer}.tab.active{color:var(--accent);border-color:var(--accent)}.form{display:none;max-width:760px;margin:auto;gap:20px}.form.active{display:grid}.form h2{font-size:clamp(28px,4vw,42px);margin:6px 0 10px}.muted{color:var(--muted);margin:0}.grid.two{display:grid;grid-template-columns:1fr 1fr;gap:18px}label{display:grid;gap:8px;font-weight:700;font-size:14px}input,select{width:100%;border:1px solid var(--line);border-radius:12px;padding:13px 14px;background:#fff;color:var(--ink);outline:none;transition:.2s}input:focus,select:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(26,102,255,.12)}.password-wrap{position:relative}.password-wrap input{padding-right:100px}.show-password{position:absolute;right:8px;top:7px;border:0;background:#eef4ff;color:var(--accent2);padding:7px 10px;border-radius:8px;cursor:pointer;font-size:12px;font-weight:800}.primary{border:0;border-radius:12px;padding:14px 20px;background:linear-gradient(135deg,var(--accent),var(--accent2));color:#fff;font-weight:800;cursor:pointer;box-shadow:0 10px 25px rgba(26,102,255,.22)}.primary:disabled{opacity:.55;cursor:not-allowed}.message{max-width:760px;margin:0 auto 20px;padding:13px 16px;border-radius:10px;background:#fff3f2;color:var(--danger);border:1px solid #fecdca}.message.success{background:#ecfdf3;color:var(--success);border-color:#abefc6}.field-error{min-height:0;color:var(--danger);font-weight:600}.hint{color:var(--muted);font-weight:500}.hint.good{color:var(--success)}.hint.bad{color:var(--danger)}.consent{grid-template-columns:auto 1fr;align-items:start;font-weight:500;color:var(--muted)}.consent input{width:18px;height:18px;margin-top:2px}@media(max-width:900px){.shell{grid-template-columns:1fr}.brand-panel{min-height:380px}.auth-panel{padding:32px 20px}}@media(max-width:600px){.grid.two{grid-template-columns:1fr}.brand-panel{padding:42px 24px}.brand-panel h1{font-size:40px}}

/* Application dashboard */
.app-body{min-height:100vh;background:#f4f7fb;color:var(--ink);--surface:#fff;--surface2:#f8fafc;--shadow:0 16px 40px rgba(16,35,62,.08)}.app-body.dark{--ink:#edf3fb;--muted:#9fb0c5;--line:#26374c;--surface:#101b2a;--surface2:#162438;background:#09111d;color:var(--ink)}.topbar{height:72px;position:sticky;top:0;z-index:20;background:var(--surface);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 24px}.app-brand{display:flex;align-items:center;gap:12px;color:var(--ink);text-decoration:none}.app-brand span{width:40px;height:40px;display:grid;place-items:center;border-radius:12px;background:linear-gradient(135deg,var(--accent),var(--accent2));color:#fff;font-weight:900}.top-actions{display:flex;align-items:center;gap:10px}.icon-btn,.avatar{width:42px;height:42px;border:1px solid var(--line);border-radius:12px;background:var(--surface2);color:var(--ink);display:grid;place-items:center;text-decoration:none;cursor:pointer;font-weight:900}.avatar{border-radius:50%;background:var(--accent);color:#fff}.app-shell{display:grid;grid-template-columns:220px minmax(0,1fr);min-height:calc(100vh - 72px)}.sidebar{background:var(--surface);border-right:1px solid var(--line);padding:22px 14px;display:flex;flex-direction:column;justify-content:space-between}.sidebar nav{display:grid;gap:6px}.sidebar a,.sidebar button.sidebar-search-trigger{display:flex;align-items:center;gap:12px;padding:8px 12px;border-radius:12px;color:var(--muted);text-decoration:none;font-weight:400;font-size:1rem}.sidebar a.active,.sidebar a:hover{background:#eaf1ff;color:var(--accent)}.dark .sidebar a.active,.dark .sidebar a:hover{background:#172d52}.logout{color:var(--danger)!important;font-size:1rem}.dashboard-main{padding:24px;max-width:1500px;width:100%;margin:auto}.welcome{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:18px}.welcome h1,.settings-title h1{font-size:clamp(28px,4vw,44px);margin:4px 0}.welcome p{margin:4px 0;color:var(--muted)}.date-card{min-width:92px;text-align:center;background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:12px;box-shadow:var(--shadow)}.date-card b{display:block;font-size:28px}.date-card span{color:var(--muted);font-size:13px}.quick-grid{display:grid;grid-template-columns:repeat(5,minmax(130px,1fr));gap:12px;margin-bottom:16px}.quick-grid button{min-height:92px;border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:18px;padding:14px;display:grid;place-items:center;gap:8px;font-weight:800;cursor:pointer;box-shadow:0 8px 22px rgba(16,35,62,.05)}.quick-grid button:first-letter{font-size:22px;color:var(--accent)}.quick-grid .primary-action{background:linear-gradient(135deg,var(--accent),var(--accent2));color:#fff;border:0}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:16px}.stats article{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:16px}.stats small{color:var(--muted);font-weight:700}.stats strong{float:right;font-size:24px}.panel{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:20px;box-shadow:var(--shadow)}.panel h2{margin:4px 0 16px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:20px}.secondary,.danger{border:1px solid var(--line);background:var(--surface2);color:var(--ink);border-radius:11px;padding:11px 14px;text-decoration:none;font-weight:800;cursor:pointer}.danger{background:#fff1f0;color:var(--danger);border-color:#fecdca}.assignment-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.assignment-list article{display:flex;align-items:center;gap:12px;background:var(--surface2);border:1px solid var(--line);padding:14px;border-radius:15px}.assignment-list article div:nth-child(2){display:grid;gap:4px;flex:1}.assignment-list span,.empty span{color:var(--muted);font-size:13px}.course-icon{width:42px;height:42px;border-radius:12px;background:#eaf1ff;color:var(--accent);display:grid;place-items:center}.more{border:0;background:transparent;color:var(--muted)}.empty{grid-column:1/-1;padding:34px;text-align:center;border:1px dashed var(--line);border-radius:16px;display:grid;gap:8px}.modal{position:fixed;inset:0;z-index:50;background:rgba(4,12,24,.55);display:grid;place-items:center;padding:20px}.modal[hidden]{display:none}.modal-card{width:min(520px,100%);background:var(--surface);border-radius:20px;padding:24px;position:relative;box-shadow:0 30px 80px rgba(0,0,0,.25)}.modal-close{position:absolute;right:15px;top:12px;border:0;background:transparent;font-size:28px;color:var(--muted);cursor:pointer}.modal-card form,#modalFields{display:grid;gap:14px}.settings-page{padding:28px;max-width:1200px;margin:auto}.settings-title{margin-bottom:20px}.settings-title p{color:var(--muted)}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.settings-form,.settings-actions{display:grid;gap:14px}.danger-zone{border-color:#fecdca}.danger-zone small{display:block;color:var(--muted);margin-top:8px}
@media(max-width:1050px){.quick-grid{grid-template-columns:repeat(3,1fr)}.app-shell{grid-template-columns:82px 1fr}.sidebar a{justify-content:center;font-size:0}.sidebar a span{font-size:20px}.app-brand b{display:none}}
@media(max-width:720px){.topbar{height:62px;padding:0 14px}.app-shell{display:block}.sidebar{position:fixed;bottom:0;left:0;right:0;z-index:30;height:68px;border-right:0;border-top:1px solid var(--line);padding:7px;background:var(--surface)}.sidebar nav{grid-template-columns:repeat(8,1fr);gap:2px}.sidebar a{padding:8px 4px}.sidebar .logout{display:none}.dashboard-main{padding:16px 14px 88px}.quick-grid{grid-template-columns:repeat(2,1fr)}.quick-grid button{min-height:82px}.stats{grid-template-columns:1fr}.assignment-list{grid-template-columns:1fr}.settings-grid{grid-template-columns:1fr}.settings-page{padding:18px 14px 88px}.welcome{align-items:flex-start}.date-card{display:none}}

/* GTranslate language switcher */
.language-switcher{min-height:42px;display:flex;align-items:center;gap:8px;padding:5px 10px;border:1px solid var(--line);border-radius:12px;background:var(--surface2,#f8fafc);color:var(--ink);white-space:nowrap}
.language-icon{font-size:18px;line-height:1;color:var(--accent);font-weight:900}
.gtranslate_wrapper{display:flex;align-items:center;min-width:112px}
.gtranslate_wrapper select,.gtranslate_wrapper .gt_selector{width:auto;min-width:112px;max-width:160px;border:0!important;box-shadow:none!important;background:transparent!important;color:var(--ink)!important;padding:5px 24px 5px 2px!important;font-size:13px!important;font-weight:750!important;cursor:pointer}
.gtranslate_wrapper option{color:#10233e;background:#fff}
.auth-language{position:fixed;top:18px;right:18px;z-index:40}
.auth-language .language-switcher{--surface2:#fff;box-shadow:0 8px 24px rgba(16,35,62,.12)}
@media(max-width:720px){.language-switcher{padding:4px 8px}.language-icon{display:none}.gtranslate_wrapper{min-width:96px}.gtranslate_wrapper select,.gtranslate_wrapper .gt_selector{min-width:96px;max-width:112px;font-size:12px!important}.top-actions{gap:6px}.auth-language{top:10px;right:10px}}
@media(max-width:430px){.topbar .language-switcher{border:0;background:transparent;padding:0}.topbar .gtranslate_wrapper{min-width:82px}.topbar .gtranslate_wrapper select,.topbar .gtranslate_wrapper .gt_selector{min-width:82px;max-width:92px;padding-right:18px!important}.topbar .avatar{display:none}}

/* Unified header controls and roster workflow */
.theme-combo{display:flex!important;align-items:center;justify-content:center;gap:2px;padding:0 7px!important;font-size:16px}.theme-combo span{line-height:1}.theme-combo span:first-child{opacity:1}.theme-combo span:last-child{opacity:.38}.dark .theme-combo span:first-child{opacity:.38}.dark .theme-combo span:last-child{opacity:1}.quick-action{min-height:92px;border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:18px;padding:14px;display:grid;place-items:center;gap:8px;font-weight:800;cursor:pointer;box-shadow:0 8px 22px rgba(16,35,62,.05);text-decoration:none}.quick-action:first-letter{font-size:22px;color:var(--accent)}
.roster-page{max-width:1450px}.import-card{display:grid;gap:18px}.format-grid{display:grid;grid-template-columns:repeat(7,minmax(115px,1fr));gap:8px;overflow-x:auto}.format-grid span{background:var(--surface2);border:1px solid var(--line);border-radius:10px;padding:9px 10px;font-size:12px;font-weight:750;white-space:nowrap}.file-drop{border:2px dashed var(--line);border-radius:18px;padding:28px;text-align:center;cursor:pointer;background:var(--surface2)}.file-drop:hover{border-color:var(--accent)}.file-drop b,.file-drop span{display:block}.file-drop span{margin-top:6px;color:var(--muted);font-weight:500}.inline-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.compact-badge,.status-pill{border-radius:999px;padding:7px 10px;background:var(--surface2);border:1px solid var(--line);font-size:12px;font-weight:800}.conflict-list{display:grid;gap:8px;max-height:54vh;overflow:auto;padding-right:4px}.conflict-row{display:flex;align-items:center;justify-content:space-between;gap:16px;border:1px solid var(--line);background:var(--surface2);border-radius:13px;padding:11px 13px}.conflict-row>div:first-child,.conflict-info{display:grid;gap:3px;min-width:0}.conflict-row span{color:var(--muted);font-size:12px}.conflict-row.conflict{border-left:4px solid #f79009}.conflict-row.invalid{opacity:.75}.conflict-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.conflict-actions label{display:flex;align-items:center;gap:5px;border:1px solid var(--line);border-radius:999px;padding:6px 9px;font-size:12px;font-weight:700;cursor:pointer}.conflict-actions input{width:auto}.status-pill.good{color:var(--success);background:#ecfdf3;border-color:#abefc6}.status-pill.bad{color:var(--danger);background:#fff3f2;border-color:#fecdca}.sticky-actions{position:sticky;bottom:0;background:var(--surface);padding-top:14px}.compact-table-wrap{max-height:68vh;overflow:auto;border:1px solid var(--line);border-radius:14px}.compact-table{width:100%;border-collapse:collapse;font-size:12px}.compact-table th{position:sticky;top:0;background:var(--surface2);z-index:1;text-align:left;padding:9px 10px;border-bottom:1px solid var(--line)}.compact-table td{padding:7px 10px;border-bottom:1px solid var(--line);white-space:nowrap}.compact-table tr:hover td{background:var(--surface2)}.notes-cell{max-width:260px;overflow:hidden;text-overflow:ellipsis}.empty-cell{text-align:center!important;padding:30px!important;color:var(--muted)}
@media(max-width:900px){.format-grid{grid-template-columns:repeat(7,130px)}.conflict-row{align-items:flex-start;flex-direction:column}.conflict-actions{justify-content:flex-start}.quick-action{min-height:82px}}
@media(max-width:520px){.conflict-actions{display:grid;width:100%}.conflict-actions label{border-radius:10px}.inline-actions>*{width:100%;text-align:center}.compact-table-wrap{max-height:62vh}}
/* v5 accessibility, conflict comparison and administrator console */
.app-body.dark .settings-form input,.app-body.dark .settings-form select,.app-body.dark .settings-actions input[type=file]{background:#fff!important;color:#111!important;border-color:#8d99a8!important}.app-body.dark .settings-form input::placeholder{color:#555!important}.app-body.dark .settings-form option{color:#111;background:#fff}
.conflict-stack{display:grid;align-items:stretch;gap:10px}.record-card{border:1px solid var(--line);border-radius:12px;padding:12px;background:var(--surface)}.record-card>b{display:block;margin-bottom:9px;color:var(--accent)}.old-record>b{color:#b54708}.record-grid{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:8px}.record-grid label{gap:4px;font-size:11px;color:var(--muted)}.record-grid strong{min-height:38px;padding:9px;border-radius:8px;background:var(--surface2);color:var(--ink);font-size:12px}.record-grid input{padding:9px;border-radius:8px;font-size:12px;background:#fff;color:#111}.record-grid input.missing-field{border:2px solid var(--danger);background:#fff3f2}.comparison-arrow{text-align:center;color:var(--muted);font-size:12px;font-weight:800}.inline-warning{color:var(--danger);font-size:12px;font-weight:800}.editable-row{align-items:stretch;flex-direction:column}.admin-stats{grid-template-columns:repeat(4,1fr)}.admin-actions{display:flex;gap:6px}.admin-actions button{padding:7px 9px;font-size:11px;white-space:nowrap}.admin-table td{vertical-align:middle}.admin-page{max-width:1600px}
@media(max-width:950px){.record-grid{grid-template-columns:repeat(2,minmax(130px,1fr))}.admin-stats{grid-template-columns:repeat(2,1fr)}}
@media(max-width:520px){.record-grid{grid-template-columns:1fr}.admin-stats{grid-template-columns:1fr}.admin-actions{flex-direction:column}}
.admin-login-hint{text-align:center;font-size:12px;margin:0}
/* v6 consistency fixes */
.theme-toggle{font-size:18px;line-height:1}
.app-body.dark input,.app-body.dark select,.app-body.dark textarea{background:#fff;color:#111;border-color:#8d99a8}
.app-body.dark input::placeholder,.app-body.dark textarea::placeholder{color:#555}
.app-body.dark option{background:#fff;color:#111}
.app-body.dark .language-switcher,.app-body.dark .language-switcher *{color:#fff!important}
.app-body.dark .gtranslate_wrapper option{color:#111!important;background:#fff!important}
.entity-summary{margin:0;padding:11px 13px;border:1px solid var(--line);border-radius:11px;background:var(--surface2);color:var(--ink);font-weight:800}
.modal-card select:disabled{opacity:.7;cursor:not-allowed}
.toast-box{position:fixed;right:18px;top:78px;z-index:100;display:grid;gap:8px}.toast{min-width:260px;max-width:420px;padding:13px 15px;border-radius:12px;background:var(--surface);border:1px solid var(--line);box-shadow:0 16px 40px rgba(0,0,0,.18);font-weight:750}.toast.good{border-left:4px solid var(--success)}.toast.bad{border-left:4px solid var(--danger)}.filter-bar{display:flex;gap:10px;flex-wrap:wrap;align-items:end;margin-bottom:16px}.filter-bar input,.filter-bar select{min-width:160px;flex:1}.backup-preview{display:grid;gap:4px;padding:12px;border:1px solid var(--line);border-radius:11px;background:var(--surface2)}@media(max-width:650px){.filter-bar>*{width:100%;flex-basis:100%}.toast-box{left:12px;right:12px}.toast{min-width:0;max-width:none}}
.gt-hidden{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;opacity:0!important;pointer-events:none!important}
.modern-language-select{appearance:none;border:0;background:transparent;color:var(--ink);font:inherit;font-weight:800;min-width:132px;padding:5px 28px 5px 2px;cursor:pointer;background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);background-position:calc(100% - 13px) 50%,calc(100% - 8px) 50%;background-size:5px 5px,5px 5px;background-repeat:no-repeat}
.modern-language-select option{color:#10233e;background:#fff}.app-body.dark .modern-language-select{color:#111827!important;background:#fff!important}.language-switcher{max-width:190px}.language-icon{font-size:16px;font-weight:900;color:var(--accent)}
.class-plan-page{padding:24px;max-width:1450px;margin:auto}.class-plan-toolbar{display:flex;align-items:end;gap:18px;justify-content:space-between;margin-bottom:16px}.class-plan-toolbar h1{margin:4px 0}.class-plan-toolbar label{min-width:240px}.classroom{position:relative;min-height:720px;padding:42px 72px 95px 28px;overflow:auto;background:linear-gradient(135deg,var(--surface),var(--surface2))}.desk-grid{display:grid;grid-template-columns:repeat(4,minmax(155px,1fr));gap:28px 22px;max-width:1000px;margin:auto}.double-desk{display:grid;grid-template-columns:1fr 1fr;background:#b98555;border:4px solid #7d5430;border-radius:13px;padding:7px;box-shadow:0 10px 18px rgba(0,0,0,.13)}.seat-slot{min-height:78px;border:1px dashed rgba(255,255,255,.55);border-radius:8px;padding:5px;display:grid;place-items:center}.student-chip{width:100%;min-height:58px;border:0;border-radius:99px;background:#eef5ff;color:#17365f;font-weight:800;padding:7px;cursor:grab;line-height:1.2}.empty-seat{font-size:11px;color:#fff8;}.room-windows{position:absolute;right:10px;top:70px;bottom:120px;writing-mode:vertical-rl;display:grid;place-items:center;border-left:8px double #76bce9;color:var(--muted);padding-left:10px}.room-front{position:absolute;left:25px;right:70px;bottom:22px;display:grid;grid-template-columns:1fr 2fr 1fr;align-items:end;text-align:center}.door{justify-self:start;border:3px solid #8b5e3c;padding:28px 16px 6px;border-bottom:0}.board{background:#28493b;color:#fff;padding:14px;border:7px solid #a97b4e}.teacher-desk{justify-self:end;background:#b98555;border:4px solid #7d5430;padding:18px 30px;border-radius:8px}.standing-area{margin-top:30px;border:1px dashed var(--line);padding:12px;border-radius:14px}.standing-area>div{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.standing-area .student-chip{width:auto;min-height:auto}.student-profile{text-align:center}.student-avatar{width:72px;height:72px;border-radius:50%;background:var(--accent);color:#fff;display:grid;place-items:center;margin:auto;font-size:24px;font-weight:900}
@media(max-width:900px){.class-plan-toolbar{align-items:stretch;flex-direction:column}.desk-grid{grid-template-columns:repeat(2,minmax(145px,1fr))}.classroom{padding-right:52px}}
.automation-option{display:flex!important;align-items:flex-start!important;gap:10px;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--surface2)}.automation-option input{width:auto!important;margin-top:4px}.automation-option span{display:grid;gap:4px}.automation-option small{color:var(--muted)}

/* v9 translation isolation and authentication recovery */
.gtranslate_wrapper.gt-hidden{display:block!important;position:fixed!important;left:-10000px!important;top:-10000px!important;width:240px!important;height:40px!important;overflow:visible!important;opacity:.01!important;pointer-events:none!important;visibility:visible!important}
.gt_float_switcher,.gt_switcher_wrapper{display:none!important}
.language-switcher{display:flex!important;visibility:visible!important;position:relative!important;width:auto!important;height:auto!important;overflow:visible!important;opacity:1!important;pointer-events:auto!important}
.modern-language-select{display:block!important;visibility:visible!important;position:static!important;width:auto!important;height:auto!important;opacity:1!important;pointer-events:auto!important}
.auth-panel .tabs{position:sticky;top:0;z-index:5;background:#fff;padding-top:4px}
.auth-panel{scroll-behavior:smooth}
.signup-prompt{margin:2px 0 0;text-align:center;color:var(--muted);font-size:13px}
.signup-prompt button{border:0;background:transparent;color:var(--accent);font-weight:800;cursor:pointer;padding:0}
@media(max-width:600px){.auth-language{position:absolute}.shell{padding-top:58px}.brand-panel{min-height:310px}.auth-panel .tabs{top:-1px}}

/* v10: reliable language contrast */
.modern-language-select,.app-body.dark .modern-language-select,.app-body.dark .language-switcher .modern-language-select{color:#111827!important;background-color:#fff!important;border-radius:8px;padding-left:8px!important}
.modern-language-select optgroup,.modern-language-select option{color:#111827!important;background:#fff!important}

/* v10: class plan precision and fullscreen */
.classroom{display:grid;grid-template-columns:minmax(170px,230px) minmax(0,1fr);column-gap:24px;align-items:start;padding:42px 72px 95px 24px}
.desk-grid{grid-column:2;grid-template-columns:repeat(4,minmax(170px,1fr));gap:24px 20px;width:min(100%,1100px);max-width:none;margin:0 auto}
.standing-area{grid-column:1;grid-row:1;position:sticky;top:16px;margin:0;min-height:420px;max-height:620px;overflow:auto;background:var(--surface);z-index:2}
.standing-area>div{display:grid;grid-template-columns:1fr;gap:7px}
.double-desk{min-width:0;padding:6px;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.seat-slot{box-sizing:border-box;width:100%;min-width:0;height:72px;min-height:72px;padding:4px;overflow:hidden;transition:background .16s ease,border-color .16s ease,transform .16s ease,box-shadow .16s ease}
.student-chip{box-sizing:border-box;display:block;width:100%;max-width:100%;height:62px;min-height:62px;overflow:hidden;text-overflow:ellipsis;white-space:normal;border-radius:7px;padding:5px 4px;font-size:clamp(10px,.8vw,12px);font-weight:400;line-height:1.15;overflow-wrap:anywhere;transition:transform .16s ease,box-shadow .16s ease,border-radius .16s ease,opacity .16s ease}
.standing-area .student-chip{width:100%;height:auto;min-height:34px;white-space:nowrap;text-overflow:ellipsis;text-align:left;padding:7px 9px}
.student-chip.is-dragging{opacity:.45;transform:scale(.94)}
.seat-slot.drop-ready{border-style:solid;border-color:#4f8cff;background:rgba(79,140,255,.18);box-shadow:inset 0 0 0 2px rgba(79,140,255,.35);transform:scale(1.025)}
.seat-slot.drop-ready .student-chip{border-radius:7px;transform:scale(.96)}
.standing-area.drop-ready{border-color:#4f8cff;background:rgba(79,140,255,.1);box-shadow:inset 0 0 0 2px rgba(79,140,255,.2)}
.fullscreen-close{display:none;position:absolute;top:14px;right:18px;z-index:50;width:44px;height:44px;border:0;border-radius:50%;background:rgba(15,23,42,.86);color:#fff;font-size:30px;line-height:1;cursor:pointer}
.classroom:fullscreen,.classroom.is-fullscreen{width:100vw;height:100vh;max-width:none;margin:0;border-radius:0;padding:32px 28px 86px;grid-template-columns:minmax(120px,150px) minmax(0,1fr) minmax(120px,150px);column-gap:18px;overflow:auto;background:var(--surface2)}
.classroom:fullscreen .fullscreen-close,.classroom.is-fullscreen .fullscreen-close{display:grid;place-items:center}
.classroom:fullscreen .desk-grid,.classroom.is-fullscreen .desk-grid{grid-column:2;width:min(100%,1280px);grid-template-columns:repeat(4,minmax(190px,1fr));gap:28px 24px;align-self:center;justify-self:center}
.classroom:fullscreen .seat-slot,.classroom.is-fullscreen .seat-slot{height:82px;min-height:82px}
.classroom:fullscreen .student-chip,.classroom.is-fullscreen .student-chip{height:70px;min-height:70px;font-size:clamp(11px,1vw,14px)}
.classroom:fullscreen .standing-area,.classroom.is-fullscreen .standing-area{grid-column:1;width:100%;max-height:calc(100vh - 150px);min-height:520px}
.classroom:fullscreen .room-front,.classroom.is-fullscreen .room-front{left:178px;right:178px}
@media(max-width:1000px){.classroom{grid-template-columns:1fr;padding-left:20px}.standing-area{grid-column:1;grid-row:auto;position:static;min-height:auto;max-height:190px;margin-bottom:18px}.standing-area>div{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}.desk-grid{grid-column:1;grid-template-columns:repeat(2,minmax(150px,1fr))}.room-front{left:20px}}

/* v12: native GTranslate dropdown — single reliable control */
.language-switcher{
  display:flex!important;
  align-items:center;
  gap:8px;
  min-height:42px;
  max-width:230px;
  padding:5px 10px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff!important;
  color:#111827!important;
  overflow:visible!important;
}
.language-switcher .gtranslate_wrapper{
  display:block!important;
  position:static!important;
  width:auto!important;
  height:auto!important;
  min-width:132px;
  overflow:visible!important;
  opacity:1!important;
  visibility:visible!important;
  pointer-events:auto!important;
}
.language-switcher select.gt_selector,
.language-switcher .gt_selector,
.language-switcher select.goog-te-combo{
  display:block!important;
  min-width:132px!important;
  max-width:185px!important;
  margin:0!important;
  padding:6px 28px 6px 8px!important;
  border:0!important;
  border-radius:8px!important;
  outline:0!important;
  background-color:#fff!important;
  color:#111827!important;
  font:inherit!important;
  font-size:13px!important;
  font-weight:700!important;
  cursor:pointer!important;
  box-shadow:none!important;
}
.language-switcher select.gt_selector option,
.language-switcher select.gt_selector optgroup,
.language-switcher select.goog-te-combo option{
  background:#fff!important;
  color:#111827!important;
}
.app-body.dark .language-switcher,
.app-body.dark .language-switcher *{
  color:#111827!important;
}
.gt_float_switcher,.gt_switcher_wrapper,.gt_container--hich1m,.gt_container--rvaygv{display:none!important}
@media(max-width:600px){
  .language-switcher{max-width:180px;padding:4px 7px}
  .language-switcher .gtranslate_wrapper,
  .language-switcher select.gt_selector,
  .language-switcher select.goog-te-combo{min-width:105px!important;max-width:140px!important}
}


/* v13: direct GTranslate fd.js integration — no proxy selector */
.language-switcher{
  min-height:42px;
  display:flex!important;
  align-items:center!important;
  gap:7px;
  padding:5px 9px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff!important;
  color:#111827!important;
  overflow:visible!important;
}
.language-switcher .language-icon{color:var(--accent)!important}
.language-switcher .gtranslate_wrapper{display:block!important;min-width:128px;overflow:visible!important}
.language-switcher .gt_float_switcher,
.language-switcher .gt_switcher,
.language-switcher .gt_switcher_wrapper{
  position:relative!important;
  inset:auto!important;
  width:auto!important;
  min-width:128px!important;
  max-width:180px!important;
  box-shadow:none!important;
  border:0!important;
  background:#fff!important;
  color:#111827!important;
  font-family:inherit!important;
  z-index:1000!important;
}
.language-switcher .gt_float_switcher .gt-selected,
.language-switcher .gt_float_switcher .gt-current-lang,
.language-switcher .gt_switcher .selected,
.language-switcher .gt_switcher .selected a{
  background:#fff!important;
  color:#111827!important;
  border:0!important;
  font-family:inherit!important;
  font-size:13px!important;
  font-weight:700!important;
}
.language-switcher .gt_float_switcher .gt_options,
.language-switcher .gt_switcher .option{
  background:#fff!important;
  color:#111827!important;
  border:1px solid #dbe3ee!important;
  border-radius:10px!important;
  box-shadow:0 12px 32px rgba(15,23,42,.16)!important;
  max-height:280px!important;
  overflow-y:auto!important;
  z-index:99999!important;
}
.language-switcher .gt_float_switcher .gt_options a,
.language-switcher .gt_switcher .option a{
  color:#111827!important;
  background:#fff!important;
  font-family:inherit!important;
  font-size:13px!important;
}
.language-switcher .gt_float_switcher .gt_options a:hover,
.language-switcher .gt_switcher .option a:hover{background:#eef4ff!important}
/* Keep the selector compact: one language indicator, not a row of flags. */
.language-switcher .gt_float_switcher img,
.language-switcher .gt_switcher img{display:none!important}
.app-body.dark .language-switcher,
.app-body.dark .language-switcher *{color:#111827!important}
@media(max-width:720px){
  .language-switcher{padding:4px 7px}
  .language-switcher .gtranslate_wrapper,
  .language-switcher .gt_float_switcher,
  .language-switcher .gt_switcher{min-width:105px!important;max-width:138px!important}
}

/* v17: dynamic classroom layouts and fullscreen controls */
.desk-grid{grid-template-columns:repeat(var(--desk-columns,4),minmax(145px,1fr));width:100%;max-width:1200px}
.student-chip{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;overflow-wrap:normal!important;font-size:clamp(8px,.68vw,10.5px)!important;line-height:1!important;padding-left:3px!important;padding-right:3px!important}
.standing-area .student-chip{font-size:11px!important}
.fullscreen-plan-actions{display:none}
.classroom:fullscreen .fullscreen-plan-actions,.classroom.is-fullscreen .fullscreen-plan-actions{display:flex;position:fixed;top:14px;left:50%;transform:translateX(-50%);z-index:45;gap:8px;padding:7px;border:1px solid var(--line);border-radius:13px;background:color-mix(in srgb,var(--surface) 94%,transparent);box-shadow:0 10px 30px rgba(15,23,42,.2);backdrop-filter:blur(10px)}
.classroom:fullscreen .desk-grid,.classroom.is-fullscreen .desk-grid{grid-template-columns:repeat(var(--desk-columns,4),minmax(120px,1fr));width:min(100%,1500px);padding-top:54px}
.classroom:fullscreen .student-chip,.classroom.is-fullscreen .student-chip{font-size:clamp(8px,.72vw,11px)!important}
.layout-modal-card{max-width:520px}.layout-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:22px 0}.layout-form-grid label{display:grid;gap:7px;font-weight:700}.layout-capacity-info{padding:12px 14px;border-radius:10px;background:var(--surface2);border:1px solid var(--line);margin-bottom:18px}.layout-capacity-info.warning{background:#fff7ed;border-color:#fb923c;color:#9a3412}.modal-actions{display:flex;justify-content:flex-end;gap:10px}
@media(max-width:900px){.fullscreen-plan-actions{max-width:calc(100vw - 90px);overflow-x:auto;white-space:nowrap}}


/* v18: two-line student names inside desks */
.seat-slot .student-chip{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:2px;white-space:normal!important;text-overflow:clip!important;line-height:1.05!important}
.seat-slot .student-chip .student-first-name,
.seat-slot .student-chip .student-last-name{display:block;width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}
.seat-slot .student-chip .student-first-name{font-size:clamp(8px,.66vw,10.5px);font-weight:700}
.seat-slot .student-chip .student-last-name{font-size:clamp(8px,.66vw,10.5px);font-weight:800}
.standing-area .student-chip{display:block!important;white-space:nowrap!important}
.standing-area .student-chip .student-first-name,
.standing-area .student-chip .student-last-name{display:inline;width:auto;overflow:visible;text-overflow:clip;white-space:normal}
.standing-area .student-chip .student-first-name::after{content:' '}
.classroom:fullscreen .seat-slot .student-chip .student-first-name,
.classroom:fullscreen .seat-slot .student-chip .student-last-name,
.classroom.is-fullscreen .seat-slot .student-chip .student-first-name,
.classroom.is-fullscreen .seat-slot .student-chip .student-last-name{font-size:clamp(8px,.7vw,11px)}


/* v19: enforce a real two-row name stack inside desk seats */
.seat-slot > .student-chip .student-name-stack{
  display:grid!important;
  grid-template-rows:minmax(0,1fr) minmax(0,1fr)!important;
  align-items:center!important;
  width:100%!important;
  min-width:0!important;
  height:100%!important;
  overflow:hidden!important;
}
.seat-slot > .student-chip .student-name-stack > span{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  text-align:center!important;
}
.standing-area .student-name-stack{
  display:inline!important;
  width:auto!important;
  height:auto!important;
  overflow:visible!important;
}
.standing-area .student-name-stack > span{display:inline!important}
.standing-area .student-name-stack .student-first-name::after{content:' '}


/* v20: consistent typography, compact controls and adaptive classroom layout */
body,button,input,select,textarea{font-family:"Noto Sans",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}
.secondary,.danger{padding:8px 11px;border-radius:99px;font-size:13px;line-height:1.2}
.primary{padding:11px 16px;border-radius:10px;font-size:14px}
.inline-actions{gap:7px}.inline-actions button{min-height:34px}
.icon-btn,.avatar{width:38px;height:38px;border-radius:10px}
.ai-layout-btn:disabled{opacity:.58;cursor:not-allowed;border-style:dashed}

.desk-grid{
  grid-template-columns:repeat(var(--desk-columns,4),minmax(72px,1fr))!important;
  column-gap:var(--desk-gap-x,18px)!important;
  row-gap:var(--desk-gap-y,22px)!important;
  align-content:center;
}
.double-desk{padding:4px;border-width:3px;border-radius:10px}
.seat-slot{padding:3px}
.classroom[data-desk-columns="7"] .double-desk,
.classroom[data-desk-columns="8"] .double-desk,
.classroom[data-desk-columns="9"] .double-desk,
.classroom[data-desk-columns="10"] .double-desk{padding:3px;border-width:2px}
.classroom[data-desk-rows="7"] .seat-slot,
.classroom[data-desk-rows="8"] .seat-slot,
.classroom[data-desk-rows="9"] .seat-slot,
.classroom[data-desk-rows="10"] .seat-slot{height:62px;min-height:62px}
.classroom[data-desk-rows="7"] .student-chip,
.classroom[data-desk-rows="8"] .student-chip,
.classroom[data-desk-rows="9"] .student-chip,
.classroom[data-desk-rows="10"] .student-chip{height:54px;min-height:54px}

.standing-area>div{gap:3px!important;margin-top:5px!important}
.standing-area .student-chip{min-height:24px!important;height:24px!important;padding:2px 7px!important;font-size:10px!important;line-height:1!important;border-radius:6px!important}
.standing-area .student-name-stack{display:block!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}

.seat-slot > .student-chip{padding:3px!important}
.seat-slot > .student-chip .student-name-stack{
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  gap:0!important;
  line-height:.94!important;
}
.seat-slot .student-first-name{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:0!important;font-weight:700!important;font-size:clamp(7px,.62vw,10px)!important;line-height:.92!important}
.seat-slot .student-first-name-line{display:block!important;width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;text-align:center!important}
.seat-slot .student-last-name{font-weight:400!important;font-size:var(--surname-size,9.5px)!important;line-height:.96!important;white-space:nowrap!important;overflow:visible!important;text-overflow:clip!important;letter-spacing:-.02em}
.standing-area .student-first-name{display:inline!important;font-size:inherit!important;font-weight:600!important}
.standing-area .student-first-name-line{display:inline!important}
.standing-area .student-first-name-line:not(:last-child)::after{content:' '}
.standing-area .student-last-name{display:inline!important;font-size:inherit!important;font-weight:400!important}
.standing-area .student-first-name::after{content:' '!important}

.room-front{grid-template-columns:.7fr 2.4fr .9fr!important;align-items:end}
.teacher-desk{padding:10px 24px!important;min-height:38px;border-width:3px!important}
.door{padding:20px 8px 4px!important;border-width:2px!important;min-width:42px}
.classroom:fullscreen,.classroom.is-fullscreen{padding-bottom:72px!important}
.classroom:fullscreen .desk-grid,.classroom.is-fullscreen .desk-grid{
  grid-template-columns:repeat(var(--desk-columns,4),minmax(64px,1fr))!important;
  column-gap:var(--desk-gap-x,18px)!important;
  row-gap:var(--desk-gap-y,22px)!important;
  max-height:calc(100vh - 150px);
}
.classroom:fullscreen .room-front,.classroom.is-fullscreen .room-front{bottom:12px!important}
.fullscreen-plan-actions{gap:6px!important;padding:5px!important}
.fullscreen-plan-actions button{padding:7px 10px!important;font-size:12px!important}

/* v21: classroom name readability, compact translation banner and accessible global search */
.seat-slot .student-first-name,
.seat-slot .student-last-name{
  font-weight:400!important;
}
.seat-slot > .student-chip .student-name-stack{
  gap:2px!important;
  line-height:1!important;
}
.seat-slot .student-first-name{font-weight:400!important}
.seat-slot .student-last-name{font-weight:400!important}

.language-switcher{max-width:168px!important}
.language-switcher .gtranslate_wrapper,
.language-switcher .gt_float_switcher,
.language-switcher .gt_switcher{min-width:108px!important;max-width:146px!important}

.sidebar button.sidebar-search-trigger{
  width:100%;border:0;background:transparent;color:var(--muted);display:flex;align-items:center;gap:12px;
  padding:8px 12px;border-radius:12px;font:inherit;font-weight:700;text-align:left;cursor:pointer;
}
.sidebar button.sidebar-search-trigger:hover,
.sidebar button.sidebar-search-trigger:focus-visible{background:#eaf1ff;color:var(--accent);outline:0}
.dark .sidebar button.sidebar-search-trigger:hover,
.dark .sidebar button.sidebar-search-trigger:focus-visible{background:#172d52}
.sidebar-search-trigger kbd{margin-left:auto;font-size:10px;font-weight:600;color:var(--muted);border:1px solid var(--line);border-bottom-width:2px;border-radius:5px;padding:1px 5px;background:var(--surface2)}

body.search-open{overflow:hidden}
.search-dialog{position:fixed;inset:0;z-index:100;display:grid;place-items:start center;padding:clamp(70px,12vh,130px) 18px 24px}
.search-dialog[hidden]{display:none}
.search-dialog-backdrop{position:absolute;inset:0;background:rgba(5,14,29,.62);backdrop-filter:blur(5px)}
.search-command{position:relative;width:min(720px,100%);max-height:min(720px,calc(100vh - 100px));display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:20px;box-shadow:0 30px 90px rgba(3,12,27,.34);overflow:hidden}
.search-command-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:20px 20px 12px}
.search-command-head h2{margin:3px 0 0;font-size:clamp(20px,3vw,28px)}
.search-close{flex:0 0 auto}
.search-input-shell{margin:0 20px;min-height:54px;display:flex;align-items:center;gap:10px;padding:0 14px;border:2px solid var(--accent);border-radius:13px;background:var(--surface2);box-shadow:0 0 0 4px rgba(26,102,255,.10)}
.search-input-shell>span{font-size:22px;color:var(--accent)}
.search-input-shell input{flex:1;min-width:0;border:0;outline:0;background:transparent;color:var(--ink);font-size:16px}
.search-input-shell input::placeholder{color:var(--muted)}
kbd{font-family:inherit}
.search-input-shell kbd,.search-command-footer kbd{border:1px solid var(--line);border-bottom-width:2px;border-radius:6px;background:var(--surface);color:var(--muted);font-size:10px;padding:2px 6px}
.search-help{margin:9px 22px;color:var(--muted);font-size:12px}
.search-results{overflow:auto;padding:5px 10px 12px;min-height:120px}
.search-result{display:grid;grid-template-columns:38px minmax(0,1fr) 24px;align-items:center;gap:11px;padding:10px 11px;border-radius:11px;color:var(--ink);text-decoration:none;outline:0}
.search-result:hover,.search-result.active,.search-result:focus-visible{background:#eaf1ff;color:var(--accent)}
.dark .search-result:hover,.dark .search-result.active,.dark .search-result:focus-visible{background:#172d52}
.search-result-icon{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:var(--surface2);border:1px solid var(--line);font-size:11px;font-weight:800;color:var(--accent)}
.search-result-copy{display:grid;gap:2px;min-width:0}
.search-result-copy strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.search-result-copy small{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.search-result-arrow{color:var(--muted)}
.search-state{min-height:110px;display:flex;align-items:center;justify-content:center;gap:9px;text-align:center;color:var(--muted);font-size:13px;padding:20px}
.search-spinner{width:18px;height:18px;border:2px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:search-spin .7s linear infinite}
@keyframes search-spin{to{transform:rotate(360deg)}}
.search-command-footer{display:flex;align-items:center;justify-content:flex-end;gap:16px;padding:10px 18px;border-top:1px solid var(--line);background:var(--surface2);color:var(--muted);font-size:11px}
.search-command-footer span{display:flex;align-items:center;gap:4px}

@media(max-width:1050px){
  .sidebar button.sidebar-search-trigger{justify-content:center;font-size:0}
  .sidebar button.sidebar-search-trigger span{font-size:20px}
  .sidebar-search-trigger kbd{display:none}
}
@media(max-width:720px){
  .sidebar button.sidebar-search-trigger{padding:10px 4px}
  .search-dialog{padding:12px}
  .search-command{max-height:calc(100vh - 24px);border-radius:16px}
  .search-command-head{padding:16px 15px 10px}
  .search-input-shell{margin:0 14px}
  .search-command-footer{display:none}
}


/* v22: topbar translation spacing and complete dark search palette */
.topbar .top-actions{
  gap:8px;
}
.topbar .language-switcher{
  flex:0 0 auto;
  width:auto!important;
  max-width:150px!important;
  min-height:38px!important;
  margin-right:10px;
  padding:3px 7px!important;
  white-space:nowrap!important;
  flex-wrap:nowrap!important;
  overflow:hidden!important;
}
.topbar .language-switcher .gtranslate_wrapper,
.topbar .language-switcher .gt_float_switcher,
.topbar .language-switcher .gt_switcher,
.topbar .language-switcher .gt_switcher_wrapper{
  display:flex!important;
  align-items:center!important;
  flex-wrap:nowrap!important;
  white-space:nowrap!important;
  min-width:0!important;
  max-width:136px!important;
  width:auto!important;
  overflow:hidden!important;
}
.topbar .language-switcher a,
.topbar .language-switcher span{
  white-space:nowrap!important;
  flex-wrap:nowrap!important;
}
@media(max-width:720px){
  .topbar .language-switcher{max-width:132px!important;margin-right:6px;padding:2px 5px!important}
  .topbar .language-switcher .gtranslate_wrapper,
  .topbar .language-switcher .gt_float_switcher,
  .topbar .language-switcher .gt_switcher{max-width:120px!important}
}
@media(max-width:480px){
  .topbar .language-switcher{max-width:112px!important;margin-right:3px}
  .topbar .language-switcher .gtranslate_wrapper,
  .topbar .language-switcher .gt_float_switcher,
  .topbar .language-switcher .gt_switcher{max-width:102px!important}
}

.app-body.dark .search-command{
  background:#101b2a!important;
  color:#edf3fb!important;
  border-color:#31445c!important;
  box-shadow:0 30px 90px rgba(0,0,0,.6)!important;
}
.app-body.dark .search-command-head,
.app-body.dark .search-results{
  background:#101b2a!important;
  color:#edf3fb!important;
}
.app-body.dark .search-input-shell{
  background:#162438!important;
  color:#edf3fb!important;
  border-color:#5c8fff!important;
  box-shadow:0 0 0 4px rgba(92,143,255,.14)!important;
}
.app-body.dark .search-input-shell input,
.app-body.dark .search-input-shell input[type="search"]{
  background:transparent!important;
  color:#edf3fb!important;
  border:0!important;
  box-shadow:none!important;
}
.app-body.dark .search-input-shell input::placeholder{
  color:#9fb0c5!important;
}
.app-body.dark .search-help,
.app-body.dark .search-state,
.app-body.dark .search-result-copy small,
.app-body.dark .search-result-arrow{
  color:#9fb0c5!important;
}
.app-body.dark .search-result{
  color:#edf3fb!important;
  background:transparent!important;
}
.app-body.dark .search-result:hover,
.app-body.dark .search-result.active,
.app-body.dark .search-result:focus-visible{
  background:#1b3356!important;
  color:#8fb4ff!important;
}
.app-body.dark .search-result-icon{
  background:#162438!important;
  color:#8fb4ff!important;
  border-color:#31445c!important;
}
.app-body.dark .search-command-footer{
  background:#162438!important;
  color:#9fb0c5!important;
  border-color:#31445c!important;
}
.app-body.dark .search-input-shell kbd,
.app-body.dark .search-command-footer kbd{
  background:#101b2a!important;
  color:#c7d4e5!important;
  border-color:#425873!important;
}
.app-body.dark .search-close{
  background:#162438!important;
  color:#edf3fb!important;
  border-color:#31445c!important;
}


/* v23: unified compact translation control */
.language-switcher{display:flex!important;align-items:center!important;gap:5px!important;width:max-content!important;max-width:none!important;min-height:32px!important;padding:3px 6px!important;border-radius:10px!important;overflow:visible!important;white-space:nowrap!important}
.language-flags{display:flex;align-items:center;gap:2px;white-space:nowrap}
.language-flags button{width:23px;height:23px;display:grid;place-items:center;padding:0;border:1px solid transparent;border-radius:6px;background:transparent;font-size:14px;line-height:1;cursor:pointer}
.language-flags button:hover,.language-flags button.active{background:var(--surface2);border-color:var(--line)}
.language-select-wrap{position:relative;display:flex;align-items:center;min-width:82px}
.language-select{height:25px!important;min-height:25px!important;max-width:104px!important;padding:1px 20px 1px 5px!important;border:1px solid var(--line)!important;border-radius:7px!important;background:var(--surface)!important;color:var(--ink)!important;font:600 11px/1.2 'Noto Sans',sans-serif!important;appearance:none!important;-webkit-appearance:none!important;cursor:pointer}
.language-arrow{position:absolute;right:6px;top:50%;transform:translateY(-52%);pointer-events:none;color:var(--muted);font-size:11px}
.language-switcher>.gtranslate_wrapper{position:fixed!important;left:-10000px!important;top:-10000px!important;width:220px!important;height:36px!important;display:block!important;opacity:.01!important;overflow:visible!important;pointer-events:none!important}
.topbar .language-switcher{margin-right:8px!important;flex-shrink:0!important;max-width:none!important}
.auth-language .language-switcher{max-width:none!important}
@media(max-width:720px){.language-flags button{width:21px;height:21px;font-size:13px}.language-select-wrap{min-width:70px}.language-select{max-width:84px!important;font-size:10px!important}.topbar .language-switcher{margin-right:4px!important;gap:3px!important}.top-actions{gap:5px!important}}
@media(max-width:520px){.language-flags{gap:0}.language-flags button{width:19px}.language-select-wrap{min-width:62px}.language-select{max-width:72px!important;padding-left:3px!important}.app-brand b{display:none}}

/* v23: compact controls and search/result interactions */
.compact-select,#sectionPicker{height:34px!important;min-height:34px!important;padding-top:4px!important;padding-bottom:4px!important}
.student-result-row{cursor:pointer}.student-result-row:hover{background:var(--surface2)}
.stat-card{cursor:pointer;transition:transform .15s ease,border-color .15s ease}.stat-card:hover{transform:translateY(-1px);border-color:var(--accent)}
.dashboard-compact-panel{margin-bottom:16px}.compact-records{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:8px}.compact-records[hidden]{display:none}.compact-records article{display:grid;gap:2px;padding:9px 11px;border:1px solid var(--line);border-radius:10px;background:var(--surface2)}.compact-records article b{font-size:13px}.compact-records article span{font-size:11px;color:var(--muted)}
.class-plan-context{display:flex;align-items:center;gap:14px;grid-column:1/-1;padding-top:8px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}.class-plan-context label{display:flex;align-items:center;gap:6px}.class-plan-context select{height:30px!important;min-height:30px!important;padding:3px 24px 3px 7px!important;font-size:12px!important}
@media(max-width:760px){.class-plan-context{align-items:flex-start;flex-direction:column;gap:6px}}

/* v24: translation state and dark-mode consistency */
.language-flags button:hover{background:var(--surface2);border-color:var(--line)}
.language-flags button.active{background:var(--accent-soft,#eaf1ff);border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.app-body.dark .language-switcher{background:#162438!important;border-color:#31445c!important;color:#edf3fb!important}
.app-body.dark .language-flags button{color:#edf3fb!important;background:transparent!important;border-color:transparent!important}
.app-body.dark .language-flags button:hover{background:#20324a!important;border-color:#425873!important}
.app-body.dark .language-flags button.active{background:#294978!important;border-color:#8fb4ff!important;box-shadow:inset 0 0 0 1px #8fb4ff!important}
.app-body.dark .language-select{background:#162438!important;color:#edf3fb!important;border-color:#425873!important;color-scheme:dark}
.app-body.dark .language-select option{background:#162438!important;color:#edf3fb!important}
.app-body.dark .language-arrow{color:#c7d4e5!important}

/* v26: single hidden Google Translate engine shared by the custom language bar. */
.translation-engine{position:fixed!important;left:-10000px!important;top:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important;opacity:0!important;pointer-events:none!important}
.goog-te-banner-frame.skiptranslate,.goog-te-banner-frame{display:none!important}
body{top:0!important}

/* v27: fully private custom translation interface; Google remains engine-only. */
html,body{top:0!important}
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
.goog-te-balloon-frame,
#goog-gt-tt,
.goog-tooltip,
.goog-tooltip:hover{display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important}
.translation-engine,
.translation-engine.skiptranslate,
body>.skiptranslate:not(.language-switcher){position:fixed!important;left:-10000px!important;top:-10000px!important;width:1px!important;height:1px!important;max-width:1px!important;max-height:1px!important;overflow:hidden!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important}
font.goog-text-highlight{background:transparent!important;box-shadow:none!important}
.language-select{min-width:118px!important;max-width:168px!important;text-overflow:ellipsis!important}
@media(max-width:720px){.language-select{min-width:88px!important;max-width:118px!important}}
@media(max-width:520px){.language-select{min-width:76px!important;max-width:96px!important}}

/* v28: rebuilt, application-owned translation control */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.language-switcher{display:flex!important;align-items:center!important;gap:7px!important;min-height:42px!important;width:auto!important;max-width:none!important;padding:5px 8px!important;border:1px solid var(--line)!important;border-radius:12px!important;background:var(--surface,#fff)!important;color:var(--ink)!important;overflow:visible!important;box-shadow:none!important}
.language-quick{display:flex;align-items:center;gap:2px}
.language-quick button{min-width:30px;height:30px;padding:0 5px;border:0;border-radius:8px;background:transparent;color:var(--muted);font-size:11px;font-weight:800;line-height:1;cursor:pointer}
.language-quick button:hover{background:var(--surface2,#eef4ff);color:var(--accent)}
.language-quick button.active{background:var(--accent);color:#fff}
.language-select-wrap{position:relative;display:block!important;width:138px!important;min-width:138px!important;margin:0!important;padding:0!important;font-weight:700!important}
.language-select{display:block!important;width:100%!important;height:30px!important;margin:0!important;padding:4px 25px 4px 8px!important;border:0!important;border-left:1px solid var(--line)!important;border-radius:0!important;background:var(--surface,#fff)!important;color:var(--ink)!important;font-size:12px!important;font-weight:750!important;line-height:20px!important;box-shadow:none!important;outline:none!important;cursor:pointer!important;appearance:none!important;-webkit-appearance:none!important}
.language-select:focus-visible{box-shadow:inset 0 0 0 2px var(--accent)!important;border-radius:7px!important}
.language-select option{background:var(--surface,#fff)!important;color:var(--ink)!important}
.language-arrow{position:absolute;right:7px;top:50%;transform:translateY(-50%);pointer-events:none;color:var(--muted);font-size:11px}
.translation-engine{position:fixed!important;left:-10000px!important;top:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important;opacity:.001!important;pointer-events:none!important}
.goog-te-banner-frame,.goog-te-balloon-frame,#goog-gt-tt,.goog-tooltip,.goog-te-spinner-pos,iframe.skiptranslate{display:none!important;visibility:hidden!important}
html,body{top:0!important}
.language-changing .language-switcher{opacity:.72}
.app-body.dark .language-switcher{background:var(--surface)!important;color:var(--ink)!important}
.app-body.dark .language-select{background:var(--surface)!important;color:var(--ink)!important}
.app-body.dark .language-select option{background:#101b2a!important;color:#edf3fb!important}
@media(max-width:720px){.language-switcher{gap:4px!important;padding:4px 5px!important}.language-quick button{min-width:25px;width:25px;padding:0;font-size:10px}.language-select-wrap{width:105px!important;min-width:105px!important}.language-select{font-size:11px!important;padding-left:6px!important}.top-actions{gap:5px!important}}
@media(max-width:480px){.language-quick button[data-lang="fr"],.language-quick button[data-lang="es"],.language-quick button[data-lang="de"]{display:none}.language-select-wrap{width:96px!important;min-width:96px!important}}

/* v29: immutable, translation-proof language bar */
.language-switcher{
  width:320px!important;
  min-width:320px!important;
  max-width:320px!important;
  height:42px!important;
  min-height:42px!important;
  padding:5px 7px!important;
  gap:7px!important;
  flex:0 0 320px!important;
  contain:layout style!important;
}
.language-quick{
  width:158px!important;
  min-width:158px!important;
  flex:0 0 158px!important;
  display:grid!important;
  grid-template-columns:repeat(5,30px)!important;
  gap:2px!important;
}
.language-quick button{
  width:30px!important;
  min-width:30px!important;
  max-width:30px!important;
  height:30px!important;
  min-height:30px!important;
  padding:0!important;
  overflow:hidden!important;
  white-space:nowrap!important;
  text-align:center!important;
  letter-spacing:0!important;
  text-transform:none!important;
  font:800 11px/30px "Noto Sans",ui-sans-serif,system-ui,sans-serif!important;
}
.language-select-wrap{
  width:140px!important;
  min-width:140px!important;
  max-width:140px!important;
  flex:0 0 140px!important;
  overflow:hidden!important;
}
.language-select{
  width:140px!important;
  min-width:140px!important;
  max-width:140px!important;
  height:30px!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font:750 12px/20px "Noto Sans",ui-sans-serif,system-ui,sans-serif!important;
}
.language-switcher.notranslate,
.language-switcher.notranslate *{
  text-transform:none!important;
  letter-spacing:0!important;
}
@media(max-width:720px){
  .language-switcher{width:292px!important;min-width:292px!important;max-width:292px!important;flex-basis:292px!important;padding:5px!important;gap:5px!important}
  .language-quick{width:143px!important;min-width:143px!important;flex-basis:143px!important;grid-template-columns:repeat(5,27px)!important}
  .language-quick button{width:27px!important;min-width:27px!important;max-width:27px!important;font-size:10px!important}
  .language-select-wrap,.language-select{width:132px!important;min-width:132px!important;max-width:132px!important}
}
@media(max-width:480px){
  .language-quick button[data-lang="fr"],.language-quick button[data-lang="es"],.language-quick button[data-lang="de"]{display:block!important}
}

/* v31: deterministic dark-mode language bar and protected personal names */
.language-switcher{
  --language-bg:var(--surface,#fff);
  --language-bg-hover:var(--surface2,#f2f6fb);
  --language-text:var(--ink,#10233e);
  --language-muted:var(--muted,#65738a);
  --language-border:var(--line,#dbe3ed);
  background:var(--language-bg)!important;
  border-color:var(--language-border)!important;
  color:var(--language-text)!important;
  color-scheme:light;
}
.language-switcher .language-quick button{color:var(--language-muted)!important;background:transparent!important}
.language-switcher .language-quick button:hover{color:var(--accent)!important;background:var(--language-bg-hover)!important}
.language-switcher .language-quick button.active{color:#fff!important;background:var(--accent)!important}
.language-switcher .language-select{
  background:var(--language-bg)!important;
  color:var(--language-text)!important;
  border-left-color:var(--language-border)!important;
  color-scheme:light;
}
.language-switcher .language-arrow{color:var(--language-muted)!important}
.app-body.dark .language-switcher{
  --language-bg:#101b2a;
  --language-bg-hover:#20324a;
  --language-text:#edf3fb;
  --language-muted:#b4c2d4;
  --language-border:#425873;
  color-scheme:dark;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.02)!important;
}
.app-body.dark .language-switcher .language-select{color-scheme:dark!important}
.app-body.dark .language-switcher .language-select option{background:#101b2a!important;color:#edf3fb!important}
.person-name,.person-name *{text-transform:none!important;letter-spacing:normal!important}


/* v32: final isolated language-control skin. No third-party state may alter it. */
.language-switcher{
  --ts-lang-bg:#ffffff;
  --ts-lang-border:#cbd5e1;
  --ts-lang-text:#0f172a;
  --ts-lang-muted:#475569;
  --ts-lang-hover:#eef4ff;
  --ts-lang-active:#1a66ff;
  isolation:isolate!important;
  opacity:1!important;
  filter:none!important;
  visibility:visible!important;
  background:var(--ts-lang-bg)!important;
  border:1px solid var(--ts-lang-border)!important;
  color:var(--ts-lang-text)!important;
  box-shadow:none!important;
}
.language-switcher,
.language-switcher *{
  opacity:1!important;
  filter:none!important;
  text-shadow:none!important;
}
.language-switcher .language-quick button{
  color:var(--ts-lang-muted)!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  -webkit-text-fill-color:var(--ts-lang-muted)!important;
}
.language-switcher .language-quick button:hover,
.language-switcher .language-quick button:focus-visible{
  color:var(--ts-lang-text)!important;
  background:var(--ts-lang-hover)!important;
  -webkit-text-fill-color:var(--ts-lang-text)!important;
}
.language-switcher .language-quick button.active{
  color:#fff!important;
  background:var(--ts-lang-active)!important;
  -webkit-text-fill-color:#fff!important;
}
.language-switcher .language-select-wrap{
  border:0!important;
  background:transparent!important;
}
.language-switcher .language-select{
  opacity:1!important;
  background:var(--ts-lang-bg)!important;
  color:var(--ts-lang-text)!important;
  border-left:1px solid var(--ts-lang-border)!important;
  -webkit-text-fill-color:var(--ts-lang-text)!important;
}
.language-switcher .language-arrow{color:var(--ts-lang-muted)!important;opacity:1!important}
.app-body.dark .language-switcher,
body.dark .language-switcher{
  --ts-lang-bg:#101b2a;
  --ts-lang-border:#425873;
  --ts-lang-text:#f8fafc;
  --ts-lang-muted:#cbd5e1;
  --ts-lang-hover:#20324a;
  --ts-lang-active:#1a66ff;
  color-scheme:dark!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.025)!important;
}
.app-body.dark .language-switcher .language-select,
body.dark .language-switcher .language-select{color-scheme:dark!important}
.app-body.dark .language-switcher .language-select option,
body.dark .language-switcher .language-select option{
  background:#101b2a!important;
  color:#f8fafc!important;
  -webkit-text-fill-color:#f8fafc!important;
}
.language-changing .language-switcher{opacity:1!important}
@media (forced-colors:active){
  .language-switcher{border-color:CanvasText!important}
  .language-switcher .language-quick button.active{background:Highlight!important;color:HighlightText!important}
}

/* v34: unified Noto Sans classroom names with compact first/last-name spacing */
.seat-slot > .student-chip .student-name-stack{gap:1px!important;line-height:1!important}
.seat-slot .student-first-name{font-family:"Noto Sans",sans-serif!important;font-size:var(--first-size,10.5px)!important;font-weight:400!important;line-height:1!important}
.seat-slot .student-first-name-line{line-height:1!important}
.seat-slot .student-last-name{font-family:"Noto Sans",sans-serif!important;font-weight:400!important;line-height:1!important;margin-top:1px!important;letter-spacing:0!important}
.standing-area .student-chip,.standing-area .student-first-name,.standing-area .student-last-name{font-family:"Noto Sans",sans-serif!important;font-weight:400!important}
/* v37 - Teacher schedule */
.schedule-main{min-width:0}.schedule-toolbar{display:flex;align-items:center;justify-content:space-between;gap:24px}.schedule-toolbar h1{margin:.2rem 0}.schedule-options{padding:18px 22px}.schedule-switch{display:flex;align-items:center;gap:10px;font-weight:700}.schedule-scroll{overflow:auto}.teacher-schedule{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;min-width:1180px}.teacher-schedule th,.teacher-schedule td{border-right:1px solid #dbe2ec;border-bottom:1px solid #dbe2ec;padding:10px;text-align:center;vertical-align:middle}.teacher-schedule thead th{background:#eef3f9;color:#24324a;height:48px}.teacher-schedule .time-column{width:145px;background:#f7f9fc}.teacher-schedule td{height:86px;background:#fff}.schedule-entry-view{display:flex;flex-direction:column;gap:4px}.schedule-entry-view b{font-size:.94rem}.schedule-entry-view span{font-size:.79rem;color:#61708a}.schedule-empty{opacity:.45}.schedule-entry-edit,.time-edit{display:none}.teacher-schedule.is-editing .schedule-entry-view,.teacher-schedule.is-editing .time-view{display:none}.teacher-schedule.is-editing .schedule-entry-edit{display:block;width:100%;font-size:.78rem}.teacher-schedule.is-editing .time-edit{display:flex;gap:4px;justify-content:center}.schedule-time{width:75px;padding:6px 3px;font-size:.75rem}.different-hours td{padding-top:6px}.cell-time{font-size:.72rem;color:#5e6d83;margin-bottom:7px}.summary-level{margin-top:22px}.summary-level h3{margin:0 0 12px}.summary-grade{margin:14px 0 22px}.summary-grade h4{margin:0 0 8px}.summary-grade table{width:100%;border-collapse:collapse}.summary-grade th,.summary-grade td{padding:9px 12px;border-bottom:1px solid #e1e7ef;text-align:left}.summary-grade th:last-child,.summary-grade td:last-child{text-align:right}.summary-total{font-weight:700;background:#f6f8fb}@media(max-width:900px){.schedule-toolbar{align-items:flex-start;flex-direction:column}}


/* v38: reliable, user-friendly teacher schedule */
.schedule-main{display:grid;gap:18px;align-content:start}
.schedule-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;background:linear-gradient(135deg,var(--surface) 0%,var(--surface2) 100%)}
.schedule-hero h1{margin:.15rem 0 .35rem;font-size:clamp(28px,4vw,42px)}
.schedule-teacher-line{display:flex;align-items:center;flex-wrap:wrap;gap:8px;color:var(--muted);margin:0}
.status-dot{width:5px;height:5px;border-radius:50%;background:var(--muted)}
.schedule-actions{display:flex;flex-wrap:wrap;justify-content:flex-end}
.schedule-options{display:flex;align-items:center;justify-content:space-between;gap:24px;border-color:#b8cdf7;background:#f7faff}
.dark .schedule-options{background:#10223b;border-color:#294d82}
.schedule-option-copy h2{font-size:18px;margin:0 0 4px}.schedule-option-copy p{margin:0}
.schedule-switch{display:inline-flex!important;align-items:center!important;justify-content:flex-start!important;gap:10px!important;white-space:nowrap;cursor:pointer;flex:0 0 auto;margin:0!important;padding:8px 0!important}
.schedule-switch input{position:absolute;opacity:0;pointer-events:none;width:1px;height:1px}
.switch-ui{position:relative;width:44px;height:24px;border-radius:999px;background:#c7d1df;box-shadow:inset 0 0 0 1px rgba(0,0,0,.08);transition:.2s;flex:0 0 44px}
.switch-ui:after{content:"";position:absolute;width:18px;height:18px;left:3px;top:3px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.22);transition:.2s}
.schedule-switch input:checked+.switch-ui{background:var(--accent)}.schedule-switch input:checked+.switch-ui:after{transform:translateX(20px)}
.schedule-switch input:focus-visible+.switch-ui{outline:3px solid rgba(26,102,255,.22);outline-offset:2px}
.switch-label{font-weight:800;color:var(--ink)}
.schedule-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:14px}.schedule-panel-head h2{margin:0 0 4px}.schedule-panel-head p{margin:0}
.schedule-legend{display:flex;gap:14px;color:var(--muted);font-size:12px;white-space:nowrap}.schedule-legend span{display:flex;align-items:center;gap:6px}.schedule-legend i{width:10px;height:10px;border-radius:3px;border:1px solid var(--line)}.legend-filled{background:#eaf1ff}.legend-empty{background:#fff}
.schedule-table-panel{padding:18px}.schedule-scroll{border:1px solid var(--line);border-radius:14px;overflow:auto;background:#fff}
.teacher-schedule{border-spacing:0;min-width:1190px}.teacher-schedule th,.teacher-schedule td{border-color:#e1e7ef}.teacher-schedule thead th{position:sticky;top:0;z-index:2;background:#edf3fb}.teacher-schedule .time-column{position:sticky;left:0;z-index:1;box-shadow:1px 0 0 #dbe2ec}.teacher-schedule thead .time-column{z-index:3}
.teacher-schedule td{transition:background .15s}.teacher-schedule td:has(.schedule-entry-view b){background:#f8fbff}.teacher-schedule.is-editing td{background:#fff}.teacher-schedule.is-editing td:focus-within{background:#f2f7ff;box-shadow:inset 0 0 0 2px rgba(26,102,255,.22)}
.schedule-entry-edit{min-height:38px;border:1px solid #c7d2e2;border-radius:99px;padding:7px 28px 7px 8px;background:#fff;color:#26364f}.schedule-entry-edit:focus{border-color:var(--accent);outline:3px solid rgba(26,102,255,.12)}
.schedule-time{border:1px solid #c7d2e2;border-radius:8px;background:#fff;color:#26364f}.time-edit{flex-wrap:wrap}
.schedule-message{min-height:22px;margin:12px 2px 0;font-size:13px;font-weight:700}.schedule-message.info{color:#48617f}.schedule-message.success{color:#087443}.schedule-message.error{color:#b42318}
.schedule-total-badge{background:#eaf1ff;color:var(--accent);padding:9px 13px;border-radius:999px;white-space:nowrap}
@media(max-width:1050px){.schedule-hero,.schedule-options{align-items:flex-start;flex-direction:column}.schedule-actions{justify-content:flex-start}.schedule-switch{white-space:normal}.schedule-panel-head{flex-direction:column}.schedule-legend{white-space:normal}}
@media(max-width:720px){.schedule-main{gap:12px}.schedule-hero,.schedule-options,.schedule-table-panel,.schedule-summary{border-radius:15px;padding:15px}.schedule-actions{width:100%}.schedule-actions button{flex:1}.schedule-switch{width:100%}.sidebar{overflow-x:auto}.sidebar nav{grid-template-columns:repeat(9,minmax(54px,1fr));min-width:540px}.schedule-scroll{border-radius:10px}}

/* v39 — compact, full-width timetable and platform-wide Noto Sans */
html,body,button,input,select,textarea,table,th,td,a,label{font-family:"Noto Sans",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif!important}
.dashboard-main{padding:18px 20px;gap:14px}.panel{border-radius:14px}.topbar{min-height:58px}.primary,.secondary,.danger{min-height:34px;padding:8px 12px;border-radius:9px;font-size:13px}.schedule-main{width:100%;max-width:none;min-width:0;overflow-x:hidden}.schedule-hero{padding:16px 18px}.schedule-hero h1{font-size:clamp(22px,2.2vw,30px);margin:2px 0 5px}.schedule-teacher-line{font-size:13px}.schedule-actions{gap:7px}.schedule-options{padding:13px 16px}.schedule-option-copy h2{font-size:17px}.schedule-option-copy .hint{font-size:12px}.schedule-table-panel{padding:14px;min-width:0}.schedule-panel-head{margin-bottom:10px}.schedule-panel-head h2{font-size:18px}.schedule-panel-head .hint,.schedule-legend{font-size:11px}.schedule-scroll{width:100%;overflow-x:hidden!important;border:1px solid #dfe6ef;border-radius:10px}.teacher-schedule{width:100%!important;min-width:0!important;table-layout:fixed;border-collapse:collapse}.teacher-schedule th,.teacher-schedule td{padding:5px 4px!important;min-width:0;overflow:hidden}.teacher-schedule thead th{height:36px;font-size:clamp(9px,.9vw,12px);line-height:1.15}.teacher-schedule .time-column{width:10.5%;position:static!important;box-shadow:none!important;font-size:clamp(8px,.8vw,11px);white-space:nowrap}.teacher-schedule td{height:60px!important}.schedule-entry-view{gap:1px;line-height:1.12;min-width:0}.schedule-entry-view b{font-size:clamp(8px,.78vw,11px);font-weight:700;white-space:normal;overflow-wrap:anywhere}.schedule-entry-view span{font-size:clamp(7px,.68vw,10px);line-height:1.1;white-space:normal;overflow-wrap:anywhere}.schedule-entry-edit{width:100%!important;min-width:0;padding:5px 18px 5px 5px!important;border-radius:7px!important;font-size:clamp(7px,.68vw,10px)!important;text-overflow:ellipsis}.time-view{font-size:clamp(8px,.76vw,11px);white-space:nowrap}.teacher-schedule.is-editing .time-edit{display:grid;grid-template-columns:1fr;gap:2px}.schedule-time{width:100%!important;min-width:0;padding:3px 1px!important;border-radius:5px!important;font-size:9px!important}.different-hours .cell-time{margin-bottom:3px;font-size:clamp(7px,.62vw,9px);white-space:nowrap}.different-hours td{padding:3px!important}.schedule-summary{padding:16px 18px}.summary-level{margin-top:14px}.summary-grade{margin:9px 0 14px}.summary-grade th,.summary-grade td{padding:6px 8px;font-size:12px}
@media(max-width:1100px){.dashboard-main{padding:14px}.schedule-table-panel{padding:10px}.teacher-schedule th,.teacher-schedule td{padding:3px 2px!important}.teacher-schedule td{height:54px!important}.schedule-legend{display:none}.teacher-schedule .time-column{width:11.5%}}
@media(max-width:760px){.dashboard-main{padding:10px}.schedule-hero{padding:13px;align-items:flex-start}.schedule-actions{width:100%;flex-wrap:wrap}.schedule-actions button{flex:1}.schedule-panel-head{align-items:flex-start}.teacher-schedule thead th{font-size:8px}.teacher-schedule .time-column{width:13%}.teacher-schedule td{height:50px!important}.schedule-entry-view b{font-size:7.5px}.schedule-entry-view span{font-size:7px}.schedule-entry-edit{font-size:7px!important;padding-right:13px!important}.different-hours .time-view{font-size:6.7px}.summary-grade{overflow-x:auto}}

/* v40 — accessible teacher schedule in both light and dark themes.
   PDF export remains intentionally light because it is rendered to canvas with fixed colours. */
.schedule-table-panel,
.schedule-summary,
.schedule-hero{color:var(--ink)}
.schedule-scroll{background:var(--surface);border-color:var(--line)}
.teacher-schedule{color:var(--ink);background:var(--surface)}
.teacher-schedule th,
.teacher-schedule td{border-color:var(--line)!important}
.teacher-schedule thead th{background:var(--surface2);color:var(--ink)}
.teacher-schedule .time-column{background:var(--surface2);color:var(--ink)}
.teacher-schedule td{background:var(--surface);color:var(--ink)}
.teacher-schedule td:has(.schedule-entry-view b){background:color-mix(in srgb,var(--accent) 6%,var(--surface))}
.schedule-entry-view b,.time-view{color:var(--ink)}
.schedule-entry-view span,.cell-time,.schedule-empty{color:var(--muted)}
.legend-filled{background:color-mix(in srgb,var(--accent) 18%,var(--surface));border-color:color-mix(in srgb,var(--accent) 40%,var(--line))!important}
.legend-empty{background:var(--surface);border-color:var(--line)!important}
.schedule-entry-edit,.schedule-time{background:var(--surface);color:var(--ink);border-color:var(--line)}
.schedule-entry-edit option,.schedule-entry-edit optgroup{background:var(--surface);color:var(--ink)}
.teacher-schedule.is-editing td{background:var(--surface)}
.teacher-schedule.is-editing td:focus-within{background:color-mix(in srgb,var(--accent) 9%,var(--surface));box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--accent) 38%,transparent)}
.schedule-entry-edit:focus,.schedule-time:focus{border-color:var(--accent);outline:3px solid color-mix(in srgb,var(--accent) 18%,transparent)}
.summary-grade table{color:var(--ink)}
.summary-grade th,.summary-grade td{border-color:var(--line)}
.summary-grade thead th{background:var(--surface2);color:var(--ink)}
.summary-total{background:color-mix(in srgb,var(--accent) 7%,var(--surface));color:var(--ink)}
.schedule-total-badge{background:color-mix(in srgb,var(--accent) 14%,var(--surface));color:color-mix(in srgb,var(--accent) 78%,var(--ink))}

.app-body.dark .schedule-hero{background:linear-gradient(135deg,#101b2a 0%,#162438 100%)}
.app-body.dark .schedule-options{background:#10223b;border-color:#315c96}
.app-body.dark .schedule-scroll{background:#0d1725;border-color:#31445d}
.app-body.dark .teacher-schedule{background:#0d1725;color:#edf3fb}
.app-body.dark .teacher-schedule thead th{background:#1b2b40;color:#f4f7fb}
.app-body.dark .teacher-schedule .time-column{background:#152338;color:#e7eef8}
.app-body.dark .teacher-schedule td{background:#101b2a;color:#edf3fb}
.app-body.dark .teacher-schedule td:has(.schedule-entry-view b){background:#132640}
.app-body.dark .teacher-schedule th,
.app-body.dark .teacher-schedule td{border-color:#31445d!important}
.app-body.dark .schedule-entry-view b,
.app-body.dark .time-view{color:#f4f7fb}
.app-body.dark .schedule-entry-view span,
.app-body.dark .cell-time{color:#b5c4d7}
.app-body.dark .schedule-empty{color:#8293aa;opacity:.8}
.app-body.dark .schedule-entry-edit,
.app-body.dark .schedule-time{background:#0b1522;color:#f4f7fb;border-color:#3b506a;color-scheme:dark}
.app-body.dark .schedule-entry-edit option,
.app-body.dark .schedule-entry-edit optgroup{background:#0b1522;color:#f4f7fb}
.app-body.dark .teacher-schedule.is-editing td{background:#101b2a}
.app-body.dark .teacher-schedule.is-editing td:focus-within{background:#172d4b;box-shadow:inset 0 0 0 2px rgba(96,165,250,.55)}
.app-body.dark .legend-filled{background:#1d3b64;border-color:#4d75a8!important}
.app-body.dark .legend-empty{background:#101b2a;border-color:#53657c!important}
.app-body.dark .summary-grade thead th{background:#1b2b40;color:#f4f7fb}
.app-body.dark .summary-total{background:#172d4b;color:#f4f7fb}
.app-body.dark .schedule-total-badge{background:#17345b;color:#9cc4ff}
.app-body.dark .schedule-message.info{color:#a9c8f5}
.app-body.dark .schedule-message.success{color:#73e2ad}
.app-body.dark .schedule-message.error{color:#ff9b91}

/* v41 — fixed, compact desktop sidebar and canonical timetable section labels. */
@media(min-width:721px){
  .app-shell{align-items:start}
  .sidebar{
    position:sticky;
    top:72px;
    height:calc(100vh - 72px);
    min-height:0;
    align-self:start;
    justify-content:flex-start;
    gap:6px;
    padding:12px 10px;
    overflow:hidden;
  }
  .sidebar nav{gap:3px;min-height:0}
  .sidebar a,
  .sidebar button.sidebar-search-trigger{
    min-height:auto !important;
    padding:8px 12px !important;
    gap:9px;
    border-radius:9px;
  }
}

/* ==========================================================================
   Sidebar Tabs Uniform Styling & Normal Height Fix
   ========================================================================== */

/* 1. Noto Sans, Normal weight (όχι bold) & 1rem μέγεθος για όλη τη sidebar */
.sidebar,
.sidebar *,
aside,
aside *,
#sidebar,
#sidebar * {
    font-family: "Noto Sans", sans-serif !important;
    font-weight: 400 !important;
}

/* Επιβολή κανονικού ύψους/padding & μεγέθους 1rem */
.sidebar a,
.sidebar .nav-link,
.sidebar button.sidebar-search-trigger,
.sidebar .logout,
.sidebar nav a,
aside a,
aside .nav-link,
#sidebar a,
#sidebar .nav-link {
    font-size: 1rem !important;
    line-height: 1.35 !important;
    padding: 8px 12px !important;
    min-height: 0 !important;
    height: auto !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* 2. Πλήρης αφαίρεση εικονιδίων, συμβόλων και span wrappers μέσα στη sidebar */
.sidebar span,
.sidebar i,
.sidebar svg,
.sidebar img,
.sidebar .bi,
.sidebar .fa,
.sidebar .fas,
.sidebar .far,
aside span,
aside i,
aside svg,
aside img,
#sidebar span,
#sidebar i,
#sidebar svg,
#sidebar img {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    visibility: hidden !important;
}

/* Αφαίρεση τυχόν CSS pseudo-elements (βελάκια, κουκκίδες, ::before / ::after) */
.sidebar *::before,
.sidebar *::after,
aside *::before,
aside *::after,
#sidebar *::before,
#sidebar *::after {
    content: none !important;
    display: none !important;
}

/* 3. Responsive Adjustments */
@media (max-width: 720px) {
    .sidebar a,
    .sidebar button.sidebar-search-trigger,
    aside a,
    #sidebar a {
        font-size: 0.9rem !important;
        padding: 6px 8px !important;
    }
}
/* v45 — Absences module, scoped to preserve the existing interface. */
.absences-page{max-width:1500px}.absences-table-wrap{overflow-x:hidden}.absences-table{table-layout:fixed;width:100%;font-size:12px}.absences-table th,.absences-table td{padding:9px 6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.absences-table th:nth-child(1){width:14%}.absences-table th:nth-child(2){width:10%}.absences-table th:nth-child(3){width:9%}.absences-table th:nth-child(4){width:5%}.absences-table th:nth-child(5){width:6%}.absences-table th:nth-child(6){width:13%}.absences-table th:nth-child(7){width:5%}.absences-table th:nth-child(8){width:8%}.absences-table th:nth-child(9){width:25%}.absences-table th:nth-child(10){width:0}.absences-table .edit-only{display:none}.absences-table.is-editing th:nth-child(10){width:4%}.absences-table.is-editing .edit-only{display:table-cell}.absence-delete{width:28px;height:28px;border:0;border-radius:8px;background:#dc2626;color:#fff;font-size:20px;cursor:pointer}.absence-edit-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:14px}.absence-modal-card label{display:grid;gap:7px;font-weight:700}.absence-modal-card select,.absence-modal-card input,.absence-modal-card textarea,.edit-hours,.edit-remarks-type,.edit-remarks-other{width:100%;border:1px solid var(--line);background:var(--surface2);color:var(--ink);border-radius:10px;padding:10px}.remarks-cell .edit-remarks-other{margin-top:5px}.absence-toast{position:fixed;right:24px;bottom:24px;z-index:80;background:#0f766e;color:#fff;padding:13px 18px;border-radius:12px;box-shadow:0 14px 40px rgba(0,0,0,.22);font-weight:800}.hint.warning{color:#b45309}.hint.success{color:#15803d}.hint.error{color:#b42318}@media(max-width:900px){.absences-table{font-size:10px}.absences-table th,.absences-table td{padding:7px 3px}.absences-page{padding-left:8px;padding-right:8px}}

/* v45.2 — Targeted absences display and modal fixes. */
.absences-table{table-layout:fixed;width:100%}
.absences-table th,.absences-table td{overflow:visible;text-overflow:clip;white-space:normal;vertical-align:middle;line-height:1.3;overflow-wrap:anywhere}
.absences-table th:nth-child(1),.absences-table td:nth-child(1){width:20%;white-space:normal;overflow-wrap:break-word;word-break:normal}
.absences-table .person-name{display:inline;white-space:normal;overflow-wrap:break-word;word-break:normal}
.absences-table th:nth-child(2),.absences-table td:nth-child(2){width:10%}
.absences-table th:nth-child(3),.absences-table td:nth-child(3){width:5%;white-space:nowrap;text-align:center}
.absences-table th:nth-child(4),.absences-table td:nth-child(4){width:5%;white-space:nowrap;text-align:center}
.absences-table th:nth-child(5),.absences-table td:nth-child(5){width:6%;white-space:nowrap;text-align:center}
.absences-table th:nth-child(6),.absences-table td:nth-child(6){width:13%;overflow-wrap:break-word}
.absences-table th:nth-child(7),.absences-table td:nth-child(7){width:5%;white-space:nowrap;text-align:center}
.absences-table th:nth-child(8),.absences-table td:nth-child(8){width:8%;white-space:nowrap;text-align:center}
.absences-table th:nth-child(9),.absences-table td:nth-child(9){width:28%;white-space:normal;overflow-wrap:anywhere;word-break:break-word}
.absences-table th:nth-child(10),.absences-table td:nth-child(10){width:0}
.absences-table.is-editing th:nth-child(1),.absences-table.is-editing td:nth-child(1){width:18%}
.absences-table.is-editing th:nth-child(9),.absences-table.is-editing td:nth-child(9){width:26%}
.absences-table.is-editing th:nth-child(10),.absences-table.is-editing td:nth-child(10){width:4%;text-align:center}
.remarks-cell{white-space:normal;overflow:visible}
.remarks-cell .edit-remarks-type,.remarks-cell .edit-remarks-other{display:block;width:100%;min-width:0}
.remarks-cell .edit-remarks-other{margin-top:7px;resize:vertical;min-height:64px}
.remarks-cell .edit-remarks-other[hidden]{display:none}
.absence-modal-card{width:min(540px,100%);max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.absence-modal-card form{gap:11px}
.absence-modal-card form>.inline-actions{position:sticky;bottom:-24px;z-index:2;margin:4px -24px -24px;padding:12px 24px 18px;background:var(--surface,#fff);border-top:1px solid var(--line,#d8dee8)}
.absence-toast.warning{background:#b45309}
@media(max-height:760px){.modal{align-items:flex-start;padding:10px}.absence-modal-card{max-height:calc(100dvh - 20px);padding-top:20px}.absence-modal-card form{gap:8px}.absence-modal-card select,.absence-modal-card input,.absence-modal-card textarea{padding-top:8px;padding-bottom:8px}}
@media(max-width:900px){.absences-table th,.absences-table td{font-size:10px;padding:7px 3px}.absence-modal-card form>.inline-actions{flex-wrap:wrap}.absence-modal-card form>.inline-actions button{flex:1 1 140px}}


/* v46 — Targeted absence controls and compact entry modal. */
.absence-edit-actions[hidden]{display:none!important}
#absenceOtherWrap[hidden]{display:none!important}
.absence-modal-card{
  width:min(720px,calc(100vw - 24px));
  max-height:calc(100dvh - 24px);
  overflow-y:auto;
  padding:20px;
}
.absence-modal-card>h2{margin:2px 36px 14px 0}
.absence-modal-card form{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:10px 14px;
}
.absence-modal-card form>label:nth-child(1),
.absence-modal-card #absenceScheduleHint,
.absence-modal-card #absenceOtherWrap,
.absence-modal-card form>.inline-actions,
.absence-modal-card #absenceMessage{
  grid-column:1/-1;
}
.absence-modal-card label{gap:5px}
.absence-modal-card select,
.absence-modal-card input,
.absence-modal-card textarea{padding:9px 10px}
.absence-modal-card #absenceScheduleHint{margin:1px 0 3px;line-height:1.35}
.absence-modal-card form>.inline-actions{
  position:static;
  margin:2px 0 0;
  padding:10px 0 0;
  border-top:1px solid var(--line,#d8dee8);
  background:transparent;
}
.absence-modal-card #absenceMessage{margin:0}
@media(min-width:480px) and (max-height:700px){
  .modal{padding:8px}
  .absence-modal-card{max-height:calc(100dvh - 16px);padding:16px 18px}
  .absence-modal-card>h2{font-size:23px;margin-bottom:10px}
  .absence-modal-card form{gap:7px 12px}
  .absence-modal-card label{gap:4px}
  .absence-modal-card select,
  .absence-modal-card input,
  .absence-modal-card textarea{padding:7px 9px}
  .absence-modal-card #absenceScheduleHint{font-size:13px}
  .absence-modal-card form>.inline-actions{padding-top:8px}
}
@media(max-width:479px){
  .absence-modal-card form{grid-template-columns:1fr}
  .absence-modal-card form>*{grid-column:1!important}
}

/* v46.2 — In-app confirmations and standard-duration notifications. */
.absence-confirm-modal{z-index:140}
.absence-confirm-card{
  width:min(520px,calc(100vw - 32px));
  padding:26px;
  overflow:visible;
}
.absence-confirm-card h2{margin:0 42px 12px 0;font-size:22px}
.absence-confirm-text{margin:0 0 22px;line-height:1.55;white-space:pre-line}
.absence-confirm-card .inline-actions{justify-content:flex-end;flex-wrap:wrap}
.absence-confirm-card .inline-actions button{min-width:112px}
@media(max-width:520px){
  .absence-confirm-card{padding:22px 18px}
  .absence-confirm-card .inline-actions{display:grid;grid-template-columns:1fr}
  .absence-confirm-card .inline-actions button{width:100%}
}

/* v47 — Written works */
.written-page{max-width:1500px}.written-table{table-layout:fixed;width:100%;font-size:12px}.written-table th,.written-table td{padding:9px 6px;white-space:normal;overflow-wrap:anywhere;vertical-align:middle}.written-table th:nth-child(1){width:11%}.written-table th:nth-child(2){width:5%}.written-table th:nth-child(3){width:13%}.written-table th:nth-child(4){width:13%}.written-table th:nth-child(5){width:15%}.written-table th:nth-child(6){width:9%}.written-table th:nth-child(7){width:12%}.written-table th:nth-child(8){width:22%}.written-table .edit-only{display:none}.written-table.is-editing .edit-only{display:table-cell}.written-table.is-editing th:nth-child(9){width:4%}.sort-head{border:0;background:transparent;color:inherit;font:inherit;font-weight:800;padding:0;cursor:pointer;text-align:left}.written-row{cursor:pointer;transition:filter .15s}.written-row:hover{filter:brightness(.98)}.written-row.status-pending{background:rgba(34,197,94,.12)}.written-row.status-ungraded{background:rgba(239,68,68,.11)}.written-row.status-partial{background:rgba(59,130,246,.12)}.status-pill.info{background:#dbeafe;color:#1d4ed8}.written-delete{width:28px;height:28px;border:0;border-radius:8px;background:#dc2626;color:#fff;font-size:20px;cursor:pointer}.written-table input,.written-table textarea{width:100%;min-width:0;border:1px solid var(--line);background:var(--surface2);color:var(--ink);border-radius:9px;padding:8px}.edit-max-label{display:grid;grid-template-columns:auto 70px;gap:5px;align-items:center;margin-top:6px;font-size:11px}.written-modal-card{width:min(780px,calc(100vw - 28px));max-height:calc(100dvh - 24px);overflow:auto}.written-modal-card form{display:grid;grid-template-columns:1fr 1fr;gap:11px 14px}.written-modal-card label{display:grid;gap:6px;font-weight:700}.written-modal-card select,.written-modal-card input,.written-modal-card textarea{width:100%;border:1px solid var(--line);background:var(--surface2);color:var(--ink);border-radius:10px;padding:9px}.written-modal-card .wide-field,.written-modal-card #writtenScheduleHint{grid-column:1/-1}.score-choice{display:flex;gap:10px;margin:14px 0}.score-choice button{padding:12px 22px;border:1px solid var(--line);border-radius:10px;background:var(--surface2);color:var(--ink);font-weight:800;cursor:pointer}.score-choice button.selected{outline:3px solid rgba(37,99,235,.22);border-color:#2563eb}.max-score-card{width:min(440px,calc(100vw - 30px))}.max-score-card label{display:grid;gap:6px}.max-score-card input{border:1px solid var(--line);border-radius:10px;padding:10px}.grade-modal-card{width:min(1120px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto}.grade-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.grade-file{border:1px dashed var(--line);border-radius:12px;padding:10px;font-weight:800}.grade-file input{display:block;margin-top:6px}.grade-table-wrap{overflow:auto;max-height:58vh;margin:12px 0}.grade-table th:nth-child(1){width:75px}.grade-table th:nth-child(3){width:100px}.grade-table th:nth-child(4){width:120px}.grade-table input[type=number],.grade-table input[type=text],.grade-table input:not([type]){width:100%;border:1px solid var(--line);border-radius:8px;padding:8px;background:var(--surface2);color:var(--ink)}.absence-toast.warning{background:#b45309}@media(max-width:760px){.written-modal-card form{grid-template-columns:1fr}.written-modal-card form>*{grid-column:1!important}.written-table{font-size:10px}.grade-head{display:block}}

/* v47.1 — written works schedule/import stability and near-zero-scroll modals. */
#writtenOtherTypeWrap[hidden],.other-max[hidden]{display:none!important}
.written-modal-card{overflow:hidden;display:flex;flex-direction:column}
.written-modal-card form{overflow:visible}
.written-modal-card .inline-actions.wide-field{position:sticky;bottom:0;background:var(--surface);padding-top:10px;border-top:1px solid var(--line);z-index:3}
.max-score-card .other-max input:disabled{opacity:.55;cursor:not-allowed}
.grade-modal-card{height:min(860px,calc(100dvh - 20px));max-height:calc(100dvh - 20px);overflow:hidden;padding-bottom:0}
#gradeModalContent{height:100%;display:grid;grid-template-rows:auto auto minmax(150px,1fr) auto auto;min-height:0}
.grade-head{margin-right:38px}
.grade-import-box{border:1px solid var(--line);border-radius:14px;padding:12px 14px;margin:8px 0;background:var(--surface2)}
.grade-import-box h3{margin:0 0 4px}.grade-import-box>p{margin:0 0 9px;color:var(--muted)}
.grade-import-schema{display:grid;grid-template-columns:repeat(4,minmax(105px,1fr));gap:7px;margin:8px 0}
.grade-import-schema span{border:1px solid var(--line);border-radius:9px;padding:7px 9px;background:var(--surface);font-size:12px}
.grade-import-schema .meta{grid-column:1/-1}
.grade-file-drop{display:block;border:1px dashed var(--line);border-radius:11px;padding:9px 12px;font-weight:800;background:var(--surface);cursor:pointer}
.grade-file-drop input{margin-left:12px}
.grade-import-box>.inline-actions{margin-top:8px}
.grade-import-preview{margin-top:10px;border-top:1px solid var(--line);padding-top:8px}
.grade-import-preview h3{margin:0}.grade-preview-list{max-height:150px;overflow:auto;margin:7px 0}
.grade-preview-row{display:grid;grid-template-columns:minmax(150px,1fr) 80px minmax(220px,1.6fr);gap:8px;align-items:center;padding:6px 0;border-bottom:1px solid var(--line)}
.grade-preview-row label{display:grid;gap:3px;font-size:11px;color:#b45309}.grade-preview-row select{width:100%;padding:7px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink)}
.matched-ok{color:#15803d;font-weight:700}
.grade-table-wrap{min-height:0;max-height:none;overflow:auto;margin:8px 0}
.grade-table{font-size:12px}.grade-table th,.grade-table td{padding:6px}
.grade-table th:nth-child(1){width:65px}.grade-table th:nth-child(3){width:130px}.grade-table th:nth-child(4){width:85px}.grade-table th:nth-child(5){width:105px}
.sticky-grade-actions{position:sticky;bottom:0;z-index:5;background:var(--surface);padding:10px 0;border-top:1px solid var(--line);margin:0}
#gradeMessage{margin:0 0 8px}
@media(max-height:780px) and (min-width:761px){
 .grade-modal-card{padding:14px 18px 0}.grade-head h2{font-size:22px;margin:3px 0}.grade-head p{margin:2px 0}.grade-import-box{padding:8px 10px;margin:4px 0}.grade-import-box>p{font-size:12px;margin-bottom:5px}.grade-import-schema{margin:5px 0;gap:5px}.grade-import-schema span{padding:5px 7px}.grade-file-drop{padding:6px 9px}.grade-import-box>.inline-actions{margin-top:5px}.grade-table-wrap{margin:5px 0}
}
@media(max-width:760px){
 .grade-modal-card{height:calc(100dvh - 12px);max-height:calc(100dvh - 12px)}
 #gradeModalContent{grid-template-rows:auto auto minmax(180px,1fr) auto auto}
 .grade-import-schema{grid-template-columns:1fr 1fr}.grade-preview-row{grid-template-columns:1fr 70px}.grade-preview-row>*:nth-child(3){grid-column:1/-1}
 .grade-file-drop input{display:block;margin:7px 0 0;width:100%}
}

/* v47.3 — written works editing, status layout and grading review. */
.written-table .remarks-cell{white-space:normal;overflow:visible}
.written-remarks-content{display:flex;align-items:flex-start;gap:7px;flex-wrap:wrap;min-width:0}
.written-remarks-content .status-pill{display:inline-flex;align-items:center;flex:0 0 auto;white-space:nowrap;padding:5px 8px;line-height:1.15}
.written-remarks-text{display:block;flex:1 1 130px;min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.35}
.written-row.status-partial{background:rgba(249,115,22,.14)}
.status-pill.info{background:#ffedd5;color:#c2410c;border-color:#fdba74}

/* Compact normal view widths. */
.written-table th:nth-child(1){width:10%}
.written-table th:nth-child(2){width:5%}
.written-table th:nth-child(3){width:12%}
.written-table th:nth-child(4){width:12%}
.written-table th:nth-child(5){width:15%}
.written-table th:nth-child(6){width:9%}
.written-table th:nth-child(7){width:12%}
.written-table th:nth-child(8){width:25%}

/* In edit mode the average column becomes the compact editable “Άριστα”. */
.written-table.is-editing th:nth-child(1){width:8%}
.written-table.is-editing th:nth-child(2){width:4%}
.written-table.is-editing th:nth-child(3){width:10%}
.written-table.is-editing th:nth-child(4){width:13%}
.written-table.is-editing th:nth-child(5){width:16%}
.written-table.is-editing th:nth-child(6){width:11%}
.written-table.is-editing th:nth-child(7){width:7%}
.written-table.is-editing th:nth-child(8){width:27%}
.written-table.is-editing th:nth-child(9){width:4%}
.written-table.is-editing td{padding:6px 4px}
.written-table.is-editing .edit-max{max-width:78px;text-align:center;margin:auto}
.written-table.is-editing .edit-written-remarks{min-height:42px;resize:vertical;line-height:1.25}

/* More room for file validation and grade supervision. */
.grade-modal-card{width:min(1280px,calc(100vw - 18px));height:calc(100dvh - 16px);max-height:calc(100dvh - 16px)}
#gradeModalContent{grid-template-rows:auto auto minmax(230px,1fr) auto auto}
.grade-import-box{max-height:44vh;overflow:auto}
.grade-preview-list{max-height:300px;min-height:120px}
.grade-import-preview .sticky-grade-actions{position:sticky;bottom:-1px;padding-bottom:8px}
.grade-table-wrap{min-height:230px}

@media(max-height:760px) and (min-width:761px){
  .grade-import-box{max-height:38vh}
  .grade-preview-list{max-height:220px}
  .grade-table-wrap{min-height:190px}
}

/* v47.4 — Written works import review and compact no-scroll controls */
.written-row.status-partial{background:rgba(249,115,22,.14)}
.written-row.status-partial .status-pill.info{
  background:#dbeafe;
  color:#1d4ed8;
  border:1px solid #93c5fd;
  white-space:nowrap;
}
.grade-import-box{
  max-height:none!important;
  overflow:visible!important;
}
.grade-import-controls{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:end;
  gap:10px;
  margin-top:8px;
}
.grade-import-controls .grade-file-drop{margin:0;min-width:0}
.grade-import-controls #checkGradeFile{
  min-height:42px;
  white-space:nowrap;
  align-self:end;
}
.grade-import-preview{
  margin-top:10px;
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px;
  background:var(--surface);
}
.grade-preview-list{
  max-height:260px!important;
  overflow:auto;
  margin:8px 0;
}
.grade-review-shell{
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--surface);
  padding:10px 12px;
  margin-top:10px;
}
.grade-review-shell.import-ready{
  outline:3px solid rgba(37,99,235,.15);
  border-color:#93c5fd;
}
.grade-review-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:14px;
  margin-bottom:7px;
}
.grade-review-head h3,.grade-review-head p{margin:0}
.grade-review-shell .grade-table-wrap{
  max-height:min(52vh,540px)!important;
  min-height:260px;
  overflow:auto;
  margin:0;
}
.grade-modal-card{
  overflow:hidden!important;
  display:flex;
  flex-direction:column;
}
.grade-modal-card #gradeModalContent{
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:auto;
}
.grade-modal-card .sticky-grade-actions{
  position:sticky;
  bottom:0;
  z-index:4;
  margin:8px -18px 0;
  padding:10px 18px 14px;
  background:var(--surface);
  border-top:1px solid var(--line);
}
@media(max-width:760px){
  .grade-import-controls{grid-template-columns:1fr}
  .grade-import-controls #checkGradeFile{width:100%}
  .grade-review-head{display:block}
  .grade-review-shell .grade-table-wrap{min-height:220px;max-height:48vh!important}
}

/* v47.5 — compact written-work grading and pending-work flow */
.written-row.status-partial{background:rgba(59,130,246,.20)!important}
.written-row.status-partial .status-pill.info{background:#dbeafe!important;color:#1d4ed8!important;border-color:#93c5fd!important}
.grade-modal-card{width:min(1180px,calc(100vw - 20px));height:min(820px,calc(100dvh - 16px));overflow:hidden}
.grade-modal-card #gradeModalContent{height:100%;display:flex;flex-direction:column;min-height:0}
.grade-top-actions{margin-right:38px;align-self:center}
.grade-review-shell{display:flex;flex-direction:column;min-height:0;flex:1;border:1px solid var(--line);border-radius:13px;padding:10px 12px;background:var(--surface)}
.grade-review-shell .grade-table-wrap{flex:1;min-height:260px;max-height:none;overflow:auto;margin:6px 0}
.grade-review-head{display:flex;justify-content:space-between;gap:16px;align-items:center}
.grade-review-head h3,.grade-review-head p{margin:0}
.grade-table{table-layout:fixed;width:100%;font-size:12px}
.grade-table th,.grade-table td{padding:6px 7px;vertical-align:middle;white-space:normal;overflow-wrap:anywhere}
.grade-table:not(.grade-edit-table) th:nth-child(1){width:31%}
.grade-table:not(.grade-edit-table) th:nth-child(2){width:17%}
.grade-table:not(.grade-edit-table) th:nth-child(3){width:9%}
.grade-table:not(.grade-edit-table) th:nth-child(4){width:11%}
.grade-table:not(.grade-edit-table) th:nth-child(5){width:32%}
.grade-edit-table th:nth-child(1){width:7%}.grade-edit-table th:nth-child(2){width:25%}.grade-edit-table th:nth-child(3){width:13%}.grade-edit-table th:nth-child(4){width:8%}.grade-edit-table th:nth-child(5){width:10%}.grade-edit-table th:nth-child(6){width:37%}
.grade-edit-table td:last-child{display:grid;grid-template-columns:minmax(180px,1fr) 145px;gap:6px}
.grade-edit-table input{padding:6px 8px!important}
.student-flag{display:inline-flex;margin-left:7px;padding:3px 6px;border-radius:999px;font-size:10px;font-weight:800;white-space:nowrap}
.student-flag.absence{background:#fee2e2;color:#b91c1c;border:1px solid #fecaca}.student-flag.unassigned{background:#f1f5f9;color:#475569;border:1px solid #cbd5e1}
.grade-import-box{max-height:none!important;overflow:visible!important;margin:6px 0 10px}
.grade-import-schema{grid-template-columns:repeat(4,minmax(110px,1fr))}.grade-import-schema .meta{display:none}
.grade-import-controls #checkGradeFile{background:#1d5be0;color:#fff;border-color:#1d5be0}
.grade-import-preview{max-height:220px;overflow:auto}.grade-preview-list{max-height:135px}
.sticky-grade-actions{flex:0 0 auto;margin-top:8px}
.pending-modal-card{width:min(1120px,calc(100vw - 20px));max-height:calc(100dvh - 20px);overflow:hidden;display:flex;flex-direction:column}
.pending-modal-card #pendingModalContent{min-height:0;display:flex;flex-direction:column}
.pending-table-wrap{max-height:62vh;overflow:auto}.pending-table{table-layout:fixed;width:100%}.pending-table th,.pending-table td{white-space:normal;overflow-wrap:anywhere}.pending-actions{margin-top:10px}
@media(max-height:720px){.grade-modal-card{height:calc(100dvh - 8px)}.grade-review-shell .grade-table-wrap{min-height:180px}.grade-import-preview{max-height:160px}.grade-preview-list{max-height:90px}}
@media(max-width:760px){.grade-top-actions{margin-right:0;flex-wrap:wrap}.grade-review-head{display:block}.grade-edit-table td:last-child{grid-template-columns:1fr}.grade-import-schema{grid-template-columns:1fr 1fr}}
.supplemental-card{width:min(560px,calc(100vw - 24px))}.supplemental-card form{display:grid;grid-template-columns:1fr 1fr;gap:12px}.supplemental-card label{display:grid;gap:6px;font-weight:800}.supplemental-card select,.supplemental-card input{width:100%;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--surface2);color:var(--ink)}.supplemental-card .inline-actions{grid-column:1/-1}

/* =========================================================
   Teacher Support v49 — responsive shell & UI integrity layer
   Component framework direction: progressive enhancement.
   ========================================================= */
:root{--ts-visual-height:100dvh;--ts-mobile-nav-width:min(84vw,320px)}
.mobile-menu-toggle,.mobile-nav-backdrop{display:none}

/* Reduce avoidable page scrolling while preserving accessible overflow. */
.app-body{min-height:100dvh}
.app-shell{min-height:calc(100dvh - 64px)}
.modal-card{max-height:calc(var(--ts-visual-height) - 24px);overscroll-behavior:contain}
.table-wrap,.grade-table-wrap,.pending-table-wrap{scrollbar-gutter:stable}
button,input,select,textarea{touch-action:manipulation}

/* Compact controls remain usable without inflating the page. */
@media (min-width:901px){
  .panel>.filters,.panel .filter-row{align-items:center}
  .compact-table th,.compact-table td{line-height:1.25}
}

@media (max-width:900px){
  .topbar{position:sticky;top:0;z-index:60;padding-inline:12px;gap:8px}
  .mobile-menu-toggle{display:inline-grid;place-items:center;order:-1;flex:0 0 auto}
  .mobile-menu-toggle span{font-size:20px;line-height:1}
  .app-brand b{display:none}
  .top-actions{margin-left:auto;gap:6px;min-width:0}
  .language-switcher{max-width:min(58vw,300px)}
  .language-quick{display:none!important}
  .language-select-wrap{min-width:112px}
  .avatar{flex:0 0 auto}

  .app-shell{display:block;min-height:calc(100dvh - 58px)}
  .sidebar{
    position:fixed!important;inset:58px auto 0 0;z-index:80;
    width:var(--ts-mobile-nav-width)!important;max-width:100%;height:calc(100dvh - 58px);
    transform:translateX(-105%);transition:transform .22s ease;
    box-shadow:18px 0 42px rgba(15,23,42,.22);overflow-y:auto;
    overscroll-behavior:contain;padding-bottom:max(18px,env(safe-area-inset-bottom));
  }
  .sidebar.is-mobile-open{transform:translateX(0)}
  .mobile-nav-backdrop{position:fixed;inset:58px 0 0;z-index:70;border:0;background:rgba(15,23,42,.42);padding:0}
  .mobile-nav-backdrop:not([hidden]){display:block}
  body.mobile-nav-open{overflow:hidden}

  .dashboard-main,.page-main,.students-main,.absences-main,.written-main,main{width:100%;max-width:100%;padding-inline:12px!important}
  .panel{border-radius:14px}
  .filters,.filter-row,.toolbar{gap:8px}
  .filters>*,.filter-row>*{min-width:0}
  .modal{padding:8px;align-items:flex-start}
  .modal-card{width:min(100%,720px)!important;max-height:calc(var(--ts-visual-height) - 16px)!important;border-radius:16px}
}

@media (max-width:640px){
  .topbar{min-height:56px}
  .language-switcher{max-width:150px}
  .theme-toggle{display:none}
  .panel{padding:12px!important}
  .panel-head{align-items:flex-start;gap:8px}
  .panel-head h1,.panel-head h2{line-height:1.1}
  .inline-actions,.panel-actions,.grade-top-actions{flex-wrap:wrap}
  .inline-actions>button,.inline-actions>a,.panel-actions>button,.panel-actions>a{flex:1 1 auto}
  .filters,.filter-row{display:grid!important;grid-template-columns:1fr!important}
  .filters button,.filter-row button{width:100%}
  .table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
  .modal-card{padding:18px 14px!important}
  .modal-close{top:8px;right:8px}
}

@media (prefers-reduced-motion:reduce){
  .sidebar{transition:none!important}
  *,*::before,*::after{scroll-behavior:auto!important}
}

/* v49.1 compact landing page */
.brand-panel h1{font-size:clamp(30px,4.2vw,56px);line-height:1.04;margin:8px 0 18px}
.brand-panel>p:not(.eyebrow){font-size:16px;line-height:1.5;margin-bottom:24px}
.brand-panel .feature{margin:8px 0;font-size:15px}
.brand-panel .brand-mark{margin-bottom:28px}
@media(max-height:760px) and (min-width:901px){.brand-panel{padding-top:34px;padding-bottom:34px}.brand-panel h1{font-size:clamp(28px,3.7vw,48px)}.brand-panel>p:not(.eyebrow){margin-bottom:18px}.brand-panel .feature{margin:5px 0}}


/* v49.2 auth viewport tuning — laptop and 10-inch tablet first */
html,body{min-height:100%}
body.auth-login{height:100dvh;overflow:hidden}
body.auth-login .shell{height:100dvh;min-height:0}
body.auth-login .brand-panel,
body.auth-login .auth-panel{min-height:0}
body.auth-login .auth-panel{overflow:hidden;display:flex;flex-direction:column;justify-content:center}
body.auth-login .tabs{flex:0 0 auto;margin-bottom:22px}
body.auth-login #loginForm{width:100%;gap:14px}
body.auth-login #loginForm h2{font-size:clamp(25px,3vw,36px);margin:4px 0 7px}
body.auth-login #loginForm .primary{padding:12px 18px}
body.auth-login #loginForm .signup-prompt{margin:0}
body.auth-login .brand-panel{padding:clamp(26px,4.5vw,72px)}
body.auth-login .brand-panel h1{font-size:clamp(28px,3.8vw,50px);margin:7px 0 15px}
body.auth-login .brand-panel>p:not(.eyebrow){font-size:15px;line-height:1.42;margin-bottom:18px}
body.auth-login .brand-panel .feature{margin:5px 0;font-size:14px}
body.auth-login .brand-panel .brand-mark{margin-bottom:20px}
body.auth-login .auth-language{z-index:20}
body.auth-signup{min-height:100dvh;overflow:auto}
body.auth-signup .auth-panel{overflow:auto}

@media (min-width:901px) and (max-height:820px){
  body.auth-login .auth-panel{padding-top:24px;padding-bottom:24px}
  body.auth-login .tabs{margin-bottom:16px}
  body.auth-login #loginForm{gap:11px}
  body.auth-login #loginForm input{padding-top:10px;padding-bottom:10px}
  body.auth-login .brand-panel{padding-top:24px;padding-bottom:24px}
}

@media (min-width:768px) and (max-width:1100px){
  .shell{grid-template-columns:minmax(300px,.92fr) minmax(430px,1.08fr)}
  body.auth-login .brand-panel{padding:34px}
  body.auth-login .auth-panel{padding:34px 30px}
  body.auth-login .brand-panel h1{font-size:clamp(30px,4.2vw,44px)}
  body.auth-login .brand-panel>p:not(.eyebrow){font-size:14px}
  body.auth-login .brand-panel .feature{font-size:13px}
}

@media (max-width:900px){
  body.auth-login{height:auto;min-height:100dvh;overflow:auto}
  body.auth-login .shell{height:auto;min-height:100dvh;grid-template-columns:1fr;grid-template-rows:auto 1fr}
  body.auth-login .brand-panel{min-height:auto;padding:72px 28px 24px}
  body.auth-login .brand-panel h1{font-size:clamp(30px,6vw,44px)}
  body.auth-login .brand-panel>p:not(.eyebrow){margin-bottom:12px}
  body.auth-login .brand-panel .feature{display:inline-flex;margin:4px 14px 4px 0}
  body.auth-login .auth-panel{overflow:visible;padding:22px 24px 28px;justify-content:flex-start}
}

@media (min-width:768px) and (max-width:900px) and (orientation:landscape){
  body.auth-login{height:100dvh;overflow:hidden}
  body.auth-login .shell{height:100dvh;grid-template-columns:.9fr 1.1fr;grid-template-rows:1fr}
  body.auth-login .brand-panel{padding:26px;justify-content:center}
  body.auth-login .brand-panel .brand-mark{width:46px;height:46px;margin-bottom:14px}
  body.auth-login .brand-panel h1{font-size:32px}
  body.auth-login .brand-panel .feature{display:flex;font-size:12px;margin:3px 0}
  body.auth-login .auth-panel{padding:24px;overflow:hidden;justify-content:center}
}

/* v49.3 stable authentication shell — signup changes content, never layout */
body.auth-login,
body.auth-signup{
  height:100dvh;
  min-height:100dvh;
  overflow:hidden;
}
body.auth-login .shell,
body.auth-signup .shell{
  height:100dvh;
  min-height:0;
}
body.auth-login .brand-panel,
body.auth-signup .brand-panel,
body.auth-login .auth-panel,
body.auth-signup .auth-panel{
  min-height:0;
}
body.auth-signup .brand-panel{
  padding:clamp(26px,4.5vw,72px);
}
body.auth-signup .brand-panel h1{
  font-size:clamp(28px,3.8vw,50px);
  margin:7px 0 15px;
}
body.auth-signup .brand-panel>p:not(.eyebrow){
  font-size:15px;
  line-height:1.42;
  margin-bottom:18px;
}
body.auth-signup .brand-panel .feature{
  margin:5px 0;
  font-size:14px;
}
body.auth-signup .brand-panel .brand-mark{
  margin-bottom:20px;
}
body.auth-login .auth-panel,
body.auth-signup .auth-panel{
  overflow:hidden;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
body.auth-signup .auth-panel{
  justify-content:flex-start;
}
body.auth-login .tabs,
body.auth-signup .tabs{
  position:relative;
  top:auto;
  flex:0 0 auto;
  z-index:6;
  background:#fff;
  margin-bottom:18px;
}
body.auth-signup #signupForm{
  width:100%;
  max-width:760px;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  padding:2px 8px 22px 2px;
  gap:14px;
}
body.auth-signup #signupForm h2{
  font-size:clamp(25px,3vw,36px);
  margin:4px 0 7px;
}
body.auth-signup #signupForm input,
body.auth-signup #signupForm select{
  padding-top:10px;
  padding-bottom:10px;
}
body.auth-signup #signupForm .primary{
  padding:12px 18px;
}
body.auth-login .auth-language,
body.auth-signup .auth-language{
  position:fixed;
  top:18px;
  right:18px;
  z-index:50;
}

@media (min-width:901px) and (max-height:820px){
  body.auth-signup .auth-panel{padding-top:24px;padding-bottom:24px}
  body.auth-signup .tabs{margin-bottom:12px}
  body.auth-signup #signupForm{gap:10px}
  body.auth-signup .brand-panel{padding-top:24px;padding-bottom:24px}
}

@media (min-width:768px) and (max-width:1100px){
  body.auth-signup .brand-panel{padding:34px}
  body.auth-signup .auth-panel{padding:34px 30px}
  body.auth-signup .brand-panel h1{font-size:clamp(30px,4.2vw,44px)}
  body.auth-signup .brand-panel>p:not(.eyebrow){font-size:14px}
  body.auth-signup .brand-panel .feature{font-size:13px}
}

@media (max-width:900px){
  body.auth-login,
  body.auth-signup{
    height:100dvh;
    min-height:100dvh;
    overflow:hidden;
  }
  body.auth-login .shell,
  body.auth-signup .shell{
    height:100dvh;
    min-height:0;
    grid-template-columns:1fr;
    grid-template-rows:minmax(230px,36vh) minmax(0,1fr);
    padding-top:0;
  }
  body.auth-login .brand-panel,
  body.auth-signup .brand-panel{
    min-height:0;
    padding:58px 24px 18px;
    justify-content:center;
  }
  body.auth-login .brand-panel h1,
  body.auth-signup .brand-panel h1{
    font-size:clamp(27px,5vw,38px);
    margin:5px 0 10px;
  }
  body.auth-login .brand-panel>p:not(.eyebrow),
  body.auth-signup .brand-panel>p:not(.eyebrow){
    margin-bottom:8px;
  }
  body.auth-login .brand-panel .feature,
  body.auth-signup .brand-panel .feature{
    display:inline-flex;
    margin:3px 10px 3px 0;
  }
  body.auth-login .auth-panel,
  body.auth-signup .auth-panel{
    min-height:0;
    overflow:hidden;
    padding:16px 22px 22px;
    justify-content:flex-start;
  }
  body.auth-signup #signupForm{
    max-width:none;
    padding-bottom:20px;
  }
  body.auth-login .auth-language,
  body.auth-signup .auth-language{
    position:fixed;
    top:10px;
    right:10px;
  }
}

@media (max-width:600px){
  body.auth-login .shell,
  body.auth-signup .shell{
    grid-template-rows:minmax(210px,34vh) minmax(0,1fr);
  }
  body.auth-login .brand-panel,
  body.auth-signup .brand-panel{
    padding:52px 18px 14px;
  }
  body.auth-login .brand-panel .brand-mark,
  body.auth-signup .brand-panel .brand-mark{
    width:42px;
    height:42px;
    margin-bottom:10px;
  }
  body.auth-login .brand-panel .feature,
  body.auth-signup .brand-panel .feature{
    font-size:12px;
  }
  body.auth-login .auth-panel,
  body.auth-signup .auth-panel{
    padding:12px 16px 18px;
  }
  body.auth-signup .grid.two{
    grid-template-columns:1fr;
    gap:10px;
  }
}

/* v51 — classroom cockpit and responsive navigation */
.student-session-modal{padding:12px}.student-session-card{width:min(1500px,calc(100vw - 24px));height:min(900px,calc(100dvh - 24px));max-width:none;max-height:none;overflow:hidden;padding:18px 20px;border-radius:24px}.student-session-shell{height:100%;display:flex;flex-direction:column;min-height:0}.session-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding:0 34px 10px 0}.session-head h2{font-size:clamp(22px,2vw,32px);margin:2px 0 6px}.session-meta{display:flex;flex-wrap:wrap;gap:6px}.session-meta span,.session-year{background:var(--soft);border:1px solid var(--line);border-radius:999px;padding:5px 10px;font-size:12px}.student-session-grid{display:grid;grid-template-columns:minmax(190px,230px) minmax(620px,1fr) minmax(180px,220px);gap:12px;min-height:0;flex:1}.period-summary,.score-dials,.exam-console{border:1px solid var(--line);border-radius:18px;background:var(--surface);min-height:0}.period-summary{display:grid;grid-template-rows:repeat(3,minmax(0,1fr));gap:7px;padding:8px}.period-summary section{background:var(--soft);border-radius:12px;padding:8px}.period-summary h3{font-size:13px;margin:0 0 5px}.period-summary section div{display:flex;justify-content:space-between;font-size:11px;padding:2px 0}.exam-console{display:grid;grid-template-rows:repeat(5,minmax(0,1fr)) auto;gap:8px;padding:10px}.rubric-row{display:grid;grid-template-columns:110px 1fr;align-items:center;gap:8px;background:var(--soft);border-radius:14px;padding:7px 10px}.rubric-row>b{font-size:13px}.rubric-row>div{display:grid;grid-template-columns:repeat(7,1fr);gap:7px}.behavior-row>div{grid-template-columns:repeat(3,1fr)}.score-key{height:clamp(42px,6vh,62px);padding:2px;border:0;border-radius:14px;color:#fff;font-weight:900;box-shadow:inset 0 -3px rgba(0,0,0,.13)}.band-fire{background:#8b0000}.band-red{background:#d72638}.band-orange{background:#ef6c35}.band-yellow{background:#d4a017}.band-lime{background:#7aa82f}.band-green{background:#18864b}.band-perfect{background:#009c55}.console-actions{display:grid;grid-template-columns:130px 150px 1fr;gap:8px}.hourly-key{background:#111827;color:#fff}.score-dials{padding:10px;display:grid;grid-template-rows:auto repeat(6,minmax(0,1fr));gap:7px}.score-dials h3{margin:0;font-size:14px}.digital-dial{background:#071526;border:1px solid #173b63;color:#8fffd1;border-radius:14px;padding:8px 10px;display:grid;grid-template-columns:1fr auto;align-items:center;box-shadow:inset 0 0 18px rgba(29,117,255,.18)}.digital-dial span{font-size:11px;color:#a6bdd5}.digital-dial strong{font:800 25px/1 ui-monospace,monospace;text-shadow:0 0 10px currentColor}.digital-dial small{grid-column:1/-1;color:#6e8ba8;font-size:9px}.student-session-loading{display:grid;place-items:center;height:100%}.v51-management .settings-grid{grid-template-columns:1.5fr 1fr}
@media(max-width:1100px){.student-session-grid{grid-template-columns:180px 1fr 170px}.rubric-row{grid-template-columns:92px 1fr}.score-key{font-size:11px}.session-meta span{padding:4px 7px}.student-session-card{padding:14px}.period-summary section div{font-size:10px}}
@media(max-width:900px){.sidebar nav{display:flex!important;flex-direction:column!important;align-items:stretch!important}.sidebar nav a,.sidebar nav button{width:100%!important;display:flex!important}.student-session-card{width:calc(100vw - 12px);height:calc(100dvh - 12px);padding:10px}.student-session-grid{grid-template-columns:150px minmax(500px,1fr) 145px;gap:7px}.rubric-row{grid-template-columns:78px 1fr;padding:5px}.rubric-row>div{gap:4px}.score-key{height:40px}.period-summary{padding:5px}.session-head{padding-bottom:6px}.session-head h2{font-size:20px}.session-meta span{font-size:9px}.digital-dial{padding:5px}.digital-dial strong{font-size:18px}}

/* v51.1 — independent evaluation periods by education level */
.management-year-form{display:grid;gap:14px}.management-year-panel{padding:18px 20px}.management-year-panel .grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}.education-period-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.period-level-card{padding:18px;display:grid;gap:12px;min-width:0}.period-level-head{display:flex;align-items:center;gap:12px}.period-level-head h2{margin:0}.period-level-head p{margin:3px 0 0;color:var(--muted);font-size:.86rem}.level-icon{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(135deg,#1f6fff,#5a4ff3);color:#fff;font-weight:900;box-shadow:0 9px 22px rgba(31,111,255,.22)}.management-savebar{display:flex;justify-content:flex-end;position:sticky;bottom:10px;z-index:3}.management-savebar button{box-shadow:0 10px 25px rgba(31,94,220,.24)}.management-new-year{margin-top:14px}.inline-year-form{display:grid;grid-template-columns:minmax(220px,360px) auto;align-items:end;gap:12px}.inline-year-form button{height:44px}.period-level-card [hidden]{display:none!important}
@media(max-width:1100px){.management-year-panel .grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}.education-period-grid{grid-template-columns:1fr}.period-level-card{grid-template-columns:minmax(180px,.8fr) repeat(2,minmax(180px,1fr));align-items:end}.period-level-head{grid-row:1 / span 2}.period-level-card>label{margin:0}}
@media(max-width:760px){.management-year-panel .grid.four,.period-level-card,.inline-year-form{grid-template-columns:1fr}.period-level-head{grid-row:auto}.management-savebar{position:static}.settings-page.v51-management{padding-bottom:24px}}

/* v51.2 — professional student session and tablet stability */
html,body{max-width:100%;overflow-x:hidden;font-family:"Noto Sans",Arial,sans-serif}
.student-session-card,.student-session-card button,.student-session-card input,.student-session-card select{font-family:"Noto Sans",Arial,sans-serif}
.student-session-card{background:linear-gradient(145deg,var(--surface),var(--surface2));box-shadow:0 28px 90px rgba(15,23,42,.28)}
.student-session-grid{grid-template-columns:minmax(185px,220px) minmax(560px,1fr) minmax(180px,215px);gap:10px}
.exam-console{gap:5px;padding:8px;background:linear-gradient(180deg,rgba(37,99,235,.035),transparent)}
.rubric-row{grid-template-columns:112px 1fr;gap:8px;padding:5px 8px;border:1px solid rgba(148,163,184,.18)}
.rubric-row>div{grid-template-columns:repeat(7,minmax(48px,1fr));gap:6px}
.behavior-row>div{grid-template-columns:repeat(7,minmax(48px,1fr));justify-content:start}
.behavior-row .score-key{grid-column:span 1}
.score-key{height:clamp(38px,5.2vh,54px);border-radius:12px;transition:transform .12s ease,filter .12s ease,box-shadow .12s ease;box-shadow:inset 0 -3px rgba(0,0,0,.16),0 4px 12px rgba(15,23,42,.08)}
.score-key:hover,.score-key:focus-visible{transform:translateY(-1px);filter:saturate(1.08);outline:3px solid rgba(37,99,235,.2)}
.band-brown{background:#7c3f18}.band-red{background:#dc2626}.band-orange{background:#f97316}.band-yellow{background:#d4a017}.band-lime{background:#65a30d}.band-green{background:#16834a}.band-fire{background:#8b0000}.band-perfect{background:#009c55}
.hourly-key{border-radius:12px!important;font-weight:900;letter-spacing:.02em}.undo-session{font-weight:900;border:2px solid #2563eb!important;color:#1d4ed8!important;background:#eff6ff!important}.console-actions{grid-template-columns:120px minmax(190px,240px) 1fr}
.score-dials{padding:8px;grid-template-rows:repeat(6,minmax(0,1fr));gap:6px}.score-dials h3{display:none}
.digital-dial{width:100%;border:1px solid #214d7d;background:linear-gradient(145deg,#071526,#102c49);cursor:pointer;text-align:left;grid-template-columns:1fr auto auto;gap:4px;padding:7px 9px;font-family:"Noto Sans",Arial,sans-serif}
.digital-dial strong{font-family:"Noto Sans",Arial,sans-serif;font-variant-numeric:tabular-nums}.digital-dial small{grid-column:auto;color:#a7c6df;font-size:10px;white-space:nowrap}.digital-dial em{font-style:normal;color:#6e8ba8;font-size:9px}.digital-dial:hover{border-color:#60a5fa}
.schedule-off{background:#fee2e2!important;border-color:#fecaca!important;color:#b91c1c!important;font-weight:900}
.event-detail-modal{position:absolute;inset:0;z-index:6;background:rgba(15,23,42,.5);display:grid;place-items:center;padding:20px}.event-detail-modal[hidden]{display:none}.event-detail-card{width:min(520px,92%);max-height:78%;overflow:hidden;background:var(--surface);border:1px solid var(--line);border-radius:20px;box-shadow:0 24px 70px rgba(15,23,42,.3);display:flex;flex-direction:column}.event-detail-head{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-bottom:1px solid var(--line)}.event-detail-head h3{margin:0}.event-detail-list{padding:10px;overflow:auto}.event-detail-row{display:grid;grid-template-columns:18px 60px 1fr 34px;align-items:center;gap:10px;padding:8px;border-radius:10px}.event-detail-row:nth-child(odd){background:var(--surface2)}.event-detail-row button{border:0;border-radius:8px;background:#dc2626;color:#fff;font-size:19px;height:30px}.event-band{width:14px;height:14px;border-radius:4px}
.events-page{max-width:1500px}.events-toolbar{display:grid;grid-template-columns:1.5fr repeat(5,minmax(130px,1fr)) auto auto auto auto;gap:8px;align-items:center}.events-table{table-layout:fixed;width:100%;font-size:12px}.events-table th,.events-table td{padding:8px 6px;white-space:normal;overflow-wrap:anywhere}.events-table th:nth-child(1){width:23%}.events-table th:nth-child(2){width:20%}.events-table th:nth-child(3){width:11%}.events-table th:nth-child(4){width:14%}.events-table th:nth-child(5){width:13%}.events-table th:nth-child(6){width:9%}.events-table th:nth-child(7){width:10%}.behavior-swatch{display:inline-block;width:18px;height:18px;border-radius:5px;vertical-align:middle;box-shadow:inset 0 0 0 1px rgba(0,0,0,.12)}
@media(max-width:1180px){.student-session-grid{grid-template-columns:170px minmax(500px,1fr) 165px}.rubric-row{grid-template-columns:92px 1fr}.rubric-row>div,.behavior-row>div{gap:4px}.score-key{font-size:10px}.events-toolbar{grid-template-columns:repeat(4,1fr)}.events-toolbar>*{min-width:0}}
@media(max-width:1024px){.app-shell,.settings-page,.roster-page{max-width:100vw;overflow-x:hidden}.student-session-card{width:calc(100vw - 8px);height:calc(100dvh - 8px);padding:8px}.student-session-grid{grid-template-columns:145px minmax(470px,1fr) 145px;gap:5px}.period-summary{padding:4px}.period-summary section{padding:5px}.session-head{padding:0 32px 5px 0}.session-meta{gap:3px}.session-meta span{font-size:8.5px;padding:3px 5px}.score-key{height:36px;border-radius:9px}.rubric-row{padding:3px 5px}.console-actions{grid-template-columns:100px 180px 1fr}.digital-dial{padding:4px 6px}.digital-dial strong{font-size:17px}}
@media(max-width:820px){.student-session-grid{grid-template-columns:130px minmax(430px,1fr) 130px}.student-session-card{overflow:auto}.events-toolbar{grid-template-columns:1fr 1fr}.events-table{font-size:10px}}

/* =========================================================
   v51.3 — calendar management, event workflows, full student card
   ========================================================= */
html,body{max-width:100%;overflow-x:hidden}
.v513-management{width:min(1480px,calc(100% - 28px));padding-bottom:34px}
.v513-management-form{display:grid;gap:14px}
.calendar-defaults,.active-year-panel,.custom-holidays-panel{padding:18px}
.calendar-grid,.active-year-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.calendar-grid label,.active-year-grid label,.year-picker{min-width:0}
.calendar-grid input,.active-year-grid input,.year-picker select{width:100%;min-width:0}
.stt-global-settings{position:relative;overflow:hidden;border-color:color-mix(in srgb,var(--accent) 34%,var(--line));background:linear-gradient(135deg,color-mix(in srgb,var(--surface) 88%,var(--accent)),var(--surface))}
.stt-global-settings:before{content:"";position:absolute;inset:auto -80px -130px auto;width:260px;height:260px;border-radius:50%;background:color-mix(in srgb,var(--accent) 14%,transparent);pointer-events:none}
.stt-settings-head{position:relative;display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:16px}.stt-settings-head h2{margin:2px 0 5px}.stt-settings-head p{margin:0;color:var(--muted);max-width:760px}.stt-local-badge{display:inline-flex;align-items:center;min-height:28px;padding:0 11px;border:1px solid color-mix(in srgb,var(--accent) 48%,var(--line));border-radius:999px;color:var(--accent);font-size:11px;font-weight:800;letter-spacing:.08em;white-space:nowrap}
.stt-mode-picker{position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0;padding:0;border:0}.stt-mode-picker legend{grid-column:1/-1;padding:0 0 3px;font-size:13px;font-weight:800;color:var(--muted)}.stt-mode-card{display:flex;align-items:flex-start;gap:11px;padding:14px;border:1px solid var(--line);border-radius:15px;background:color-mix(in srgb,var(--surface) 88%,transparent);cursor:pointer;transition:border-color .18s ease,transform .18s ease,box-shadow .18s ease}.stt-mode-card:hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--accent) 60%,var(--line));box-shadow:0 8px 20px color-mix(in srgb,var(--ink) 8%,transparent)}.stt-mode-card input{margin:3px 0 0;accent-color:var(--accent)}.stt-mode-copy{display:grid;gap:3px;line-height:1.35}.stt-mode-copy b{font-size:15px}.stt-mode-copy small{color:var(--muted);font-size:12px}
.stt-learning-card{position:relative;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;margin-top:12px;padding:15px;border:1px solid color-mix(in srgb,var(--accent) 28%,var(--line));border-radius:15px;background:color-mix(in srgb,var(--surface2) 82%,transparent);cursor:pointer}.stt-learning-card input{position:absolute;inline-size:1px;block-size:1px;opacity:0}.stt-learning-toggle{width:43px;height:25px;border-radius:999px;background:var(--line);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ink) 10%,transparent);transition:background .18s ease}.stt-learning-toggle:after{content:"";display:block;width:19px;height:19px;margin:3px;border-radius:50%;background:#fff;box-shadow:0 2px 6px color-mix(in srgb,#000 28%,transparent);transition:transform .18s ease}.stt-learning-card input:checked~.stt-learning-toggle{background:var(--accent)}.stt-learning-card input:checked~.stt-learning-toggle:after{transform:translateX(18px)}.stt-learning-card input:focus-visible~.stt-learning-toggle{outline:3px solid color-mix(in srgb,var(--accent) 35%,transparent);outline-offset:3px}.stt-learning-copy{display:grid;gap:3px}.stt-learning-copy small{color:var(--muted);line-height:1.35}.stt-state{font-size:11px;font-weight:900;letter-spacing:.08em;color:var(--muted)}.stt-learning-card input:checked~.stt-state{color:var(--accent)}
.stt-confirm-card{width:min(470px,calc(100vw - 28px));padding:30px!important;text-align:center}.stt-confirm-icon{display:grid;place-items:center;width:48px;height:48px;margin:0 auto 12px;border-radius:16px;background:color-mix(in srgb,#d97706 16%,var(--surface2));color:#c26709;font-size:30px;font-weight:800}.stt-confirm-card h2{margin:4px 0 10px}.stt-confirm-card>p:not(.eyebrow){margin:0;color:var(--muted);line-height:1.55}.stt-confirm-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;margin-top:22px}.stt-confirm-actions .danger{background:#b42318;border-color:#b42318}
.custom-holidays-panel>label{display:grid;gap:8px;font-weight:700}
.custom-holidays-panel textarea{width:100%;min-width:0;min-height:150px;box-sizing:border-box;resize:vertical;border:1px solid var(--line);border-radius:12px;padding:12px;background:var(--surface2);color:var(--ink);font:inherit;line-height:1.5}
.custom-holidays-panel>.hint{margin:0}
.v513-period-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.v513-period-grid .period-level-card{min-width:0;padding:16px}
.v513-period-grid .grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.management-savebar{position:sticky;bottom:10px;z-index:4;display:flex;justify-content:flex-end;pointer-events:none}
.management-savebar button{pointer-events:auto;box-shadow:0 12px 28px rgba(37,99,235,.22)}
.danger-outline{background:transparent!important;color:#dc2626!important;border:1px solid rgba(220,38,38,.45)!important}
.context-date-card{border:0;cursor:pointer;position:relative;font-family:"Noto Sans",Arial,sans-serif}
.context-date-card em{display:block;font-style:normal;font-size:9px;font-weight:900;letter-spacing:.12em;margin-top:2px}
.context-date-card.status-archive,.context-date-card.status-inactive{background:#b91c1c!important;color:#fff!important}
.context-date-card.status-shifted{background:#f59e0b!important;color:#3b2200!important}
.context-date-modal{width:min(440px,calc(100vw - 24px))}

.events-table:not(.is-editing) .edit-only{display:none}
.events-table.is-editing .edit-only{display:table-cell}
.events-table select{width:100%;min-width:62px;padding:6px 7px}
.event-entry-card{width:min(760px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:hidden}
.event-entry-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.event-entry-form .wide{grid-column:1/-1}
.event-score-picker>div{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px;margin-top:6px}
.event-score-picker .score-key{height:46px;border-radius:13px}
.event-score-picker .score-key[aria-pressed="true"]{outline:3px solid rgba(37,99,235,.35);transform:translateY(2px);box-shadow:inset 0 3px 8px rgba(0,0,0,.28)}

.student-session-modal.is-full-card{position:fixed;inset:0;padding:6px;background:rgba(15,23,42,.52);z-index:1000}
.student-session-modal.is-full-card .student-session-card{width:calc(100vw - 12px);height:calc(100dvh - 12px);max-width:none;max-height:none;border-radius:22px;margin:0;overflow:hidden}
.student-session-card{font-family:"Noto Sans",Arial,sans-serif}
.student-session-grid{grid-template-columns:minmax(185px,215px) minmax(560px,1fr) minmax(178px,205px);align-items:stretch}
.exam-console{gap:5px;padding:8px}
.rubric-row{min-height:0;padding:5px 8px;border:1px solid transparent;transition:.18s ease}
.rubric-row>div{gap:6px}
.score-key{height:clamp(38px,5.2vh,54px);border-radius:50%;aspect-ratio:1.45/1;justify-self:center;width:min(100%,74px);transition:transform .13s ease,filter .13s ease,box-shadow .13s ease}
.score-key:hover{filter:brightness(1.05);transform:translateY(-1px)}
.score-key:active,.score-key.is-pressed{transform:translateY(3px) scale(.97);box-shadow:inset 0 5px 10px rgba(0,0,0,.28)}
.behavior-row>div{grid-template-columns:repeat(7,1fr)}
.behavior-row .score-key{grid-column:span 1}
.behavior-row .score-key:nth-child(1){grid-column:1/2}.behavior-row .score-key:nth-child(2){grid-column:2/3}.behavior-row .score-key:nth-child(3){grid-column:3/4}
.console-actions{grid-template-columns:110px 120px 1fr;gap:7px}
.console-actions button{min-height:38px;padding:7px 10px;border-radius:12px;font-size:12px}
.hourly-key{border:0;box-shadow:inset 0 -3px rgba(255,255,255,.08)}
.hourly-key.is-active{background:#991b1b!important;box-shadow:0 0 0 3px rgba(220,38,38,.2)}
.exam-console .undo-session{font-weight:900;border:2px solid #64748b}
.score-dials{grid-template-rows:repeat(5,minmax(0,1fr));align-content:stretch}
.digital-dial{border-radius:16px;text-align:left;border:1px solid #254d78;cursor:pointer;grid-template-columns:1fr auto auto;column-gap:6px;transition:.15s ease}
.digital-dial:hover{border-color:#60a5fa;transform:translateY(-1px)}
.digital-dial strong{min-width:38px;text-align:right}
.digital-dial small{grid-column:auto;font-size:10px;white-space:nowrap}
.digital-dial em{font-style:normal;font-size:9px;color:#6e8ba8}
.student-session-shell.hourly-locked .rubric-row{opacity:.34;filter:grayscale(.55);pointer-events:none}
.student-session-shell.hourly-locked .score-dials{opacity:.58}
.schedule-off{background:#dc2626!important;border-color:#dc2626!important;color:#fff!important;font-weight:900}
.period-empty{margin:7px 0 0;font-size:10px;color:var(--muted);line-height:1.25}
.band-brown{background:#7c2d12}.band-fire{background:#8b0000}

@media(max-width:1180px){
 .calendar-grid,.active-year-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .v513-period-grid{grid-template-columns:1fr 1fr}.v513-period-grid>*:last-child{grid-column:1/-1}
 .student-session-grid{grid-template-columns:165px minmax(500px,1fr) 160px}
 .score-key{width:min(100%,62px);font-size:10px}
}
@media(max-width:1024px){
 .v513-management{width:calc(100% - 12px);padding:10px 0 24px}
 .v513-management .settings-title{padding-inline:6px}
 .calendar-defaults,.active-year-panel,.custom-holidays-panel,.v513-period-grid .period-level-card{padding:12px}
 .v513-period-grid{grid-template-columns:1fr 1fr}
 .student-session-modal.is-full-card{padding:2px}
 .student-session-modal.is-full-card .student-session-card{width:calc(100vw - 4px);height:calc(100dvh - 4px);border-radius:14px;padding:7px}
 .student-session-grid{grid-template-columns:142px minmax(440px,1fr) 140px;gap:4px}
 .session-head{padding-bottom:4px}.session-head h2{font-size:18px}.session-meta span{font-size:8px;padding:3px 5px}
 .period-summary section{padding:4px}.period-summary h3{font-size:10px}.period-summary section div{font-size:9px}
 .rubric-row{grid-template-columns:74px 1fr;padding:3px 4px}.rubric-row>b{font-size:10px}
 .score-key{height:34px;width:min(100%,52px);border-radius:12px}
 .digital-dial{padding:4px}.digital-dial strong{font-size:16px}.digital-dial span,.digital-dial small{font-size:8px}
 .console-actions{grid-template-columns:90px 104px 1fr}.console-actions button{font-size:10px;min-height:32px}
 .events-toolbar{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:900px) and (orientation:portrait){
 .v513-period-grid{grid-template-columns:1fr}.v513-period-grid>*:last-child{grid-column:auto}
 .calendar-grid,.active-year-grid{grid-template-columns:1fr 1fr}
 .event-entry-card{width:calc(100vw - 10px)}
}
@media(max-width:760px){
 .calendar-grid,.active-year-grid,.v513-period-grid{grid-template-columns:1fr}
 .custom-holidays-panel .panel-head{align-items:flex-start;flex-direction:column;gap:6px}
 .event-entry-form{grid-template-columns:1fr}.event-entry-form .wide{grid-column:auto}
 .event-score-picker>div{grid-template-columns:repeat(4,1fr)}
}

/* v51.4 — precision UI, fullscreen layering and scroll discipline */
[hidden]{display:none!important}
html,body{max-width:100%;overflow-x:hidden}
.settings-page{width:min(100% - 20px,1600px);max-width:1600px;margin-inline:auto;padding-top:12px}
.settings-title{display:grid;grid-template-columns:auto 1fr;align-items:end;gap:4px 18px;margin:0 0 10px;padding:0 4px}
.settings-title .eyebrow{grid-column:1/-1;margin:0}.settings-title h1{font-size:clamp(25px,3vw,42px);line-height:1;margin:0}.settings-title>p:last-child{display:none}
.panel{min-width:0}.compact-table-wrap{max-width:100%;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.student-session-modal{z-index:2147483000!important;position:fixed!important;inset:0!important}
.classroom:fullscreen .student-session-modal,.classroom.is-fullscreen .student-session-modal{z-index:2147483000!important}
.student-session-card{position:relative;z-index:1}
.rubric-row>div{display:grid!important;grid-template-columns:repeat(7,minmax(42px,1fr))!important;justify-items:center}
.score-key{aspect-ratio:1/1;width:min(100%,58px)!important;height:auto!important;border-radius:50%!important;box-shadow:0 6px 12px rgba(15,23,42,.18),inset 0 -5px 0 rgba(0,0,0,.18),inset 0 2px 2px rgba(255,255,255,.35)!important;transition:transform .08s ease,box-shadow .08s ease}
.score-key:active,.score-key[aria-pressed="true"]{transform:translateY(4px) scale(.97);box-shadow:0 2px 5px rgba(15,23,42,.2),inset 0 -1px 0 rgba(0,0,0,.2)!important}
.behavior-row>div{grid-template-columns:repeat(7,minmax(42px,1fr))!important}.behavior-row .score-key:nth-child(1){grid-column:1}.behavior-row .score-key:nth-child(2){grid-column:2}.behavior-row .score-key:nth-child(3){grid-column:3}
.digital-dial{grid-template-columns:1fr auto auto;column-gap:8px}.digital-dial strong{grid-column:1;grid-row:2;text-align:left}.digital-dial small{grid-column:2;grid-row:2;font-size:13px!important;font-weight:800;color:#b9d2e8!important;white-space:nowrap}.digital-dial em{grid-column:3;grid-row:2;font-size:10px;opacity:.65}
.dial-swatch,.dial-average-swatch{display:block!important;border-radius:50%;box-shadow:0 0 0 2px rgba(255,255,255,.14),0 0 12px currentColor}.dial-swatch{width:25px;height:25px}.dial-average-swatch{width:20px;height:20px}.dial-swatch.is-empty,.dial-average-swatch.is-empty{background:transparent;border:1px dashed #55708a;box-shadow:none}
.events-page .panel{padding:12px}.events-page .panel-head{margin:4px 0 8px}.events-page .compact-table-wrap{max-height:calc(100dvh - 230px)}
.events-table .edit-only{display:none}.events-table.is-editing .edit-only{display:table-cell}
.password-zone{border-color:color-mix(in srgb,var(--accent) 35%,var(--line));display:flex;flex-direction:column;align-items:flex-start;gap:12px}.password-zone .primary{text-decoration:none}
@media(max-width:1180px){.settings-page{width:calc(100% - 12px)}.events-toolbar{grid-template-columns:repeat(4,minmax(0,1fr))!important}.calendar-grid,.active-year-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.calendar-grid label,.active-year-grid label{min-width:0}.calendar-grid input,.active-year-grid input{width:100%;min-width:0}.student-session-grid{grid-template-columns:150px minmax(0,1fr) 150px!important}.rubric-row{grid-template-columns:82px minmax(0,1fr)!important}.score-key{width:min(100%,48px)!important}}
@media(max-width:900px){.topbar{padding-inline:8px}.settings-title{grid-template-columns:1fr}.settings-title h1{font-size:28px}.events-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))!important}.student-session-card{width:100vw!important;height:100dvh!important;border-radius:0!important}.student-session-grid{grid-template-columns:128px minmax(0,1fr) 132px!important}.score-key{width:min(100%,42px)!important}.rubric-row>div,.behavior-row>div{gap:3px!important}}

/* v51.5 — student session command bar and exact row alignment */
.student-session-card .session-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:14px;
  padding:0 34px 9px 0;
}
.student-session-card .session-identity{min-width:0}
.student-session-card .session-head-tools{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  min-width:max-content;
}
.student-session-card .session-actions{
  display:flex;
  align-items:center;
  gap:7px;
}
.student-session-card .session-actions button{
  height:36px;
  min-height:36px;
  padding:0 13px;
  border-radius:11px!important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  font:800 11px/1 "Noto Sans",Arial,sans-serif;
  white-space:nowrap;
  transition:transform .12s ease,box-shadow .12s ease,filter .12s ease;
}
.student-session-card .session-actions button:active{
  transform:translateY(2px) scale(.985);
  box-shadow:inset 0 2px 5px rgba(0,0,0,.22)!important;
}
.student-session-card .session-actions .action-icon{
  display:grid;
  place-items:center;
  width:17px;
  height:17px;
  font-size:13px;
  line-height:1;
}
.student-session-card .session-actions .hourly-key{
  min-width:94px;
  background:#111827;
  color:#fff;
  border:1px solid rgba(255,255,255,.14);
}
.student-session-card .session-actions .hourly-key.is-active{
  background:#991b1b!important;
  border-color:#ef4444;
}
.student-session-card .session-actions .undo-session{
  min-width:102px;
  border:1px solid #64748b!important;
  color:var(--text)!important;
  background:var(--surface)!important;
}
.student-session-card .session-actions .save-session{min-width:118px}
.student-session-card .session-actions .undo-session[hidden]{display:none!important}
.student-session-card .student-session-grid{
  grid-template-columns:minmax(185px,215px) minmax(0,1fr) minmax(178px,205px);
  gap:8px;
}
.student-session-card .exam-console,
.student-session-card .score-dials{
  display:grid;
  grid-template-rows:repeat(5,minmax(0,1fr));
  gap:6px;
  align-content:stretch;
}
.student-session-card .exam-console{padding:8px}
.student-session-card .score-dials{padding:8px}
.student-session-card .rubric-row,
.student-session-card .digital-dial{
  min-height:0;
  height:100%;
  box-sizing:border-box;
}
.student-session-card .rubric-row{align-items:center}
.student-session-card .digital-dial{align-self:stretch}
.student-session-card.hourly-locked .session-actions .undo-session{opacity:.45;pointer-events:none}
@media(max-width:1180px){
 .student-session-card .session-head{gap:8px;padding-right:30px}
 .student-session-card .session-head-tools{gap:6px}
 .student-session-card .session-actions{gap:5px}
 .student-session-card .session-actions button{height:32px;min-height:32px;padding:0 9px;font-size:9.5px}
 .student-session-card .session-actions .hourly-key{min-width:78px}
 .student-session-card .session-actions .undo-session{min-width:86px}
 .student-session-card .session-actions .save-session{min-width:96px}
 .student-session-card .session-year{padding:4px 7px;font-size:10px}
}
@media(max-width:900px){
 .student-session-card .session-head{grid-template-columns:minmax(0,1fr) auto;padding-right:28px}
 .student-session-card .session-meta{max-width:58vw}
 .student-session-card .session-head-tools{flex-direction:column;align-items:flex-end;gap:4px}
 .student-session-card .session-actions button span:last-child{display:none}
 .student-session-card .session-actions button{width:34px;min-width:34px;padding:0;border-radius:10px!important}
 .student-session-card .session-actions .action-icon{width:auto;height:auto}
}


/* v51.6 — semantic summaries, fullscreen-safe confirmation and professional counters */
.student-session-card,.student-session-card *{font-family:"Noto Sans",Arial,sans-serif!important}
.student-session-card .period-summary{overflow:hidden;grid-template-rows:repeat(3,minmax(0,1fr));gap:6px}
.student-session-card .period-summary section{overflow:hidden;display:flex;flex-direction:column;gap:3px;padding:7px 8px}
.student-session-card .period-summary h3{font-size:12px;margin:0 0 2px;font-weight:900;letter-spacing:.02em}
.student-session-card .summary-main,.student-session-card .summary-behavior{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:5px;padding:1px 0!important;font-size:10px!important}
.student-session-card .summary-main>b{font-size:11px}
.student-session-card .summary-breakdown{display:grid!important;gap:1px;padding:2px 0 3px!important;border-bottom:1px solid color-mix(in srgb,var(--line) 70%,transparent)}
.student-session-card .summary-subrow{display:grid!important;grid-template-columns:minmax(0,1fr) auto 38px;gap:4px;align-items:center;padding:0!important;font-size:9px!important;color:var(--muted)}
.student-session-card .summary-subrow b{color:var(--ink);font-size:9.5px}.student-session-card .summary-subrow small,.student-session-card .summary-behavior small{font-size:7.5px;color:var(--muted);text-align:right}
.student-session-card .summary-color{width:15px;height:15px;border-radius:4px;display:block;box-shadow:inset 0 0 0 1px rgba(255,255,255,.25),0 2px 5px rgba(15,23,42,.16)}
.student-session-card .summary-color.is-empty{background:transparent;border:1px dashed var(--muted);box-shadow:none}
.student-session-card .score-dials{gap:6px}
.student-session-card .digital-dial{position:relative;display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto 1fr;gap:4px 8px;padding:8px 9px!important;border-radius:14px;background:linear-gradient(145deg,#09192d,#061222);overflow:hidden;text-align:left}
.student-session-card .digital-dial::after{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 18px rgba(56,189,248,.10);pointer-events:none}
.student-session-card .dial-title{grid-column:1/-1;font-size:9px!important;line-height:1;font-weight:900;letter-spacing:.12em;color:#d7e8f7!important;text-transform:uppercase}
.student-session-card .dial-current,.student-session-card .dial-average{display:flex;align-items:center;gap:7px;min-width:0}
.student-session-card .dial-current strong{font:900 21px/1 "Noto Sans",Arial,sans-serif!important;color:#f4fbff;text-shadow:none!important}
.student-session-card .dial-average{justify-content:flex-end}.student-session-card .dial-average small{font-size:8px!important;font-weight:800;color:#8faac2!important}.student-session-card .dial-average b{font-size:13px;color:#e7f3ff;white-space:nowrap}
.student-session-card .digital-dial em{position:absolute;right:7px;top:7px;font:800 7px/1 "Noto Sans",Arial,sans-serif;opacity:.55;color:#b9d2e8}
.student-session-card .dial-current-box,.student-session-card .dial-average-box{display:block;flex:0 0 auto;border-radius:5px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.23),0 0 10px color-mix(in srgb,currentColor 70%,transparent)}
.student-session-card .dial-current-box{width:24px;height:24px}.student-session-card .dial-average-box{width:16px;height:16px}
.student-session-card .dial-current-box.is-empty,.student-session-card .dial-average-box.is-empty{background:transparent;border:1px dashed #55708a;box-shadow:none}
.student-session-card .session-exit-modal{position:absolute;inset:0;z-index:50;display:grid;place-items:center;padding:16px;background:rgba(5,12,24,.55);backdrop-filter:blur(7px)}
.student-session-card .session-exit-modal[hidden]{display:none!important}
.student-session-card .session-exit-card{width:min(430px,calc(100% - 24px));padding:22px;border:1px solid var(--line);border-radius:20px;background:var(--surface);box-shadow:0 28px 80px rgba(0,0,0,.35)}
.student-session-card .session-exit-card h3{margin:0 0 8px;font-size:21px}.student-session-card .session-exit-card p{margin:0 0 18px;color:var(--muted);line-height:1.5}.student-session-card .session-exit-card>div{display:flex;justify-content:flex-end;gap:8px}
@media(max-width:1024px){.student-session-card .period-summary section{padding:5px 6px}.student-session-card .summary-main,.student-session-card .summary-behavior{font-size:8.5px!important}.student-session-card .summary-subrow{font-size:8px!important;grid-template-columns:minmax(0,1fr) auto 30px}.student-session-card .dial-title{font-size:7.5px!important}.student-session-card .dial-current strong{font-size:17px!important}.student-session-card .dial-average b{font-size:11px}.student-session-card .dial-current-box{width:20px;height:20px}.student-session-card .dial-average-box{width:14px;height:14px}}


/* v51.7 — stable session header, visible counters and explicit period summaries */
.student-session-card .session-head{display:flex!important;flex-direction:column;align-items:stretch;gap:7px;padding:0 34px 9px 0!important}
.student-session-card .session-title-row,.student-session-card .session-meta-action-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
.student-session-card .session-title-row .session-identity{min-width:0}.student-session-card .session-title-row h2{margin-bottom:0}
.student-session-card .session-meta-action-row .session-meta{min-width:0;flex:1}.student-session-card .session-actions{flex:0 0 auto;justify-content:flex-end}
.student-session-card .session-actions .undo-session{display:inline-flex!important}.student-session-card .session-actions .undo-session:disabled{opacity:.42;cursor:not-allowed;filter:saturate(.35)}
.student-session-card .period-summary section{border:1px solid color-mix(in srgb,var(--line) 78%,transparent);background:color-mix(in srgb,var(--surface) 88%,var(--soft));}
.student-session-card .summary-main.featured{margin-bottom:2px;padding:4px 5px!important;border-radius:7px;background:color-mix(in srgb,var(--accent) 9%,transparent)}
.student-session-card .summary-main small{font-size:7.5px;color:var(--muted);text-align:right}.student-session-card .summary-subrow b{white-space:nowrap}.student-session-card .summary-subrow b:not(:last-child){font-variant-numeric:tabular-nums}
.student-session-card .digital-dial{border:1px solid #23496f!important;background:linear-gradient(145deg,#0a2038,#07172a)!important;color:#eef8ff!important}
.student-session-card .dial-title{display:block!important;color:#dff2ff!important;opacity:1!important}.student-session-card .dial-current strong,.student-session-card .dial-average b{display:inline!important;color:#f7fbff!important;opacity:1!important}
.student-session-card .dial-current-box,.student-session-card .dial-average-box{border-radius:5px!important;border:1px solid rgba(255,255,255,.3)!important;background-clip:padding-box!important}
.student-session-card .digital-dial em{display:block!important;color:#b7d2e9!important;opacity:.75!important}
.student-session-card .session-prompt-link{margin-top:-8px!important}.student-session-card .session-prompt-link a{font-weight:800;color:var(--accent)}
@media(max-width:900px){.student-session-card .session-meta-action-row{align-items:flex-end}.student-session-card .session-actions button span:last-child{display:inline}.student-session-card .session-actions button{width:auto;min-width:74px;padding:0 8px}.student-session-card .session-actions .save-session{min-width:88px}.student-session-card .session-meta{max-width:none!important}}

/* v51.9 — explicit period labels and browser-safe session meters */
.student-session-card .period-summary{display:grid;grid-template-rows:repeat(3,minmax(0,1fr));gap:6px}
.student-session-card .summary-period{min-height:0;overflow:hidden;padding:8px!important;border:1px solid var(--line)!important;border-radius:12px;background:var(--surface)!important}
.student-session-card .summary-period h3{margin:0 0 5px;font-size:12px;font-weight:900;color:var(--ink)}
.student-session-card .summary-empty-message{margin:6px 0 0;padding:8px;border-radius:8px;background:var(--soft);color:var(--muted);font-size:10px;line-height:1.35}
.student-session-card .summary-category-list{display:grid;gap:1px;padding:2px 0}
.student-session-card .summary-labeled-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto 44px;align-items:center;gap:5px;padding:2px 4px!important;font-size:9px!important;color:var(--muted)}
.student-session-card .summary-labeled-row span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.student-session-card .summary-labeled-row b{font-size:10px;color:var(--ink);font-variant-numeric:tabular-nums;white-space:nowrap}
.student-session-card .summary-labeled-row small{font-size:7.5px;color:var(--muted);text-align:right;white-space:nowrap}
.student-session-card .summary-featured{margin-bottom:2px;padding:4px!important;border-radius:7px;background:#e8f0ff!important;color:#25436c!important}
[data-theme="dark"] .student-session-card .summary-featured{background:#152844!important;color:#dbeafe!important}
.student-session-card .summary-behavior-row .summary-color{justify-self:end;width:15px;height:15px;border-radius:4px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.35)}
.student-session-card .score-dials{display:grid!important;grid-template-rows:repeat(5,minmax(0,1fr))!important;gap:6px!important;padding:8px!important}
.student-session-card .session-meter{appearance:none;-webkit-appearance:none;width:100%;min-height:0;height:100%;box-sizing:border-box;display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto 1fr;align-items:center;gap:5px 8px;padding:8px 9px;border:1px solid #b8c8dc;border-radius:13px;background:#f7faff!important;color:#14233b!important;text-align:left;overflow:hidden;font-family:"Noto Sans",Arial,sans-serif!important;box-shadow:0 3px 10px rgba(15,23,42,.08);cursor:pointer}
[data-theme="dark"] .student-session-card .session-meter{background:#102238!important;color:#eef7ff!important;border-color:#315170}
.student-session-card .meter-name{grid-column:1/-1;display:block!important;font-size:9px!important;font-weight:900!important;letter-spacing:.09em;line-height:1;color:inherit!important;text-transform:uppercase;opacity:1!important}
.student-session-card .meter-current,.student-session-card .meter-average{display:flex!important;align-items:center;gap:6px;min-width:0;color:inherit!important}
.student-session-card .meter-current b{font-size:17px!important;line-height:1;color:inherit!important;font-weight:900!important;white-space:nowrap}
.student-session-card .meter-average{justify-content:flex-end}.student-session-card .meter-average small{font-size:8px!important;color:#64748b!important;font-weight:800}.student-session-card .meter-average strong{font-size:12px!important;color:inherit!important;font-weight:900!important;white-space:nowrap}
[data-theme="dark"] .student-session-card .meter-average small{color:#a9bfd4!important}
.student-session-card .meter-swatch,.student-session-card .meter-average-swatch{display:inline-block!important;flex:0 0 auto;border-style:solid!important;border-width:1px!important;border-radius:4px!important;background-color:transparent;box-shadow:inset 0 0 0 1px rgba(255,255,255,.28)}
.student-session-card .meter-swatch{width:22px;height:22px}.student-session-card .meter-average-swatch{width:15px;height:15px}
.student-session-card .meter-swatch.is-empty,.student-session-card .meter-average-swatch.is-empty{border-style:dashed!important;box-shadow:none!important}
.student-session-card .session-meter em{position:absolute;right:8px;top:7px;font:800 7px/1 "Noto Sans",Arial,sans-serif;color:#64748b;opacity:.8}.student-session-card .session-meter{position:relative}
[data-theme="dark"] .student-session-card .session-meter em{color:#b8cce0}
@media(max-width:1024px){.student-session-card .summary-labeled-row{grid-template-columns:minmax(0,1fr) auto 34px;font-size:8px!important}.student-session-card .summary-labeled-row b{font-size:9px}.student-session-card .session-meter{padding:6px}.student-session-card .meter-name{font-size:7.5px!important}.student-session-card .meter-current b{font-size:14px!important}.student-session-card .meter-average strong{font-size:10px!important}.student-session-card .meter-swatch{width:18px;height:18px}.student-session-card .meter-average-swatch{width:12px;height:12px}}

/* v51.10 — explicit summary labels and restored clickable black meters */
.student-session-card .summary-data-line{
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  column-gap:4px;
  padding:2px 4px!important;
  min-width:0;
  font-size:9px!important;
  line-height:1.25;
}
.student-session-card .summary-data-label{
  display:inline!important;
  overflow:visible!important;
  white-space:nowrap!important;
  color:var(--muted)!important;
  font-weight:700!important;
}
.student-session-card .summary-data-value{
  display:inline!important;
  min-width:0;
  color:var(--ink)!important;
  font-size:10px!important;
  font-weight:900!important;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.student-session-card .summary-data-line small{
  display:inline!important;
  color:var(--muted)!important;
  font-size:7.5px!important;
  text-align:right;
  white-space:nowrap;
}
.student-session-card .summary-data-line.summary-featured{
  margin-bottom:2px;
  padding:4px 5px!important;
  border-radius:7px;
  background:#e8f0ff!important;
}
[data-theme="dark"] .student-session-card .summary-data-line.summary-featured{background:#152844!important}
.student-session-card .summary-behavior-row .summary-color{justify-self:start}

.student-session-card .session-meter{
  position:relative;
  appearance:none;
  width:100%;
  min-height:0;
  height:100%;
  box-sizing:border-box;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-rows:auto 1fr;
  align-items:center;
  gap:5px 8px;
  padding:8px 9px;
  border:1px solid #23496f!important;
  border-radius:14px;
  background:linear-gradient(145deg,#0a2038,#07172a)!important;
  color:#f7fbff!important;
  text-align:left;
  overflow:hidden;
  font-family:"Noto Sans",Arial,sans-serif!important;
  box-shadow:inset 0 0 18px rgba(56,189,248,.10),0 3px 10px rgba(15,23,42,.16);
  cursor:pointer;
  user-select:none;
}
.student-session-card .session-meter:hover{border-color:#3b6f9e!important;transform:translateY(-1px)}
.student-session-card .session-meter:active{transform:translateY(1px);box-shadow:inset 0 0 22px rgba(56,189,248,.16)}
.student-session-card .session-meter:focus-visible{outline:3px solid color-mix(in srgb,var(--accent) 45%,transparent);outline-offset:2px}
.student-session-card .session-meter .meter-name{
  grid-column:1/-1;
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  color:#dff2ff!important;
  font-size:9px!important;
  font-weight:900!important;
  letter-spacing:.09em;
  line-height:1;
  text-transform:uppercase;
}
.student-session-card .session-meter .meter-current,
.student-session-card .session-meter .meter-average{
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
  align-items:center;
  gap:6px;
  min-width:0;
  color:#f7fbff!important;
}
.student-session-card .session-meter .meter-current b{
  display:inline!important;
  visibility:visible!important;
  opacity:1!important;
  color:#f7fbff!important;
  font-size:21px!important;
  line-height:1;
  font-weight:900!important;
  white-space:nowrap;
}
.student-session-card .session-meter .meter-average{justify-content:flex-end}
.student-session-card .session-meter .meter-average small{
  display:inline!important;
  visibility:visible!important;
  opacity:1!important;
  color:#8faac2!important;
  font-size:9px!important;
  font-weight:800!important;
}
.student-session-card .session-meter .meter-average strong{
  display:inline!important;
  visibility:visible!important;
  opacity:1!important;
  color:#e7f3ff!important;
  font-size:14px!important;
  font-weight:900!important;
  white-space:nowrap;
}
.student-session-card .session-meter .meter-swatch,
.student-session-card .session-meter .meter-average-swatch{
  display:inline-block!important;
  visibility:visible!important;
  opacity:1!important;
  flex:0 0 auto;
  border:1px solid rgba(255,255,255,.30)!important;
  border-radius:4px!important;
  background-color:transparent;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.18),0 0 8px rgba(255,255,255,.10);
}
.student-session-card .session-meter .meter-swatch{width:22px;height:22px}
.student-session-card .session-meter .meter-average-swatch{width:15px;height:15px}
.student-session-card .session-meter .meter-swatch.is-empty,
.student-session-card .session-meter .meter-average-swatch.is-empty{border-style:dashed!important;box-shadow:none}
.student-session-card .session-meter em{
  display:block!important;
  visibility:visible!important;
  position:absolute;
  right:8px;
  top:7px;
  color:#b7d2e9!important;
  opacity:.76!important;
  font:800 7px/1 "Noto Sans",Arial,sans-serif!important;
}
@media(max-width:1024px){
 .student-session-card .summary-data-line{font-size:8px!important;grid-template-columns:auto minmax(0,1fr) 34px}
 .student-session-card .summary-data-value{font-size:9px!important}
 .student-session-card .session-meter{padding:6px}
 .student-session-card .session-meter .meter-name{font-size:7.5px!important}
 .student-session-card .session-meter .meter-current b{font-size:17px!important}
 .student-session-card .session-meter .meter-average strong{font-size:11px!important}
 .student-session-card .session-meter .meter-swatch{width:18px;height:18px}
 .student-session-card .session-meter .meter-average-swatch{width:12px;height:12px}
}

/* v51.11 — labelled period rows, color-only behavior meter and Noto Sans consistency */
.student-session-card,
.student-session-card *{
  font-family:"Noto Sans",Arial,sans-serif!important;
}
.student-session-card .summary-data-line{
  grid-template-columns:auto auto minmax(0,1fr)!important;
  column-gap:5px!important;
}
.student-session-card .summary-data-value{
  grid-column:1;
  text-align:left;
}
.student-session-card .summary-data-line small{
  grid-column:2;
  text-align:left!important;
}
.student-session-card .summary-data-label{
  grid-column:3;
  justify-self:end;
  text-align:right;
  overflow:hidden!important;
  text-overflow:ellipsis;
  font-size:7.5px!important;
  font-weight:900!important;
  letter-spacing:.035em;
  color:var(--muted)!important;
}
.student-session-card .summary-featured .summary-data-label{display:none!important}
.student-session-card .summary-featured small{justify-self:end;text-align:right!important}
.student-session-card .summary-behavior-only{
  margin-top:auto;
  display:flex;
  justify-content:flex-end;
  align-items:center;
  padding:3px 5px 1px;
}
.student-session-card .summary-behavior-only .summary-color{
  display:block!important;
  width:18px;
  height:18px;
  border-radius:4px;
  border:1px solid rgba(15,23,42,.18);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.25),0 1px 4px rgba(15,23,42,.18);
}
.student-session-card .session-meter.is-behavior .meter-current,
.student-session-card .session-meter.is-behavior .meter-average{
  min-height:30px;
}
.student-session-card .session-meter.is-behavior .meter-current b,
.student-session-card .session-meter.is-behavior .meter-average strong{
  display:none!important;
}
.student-session-card .session-meter.is-behavior .meter-current .meter-swatch{
  width:30px!important;
  height:30px!important;
  border-radius:5px!important;
}
.student-session-card .session-meter.is-behavior .meter-average .meter-average-swatch{
  width:22px!important;
  height:22px!important;
  border-radius:5px!important;
}
@media(max-width:1024px){
  .student-session-card .summary-data-label{font-size:6.8px!important}
  .student-session-card .session-meter.is-behavior .meter-current .meter-swatch{width:25px!important;height:25px!important}
  .student-session-card .session-meter.is-behavior .meter-average .meter-average-swatch{width:18px!important;height:18px!important}
}


/* v52 — force-visible period categories and behavior indicator */
.student-session-card .period-summary .summary-period{
  position:relative!important;
  overflow:hidden!important;
}
.student-session-card .period-summary .summary-category-list{
  display:flex!important;
  flex-direction:column!important;
  gap:2px!important;
  min-width:0!important;
  overflow:visible!important;
}
.student-session-card .period-summary .summary-data-line{
  display:grid!important;
  grid-template-columns:auto auto minmax(52px,1fr)!important;
  align-items:center!important;
  width:100%!important;
  min-width:0!important;
  column-gap:4px!important;
  overflow:visible!important;
  visibility:visible!important;
  opacity:1!important;
}
.student-session-card .period-summary .summary-data-value{
  display:block!important;
  grid-column:1!important;
  color:var(--ink)!important;
  visibility:visible!important;
  opacity:1!important;
  font-family:"Noto Sans",Arial,sans-serif!important;
  font-size:10px!important;
  font-weight:900!important;
  line-height:1.15!important;
}
.student-session-card .period-summary .summary-data-line>small{
  display:block!important;
  grid-column:2!important;
  color:var(--muted)!important;
  visibility:visible!important;
  opacity:1!important;
  white-space:nowrap!important;
  font-family:"Noto Sans",Arial,sans-serif!important;
  font-size:7px!important;
  line-height:1.15!important;
}
.student-session-card .period-summary .summary-data-label{
  display:block!important;
  grid-column:3!important;
  justify-self:end!important;
  align-self:center!important;
  max-width:none!important;
  width:auto!important;
  min-width:0!important;
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:nowrap!important;
  visibility:visible!important;
  opacity:1!important;
  color:#40546f!important;
  font-family:"Noto Sans",Arial,sans-serif!important;
  font-size:7.2px!important;
  font-weight:900!important;
  line-height:1.15!important;
  letter-spacing:.02em!important;
  text-align:right!important;
}
[data-theme="dark"] .student-session-card .period-summary .summary-data-label{
  color:#c9d9eb!important;
}
.student-session-card .period-summary .summary-featured{
  grid-template-columns:auto minmax(0,1fr)!important;
}
.student-session-card .period-summary .summary-featured .summary-data-label{
  display:none!important;
}
.student-session-card .period-summary .summary-featured>small{
  grid-column:2!important;
  justify-self:end!important;
  text-align:right!important;
}
.student-session-card .period-summary .summary-behavior-only{
  position:absolute!important;
  right:8px!important;
  bottom:7px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:20px!important;
  height:20px!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important;
  visibility:visible!important;
  opacity:1!important;
  z-index:5!important;
}
.student-session-card .period-summary .summary-behavior-only .summary-color{
  display:block!important;
  width:17px!important;
  height:17px!important;
  min-width:17px!important;
  min-height:17px!important;
  border-radius:4px!important;
  border:1px solid rgba(15,23,42,.28)!important;
  visibility:visible!important;
  opacity:1!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.32),0 1px 5px rgba(15,23,42,.24)!important;
}
.student-session-card,.student-session-card *{
  font-family:"Noto Sans",Arial,sans-serif!important;
}
@media(max-width:1024px){
  .student-session-card .period-summary .summary-data-label{font-size:6.7px!important}
  .student-session-card .period-summary .summary-data-value{font-size:9px!important}
  .student-session-card .period-summary .summary-data-line>small{font-size:6.5px!important}
}


/* v52.1 — readable student card, dashboard context date, dark-mode contrast */
.student-session-card,
.student-session-card *{
  font-family:"Noto Sans",Arial,sans-serif!important;
}
.student-session-card .period-summary{
  grid-template-columns:minmax(0,1fr)!important;
}
.student-session-card .period-summary .summary-period{
  padding:10px 10px!important;
}
.student-session-card .period-summary .summary-period h3{
  font-size:13px!important;
  line-height:1.2!important;
  margin-bottom:7px!important;
}
.student-session-card .period-summary .summary-data-line{
  grid-template-columns:36px 52px minmax(64px,1fr)!important;
  column-gap:7px!important;
  min-height:20px!important;
  align-items:center!important;
}
.student-session-card .period-summary .summary-data-value{
  font-size:11.5px!important;
  line-height:1.2!important;
  text-align:right!important;
  color:var(--ink)!important;
}
.student-session-card .period-summary .summary-data-line>small{
  font-size:8.5px!important;
  line-height:1.2!important;
  color:#65758c!important;
  text-align:left!important;
}
.student-session-card .period-summary .summary-data-label{
  font-size:8.8px!important;
  line-height:1.2!important;
  letter-spacing:.025em!important;
  text-align:left!important;
  justify-self:start!important;
  color:#334763!important;
}
.student-session-card .period-summary .summary-featured{
  grid-template-columns:44px minmax(0,1fr)!important;
}
.student-session-card .period-summary .summary-featured .summary-data-value{
  text-align:right!important;
}
.student-session-card .period-summary .summary-featured>small{
  font-size:8.5px!important;
  color:#65758c!important;
  text-align:left!important;
  justify-self:start!important;
}
.student-session-card .period-summary .summary-empty-message{
  font-size:10.5px!important;
  line-height:1.45!important;
}
.student-session-card .period-summary .summary-behavior-only{
  right:10px!important;
  bottom:9px!important;
  width:24px!important;
  height:24px!important;
}
.student-session-card .period-summary .summary-behavior-only .summary-color{
  width:20px!important;
  height:20px!important;
}
.student-session-card .session-meter{
  padding:10px 11px!important;
  gap:7px 10px!important;
}
.student-session-card .session-meter .meter-name{
  font-size:9.5px!important;
  line-height:1.15!important;
}
.student-session-card .session-meter .meter-current b{
  font-size:22px!important;
  line-height:1!important;
}
.student-session-card .session-meter .meter-average small{
  font-size:9px!important;
}
.student-session-card .session-meter .meter-average strong{
  font-size:14px!important;
  line-height:1!important;
}
.student-session-card .session-meter em{
  font-size:8px!important;
}
[data-theme="dark"] .student-session-card .period-summary .summary-period{
  background:#101d2d!important;
  border-color:#31455f!important;
}
[data-theme="dark"] .student-session-card .period-summary .summary-period h3,
[data-theme="dark"] .student-session-card .period-summary .summary-data-value{
  color:#f3f7fc!important;
}
[data-theme="dark"] .student-session-card .period-summary .summary-data-label{
  color:#c8d7e8!important;
}
[data-theme="dark"] .student-session-card .period-summary .summary-data-line>small,
[data-theme="dark"] .student-session-card .period-summary .summary-featured>small,
[data-theme="dark"] .student-session-card .period-summary .summary-empty-message{
  color:#9fb3ca!important;
}
@media(max-width:1180px){
  .student-session-card .student-session-grid{grid-template-columns:170px minmax(0,1fr) 170px!important}
  .student-session-card .period-summary .summary-data-line{grid-template-columns:32px 46px minmax(56px,1fr)!important;column-gap:5px!important}
  .student-session-card .period-summary .summary-data-value{font-size:10.5px!important}
  .student-session-card .period-summary .summary-data-line>small{font-size:7.8px!important}
  .student-session-card .period-summary .summary-data-label{font-size:8px!important}
  .student-session-card .session-meter .meter-current b{font-size:19px!important}
  .student-session-card .session-meter .meter-average strong{font-size:12.5px!important}
}
@media(max-width:900px){
  .student-session-card .student-session-grid{grid-template-columns:155px minmax(0,1fr) 155px!important}
  .student-session-card .period-summary .summary-period{padding:7px!important}
  .student-session-card .period-summary .summary-data-line{grid-template-columns:29px 41px minmax(50px,1fr)!important;column-gap:4px!important}
  .student-session-card .period-summary .summary-data-value{font-size:9.8px!important}
  .student-session-card .period-summary .summary-data-line>small{font-size:7.2px!important}
  .student-session-card .period-summary .summary-data-label{font-size:7.4px!important}
  .student-session-card .session-meter{padding:7px!important}
  .student-session-card .session-meter .meter-name{font-size:8px!important}
  .student-session-card .session-meter .meter-current b{font-size:17px!important}
  .student-session-card .session-meter .meter-average strong{font-size:11px!important}
}

/* v60ai — voice grading entry point */
.ai-voice-grade-btn{border:1px solid #15803d;border-radius:12px;padding:10px 16px;background:linear-gradient(135deg,#22c55e,#15803d);color:#fff;font-weight:800;cursor:pointer;box-shadow:0 8px 20px rgba(21,128,61,.22);transition:transform .16s ease,box-shadow .16s ease,filter .16s ease;white-space:nowrap}.ai-voice-grade-btn:hover{filter:brightness(1.04);box-shadow:0 10px 24px rgba(21,128,61,.28)}.ai-voice-grade-btn:active{transform:translateY(1px);box-shadow:0 4px 12px rgba(21,128,61,.22)}.app-body.dark .ai-voice-grade-btn{border-color:#4ade80;background:linear-gradient(135deg,#22c55e,#166534);color:#fff}
@media(max-width:900px){.grade-top-actions{gap:7px}.ai-voice-grade-btn{padding:9px 12px;font-size:12px}}

/* v60ai voice grading */
.voice-grading-modal{z-index:10040!important;align-items:center!important;justify-content:center!important;padding:18px!important}
.voice-grading-card{width:min(760px,calc(100vw - 28px))!important;max-height:min(720px,calc(100dvh - 28px))!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;gap:14px!important;border-radius:24px!important;font-family:"Noto Sans",Arial,sans-serif!important}
.voice-grading-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.voice-grading-head h2{margin:3px 0 6px}.voice-grading-head p{margin:0;color:#64748b}
.voice-live-indicator{display:flex;align-items:center;gap:9px;min-width:max-content;padding:9px 13px;border-radius:999px;background:#dcfce7;color:#166534;font-size:13px}.voice-live-indicator span{width:11px;height:11px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 0 rgba(34,197,94,.45);animation:voicePulse 1.4s infinite}.voice-live-indicator.paused{background:#f1f5f9;color:#64748b}.voice-live-indicator.paused span{background:#94a3b8;animation:none}
@keyframes voicePulse{70%{box-shadow:0 0 0 10px rgba(34,197,94,0)}100%{box-shadow:0 0 0 0 rgba(34,197,94,0)}}
.voice-example{padding:11px 13px;border:1px solid #bbf7d0;background:#f0fdf4;border-radius:14px;color:#166534;font-size:13px;line-height:1.45}
.voice-transcript{min-height:64px;padding:14px 16px;border:1px solid #cbd5e1;border-radius:16px;background:#f8fafc;color:#0f172a;font-size:17px;font-weight:700;line-height:1.55}
.voice-results{display:flex;flex-direction:column;gap:8px;overflow:auto;min-height:76px;max-height:250px;padding-right:3px}.voice-result{padding:10px 12px;border-radius:12px;background:#ecfdf5;color:#166534;border:1px solid #bbf7d0;font-size:14px;font-weight:700}.voice-result.warning{background:#fff7ed;color:#9a3412;border-color:#fed7aa}.voice-result.error{background:#fef2f2;color:#b91c1c;border-color:#fecaca}
.app-body.dark .voice-grading-card{background:#0f1c2e;color:#e5edf8}.app-body.dark .voice-grading-head p{color:#a8b8cc}.app-body.dark .voice-transcript{background:#0a1626;border-color:#334a66;color:#f8fafc}.app-body.dark .voice-example{background:#10291e;border-color:#285b3d;color:#86efac}.app-body.dark .voice-result{background:#10291e;border-color:#285b3d;color:#86efac}.app-body.dark .voice-result.warning{background:#352411;border-color:#704713;color:#fdba74}.app-body.dark .voice-result.error{background:#351719;border-color:#783035;color:#fca5a5}
@media(max-width:700px){.voice-grading-card{padding:18px!important}.voice-grading-head{flex-direction:column}.voice-live-indicator{align-self:flex-start}.voice-transcript{font-size:15px}.voice-results{max-height:200px}}

/* v63ai full-screen voice grading workspace */
.ai-voice-workspace{z-index:10080!important;padding:0!important;align-items:stretch!important;justify-content:stretch!important;font-family:"Noto Sans",Arial,sans-serif!important}
.ai-voice-shell{width:100vw;height:100dvh;background:#f7f9fc;display:grid;grid-template-rows:auto 1fr auto;overflow:hidden;color:#13233b}
.ai-voice-shell>header,.ai-voice-shell>footer{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 22px;background:#fff;border-bottom:1px solid #d8e1ee}.ai-voice-shell>footer{border-top:1px solid #d8e1ee;border-bottom:0;justify-content:flex-end}
.ai-voice-shell h2{margin:2px 0 4px}.ai-voice-shell header p{margin:0;color:#607089}.ai-voice-grid{min-height:0;display:grid;grid-template-columns:minmax(0,1.65fr) minmax(330px,.75fr);gap:14px;padding:14px}
.ai-roster-panel,.ai-control-panel{min-height:0;background:#fff;border:1px solid #d5dfec;border-radius:18px;overflow:hidden}.ai-roster-panel{display:grid;grid-template-rows:auto 1fr}.ai-roster-head{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-bottom:1px solid #dce4ef}.ai-roster-head h3{margin:0}.ai-roster-head span{font-size:13px;color:#6b7b91}.ai-roster-scroll{overflow:auto;min-height:0}.ai-roster-scroll table{width:100%;border-collapse:collapse}.ai-roster-scroll th{position:sticky;top:0;z-index:2;background:#eef3fa;text-align:left;padding:11px 12px}.ai-roster-scroll td{padding:9px 12px;border-bottom:1px solid #e3e9f2}.ai-roster-scroll td:first-child{width:42%}.ai-roster-scroll small{display:block;color:#718198;margin-top:2px}.ai-roster-scroll input{width:100%;min-height:38px;border:1px solid #cfd9e7;border-radius:10px;padding:7px 9px;font:inherit}.ai-roster-scroll .ai-grade-score{max-width:110px;font-weight:800;font-size:17px}.ai-row-updated{animation:aiRowFlash 1.15s ease}@keyframes aiRowFlash{0%,100%{background:transparent}20%,75%{background:#d7fbe5}}
.ai-control-panel{padding:14px;display:flex;flex-direction:column;gap:12px}.ai-status-card{display:flex;gap:12px;padding:14px;border-radius:15px;background:#edf8f1;border:1px solid #bce7cc}.ai-status-dot{width:13px;height:13px;border-radius:50%;background:#19b85a;box-shadow:0 0 0 6px rgba(25,184,90,.12);margin-top:4px;flex:0 0 auto}.ai-status-card strong{font-size:16px}.ai-status-card p{margin:4px 0 0;color:#567064;line-height:1.45}.ai-status-card[data-state="processing"]{background:#eef4ff;border-color:#bfd2fb}.ai-status-card[data-state="paused"]{background:#fff8e8;border-color:#f1d48f}.ai-status-card[data-state="error"]{background:#fff0f0;border-color:#f1b7b7}
.ai-transcript-stack{min-height:120px;flex:1;overflow:auto;display:flex;flex-direction:column;gap:9px}.ai-empty{padding:20px;color:#6b7a90;text-align:center;border:1px dashed #cdd8e7;border-radius:14px}.ai-segment-card{border:1px solid #d7e0ec;border-radius:13px;padding:11px 12px;background:#f8fafc}.ai-segment-card>div{display:flex;justify-content:space-between;gap:10px}.ai-segment-card span{font-size:12px;color:#718096}.ai-segment-card p{margin:7px 0 0;line-height:1.45}.ai-segment-card.ready{border-color:#acdcbf;background:#effbf4}.ai-segment-card.error{border-color:#f0b5b5;background:#fff2f2}.ai-control-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.ai-control-actions button{min-height:46px;border-radius:13px!important}.ai-final-messages{max-height:180px;overflow:auto}.app-body.dark .ai-voice-shell{background:#07111f;color:#eaf1fb}.app-body.dark .ai-voice-shell>header,.app-body.dark .ai-voice-shell>footer,.app-body.dark .ai-roster-panel,.app-body.dark .ai-control-panel{background:#0e1b2c;border-color:#2d4059}.app-body.dark .ai-roster-head,.app-body.dark .ai-roster-scroll td{border-color:#2a3c54}.app-body.dark .ai-roster-scroll th{background:#16283e}.app-body.dark .ai-roster-scroll input{background:#0a1625;color:#f2f6fb;border-color:#38506c}.app-body.dark .ai-segment-card{background:#122238;border-color:#314a67}.app-body.dark .ai-status-card p,.app-body.dark .ai-roster-head span,.app-body.dark .ai-roster-scroll small{color:#afbdd0}
@media(max-width:900px){.ai-voice-grid{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) auto}.ai-control-panel{max-height:38dvh}.ai-roster-head span{display:none}}

/* v64ai — event-only AI voice workspace and compact grading */
.grade-top-actions .ai-voice-grade-btn{
  padding:8px 12px!important;
  min-height:36px!important;
  border-radius:10px!important;
  font-size:12px!important;
  font-weight:800!important;
  box-shadow:0 5px 14px rgba(21,128,61,.18)!important;
}
.ai-voice-grid{grid-template-columns:minmax(0,1.72fr) minmax(310px,.68fr)!important;gap:10px!important;padding:10px!important}
.ai-roster-head{padding:10px 12px!important}
.ai-roster-head h3{font-size:16px!important}
.ai-roster-head span{font-size:11px!important}
.ai-roster-scroll th{padding:7px 9px!important;font-size:12px!important}
.ai-roster-scroll td{padding:5px 9px!important;font-size:12px!important}
.ai-roster-scroll td:first-child{width:40%!important}
.ai-roster-scroll small{margin-top:0!important;font-size:10px!important}
.ai-roster-scroll input{min-height:31px!important;padding:4px 7px!important;border-radius:8px!important;font-size:12px!important}
.ai-roster-scroll .ai-grade-score{max-width:82px!important;font-size:14px!important}
.ai-control-panel{padding:11px!important;gap:9px!important}
.ai-status-card{padding:11px!important;gap:10px!important}
.ai-status-card strong{font-size:15px!important}
.ai-status-card p{font-size:13px!important;margin-top:2px!important}
.ai-transcript-stack{min-height:110px!important;gap:7px!important}
.ai-empty{padding:18px 14px!important;font-size:13px!important}
.ai-event-item{display:flex;align-items:flex-start;gap:9px;padding:9px 10px;border:1px solid #d9e3ef;border-radius:11px;background:#f8fafc;color:#334155}
.ai-event-item p{margin:0;font-size:12px;line-height:1.42}
.ai-event-dot{width:8px;height:8px;margin-top:4px;border-radius:50%;background:#64748b;flex:0 0 auto}
.ai-event-item.success{background:#effbf4;border-color:#b9e7c9;color:#166534}.ai-event-item.success .ai-event-dot{background:#22c55e}
.ai-event-item.pending{background:#eef4ff;border-color:#c7d7fb;color:#1d4ed8}.ai-event-item.pending .ai-event-dot{background:#3b82f6;animation:voicePulse 1.3s infinite}
.ai-event-item.info{background:#f8fafc;border-color:#d8e2ee;color:#475569}.ai-event-item.info .ai-event-dot{background:#64748b}
.ai-event-item.error{background:#fff1f1;border-color:#f2b6b6;color:#b91c1c}.ai-event-item.error .ai-event-dot{background:#dc2626}
.ai-control-actions[hidden]{display:none!important}
.ai-control-actions{gap:8px!important}
.ai-control-actions button{min-height:40px!important;border-radius:11px!important;font-size:13px!important}
.ai-final-messages{max-height:140px!important;overflow:auto!important}
.ai-voice-shell>header,.ai-voice-shell>footer{padding:11px 16px!important}
.ai-voice-shell>footer button{min-height:36px!important;padding:8px 13px!important;font-size:12px!important}
.app-body.dark .ai-event-item{background:#122238;border-color:#314a67;color:#dbe7f5}
.app-body.dark .ai-event-item.success{background:#10291e;border-color:#285b3d;color:#86efac}
.app-body.dark .ai-event-item.pending{background:#10223d;border-color:#294f85;color:#bfdbfe}
.app-body.dark .ai-event-item.info{background:#132236;border-color:#334a66;color:#cbd5e1}
.app-body.dark .ai-event-item.error{background:#351719;border-color:#783035;color:#fca5a5}
@media(max-width:900px){
  .ai-voice-grid{grid-template-columns:1fr!important;grid-template-rows:minmax(0,1fr) auto!important}
  .ai-control-panel{max-height:34dvh!important}
  .ai-roster-scroll td{padding:4px 7px!important}
}

/* v66ai — voice note commands and lower-latency AI workflow */
.ai-roster-scroll td:nth-child(2){width:96px}
.ai-roster-scroll .ai-grade-note{min-width:180px}
.ai-row-bulk-updated{animation:aiBulkRowFlash .9s ease}
@keyframes aiBulkRowFlash{0%,100%{background:transparent}18%,78%{background:#d9f8e5}}
.app-body.dark .ai-row-updated{animation-name:aiRowFlashDark}.app-body.dark .ai-row-bulk-updated{animation-name:aiBulkRowFlashDark}
@keyframes aiRowFlashDark{0%,100%{background:transparent}20%,75%{background:#123c2a}}
@keyframes aiBulkRowFlashDark{0%,100%{background:transparent}18%,78%{background:#123c2a}}
@media(max-width:900px){
  .ai-roster-scroll .ai-grade-note{min-width:150px}
  .ai-roster-head h3{font-size:15px!important}
}


/* v69ai-correction67 — collision-proof period summary indicators */
.student-session-card .period-summary{
  --student-summary-label:#334763;
  --student-summary-score:#10233f;
  --student-summary-primary-bg:#e8f0ff;
  --student-summary-primary-border:#cbdcf8;
  --student-summary-primary-label:#294b78;
  --student-summary-primary-score:#173f70;
  grid-template-rows:repeat(var(--summary-period-count,3),minmax(0,1fr))!important;
  gap:7px!important;
}
.student-session-card .period-summary .summary-period{
  position:relative!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-start!important;
  min-width:0!important;
  min-height:0!important;
  overflow:hidden!important;
  padding:9px 10px!important;
  gap:5px!important;
}
.student-session-card .period-summary .summary-period h3{
  flex:0 0 auto!important;
  margin:0!important;
  color:var(--ink)!important;
  font-family:"Noto Sans",Arial,sans-serif!important;
  font-size:12.5px!important;
  font-weight:700!important;
  line-height:1.2!important;
}
.student-session-card .period-summary .student-summary-metrics{
  all:unset!important;
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-rows:repeat(3,minmax(0,1fr))!important;
  align-content:center!important;
  flex:1 1 auto!important;
  width:100%!important;
  min-width:0!important;
  min-height:0!important;
  gap:4px!important;
}
.student-session-card .period-summary .student-summary-metric{
  all:unset!important;
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:clamp(35px,3.4vw,44px) minmax(0,1fr)!important;
  grid-template-areas:"score label"!important;
  align-items:baseline!important;
  column-gap:7px!important;
  width:100%!important;
  min-width:0!important;
  min-height:20px!important;
  padding:3px 4px!important;
  border:1px solid transparent!important;
  border-radius:8px!important;
  background:transparent!important;
  color:inherit!important;
  box-shadow:none!important;
  appearance:none!important;
  -webkit-appearance:none!important;
}
.student-session-card .period-summary .student-summary-metric.is-primary{
  min-height:24px!important;
  padding-block:4px!important;
  background:var(--student-summary-primary-bg)!important;
  border-color:var(--student-summary-primary-border)!important;
}
.student-session-card .period-summary .student-summary-metric.is-written{
  padding-right:30px!important;
}
.student-session-card .period-summary .student-summary-score,
.student-session-card .period-summary .student-summary-label{
  all:unset!important;
  box-sizing:border-box!important;
  display:inline-flex!important;
  align-items:baseline!important;
  margin:0!important;
  padding:0!important;
  min-width:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  font-family:"Noto Sans",Arial,sans-serif!important;
  text-decoration:none!important;
  text-shadow:none!important;
  vertical-align:baseline!important;
}
.student-session-card .period-summary .student-summary-score{
  grid-area:score!important;
  justify-content:flex-end!important;
  color:var(--student-summary-score)!important;
  font-size:12px!important;
  font-weight:900!important;
  line-height:1!important;
  font-variant-numeric:tabular-nums!important;
  letter-spacing:0!important;
  white-space:nowrap!important;
  unicode-bidi:isolate!important;
}
.student-session-card .period-summary .student-summary-label{
  grid-area:label!important;
  justify-content:flex-start!important;
  align-self:baseline!important;
  overflow:visible!important;
  color:var(--student-summary-label)!important;
  font-size:8.35px!important;
  font-weight:900!important;
  line-height:1!important;
  letter-spacing:.012em!important;
  white-space:nowrap!important;
  text-align:start!important;
  text-overflow:clip!important;
  text-transform:uppercase!important;
}
.student-session-card .period-summary .student-summary-metric.is-primary .student-summary-score{
  color:var(--student-summary-primary-score)!important;
  font-size:13px!important;
}
.student-session-card .period-summary .student-summary-metric.is-primary .student-summary-label{
  color:var(--student-summary-primary-label)!important;
}
/* Google Translate may insert font/span wrappers. They inherit the exact baseline
   instead of acquiring generic button, badge or browser styles. */
.student-session-card .period-summary .student-summary-score *,
.student-session-card .period-summary .student-summary-label *{
  all:unset!important;
  display:inline!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:inherit!important;
  box-shadow:none!important;
  font:inherit!important;
  line-height:inherit!important;
  letter-spacing:inherit!important;
  text-transform:inherit!important;
  vertical-align:baseline!important;
  white-space:inherit!important;
}
.student-session-card .period-summary .summary-empty-message{
  margin:auto 0!important;
  color:var(--muted)!important;
  font-size:10px!important;
  line-height:1.4!important;
}
.student-session-card .period-summary .summary-behavior-only{
  all:unset!important;
  box-sizing:border-box!important;
  position:absolute!important;
  right:9px!important;
  bottom:8px!important;
  z-index:5!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:22px!important;
  height:22px!important;
  margin:0!important;
  padding:0!important;
  pointer-events:none!important;
}
.student-session-card .period-summary .summary-behavior-only .summary-color{
  all:unset!important;
  box-sizing:border-box!important;
  display:block!important;
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  min-height:18px!important;
  border:1px solid rgba(15,23,42,.28)!important;
  border-radius:5px!important;
  background-color:var(--behavior-color,transparent)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.34),0 1px 5px rgba(15,23,42,.22)!important;
}
.app-body.dark .student-session-card .period-summary,
[data-theme="dark"] .student-session-card .period-summary{
  --student-summary-label:#c8d7e8;
  --student-summary-score:#f3f7fc;
  --student-summary-primary-bg:#17304f;
  --student-summary-primary-border:#315170;
  --student-summary-primary-label:#dbeafe;
  --student-summary-primary-score:#f8fbff;
}
.app-body.dark .student-session-card .period-summary .summary-behavior-only .summary-color,
[data-theme="dark"] .student-session-card .period-summary .summary-behavior-only .summary-color{
  border-color:rgba(226,232,240,.42)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.2),0 1px 5px rgba(0,0,0,.35)!important;
}
@media(max-width:1180px){
  .student-session-card .period-summary{gap:5px!important}
  .student-session-card .period-summary .summary-period{padding:7px 8px!important;gap:3px!important}
  .student-session-card .period-summary .summary-period h3{font-size:11px!important}
  .student-session-card .period-summary .student-summary-metrics{gap:2px!important}
  .student-session-card .period-summary .student-summary-metric{grid-template-columns:35px minmax(0,1fr)!important;column-gap:5px!important;min-height:17px!important;padding:2px 3px!important}
  .student-session-card .period-summary .student-summary-metric.is-primary{min-height:20px!important;padding-block:3px!important}
  .student-session-card .period-summary .student-summary-metric.is-written{padding-right:26px!important}
  .student-session-card .period-summary .student-summary-label{font-size:7.55px!important;letter-spacing:.006em!important}
  .student-session-card .period-summary .student-summary-score{font-size:10.8px!important}
  .student-session-card .period-summary .student-summary-metric.is-primary .student-summary-score{font-size:11.5px!important}
  .student-session-card .period-summary .summary-behavior-only{right:7px!important;bottom:6px!important;width:20px!important;height:20px!important}
  .student-session-card .period-summary .summary-behavior-only .summary-color{width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important}
}
@media(max-width:900px){
  .student-session-card .period-summary .summary-period{padding:6px 7px!important}
  .student-session-card .period-summary .summary-period h3{font-size:10px!important}
  .student-session-card .period-summary .student-summary-metric{grid-template-columns:31px minmax(0,1fr)!important;column-gap:4px!important;min-height:15px!important;padding-block:1px!important}
  .student-session-card .period-summary .student-summary-label{font-size:6.75px!important;letter-spacing:0!important}
  .student-session-card .period-summary .student-summary-score{font-size:9.8px!important}
  .student-session-card .period-summary .student-summary-metric.is-primary .student-summary-score{font-size:10.5px!important}
  .student-session-card .period-summary .student-summary-metric.is-written{padding-right:24px!important}
  .student-session-card .period-summary .summary-behavior-only{right:6px!important;bottom:5px!important}
}

/* v68ai — inactive Student View tab; inherits the canonical sidebar typography. */
.sidebar a.nav-disabled,
.sidebar a.nav-disabled:hover,
.sidebar a.nav-disabled:focus{
  background:transparent!important;
  color:var(--muted)!important;
  cursor:not-allowed;
  opacity:.58;
  pointer-events:none;
}

/* v70ai — archive tables use the document flow, never an inner vertical scroller.
   The page itself becomes the single vertical scroll surface only when the full
   result set is taller than the viewport. Horizontal overflow remains available
   on genuinely narrow screens without imposing a fixed table height. */
.events-page .compact-table-wrap.page-flow-table,
.absences-page .compact-table-wrap.page-flow-table,
.written-page .compact-table-wrap.page-flow-table{
  max-height:none!important;
  height:auto!important;
  min-height:0!important;
  overflow:visible!important;
  overscroll-behavior:auto!important;
  scrollbar-gutter:auto!important;
}
.events-page .compact-table-wrap.page-flow-table .compact-table,
.absences-page .compact-table-wrap.page-flow-table .compact-table,
.written-page .compact-table-wrap.page-flow-table .compact-table{
  margin:0!important;
}
/* With one document scroll surface, table headings must not try to stick inside
   a non-scrolling wrapper. The top bar remains the only sticky page element. */
.events-page .compact-table-wrap.page-flow-table .compact-table th,
.absences-page .compact-table-wrap.page-flow-table .compact-table th,
.written-page .compact-table-wrap.page-flow-table .compact-table th{
  position:static!important;
  top:auto!important;
}
/* Narrow tablets may still need a small horizontal pan for wide archive tables;
   vertical growth always stays in the page flow. */
@media(max-width:1100px){
  .events-page .compact-table-wrap.page-flow-table,
  .absences-page .compact-table-wrap.page-flow-table,
  .written-page .compact-table-wrap.page-flow-table{
    overflow-x:auto!important;
    overflow-y:hidden!important;
    overscroll-behavior-x:contain!important;
    -webkit-overflow-scrolling:touch;
  }
}


/* v71 milestone — explicit oral-examination state. */
.oral-exam-dot{
  display:inline-block;
  width:11px;
  height:11px;
  flex:0 0 11px;
  border:1.5px solid #111827;
  border-radius:50%;
  background:#2563eb;
  box-shadow:0 1px 2px rgba(15,23,42,.22),inset 0 0 0 1px rgba(255,255,255,.22);
  vertical-align:middle;
}
.oral-exam-label{
  display:inline-flex;
  align-items:center;
  gap:6px;
  width:max-content;
  max-width:100%;
  margin-inline-start:8px;
  padding:3px 8px;
  border:1px solid #93c5fd;
  border-radius:999px;
  background:#eff6ff;
  color:#1e3a8a;
  font-family:"Noto Sans",Arial,sans-serif;
  font-size:11px;
  font-weight:800;
  line-height:1.2;
  white-space:nowrap;
}
.oral-exam-label.compact{padding:2px 7px;font-size:10px;vertical-align:middle}
.oral-exam-label.compact .oral-exam-dot{width:9px;height:9px;flex-basis:9px}
.app-body.dark .oral-exam-label,
[data-theme="dark"] .oral-exam-label{border-color:#3b82f6;background:#132c4f;color:#dbeafe}
.app-body.dark .oral-exam-dot,
[data-theme="dark"] .oral-exam-dot{border-color:#e2e8f0;box-shadow:0 1px 3px rgba(0,0,0,.45),inset 0 0 0 1px rgba(255,255,255,.18)}

/* Student register edit mode and direct insertion. */
.students-table .oral-column,
.students-table .student-oral-cell{text-align:center;white-space:nowrap}
.students-table .student-oral-cell .oral-exam-dot{width:13px;height:13px}
.student-edit-only{display:none!important;width:46px;text-align:center}
.students-table.is-editing .student-edit-only{display:table-cell!important}
.students-table.is-editing .student-result-row{cursor:default}
.students-table .student-section-edit,
.students-table .student-oral-edit,
.students-table .student-notes-edit{
  width:100%;
  min-width:78px;
  margin:0;
  padding:7px 8px;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--surface);
  color:var(--ink);
  font:inherit;
}
.students-table .student-notes-edit{min-width:210px;resize:vertical}
.student-delete{
  width:30px;
  height:30px;
  border:1px solid #fecaca;
  border-radius:9px;
  background:#fff1f2;
  color:#b91c1c;
  font-size:20px;
  font-weight:800;
  line-height:1;
  cursor:pointer;
}
.student-delete:hover{background:#ffe4e6}
.new-student-modal-card{width:min(760px,calc(100vw - 32px))}
#newStudentForm{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
#newStudentForm label{display:grid;gap:6px;font-weight:700;color:var(--ink)}
#newStudentForm .wide-field{grid-column:1/-1}
#assignExistingWorksWrap{
  padding:13px 14px;
  border:1px solid #bfdbfe;
  border-radius:12px;
  background:#eff6ff;
}
#assignExistingWorksWrap small{display:block;color:#475569;font-weight:500}
.app-body.dark #assignExistingWorksWrap,
[data-theme="dark"] #assignExistingWorksWrap{border-color:#315170;background:#142b47}
.app-body.dark #assignExistingWorksWrap small,
[data-theme="dark"] #assignExistingWorksWrap small{color:#cbd5e1}
@media(max-width:700px){#newStudentForm{grid-template-columns:1fr}.new-student-modal-card{width:calc(100vw - 20px)}}

/* Eight-column roster contract: A–H remains legible without looking like buttons. */
.roster-page .format-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
.roster-page .format-grid span{min-width:0;overflow-wrap:anywhere}
@media(max-width:900px){.roster-page .format-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Oral marker in the interactive class plan; it never competes with the name. */
.student-chip{position:relative}
.student-chip .class-plan-oral-dot{
  position:absolute;
  top:6px;
  right:6px;
  z-index:3;
  width:10px;
  height:10px;
  pointer-events:none;
}
.standing-area .student-chip .class-plan-oral-dot{top:50%;right:7px;transform:translateY(-50%)}

/* Written-work creation preview and oral labels. */
.written-student-preview{
  padding:12px;
  border:1px solid var(--line);
  border-radius:13px;
  background:var(--surface2);
  background:color-mix(in srgb,var(--surface) 92%,#dbeafe 8%);
}
.written-student-preview-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px}
.written-student-preview-head div{display:flex;align-items:baseline;gap:9px;flex-wrap:wrap}
.written-student-preview-head strong{font-size:13px;color:var(--ink)}
.written-student-preview-head span{font-size:11px;color:var(--muted)}
.written-student-preview-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
  max-height:none;
  overflow:visible;
  padding-right:0;
}
.written-student-preview-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-width:0;
  gap:8px;
  padding:7px 9px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface);
}
.written-student-preview-item b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}
.grade-table .student-flags{display:inline-flex;align-items:center;gap:5px;flex-wrap:wrap;margin-inline-start:4px}
.grade-table td:first-child>.oral-exam-label,
.ai-roster-panel td>.oral-exam-label,
.pending-table td>.oral-exam-label{margin-top:4px}
@media(max-width:760px){.written-student-preview-list{grid-template-columns:1fr}}

/* Pending oral-exam workflow. */
.pending-kind,
.oral-pending-action{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:28px;
  padding:4px 9px;
  border:1px solid var(--line);
  border-radius:999px;
  font:700 11px/1.2 "Noto Sans",Arial,sans-serif;
  white-space:nowrap;
}
.pending-kind.absence{border-color:#fdba74;background:#fff7ed;color:#9a3412}
.pending-kind.written{border-color:#cbd5e1;background:#f8fafc;color:#475569}
.oral-pending-action{
  border-color:#60a5fa;
  background:#eff6ff;
  color:#1d4ed8;
  cursor:pointer;
  box-shadow:0 1px 2px rgba(37,99,235,.08);
}
.oral-pending-action:hover{background:#dbeafe;transform:translateY(-1px)}
.oral-pending-action .oral-exam-dot{width:9px;height:9px;flex-basis:9px}
.pending-no-select{text-align:center;color:var(--muted)}
.app-body.dark .pending-kind.absence,
[data-theme="dark"] .pending-kind.absence{border-color:#9a3412;background:#431b0b;color:#fed7aa}
.app-body.dark .pending-kind.written,
[data-theme="dark"] .pending-kind.written{border-color:#475569;background:#1e293b;color:#cbd5e1}
.app-body.dark .oral-pending-action,
[data-theme="dark"] .oral-pending-action{border-color:#3b82f6;background:#132c4f;color:#dbeafe}
.oral-exam-entry-card{width:min(620px,calc(100vw - 28px))}
.oral-exam-work-details{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin:14px 0 18px;
}
.oral-exam-work-details>div{padding:10px 12px;border:1px solid var(--line);border-radius:11px;background:var(--surface2)}
.oral-exam-work-details dt{margin:0 0 3px;color:var(--muted);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.oral-exam-work-details dd{margin:0;color:var(--ink);font-size:13px;font-weight:700}
#oralExamEntryForm{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
#oralExamEntryForm label{display:grid;gap:6px;font-weight:700}
#oralExamEntryForm .inline-actions,#oralExamEntryForm .oral-exam-message{grid-column:1/-1}
@media(max-width:620px){.oral-exam-work-details,#oralExamEntryForm{grid-template-columns:1fr}}
.seat-slot .student-chip.has-oral-exam .student-name-stack{padding-inline:7px 13px!important}
.standing-area .student-chip.has-oral-exam{padding-right:25px!important}
.oral-inline-label{display:inline-flex;align-items:center;gap:6px;color:#1d4ed8;font-weight:800}
.app-body.dark .oral-inline-label,[data-theme="dark"] .oral-inline-label{color:#bfdbfe}


/* v71: student register follows the one-scroll page-flow rule. */
.students-page .compact-table-wrap.students-table-wrap{
  max-height:none!important;
  height:auto!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  overscroll-behavior-x:contain!important;
  scrollbar-gutter:auto!important;
}
.students-page .students-table th{position:static!important;top:auto!important}

/* v71milestone: destructive student action remains clear in dark mode. */
.app-body.dark .student-delete,
[data-theme="dark"] .student-delete{
  border-color:#7f1d1d !important;
  background:#451a1a !important;
  color:#fecaca !important;
}
.app-body.dark .student-delete:hover,
[data-theme="dark"] .student-delete:hover{
  background:#5f1d24 !important;
}

/* ========================================================================== 
   v73totalmobile — dense desktop polish, readable student session and phone-first
   progressive layout. These rules intentionally sit last so legacy component
   rules cannot re-introduce clipping or tiny labels.
   ========================================================================== */

/* Written-work creation: one compact viewport, with overflow only as a safety
   valve for unusually short screens or an open virtual keyboard. */
.written-modal-card{
  width:min(760px,calc(100vw - 24px))!important;
  height:auto!important;
  max-height:calc(var(--ts-visual-height,100dvh) - 18px)!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  padding:18px 22px!important;
  overscroll-behavior:contain;
}
.written-modal-card>h2{margin:0 0 12px!important;font-size:22px!important}
.written-modal-card #writtenForm{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px 12px!important;
  overflow:visible!important;
}
.written-modal-card #writtenForm label{gap:4px!important;font-size:12px!important}
.written-modal-card #writtenForm select,
.written-modal-card #writtenForm input{min-height:36px!important;padding:7px 9px!important}
.written-modal-card #writtenForm textarea{min-height:48px!important;max-height:76px!important;padding:7px 9px!important}
.written-modal-card #writtenScheduleHint{margin:0!important;line-height:1.3!important;font-size:11px!important}
.written-modal-card .written-student-preview{
  min-height:38px!important;
  padding:9px 11px!important;
  overflow:hidden!important;
}
.written-modal-card .written-student-preview-head{margin:0!important;min-width:0!important}
.written-modal-card .written-student-preview-head>div{
  width:100%!important;
  min-width:0!important;
  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:baseline!important;
  justify-content:space-between!important;
  gap:10px!important;
  white-space:nowrap!important;
}
.written-modal-card .written-student-preview-head strong{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.written-modal-card .written-student-preview-head span{flex:0 0 auto!important;white-space:nowrap!important}
.written-modal-card .inline-actions.wide-field{
  position:static!important;
  margin:0!important;
  padding:6px 0 0!important;
  border:0!important;
  background:transparent!important;
}
.written-modal-card #writtenMessage{margin:0!important;min-height:0!important}

/* Grade view: identity and status badges remain one visual unit. */
.grade-table{width:100%!important;table-layout:fixed!important}
.grade-table .col-assignment{width:7%}
.grade-table .col-student{width:30%}
.grade-table .col-father{width:17%}
.grade-table .col-registry{width:9%}
.grade-table .col-score{width:10%}
.grade-table .col-notes{width:27%}
.grade-table th,.grade-table td{vertical-align:middle!important}
.grade-table .grade-student-cell{overflow:visible!important;padding-inline:8px!important}
.grade-table .grade-student-line{
  display:flex!important;
  align-items:center!important;
  flex-wrap:nowrap!important;
  gap:7px!important;
  min-width:0!important;
  white-space:nowrap!important;
}
.grade-table .grade-student-line>b{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.grade-table .student-flags{
  display:inline-flex!important;
  align-items:center!important;
  flex:0 0 auto!important;
  flex-wrap:nowrap!important;
  gap:5px!important;
  margin:0!important;
  white-space:nowrap!important;
}
.grade-table .oral-exam-label,
.grade-table .absence-pill,
.grade-table .status-pill{
  flex:0 0 auto!important;
  margin:0!important;
  white-space:nowrap!important;
  word-break:normal!important;
}
.grade-table .grade-father-cell,.grade-table .grade-registry-cell,.grade-table .grade-score-cell{white-space:nowrap!important}

/* Register notes: maximum useful width, natural row growth, no clipped content. */
.students-table{table-layout:fixed!important;width:100%!important}
.students-table th:nth-child(1){width:20%}
.students-table th:nth-child(2){width:12%}
.students-table th:nth-child(3){width:10%}
.students-table th:nth-child(4){width:6%}
.students-table th:nth-child(5){width:8%}
.students-table th:nth-child(6){width:8%}
.students-table th:nth-child(7){width:36%}
.students-table .student-notes-cell{
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  line-height:1.42!important;
  padding-block:8px!important;
  vertical-align:middle!important;
}
.students-table .student-result-row{height:auto!important}
.students-table-wrap{overscroll-behavior-y:auto!important}

/* Syllable-like surname split in seats. No ellipsis is used once split. */
.seat-slot .student-chip .student-last-name-line,
.seat-slot .student-chip .student-first-name-line{display:block!important;width:100%!important}
.seat-slot .student-chip .student-last-name.is-wrapped-surname{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:0!important;
  overflow:visible!important;
  white-space:normal!important;
  line-height:.94!important;
}
.seat-slot .student-chip .student-last-name.is-wrapped-surname .student-last-name-line{
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:nowrap!important;
  font-size:var(--surname-size,9px)!important;
}

/* Student-card side panels: larger readable type while the central console keeps
   its existing width and interaction geometry. */
.student-session-card .student-session-grid{
  grid-template-columns:minmax(215px,245px) minmax(0,1fr) minmax(205px,230px)!important;
  gap:9px!important;
}
.student-session-card .period-summary{padding:8px!important;gap:7px!important}
.student-session-card .period-summary .summary-period{padding:9px 10px!important;gap:5px!important}
.student-session-card .period-summary .summary-period h3{font-size:13px!important;line-height:1.15!important}
.student-session-card .period-summary .student-summary-metrics{gap:4px!important}
.student-session-card .period-summary .student-summary-metric{
  grid-template-columns:45px minmax(0,1fr)!important;
  min-height:23px!important;
  column-gap:7px!important;
  padding:4px 5px!important;
  align-items:baseline!important;
}
.student-session-card .period-summary .student-summary-metric.is-primary{min-height:27px!important;padding-block:5px!important}
.student-session-card .period-summary .student-summary-label{font-size:9.4px!important;line-height:1.05!important;letter-spacing:.01em!important}
.student-session-card .period-summary .student-summary-score{font-size:13.5px!important;line-height:1!important}
.student-session-card .period-summary .student-summary-metric.is-primary .student-summary-score{font-size:15px!important}
.student-session-card .period-summary .student-summary-metric.is-written{padding-right:31px!important}
.student-session-card .period-summary .summary-behavior-only{right:9px!important;bottom:8px!important;width:23px!important;height:23px!important}
.student-session-card .period-summary .summary-behavior-only .summary-color{width:19px!important;height:19px!important;min-width:19px!important;min-height:19px!important}
.student-session-card .score-dials{padding:8px!important;gap:7px!important}
.student-session-card .session-meter{padding:10px 11px!important;gap:6px 9px!important}
.student-session-card .session-meter .meter-name{font-size:10.5px!important;line-height:1.08!important;letter-spacing:.08em!important}
.student-session-card .session-meter .meter-current b{font-size:23px!important}
.student-session-card .session-meter .meter-average small{font-size:9px!important}
.student-session-card .session-meter .meter-average strong{font-size:15px!important}
.student-session-card .session-meter .meter-swatch{width:25px!important;height:25px!important}
.student-session-card .session-meter .meter-average-swatch{width:17px!important;height:17px!important}
.student-session-card .session-meter em{font-size:8px!important;right:9px!important;top:8px!important}
.student-session-card .hourly-period-options{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px!important;
  margin:0 0 14px!important;
}
.student-session-card .hourly-period-option{display:grid!important;gap:4px!important;text-align:left!important;white-space:normal!important}
.student-session-card .hourly-period-option span{font-size:11px;color:var(--muted)}

/* Canonical school-level terms are translated by our controlled dictionary,
   never by the third-party engine. */
.school-level-term{unicode-bidi:isolate}

/* Mobile shell and controls. */
@media(max-width:900px){
  html,body{max-width:100%;overflow-x:hidden}
  .topbar{height:62px!important;min-height:62px!important;padding:7px 10px!important;gap:7px!important}
  .topbar .app-brand{min-width:0;gap:8px!important}
  .topbar .app-brand>b{font-size:14px;white-space:nowrap}
  .topbar .app-brand>span{width:38px;height:38px;flex:0 0 38px}
  .topbar .top-actions{gap:5px!important;min-width:0}
  .topbar .language-switcher{min-width:0!important;width:auto!important}
  .topbar .language-quick{display:none!important}
  .topbar .language-select-wrap{min-width:104px!important;width:104px!important}
  .topbar .language-select{padding-inline:8px 24px!important;font-size:11px!important}
  .topbar .icon-btn,.topbar .avatar,.mobile-menu-toggle{width:38px!important;height:38px!important;min-width:38px!important}
  .mobile-menu-toggle{display:inline-grid!important;order:0!important}
  .sidebar{width:min(310px,84vw)!important;z-index:1002!important;padding-top:18px!important}
  .mobile-nav-backdrop{z-index:1001!important}
  .settings-page,.roster-page,.events-page,.written-page,.absences-page,.class-plan-page{
    width:100%!important;max-width:100%!important;margin:0!important;padding:12px!important;
  }
  .settings-title{margin-bottom:10px!important}.settings-title h1{font-size:30px!important}
  .panel{padding:12px!important;border-radius:15px!important;min-width:0!important}
  .panel-head{align-items:flex-start!important;gap:8px!important;flex-wrap:wrap!important}
  .panel-head h2{font-size:21px!important}
  .inline-actions{display:flex!important;flex-wrap:wrap!important;gap:7px!important}
  .inline-actions>*{min-height:38px}
  .filter-bar,.events-toolbar{
    display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;align-items:stretch!important;
  }
  .filter-bar>input,.filter-bar>select,.events-toolbar>input,.events-toolbar>select{grid-column:1/-1;width:100%!important;min-width:0!important}
  .filter-bar>button,.filter-bar>a,.events-toolbar>button,.events-toolbar>a{width:100%!important;min-width:0!important;padding-inline:8px!important}
  .modal{padding:5px!important;align-items:center!important}
  .modal-card{width:calc(100vw - 10px)!important;max-width:none!important;max-height:calc(var(--ts-visual-height,100dvh) - 10px)!important;border-radius:16px!important;padding:16px!important;overflow-y:auto!important;overflow-x:hidden!important}
  .modal-close{top:8px!important;right:8px!important}
  .written-modal-card #writtenForm{grid-template-columns:1fr!important}
  .written-modal-card #writtenForm>*{grid-column:1!important}
  .written-modal-card .written-student-preview-head>div{gap:6px!important}
  .written-modal-card .written-student-preview-head strong{font-size:11px!important}
  .written-modal-card .written-student-preview-head span{font-size:9px!important}
  .grade-modal-card{height:calc(var(--ts-visual-height,100dvh) - 8px)!important;padding:12px 10px 0!important}
  .grade-head{padding-right:28px!important}
  .grade-table{min-width:820px!important}
  .grade-table-wrap{-webkit-overflow-scrolling:touch!important;overscroll-behavior:contain!important}
  .students-table,.events-table,.written-table,.absences-table{min-width:760px!important}
  .compact-table-wrap{-webkit-overflow-scrolling:touch}
  .student-session-card{width:100vw!important;height:var(--ts-visual-height,100dvh)!important;max-height:var(--ts-visual-height,100dvh)!important;border-radius:0!important;padding:8px!important;overflow:auto!important}
  .student-session-card .session-head{padding-right:30px!important}
  .student-session-card .student-session-grid{
    grid-template-columns:175px minmax(430px,1fr) 170px!important;
    gap:6px!important;min-width:790px!important;
  }
  .student-session-card .period-summary .student-summary-label{font-size:8px!important}
  .student-session-card .period-summary .student-summary-score{font-size:11.5px!important}
  .student-session-card .session-meter .meter-name{font-size:8.5px!important}
  .student-session-card .session-meter .meter-current b{font-size:18px!important}
  .student-session-card .session-meter .meter-average strong{font-size:12px!important}
}

@media(max-width:600px){
  .topbar .language-select-wrap{min-width:92px!important;width:92px!important}
  .topbar .app-brand>b{display:none}
  .settings-page,.roster-page,.events-page,.written-page,.absences-page,.class-plan-page{padding:8px!important}
  .filter-bar,.events-toolbar{grid-template-columns:1fr 1fr!important}
  .panel-head .inline-actions{width:100%}
  .panel-head .inline-actions>*{flex:1 1 calc(50% - 7px);text-align:center}
  #newStudentForm,#oralExamEntryForm,.oral-exam-work-details{grid-template-columns:1fr!important}
  .new-student-modal-card{width:calc(100vw - 10px)!important}
  .student-session-card .session-meta{max-width:none!important}
  .student-session-card .session-title-row,.student-session-card .session-meta-action-row{align-items:flex-start!important}
  .student-session-card .session-actions button span:last-child{display:none!important}
  .student-session-card .session-actions button{min-width:36px!important;width:36px!important;padding:0!important}
  .student-session-card .hourly-period-options{grid-template-columns:1fr!important}
}

/* Class plan adapts to portrait without expanding the document horizontally.
   Fullscreen requests landscape where the browser permits orientation locking. */
@media(max-width:760px){
  .class-plan-toolbar{display:grid!important;grid-template-columns:1fr!important;align-items:stretch!important;gap:10px!important}
  .class-plan-toolbar .section-picker-label{min-width:0!important;width:100%!important}
  .class-plan-toolbar .compact-select{width:100%!important}
  .class-plan-toolbar>.inline-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .class-plan-toolbar>.inline-actions button{width:100%!important;padding-inline:5px!important;font-size:11px!important}
  .class-plan-context{display:grid!important;grid-template-columns:1fr!important;gap:7px!important}
  .class-plan-context select{max-width:100%!important}
  .classroom{
    width:100%!important;min-width:0!important;min-height:calc(var(--ts-visual-height,100dvh) - 88px)!important;
    padding:48px 6px 96px!important;grid-template-columns:1fr!important;overflow:hidden!important;
  }
  .classroom::before{
    content:'Για άνετη επεξεργασία πατήστε Μεγιστοποίηση και γυρίστε το κινητό οριζόντια.';
    position:absolute;top:8px;left:8px;right:8px;padding:7px 9px;border:1px solid #bfdbfe;border-radius:9px;
    background:#eff6ff;color:#1e3a8a;font-size:10px;font-weight:750;text-align:center;z-index:2;
  }
  [data-theme="dark"] .classroom::before{border-color:#315170;background:#132c4f;color:#dbeafe}
  .classroom .room-windows{display:none!important}
  .classroom .desk-grid{
    grid-column:1!important;width:100%!important;max-width:100%!important;
    grid-template-columns:repeat(var(--desk-columns,4),minmax(0,1fr))!important;
    gap:var(--desk-gap-y,8px) clamp(3px,1vw,var(--desk-gap-x,8px))!important;
  }
  .classroom .double-desk{min-width:0!important;padding:3px!important}
  .classroom .seat-slot{min-width:0!important}
  .classroom .seat-slot>.student-chip{min-width:0!important;height:58px!important;min-height:58px!important;padding:2px!important}
  .classroom .seat-slot .student-first-name-line,
  .classroom .seat-slot .student-last-name-line{font-size:clamp(5.8px,1.75vw,8px)!important}
  .classroom .standing-area{grid-column:1!important;position:static!important;max-height:none!important;margin:10px 0!important}
  .classroom .standing-area>div{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .classroom .room-front{left:6px!important;right:6px!important;bottom:8px!important}
  .classroom:fullscreen,.classroom.is-fullscreen{overflow:auto!important;min-width:900px!important}
  .classroom:fullscreen::before,.classroom.is-fullscreen::before{display:none}
}
.grade-table .student-flag{display:inline-flex!important;align-items:center!important;flex:0 0 auto!important;white-space:nowrap!important;word-break:normal!important;margin:0!important}
.student-chip.is-mobile-selected{outline:3px solid #2563eb!important;outline-offset:2px!important;box-shadow:0 0 0 5px rgba(37,99,235,.18)!important}

/* ========================================================================== 
   Teacher Support v73totalmobile — authoritative responsive layer
   Phone rules are deliberately gated by a physical-phone class so tablets and
   the established desktop interface keep their existing geometry.
   ========================================================================== */

/* Grading view: give the complete student identity and its status chips the
   largest share of the row, then move the following columns to the right. */
.grade-view-table .col-student{width:38%!important}
.grade-view-table .col-father{width:15%!important}
.grade-view-table .col-registry{width:8%!important}
.grade-view-table .col-score{width:9%!important}
.grade-view-table .col-notes{width:30%!important}
.grade-edit-table .col-assignment{width:6%!important}
.grade-edit-table .col-student{width:34%!important}
.grade-edit-table .col-father{width:14%!important}
.grade-edit-table .col-registry{width:8%!important}
.grade-edit-table .col-score{width:9%!important}
.grade-edit-table .col-notes{width:29%!important}
.grade-table .grade-student-cell{overflow:visible!important}
.grade-table .grade-student-line{width:100%!important;overflow:visible!important}
.grade-table .grade-student-line>b{
  flex:0 1 auto!important;max-width:none!important;overflow:visible!important;
  text-overflow:clip!important;white-space:nowrap!important;font-size:clamp(10.5px,.88vw,12px)!important;
}
.grade-table .student-flags{gap:5px!important}
.grade-table .oral-exam-label,.grade-table .absence-pill,.grade-table .student-flag{
  font-size:9px!important;line-height:1!important;padding:4px 7px!important;
}
.grade-table .grade-father-cell{padding-left:12px!important}
.grade-table .grade-registry-cell,.grade-table .grade-score-cell{text-align:left!important;padding-left:10px!important}
.grade-table .grade-score-cell input{max-width:92px!important}

/* One theme contract for all archive tables and status rows. */
.compact-table-wrap,.grade-table-wrap,.schedule-scroll{background:var(--surface)!important;border-color:var(--line)!important}
.compact-table,.compact-table th,.compact-table td{color:var(--ink)}
.compact-table th{background:var(--surface2)!important;color:var(--ink)!important}
.compact-table td{background:var(--surface)!important;border-color:var(--line)!important}
.compact-table tr:hover td{background:color-mix(in srgb,var(--accent) 5%,var(--surface))!important}
.app-body.dark .events-table tbody td,
.app-body.dark .absences-table tbody td,
.app-body.dark .written-table tbody td,
html[data-theme="dark"] .events-table tbody td,
html[data-theme="dark"] .absences-table tbody td,
html[data-theme="dark"] .written-table tbody td{background:#101b2a!important;color:#edf3fb!important;border-color:#31445d!important}
.app-body.dark .events-table tbody tr:hover td,
.app-body.dark .absences-table tbody tr:hover td,
.app-body.dark .written-table tbody tr:hover td{background:#172d4b!important}
.app-body.dark .written-row.status-pending td{background:#123326!important}
.app-body.dark .written-row.status-ungraded td{background:#341d20!important}
.app-body.dark .written-row.status-partial td{background:#132c4f!important}
.app-body.dark .status-pill.good{background:#123b2c!important;color:#73e2ad!important;border-color:#237a55!important}
.app-body.dark .status-pill.bad{background:#401d22!important;color:#ffaaa2!important;border-color:#8e3941!important}
.app-body.dark .status-pill.info{background:#142f55!important;color:#a9c8f5!important;border-color:#315c96!important}
.app-body.dark input,.app-body.dark select,.app-body.dark textarea,
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{
  color-scheme:dark;background-color:var(--surface2);color:var(--ink);border-color:var(--line)
}

.stats{grid-template-columns:repeat(4,minmax(0,1fr))}
.mobile-title-back,.mobile-landscape-launch,.mobile-landscape-back,.mobile-landscape-actions,
.mobile-orientation-guard,.plan-tools-grip,.plan-tools-fold,.mobile-session-detail{display:none}

/* ------------------------------- Phones --------------------------------- */
@media (max-width:700px) and (pointer:coarse){
  html,body{width:100%!important;max-width:100%!important;overflow-x:hidden!important}
  body{overscroll-behavior-x:none}
  .app-shell{display:block!important;min-height:100dvh!important}

  /* Dashboard top bar: menu | language | theme | settings. */
  .page-dashboard>.topbar{
    position:sticky!important;top:0!important;height:58px!important;min-height:58px!important;
    padding:7px 8px!important;display:flex!important;gap:6px!important;align-items:center!important;
  }
  .page-dashboard>.topbar .app-brand{display:none!important}
  .page-dashboard>.topbar .mobile-menu-toggle{order:0!important;display:grid!important;flex:0 0 40px!important}
  .page-dashboard>.topbar .top-actions{order:1!important;display:flex!important;flex:1!important;min-width:0!important;justify-content:flex-end!important;gap:5px!important}
  .page-dashboard>.topbar .language-switcher{
    order:0!important;flex:1 1 auto!important;width:auto!important;max-width:164px!important;min-width:112px!important;
    height:40px!important;padding:4px 5px!important;overflow:hidden!important;background:var(--surface2)!important;border:1px solid var(--line)!important;
  }
  .page-dashboard>.topbar .language-quick{display:none!important}
  .page-dashboard>.topbar .language-select-wrap{width:100%!important;min-width:0!important;max-width:none!important}
  .page-dashboard>.topbar .language-select{width:100%!important;min-width:0!important;padding:7px 24px 7px 7px!important;font-size:11px!important}
  .page-dashboard>.topbar .theme-toggle,.page-dashboard>.topbar .avatar{
    display:grid!important;width:40px!important;height:40px!important;min-width:40px!important;flex:0 0 40px!important;border-radius:11px!important
  }
  .page-dashboard>.topbar .avatar{background:linear-gradient(135deg,var(--accent),var(--accent2))!important;color:#fff!important}

  /* Drawer is a narrow, left-aligned menu with no sideways movement. */
  .sidebar{
    position:fixed!important;left:0!important;right:auto!important;top:58px!important;bottom:0!important;
    width:min(252px,82vw)!important;max-width:82vw!important;height:auto!important;
    padding:10px 9px 14px!important;border:0!important;border-right:1px solid var(--line)!important;
    transform:translateX(-104%)!important;transition:transform .2s ease!important;
    overflow-y:auto!important;overflow-x:hidden!important;z-index:1002!important;
    background:var(--surface)!important;display:flex!important;
  }
  .sidebar.is-mobile-open{transform:translateX(0)!important}
  .sidebar nav{display:grid!important;grid-template-columns:1fr!important;gap:3px!important;min-width:0!important;width:100%!important}
  .sidebar a,.sidebar button.sidebar-search-trigger{
    width:100%!important;min-width:0!important;justify-content:flex-start!important;text-align:left!important;
    font-size:14px!important;line-height:1.15!important;padding:9px 10px!important;white-space:nowrap!important;overflow:hidden!important;
  }
  .sidebar a span,.sidebar button span{display:inline!important;flex:0 0 18px!important;font-size:16px!important;text-align:center!important}
  .sidebar .logout{display:flex!important;margin-top:12px!important;color:#dc2626!important;background:color-mix(in srgb,#dc2626 8%,var(--surface))!important}
  .mobile-nav-backdrop{inset:58px 0 0!important}

  /* Dashboard information density. */
  .page-dashboard .dashboard-main{padding:12px 10px 24px!important;max-width:none!important}
  .page-dashboard .welcome{
    display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:8px!important;margin-bottom:10px!important
  }
  .page-dashboard .welcome>div{min-width:0!important}
  .page-dashboard .welcome h1{font-size:clamp(22px,6.2vw,28px)!important;line-height:1.05!important;margin:2px 0!important}
  .page-dashboard .welcome>div>p:last-child{font-size:11px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .page-dashboard .date-card{display:grid!important;place-items:center!important;min-width:72px!important;width:72px!important;padding:7px!important;border-radius:13px!important}
  .page-dashboard .date-card b{font-size:22px!important;line-height:1!important}.page-dashboard .date-card span{font-size:10px!important}.page-dashboard .date-card em{font-size:7px!important}
  .page-dashboard .quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;margin-bottom:10px!important}
  .page-dashboard .quick-grid>*{min-height:50px!important;height:auto!important;padding:8px 7px!important;border-radius:12px!important;gap:0!important}
  .page-dashboard .quick-grid>:not(.primary-action){font-size:0!important}
  .page-dashboard .quick-grid>:not(.primary-action)>span{font-size:11px!important;line-height:1.15!important}
  .page-dashboard .quick-grid .primary-action{grid-column:1/-1!important;min-height:55px!important;font-size:16px!important;grid-template-columns:auto auto!important;justify-content:center!important;gap:8px!important}
  .page-dashboard .stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;margin-bottom:10px!important}
  .page-dashboard .stats article{padding:10px 11px!important;border-radius:12px!important;min-width:0!important}
  .page-dashboard .stats small{font-size:11px!important}.page-dashboard .stats strong{font-size:19px!important}
  .page-dashboard .dashboard-assignments-panel{display:none!important}
  .page-dashboard .dashboard-compact-panel{padding:11px!important;margin:0!important;scroll-margin-top:64px!important}
  .page-dashboard .dashboard-compact-panel .panel-head .eyebrow{display:none!important}
  .page-dashboard .dashboard-compact-panel .panel-head h2{margin:0!important;font-size:20px!important}
  .page-dashboard .compact-records{grid-template-columns:1fr!important;gap:6px!important}
  .page-dashboard .compact-records article{padding:9px 10px!important}

  /* All secondary phone pages start at their title card, not at a duplicate bar. */
  .page-management>.topbar,.page-absences>.topbar,.page-events>.topbar,
  .page-written>.topbar,.page-schedule>.topbar,.page-class-plan>.topbar{display:none!important}
  .page-management .settings-page,.page-absences .settings-page,.page-events .settings-page,
  .page-written .settings-page,.page-class-plan .class-plan-page,.page-schedule .schedule-main{
    width:100%!important;max-width:none!important;margin:0!important;padding:8px!important
  }
  .settings-title,.class-plan-toolbar>div:first-child,.schedule-hero>div:first-child{
    position:relative!important;padding-right:48px!important;min-height:45px!important
  }
  .settings-title{margin:0 0 8px!important;padding:8px 48px 7px 5px!important}
  .settings-title .eyebrow,.class-plan-toolbar .eyebrow,.schedule-hero .eyebrow{font-size:10px!important;letter-spacing:.14em!important;margin:0 0 3px!important}
  .settings-title h1,.class-plan-toolbar h1,.schedule-hero h1{font-size:clamp(23px,7vw,29px)!important;line-height:1.05!important;margin:0!important}
  .page-management .settings-title h1{font-size:clamp(18px,5.4vw,22px)!important;white-space:nowrap!important}
  .settings-title>p:last-child{font-size:10px!important;margin:4px 0 0!important;line-height:1.25!important}
  .mobile-title-back{
    display:grid!important;place-items:center!important;position:absolute!important;right:0!important;top:0!important;
    width:40px!important;height:40px!important;min-width:40px!important;border-radius:11px!important
  }
  .panel{padding:11px!important;border-radius:14px!important}
  .panel h2{font-size:19px!important}

  /* Portrait-first archive controls. */
  body.page-absences:not(.mobile-landscape-workspace) .page-flow-table,
  body.page-events:not(.mobile-landscape-workspace) .page-flow-table,
  body.page-written:not(.mobile-landscape-workspace) .page-flow-table,
  body.page-absences:not(.mobile-landscape-workspace) .panel>.panel-head,
  body.page-events:not(.mobile-landscape-workspace) .panel>.panel-head,
  body.page-written:not(.mobile-landscape-workspace) .panel>.panel-head,
  body.page-absences:not(.mobile-landscape-workspace) .absence-edit-actions,
  body.page-events:not(.mobile-landscape-workspace) #eventEditActions,
  body.page-written:not(.mobile-landscape-workspace) #writtenEditActions{display:none!important}
  body.page-events:not(.mobile-landscape-workspace) #newEvent{display:none!important}
  .page-absences .filter-bar,.page-events .events-toolbar,.page-written .filter-bar{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;margin:0!important
  }
  .page-absences .filter-bar>input,.page-absences .filter-bar>select,
  .page-events .events-toolbar>input,.page-events .events-toolbar>select,
  .page-written .filter-bar>input,.page-written .filter-bar>select{grid-column:1/-1!important;width:100%!important;min-width:0!important}
  .page-absences .filter-bar>button,.page-absences .filter-bar>a,
  .page-events .events-toolbar>button,.page-events .events-toolbar>a,
  .page-written .filter-bar>button,.page-written .filter-bar>a{width:100%!important;min-width:0!important;min-height:39px!important;padding:7px 5px!important;font-size:11px!important;text-align:center!important}
  .mobile-landscape-launch{display:block!important;grid-column:1/-1!important;margin-top:2px!important;background:linear-gradient(135deg,var(--accent),var(--accent2))!important;color:#fff!important}

  /* Schedule portrait remains a readable one-page view. */
  .page-schedule .schedule-main{display:grid!important;gap:8px!important}
  .page-schedule .schedule-hero{padding:10px!important;display:flex!important;align-items:flex-start!important}
  .page-schedule .schedule-hero>div:first-child{flex:1!important}
  .page-schedule .schedule-actions{width:100%!important;gap:5px!important;margin-top:7px!important}
  .page-schedule .schedule-actions button{min-height:36px!important;padding:7px!important;font-size:11px!important}
  .page-schedule .schedule-table-panel,.page-schedule .schedule-summary{padding:9px!important}
  .page-schedule .schedule-panel-head{margin-bottom:6px!important}.page-schedule .schedule-panel-head .hint,.page-schedule .schedule-legend{display:none!important}
  .page-schedule .schedule-scroll{overflow-x:hidden!important;overflow-y:visible!important}
  .page-schedule .teacher-schedule{width:100%!important;min-width:0!important;table-layout:fixed!important}
  .page-schedule .teacher-schedule th,.page-schedule .teacher-schedule td{padding:3px 2px!important;height:48px!important;font-size:7px!important;overflow:hidden!important}
  .page-schedule .teacher-schedule .time-column{width:15%!important;font-size:7px!important}
  .page-schedule .schedule-entry-view b{font-size:7px!important;line-height:1.05!important}.page-schedule .schedule-entry-view span{font-size:6.5px!important}

  /* Class plan portrait uses one vertical flow; room furniture follows students. */
  .page-class-plan .class-plan-toolbar{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;margin-bottom:7px!important;padding:10px!important}
  .page-class-plan .class-plan-toolbar>div:first-child{padding-right:48px!important}
  .page-class-plan .section-picker-label{width:100%!important;min-width:0!important}.page-class-plan .section-picker-label select{width:100%!important}
  .page-class-plan .class-plan-toolbar>.inline-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
  .page-class-plan .class-plan-toolbar>.inline-actions button{font-size:10px!important;min-height:37px!important;padding:5px!important}
  .page-class-plan .classroom{
    display:flex!important;flex-direction:column!important;width:100%!important;min-width:0!important;min-height:0!important;
    padding:43px 5px 8px!important;overflow:hidden!important
  }
  .page-class-plan .classroom .desk-grid{order:1!important;width:100%!important;max-width:none!important;grid-template-columns:repeat(var(--desk-columns,4),minmax(0,1fr))!important;gap:7px 3px!important}
  .page-class-plan .classroom .double-desk{min-width:0!important;padding:3px!important;border-width:3px!important}
  .page-class-plan .classroom .seat-slot{min-width:0!important;height:58px!important;min-height:58px!important;padding:2px!important}
  .page-class-plan .classroom .seat-slot>.student-chip{height:52px!important;min-height:52px!important;padding:2px!important}
  .page-class-plan .classroom .standing-area{order:2!important;position:static!important;width:100%!important;margin:8px 0 5px!important;padding:7px!important;max-height:none!important}
  .page-class-plan .classroom .standing-area>div{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important}
  .page-class-plan .classroom .room-front{
    order:3!important;position:static!important;display:flex!important;align-items:flex-end!important;justify-content:space-between!important;
    gap:8px!important;width:100%!important;margin:2px 0 0!important;padding:4px 3px 0!important
  }
  .page-class-plan .classroom .door,.page-class-plan .classroom .board,.page-class-plan .classroom .teacher-desk{
    min-width:0!important;width:auto!important;padding:6px 9px!important;border-width:2px!important;border-radius:6px!important;font-size:9px!important
  }
  .page-class-plan .classroom .board{flex:1!important;max-width:46%!important}.page-class-plan .classroom .room-windows{display:none!important}

  /* A landscape warning is visible only where portrait is the working mode. */
  .mobile-orientation-guard{display:none!important}
}

/* A physical phone can rotate beyond the width media query; these workspace
   rules therefore use the persistent html.ts-phone-device class. */
html.ts-phone-device body.mobile-landscape-workspace{
  position:fixed!important;inset:0!important;width:100vw!important;height:var(--ts-visual-height,100dvh)!important;
  max-width:none!important;overflow:hidden!important;background:var(--surface)!important;z-index:2147480000!important
}
html.ts-phone-device body.mobile-landscape-workspace>.topbar,
html.ts-phone-device body.mobile-landscape-workspace .settings-title,
html.ts-phone-device body.mobile-landscape-workspace .filter-bar,
html.ts-phone-device body.mobile-landscape-workspace .events-toolbar,
html.ts-phone-device body.mobile-landscape-workspace .sidebar,
html.ts-phone-device body.mobile-landscape-workspace .mobile-nav-backdrop{display:none!important}
html.ts-phone-device body.mobile-landscape-workspace .settings-page,
html.ts-phone-device body.mobile-landscape-workspace .events-page,
html.ts-phone-device body.mobile-landscape-workspace .written-page,
html.ts-phone-device body.mobile-landscape-workspace .absences-page{
  display:block!important;width:100vw!important;height:var(--ts-visual-height,100dvh)!important;max-width:none!important;margin:0!important;padding:0!important;overflow:hidden!important
}
html.ts-phone-device body.mobile-landscape-workspace .panel{
  display:flex!important;flex-direction:column!important;width:100%!important;height:100%!important;
  padding:5px 7px 6px!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow:hidden!important
}
html.ts-phone-device body.mobile-landscape-workspace .panel>.panel-head{
  display:flex!important;flex:0 0 44px!important;min-height:44px!important;align-items:center!important;justify-content:flex-start!important;
  flex-wrap:nowrap!important;gap:7px!important;margin:0 0 4px!important;padding:0!important
}
html.ts-phone-device body.mobile-landscape-workspace .panel>.panel-head h2{font-size:17px!important;line-height:1!important;margin:0 auto 0 0!important;white-space:nowrap!important}
html.ts-phone-device body.mobile-landscape-workspace .mobile-landscape-back{display:grid!important;place-items:center!important;position:static!important;width:36px!important;height:36px!important;min-width:36px!important}
html.ts-phone-device body.mobile-landscape-workspace .mobile-landscape-actions{display:flex!important;flex-wrap:nowrap!important;gap:5px!important;width:auto!important}
html.ts-phone-device body.mobile-landscape-workspace .mobile-landscape-actions button{min-height:34px!important;padding:5px 8px!important;font-size:10px!important;white-space:nowrap!important}
html.ts-phone-device body.mobile-landscape-workspace .page-flow-table{
  display:block!important;flex:1 1 auto!important;width:100%!important;min-height:0!important;max-height:none!important;
  overflow-y:auto!important;overflow-x:hidden!important;border-radius:9px!important;-webkit-overflow-scrolling:touch!important;touch-action:pan-y!important;overscroll-behavior-y:contain!important
}
html.ts-phone-device body.mobile-landscape-workspace .compact-table{
  display:table!important;width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed!important;border-collapse:collapse!important;font-size:9px!important
}
html.ts-phone-device body.mobile-landscape-workspace .compact-table thead{display:table-header-group!important}
html.ts-phone-device body.mobile-landscape-workspace .compact-table tbody{display:table-row-group!important}
html.ts-phone-device body.mobile-landscape-workspace .compact-table tr{display:table-row!important;height:auto!important}
html.ts-phone-device body.mobile-landscape-workspace .compact-table th,
html.ts-phone-device body.mobile-landscape-workspace .compact-table td{
  display:table-cell!important;padding:5px 3px!important;line-height:1.15!important;vertical-align:middle!important;
  overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important
}
html.ts-phone-device body.mobile-landscape-workspace .compact-table th{position:sticky!important;top:0!important;z-index:4!important;font-size:8.5px!important}
html.ts-phone-device body.mobile-landscape-workspace .compact-table input,
html.ts-phone-device body.mobile-landscape-workspace .compact-table select,
html.ts-phone-device body.mobile-landscape-workspace .compact-table textarea{
  width:100%!important;min-width:0!important;max-width:100%!important;padding:4px 3px!important;border-radius:6px!important;font-size:8px!important;line-height:1.1!important
}
html.ts-phone-device body.mobile-landscape-workspace .compact-table textarea{resize:none!important;min-height:34px!important}
html.ts-phone-device body.mobile-landscape-workspace .absence-edit-actions,
html.ts-phone-device body.mobile-landscape-workspace #eventEditActions,
html.ts-phone-device body.mobile-landscape-workspace #writtenEditActions{
  flex:0 0 auto!important;margin:4px 0 0!important;gap:5px!important;justify-content:flex-end!important
}
html.ts-phone-device body.mobile-landscape-workspace .absence-edit-actions button,
html.ts-phone-device body.mobile-landscape-workspace #eventEditActions button,
html.ts-phone-device body.mobile-landscape-workspace #writtenEditActions button{min-height:32px!important;padding:5px 10px!important;font-size:10px!important}

/* Absence table: only names (when necessary) and remarks may grow vertically. */
html.ts-phone-device body.mobile-landscape-absences .absences-table th:nth-child(1),html.ts-phone-device body.mobile-landscape-absences .absences-table td:nth-child(1){width:18%!important}
html.ts-phone-device body.mobile-landscape-absences .absences-table th:nth-child(2),html.ts-phone-device body.mobile-landscape-absences .absences-table td:nth-child(2){width:7%!important}
html.ts-phone-device body.mobile-landscape-absences .absences-table th:nth-child(3),html.ts-phone-device body.mobile-landscape-absences .absences-table td:nth-child(3){width:7%!important}
html.ts-phone-device body.mobile-landscape-absences .absences-table th:nth-child(4),html.ts-phone-device body.mobile-landscape-absences .absences-table td:nth-child(4){width:4%!important}
html.ts-phone-device body.mobile-landscape-absences .absences-table th:nth-child(5),html.ts-phone-device body.mobile-landscape-absences .absences-table td:nth-child(5){width:6%!important}
html.ts-phone-device body.mobile-landscape-absences .absences-table th:nth-child(6),html.ts-phone-device body.mobile-landscape-absences .absences-table td:nth-child(6){width:10%!important}
html.ts-phone-device body.mobile-landscape-absences .absences-table th:nth-child(7),html.ts-phone-device body.mobile-landscape-absences .absences-table td:nth-child(7){width:5%!important}
html.ts-phone-device body.mobile-landscape-absences .absences-table th:nth-child(8),html.ts-phone-device body.mobile-landscape-absences .absences-table td:nth-child(8){width:9%!important}
html.ts-phone-device body.mobile-landscape-absences .absences-table th:nth-child(9),html.ts-phone-device body.mobile-landscape-absences .absences-table td:nth-child(9){width:30%!important}
html.ts-phone-device body.mobile-landscape-absences .absences-table th:nth-child(10),html.ts-phone-device body.mobile-landscape-absences .absences-table td:nth-child(10){width:4%!important}
html.ts-phone-device body.mobile-landscape-absences .absences-table td:nth-child(1),
html.ts-phone-device body.mobile-landscape-absences .absences-table td:nth-child(1) b,
html.ts-phone-device body.mobile-landscape-absences .absences-table .remarks-cell{
  white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:normal!important;word-break:normal!important
}
html.ts-phone-device body.mobile-landscape-absences .absences-table.is-editing td:nth-child(1) b{display:block!important;line-height:1.1!important}
html.ts-phone-device body.mobile-landscape-absences .absence-delete{width:24px!important;height:24px!important;font-size:17px!important;border-radius:6px!important}

/* Events fit without a horizontal pan. */
html.ts-phone-device body.mobile-landscape-events .events-table th:nth-child(1),html.ts-phone-device body.mobile-landscape-events .events-table td:nth-child(1){width:28%!important}
html.ts-phone-device body.mobile-landscape-events .events-table th:nth-child(2),html.ts-phone-device body.mobile-landscape-events .events-table td:nth-child(2){width:30%!important}
html.ts-phone-device body.mobile-landscape-events .events-table th:nth-child(3),html.ts-phone-device body.mobile-landscape-events .events-table td:nth-child(3){width:12%!important}
html.ts-phone-device body.mobile-landscape-events .events-table th:nth-child(4),html.ts-phone-device body.mobile-landscape-events .events-table td:nth-child(4){width:14%!important}
html.ts-phone-device body.mobile-landscape-events .events-table th:nth-child(5),html.ts-phone-device body.mobile-landscape-events .events-table td:nth-child(5){width:7%!important}
html.ts-phone-device body.mobile-landscape-events .events-table th:nth-child(6),html.ts-phone-device body.mobile-landscape-events .events-table td:nth-child(6){width:5%!important}
html.ts-phone-device body.mobile-landscape-events .events-table th:nth-child(7),html.ts-phone-device body.mobile-landscape-events .events-table td:nth-child(7){width:4%!important}
html.ts-phone-device body.mobile-landscape-events .events-table td:nth-child(1){white-space:normal!important;text-overflow:clip!important}
html.ts-phone-device body.mobile-landscape-events .events-table td:nth-child(1) small{display:block!important;font-size:7px!important}

/* Written works reserve their flexible space for remarks. */
html.ts-phone-device body.mobile-landscape-written .written-table th:nth-child(1),html.ts-phone-device body.mobile-landscape-written .written-table td:nth-child(1){width:11%!important}
html.ts-phone-device body.mobile-landscape-written .written-table th:nth-child(2),html.ts-phone-device body.mobile-landscape-written .written-table td:nth-child(2){width:6%!important}
html.ts-phone-device body.mobile-landscape-written .written-table th:nth-child(3),html.ts-phone-device body.mobile-landscape-written .written-table td:nth-child(3){width:12%!important}
html.ts-phone-device body.mobile-landscape-written .written-table th:nth-child(4),html.ts-phone-device body.mobile-landscape-written .written-table td:nth-child(4){width:10%!important}
html.ts-phone-device body.mobile-landscape-written .written-table th:nth-child(5),html.ts-phone-device body.mobile-landscape-written .written-table td:nth-child(5){width:18%!important}
html.ts-phone-device body.mobile-landscape-written .written-table th:nth-child(6),html.ts-phone-device body.mobile-landscape-written .written-table td:nth-child(6){width:10%!important}
html.ts-phone-device body.mobile-landscape-written .written-table th:nth-child(7),html.ts-phone-device body.mobile-landscape-written .written-table td:nth-child(7){width:9%!important}
html.ts-phone-device body.mobile-landscape-written .written-table th:nth-child(8),html.ts-phone-device body.mobile-landscape-written .written-table td:nth-child(8){width:20%!important}
html.ts-phone-device body.mobile-landscape-written .written-table th:nth-child(9),html.ts-phone-device body.mobile-landscape-written .written-table td:nth-child(9){width:4%!important}
html.ts-phone-device body.mobile-landscape-written .written-table .remarks-cell,
html.ts-phone-device body.mobile-landscape-written .written-table .written-remarks-content,
html.ts-phone-device body.mobile-landscape-written .written-table .written-remarks-text{
  white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important;line-height:1.2!important
}
html.ts-phone-device body.mobile-landscape-written .written-table .status-pill{font-size:7px!important;padding:3px 5px!important}

/* Entry dialogs launched from an archive workspace also use the landscape
   canvas. Their own forms keep their existing information architecture. */
html.ts-phone-device body.mobile-landscape-workspace .modal{
  position:fixed!important;inset:0!important;width:100vw!important;height:var(--ts-visual-height,100dvh)!important;
  padding:0!important;align-items:stretch!important;justify-items:stretch!important;z-index:2147482500!important
}
html.ts-phone-device body.mobile-landscape-workspace .modal-card{
  width:100vw!important;height:var(--ts-visual-height,100dvh)!important;max-width:none!important;max-height:none!important;
  margin:0!important;padding:12px 16px!important;border-radius:0!important;overflow-y:auto!important;overflow-x:hidden!important
}
html.ts-phone-device body.mobile-landscape-workspace .modal-card>h2{font-size:20px!important;margin:0 38px 8px 0!important}
html.ts-phone-device body.mobile-landscape-workspace .modal-card label{font-size:10px!important;gap:3px!important}
html.ts-phone-device body.mobile-landscape-workspace .modal-card input,
html.ts-phone-device body.mobile-landscape-workspace .modal-card select,
html.ts-phone-device body.mobile-landscape-workspace .modal-card textarea{min-height:32px!important;padding:5px 7px!important;font-size:10px!important}
html.ts-phone-device body.mobile-landscape-workspace .modal-card .inline-actions{gap:6px!important}
html.ts-phone-device body.mobile-landscape-workspace .modal-card .inline-actions button{min-height:32px!important;padding:5px 9px!important;font-size:10px!important}

/* Schedule editing gets its own complete landscape canvas. */
html.ts-phone-device body.mobile-landscape-schedule .schedule-main{
  display:grid!important;grid-template-rows:auto auto minmax(0,1fr)!important;gap:5px!important;
  width:100vw!important;height:var(--ts-visual-height,100dvh)!important;padding:5px!important;overflow:hidden!important
}
html.ts-phone-device body.mobile-landscape-schedule .schedule-hero{padding:6px 8px!important;min-height:43px!important;display:flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important}
html.ts-phone-device body.mobile-landscape-schedule .schedule-hero>div:first-child{padding-right:0!important;min-height:0!important;flex:1!important}
html.ts-phone-device body.mobile-landscape-schedule .schedule-hero .eyebrow,
html.ts-phone-device body.mobile-landscape-schedule .schedule-teacher-line{display:none!important}
html.ts-phone-device body.mobile-landscape-schedule .schedule-hero h1{font-size:17px!important;margin:0!important}
html.ts-phone-device body.mobile-landscape-schedule .mobile-title-back{display:none!important}
html.ts-phone-device body.mobile-landscape-schedule .schedule-actions{width:auto!important;flex-wrap:nowrap!important;margin:0!important}
html.ts-phone-device body.mobile-landscape-schedule .schedule-actions button{min-height:32px!important;padding:5px 8px!important;font-size:9px!important;white-space:nowrap!important}
html.ts-phone-device body.mobile-landscape-schedule .schedule-options{padding:5px 8px!important;display:flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important}
html.ts-phone-device body.mobile-landscape-schedule .schedule-option-copy{display:none!important}
html.ts-phone-device body.mobile-landscape-schedule .schedule-switch{padding:0!important;font-size:10px!important}
html.ts-phone-device body.mobile-landscape-schedule .schedule-table-panel{display:flex!important;flex-direction:column!important;min-height:0!important;padding:5px!important}
html.ts-phone-device body.mobile-landscape-schedule .schedule-panel-head{display:none!important}
html.ts-phone-device body.mobile-landscape-schedule .schedule-scroll{flex:1!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;touch-action:pan-y!important}
html.ts-phone-device body.mobile-landscape-schedule .teacher-schedule{width:100%!important;min-width:0!important;table-layout:fixed!important}
html.ts-phone-device body.mobile-landscape-schedule .teacher-schedule th,
html.ts-phone-device body.mobile-landscape-schedule .teacher-schedule td{padding:2px!important;height:48px!important;font-size:7px!important;overflow:hidden!important}
html.ts-phone-device body.mobile-landscape-schedule .teacher-schedule .time-column{width:11%!important;font-size:7px!important}
html.ts-phone-device body.mobile-landscape-schedule .schedule-entry-edit{display:block!important;width:100%!important;padding:4px 13px 4px 3px!important;font-size:7px!important;border-radius:5px!important}
html.ts-phone-device body.mobile-landscape-schedule .schedule-time{font-size:7px!important;padding:2px 0!important}
html.ts-phone-device body.mobile-landscape-schedule .schedule-summary{display:none!important}

/* Full-screen class plan on a phone: standing pupils on the left, the plan in
   all remaining space, a minimal window rail at the right and furniture below. */
html.ts-phone-device.ts-landscape .classroom:fullscreen,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen{
  display:grid!important;grid-template-columns:86px minmax(0,1fr) 8px!important;grid-template-rows:minmax(0,1fr) 31px!important;
  gap:4px!important;width:100vw!important;height:var(--ts-visual-height,100dvh)!important;min-width:0!important;min-height:0!important;
  margin:0!important;padding:34px 6px 3px!important;border:0!important;border-radius:0!important;overflow:hidden!important
}
html.ts-phone-device.ts-landscape .classroom:fullscreen::before,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen::before{display:none!important}
html.ts-phone-device.ts-landscape .classroom:fullscreen .standing-area,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .standing-area{
  grid-column:1!important;grid-row:1!important;position:static!important;width:86px!important;min-width:0!important;min-height:0!important;max-height:none!important;
  margin:0!important;padding:3px!important;overflow-y:auto!important;overflow-x:hidden!important;border-radius:7px!important;touch-action:pan-y!important
}
html.ts-phone-device.ts-landscape .classroom:fullscreen .standing-area>b,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .standing-area>b{display:block!important;font-size:7px!important;line-height:1.05!important;text-align:center!important}
html.ts-phone-device.ts-landscape .classroom:fullscreen .standing-area>div,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .standing-area>div{display:grid!important;grid-template-columns:1fr!important;gap:3px!important;margin-top:3px!important}
html.ts-phone-device.ts-landscape .classroom:fullscreen .standing-area .student-chip,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .standing-area .student-chip{
  width:100%!important;min-width:0!important;min-height:31px!important;height:auto!important;padding:2px!important;border-radius:7px!important;font-size:7px!important;line-height:1.05!important
}
html.ts-phone-device.ts-landscape .classroom:fullscreen .desk-grid,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .desk-grid{
  grid-column:2!important;grid-row:1!important;align-self:stretch!important;justify-self:stretch!important;
  width:100%!important;max-width:none!important;min-width:0!important;height:100%!important;padding:0!important;margin:0!important;
  grid-template-columns:repeat(var(--desk-columns,4),minmax(0,1fr))!important;
  grid-template-rows:repeat(var(--desk-rows,4),minmax(0,1fr))!important;gap:4px!important
}
html.ts-phone-device.ts-landscape .classroom:fullscreen .double-desk,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .double-desk{min-width:0!important;min-height:0!important;padding:2px!important;border-width:2px!important;border-radius:7px!important}
html.ts-phone-device.ts-landscape .classroom:fullscreen .seat-slot,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .seat-slot{min-width:0!important;min-height:0!important;height:auto!important;padding:1px!important;border-radius:5px!important}
html.ts-phone-device.ts-landscape .classroom:fullscreen .seat-slot>.student-chip,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .seat-slot>.student-chip{
  min-width:0!important;min-height:0!important;height:100%!important;padding:1px!important;border-radius:6px!important;font-size:clamp(6px,1.15vh,9px)!important;line-height:.98!important
}
html.ts-phone-device.ts-landscape .classroom:fullscreen .student-first-name-line,
html.ts-phone-device.ts-landscape .classroom:fullscreen .student-last-name-line,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .student-first-name-line,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .student-last-name-line{font-size:clamp(5.8px,1.12vh,8.5px)!important;line-height:.98!important}
html.ts-phone-device.ts-landscape .classroom:fullscreen .room-windows,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .room-windows{
  display:block!important;grid-column:3!important;grid-row:1!important;position:static!important;width:8px!important;height:100%!important;
  padding:0!important;border:0!important;border-left:5px double #38a8e8!important;font-size:0!important;writing-mode:horizontal-tb!important
}
html.ts-phone-device.ts-landscape .classroom:fullscreen .room-front,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .room-front{
  display:flex!important;grid-column:1/4!important;grid-row:2!important;position:static!important;align-items:center!important;justify-content:space-between!important;
  gap:12px!important;width:100%!important;height:29px!important;margin:0!important;padding:1px 15px!important
}
html.ts-phone-device.ts-landscape .classroom:fullscreen .door,
html.ts-phone-device.ts-landscape .classroom:fullscreen .board,
html.ts-phone-device.ts-landscape .classroom:fullscreen .teacher-desk,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .door,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .board,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .teacher-desk{
  width:auto!important;min-width:44px!important;max-width:105px!important;height:24px!important;padding:3px 8px!important;
  border-width:2px!important;border-radius:5px!important;font-size:7px!important;line-height:1!important;display:grid!important;place-items:center!important
}
html.ts-phone-device.ts-landscape .classroom:fullscreen .board,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .board{flex:0 1 100px!important}
html.ts-phone-device.ts-landscape .classroom:fullscreen .fullscreen-plan-actions,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .fullscreen-plan-actions{
  display:flex!important;position:absolute!important;top:2px!important;left:4px!important;right:auto!important;max-width:calc(100vw - 48px)!important;
  transform:translate(var(--plan-tools-x,0),var(--plan-tools-y,0))!important;gap:3px!important;padding:3px!important;border-radius:8px!important;overflow:hidden!important
}
html.ts-phone-device.ts-landscape .fullscreen-plan-actions button{min-height:25px!important;height:25px!important;padding:3px 6px!important;font-size:7px!important;white-space:nowrap!important}
html.ts-phone-device.ts-landscape .fullscreen-plan-actions .plan-tools-grip,
html.ts-phone-device.ts-landscape .fullscreen-plan-actions .plan-tools-fold{display:grid!important;place-items:center!important;width:25px!important;min-width:25px!important;padding:0!important;cursor:move!important}
html.ts-phone-device.ts-landscape .fullscreen-plan-actions.is-folded>button:not(.plan-tools-grip):not(.plan-tools-fold){display:none!important}
html.ts-phone-device.ts-landscape .fullscreen-close{top:2px!important;right:3px!important;width:29px!important;height:29px!important;font-size:20px!important}

/* Student card inside the landscape plan. The side columns are compact launch
   buttons; details open in a large readable sheet without shrinking the console. */
html.ts-phone-device.ts-landscape .student-session-modal.is-full-card{position:absolute!important;inset:0!important;padding:0!important;z-index:2147483000!important}
html.ts-phone-device.ts-landscape .student-session-card{
  width:100vw!important;height:var(--ts-visual-height,100dvh)!important;max-width:none!important;max-height:none!important;
  padding:4px 5px!important;border-radius:0!important;overflow:hidden!important
}
html.ts-phone-device.ts-landscape .student-session-card .session-head{display:block!important;padding:0 31px 3px 0!important;min-height:0!important}
html.ts-phone-device.ts-landscape .student-session-card .session-title-row{display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;margin:0!important}
html.ts-phone-device.ts-landscape .student-session-card .session-identity{display:flex!important;align-items:baseline!important;justify-content:center!important;gap:7px!important;min-width:0!important}
html.ts-phone-device.ts-landscape .student-session-card .session-identity .eyebrow{font-size:7px!important;white-space:nowrap!important;margin:0!important}
html.ts-phone-device.ts-landscape .student-session-card .session-identity h2{font-size:14px!important;line-height:1!important;margin:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
html.ts-phone-device.ts-landscape .student-session-card .session-year{font-size:7px!important;padding:2px 5px!important;white-space:nowrap!important}
html.ts-phone-device.ts-landscape .student-session-card .session-meta-action-row{display:flex!important;align-items:center!important;gap:4px!important;margin-top:3px!important}
html.ts-phone-device.ts-landscape .student-session-card .session-meta{display:flex!important;flex:1!important;min-width:0!important;gap:3px!important;flex-wrap:nowrap!important;overflow:hidden!important}
html.ts-phone-device.ts-landscape .student-session-card .session-meta span{font-size:6.5px!important;line-height:1!important;padding:2px 4px!important;white-space:nowrap!important}
html.ts-phone-device.ts-landscape .student-session-card .session-actions{display:flex!important;flex:0 0 auto!important;gap:3px!important}
html.ts-phone-device.ts-landscape .student-session-card .session-actions button{width:auto!important;min-width:0!important;height:25px!important;min-height:25px!important;padding:3px 5px!important;font-size:7px!important;border-radius:6px!important}
html.ts-phone-device.ts-landscape .student-session-card .session-actions .action-icon{font-size:9px!important}
html.ts-phone-device.ts-landscape .student-session-card .session-actions button span:last-child{display:inline!important}
html.ts-phone-device.ts-landscape .student-session-card .student-session-grid{
  display:grid!important;grid-template-columns:88px minmax(0,1fr) 84px!important;gap:4px!important;min-width:0!important;min-height:0!important;height:calc(100% - 48px)!important
}
html.ts-phone-device.ts-landscape .student-session-card .period-summary{
  display:grid!important;grid-template-rows:repeat(var(--summary-period-count,3),minmax(0,1fr))!important;gap:4px!important;padding:4px!important;min-width:0!important
}
html.ts-phone-device.ts-landscape .student-session-card .period-summary .summary-period{
  display:grid!important;place-items:center!important;min-width:0!important;padding:4px!important;border:1px solid var(--line)!important;cursor:pointer!important;overflow:hidden!important
}
html.ts-phone-device.ts-landscape .student-session-card .period-summary .summary-period h3{font-size:8px!important;line-height:1.1!important;text-align:center!important;margin:0!important}
html.ts-phone-device.ts-landscape .student-session-card .period-summary .student-summary-metrics,
html.ts-phone-device.ts-landscape .student-session-card .period-summary .summary-empty-message,
html.ts-phone-device.ts-landscape .student-session-card .period-summary .summary-behavior-only{display:none!important}
html.ts-phone-device.ts-landscape .student-session-card .exam-console{min-width:0!important;gap:3px!important;padding:4px!important}
html.ts-phone-device.ts-landscape .student-session-card .rubric-row{grid-template-columns:58px minmax(0,1fr)!important;gap:3px!important;padding:3px 4px!important;border-radius:7px!important}
html.ts-phone-device.ts-landscape .student-session-card .rubric-row>b{font-size:7px!important}
html.ts-phone-device.ts-landscape .student-session-card .rubric-row>div{gap:3px!important}
html.ts-phone-device.ts-landscape .student-session-card .score-key{height:clamp(28px,7.4vh,43px)!important;min-height:0!important;border-radius:7px!important;font-size:8px!important}
html.ts-phone-device.ts-landscape .student-session-card .score-dials{display:grid!important;grid-template-rows:repeat(5,minmax(0,1fr))!important;gap:4px!important;padding:4px!important;min-width:0!important}
html.ts-phone-device.ts-landscape .student-session-card .session-meter{
  display:grid!important;grid-template-columns:1fr!important;grid-template-rows:auto 1fr!important;align-items:center!important;justify-items:center!important;
  min-width:0!important;padding:4px 2px!important;gap:2px!important;cursor:pointer!important;overflow:hidden!important
}
html.ts-phone-device.ts-landscape .student-session-card .session-meter .meter-name{font-size:7px!important;line-height:1!important;text-align:center!important}
html.ts-phone-device.ts-landscape .student-session-card .session-meter .meter-current,
html.ts-phone-device.ts-landscape .student-session-card .session-meter .meter-average{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:4px!important}
html.ts-phone-device.ts-landscape .student-session-card .session-meter .meter-current b,
html.ts-phone-device.ts-landscape .student-session-card .session-meter .meter-average strong,
html.ts-phone-device.ts-landscape .student-session-card .session-meter .meter-average small,
html.ts-phone-device.ts-landscape .student-session-card .session-meter em{display:none!important}
html.ts-phone-device.ts-landscape .student-session-card .session-meter .meter-swatch{width:17px!important;height:17px!important}
html.ts-phone-device.ts-landscape .student-session-card .session-meter .meter-average-swatch{width:12px!important;height:12px!important}
html.ts-phone-device.ts-landscape .student-session-card .mobile-session-detail{
  display:grid!important;grid-template-rows:auto minmax(0,1fr)!important;position:absolute!important;inset:8%!important;
  z-index:100!important;background:var(--surface)!important;border:1px solid var(--line)!important;border-radius:14px!important;
  box-shadow:0 24px 70px rgba(0,0,0,.38)!important;overflow:hidden!important;opacity:0!important;transform:scale(.97)!important;transition:.15s ease!important
}
html.ts-phone-device.ts-landscape .student-session-card .mobile-session-detail.is-open{opacity:1!important;transform:scale(1)!important}
html.ts-phone-device.ts-landscape .student-session-card .mobile-session-detail>header{display:flex!important;align-items:center!important;gap:9px!important;padding:7px 9px!important;border-bottom:1px solid var(--line)!important}
html.ts-phone-device.ts-landscape .student-session-card .mobile-session-detail>header h3{font-size:18px!important;margin:0!important}
html.ts-phone-device.ts-landscape .student-session-card .mobile-detail-back{width:36px!important;height:36px!important;min-width:36px!important}
html.ts-phone-device.ts-landscape .student-session-card .mobile-detail-content{padding:10px!important;overflow-y:auto!important;overflow-x:hidden!important;touch-action:pan-y!important}
html.ts-phone-device.ts-landscape .student-session-card .mobile-period-expanded{
  display:block!important;width:100%!important;min-height:100%!important;padding:16px!important;border-radius:12px!important;background:var(--surface2)!important
}
html.ts-phone-device.ts-landscape .student-session-card .mobile-period-expanded h3{font-size:20px!important;margin:0 0 13px!important}
html.ts-phone-device.ts-landscape .student-session-card .mobile-period-expanded .student-summary-metrics{display:grid!important;gap:9px!important}
html.ts-phone-device.ts-landscape .student-session-card .mobile-period-expanded .student-summary-metric{display:grid!important;grid-template-columns:90px 1fr!important;align-items:center!important;gap:12px!important;padding:10px!important;min-height:48px!important}
html.ts-phone-device.ts-landscape .student-session-card .mobile-period-expanded .student-summary-score{font-size:24px!important}
html.ts-phone-device.ts-landscape .student-session-card .mobile-period-expanded .student-summary-label{font-size:13px!important}
html.ts-phone-device.ts-landscape .student-session-card .mobile-period-expanded .summary-empty-message{display:block!important;font-size:16px!important}
html.ts-phone-device.ts-landscape .student-session-card .mobile-meter-expanded{
  display:grid!important;grid-template-columns:1fr 1fr!important;grid-template-rows:auto minmax(100px,1fr)!important;gap:14px!important;
  width:100%!important;min-height:200px!important;padding:18px!important
}
html.ts-phone-device.ts-landscape .student-session-card .mobile-meter-expanded .meter-name{grid-column:1/-1!important;font-size:21px!important;text-align:center!important}
html.ts-phone-device.ts-landscape .student-session-card .mobile-meter-expanded .meter-current,
html.ts-phone-device.ts-landscape .student-session-card .mobile-meter-expanded .meter-average{display:flex!important;align-items:center!important;justify-content:center!important;gap:12px!important}
html.ts-phone-device.ts-landscape .student-session-card .mobile-meter-expanded .meter-current b,
html.ts-phone-device.ts-landscape .student-session-card .mobile-meter-expanded .meter-average strong,
html.ts-phone-device.ts-landscape .student-session-card .mobile-meter-expanded .meter-average small,
html.ts-phone-device.ts-landscape .student-session-card .mobile-meter-expanded em{display:inline!important;font-size:18px!important}
html.ts-phone-device.ts-landscape .student-session-card .mobile-meter-expanded .meter-current b,
html.ts-phone-device.ts-landscape .student-session-card .mobile-meter-expanded .meter-average strong{font-size:42px!important}
html.ts-phone-device.ts-landscape .student-session-card .mobile-meter-expanded .meter-swatch{width:48px!important;height:48px!important}
html.ts-phone-device.ts-landscape .student-session-card .mobile-meter-expanded .meter-average-swatch{width:34px!important;height:34px!important}
html.ts-phone-device.ts-landscape .student-session-card .mobile-meter-events{display:block!important;width:100%!important;margin-top:10px!important}
html.ts-phone-device.ts-landscape .student-session-card .event-detail-modal:not([hidden]){display:grid!important;position:absolute!important;inset:0!important;z-index:120!important;padding:5px!important;background:rgba(4,12,24,.72)!important}
html.ts-phone-device.ts-landscape .student-session-card .event-detail-card{width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;border-radius:10px!important;overflow:hidden!important}
html.ts-phone-device.ts-landscape .student-session-card .event-detail-list{overflow-y:auto!important;touch-action:pan-y!important}

/* Portrait-only pages explain an accidental rotation; deliberate landscape
   workspaces and the class-plan fullscreen are exempt. */
html.ts-phone-device.ts-landscape body:not(.mobile-landscape-workspace).page-dashboard .mobile-orientation-guard,
html.ts-phone-device.ts-landscape body:not(.mobile-landscape-workspace).page-management .mobile-orientation-guard,
html.ts-phone-device.ts-landscape body:not(.mobile-landscape-workspace).page-absences .mobile-orientation-guard,
html.ts-phone-device.ts-landscape body:not(.mobile-landscape-workspace).page-events .mobile-orientation-guard,
html.ts-phone-device.ts-landscape body:not(.mobile-landscape-workspace).page-written .mobile-orientation-guard,
html.ts-phone-device.ts-landscape body:not(.mobile-landscape-workspace).page-schedule .mobile-orientation-guard{
  display:grid!important;place-content:center!important;gap:6px!important;position:fixed!important;inset:0!important;z-index:2147483600!important;
  padding:24px!important;text-align:center!important;background:var(--surface)!important;color:var(--ink)!important
}
html.ts-phone-device.ts-landscape .mobile-orientation-guard b{font-size:22px!important}
html.ts-phone-device.ts-landscape .mobile-orientation-guard span{font-size:13px!important;color:var(--muted)!important}

/* v73 phone classroom fill correction: older density layers capped the grid at
   240px and let the standing rail collapse to its content. */
html.ts-phone-device.ts-landscape .classroom:fullscreen .desk-grid,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .desk-grid{
  height:100%!important;max-height:none!important;align-content:stretch!important;align-self:stretch!important
}
html.ts-phone-device.ts-landscape .classroom:fullscreen .standing-area,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .standing-area{
  height:100%!important;max-height:none!important;align-self:stretch!important
}
html.ts-phone-device body.mobile-landscape-workspace .panel>.panel-head>.inline-actions:not(.mobile-landscape-actions),
html.ts-phone-device body.mobile-landscape-events #editEvents{display:none!important}


/* v73module-replace — phone-first authentication screen.
   This final layer is deliberately isolated to the public index page and to
   phone-width viewports, leaving tablet/desktop application screens intact. */
@media (max-width:600px) and (orientation:portrait){
  body.auth-login,
  body.auth-signup{
    width:100%!important;
    height:var(--auth-viewport-height,100svh)!important;
    min-height:0!important;
    overflow:hidden!important;
    overscroll-behavior:none!important;
    background:#eaf1f8!important;
  }

  body.auth-login .shell,
  body.auth-signup .shell{
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    padding:0!important;
    grid-template-columns:1fr!important;
    grid-template-rows:clamp(238px,37.5%,276px) minmax(0,1fr)!important;
    overflow:hidden!important;
  }

  body.auth-login .brand-panel,
  body.auth-signup .brand-panel{
    min-height:0!important;
    padding:64px 20px 12px!important;
    justify-content:flex-start!important;
    overflow:hidden!important;
    background:linear-gradient(145deg,#071b36,#0d3c76 70%,#1260b7)!important;
  }
  body.auth-login .brand-panel>*:not(.brand-mark),
  body.auth-signup .brand-panel>*:not(.brand-mark){position:relative;z-index:1}

  body.auth-login .brand-panel .brand-mark,
  body.auth-signup .brand-panel .brand-mark{
    position:absolute!important;
    top:max(14px,env(safe-area-inset-top))!important;
    left:max(20px,env(safe-area-inset-left))!important;
    z-index:3!important;
    width:44px!important;
    height:44px!important;
    margin:0!important;
    border-radius:14px!important;
    font-size:18px!important;
    line-height:1!important;
  }

  body.auth-login .auth-language,
  body.auth-signup .auth-language{
    position:fixed!important;
    top:max(14px,env(safe-area-inset-top))!important;
    right:max(20px,env(safe-area-inset-right))!important;
    z-index:60!important;
    width:128px!important;
    height:44px!important;
    margin:0!important;
    padding:0!important;
    background:#0b376b!important;
    border-radius:14px!important;
  }
  body.auth-login .auth-language .language-switcher,
  body.auth-signup .auth-language .language-switcher{
    --ts-lang-bg:#0b376b!important;
    --ts-lang-border:rgba(255,255,255,.34)!important;
    --ts-lang-text:#fff!important;
    --ts-lang-muted:#dbeafe!important;
    display:flex!important;
    width:128px!important;
    min-width:128px!important;
    max-width:128px!important;
    height:44px!important;
    min-height:44px!important;
    padding:0 8px!important;
    gap:0!important;
    overflow:hidden!important;
    border-radius:14px!important;
    background:#0b376b!important;
    border:1px solid rgba(255,255,255,.34)!important;
    box-shadow:none!important;
  }
  body.auth-login .auth-language .language-quick,
  body.auth-signup .auth-language .language-quick{display:none!important}
  body.auth-login .auth-language .language-select-wrap,
  body.auth-signup .auth-language .language-select-wrap{
    display:flex!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:100%!important;
  }
  body.auth-login .auth-language .language-select,
  body.auth-signup .auth-language .language-select{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:42px!important;
    min-height:42px!important;
    padding:0 24px 0 8px!important;
    border:0!important;
    border-left:0!important;
    border-radius:0!important;
    background:#0b376b!important;
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
    color-scheme:dark!important;
    font-size:13px!important;
    font-weight:800!important;
    text-overflow:ellipsis!important;
  }
  body.auth-login .auth-language .language-select option,
  body.auth-signup .auth-language .language-select option{
    background:#fff!important;
    color:#10233e!important;
    -webkit-text-fill-color:#10233e!important;
  }
  body.auth-login .auth-language .language-arrow,
  body.auth-signup .auth-language .language-arrow{
    right:7px!important;
    color:#dbeafe!important;
    font-size:10px!important;
  }

  body.auth-login .brand-panel .eyebrow,
  body.auth-signup .brand-panel .eyebrow{
    margin:0 0 7px!important;
    font-size:10px!important;
    line-height:1.15!important;
    letter-spacing:.17em!important;
  }
  body.auth-login .brand-panel h1,
  body.auth-signup .brand-panel h1{
    margin:0 0 8px!important;
    max-width:none!important;
    font-size:clamp(25px,7vw,29px)!important;
    line-height:1.04!important;
    letter-spacing:-.025em!important;
  }
  body.auth-login .brand-panel>p:not(.eyebrow),
  body.auth-signup .brand-panel>p:not(.eyebrow){
    margin:0 0 7px!important;
    max-width:none!important;
    font-size:13px!important;
    line-height:1.32!important;
    color:#e1ecfa!important;
  }
  body.auth-login .brand-panel .feature,
  body.auth-signup .brand-panel .feature{
    display:flex!important;
    align-items:center!important;
    min-width:0!important;
    margin:3px 0!important;
    color:#f4f8ff!important;
    font-size:11.5px!important;
    line-height:1.15!important;
    white-space:nowrap!important;
  }
  body.auth-login .brand-panel .feature span,
  body.auth-signup .brand-panel .feature span{
    flex:0 0 18px!important;
    width:18px!important;
    height:18px!important;
    margin-right:7px!important;
    font-size:11px!important;
  }

  body.auth-login .auth-panel,
  body.auth-signup .auth-panel{
    min-height:0!important;
    overflow:hidden!important;
    padding:12px 20px max(16px,env(safe-area-inset-bottom))!important;
    justify-content:flex-start!important;
    background:#fff!important;
  }
  body.auth-login .tabs,
  body.auth-signup .tabs{
    min-height:42px!important;
    margin:0 0 11px!important;
    padding-top:1px!important;
    background:#fff!important;
  }
  body.auth-login .tab,
  body.auth-signup .tab{
    flex:1 1 50%!important;
    min-height:41px!important;
    padding:8px 10px!important;
    font-size:16px!important;
  }

  body.auth-login #loginForm{
    width:100%!important;
    max-width:none!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    gap:8px!important;
    overflow:visible!important;
  }
  body.auth-login #loginForm>div:first-child{display:grid!important;gap:2px!important}
  body.auth-login #loginForm .eyebrow.dark{
    margin:0!important;
    font-size:9.5px!important;
    line-height:1.15!important;
  }
  body.auth-login #loginForm h2{
    margin:0!important;
    font-size:clamp(21px,6vw,25px)!important;
    line-height:1.08!important;
    letter-spacing:-.02em!important;
  }
  body.auth-login #loginForm .muted{
    margin:0!important;
    font-size:12px!important;
    line-height:1.2!important;
    white-space:nowrap!important;
  }
  body.auth-login #loginForm label{
    gap:4px!important;
    font-size:12.5px!important;
    line-height:1.15!important;
  }
  body.auth-login #loginForm input{
    height:42px!important;
    min-height:42px!important;
    padding:8px 12px!important;
    border-radius:12px!important;
    font-size:16px!important;
  }
  body.auth-login #loginForm .password-wrap input{padding-right:88px!important}
  body.auth-login #loginForm .show-password{
    top:5px!important;
    right:5px!important;
    height:32px!important;
    padding:5px 9px!important;
    font-size:11px!important;
  }
  body.auth-login #loginForm .primary{
    width:100%!important;
    min-height:43px!important;
    height:43px!important;
    margin-top:1px!important;
    padding:8px 16px!important;
    border-radius:12px!important;
    font-size:14px!important;
    box-shadow:0 8px 18px rgba(26,102,255,.2)!important;
  }
  body.auth-login #loginForm .signup-prompt{
    margin:0!important;
    font-size:10.5px!important;
    line-height:1.15!important;
  }

  body.auth-signup #signupForm{
    overflow-y:auto!important;
    overflow-x:hidden!important;
    touch-action:pan-y!important;
    overscroll-behavior:contain!important;
    padding:0 3px max(20px,env(safe-area-inset-bottom)) 0!important;
  }

  body.auth-keyboard-open .shell{
    grid-template-rows:0 minmax(0,1fr)!important;
  }
  body.auth-keyboard-open .brand-panel{
    visibility:hidden!important;
    pointer-events:none!important;
  }
  body.auth-keyboard-open .auth-language{display:none!important}
  body.auth-keyboard-open .auth-panel{
    overflow-y:auto!important;
    touch-action:pan-y!important;
    padding-top:8px!important;
  }
}

@media (max-width:600px) and (orientation:portrait) and (max-height:700px){
  body.auth-login .shell,
  body.auth-signup .shell{grid-template-rows:clamp(222px,35%,245px) minmax(0,1fr)!important}
  body.auth-login .brand-panel,
  body.auth-signup .brand-panel{padding:54px 18px 8px!important}
  body.auth-login .brand-panel .brand-mark,
  body.auth-signup .brand-panel .brand-mark,
  body.auth-login .auth-language,
  body.auth-signup .auth-language{top:max(8px,env(safe-area-inset-top))!important}
  body.auth-login .brand-panel h1,
  body.auth-signup .brand-panel h1{font-size:23px!important;margin-bottom:5px!important}
  body.auth-login .brand-panel>p:not(.eyebrow),
  body.auth-signup .brand-panel>p:not(.eyebrow){font-size:11.5px!important;line-height:1.2!important;margin-bottom:4px!important}
  body.auth-login .brand-panel .feature,
  body.auth-signup .brand-panel .feature{font-size:10px!important;margin:2px 0!important}
  body.auth-login .brand-panel .feature span,
  body.auth-signup .brand-panel .feature span{width:16px!important;height:16px!important;flex-basis:16px!important}
}

@media (max-width:600px) and (orientation:portrait) and (max-height:650px){
  body.auth-login .auth-panel,
  body.auth-signup .auth-panel{padding-top:8px!important}
  body.auth-login .tabs,
  body.auth-signup .tabs{min-height:36px!important;margin-bottom:6px!important}
  body.auth-login .tab,
  body.auth-signup .tab{min-height:35px!important;padding:5px 8px!important;font-size:14px!important}
  body.auth-login #loginForm{gap:5px!important}
  body.auth-login #loginForm .eyebrow.dark{display:none!important}
  body.auth-login #loginForm h2{font-size:20px!important;white-space:nowrap!important}
  body.auth-login #loginForm input{height:38px!important;min-height:38px!important}
  body.auth-login #loginForm .show-password{height:28px!important;top:5px!important}
  body.auth-login #loginForm .primary{height:39px!important;min-height:39px!important}
  body.auth-login #loginForm .signup-prompt{display:none!important}
}

@supports not (height:100svh){
  @media (max-width:600px) and (orientation:portrait){
    body.auth-login,
    body.auth-signup{height:var(--auth-viewport-height,100vh)!important}
  }
}

/* v73 module replacement 2 — mobile auth language selector: suppress the
   browser's persistent blue focus ring after a translated language is chosen. */
@media (max-width:720px){
  body.auth-login .auth-language .language-select,
  body.auth-signup .auth-language .language-select,
  body.auth-login .auth-language .language-select:focus,
  body.auth-signup .auth-language .language-select:focus,
  body.auth-login .auth-language .language-select:focus-visible,
  body.auth-signup .auth-language .language-select:focus-visible,
  body.auth-login .auth-language .language-select:active,
  body.auth-signup .auth-language .language-select:active{
    outline:0!important;
    outline-offset:0!important;
    box-shadow:none!important;
    -webkit-tap-highlight-color:transparent!important;
  }
  body.auth-login .auth-language .language-select-wrap:focus-within,
  body.auth-signup .auth-language .language-select-wrap:focus-within{
    outline:0!important;
    box-shadow:none!important;
  }
}

/* v73 module replacement 3 — phone dashboard and roster import refinements. */
@media (max-width:600px) and (pointer:coarse){
  html.ts-phone-device body.page-dashboard{
    min-height:100dvh!important;
    height:100dvh!important;
    overflow:hidden!important;
  }
  html.ts-phone-device body.page-dashboard>.topbar{
    --mobile-control-bg:var(--surface,#f8fafc);
    --mobile-control-border:var(--line,#d8e1ec);
    flex:0 0 auto!important;
  }
  html.ts-phone-device body.page-dashboard>.topbar .language-switcher,
  html.ts-phone-device body.page-dashboard>.topbar .language-select-wrap,
  html.ts-phone-device body.page-dashboard>.topbar .language-select,
  html.ts-phone-device body.page-dashboard>.topbar .theme-toggle{
    background:var(--mobile-control-bg)!important;
    border-color:var(--mobile-control-border)!important;
    box-shadow:none!important;
  }
  html.ts-phone-device body.page-dashboard>.topbar .language-switcher{
    overflow:hidden!important;
    border:1px solid var(--mobile-control-border)!important;
  }
  html.ts-phone-device body.page-dashboard>.topbar .language-select-wrap{
    border:0!important;
    outline:0!important;
  }
  html.ts-phone-device body.page-dashboard>.topbar .language-select{
    border:0!important;
    outline:0!important;
    appearance:none!important;
    -webkit-appearance:none!important;
  }
  html.ts-phone-device body.page-dashboard>.topbar .language-select:focus,
  html.ts-phone-device body.page-dashboard>.topbar .language-select:focus-visible,
  html.ts-phone-device body.page-dashboard>.topbar .language-select-wrap:focus-within{
    outline:0!important;
    box-shadow:none!important;
  }
  html.ts-phone-device body.page-dashboard.dark>.topbar{
    --mobile-control-bg:#142238;
    --mobile-control-border:#324762;
  }
  html.ts-phone-device body.page-dashboard .app-shell{
    min-height:0!important;
    height:calc(100dvh - var(--mobile-topbar-height,60px))!important;
    overflow:hidden!important;
  }
  html.ts-phone-device body.page-dashboard .dashboard-main{
    height:100%!important;
    min-height:0!important;
    overflow:hidden!important;
    padding:12px 10px 10px!important;
    gap:8px!important;
  }
  html.ts-phone-device body.page-dashboard .welcome{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 72px!important;
    gap:10px!important;
    align-items:start!important;
    padding-top:0!important;
    margin:0 0 2px!important;
  }
  html.ts-phone-device body.page-dashboard .welcome-copy{
    min-width:0!important;
    display:grid!important;
    align-content:start!important;
    row-gap:3px!important;
  }
  html.ts-phone-device body.page-dashboard .welcome .eyebrow{
    margin:0 0 4px!important;
    line-height:1.15!important;
  }
  html.ts-phone-device body.page-dashboard .welcome h1{
    margin:0 0 4px!important;
    line-height:1.06!important;
  }
  html.ts-phone-device body.page-dashboard .teacher-context{
    display:flex!important;
    align-items:baseline!important;
    flex-wrap:wrap!important;
    gap:0!important;
    margin:0!important;
    font-size:11.5px!important;
    line-height:1.28!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }
  html.ts-phone-device body.page-dashboard .teacher-school{
    flex-basis:100%!important;
    padding-left:0!important;
  }
  html.ts-phone-device body.page-dashboard .teacher-school>span{
    display:none!important;
  }
  html.ts-phone-device body.page-dashboard .date-card{
    align-self:start!important;
    margin-top:0!important;
    min-height:58px!important;
    height:58px!important;
  }
  html.ts-phone-device body.page-dashboard .quick-grid{
    gap:7px!important;
    margin:0!important;
  }
  html.ts-phone-device body.page-dashboard .quick-grid>*{
    min-height:52px!important;
    height:52px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:7px 8px!important;
  }
  html.ts-phone-device body.page-dashboard .quick-grid>:not(.primary-action)>span{
    font-size:12.5px!important;
    line-height:1.15!important;
    font-weight:800!important;
    text-align:center!important;
  }
  html.ts-phone-device body.page-dashboard .quick-grid .primary-action{
    min-height:56px!important;
    height:56px!important;
  }
  html.ts-phone-device body.page-dashboard .stats{
    gap:7px!important;
    margin:0!important;
  }
  html.ts-phone-device body.page-dashboard .stats article{
    min-height:50px!important;
    height:50px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    padding:8px 11px!important;
  }
  html.ts-phone-device body.page-dashboard .stats small{
    font-size:12.5px!important;
    line-height:1!important;
    font-weight:800!important;
  }
  html.ts-phone-device body.page-dashboard .stats strong{
    font-size:21px!important;
    line-height:1!important;
  }
  html.ts-phone-device body.page-dashboard .stat-card.active{
    background:color-mix(in srgb,var(--accent) 10%,var(--surface) 90%)!important;
    border-color:var(--accent)!important;
  }
  html.ts-phone-device body.page-dashboard .dashboard-compact-panel{
    min-height:0!important;
    max-height:calc(100% - 326px)!important;
    overflow:auto!important;
    overscroll-behavior:contain!important;
    padding:10px!important;
    margin:0!important;
  }
  html.ts-phone-device body.page-dashboard .dashboard-compact-panel .panel-head{
    margin:0 0 7px!important;
  }
  html.ts-phone-device body.page-dashboard .dashboard-compact-panel .panel-head h2{
    font-size:19px!important;
  }
  html.ts-phone-device body.page-dashboard .dashboard-panel-close{
    display:none!important;
  }
  html.ts-phone-device body.page-dashboard .compact-records article{
    min-height:44px!important;
    padding:8px 10px!important;
  }
  html.ts-phone-device body.page-dashboard .compact-records article b{
    font-size:12.5px!important;
    line-height:1.25!important;
  }
  html.ts-phone-device body.page-dashboard .compact-records article span{
    font-size:10.5px!important;
  }

  html.ts-phone-device body.page-roster-import>.topbar{display:none!important}
  html.ts-phone-device body.page-roster-import .roster-page{
    padding-top:max(10px,env(safe-area-inset-top))!important;
  }
  html.ts-phone-device body.page-roster-import .mobile-title-card{
    position:relative!important;
    padding-right:54px!important;
  }
  html.ts-phone-device body.page-roster-import .mobile-page-back{
    display:grid!important;
    place-items:center!important;
    position:absolute!important;
    top:10px!important;
    right:10px!important;
  }
}

/* Full-screen phone student roster. It is intentionally landscape-only and
   uses a fixed table layout so no horizontal scroll is needed. */
html.ts-phone-device .mobile-student-roster:fullscreen,
html.ts-phone-device body.mobile-dashboard-roster-open .mobile-student-roster{
  position:fixed!important;
  inset:0!important;
  z-index:10050!important;
  display:flex!important;
  flex-direction:column!important;
  width:100vw!important;
  height:100dvh!important;
  max-width:none!important;
  max-height:none!important;
  padding:max(8px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))!important;
  background:var(--surface,#fff)!important;
  color:var(--text,#10233f)!important;
  overflow:hidden!important;
}
html.ts-phone-device .mobile-student-roster>header{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  flex:0 0 auto!important;
  min-height:42px!important;
  border-bottom:1px solid var(--line)!important;
}
html.ts-phone-device .mobile-student-roster>header h2{margin:0!important;font-size:20px!important}
html.ts-phone-device .mobile-student-roster>header .icon-btn{width:38px!important;height:38px!important;min-width:38px!important;font-size:24px!important}
html.ts-phone-device .mobile-roster-scroll{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  -webkit-overflow-scrolling:touch!important;
  padding-bottom:max(8px,env(safe-area-inset-bottom))!important;
}
html.ts-phone-device .mobile-student-roster table{
  width:100%!important;
  min-width:0!important;
  table-layout:fixed!important;
  border-collapse:collapse!important;
}
html.ts-phone-device .mobile-student-roster th,
html.ts-phone-device .mobile-student-roster td{
  padding:5px 4px!important;
  border-bottom:1px solid var(--line)!important;
  vertical-align:top!important;
  font-size:clamp(7px,1.7vw,10px)!important;
  line-height:1.18!important;
  overflow-wrap:anywhere!important;
  white-space:normal!important;
}
html.ts-phone-device .mobile-student-roster th{position:sticky!important;top:0!important;z-index:2!important;background:var(--surface,#fff)!important;text-align:left!important}
html.ts-phone-device .mobile-student-roster th:nth-child(1),html.ts-phone-device .mobile-student-roster td:nth-child(1){width:21%!important}
html.ts-phone-device .mobile-student-roster th:nth-child(2),html.ts-phone-device .mobile-student-roster td:nth-child(2){width:9%!important}
html.ts-phone-device .mobile-student-roster th:nth-child(3),html.ts-phone-device .mobile-student-roster td:nth-child(3){width:13%!important}
html.ts-phone-device .mobile-student-roster th:nth-child(4),html.ts-phone-device .mobile-student-roster td:nth-child(4){width:7%!important;text-align:center!important}
html.ts-phone-device .mobile-student-roster th:nth-child(5),html.ts-phone-device .mobile-student-roster td:nth-child(5){width:10%!important}
html.ts-phone-device .mobile-student-roster th:nth-child(6),html.ts-phone-device .mobile-student-roster td:nth-child(6){width:10%!important;text-align:center!important}
html.ts-phone-device .mobile-student-roster th:nth-child(7),html.ts-phone-device .mobile-student-roster td:nth-child(7){width:30%!important}
html.ts-phone-device .mobile-student-roster .student-last,
html.ts-phone-device .mobile-student-roster .student-first{display:block!important;font-weight:800!important}
html.ts-phone-device .mobile-student-roster .oral-dot{display:inline-block!important;width:9px!important;height:9px!important;border-radius:50%!important;background:#2483ff!important;border:1px solid #000!important}

/* v73 module replacement 5 — phone dashboard spacing, reliable compact
   panels, drawer typography and work-date badge. Desktop/tablet untouched. */
@media (max-width:600px) and (pointer:coarse){
  html.ts-phone-device body.page-dashboard .sidebar{
    justify-content:flex-start!important;
    align-content:start!important;
  }
  html.ts-phone-device body.page-dashboard .sidebar nav{
    flex:0 0 auto!important;
  }
  html.ts-phone-device body.page-dashboard .sidebar a,
  html.ts-phone-device body.page-dashboard .sidebar button.sidebar-search-trigger,
  html.ts-phone-device body.page-dashboard .sidebar .logout{
    font-size:16px!important;
    line-height:1.2!important;
    min-height:42px!important;
    padding:10px 12px!important;
    font-weight:400!important;
  }
  html.ts-phone-device body.page-dashboard .sidebar .logout{
    margin-top:4px!important;
    flex:0 0 auto!important;
  }

  html.ts-phone-device body.page-dashboard .welcome{
    margin-bottom:12px!important;
  }
  html.ts-phone-device body.page-dashboard .quick-grid{
    row-gap:9px!important;
    column-gap:8px!important;
    margin-bottom:13px!important;
  }
  html.ts-phone-device body.page-dashboard .quick-grid .primary-action{
    margin-top:3px!important;
  }
  html.ts-phone-device body.page-dashboard .stats{
    row-gap:9px!important;
    column-gap:8px!important;
  }

  html.ts-phone-device body.page-dashboard .context-date-card.status-shifted{
    min-height:74px!important;
    height:74px!important;
    padding:6px 4px!important;
    align-content:center!important;
  }
  html.ts-phone-device body.page-dashboard .context-date-card.status-shifted em{
    display:block!important;
    width:100%!important;
    max-width:66px!important;
    white-space:normal!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
    line-height:1.08!important;
    font-size:6.6px!important;
    letter-spacing:.04em!important;
    margin-top:3px!important;
    text-align:center!important;
  }

  html.ts-phone-device body.page-dashboard .dashboard-compact-panel[hidden],
  html.ts-phone-device body.page-dashboard .compact-records[hidden],
  html.ts-phone-device body.page-dashboard .mobile-student-roster[hidden]{
    display:none!important;
  }
  html.ts-phone-device body.page-dashboard .dashboard-compact-panel:not([hidden]){
    display:block!important;
    margin-top:1px!important;
    border-radius:14px!important;
  }
  html.ts-phone-device body.page-dashboard .compact-records:not([hidden]){
    display:block!important;
  }
  html.ts-phone-device body.page-dashboard .compact-records article{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    min-height:0!important;
    padding:7px 4px!important;
    border:0!important;
    border-bottom:1px solid var(--line)!important;
    border-radius:0!important;
    background:transparent!important;
    gap:1px!important;
  }
  html.ts-phone-device body.page-dashboard .compact-records article:last-child{
    border-bottom:0!important;
  }
  html.ts-phone-device body.page-dashboard .compact-records article b{
    font-size:13px!important;
    line-height:1.25!important;
  }
  html.ts-phone-device body.page-dashboard .compact-records article span{
    font-size:11px!important;
    line-height:1.2!important;
  }
  html.ts-phone-device body.page-dashboard .dashboard-compact-panel .panel-head{
    min-height:34px!important;
    margin-bottom:3px!important;
  }

  html.ts-phone-device .mobile-student-roster:not([hidden]){
    display:flex!important;
  }
  html.ts-phone-device .mobile-student-roster tbody{
    display:table-row-group!important;
  }
  html.ts-phone-device .mobile-student-roster tr{
    display:table-row!important;
  }
  html.ts-phone-device .mobile-student-roster td,
  html.ts-phone-device .mobile-student-roster th{
    color:var(--ink)!important;
  }
}

/* v73 module replacement 7 — ordered academic lists, sortable roster and
   consistent account controls. */
.dashboard-roster[hidden]{display:none!important}
.dashboard-roster:not([hidden]){display:flex;flex-direction:column;min-height:0}
.dashboard-roster>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.dashboard-roster>header h2{margin:0}
.dashboard-roster-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:12px}
.dashboard-roster-table th,.dashboard-roster-table td{padding:7px 8px;border-bottom:1px solid var(--line);vertical-align:top;white-space:normal;overflow-wrap:anywhere}
.dashboard-roster-table th{background:var(--surface2);position:sticky;top:0;z-index:2;text-align:left}
.dashboard-roster-table th button{border:0;background:transparent;color:inherit;font:inherit;font-weight:800;padding:0;cursor:pointer;text-align:left;white-space:nowrap}
.dashboard-roster-table th button[data-sort-direction="asc"]::after{content:" ↑"}
.dashboard-roster-table th button[data-sort-direction="desc"]::after{content:" ↓"}
.dashboard-roster-table th:nth-child(1),.dashboard-roster-table td:nth-child(1){width:18%}
.dashboard-roster-table th:nth-child(2),.dashboard-roster-table td:nth-child(2){width:13%}
.dashboard-roster-table th:nth-child(3),.dashboard-roster-table td:nth-child(3){width:12%}
.dashboard-roster-table th:nth-child(4),.dashboard-roster-table td:nth-child(4){width:7%;text-align:center}
.dashboard-roster-table th:nth-child(5),.dashboard-roster-table td:nth-child(5){width:9%}
.dashboard-roster-table th:nth-child(6),.dashboard-roster-table td:nth-child(6){width:9%;text-align:center}
.dashboard-roster-table th:nth-child(7),.dashboard-roster-table td:nth-child(7){width:32%}
.dashboard-roster-table .student-last,.dashboard-roster-table .student-first{display:block;font-weight:800}
.dashboard-roster-table .oral-dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:#2483ff;border:1px solid #000}

.custom-file-picker{position:relative;display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:center;gap:10px;width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface2);overflow:hidden}
.custom-file-picker input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.custom-file-button{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:7px 11px;border:1px solid var(--line);border-radius:8px;background:var(--surface);font-weight:750;color:var(--ink)}
.custom-file-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-weight:650}

@media (max-width:600px) and (pointer:coarse){
  html.ts-phone-device body:not(.page-dashboard)>.topbar .language-switcher,
  html.ts-phone-device body:not(.page-dashboard)>.topbar .language-select-wrap,
  html.ts-phone-device body:not(.page-dashboard)>.topbar .language-select{
    background:var(--surface2)!important;
    border-color:var(--line)!important;
    box-shadow:none!important;
  }
  html.ts-phone-device body:not(.page-dashboard)>.topbar .language-switcher{
    width:min(100%,310px)!important;min-width:0!important;max-width:310px!important;padding:0!important;overflow:hidden!important;
  }
  html.ts-phone-device body:not(.page-dashboard)>.topbar .language-select-wrap{width:100%!important;min-width:0!important;border:0!important}
  html.ts-phone-device body:not(.page-dashboard)>.topbar .language-select{width:100%!important;min-width:0!important;outline:0!important;border:0!important}
  html.ts-phone-device body:not(.page-dashboard)>.topbar .language-select:focus{outline:0!important;box-shadow:none!important}

  html.ts-phone-device .mobile-student-roster th:nth-child(1),html.ts-phone-device .mobile-student-roster td:nth-child(1){width:18%!important}
  html.ts-phone-device .mobile-student-roster th:nth-child(2),html.ts-phone-device .mobile-student-roster td:nth-child(2){width:13%!important}
  html.ts-phone-device .mobile-student-roster th:nth-child(3),html.ts-phone-device .mobile-student-roster td:nth-child(3){width:11%!important}
  html.ts-phone-device .mobile-student-roster th:nth-child(4),html.ts-phone-device .mobile-student-roster td:nth-child(4){width:6%!important}
  html.ts-phone-device .mobile-student-roster th:nth-child(5),html.ts-phone-device .mobile-student-roster td:nth-child(5){width:8%!important}
  html.ts-phone-device .mobile-student-roster th:nth-child(6),html.ts-phone-device .mobile-student-roster td:nth-child(6){width:9%!important}
  html.ts-phone-device .mobile-student-roster th:nth-child(7),html.ts-phone-device .mobile-student-roster td:nth-child(7){width:35%!important}
  html.ts-phone-device .mobile-student-roster th button{font-size:inherit!important;white-space:normal!important;line-height:1.05!important}
  html.ts-phone-device .mobile-student-roster td:nth-child(2){overflow-wrap:normal!important;word-break:normal!important}
  html.ts-phone-device .mobile-student-roster td:nth-child(7){overflow-wrap:anywhere!important}
  html.ts-phone-device .custom-file-picker{grid-template-columns:1fr;gap:5px;padding:8px}
  html.ts-phone-device .custom-file-button{width:100%}
  html.ts-phone-device .custom-file-name{text-align:center;white-space:normal;overflow-wrap:anywhere}
}


/* v73 module 8: compact account language control on phones */
@media (max-width:600px) and (pointer:coarse){
  html.ts-phone-device body.page-account>.topbar{
    grid-template-columns:auto minmax(0,1fr) auto!important;
  }
  html.ts-phone-device body.page-account>.topbar .top-actions{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 38px!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
  }
  html.ts-phone-device body.page-account>.topbar .language-switcher{
    width:min(46vw,176px)!important;
    max-width:176px!important;
    min-width:124px!important;
    justify-self:end!important;
    margin:0!important;
  }
  html.ts-phone-device body.page-account>.topbar .language-select-wrap,
  html.ts-phone-device body.page-account>.topbar .language-select{
    width:100%!important;
    max-width:100%!important;
  }
  html.ts-phone-device body.page-account>.topbar .theme-toggle{display:none!important}
}

/* v73 module 9: dashboard roster polish, sortable headers and stable desktop shell */
.dashboard-roster-table th button[data-roster-sort]::after{
  content:" ↕";
  display:inline-block;
  margin-left:3px;
  color:var(--muted);
  font-weight:800;
  line-height:1;
}
.dashboard-roster-table th button[data-sort-direction="asc"]::after{content:" ↑";color:var(--accent)}
.dashboard-roster-table th button[data-sort-direction="desc"]::after{content:" ↓";color:var(--accent)}

@media (min-width:721px){
  body.page-dashboard{height:100%;min-height:100%;overflow:hidden!important}
  body.page-dashboard>.topbar{height:72px;min-height:72px}
  body.page-dashboard .app-shell{
    height:calc(100dvh - 72px)!important;
    min-height:0!important;
    overflow:hidden!important;
    align-items:stretch;
  }
  body.page-dashboard .sidebar{
    position:sticky!important;
    top:0!important;
    height:calc(100dvh - 72px)!important;
    min-height:0!important;
    overflow:hidden!important;
    align-self:start;
  }
  body.page-dashboard .dashboard-main{
    height:100%!important;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior-y:contain;
    scrollbar-gutter:auto!important;
  }
  body.page-dashboard .dashboard-roster>header{display:none!important}
  body.page-dashboard .dashboard-compact-panel>.panel-head{
    margin-bottom:8px;
  }
  body.page-dashboard .dashboard-compact-panel>.panel-head h2{
    margin:0!important;
  }
  body.page-dashboard .mobile-roster-scroll{
    overflow:visible!important;
    max-height:none!important;
  }
  body.page-dashboard .dashboard-roster-table{
    table-layout:fixed!important;
  }
}


/* v73 module 10: keep the dashboard hero at the top after the legacy
   assignments block was removed. The old margin:auto could vertically
   center short dashboard content inside the fixed shell. */
body.page-dashboard .dashboard-main{
  margin:0 auto!important;
  align-self:start!important;
}

/* ========================================================================
   v74complete-standard — stable student workflows and phone classroom UI
   This final layer intentionally overrides the experimental v73 phone rules
   without changing the desktop/tablet information architecture.
   ======================================================================== */

/* New-student dialog: compact at normal desktop/tablet heights and scrollable
   only as a last resort on exceptionally short viewports. */
.new-student-modal-card{
  width:min(760px,calc(100vw - 28px))!important;
  max-height:calc(var(--ts-visual-height,100dvh) - 18px)!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  padding:16px 18px!important;
}
.new-student-modal-card>h2{margin:0 42px 10px 0!important;font-size:21px!important;line-height:1.2!important}
.new-student-modal-card>.modal-close{top:7px!important;right:11px!important}
#newStudentForm{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px 12px!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable!important;
  padding:1px 4px 1px 1px!important;
}
#newStudentForm label{gap:3px!important;font-size:11px!important;line-height:1.2!important}
#newStudentForm input,
#newStudentForm select{min-height:36px!important;height:36px!important;padding:6px 9px!important;font-size:12px!important}
#newStudentForm textarea{min-height:48px!important;height:48px!important;padding:6px 9px!important;font-size:12px!important;resize:vertical!important}
#newStudentForm .inline-actions{gap:7px!important;margin-top:0!important}
#newStudentForm .inline-actions button{min-height:34px!important;padding:6px 11px!important;font-size:11px!important}
#newStudentMessage{min-height:0!important;margin:0!important;font-size:10px!important}
#assignExistingWorksWrap:not([hidden]){
  display:grid!important;
  grid-template-columns:minmax(190px,1fr) minmax(180px,1fr)!important;
  align-items:center!important;
  gap:4px 10px!important;
  padding:8px 10px!important;
}
#assignExistingWorksWrap>select{width:100%!important}
#assignExistingWorksWrap>small{grid-column:1/-1!important;margin:0!important;line-height:1.2!important;font-size:9.5px!important}
@media(max-width:700px){
  .new-student-modal-card{width:calc(100vw - 10px)!important;padding:12px!important}
  #newStudentForm{grid-template-columns:1fr!important;gap:6px!important}
}

/* Shared phone roster workspace used from students.php and roster-import.php. */
.mobile-only-action,.mobile-roster-workspace{display:none}
html.ts-phone-device .mobile-only-action{display:inline-flex!important}
html.ts-phone-device body.mobile-roster-workspace-open{overflow:hidden!important;touch-action:none!important}
html.ts-phone-device .mobile-roster-workspace:not([hidden]){
  position:fixed!important;
  inset:0!important;
  z-index:2147483500!important;
  display:flex!important;
  flex-direction:column!important;
  width:100vw!important;
  height:var(--ts-visual-height,100dvh)!important;
  min-width:0!important;
  min-height:0!important;
  padding:max(5px,env(safe-area-inset-top)) max(7px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(7px,env(safe-area-inset-left))!important;
  background:var(--surface)!important;
  color:var(--ink)!important;
  overflow:hidden!important;
}
html.ts-phone-device .mobile-roster-head{
  flex:0 0 auto!important;
  min-height:40px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  padding:0 2px 5px!important;
  border-bottom:1px solid var(--line)!important;
}
html.ts-phone-device .mobile-roster-head h2{margin:0!important;font-size:19px!important;line-height:1!important}
html.ts-phone-device .mobile-roster-head-actions{display:flex!important;gap:5px!important}
html.ts-phone-device .mobile-roster-head .icon-btn{width:34px!important;height:34px!important;min-width:34px!important;border-radius:9px!important;font-size:20px!important}
html.ts-phone-device .mobile-roster-action-menu{
  position:absolute!important;
  top:max(45px,calc(env(safe-area-inset-top) + 42px))!important;
  right:max(7px,env(safe-area-inset-right))!important;
  z-index:5!important;
  display:grid!important;
  width:154px!important;
  gap:5px!important;
  padding:7px!important;
  border:1px solid var(--line)!important;
  border-radius:12px!important;
  background:var(--surface)!important;
  box-shadow:0 14px 34px rgba(0,0,0,.2)!important;
}
html.ts-phone-device .mobile-roster-action-menu[hidden]{display:none!important}
html.ts-phone-device .mobile-roster-action-menu button{min-height:34px!important;padding:6px 9px!important;font-size:11px!important}
html.ts-phone-device .mobile-roster-scroll{
  flex:1 1 auto!important;
  min-height:0!important;
  width:100%!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior:contain!important;
  touch-action:pan-y!important;
  scrollbar-gutter:stable!important;
}
html.ts-phone-device .mobile-roster-table{
  width:100%!important;
  min-width:0!important;
  table-layout:fixed!important;
  border-collapse:collapse!important;
  border-spacing:0!important;
}
html.ts-phone-device .mobile-roster-table th,
html.ts-phone-device .mobile-roster-table td{
  min-width:0!important;
  padding:4px 3px!important;
  border-bottom:1px solid var(--line)!important;
  color:var(--ink)!important;
  font-size:clamp(7.3px,1.15vw,9.5px)!important;
  line-height:1.16!important;
  vertical-align:top!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
}
html.ts-phone-device .mobile-roster-table th{
  position:sticky!important;
  top:0!important;
  z-index:2!important;
  padding-top:5px!important;
  padding-bottom:5px!important;
  background:var(--surface2)!important;
  text-align:left!important;
}
html.ts-phone-device .mobile-roster-table th button{
  display:inline-flex!important;
  align-items:center!important;
  gap:2px!important;
  width:auto!important;
  max-width:100%!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:var(--ink)!important;
  font:inherit!important;
  font-weight:900!important;
  text-align:left!important;
  cursor:pointer!important;
}
html.ts-phone-device .mobile-roster-table th button span{flex:0 0 auto!important;color:var(--accent)!important}
html.ts-phone-device .mobile-roster-table th:nth-child(1),html.ts-phone-device .mobile-roster-table td:nth-child(1){width:20%!important}
html.ts-phone-device .mobile-roster-table th:nth-child(2),html.ts-phone-device .mobile-roster-table td:nth-child(2){width:14%!important}
html.ts-phone-device .mobile-roster-table th:nth-child(3),html.ts-phone-device .mobile-roster-table td:nth-child(3){width:12%!important}
html.ts-phone-device .mobile-roster-table th:nth-child(4),html.ts-phone-device .mobile-roster-table td:nth-child(4){width:7%!important;text-align:center!important}
html.ts-phone-device .mobile-roster-table th:nth-child(5),html.ts-phone-device .mobile-roster-table td:nth-child(5){width:10%!important}
html.ts-phone-device .mobile-roster-table th:nth-child(6),html.ts-phone-device .mobile-roster-table td:nth-child(6){width:10%!important;text-align:center!important}
html.ts-phone-device .mobile-roster-table th:nth-child(7),html.ts-phone-device .mobile-roster-table td:nth-child(7){width:27%!important}
html.ts-phone-device .mobile-roster-table th:nth-child(8),html.ts-phone-device .mobile-roster-table td:nth-child(8){width:0!important;padding-left:0!important;padding-right:0!important;overflow:visible!important}
html.ts-phone-device .mobile-roster-workspace.is-editing .mobile-roster-table th:nth-child(1),html.ts-phone-device .mobile-roster-workspace.is-editing .mobile-roster-table td:nth-child(1){width:18%!important}
html.ts-phone-device .mobile-roster-workspace.is-editing .mobile-roster-table th:nth-child(2),html.ts-phone-device .mobile-roster-workspace.is-editing .mobile-roster-table td:nth-child(2){width:13%!important}
html.ts-phone-device .mobile-roster-workspace.is-editing .mobile-roster-table th:nth-child(7),html.ts-phone-device .mobile-roster-workspace.is-editing .mobile-roster-table td:nth-child(7){width:25%!important}
html.ts-phone-device .mobile-roster-workspace.is-editing .mobile-roster-table th:nth-child(8),html.ts-phone-device .mobile-roster-workspace.is-editing .mobile-roster-table td:nth-child(8){width:4%!important;padding:2px!important}
html.ts-phone-device .mobile-roster-student-last,
html.ts-phone-device .mobile-roster-student-first{display:block!important;font-weight:900!important;overflow-wrap:break-word!important}
html.ts-phone-device .mobile-roster-notes{text-transform:uppercase!important}
html.ts-phone-device .mobile-roster-table select,
html.ts-phone-device .mobile-roster-table textarea{
  width:100%!important;
  min-width:0!important;
  min-height:28px!important;
  margin:0!important;
  padding:3px 4px!important;
  border:1px solid var(--line)!important;
  border-radius:6px!important;
  background:var(--surface)!important;
  color:var(--ink)!important;
  font:inherit!important;
}
html.ts-phone-device .mobile-roster-table textarea{height:38px!important;resize:vertical!important;line-height:1.15!important}
html.ts-phone-device .mobile-roster-delete{
  width:24px!important;
  height:24px!important;
  min-width:24px!important;
  padding:0!important;
  border:1px solid #fecaca!important;
  border-radius:7px!important;
  background:#fff1f2!important;
  color:#b91c1c!important;
  font-size:17px!important;
  font-weight:900!important;
  line-height:1!important;
}
html.ts-phone-device .mobile-roster-savebar{
  flex:0 0 auto!important;
  display:flex!important;
  gap:6px!important;
  padding:5px 0 0!important;
  border-top:1px solid var(--line)!important;
}
html.ts-phone-device .mobile-roster-savebar[hidden]{display:none!important}
html.ts-phone-device .mobile-roster-savebar button{min-height:34px!important;padding:6px 11px!important;font-size:11px!important}
html.ts-phone-device .mobile-roster-entry:not([hidden]){
  position:absolute!important;
  inset:0!important;
  z-index:10!important;
  display:grid!important;
  place-items:center!important;
  padding:max(5px,env(safe-area-inset-top)) max(6px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))!important;
  background:rgba(4,12,24,.66)!important;
}
html.ts-phone-device .mobile-roster-entry-card{
  position:relative!important;
  width:min(760px,100%)!important;
  max-height:100%!important;
  display:flex!important;
  flex-direction:column!important;
  padding:10px 12px!important;
  border-radius:13px!important;
  background:var(--surface)!important;
  box-shadow:0 22px 64px rgba(0,0,0,.34)!important;
  overflow:hidden!important;
}
html.ts-phone-device .mobile-roster-entry-card h3{margin:0 38px 8px 0!important;font-size:17px!important}
html.ts-phone-device .mobile-roster-entry-close{position:absolute!important;top:6px!important;right:7px!important;width:32px!important;height:32px!important;min-width:32px!important}
html.ts-phone-device .mobile-roster-entry-form{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:5px 7px!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  touch-action:pan-y!important;
}
html.ts-phone-device .mobile-roster-entry-form label{display:grid!important;gap:2px!important;min-width:0!important;font-size:9px!important;font-weight:800!important}
html.ts-phone-device .mobile-roster-entry-form input,
html.ts-phone-device .mobile-roster-entry-form select,
html.ts-phone-device .mobile-roster-entry-form textarea{width:100%!important;min-width:0!important;min-height:30px!important;padding:4px 6px!important;font-size:10px!important}
html.ts-phone-device .mobile-roster-entry-form textarea{height:36px!important;resize:vertical!important}
html.ts-phone-device .mobile-roster-notes-field{grid-column:1/3!important}
html.ts-phone-device .mobile-roster-existing-works{grid-column:3/5!important;grid-template-columns:1fr!important}
html.ts-phone-device .mobile-roster-existing-works small{font-size:7.5px!important;line-height:1.1!important;color:var(--muted)!important}
html.ts-phone-device .mobile-roster-entry-actions{grid-column:1/3!important;display:flex!important;gap:5px!important;align-items:end!important}
html.ts-phone-device .mobile-roster-entry-actions button{min-height:31px!important;padding:5px 8px!important;font-size:10px!important}
html.ts-phone-device .mobile-roster-entry-message{grid-column:3/5!important;align-self:center!important;margin:0!important;font-size:9px!important}
html.ts-phone-device .mobile-roster-entry-message.error{color:var(--danger)!important}
html.ts-phone-device .mobile-roster-orientation-note{display:none!important}
html.ts-phone-device.ts-portrait .mobile-roster-workspace:not([hidden]) .mobile-roster-orientation-note{
  position:absolute!important;
  inset:0!important;
  z-index:20!important;
  display:grid!important;
  place-content:center!important;
  gap:5px!important;
  padding:24px!important;
  text-align:center!important;
  background:var(--surface)!important;
}
html.ts-phone-device.ts-portrait .mobile-roster-orientation-note b{font-size:21px!important}
html.ts-phone-device.ts-portrait .mobile-roster-orientation-note span{font-size:12px!important;color:var(--muted)!important}
html.ts-phone-device body.page-roster-import .desktop-roster-link{display:none!important}

/* Phone class plan: readable names and a faithful, compact student card. */
html.ts-phone-device.ts-landscape .classroom:fullscreen,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen{
  grid-template-columns:96px minmax(0,1fr) 7px!important;
}
html.ts-phone-device.ts-landscape .classroom:fullscreen .standing-area,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .standing-area{width:96px!important}
html.ts-phone-device.ts-landscape .classroom:fullscreen .standing-area>b,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .standing-area>b{font-size:8.5px!important}
html.ts-phone-device.ts-landscape .classroom:fullscreen .standing-area .student-chip,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .standing-area .student-chip{
  min-height:34px!important;
  padding:3px 4px!important;
  font-size:9px!important;
  line-height:1.08!important;
  overflow-wrap:break-word!important;
}
html.ts-phone-device.ts-landscape .classroom:fullscreen .seat-student,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .seat-student,
html.ts-phone-device.ts-landscape .classroom:fullscreen .student-chip .student-first-line,
html.ts-phone-device.ts-landscape .classroom:fullscreen .student-chip .student-last-line,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .student-chip .student-first-line,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .student-chip .student-last-line{
  font-size:clamp(8px,1.65vh,11.5px)!important;
  line-height:1.08!important;
  overflow-wrap:break-word!important;
  word-break:normal!important;
}
html.ts-phone-device.ts-landscape .student-session-card .student-session-grid{
  grid-template-columns:100px minmax(0,1fr) 94px!important;
  gap:5px!important;
}
html.ts-phone-device.ts-landscape .student-session-card .period-summary{gap:5px!important;padding:5px!important}
html.ts-phone-device.ts-landscape .student-session-card .period-summary .summary-period{padding:5px 3px!important;border-radius:9px!important}
html.ts-phone-device.ts-landscape .student-session-card .period-summary .summary-period h3{
  font-size:10px!important;
  line-height:1.12!important;
  letter-spacing:.01em!important;
}
html.ts-phone-device.ts-landscape .student-session-card .exam-console{gap:4px!important;padding:5px!important}
html.ts-phone-device.ts-landscape .student-session-card .rubric-row{
  grid-template-columns:62px minmax(0,1fr)!important;
  gap:4px!important;
  padding:4px 5px!important;
  border-radius:9px!important;
}
html.ts-phone-device.ts-landscape .student-session-card .rubric-row>b{font-size:9px!important;line-height:1.05!important}
html.ts-phone-device.ts-landscape .student-session-card .rubric-row>div{gap:4px!important;align-items:center!important}
html.ts-phone-device.ts-landscape .student-session-card .score-key{
  width:min(100%,43px)!important;
  height:auto!important;
  min-height:0!important;
  aspect-ratio:1/1!important;
  justify-self:center!important;
  border-radius:50%!important;
  padding:2px!important;
  font-size:9px!important;
  line-height:1!important;
}
html.ts-phone-device.ts-landscape .student-session-card .score-dials{
  grid-template-rows:repeat(5,minmax(0,1fr))!important;
  gap:5px!important;
  padding:5px!important;
}
html.ts-phone-device.ts-landscape .student-session-card .session-meter{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  grid-template-rows:auto minmax(18px,1fr)!important;
  align-items:center!important;
  justify-items:center!important;
  gap:3px 5px!important;
  padding:4px!important;
  border-radius:9px!important;
}
html.ts-phone-device.ts-landscape .student-session-card .session-meter .meter-name{
  grid-column:1/-1!important;
  font-size:8.5px!important;
  line-height:1!important;
}
html.ts-phone-device.ts-landscape .student-session-card .session-meter .meter-current,
html.ts-phone-device.ts-landscape .student-session-card .session-meter .meter-average{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:0!important;
  gap:0!important;
}
html.ts-phone-device.ts-landscape .student-session-card .session-meter .meter-swatch{width:20px!important;height:20px!important}
html.ts-phone-device.ts-landscape .student-session-card .session-meter .meter-average-swatch{width:14px!important;height:14px!important}
html.ts-phone-device.ts-landscape .student-session-card .session-head h2{font-size:16px!important;line-height:1.05!important}
html.ts-phone-device.ts-landscape .student-session-card .session-meta span,
html.ts-phone-device.ts-landscape .student-session-card .session-year{font-size:7.5px!important;line-height:1.1!important}
html.ts-phone-device.ts-landscape .student-session-card .session-actions button{font-size:8.5px!important}

/* A generic phone modal safety net: keep controls usable and prevent sideways
   overflow without changing desktop/tablet dimensions. */
@media(max-width:700px) and (pointer:coarse){
  html.ts-phone-device .modal-card{max-width:calc(100vw - 10px)!important;overflow-x:hidden!important}
  html.ts-phone-device .modal-card form{min-width:0!important}
  html.ts-phone-device .modal-card input,
  html.ts-phone-device .modal-card select,
  html.ts-phone-device .modal-card textarea{max-width:100%!important;min-width:0!important}
}
/* v74 name rendering correction: target the actual split-line elements created
   by class-plan.js, overriding the older phone density rules. */
html.ts-phone-device.ts-landscape .classroom:fullscreen .seat-slot .student-first-name,
html.ts-phone-device.ts-landscape .classroom:fullscreen .seat-slot .student-last-name,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .seat-slot .student-first-name,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .seat-slot .student-last-name{
  font-size:clamp(8.2px,1.62vh,11.5px)!important;
  line-height:1.08!important;
  white-space:normal!important;
  overflow:visible!important;
}
html.ts-phone-device.ts-landscape .classroom:fullscreen .seat-slot .student-first-name-line,
html.ts-phone-device.ts-landscape .classroom:fullscreen .seat-slot .student-last-name-line,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .seat-slot .student-first-name-line,
html.ts-phone-device.ts-landscape .classroom.is-fullscreen .seat-slot .student-last-name-line{
  font-size:clamp(8.2px,1.62vh,11.5px)!important;
  line-height:1.08!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:break-word!important;
}
@media(max-width:700px) and (pointer:coarse){
  html.ts-phone-device body.page-students .students-table-wrap,
  html.ts-phone-device body.page-students #studentEditActions,
  html.ts-phone-device body.page-students #editStudentsBtn,
  html.ts-phone-device body.page-students #newStudentBtn{display:none!important}
}


/* ========================================================================
   v74complete-standard scroll contract correction
   The document is the only normal vertical scroll surface. Compact layouts
   still avoid unnecessary scrolling, but content is never clipped when it is
   taller than the available viewport. Full-screen phone workspaces keep their
   intentionally contained scrolling rules.
   ======================================================================== */

/* Normal pages must be allowed to grow. This explicitly reverses the accidental
   global html overflow lock that previously affected every desktop/tablet page. */
body.page-account,
body.page-roster-import,
body.page-schedule,
body.page-written,
body.page-events,
body.page-absences,
body.page-class-plan,
body.page-management{
  height:auto!important;
  min-height:100dvh!important;
  overflow-x:hidden!important;
  overflow-y:visible!important;
  overscroll-behavior-y:auto!important;
}

body.page-account .settings-page,
body.page-roster-import .settings-page,
body.page-written .settings-page,
body.page-events .settings-page,
body.page-absences .settings-page,
body.page-management .settings-page,
body.page-schedule .schedule-main,
body.page-class-plan .class-plan-page{
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow-y:visible!important;
}

/* Roster preview and conflict review follow the complete page flow. Their full
   contents are visible and the browser page, not a nested card, scrolls. */
body.page-roster-import .conflict-list,
body.page-roster-import .compact-table-wrap{
  max-height:none!important;
  height:auto!important;
  overflow-y:visible!important;
  overscroll-behavior-y:auto!important;
  scrollbar-gutter:auto!important;
}
body.page-roster-import .compact-table-wrap .compact-table th{
  position:static!important;
  top:auto!important;
}

/* Archive tables already use page-flow-table. Reassert the one-scroll contract
   after all responsive layers so tablet browsers cannot reinstate a nested
   vertical scroller. Horizontal panning remains available only when necessary. */
body.page-written:not(.mobile-landscape-workspace) .page-flow-table,
body.page-events:not(.mobile-landscape-workspace) .page-flow-table,
body.page-absences:not(.mobile-landscape-workspace) .page-flow-table{
  max-height:none!important;
  height:auto!important;
  overflow-y:visible!important;
  overscroll-behavior-y:auto!important;
  scrollbar-gutter:auto!important;
}
body.page-written:not(.mobile-landscape-workspace) .page-flow-table .compact-table th,
body.page-events:not(.mobile-landscape-workspace) .page-flow-table .compact-table th,
body.page-absences:not(.mobile-landscape-workspace) .page-flow-table .compact-table th{
  position:static!important;
  top:auto!important;
}

/* Timetable and class-plan canvases grow in the document during their normal
   view. Their dedicated full-screen phone workspaces remain self-contained. */
body.page-schedule:not(.mobile-landscape-schedule) .schedule-scroll{
  height:auto!important;
  max-height:none!important;
  overflow-y:visible!important;
  overscroll-behavior-y:auto!important;
}
body.page-class-plan .classroom:not(:fullscreen):not(.is-fullscreen){
  height:auto!important;
  max-height:none!important;
  overflow-y:visible!important;
  overscroll-behavior-y:auto!important;
}

/* Touch devices use native vertical page scrolling in portrait. The exclusions
   preserve drawer, roster and landscape full-screen interaction modes. */
@media (max-width:720px) and (pointer:coarse){
  html.ts-phone-device body.page-account:not(.mobile-nav-open),
  html.ts-phone-device body.page-roster-import:not(.mobile-roster-workspace-open):not(.mobile-nav-open),
  html.ts-phone-device body.page-schedule:not(.mobile-landscape-schedule):not(.mobile-nav-open),
  html.ts-phone-device body.page-written:not(.mobile-landscape-workspace):not(.mobile-nav-open),
  html.ts-phone-device body.page-events:not(.mobile-landscape-workspace):not(.mobile-nav-open),
  html.ts-phone-device body.page-absences:not(.mobile-landscape-workspace):not(.mobile-nav-open),
  html.ts-phone-device body.page-class-plan:not(.mobile-nav-open),
  html.ts-phone-device body.page-management:not(.mobile-nav-open){
    height:auto!important;
    min-height:100dvh!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    touch-action:pan-y!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior-y:auto!important;
  }
}

/* The full-screen mobile workspaces deliberately retain one contained vertical
   scroller. Never create a second page scrollbar while they are active. */
html.ts-phone-device body.mobile-landscape-workspace,
html.ts-phone-device body.mobile-landscape-schedule,
html.ts-phone-device body.mobile-roster-workspace-open{
  height:var(--ts-visual-height,100dvh)!important;
  overflow:hidden!important;
}

/* Informational hourly-absence dialog. */
.student-session-card .hourly-unavailable-card{
  border-color:color-mix(in srgb,#f59e0b 52%,var(--line))!important;
  box-shadow:0 28px 80px rgba(0,0,0,.35),inset 4px 0 0 #f59e0b!important;
}
.student-session-card .hourly-unavailable-card h3{color:#b45309!important}
.app-body.dark .student-session-card .hourly-unavailable-card h3{color:#fbbf24!important}
.student-session-card .hourly-unavailable-card .hourly-hours{
  display:block!important;
  margin-top:8px!important;
  padding:8px 10px!important;
  border-radius:10px!important;
  background:var(--surface2)!important;
  color:var(--ink)!important;
  font-weight:800!important;
}

/* ========================================================================
   v75ai-milestone stability and table-layout corrections
   ======================================================================== */

/* Student-register edit controls must remain inside their own cells. */
.students-table col.student-col-name{width:20%}
.students-table col.student-col-father{width:12%}
.students-table col.student-col-grade{width:10%}
.students-table col.student-col-section{width:7%}
.students-table col.student-col-registry{width:8%}
.students-table col.student-col-oral{width:8%}
.students-table col.student-col-notes{width:35%}
.students-table col.student-col-actions{width:0}
.students-table.is-editing col.student-col-name{width:18%}
.students-table.is-editing col.student-col-father{width:11%}
.students-table.is-editing col.student-col-grade{width:10%}
.students-table.is-editing col.student-col-section{width:8%}
.students-table.is-editing col.student-col-registry{width:8%}
.students-table.is-editing col.student-col-oral{width:8%}
.students-table.is-editing col.student-col-notes{width:33%}
.students-table.is-editing col.student-col-actions{width:4%}
.students-table .student-section-edit,
.students-table .student-oral-edit,
.students-table .student-notes-edit{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
}
.students-table .student-section-cell,
.students-table .student-registry-cell,
.students-table .student-oral-cell{position:relative!important;overflow:hidden!important}
.students-table .student-registry-cell{white-space:nowrap!important;text-overflow:ellipsis!important}
.students-table.is-editing th,
.students-table.is-editing td{padding-inline:6px!important}
.students-table.is-editing .student-notes-edit{resize:vertical!important;min-height:48px!important}

/* Large absence archives enter edit mode progressively, without a frozen page. */
.absences-table[aria-busy="true"]{opacity:.72;transition:opacity .16s ease}
.absences-table.is-editing .edit-hours,
.absences-table.is-editing .edit-remarks-type,
.absences-table.is-editing .edit-remarks-other{box-sizing:border-box!important;min-width:0!important;max-width:100%!important}
.absences-table.is-editing .remarks-cell{overflow:visible!important}

/* Keep contextual filter controls compact and readable. */
.written-page .filter-bar select[name="grade"],
.written-page .filter-bar select[name="section"]{min-width:0!important}


/* v91 events archive edit actions */
.event-edit-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:14px}
.event-edit-actions[hidden]{display:none!important}
.event-edit-actions button:disabled{cursor:wait;opacity:.65}
@media(max-width:520px){.event-edit-actions{display:grid;grid-template-columns:1fr}.event-edit-actions button{width:100%}}


/* v91 events edit lock correction */
body.page-events #eventEditActions:not([hidden]){display:flex!important}
@media(max-width:520px){body.page-events #eventEditActions:not([hidden]){display:grid!important}}

/* Review of pending written work before a student changes section. */
.student-move-review-card {
    width: min(1040px, calc(100vw - 32px));
    max-height: min(88vh, 900px);
    overflow: auto;
}
.student-move-review-list {
    display: grid;
    gap: 18px;
    margin: 18px 0;
}
.student-move-review-student {
    border: 1px solid var(--line, #d9dee8);
    border-radius: 14px;
    padding: 16px;
}
.student-move-review-student h3,
.student-move-review-student h4 {
    margin: 0 0 6px;
}
.student-move-route {
    margin: 0 0 14px;
    font-weight: 700;
}
.student-move-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.student-move-work-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid var(--line, #e2e6ee);
    cursor: pointer;
}
.student-move-work-row input {
    margin-top: 4px;
}
.student-move-work-row span,
.student-move-work-row small {
    display: block;
}
.student-move-work-row small {
    margin-top: 3px;
    opacity: .75;
}
@media (max-width: 760px) {
    .student-move-columns {
        grid-template-columns: 1fr;
    }
}

/* v100: class-plan oral marker control. Existing toolbar columns remain untouched. */
.page-class-plan .class-plan-oral-control{
  position:relative;
  display:inline-flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:center;
  gap:7px;
  min-width:0!important;
  max-width:100%;
  min-height:34px;
  box-sizing:border-box;
  margin:0;
  font-family:inherit;
  font-size:13px;
  font-weight:800;
  line-height:1.2;
  text-align:center;
  cursor:pointer;
  user-select:none;
}
.page-class-plan .class-plan-oral-label{min-width:0;overflow-wrap:anywhere}
.page-class-plan .class-plan-oral-input{
  position:absolute;
  width:1px;
  height:1px;
  margin:-1px;
  padding:0;
  overflow:hidden;
  clip:rect(0 0 0 0);
  clip-path:inset(50%);
  white-space:nowrap;
  border:0;
}
.page-class-plan .class-plan-oral-switch{
  position:relative;
  flex:0 0 auto;
  width:32px;
  height:18px;
  border:1px solid color-mix(in srgb,var(--line) 78%,#64748b 22%);
  border-radius:999px;
  background:#94a3b8;
  box-shadow:inset 0 1px 2px rgba(15,23,42,.18);
  transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.page-class-plan .class-plan-oral-switch::after{
  content:"";
  position:absolute;
  top:2px;
  left:2px;
  width:12px;
  height:12px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 3px rgba(15,23,42,.32);
  transition:transform .16s ease;
}
.page-class-plan .class-plan-oral-input:checked + .class-plan-oral-switch{
  border-color:#2563eb;
  background:#2563eb;
}
.page-class-plan .class-plan-oral-input:checked + .class-plan-oral-switch::after{transform:translateX(14px)}
.page-class-plan .class-plan-oral-input:focus-visible + .class-plan-oral-switch{
  outline:2px solid color-mix(in srgb,#2563eb 72%,transparent);
  outline-offset:2px;
}
.page-class-plan .classroom.oral-markers-hidden .class-plan-oral-dot{display:none!important}
.page-class-plan .fullscreen-plan-actions .class-plan-oral-control{
  min-height:0;
  padding:7px 10px!important;
  font-size:12px!important;
  white-space:nowrap;
}
@media(max-width:1180px){
  .page-class-plan .class-plan-toolbar>.inline-actions .class-plan-oral-control{gap:6px;padding-inline:9px}
}
@media(max-width:760px){
  .page-class-plan .class-plan-toolbar>.inline-actions .class-plan-oral-control{
    width:100%!important;
    padding-inline:5px!important;
    font-size:11px!important;
  }
}
@media(max-width:700px) and (pointer:coarse){
  html.ts-phone-device .page-class-plan .class-plan-toolbar>.inline-actions .class-plan-oral-control{
    min-height:37px!important;
    padding:5px!important;
    font-size:10px!important;
  }
}
html.ts-phone-device.ts-landscape .page-class-plan .fullscreen-plan-actions .class-plan-oral-control{
  min-height:25px!important;
  height:25px!important;
  padding:3px 6px!important;
  font-size:7px!important;
  white-space:nowrap!important;
}
html.ts-phone-device.ts-landscape .page-class-plan .fullscreen-plan-actions .class-plan-oral-switch{
  width:22px;
  height:12px;
}
html.ts-phone-device.ts-landscape .page-class-plan .fullscreen-plan-actions .class-plan-oral-switch::after{
  top:1px;
  left:1px;
  width:8px;
  height:8px;
}
html.ts-phone-device.ts-landscape .page-class-plan .fullscreen-plan-actions .class-plan-oral-input:checked + .class-plan-oral-switch::after{transform:translateX(10px)}
html.ts-phone-device.ts-landscape .page-class-plan .fullscreen-plan-actions.is-folded>.class-plan-oral-control{display:none!important}


/* Phase 14B.1 — desktop export feedback */
button.export-button{
  transform:translateY(0) scale(1);
  transition:transform .12s ease,box-shadow .12s ease,filter .12s ease;
  transform-origin:center;
}
button.export-button.export-pressed,
button.export-button:active{
  transform:translateY(2px) scale(.965);
  box-shadow:inset 0 2px 5px rgba(15,23,42,.18);
  filter:brightness(.97);
}
@media (prefers-reduced-motion:reduce){
  button.export-button{transition:none}
}

/* 0.3.5 safety baseline — observable Parakeet runtime */
.stt-runtime-panel{display:grid;gap:14px}.stt-runtime-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.stt-runtime-grid>div{padding:12px 14px;border:1px solid var(--border,#dbe3ed);border-radius:14px;background:var(--surface-soft,#f8fafc);display:grid;gap:4px}.stt-runtime-grid small{color:#64748b;font-size:11px;text-transform:uppercase;letter-spacing:.05em}.stt-runtime-grid b{font-size:15px}.stt-runtime-detail{margin:0;padding:11px 13px;border-radius:12px;background:#f8fafc;color:#475569;border:1px solid #dbe3ed}.stt-runtime-badge{align-self:flex-start;padding:7px 10px;border-radius:999px;font-size:11px;font-weight:800;letter-spacing:.04em;background:#e8eef6;color:#475569}.stt-runtime-badge[data-state="loading"]{background:#eaf2ff;color:#1d4ed8}.stt-runtime-badge[data-state="ready"]{background:#eaf8ef;color:#166534}.stt-runtime-badge[data-state="failed"]{background:#fff0f0;color:#b91c1c}.stt-runtime-events{display:grid;gap:9px}.stt-runtime-events h3{margin:0;font-size:14px}.stt-runtime-event-row{padding:9px 11px;border:1px solid #dbe3ed;border-radius:11px;background:#fff}.stt-runtime-event-row>div{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.stt-runtime-event-row b{font-size:12px}.stt-runtime-event-row small{font-size:11px;color:#64748b;text-align:right}.app-body.dark .stt-runtime-grid>div,.app-body.dark .stt-runtime-detail,.app-body.dark .stt-runtime-event-row{background:#0e1b2c;border-color:#2d4059;color:#dbe7f5}.app-body.dark .stt-runtime-grid small,.app-body.dark .stt-runtime-event-row small,.app-body.dark .stt-runtime-detail{color:#afbdd0}.ai-control-actions button:disabled{cursor:not-allowed;opacity:.64;filter:saturate(.72)}
@media(max-width:760px){.stt-runtime-grid{grid-template-columns:1fr}.stt-runtime-event-row>div{align-items:flex-start;flex-direction:column;gap:3px}.stt-runtime-event-row small{text-align:left}}

/* 0.3.5 safety baseline — deterministic voice settings */
.stt-mode-switcher{position:relative;margin:0;padding:0;border:0;display:grid;gap:10px}.stt-mode-switcher legend{padding:0 0 2px;font-size:13px;font-weight:800;color:var(--muted)}.stt-mode-switch-row{display:grid;grid-template-columns:minmax(130px,1fr) auto minmax(130px,1fr);align-items:center;gap:14px;padding:14px 16px;border:1px solid var(--line);border-radius:16px;background:color-mix(in srgb,var(--surface) 90%,transparent)}.stt-mode-label{display:grid;gap:2px;opacity:.56;transition:opacity .18s ease,color .18s ease}.stt-mode-label:last-child{text-align:right}.stt-mode-label b{font-size:15px}.stt-mode-label small{font-size:11px;color:var(--muted)}.stt-mode-label.is-active{opacity:1;color:var(--accent)}.stt-mode-switch{position:relative;width:66px;height:34px;padding:0;border:0;border-radius:999px;background:color-mix(in srgb,var(--accent) 30%,var(--line));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 30%,var(--line));cursor:pointer;transition:background .18s ease,box-shadow .18s ease}.stt-mode-switch span{position:absolute;top:4px;left:4px;width:26px;height:26px;border-radius:50%;background:#fff;box-shadow:0 3px 9px rgba(15,23,42,.24);transition:transform .18s ease}.stt-mode-switch[aria-checked="true"]{background:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}.stt-mode-switch[aria-checked="true"] span{transform:translateX(32px)}.stt-mode-switch:focus-visible{outline:3px solid color-mix(in srgb,var(--accent) 35%,transparent);outline-offset:3px}.stt-mode-explanation{margin:0;padding:11px 13px;border-radius:12px;background:color-mix(in srgb,var(--surface2) 84%,transparent);color:var(--muted);font-size:12px;line-height:1.48}.stt-learning-audit-card{display:grid;grid-template-columns:1fr auto;align-items:center;gap:14px;margin-top:12px;padding:14px 16px;border:1px solid color-mix(in srgb,#d97706 34%,var(--line));border-radius:15px;background:color-mix(in srgb,#f59e0b 8%,var(--surface2))}.stt-learning-audit-card>div{display:grid;gap:4px}.stt-learning-audit-card small{color:var(--muted);line-height:1.45}.stt-learning-audit-card>span{padding:6px 9px;border-radius:999px;background:color-mix(in srgb,#d97706 14%,var(--surface));color:#b45309;font-size:10px;font-weight:900;letter-spacing:.08em}.app-body.dark .stt-learning-audit-card>span{color:#fbbf24}
@media(max-width:640px){.stt-mode-switch-row{grid-template-columns:1fr auto 1fr;gap:8px;padding:12px}.stt-learning-audit-card{grid-template-columns:1fr}.stt-learning-audit-card>span{justify-self:start}}

/* Greek Voice v4 — transparent local pronunciation calibration. */
.voice-calibration-card{display:grid;gap:12px;margin-top:12px;padding:15px 16px;border:1px solid color-mix(in srgb,var(--accent) 28%,var(--line));border-radius:16px;background:color-mix(in srgb,var(--surface2) 84%,transparent)}
.voice-calibration-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.voice-calibration-head>div{display:grid;gap:4px}.voice-calibration-head small{color:var(--muted);line-height:1.45}.voice-calibration-head>span{flex:0 0 auto;padding:6px 9px;border-radius:999px;background:color-mix(in srgb,var(--accent) 12%,var(--surface));color:var(--accent);font-size:10px;font-weight:900;letter-spacing:.07em}
.voice-calibration-card blockquote{margin:0;padding:13px 15px;border-left:4px solid color-mix(in srgb,var(--accent) 62%,var(--line));border-radius:10px;background:color-mix(in srgb,var(--surface) 92%,transparent);font-size:13px;line-height:1.58}
.voice-calibration-actions{display:flex;flex-wrap:wrap;gap:9px}.voice-calibration-status{margin:0;padding:10px 12px;border:1px solid var(--line);border-radius:11px;background:color-mix(in srgb,var(--surface) 90%,transparent);color:var(--muted);font-size:12px;line-height:1.4}
.voice-calibration-results{display:grid;grid-template-columns:1fr 1fr;gap:10px}.voice-calibration-results>div{min-width:0;padding:11px 12px;border:1px solid var(--line);border-radius:12px;background:color-mix(in srgb,var(--surface) 94%,transparent)}.voice-calibration-results small{font-size:10px;font-weight:900;letter-spacing:.07em;color:var(--muted)}.voice-calibration-results p{margin:6px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.48}
@media(max-width:640px){.voice-calibration-head{display:grid}.voice-calibration-head>span{justify-self:start}.voice-calibration-results{grid-template-columns:1fr}}
