.teacher-workspace{--ink:#102d43;--blue:#286c60;--paper:#fbf7ef;--white:#fffdfa;--line:#e6e2da;--muted:#536f83;--pale:#e4f1eb;background:var(--paper);color:var(--ink);font-family:'Segoe UI',Tahoma,sans-serif}
.teacher-workspace main{padding:24px;max-width:1100px}
.teacher-workspace :is(button,input,select){border-radius:12px;font-family:inherit}
.teacher-workspace button{display:inline-flex;align-items:center;justify-content:center;gap:6px;font-size:.8125rem}
.teacher-workspace .sh-icon{width:18px;height:18px;flex-shrink:0}
.teacher-workspace h1{font:700 1.5rem 'Segoe UI',Tahoma,sans-serif;margin:0}
.teacher-workspace h2{font-size:1.125rem}.teacher-workspace h3{font-size:1rem;margin:0}
.tw-context{display:flex;align-items:center;gap:12px;margin-bottom:20px;color:var(--muted);font-size:.8125rem}
.tw-context select{max-width:280px;background:var(--white)}
.tw-heading{margin:16px 0}.tw-heading p{margin:6px 0 0;color:var(--muted);font-size:.8125rem}
.tw-search{display:flex;align-items:center;gap:8px;padding:0 12px;background:var(--white);border:1px solid var(--line);border-radius:12px;margin-bottom:16px;max-width:520px}
.tw-search input{border:0;background:transparent;padding:10px 0;min-width:0}
.tw-section-title{margin:18px 0 10px}
.tw-classes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.tw-panel{background:var(--white);border:1px solid var(--line);border-radius:18px;padding:16px;margin-top:12px}
.tw-lesson-detail{max-width:820px;padding:22px}.tw-lesson-detail>header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding-bottom:18px;border-bottom:1px solid var(--line)}
.tw-lesson-detail>header p{margin:4px 0}.tw-lesson-detail>header time{color:var(--muted);font-size:.8125rem;white-space:nowrap}
.tw-lesson-portions,.tw-lesson-notes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:18px}.tw-lesson-portion,.tw-lesson-note,.tw-lesson-next{padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--paper)}
.tw-lesson-portion>div{display:flex;align-items:center;justify-content:space-between;gap:12px}.tw-lesson-portion p{font-weight:700}.tw-lesson-portion h4{margin:14px 0 6px;font-size:.8125rem}.tw-lesson-portion ul{margin:0;padding-inline-start:20px;color:var(--muted);font-size:.8125rem}
.tw-lesson-note p{margin-bottom:0;white-space:pre-wrap}.tw-lesson-note--staff{border-inline-start:3px solid #86552f;background:#f8efe1}.tw-lesson-next{margin-top:18px}.tw-lesson-next h2{margin-top:0}
.tw-class{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0}
.tw-class p{margin:6px 0;color:var(--muted);font-size:.8125rem}.tw-class small{color:var(--muted)}
.tw-class button{color:#86552f;background:#f4e9d7;white-space:nowrap}
.tw-students{display:grid;gap:8px}
.tw-student{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;background:var(--white);border:1px solid var(--line);border-radius:18px}
.tw-student-info{min-width:0}.teacher-workspace .tw-name{padding:0;min-height:32px;font-size:1rem;font-weight:700;border:0;background:transparent;justify-content:flex-start;text-align:start}
.tw-student p{font-size:.8125rem;margin:2px 0 4px;overflow-wrap:anywhere}.tw-student small,.tw-muted{color:var(--muted);font-size:.75rem}
.tw-row-actions{display:flex;gap:6px;flex-shrink:0}
.teacher-workspace .tw-record{color:#86552f;background:#f4e9d7;border-color:#eadbc4}
.teacher-workspace .tw-attended{color:#286c60;background:#e4f1eb;opacity:1;border-color:#c7ddd2}
.tw-warning{color:#b75d50}
.teacher-workspace .demo,.teacher-workspace aside{display:none}
.teacher-workspace .shell{display:block;min-height:100vh}
.teacher-workspace main{max-width:none;margin:0;padding:20px 28px;padding-inline-start:248px}
.tw-shell-header{display:flex;align-items:center;gap:10px;margin-bottom:18px;max-width:480px}
.tw-shell-header select{min-width:0;background:var(--white)}
.tw-brand{color:#86552f}.teacher-workspace .tw-brand .sh-icon{width:30px;height:32px}
.tw-navigation{position:fixed;inset-inline-start:0;top:0;bottom:0;width:220px;margin:0;padding:28px 16px;background:var(--white);border-inline-end:1px solid var(--line);display:flex;flex-direction:column;gap:8px;z-index:4}
.teacher-workspace .tw-navigation button{justify-content:flex-start;min-height:48px;border:0;color:var(--muted);gap:10px}
.teacher-workspace .tw-navigation button[aria-current='page']{background:#f4e9d7;color:#67232e;font-weight:700}
.tw-more-actions{display:flex;gap:8px;flex-wrap:wrap}
/* Home-only composition. Class, lesson and other role layouts retain their rules. */
.teacher-workspace:has(.tw-home){background:var(--sh-background);font-family:var(--sh-font);color:var(--ink)}
html[lang=ar] .teacher-workspace:has(.tw-home){font-family:var(--sh-arabic)}
.teacher-workspace:has(.tw-home) main{padding-top:22px;padding-inline-end:32px}
.teacher-workspace:has(.tw-home) .tw-shell-header{max-width:360px;margin-bottom:24px;gap:12px}
.teacher-workspace:has(.tw-home) .tw-shell-header select{font-size:13px;padding:8px 12px;min-height:44px;background:var(--sh-surface);border-color:var(--sh-border)}
.teacher-workspace:has(.tw-home) :is(button,input,select):focus-visible{outline:3px solid var(--sh-primary);outline-offset:3px}
.tw-home{max-width:1240px;margin-inline:auto}
.teacher-workspace .tw-home h1{font-family:inherit;font-size:28px;color:var(--sh-earth);line-height:1.55}
.teacher-workspace .tw-home-welcome{display:flex;flex-direction:row;align-items:center;justify-content:space-between;text-align:start;gap:16px;padding:0 0 22px;border-bottom:1px solid var(--sh-border);margin-bottom:24px}
.tw-home-welcome p{margin:4px 0;color:var(--sh-text);font-size:13px;line-height:1.7}
.tw-home-welcome p:first-child{font-size:11px;color:var(--sh-earth)}
.teacher-workspace .tw-home-emblem .sh-icon{width:52px;height:58px;color:var(--sh-gold);opacity:.55}
.tw-home-layout{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(260px,1fr);gap:24px;align-items:start}
.tw-home-primary,.tw-home-secondary{min-width:0}.tw-home-secondary{display:grid;gap:16px}
.teacher-workspace .tw-home h2{font-size:17px;font-weight:700;margin:0 0 14px;display:flex;align-items:center;gap:8px}
.tw-home-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:28px}
.tw-home-summary>div{display:grid;grid-template-columns:auto 1fr;gap:6px 10px;padding:14px 12px;border-radius:var(--sh-radius);background:var(--sh-surface);border:1px solid var(--sh-border)}
.tw-home-summary .sh-icon{color:var(--sh-earth);align-self:center}.tw-home-summary strong{font-size:24px;line-height:1.2}.tw-home-summary span{grid-column:1/-1;font-size:11px;color:var(--sh-text);line-height:1.7}
.tw-home-summary>div:nth-child(2){background:var(--sh-soft-green)}.tw-home-summary>div:nth-child(2) .sh-icon{color:var(--sh-primary)}
.tw-home-section-head{display:flex;align-items:center;gap:8px;margin-bottom:12px}.tw-home-section-head h2{margin:0!important}.tw-home-section-head>span{font-size:12px;color:var(--sh-earth);background:var(--sh-soft-gold);border-radius:20px;padding:2px 9px}
.tw-home-section-head .tw-add-student{min-height:40px;margin-inline-start:auto;padding:8px 14px;border:0;border-radius:11px;background:#86552f;color:#fffdf9;font-size:.82rem;font-weight:700;white-space:nowrap}
.tw-home .tw-search{max-width:none;margin-bottom:14px}.tw-home .tw-search input{font-size:13px;min-height:44px}
.tw-home-classes{display:grid;gap:14px}
.tw-home-card{background:var(--sh-surface);border:1px solid var(--sh-border);border-radius:var(--sh-radius);padding:18px;box-shadow:0 3px 12px #86552f03}
.tw-home .tw-class{display:block;border-inline-start:3px solid var(--sh-gold)}
.tw-home-class-heading{display:flex;gap:14px;align-items:center}.tw-home-class-heading h3{font-size:18px;line-height:1.6}.tw-home-class-heading p{font-size:12px;margin:2px 0;line-height:1.7;overflow-wrap:anywhere}
.tw-home-icon{display:grid;place-items:center;width:46px;height:46px;border-radius:14px;background:var(--sh-soft-gold);color:var(--sh-earth);flex:none}.teacher-workspace .tw-home-icon .sh-icon{width:24px;height:24px}
.tw-home-class-stats{display:flex;flex-wrap:wrap;gap:8px 16px;margin:18px 0 12px;padding-block:12px;border-block:1px solid var(--sh-border);font-size:11px;color:var(--sh-text)}.tw-home-class-stats span{display:flex;gap:5px;align-items:center}
.tw-home .tw-class>button{background:transparent;color:var(--sh-earth);border:0;padding:4px 0;min-height:44px;font-weight:700;gap:12px}
.tw-home-attention h2 .sh-icon{color:var(--sh-revision)}.tw-home-attention>small{font-size:10px;line-height:1.7;color:var(--sh-text);display:block;margin-top:12px}
.tw-home-clear{display:flex;gap:8px;align-items:flex-start;padding:12px;background:var(--sh-soft-green);border-radius:12px;color:var(--sh-primary);font-size:12px;line-height:1.8;margin:0}
.teacher-workspace .tw-home-person{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:4px;width:100%;text-align:start;padding:12px 0;min-height:60px;border:0;border-bottom:1px solid var(--sh-border);border-radius:0;background:transparent;white-space:normal}
.tw-home-person:last-of-type{border-bottom:0}.tw-home-person strong{font-size:14px}.tw-home-person span,.tw-home-person small{font-size:11px;color:var(--sh-text);line-height:1.7}.tw-home-person>.sh-icon{position:absolute;inset-inline-end:0;top:16px;color:var(--sh-earth)}
.tw-home-attention .tw-home-person span{color:var(--sh-revision)}
@media(min-width:768px) and (max-width:1100px){.tw-home-layout{grid-template-columns:minmax(0,1.4fr) minmax(220px,1fr);gap:16px}.tw-home-summary{gap:6px}.tw-home-summary>div{padding:12px 8px}}
@media(max-width:767px){
 .teacher-workspace:has(.tw-home) main{padding:14px 16px calc(100px + env(safe-area-inset-bottom))}
 .teacher-workspace:has(.tw-home) .tw-shell-header{max-width:none;margin-bottom:18px}
 .teacher-workspace .tw-home h1{font-size:23px}.teacher-workspace .tw-home-welcome{padding-bottom:16px;margin-bottom:18px}.tw-home-welcome p{font-size:12px}.teacher-workspace .tw-home-emblem .sh-icon{width:36px;height:42px}
 .tw-home-layout{grid-template-columns:1fr;gap:18px}.tw-home-summary{gap:7px;margin-bottom:22px}.tw-home-summary>div{padding:12px 9px;gap:6px}.tw-home-summary strong{font-size:22px}.tw-home-summary span{font-size:10px}
 .tw-home-card{padding:16px}.tw-home-class-heading h3{font-size:17px}.tw-home-class-stats{gap:6px 12px;margin-top:12px}.tw-home-secondary{gap:14px}
}
@media(max-width:650px){
 .teacher-workspace .demo{min-height:34px;background:var(--paper);color:var(--muted);padding:0 14px;justify-content:flex-end}.teacher-workspace #demoLabel{display:none}.teacher-workspace .demo button{color:var(--ink);border:0;min-height:34px}
 .teacher-workspace aside{display:flex;flex-direction:row;align-items:center;gap:10px;padding:6px 14px 12px}.teacher-workspace aside .brand{font-size:.8125rem;white-space:nowrap}.teacher-workspace aside .mark{font-size:22px;line-height:32px;padding:0 8px}.teacher-workspace aside select{margin:0;flex:1;min-width:0;font-size:.75rem;padding:8px}.teacher-workspace aside nav{display:none}
 .teacher-workspace main{padding:14px}
 .tw-context{gap:8px;margin-bottom:14px}.tw-context label{max-width:95px}.tw-context select{flex:1;min-width:0}
 .tw-classes{grid-template-columns:1fr}.tw-class{padding:12px}
 .tw-student{padding:8px 12px;flex-wrap:wrap;gap:4px}
 .tw-student-info{flex:1 1 100%}
 .tw-row-actions{width:100%;justify-content:flex-end}.tw-row-actions button{padding:7px 10px;min-height:40px}
 .teacher-workspace h1{font-size:1.3rem}.tw-panel{padding:12px}.tw-lesson-detail>header{display:block}.tw-lesson-detail>header time{display:block;margin-top:10px}.tw-lesson-portions,.tw-lesson-notes{grid-template-columns:1fr}
}
@media(max-width:767px){
 .teacher-workspace .demo,.teacher-workspace aside{display:none}
 .teacher-workspace main{padding:12px 14px calc(90px + env(safe-area-inset-bottom))}
 .tw-shell-header{margin-bottom:12px;max-width:none}
 .tw-heading{margin:12px 0}.tw-heading p{margin-top:4px}
 .tw-navigation{inset-inline:0;top:auto;bottom:0;width:auto;flex-direction:row;justify-content:space-around;border:1px solid var(--line);border-radius:20px 20px 0 0;padding:6px 5px calc(6px + env(safe-area-inset-bottom));gap:2px;background:#fffdfaf5}
 .teacher-workspace .tw-navigation button{flex:1;min-width:0;min-height:54px;flex-direction:column;justify-content:center;gap:4px;padding:4px 2px;font-size:.6875rem;white-space:normal}
 .teacher-workspace .tw-navigation button[aria-current='page']{background:transparent;color:#67232e;border:0}
 .teacher-workspace .tw-navigation .sh-icon{width:22px;height:22px}
}
