/* Only authenticated platform pages use these rules. Login and /family stay unchanged. */
html:has(body.platform-workspace){scroll-padding-top:80px}
body.platform-workspace{--workspace-gap:6px}
body.platform-workspace #attendance-report-detail{scroll-margin-top:0}
body.platform-workspace .topbar h1{min-width:0;font-size:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.platform-workspace #content{padding:12px 0 20px;min-width:0}
body.platform-workspace #content [hidden]{display:none!important}
body.platform-workspace #content .workspace-duplicate-title{display:none}
body.platform-workspace #content :is(.empty,.loading){padding:12px;min-height:0}
body.platform-workspace #content .card{min-width:0;width:100%;margin:0;padding:10px 12px;border-radius:10px}
body.platform-workspace #content>.card+.card,body.platform-workspace #content [style*="margin-top"]{margin-top:8px!important}
body.platform-workspace #content :is(h2,h3){margin:0 0 8px}
body.platform-workspace #content :is(p,dl){margin-block:6px;line-height:1.6}
body.platform-workspace #content :is(input,select,textarea){font-size:14px;padding:6px 8px;border-radius:7px;max-width:100%}
body.platform-workspace #content input:not([type=checkbox]):not([type=radio]):not([type=hidden]),body.platform-workspace #content select{min-height:32px}
body.platform-workspace #content input[type=checkbox],body.platform-workspace #content input[type=radio]{width:18px;height:18px;min-height:0;padding:0;flex:none}
body.platform-workspace #content textarea{width:100%;min-height:5em;resize:vertical;line-height:1.6}
body.platform-workspace #content :is(button,.button-link){font-size:13px;line-height:1.5;min-height:30px;padding:5px 9px;white-space:nowrap}
body.platform-workspace #content .layout-row{display:flex;align-items:end;flex-wrap:nowrap;gap:var(--workspace-gap);max-width:100%;min-width:0;overflow-x:auto;padding-bottom:2px;margin:0 0 8px}
body.platform-workspace #content .layout-row>label{display:grid;flex:none;gap:3px;max-width:100%;font-size:13px;width:auto;grid-column:auto}
body.platform-workspace #content .layout-row :is(.checkbox-label,.switch-label,.meeting-publish){display:flex;align-items:center;white-space:nowrap;min-height:32px}
body.platform-workspace #content .layout-row>label:has(input[type=checkbox]){display:flex;align-items:center;white-space:nowrap;min-height:32px}
body.platform-workspace #content .layout-row>button,body.platform-workspace #content .layout-row>.interval-actions{flex:none;margin-left:0;grid-area:auto}
body.platform-workspace #content .layout-row input:not([type=checkbox]):not([type=radio]):not([type=hidden]){width:12em}
body.platform-workspace #content .layout-row input[type=date]{width:9.5em;min-width:9.5em}
body.platform-workspace #content .layout-row input[type=time]{width:7em;min-width:7em}
body.platform-workspace #content .layout-row input[type=datetime-local]{width:15em;min-width:15em}
body.platform-workspace #content .layout-row input[type=number]{width:6em;min-width:4em}
body.platform-workspace #content .layout-row select{field-sizing:content;width:auto;min-width:6em;max-width:16em}
body.platform-workspace #content .layout-row :is(.meeting-title-field,.project-title-field,.discipline-title,.dossier-entry-title){flex:0 0 auto}
body.platform-workspace #content .layout-row :is(.meeting-title-field,.project-title-field,.discipline-title,.dossier-entry-title) input{width:16em}
body.platform-workspace #content .interval-primary-row{margin:0}
body.platform-workspace #content .interval-primary-row input[type=date]{width:128px;min-width:128px}
body.platform-workspace #content .interval-primary-row select{min-width:0}
body.platform-workspace #content :is(.grid,.dossier-summary-grid,.discipline-page,.dossier-detail,.student-hub-grid){gap:8px}
body.platform-workspace #content :is(.table-wrap,.interval-history){max-width:100%;margin-top:8px}
body.platform-workspace #content .workspace-table :is(th,td){padding:5px 8px;vertical-align:middle;font-size:14px}
body.platform-workspace #content .workspace-table th{white-space:nowrap;text-align:center}
body.platform-workspace #content .workspace-table td{white-space:nowrap;text-align:center}
body.platform-workspace #content .workspace-table .report-students{text-align:left}
body.platform-workspace #content .workspace-table .report-students,body.platform-workspace #content .discipline-student-table td{white-space:normal}
body.platform-workspace #content .todo-table .todo-topic{min-width:12em;white-space:nowrap}
body.platform-workspace #content .workspace-table input[type=number]{width:6em}
body.platform-workspace #content .workspace-table input[type=time]{width:7em}
body.platform-workspace #content .workspace-table input[type=text],body.platform-workspace #content .workspace-table input:not([type]){width:12em}
body.platform-workspace #content .workspace-table td:has(textarea){white-space:normal;min-width:14em}
body.platform-workspace #content :is(.history-pagination,.interval-history-footer,.care-actions){display:flex;gap:6px;align-items:center;margin-top:8px;min-height:30px;flex-wrap:wrap}
body.platform-workspace #content :is(.dossier-heading,.discipline-page-heading,.teacher-duty-heading,.leave-heading,.todo-heading){gap:8px;align-items:center;margin-bottom:8px;flex-wrap:wrap}
body.platform-workspace #content .workspace-disclosure>summary{cursor:pointer;font-weight:700;list-style:revert;margin:0}
body.platform-workspace #content .workspace-disclosure[open]>summary{margin-bottom:8px}
body.platform-workspace #content .care-grid{gap:8px;margin:8px 0;grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}
body.platform-workspace #content .care-grid label{gap:4px;font-size:14px}
body.platform-workspace #content .care-grid select{width:9em;justify-self:start}
body.platform-workspace #content .registrations form{max-width:none;gap:8px}
body.platform-workspace #content .registrations :is(input[name=title],input[type=file]){width:20em;max-width:100%}
body.platform-workspace #content .student-hub-card{min-height:72px;padding:12px;gap:4px;white-space:normal}
body.platform-workspace #content .student-hub-card span{font-size:13px}
body.platform-workspace #content .account-card{max-width:none}
body.platform-workspace #content .todo-page>.layout-row{margin-top:8px}
body.platform-workspace #content .registration-table th:nth-child(1){width:100%}
body.platform-workspace #content .registration-table td:first-child{min-width:12em;max-width:28em;white-space:normal}
body.platform-workspace #content .badge{font-size:13px;white-space:nowrap}
@media(min-width:761px) and (max-width:1150px){
 body.platform-workspace #content .layout-row :is(input,select){font-size:12px}
 body.platform-workspace #content .layout-row input[type=date]{width:9.5em;min-width:9.5em}
 body.platform-workspace #content .layout-row input[type=datetime-local]{width:15em;min-width:15em}
 body.platform-workspace #content .interval-primary-row input[type=date]{width:108px;min-width:108px}
}
@media(max-width:760px){
 body.platform-workspace .topbar h1{font-size:18px}
 body.platform-workspace #content .card{padding:10px}
 body.platform-workspace #content :is(button,.button-link){min-height:34px}
 body.platform-workspace #content .layout-row{flex-wrap:wrap;overflow:visible;gap:6px}
 body.platform-workspace #content .layout-row input{max-width:100%;min-width:0}
 body.platform-workspace #content .layout-row input[type=datetime-local]{width:15em;min-width:0}
 body.platform-workspace #content .layout-row>label{max-width:100%;min-width:0}
 body.platform-workspace #content .interval-primary-row{display:grid;grid-template-columns:1fr 1fr}
 body.platform-workspace #content .interval-primary-row>.interval-boundary,body.platform-workspace #content .interval-primary-row>.interval-actions{grid-column:1/-1}
 body.platform-workspace #content .interval-primary-row input[type=date]{width:100%;min-width:0}
 body.platform-workspace #content .interval-primary-row select{width:100%;min-width:0}
 body.platform-workspace #content .workspace-table :is(th,td){padding:5px 7px}
 body.platform-workspace #content .care-grid{grid-template-columns:minmax(0,1fr)}
 body.platform-workspace #content .layout-row.dossier-entry-fields{flex-wrap:wrap}
 body.platform-workspace #content .student-hub-grid{grid-template-columns:1fr 1fr}
 body.platform-workspace #content .workspace-table td:has(textarea){min-width:0}
}
body.platform-workspace .dossier-source-dialog{padding:12px;max-width:calc(100vw - 24px)}
body.platform-workspace .dossier-source-dialog :is(button,.button-link){font-size:13px;min-height:30px;padding:5px 9px}
body.platform-workspace .dossier-source-dialog h2{font-size:20px;margin:0 0 8px}
body.platform-workspace #content .care-row-actions{display:flex;gap:6px;flex-wrap:wrap}
body.platform-workspace #content .project-roster{grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr))}
body.platform-workspace #content .project-roster-row{grid-template-columns:minmax(0,1fr) 80px max-content;min-width:0}
body.platform-workspace #content .project-roster-row>label{display:flex;align-items:center;gap:4px;min-width:0;font-size:14px}
body.platform-workspace #content .project-roster-row select{width:80px;min-width:0}
body.platform-workspace #content #care-publish{display:flex;align-items:end;gap:6px;flex-wrap:wrap}
body.platform-workspace #content #care-publish>label{order:1;flex:none;max-width:100%;font-size:13px}
body.platform-workspace #content #care-publish input[name=title]{width:20em;max-width:100%}
body.platform-workspace #content #care-publish>button{order:2}
body.platform-workspace #content #care-publish>details{order:3;flex-basis:100%;margin-top:2px}
body.platform-workspace #content .layout-row>.interval-boundary,body.platform-workspace #content .layout-row>.leave-boundary{flex:none}
body.platform-workspace #content :is(.roster-row-actions,.guardian-row-actions){flex-wrap:nowrap;overflow:visible;margin:0;padding:0}
/* Keep dossier list labels beside their controls, including on narrow screens. */
body.platform-workspace #content .dossier-list .dossier-list-toolbar{align-items:center;flex-wrap:nowrap;overflow-x:auto;margin:0;padding-bottom:2px}
body.platform-workspace #content .dossier-list .dossier-list-toolbar>label{display:flex;align-items:center;gap:5px;min-width:max-content;white-space:nowrap}
body.platform-workspace #content .dossier-list .dossier-list-toolbar input{width:10em}
body.platform-workspace #content .dossier-list .dossier-list-toolbar select{width:6em;min-width:0;max-width:none}
body.platform-workspace #content .dossier-list .dossier-list-toolbar #dossier-page-size{width:5em}
body.platform-workspace #content :is(.dossier-list,.dossier-detail) table :is(th,td){text-align:center}
body.platform-workspace #content .dossier-table .sort-button{min-height:0;padding:4px 16px 4px 4px}
/* Shared short fields follow the dossier's inline label/control convention. */
body.platform-workspace #content .layout-row:not(.interval-primary-row){align-items:center}
body.platform-workspace #content .layout-row:not(.interval-primary-row)>label:not(:has(textarea)){display:flex;align-items:center;gap:5px;white-space:nowrap;min-width:max-content}
body.platform-workspace #content .attendance-submit-row.layout-row{flex-wrap:wrap;overflow:visible;align-items:center}
body.platform-workspace #content .attendance-progress{font-size:13px;white-space:normal}
body.platform-workspace #content :is(.care-grid>label,#care-publish>label,.registrations form>label:has(input[name=title])){display:flex;align-items:center;gap:5px;white-space:nowrap;overflow-x:auto;font-size:13px}
body.platform-workspace #content .care-grid input{width:12em;min-width:0;flex:none}
body.platform-workspace #content .care-grid select{flex:none}
body.platform-workspace #content #care-publish input[name=title]{width:14em;min-width:0;flex-shrink:1}
body.platform-workspace #content .registrations input[name=title]{width:12em;flex:none}
@media(max-width:760px){
 body.platform-workspace #content .layout-row:not(.interval-primary-row){flex-wrap:nowrap;overflow-x:auto}
 body.platform-workspace #content .attendance-submit-row.layout-row{flex-wrap:wrap;overflow:visible}
}
/* These management pages follow the compact dossier list: label, then control. */
body.platform-workspace #content :is(.committee-toolbar,.committee-option-form,.discipline-main-fields,.discipline-roster-controls,.todo-page>.toolbar,.activity-management>.toolbar,.weekend-setup-row,.weekend-blackout-fields,#weekend-calendar-review){display:flex;align-items:center;flex-wrap:nowrap;gap:6px;overflow-x:auto;max-width:100%;min-width:0;margin:0;padding-bottom:2px}
body.platform-workspace #content :is(.committee-toolbar,.committee-option-form,.discipline-main-fields,.discipline-roster-controls,.todo-page>.toolbar,.activity-management>.toolbar,.weekend-setup-row,.weekend-blackout-fields,#weekend-calendar-review)>label{display:flex;flex:none;align-items:center;justify-content:flex-start;gap:5px;width:auto;min-width:max-content;max-width:none;white-space:nowrap;font-size:13px}
body.platform-workspace #content :is(.committee-toolbar,.committee-option-form,.discipline-main-fields,.discipline-roster-controls,.todo-page>.toolbar,.activity-management>.toolbar,.weekend-setup-row,.weekend-blackout-fields,#weekend-calendar-review)>:is(button,span,.committee-option-actions){flex:none}
body.platform-workspace #content :is(.committee-toolbar,.discipline-roster-controls) input:not([type=checkbox]){width:10em;min-width:0}
body.platform-workspace #content .committee-toolbar #committee-page-size{width:5em;min-width:0;max-width:none}
body.platform-workspace #content :is(.committee-table,.discipline-page table,.todo-page table,.activity-management table,.weekend-page table) :is(th,td){text-align:center}
body.platform-workspace #content .committee-table :is(th,td){height:auto}
body.platform-workspace #content .committee-option-list :is(.committee-option-list-head,.committee-option-list-row){text-align:center;gap:6px;min-height:36px}
body.platform-workspace #content .committee-option-row-actions{justify-content:center}
body.platform-workspace #content .todo-rule-grid{grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:6px;margin:8px 0}
body.platform-workspace #content .todo-rule-grid>label{flex-direction:row;align-items:center;justify-content:flex-start;gap:5px;white-space:nowrap;font-size:13px}
body.platform-workspace #content .todo-rule-grid :is(input,select){flex:none;min-width:0;width:12em}
body.platform-workspace #content .todo-rule-grid input[type=number]{width:5em}
body.platform-workspace #content .todo-rule-grid input[type=datetime-local]{width:15em}
body.platform-workspace #content .todo-rule-grid select{width:auto;max-width:12em}
body.platform-workspace #content :is(#todo-exempt,#todo-weekend){display:flex;align-items:center;flex-wrap:nowrap;gap:6px;overflow-x:auto;max-width:100%}
body.platform-workspace #content :is(#todo-exempt,#todo-weekend)>label{display:flex;flex:none;align-items:center;gap:5px;white-space:nowrap;font-size:13px}
body.platform-workspace #content #todo-exempt input{width:12em}
body.platform-workspace #content :is(#todo-exempt,#todo-weekend)>p{flex:none;margin:0}
body.platform-workspace #content .todo-heading h2{margin-right:0}
body.platform-workspace #content .todo-heading button{flex:none}
body.platform-workspace #content :is(.discipline-roster-controls,.committee-option-form){margin-top:8px}
body.platform-workspace #content .discipline-student-table tr:not(.selected) textarea{height:32px;min-height:32px;resize:none}
body.platform-workspace #content .weekend-batch{margin-top:8px;padding-top:8px}
body.platform-workspace #content .weekend-page form[data-answer]{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
body.platform-workspace #content .weekend-page form[data-answer]>label{display:flex;align-items:center;gap:5px;white-space:nowrap}
@media(max-width:760px){
 body.platform-workspace #content .committee-table-wrap,body.platform-workspace #content .discipline-student-wrap{overflow:auto;border:1px solid var(--line);background:#fff}
 body.platform-workspace #content .committee-table,body.platform-workspace #content .discipline-student-table{display:table;width:max-content;min-width:100%}
 body.platform-workspace #content :is(.committee-table,.discipline-student-table) thead{display:table-header-group}
 body.platform-workspace #content :is(.committee-table,.discipline-student-table) tbody{display:table-row-group}
 body.platform-workspace #content .committee-table tr[data-committee-row],body.platform-workspace #content .discipline-student-table tr{display:table-row;padding:0;border:0}
 body.platform-workspace #content .committee-table tr[data-committee-row] td,body.platform-workspace #content .discipline-student-table td,body.platform-workspace #content .discipline-student-table tr:not(.selected) td:nth-child(n+4){display:table-cell;height:auto;padding:5px 7px;border-bottom:1px solid var(--line);white-space:nowrap}
 body.platform-workspace #content :is(.committee-table,.discipline-student-table) td::before{display:none!important}
 body.platform-workspace #content .discipline-student-table textarea{min-width:18em}
 body.platform-workspace #content .discipline-student-table :is(select,input[type=date]){width:auto;min-width:9em}
}
@media(max-width:760px){
 body.platform-workspace #content .meeting-table tr[data-meeting-row] td{grid-template-columns:max-content minmax(0,1fr)}
 body.platform-workspace #content .meeting-table tr[data-meeting-row] td[data-label="日期"]{grid-column:1;grid-row:1}
 body.platform-workspace #content .meeting-table tr[data-meeting-row] td[data-label="状态"]{grid-column:2;grid-row:1}
 body.platform-workspace #content .meeting-table tr[data-meeting-row] td[data-label="标题"]{grid-column:1/-1;grid-row:2}
 body.platform-workspace #content .meeting-table tr[data-meeting-row] :is(td[data-label="已发布时长"],td[data-label="确认进度"]){grid-column:1/-1}
 body.platform-workspace #content :is(.student-home-shortcut,.student-todo,.student-hub-card,.student-button){white-space:normal;overflow-wrap:anywhere}
 body.platform-workspace #content .student-home-shortcut{font-size:12px;padding:6px 4px;min-height:40px}
 body.platform-workspace #content .student-todo{font-size:14px;min-height:48px}
}

@media(max-width:760px){
 body.platform-workspace #content .attendance-submit-row.layout-row>button{flex:none}
 body.platform-workspace #content .attendance-submit-row.layout-row>span{flex-basis:100%;min-width:0}
}
