/* Teacher Command Center app shell and views, MakeVia light theme (tokens in classroom-teacher.css).
   Only classroom-teacher.html loads this file. Shared student-page sheets are overridden below under body.teacher-portal. */

/* Header */
.command-header{position:sticky;top:0;z-index:60;display:flex;align-items:center;gap:16px;height:80px;padding:0 clamp(14px,2.2vw,32px);background:var(--t-surface);border-bottom:1px solid var(--t-line)}
.command-header .command-logo{display:flex;align-items:center;gap:12px;flex-shrink:0;color:var(--t-text);text-decoration:none}
.command-logo img{display:block;height:54px;width:auto}
.command-logo span{padding-left:12px;border-left:1px solid var(--t-line);font-size:13px;font-weight:600;color:var(--t-muted);white-space:nowrap}
.command-nav{display:flex;gap:2px;margin:0 auto;min-width:0}
.teacher-portal .command-nav button{gap:7px;padding:9px 11px;border:0;background:transparent;color:var(--t-text);font-size:14px;white-space:nowrap}
.teacher-portal .command-nav button:hover{background:var(--t-green-soft)}
.teacher-portal .command-nav button.active{background:var(--t-sage-light);color:var(--t-primary-dark);font-weight:700;box-shadow:inset 0 -3px 0 var(--t-primary)}
.command-nav .ic{width:18px;height:18px}
.teacher-account{position:relative;flex-shrink:0;margin-left:auto}
.command-nav+.teacher-account{margin-left:0}
.teacher-account summary{display:flex;align-items:center;gap:8px;min-height:44px;padding:10px 14px 10px 16px;border-radius:var(--r-sm);background:var(--t-primary);color:#fff;font-size:14px;font-weight:600;cursor:pointer;list-style:none;white-space:nowrap}
.teacher-account summary::-webkit-details-marker{display:none}
.teacher-account summary:hover{background:var(--t-primary-hover)}
.teacher-account summary .ic:last-child{width:16px;height:16px;transition:transform .15s}
.teacher-account[open] summary .ic:last-child{transform:rotate(180deg)}
.account-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:70;display:grid;min-width:210px;padding:8px;background:var(--t-white);border:1px solid var(--t-line);border-radius:var(--r-md);box-shadow:var(--sh-md)}
.teacher-portal .account-menu a,.teacher-portal .account-menu button{display:flex;justify-content:flex-start;align-items:center;min-height:44px;padding:10px 12px;border:0;border-radius:var(--r-sm);background:none;color:var(--t-text);font-size:14px;font-weight:600;text-decoration:none}
.teacher-portal .account-menu a:hover,.teacher-portal .account-menu button:hover{background:var(--t-green-soft)}
#command-menu{display:none}
body:not(.teacher-auth) #command-menu{display:none!important}
body:not(.teacher-auth) .command-nav{display:none}

/* Sidebar (signed-in only) */
.command-sidebar{display:none}
.teacher-auth .command-sidebar{display:flex;position:fixed;top:80px;left:0;bottom:0;z-index:50;width:224px;flex-direction:column;gap:4px;padding:16px 12px;background:var(--t-surface);border-right:1px solid var(--t-line);overflow-y:auto}
.teacher-portal .command-sidebar button,.teacher-portal .command-sidebar>a{display:flex;justify-content:flex-start;align-items:center;gap:12px;min-height:44px;padding:10px 12px;border:0;border-radius:var(--r-sm);background:transparent;color:var(--t-text);font-size:14px;font-weight:600;text-align:left;text-decoration:none;white-space:nowrap}
.teacher-portal .command-sidebar button:hover,.teacher-portal .command-sidebar>a:hover{background:var(--t-green-soft)}
.teacher-portal .command-sidebar button.active{background:var(--t-sage-light);color:var(--t-primary-dark);font-weight:700;box-shadow:inset 3px 0 0 var(--t-primary)}
.teacher-portal .command-sidebar #sidebar-collapse{color:var(--t-muted);font-size:13px;margin-bottom:6px}
.sidebar-help{margin-top:auto;padding:16px;border:1px solid #CFE0C8;border-radius:var(--r-md);background:var(--t-green-soft);font-size:14px}
.sidebar-help strong{color:var(--t-primary-dark)}
.teacher-portal .sidebar-help p{margin:6px 0;font-size:13px}
.teacher-portal .sidebar-help a{display:inline-flex;align-items:center;gap:6px;min-height:44px;font-weight:600;font-size:13px}
.sidebar-help .ic,.teacher-portal a .ic{width:16px;height:16px}

/* Signed-in layout */
.teacher-auth main{max-width:none;margin-left:224px;padding:24px 28px 36px}
.teacher-auth #dashboard:not([hidden]){display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:20px;align-items:start}
#dashboard>.heading,#command-metrics,.teacher-tabs,.command-live-controls,#monitor,#manage,#print-panel,#safety-panel,.command-extra{grid-column:1;min-width:0}
.heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin:0}
.heading h1{margin:6px 0 8px;font-size:clamp(26px,2.6vw,36px);font-weight:800}
.teacher-portal .heading p{max-width:620px;margin:0;font-size:14px}
.teacher-portal .heading .eyebrow{margin:0;font-size:12px}
.command-class{display:grid;grid-template-columns:1fr auto;gap:6px 10px;width:260px;flex-shrink:0;padding:14px;border:1px solid var(--t-line);border-radius:var(--r-md);background:var(--t-white);box-shadow:var(--sh-sm)}
.command-class label{grid-column:1/-1;font-size:13px}
.teacher-portal .command-class select{margin:6px 0 0;font-size:14px}
.command-class>span{grid-column:1/-1;font-size:13px;font-weight:600;color:var(--t-success)}
.teacher-portal .command-class>button{grid-column:1/-1;min-height:44px;padding:8px 10px;font-size:13px}
.command-class>small{grid-column:1/-1;font-size:12px;line-height:1.35;color:var(--t-muted)}
.command-class .ic{width:16px;height:16px}

/* Metric cards; JS renders text glyphs, so the icon is drawn with a CSS mask and the glyph hidden. */
.command-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.teacher-portal .command-metric{display:grid;grid-template-columns:44px 1fr;gap:2px 12px;align-content:start;justify-content:stretch;min-width:0;min-height:104px;padding:16px;text-align:left;border:1px solid var(--t-line);border-radius:var(--r-md);background:var(--t-white);color:var(--t-text);box-shadow:var(--sh-sm)}
.teacher-portal .command-metric:hover{border-color:var(--t-sage);background:var(--t-white)}
.command-metric>span{grid-row:1/3;display:grid;place-items:center;width:44px;height:44px;border-radius:var(--r-md);background:var(--t-green-soft);font-size:0;color:transparent}
.command-metric>span::before{content:"";width:22px;height:22px;background:var(--t-primary);-webkit-mask:var(--m) center/contain no-repeat;mask:var(--m) center/contain no-repeat}
.command-metric:nth-child(1)>span{--m:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E")}
.command-metric:nth-child(2)>span{--m:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z'/%3E%3Cpath d='M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12'/%3E%3Cpath d='M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17'/%3E%3C/svg%3E");background:var(--t-orange-soft)}
.command-metric:nth-child(2)>span::before{background:var(--t-orange-text)}
.command-metric:nth-child(3)>span{--m:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z'/%3E%3Cpath d='M20 3v4'/%3E%3Cpath d='M22 5h-4'/%3E%3Cpath d='M4 17v2'/%3E%3Cpath d='M5 18H3'/%3E%3C/svg%3E")}
.command-metric:nth-child(4)>span{--m:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='m9 14 2 2 4-4'/%3E%3C/svg%3E");background:var(--t-orange-soft)}
.command-metric:nth-child(4)>span::before{background:var(--t-orange-text)}
.command-metric>strong{font-size:28px;line-height:1.1;font-weight:800}
.command-metric>b{font-size:14px;font-weight:600}
.command-metric>small{grid-column:1/-1;margin-top:8px;font-size:12px;font-weight:400;color:var(--t-muted)}

/* Tabs, live controls, filters */
.teacher-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:4px;border:1px solid var(--t-line);border-radius:var(--r-md);background:var(--t-surface);width:max-content;max-width:100%}
.teacher-portal .teacher-tabs button{min-height:44px;padding:8px 14px;border:0;background:transparent;color:var(--t-text);font-size:14px}
.teacher-portal .teacher-tabs button:hover{background:var(--t-green-soft)}
.teacher-portal .teacher-tabs button[aria-pressed=true]{background:var(--t-sage-light);color:var(--t-primary-dark);font-weight:700;box-shadow:inset 0 -3px 0 var(--t-primary)}
.command-live-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.command-live-controls label{display:flex;align-items:center;gap:8px;font-size:13px}
.teacher-portal .command-live-controls select{width:auto;margin:0;font-size:14px}
.command-live-controls>span{margin-left:auto;font-size:13px;font-weight:600;color:var(--t-success)}
.command-live-controls .ic{width:18px;height:18px}
.classroom-summary{display:none}
.monitor-controls{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;margin-bottom:12px;padding:14px;border:1px solid var(--t-line);border-radius:var(--r-md);background:var(--t-surface)}
.monitor-controls label{flex:1;min-width:140px;font-size:13px}
.monitor-controls label:has(#student-filter){flex:1.5}
.teacher-portal .monitor-controls input,.teacher-portal .monitor-controls select{margin:6px 0 0;font-size:14px}
.teacher-portal .monitor-controls p{flex-basis:100%;margin:0;font-size:13px}
.monitor-controls p:empty{display:none}
.command-view-toggle{display:flex;gap:4px;padding:3px;border:1px solid var(--t-line);border-radius:var(--r-sm);background:var(--t-white)}
.teacher-portal .command-view-toggle button{min-height:44px;padding:6px 10px;border:0;font-size:13px;background:transparent}
.teacher-portal .command-view-toggle button[aria-pressed=true]{background:var(--t-sage-light);color:var(--t-primary-dark);font-weight:700;box-shadow:inset 0 -3px 0 var(--t-primary)}
.command-view-toggle .ic{width:16px;height:16px}
.teacher-quick-filters{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}
.teacher-portal .teacher-quick-filters button{min-height:44px;padding:8px 14px;border:1px solid var(--t-line);border-radius:999px;background:var(--t-white);color:var(--t-text);font-size:14px}
.teacher-portal .teacher-quick-filters button[aria-pressed=true]{background:var(--t-primary);border-color:var(--t-primary);color:#fff}

/* Student cards */
.student-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:14px}
.teacher-portal .student-grid article.student{min-width:0;padding:14px;background:var(--t-white);box-shadow:var(--sh-sm);overflow:hidden}
.student-card-head{margin-bottom:10px}
.student h3{margin:0;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.student-badge{display:inline-flex;align-items:center;gap:4px;margin-top:6px;padding:3px 9px;border:1px solid var(--t-line);border-radius:999px;font-size:12px;font-weight:600;color:var(--t-muted);background:var(--t-surface)}
.student-badge.is-live{color:var(--t-success);background:var(--t-green-soft);border-color:#BFD8B8}
.student-badge.is-live::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}
.student-badge.is-disabled{color:var(--t-error);background:var(--t-error-soft);border-color:#F4C7C3}
.student img{display:block;width:100%;aspect-ratio:1;max-height:200px;object-fit:contain;margin:0 0 10px;border-radius:var(--r-sm);background:var(--t-bg)}
.student img.saved-preview:not([src]){display:block;visibility:hidden;min-height:100px}
.student img.saved-preview[src]{visibility:visible}
.student .empty-preview{display:grid;place-items:center;min-height:96px;margin:0 0 10px;padding:14px;border:1px dashed var(--t-line);border-radius:var(--r-sm);background:var(--t-surface);color:var(--t-muted);font-size:13px;line-height:1.5;text-align:center}
.teacher-portal .student p{margin:6px 0;font-size:13px;line-height:1.45}
.student>small{display:block;font-size:12px;color:var(--t-muted)}
.student>progress{width:100%;height:6px;accent-color:var(--t-success)}
.student>progress.usage-warn{accent-color:var(--t-warning)}
.student>progress.usage-full{accent-color:var(--t-error)}
.teacher-portal .student>button{width:100%;margin-top:6px;font-size:13px}
.teacher-portal .student .quick-feedback{display:flex;gap:6px;margin-top:10px;padding:0;border:0;background:none}
.teacher-portal .student .quick-feedback input{flex:1;min-width:0;margin:0;font-size:16px}
.teacher-portal .student .quick-feedback button{padding:8px 12px;font-size:13px}
.teacher-portal .student .quick-feedback-status{font-size:12px;color:var(--t-success)}
.student-grid.student-list{display:flex;flex-direction:column}
.teacher-portal .student-list article.student{display:grid;grid-template-columns:160px 100px 1fr 170px;gap:12px;align-items:center}
.student-list .student img{max-height:90px;margin:0}
.student-list .student>p,.student-list .student>small,.student-list .student>progress{grid-column:3}
.student-list .student>button,.student-list .student .quick-feedback{grid-column:4}
.teacher-portal #students>p{padding:24px;border:1px dashed var(--t-line);border-radius:var(--r-md);background:var(--t-surface);text-align:center}
.command-gallery .quick-feedback{display:none!important}
.command-gallery .student img{max-height:280px}
.command-gallery .student-grid{grid-template-columns:repeat(auto-fill,minmax(230px,1fr))}

/* Panels, table, reports */
.command-extra,#manage,#print-panel,#safety-panel{padding:22px;border:1px solid var(--t-line);border-radius:var(--r-lg);background:var(--t-surface)}
.command-extra h2,#manage>h2,#print-panel>h2,#safety-panel h2{margin:0 0 8px;font-size:22px}
.teacher-portal .command-extra p,.teacher-portal #manage>p,.teacher-portal #print-panel>p{font-size:14px}
.command-table-wrap{overflow:auto;border:1px solid var(--t-line);border-radius:var(--r-md);background:var(--t-white)}
.command-table-wrap table{width:100%;min-width:720px;border-collapse:collapse;font-size:14px}
.command-table-wrap th{position:sticky;top:0;padding:12px;text-align:left;font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--t-muted);background:var(--t-surface);border-bottom:1px solid var(--t-line);white-space:nowrap}
.command-table-wrap td{padding:12px;border-top:1px solid #ECE9E0;color:var(--t-text)}
.command-table-wrap tbody tr:hover{background:#FAF8F2}
.teacher-portal .command-table-wrap button{min-height:44px;padding:6px 12px;font-size:13px;white-space:nowrap}
#command-report{display:grid;gap:4px;margin:10px 0 16px}
.class-grid,.management-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px;margin:16px 0}
.teacher-portal .class-card{background:var(--t-white);box-shadow:var(--sh-sm)}
.class-card h3{margin-top:0}
.class-card label{display:block}
.teacher-portal .class-card .review-due{padding:8px 10px;border-left:4px solid var(--t-warning);border-radius:0 var(--r-sm) var(--r-sm) 0;background:var(--t-warning-soft);color:#6B4700;font-weight:600}
.management-grid form h2,.management-grid form h3{margin-top:0;font-size:18px}

/* Right rail: quick actions, class status, activity */
.command-right{grid-column:2;grid-row:1/15;position:sticky;top:100px;display:grid;gap:14px}
.command-right>section{padding:16px;border:1px solid var(--t-line);border-radius:var(--r-md);background:var(--t-white);box-shadow:var(--sh-sm)}
.command-right h2{margin:0 0 10px;font-size:16px}
.teacher-portal .command-right button{display:flex;justify-content:flex-start;width:100%;margin:6px 0;padding:9px 12px;font-size:14px;text-align:left}
.teacher-portal .command-right p{margin:4px 0;font-size:13px}
.teacher-portal .command-right .command-security-note{font-size:12px}
.command-right progress{width:100%;height:8px;accent-color:var(--t-primary)}
.command-right .ic{width:18px;height:18px;color:var(--t-primary)}
.teacher-portal .command-right #command-activity button,.command-right #command-activity>div{display:block;margin:0;padding:9px 0;border:0;border-bottom:1px solid #ECE9E0;border-radius:0;background:transparent}
.command-right #command-activity strong,.command-right #command-activity small,.command-right #command-activity time{display:block;text-align:left}
.command-right #command-activity strong{font-size:13px;color:var(--t-text)}
.command-right #command-activity small{margin:3px 0;font-size:12px;font-weight:400;color:var(--t-muted)}
.command-right #command-activity time{font-size:12px;font-weight:400;color:var(--t-muted)}
#command-actions-open,#command-actions-close{display:none}

/* Dialogs and drawer */
.teacher-portal dialog{width:min(900px,94vw);max-height:90vh;overflow:auto;padding:28px;border:1px solid var(--t-line);border-radius:var(--r-lg);background:var(--t-surface);color:var(--t-text);box-shadow:0 24px 64px rgba(29,40,52,.18)}
.teacher-portal dialog::backdrop{background:rgba(29,40,52,.45)}
dialog h2{margin-top:4px}
.teacher-portal dialog .close,#command-close-announcement,#command-preview-close{float:right;margin-left:12px}
#detail-preview,#review-image{display:block;max-width:100%;max-height:460px;margin:16px auto;object-fit:contain;border:1px solid var(--t-line);border-radius:var(--r-md);background:var(--t-white)}
.teacher-portal .student-drawer{position:fixed;inset:0 0 0 auto;width:min(760px,96vw);height:100dvh;max-height:none;margin:0;border-radius:var(--r-lg) 0 0 var(--r-lg);box-shadow:-16px 0 48px rgba(29,40,52,.16)}
.student-drawer>h2{font-size:26px}
.teacher-portal .student-drawer form{background:var(--t-white)}
.student-drawer h3{margin:18px 0 8px;font-size:17px}
#detail-updated,#command-review-dimensions{font-size:13px}
#command-student-summary{margin:12px 0;font-size:14px;line-height:1.7;color:var(--t-muted)}
#feedback-templates{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}
.teacher-portal #feedback-templates button{min-height:44px;padding:7px 12px;border-radius:999px;font-size:13px}
.teacher-portal #save-feedback-template{font-size:13px}
#command-feedback-history article{margin:8px 0;padding:10px 12px;border:1px solid var(--t-line);border-radius:var(--r-sm);background:var(--t-white)}
#command-feedback-history small{color:var(--t-muted)}
#student-projects article{margin:12px 0;padding:14px;border:1px solid var(--t-line);border-radius:var(--r-md);background:var(--t-white)}
.teacher-portal #student-projects article p{font-size:13px}
#student-projects article button{margin:4px 6px 4px 0}
#project-review>p{font-size:14px}
#project-review>div:not(.review-modes){display:flex;flex-wrap:wrap;gap:8px}
.review-modes{display:flex;gap:6px;margin:14px 0}
#command-announcement-dialog,#step-up-dialog,#command-preview-dialog{max-width:620px}
#step-up-form,#command-announcement-form{padding:0;border:0;background:none}
#step-up-error{color:var(--t-error)}
#step-up-error:empty{display:none}
#command-preview-dialog a{display:inline-flex;align-items:center;gap:6px;min-height:44px;font-weight:600}

/* Toast */
.teacher-portal #status:not(:empty){position:fixed;left:16px;bottom:16px;z-index:80;max-width:min(600px,calc(100vw - 32px));margin:0;padding:12px 16px;border:1px solid var(--t-line);border-left:4px solid var(--t-info);border-radius:var(--r-md);background:var(--t-white);color:var(--t-text);box-shadow:var(--sh-md);font-size:14px;white-space:pre-wrap}
.teacher-auth #status:not(:empty){left:240px}

/* Footer */
.command-footer{padding:28px 24px;text-align:center;font-size:13px;color:var(--t-muted)}
.command-footer a{font-weight:600}
.teacher-auth .command-footer{margin-left:224px}

/* Collapsed sidebar */
.command-sidebar-collapsed.teacher-auth main,.command-sidebar-collapsed.teacher-auth .command-footer{margin-left:72px}
.command-sidebar-collapsed.teacher-auth .command-sidebar{width:72px}
/* Labels stay as accessible names; the icons are aria-hidden */
.command-sidebar-collapsed .command-sidebar button span,.command-sidebar-collapsed .command-sidebar>a span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
.command-sidebar-collapsed .sidebar-help{display:none}
.teacher-portal.command-sidebar-collapsed .command-sidebar button,.teacher-portal.command-sidebar-collapsed .command-sidebar>a{justify-content:center}
.command-sidebar-collapsed.teacher-auth #status:not(:empty){left:88px}

/* Shared student-page sheets, teacher page only */
body.teacher-portal .assignments-open{min-height:44px;padding:8px 14px;border:0;border-radius:var(--r-sm);background:transparent;color:var(--t-text);font-size:14px}
body.teacher-portal .assignments-open:hover{background:var(--t-green-soft)}
body.teacher-portal .assignments-dialog{width:min(680px,94vw);padding:24px;background:var(--t-surface);color:var(--t-text);border:1px solid var(--t-line);border-radius:var(--r-lg);font:15px/1.5 Studio,'Avenir Next',Avenir,Arial,sans-serif}
body.teacher-portal .assignments-dialog::backdrop{background:rgba(29,40,52,.45)}
body.teacher-portal .assignments-dialog input,body.teacher-portal .assignments-dialog select,body.teacher-portal .assignments-dialog textarea{background:var(--t-white);color:var(--t-text);border:1px solid var(--t-field);border-radius:var(--r-sm);font:16px Studio,'Avenir Next',Avenir,Arial,sans-serif}
body.teacher-portal .assignments-dialog input[type=checkbox]{width:20px;height:20px;min-height:0}
body.teacher-portal .assignments-dialog button{border:1px solid var(--t-line);background:var(--t-white);color:var(--t-primary)}
body.teacher-portal .assignments-dialog form button:not([type=button]){background:var(--t-primary);border-color:var(--t-primary);color:#fff}
body.teacher-portal .assignments-dialog article{border-top:1px solid var(--t-line)}
body.teacher-portal .assignments-dialog article form{background:var(--t-white);border:1px solid var(--t-line)}
body.teacher-portal .assignments-dialog small{color:var(--t-muted)}
body.teacher-portal .assignments-dialog :focus-visible{outline:3px solid var(--t-info)}
body.teacher-portal .teacher-brainstorm-link{border:1px solid var(--t-primary);background:var(--t-white);color:var(--t-primary);font-weight:600}
body.teacher-portal .teacher-brainstorm-link:hover{background:var(--t-green-soft)}

.skip{position:absolute;left:-999px;top:8px}
.skip:focus{left:8px;z-index:200;padding:12px 16px;border-radius:var(--r-sm);background:var(--t-white);color:var(--t-text)}

/* ~1450: tighter header */
@media(max-width:1450px){
 .teacher-portal .command-nav button{padding:8px 8px;font-size:13px;gap:5px}
 .command-nav .ic{width:16px;height:16px}
 .teacher-auth #dashboard:not([hidden]){grid-template-columns:minmax(0,1fr) 250px}
 .command-metrics{gap:10px}}
@media(max-width:1365px) and (min-width:1201px){.command-logo span{display:none}}
/* ~1200 and the compact 1024 layout: sidebar icons only, actions rail becomes a panel */
@media(max-width:1200px){
 .command-nav{display:none}
 .teacher-auth .command-sidebar{width:72px}
 .command-sidebar button span,.command-sidebar>a span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
 .sidebar-help{display:none}
 .command-nav+.teacher-account{margin-left:auto}
 .account-menu{max-width:calc(100vw - 24px)}
 .teacher-portal .command-sidebar button,.teacher-portal .command-sidebar>a{justify-content:center}
 .teacher-auth main,.command-sidebar-collapsed.teacher-auth main,.teacher-auth .command-footer{margin-left:72px}
 .teacher-auth #status:not(:empty){left:88px}
 .teacher-auth main{padding:20px}
 .teacher-auth #dashboard:not([hidden]){grid-template-columns:minmax(0,1fr)}
 .command-logo span{display:block}
 .command-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 #command-actions-open{display:inline-flex;grid-column:1;justify-self:start}
 .command-right{display:none}
 .command-actions-open .command-right{display:flex;flex-direction:column;position:fixed;top:92px;right:12px;bottom:12px;z-index:65;width:min(380px,calc(100vw - 24px));overflow:auto;padding:14px;background:var(--t-bg);border:1px solid var(--t-line);border-radius:var(--r-lg);box-shadow:0 24px 64px rgba(29,40,52,.2)}
 .teacher-portal.command-actions-open #command-actions-close{display:flex;width:100%;margin:0 0 10px;justify-content:center}
 .student-list article.student{grid-template-columns:130px 90px 1fr 150px}}
/* <=768: single column, nav moves into the existing Menu button */
@media(max-width:768px){
 .command-header{height:68px;gap:10px}
 .command-logo img{height:44px}
 .command-logo span{display:none}
 .teacher-account summary span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
 .teacher-account summary{padding:10px 12px}
 .teacher-auth #command-menu{display:inline-flex;order:3}
 .teacher-auth .command-sidebar{display:none;top:68px;width:260px;box-shadow:16px 0 48px rgba(29,40,52,.18)}
 .teacher-auth.command-menu-open .command-sidebar{display:flex}
 .command-menu-open .command-sidebar span,.command-menu-open .sidebar-help{display:inline;position:static;width:auto;height:auto;overflow:visible;clip:auto;clip-path:none}
 .command-menu-open .sidebar-help{display:block}
 .teacher-portal.command-menu-open .command-sidebar button,.teacher-portal.command-menu-open .command-sidebar>a{justify-content:flex-start}
 .command-sidebar #sidebar-collapse{display:none!important}
 .teacher-auth main,.command-sidebar-collapsed.teacher-auth main,.teacher-auth .command-footer,.command-sidebar-collapsed.teacher-auth .command-footer{margin-left:0}
 .teacher-auth main{padding:18px 14px}
 .teacher-auth #status:not(:empty),.command-sidebar-collapsed.teacher-auth #status:not(:empty){left:14px;right:14px;bottom:14px;max-width:none}
 .heading{display:block}
 .command-class{width:100%;margin-top:14px}
 .teacher-tabs{flex-wrap:nowrap;overflow-x:auto;width:auto}
 .teacher-portal .teacher-tabs button{flex-shrink:0}
 .command-live-controls>span{margin-left:0;width:100%}
 .monitor-controls label{flex-basis:40%;min-width:0}
 .monitor-controls label:has(#student-filter){flex-basis:100%}
 .student-grid,.command-gallery .student-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .teacher-portal .student-list article.student{display:block}
 .command-extra,#manage,#print-panel,#safety-panel{padding:16px}
 .teacher-portal .student-drawer{width:100vw;padding:18px;border-radius:0}
 .teacher-portal dialog{padding:18px}
 .command-actions-open .command-right{top:80px}
 .command-right #command-actions-close{position:sticky;top:0;z-index:2}}
@media(max-width:480px){
 .student-grid,.command-gallery .student-grid{grid-template-columns:1fr}
 .command-metrics{grid-template-columns:1fr}
 .monitor-controls label{flex-basis:100%}
 .heading h1{font-size:28px}
 .teacher-portal #command-menu{padding:10px}
 #command-menu{font-size:0;gap:0}
 #command-menu .ic{width:22px;height:22px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
