/* Shared domain-workspace language. Students, Teachers, Classes and future pages inherit this structure. */
.workspace-head,.student-page-head,.teacher-page-head{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.65rem 1rem;align-items:center;margin:0 0 .55rem;padding:.72rem .8rem;border:1px solid var(--line);border-radius:1rem;background:linear-gradient(125deg,var(--surface-1),color-mix(in srgb,var(--primary) 5%,var(--surface-2)) 52%,color-mix(in srgb,var(--secondary) 7%,var(--surface-1)));box-shadow:var(--shadow-xs);overflow:hidden}
.workspace-head:before,.student-page-head:before,.teacher-page-head:before{content:"";position:absolute;inset:0 auto 0 0;width:.24rem;background:linear-gradient(var(--secondary),var(--primary))}
.workspace-title,.student-page-title>div:first-child,.teacher-page-head>div:first-child{min-width:0;padding-left:.12rem}.workspace-title>div,.teacher-title-line{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap}.workspace-head h1,.student-page-head h1,.teacher-page-head h1{margin:0;font-size:clamp(1.18rem,1.65vw,1.55rem);line-height:1;letter-spacing:-.045em}.workspace-head p:not(.eyebrow),.student-page-head p:not(.eyebrow),.teacher-page-head p:not(.eyebrow){max-width:62rem;margin:.18rem 0 0;color:var(--muted);font-size:.58rem;line-height:1.38}.workspace-live{display:inline-flex;align-items:center;gap:.28rem;min-height:1.35rem;padding:.18rem .42rem;border:1px solid var(--line);border-radius:999px;background:var(--surface-2);color:var(--muted);font-size:.45rem;font-weight:900}.workspace-live:before{content:"";width:.36rem;height:.36rem;border-radius:50%;background:var(--gold)}.workspace-live.live{color:var(--green)}.workspace-live.live:before{background:var(--green)}
.workspace-head-actions,.student-page-actions,.teacher-page-head .page-actions{display:flex;align-items:center;justify-content:flex-end;gap:.35rem;flex-wrap:wrap}.workspace-head-stats{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.34rem;padding-top:.1rem}.workspace-stat{position:relative;display:grid;grid-template-columns:auto 1fr;gap:.02rem .4rem;align-items:baseline;min-width:0;padding:.38rem .48rem;border:1px solid var(--line);border-radius:.62rem;background:var(--surface-2)}.workspace-stat strong{grid-row:1/3;font-size:.86rem;line-height:1;color:var(--primary)}.workspace-stat span{font-size:.47rem;font-weight:900;color:var(--text)}.workspace-stat small{font-size:.42rem;color:var(--muted)}.workspace-stat.green strong{color:var(--green)}.workspace-stat.gold strong{color:var(--gold)}.workspace-stat.red strong{color:var(--red)}.workspace-stat.blue strong{color:var(--blue)}
.workspace-tabs,.student-tabs,.teacher-tabs{display:grid;grid-template-columns:repeat(auto-fit,minmax(9.2rem,1fr));gap:.32rem;margin:0 0 .55rem;padding:.38rem;border:1px solid var(--line);border-radius:.86rem;background:color-mix(in srgb,var(--surface-2) 88%,transparent);box-shadow:var(--shadow-xs)}.workspace-tabs button,.student-tabs button,.teacher-tabs button{position:relative;display:grid;grid-template-columns:2rem minmax(0,1fr) auto;align-items:center;gap:.45rem;min-height:3rem;padding:.43rem .48rem;border:1px solid transparent;border-radius:.66rem;background:var(--control-ash);color:var(--muted);text-align:left}.workspace-tabs button:hover,.student-tabs button:hover,.teacher-tabs button:hover{border-color:var(--selection-line);background:var(--control-ash-hover);color:var(--text)}.workspace-tabs button.active,.student-tabs button.active,.teacher-tabs button.active{border-color:transparent;background:linear-gradient(135deg,var(--selection),var(--selection-strong));color:var(--selection-on);box-shadow:0 .3rem .8rem rgba(var(--selection-rgb),.2)}.workspace-tabs i,.student-tabs i,.teacher-tabs i{width:2rem;height:2rem;border-radius:.58rem;display:grid;place-items:center;background:var(--surface-3);color:var(--muted);font-style:normal;font-size:.66rem;font-weight:950}.workspace-tabs button.active i,.student-tabs button.active i,.teacher-tabs button.active i{background:rgba(255,255,255,.2);color:var(--selection-on)}.workspace-tabs span,.student-tabs span,.teacher-tabs span{display:grid;min-width:0}.workspace-tabs strong,.student-tabs strong,.teacher-tabs strong{font-size:.58rem;line-height:1.2}.workspace-tabs small,.student-tabs small,.teacher-tabs small{margin-top:.08rem;color:var(--muted);font-size:.44rem}.workspace-tabs b,.student-tabs b,.teacher-tabs b{min-width:1.35rem;padding:.18rem .3rem;border-radius:999px;background:var(--surface-3);color:var(--muted);font-size:.45rem;text-align:center}.workspace-tabs button.active b,.student-tabs button.active b,.teacher-tabs button.active b{background:rgba(255,255,255,.2);color:var(--selection-on)}
.workspace-warning{margin:0 0 .55rem;padding:.5rem .62rem;border:1px solid rgba(185,104,22,.24);border-radius:.7rem;background:var(--gold-soft);font-size:.53rem}.workspace-warning summary{cursor:pointer;font-weight:900;color:var(--gold)}.workspace-warning p{margin:.25rem 0 0;color:var(--muted)}
.workspace-console{padding:.66rem}.workspace-console-head,.student-console-top,.teacher-console-head{display:flex;align-items:flex-start;justify-content:space-between;gap:.7rem;margin-bottom:.5rem}.workspace-console-head h2,.student-console-top h2,.teacher-console-head h2{margin:0;font-size:.82rem;letter-spacing:-.025em}.workspace-console-head p,.student-console-top p,.teacher-console-head p{margin:.12rem 0 0;color:var(--muted);font-size:.5rem}.workspace-quick,.student-quick,.teacher-quick{display:flex;align-items:center;gap:.22rem;flex-wrap:wrap}.workspace-quick button,.student-quick button,.teacher-quick button{min-height:1.72rem;padding:.3rem .52rem;border:1px solid var(--line);border-radius:.55rem;background:var(--control-ash);color:var(--muted);font-size:.5rem;font-weight:850}.workspace-quick button:hover,.student-quick button:hover,.teacher-quick button:hover{border-color:var(--selection-line);background:var(--control-ash-hover);color:var(--text)}.workspace-quick button.active,.student-quick button.active,.teacher-quick button.active{border-color:transparent;background:var(--selection);color:var(--selection-on)}
.workspace-filter-row,.student-filters,.teacher-filters,.teacher-time-filters{display:flex;align-items:flex-end;gap:.36rem;flex-wrap:wrap;margin-bottom:.44rem;padding:.45rem;border:1px solid var(--line);border-radius:.7rem;background:var(--surface-2)}.workspace-search,.student-search{position:relative;display:flex;align-items:center;flex:1 1 19rem;min-width:11rem}.workspace-search>span,.student-search>span{position:absolute;left:.58rem;z-index:1;color:var(--primary);font-size:.7rem}.workspace-search .input,.student-search .input{padding-left:1.75rem;background:var(--surface-1)}.compact-filter{display:grid;gap:.15rem;min-width:8.8rem;flex:0 1 11rem}.compact-filter>span{padding-left:.08rem;color:var(--muted);font-size:.43rem;font-weight:900;text-transform:uppercase;letter-spacing:.06em}.compact-filter .select{min-height:2rem;padding:.38rem .5rem;background:var(--surface-1)}
.data-table{font-size:.53rem}.data-table th{position:sticky;top:0;z-index:2;padding:.48rem .54rem;background:color-mix(in srgb,var(--surface-3) 94%,transparent);font-size:.43rem;letter-spacing:.055em;text-transform:uppercase}.data-table td{padding:.5rem .54rem;vertical-align:middle}.data-table tbody tr:hover{background:color-mix(in srgb,var(--brand-soft) 46%,transparent)}.table-wrap{max-height:min(64vh,44rem);border:1px solid var(--line);border-radius:.72rem}.table-footer{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.48rem .1rem 0;color:var(--muted);font-size:.48rem}
.selection-bar{display:flex;align-items:center;gap:.35rem;margin:.42rem 0;padding:.46rem .55rem;border:1px solid rgba(var(--primary-rgb),.25);border-radius:.66rem;background:var(--brand-soft)}.selection-bar>div{display:grid;flex:1}.selection-bar strong{font-size:.56rem}.selection-bar span{font-size:.44rem;color:var(--muted)}
.record-form{grid-template-columns:minmax(10.8rem,14rem) minmax(0,1fr)}.record-guide{position:sticky;top:0;align-self:start}.record-section{border-radius:.78rem}.record-section>header{margin-bottom:.46rem}.form-field label{font-size:.48rem}.form-field small{font-size:.43rem}.input,.select,.textarea{font-size:.56rem}
@container workspace (max-width:64rem){.workspace-head,.student-page-head,.teacher-page-head{grid-template-columns:1fr}.workspace-head-actions,.student-page-actions,.teacher-page-head .page-actions{justify-content:flex-start}.workspace-head-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.workspace-tabs,.student-tabs,.teacher-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.record-form{grid-template-columns:1fr}.record-guide{position:relative}}
@container workspace (max-width:36rem){.workspace-head-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.workspace-tabs,.student-tabs,.teacher-tabs{grid-template-columns:1fr}.workspace-tabs button,.student-tabs button,.teacher-tabs button{min-height:3.25rem}.workspace-console-head,.student-console-top,.teacher-console-head{flex-direction:column}.workspace-quick,.student-quick,.teacher-quick{width:100%}.workspace-filter-row,.student-filters,.teacher-filters{align-items:stretch}.compact-filter{flex:1 1 100%}.table-footer{align-items:flex-start;flex-direction:column}}

/* Shared operational detail language */
.database-context{display:flex;align-items:center;gap:.28rem;flex-wrap:wrap;margin:-.05rem 0 .55rem;padding:.34rem .4rem;border:1px solid var(--line);border-radius:.65rem;background:linear-gradient(90deg,var(--surface-2),var(--brand-softer))}
.database-context span{display:inline-flex;align-items:baseline;gap:.2rem;min-height:1.52rem;padding:.24rem .42rem;border:1px solid var(--line);border-radius:.48rem;background:var(--surface-1);color:var(--muted);font-size:.45rem;font-weight:800}
.database-context strong{color:var(--primary);font-size:.62rem}.database-context .danger strong{color:var(--red)}.database-context em{margin-left:auto;color:var(--muted);font-size:.44rem;font-style:normal;font-weight:800}
.record-row{transition:background var(--transition),box-shadow var(--transition)}.record-row td:first-child{box-shadow:inset .16rem 0 0 transparent}.student-record-row.in-class td:first-child{box-shadow:inset .16rem 0 0 var(--green)}.student-record-row.needs-placement td:first-child{box-shadow:inset .16rem 0 0 var(--gold)}.student-record-row.left td:first-child,.teacher-record-row.inactive td:first-child,.teacher-record-row.resigned td:first-child{box-shadow:inset .16rem 0 0 var(--muted-2)}.teacher-record-row.active td:first-child{box-shadow:inset .16rem 0 0 var(--green)}.teacher-record-row.on_leave td:first-child{box-shadow:inset .16rem 0 0 var(--gold)}
.record-actions{display:flex;align-items:center;justify-content:flex-end;gap:.22rem;white-space:nowrap}.mini-btn.primary{border-color:rgba(var(--primary-rgb),.28);background:var(--brand-soft);color:var(--primary)}.mini-btn.primary:hover{background:var(--primary);color:var(--on-brand)}
.truncate-cell{display:block;max-width:13rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.role-chip{display:inline-flex;padding:.22rem .36rem;border:1px solid var(--line);border-radius:.44rem;background:var(--surface-2);font-size:.47rem;font-weight:900}.load-summary{display:grid;gap:.04rem}.load-summary strong{font-size:.64rem;color:var(--primary)}.load-summary span{color:var(--muted);font-size:.43rem}.eligibility-cell.missing{border-color:rgba(174,60,80,.2);background:var(--red-soft);color:var(--red)}
.record-health{display:grid;gap:.24rem;margin:.55rem 0;padding:.48rem;border:1px solid var(--line);border-radius:.62rem;background:var(--surface-2)}.record-health>span{display:flex;align-items:baseline;justify-content:space-between;gap:.4rem;color:var(--muted);font-size:.44rem;font-weight:800}.record-health strong{color:var(--primary);font-size:.7rem}.record-health i{position:relative;display:block;height:.35rem;border-radius:999px;background:var(--surface-4);overflow:hidden}.record-health i:after{content:"";position:absolute;inset:0 auto 0 0;width:var(--record-progress,0%);border-radius:inherit;background:linear-gradient(90deg,var(--secondary),var(--primary))}.record-health small{color:var(--muted);font-size:.41rem;line-height:1.4}
.record-steps{display:grid;gap:.2rem;margin:.55rem 0}.record-steps a{display:grid;grid-template-columns:1.35rem 1fr;align-items:center;gap:.35rem;min-height:1.75rem;padding:.26rem .34rem;border:1px solid transparent;border-radius:.5rem;color:var(--muted);font-size:.47rem;font-weight:850}.record-steps a:hover{border-color:var(--line);background:var(--surface-2);color:var(--primary)}.record-steps span{width:1.3rem;height:1.3rem;display:grid;place-items:center;border-radius:.4rem;background:var(--surface-3);color:var(--primary);font-size:.43rem;font-weight:950}.record-section{scroll-margin-top:.6rem}.record-section>header>span{box-shadow:0 .18rem .45rem rgba(var(--primary-rgb),.16)}
.student-console,.teacher-console,.teacher-times-console,.teacher-roster-console,.class-directory{box-shadow:var(--shadow-xs)}
.student-console-top,.teacher-console-head,.class-directory-head{padding:.08rem .08rem 0}
.student-quick button,.teacher-quick button,.workspace-quick button{min-height:1.9rem;padding:.34rem .58rem}.student-quick button:focus-visible,.teacher-quick button:focus-visible,.workspace-tabs button:focus-visible,.student-tabs button:focus-visible,.teacher-tabs button:focus-visible{outline:.14rem solid color-mix(in srgb,var(--primary) 45%,transparent);outline-offset:.08rem}
@container workspace (max-width:48rem){.database-context em{width:100%;margin-left:0;padding:.15rem .1rem}.record-actions{justify-content:flex-start}.truncate-cell{max-width:9rem}}
