/* Navigation only. Module content retains its existing styles. */
body.ui-teacher #teacher-shell{display:grid;grid-template-columns:232px minmax(0,1fr);width:100%;height:100dvh;overflow:hidden}
body.ui-teacher #teacher-shell.teacher-nav-collapsed{grid-template-columns:88px minmax(0,1fr)}
body.ui-teacher #teacher-shell>.main{width:auto;min-width:0;margin:0;padding-left:0;transform:none}
body.ui-teacher #teacher-shell>#sidebar{position:relative;inset:auto;z-index:20;display:flex;flex-direction:column;width:100%;height:100%;min-height:0;padding:28px 16px 20px;border-right:1px solid #ecebf4;background:#fff;transform:none;margin-left:0;pointer-events:auto;transition:none;box-shadow:none;visibility:visible;opacity:1;overflow:hidden;font-family:inherit}
body.ui-teacher #sidebar .sb-brand{display:flex;align-items:center;justify-content:flex-start;gap:12px;min-height:54px;padding:0 14px;margin:0 0 38px;border:0;background:transparent}
body.ui-teacher #sidebar .sb-brand img{width:46px;height:46px;object-fit:contain;flex-shrink:0}
body.ui-teacher #sidebar .brand-title{font-family:inherit;font-size:20px;line-height:28px;font-weight:600;letter-spacing:.06em;color:var(--text)}
body.ui-teacher #sidebar .brand-sub{font-family:inherit;font-size:12px;line-height:20px;color:var(--text-weak)}
body.ui-teacher #sidebar .sb-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}
body.ui-teacher #sidebar .sb-nav{display:grid;gap:12px;padding:0;border:0}
body.ui-teacher #sidebar .nav-item{display:flex;align-items:center;justify-content:flex-start;gap:15px;min-height:60px;margin:0;padding:16px 18px;border:0;border-radius:17px;background:transparent;box-shadow:none;font-family:inherit;font-size:16px;font-weight:600;line-height:24px;color:#69728a;text-decoration:none;white-space:nowrap;cursor:pointer}
body.ui-teacher #sidebar .nav-item::before,body.ui-teacher #sidebar .nav-item::after{display:none}
body.ui-teacher #sidebar .nav-item:hover{background:#f5f4fa}
body.ui-teacher #sidebar .nav-item.active{background:#282d43!important;color:#fff!important}
body.ui-teacher #sidebar .nav-item .icon{display:flex;width:24px;height:24px;flex:0 0 24px;margin:0;padding:0;background:transparent!important;border-radius:0;color:inherit!important}
body.ui-teacher #sidebar svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
body.ui-teacher #sidebar .teacher-nav-bottom{margin-top:auto;padding-top:20px}
body.ui-teacher #teacher-nav-collapse{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;min-height:54px;padding:14px;border:1px solid #e5e5f1;border-radius:15px;background:#f8f7fc;color:#737c95;font-family:inherit;font-size:14px;line-height:22px;cursor:pointer}
body.ui-teacher #teacher-nav-collapse:hover{background:#efedf9}
body.ui-teacher #sidebar .nav-item:focus-visible,body.ui-teacher #teacher-nav-collapse:focus-visible{outline:3px solid #a496d0;outline-offset:-3px}
body.ui-teacher .teacher-nav-collapsed #sidebar{padding-inline:12px}
body.ui-teacher .teacher-nav-collapsed #sidebar .teacher-nav-label,body.ui-teacher .teacher-nav-collapsed #sidebar .teacher-nav-brand-copy{display:none}
body.ui-teacher .teacher-nav-collapsed #sidebar .sb-brand{justify-content:center;padding:0}
body.ui-teacher .teacher-nav-collapsed #sidebar .nav-item{justify-content:center;padding-inline:0}
body.ui-teacher .teacher-nav-collapsed #teacher-nav-collapse svg{transform:rotate(180deg)}
body.ui-teacher #sb-toggle,body.ui-teacher #sb-backdrop,body.ui-teacher #sb-close{display:none!important}
body.ui-teacher #panel-prep #prep-workspace-return,body.ui-teacher #panel-tc-list .module-page-return,body.ui-teacher #panel-history>.po-head{display:none!important}
body.ui-teacher #panel-history #body-history{display:flex;flex:1;padding:0;min-height:0;overflow:hidden}
body.ui-teacher #teacher-history-frame{display:block;width:100%;height:100%;flex:1;min-height:0;border:0}
body.ui-teacher #workspace-home .workspace-intro{display:none}
@media(max-width:768px){
 body.ui-teacher #teacher-shell,body.ui-teacher #teacher-shell.teacher-nav-collapsed{grid-template-columns:72px minmax(0,1fr)}
 body.ui-teacher #teacher-shell>#sidebar{padding:24px 8px 16px}
 body.ui-teacher #sidebar .sb-brand{justify-content:center;padding:0;margin-bottom:28px}
 body.ui-teacher #sidebar .sb-brand img{width:42px;height:42px}
 body.ui-teacher #sidebar .teacher-nav-label,body.ui-teacher #sidebar .teacher-nav-brand-copy,body.ui-teacher #sidebar .trial-notice{display:none}
 body.ui-teacher #sidebar .nav-item{justify-content:center;padding-inline:0;min-height:54px}
 body.ui-teacher #teacher-nav-collapse{display:none}
}
/* School context and account belong to the permanent left navigation. */
body.ui-teacher #teacher-shell>#sidebar{overflow:visible;backdrop-filter:none;z-index:210}
body.ui-teacher #sidebar .sb-brand{padding:0 12px;margin-bottom:26px}
body.ui-teacher #sidebar .brand-sub{font-size:11px}
body.ui-teacher #sidebar #teacher-context-switcher{position:relative;width:100%;flex:0 0 auto;margin:0 0 30px;min-width:0}
body.ui-teacher #sidebar #teacher-context-switcher[hidden]{display:none}
body.ui-teacher #sidebar .teacher-context-trigger{display:flex;align-items:center;gap:10px;width:100%;min-height:66px;padding:10px 28px 10px 14px;border:1px solid #e8e5f2;border-radius:13px;background:#f8f7fc;font-family:inherit;box-shadow:none;cursor:pointer}
body.ui-teacher #sidebar .teacher-context-trigger-copy{display:block;flex:1;min-width:0;text-align:left}
body.ui-teacher #sidebar .teacher-context-trigger small{display:block;margin-bottom:3px;font-size:11px;line-height:16px;color:#8d8a9e}
body.ui-teacher #sidebar .teacher-context-trigger strong{display:block;font-size:13px;line-height:20px;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.ui-teacher #sidebar .teacher-context-trigger em{display:none}
body.ui-teacher #sidebar .teacher-context-chevron{right:12px;color:#9185b7}
body.ui-teacher #sidebar .teacher-context-trigger::before{content:'校';display:none;width:34px;height:34px;flex-shrink:0;align-items:center;justify-content:center;border-radius:10px;color:#8479ad;background:#efedf8;font-size:13px;font-weight:600}
body.ui-teacher #sidebar #teacher-context-menu,body.ui-teacher #sidebar .teacher-account-menu{position:fixed;left:var(--teacher-nav-menu-left,244px);right:auto;width:var(--teacher-nav-menu-width,360px);max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto;padding:20px;border:1px solid #e6e3ef;border-radius:16px;background:white;box-shadow:0 18px 55px rgb(40 45 67 / 15%);z-index:180}
body.ui-teacher #sidebar #teacher-context-menu{top:var(--teacher-nav-school-top,110px);bottom:auto}
body.ui-teacher #sidebar .teacher-account-menu{top:auto;bottom:20px}
body.ui-teacher #sidebar .teacher-nav-bottom{display:flex;flex-direction:column;gap:18px;border-top:1px solid #f0eef6;margin-top:18px;padding-top:18px}
body.ui-teacher #sidebar .teacher-account{order:2;position:relative;margin:0;width:100%;flex:none}
body.ui-teacher #sidebar .teacher-account-trigger{display:flex;align-items:center;gap:10px;min-width:0;width:100%;min-height:54px;padding:6px 8px;border:0;border-radius:12px;background:transparent;font-family:inherit;box-shadow:none}
body.ui-teacher #sidebar .teacher-account-avatar{width:36px;height:36px;flex:0 0 36px;border-radius:12px;background:#e5f2ed;color:#608c7b;font-size:14px}
body.ui-teacher #sidebar .teacher-account-copy{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
body.ui-teacher #sidebar .teacher-account-copy strong{font-family:inherit;font-size:13px;font-weight:600;line-height:20px;max-width:128px}
body.ui-teacher #sidebar .teacher-account-copy small{display:block;font-size:11px;color:#9595a6;line-height:16px}
body.ui-teacher #sidebar .teacher-account-chevron{display:block;font-size:14px;color:#9a94ac}
body.ui-teacher #sidebar .teacher-account-trigger:hover{background:#f8f7fc}
body.ui-teacher #sidebar .teacher-context-trigger:focus-visible,body.ui-teacher #sidebar .teacher-account-trigger:focus-visible{outline:3px solid #a496d0;outline-offset:2px}
body.ui-teacher .teacher-nav-collapsed #sidebar .teacher-context-trigger-copy,body.ui-teacher .teacher-nav-collapsed #sidebar .teacher-context-chevron,body.ui-teacher .teacher-nav-collapsed #sidebar .teacher-account-copy,body.ui-teacher .teacher-nav-collapsed #sidebar .teacher-account-chevron{display:none}
body.ui-teacher .teacher-nav-collapsed #sidebar .teacher-context-trigger{justify-content:center;padding:10px 0;border:0;background:transparent}
body.ui-teacher .teacher-nav-collapsed #sidebar .teacher-context-trigger::before{display:flex}
body.ui-teacher .teacher-nav-collapsed #sidebar .teacher-account-trigger{justify-content:center;padding-inline:0}
body.ui-teacher .topbar .topbar-primary-row:empty,body.ui-teacher .topbar .topbar-identity:empty{display:none}
body.ui-teacher:has(.stage[data-workspace-mode="module"]) .topbar,body.ui-teacher:has(.stage[data-workspace-mode="home"]) .topbar{display:none}
@media(max-width:768px){
 body.ui-teacher #sidebar .teacher-context-trigger-copy,body.ui-teacher #sidebar .teacher-context-chevron,body.ui-teacher #sidebar .teacher-account-copy,body.ui-teacher #sidebar .teacher-account-chevron{display:none}
 body.ui-teacher #sidebar .teacher-context-trigger{justify-content:center;padding:8px 0;min-height:48px;border:0;background:transparent}
 body.ui-teacher #sidebar .teacher-context-trigger::before{display:flex}
 body.ui-teacher #sidebar .teacher-account-trigger{justify-content:center;padding-inline:0}
 body.ui-teacher #sidebar .teacher-nav-bottom{gap:8px}
}
/* Separate timetable and canvas-library workspaces. */
body.ui-teacher #panel-prep .prep-workspace-grid{display:block}
body.ui-teacher #panel-prep[data-view="prep"] #prep-library-region,body.ui-teacher #panel-prep[data-view="templates"] #prep-schedule-region{display:none}
body.ui-teacher #panel-prep .prep-workspace-toolbar{margin-bottom:20px}
body.ui-teacher #panel-prep .prep-workspace-pane{width:100%;border:1px solid #e1e2ee;border-radius:22px;overflow:visible;background:#fff}
body.ui-teacher #schedule-collapse-toggle{display:none}
body.ui-teacher #prep-schedule-content{padding:0 24px 24px}
body.ui-teacher .schedule-filter-toolbar{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:18px 0;border-bottom:1px solid #e4e3ee;margin-bottom:20px}
body.ui-teacher .schedule-segmented{display:flex;align-items:center;gap:3px;background:#eeecf7;padding:5px;border-radius:14px}
body.ui-teacher .schedule-segmented button{border:0;background:transparent;border-radius:10px;padding:8px 12px;color:#777a86;font:inherit;cursor:pointer;white-space:nowrap}
body.ui-teacher .schedule-segmented button[aria-selected="true"]{color:#282d43;background:white;font-weight:600;box-shadow:0 2px 6px #282d4307}
body.ui-teacher .schedule-view-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
body.ui-teacher .schedule-head{align-items:center;gap:16px;flex-wrap:wrap}
body.ui-teacher .schedule-date-tools select{max-width:210px}
body.ui-teacher .schedule-time small{display:block;font-size:12px;font-weight:400;margin-bottom:4px}
body.ui-teacher .schedule-empty-state{display:flex;flex-direction:column;align-items:center;text-align:center;min-height:460px;justify-content:center;padding:40px 16px;background:#f7f7fc;border-radius:16px;margin-top:22px}
body.ui-teacher .schedule-empty-state svg{width:200px;height:150px;margin-bottom:20px}
body.ui-teacher .schedule-empty-state h3{font-size:24px;color:#282d43;margin:0 0 16px;font-weight:600}
body.ui-teacher .schedule-empty-state p{color:#8791a9;font-size:16px;line-height:1.9;margin:0}
body.ui-teacher .schedule-empty-actions{display:flex;gap:16px;margin-top:26px;flex-wrap:wrap;justify-content:center}
body.ui-teacher .schedule-empty-actions .btn{padding:12px 24px;border-radius:12px}
body.ui-teacher .canvas-library-layout{display:grid;grid-template-columns:180px minmax(0,1fr);min-height:520px;border-top:1px solid #e5e5ef}
body.ui-teacher .canvas-category-nav{display:flex;flex-direction:column;gap:8px;padding:22px 12px;border-right:1px solid #e5e5ef}
body.ui-teacher .canvas-category-nav button{display:flex;align-items:center;gap:12px;border:0;background:transparent;border-radius:12px;padding:13px 12px;text-align:left;color:#657086;font:inherit;cursor:pointer}
body.ui-teacher .canvas-category-nav button.active{background:#eeecf7;color:#282d43;font-weight:600}
body.ui-teacher .canvas-category-nav button span{width:20px;font-size:22px;text-align:center}
body.ui-teacher .canvas-category-nav button.canvas-subcategory{margin-left:28px;font-size:13px;padding:9px 10px;border-radius:9px}
body.ui-teacher .canvas-library-main{min-width:0}
body.ui-teacher .canvas-library-tools{display:flex;justify-content:flex-end;gap:12px;padding:20px 24px;border-bottom:1px solid #e5e5ef;flex-wrap:wrap}
body.ui-teacher .canvas-library-tools .input{width:220px;max-width:100%}
body.ui-teacher #prep-library-content{padding:24px}
body.ui-teacher #prep-library-content .prep-library-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}
body.ui-teacher .canvas-category-empty{padding:100px 20px;text-align:center;color:#8791a9}
body.ui-teacher .canvas-category-empty h3{font-size:20px;font-weight:600;color:#59647c}
body.ui-teacher .canvas-favorite[aria-pressed="true"]{color:#b89530}
@media(max-width:900px){body.ui-teacher .canvas-library-layout{grid-template-columns:1fr}body.ui-teacher .canvas-category-nav{flex-direction:row;overflow:auto;border-right:0;border-bottom:1px solid #e5e5ef;padding:12px;gap:4px}body.ui-teacher .canvas-category-nav button{white-space:nowrap;padding:8px}body.ui-teacher .canvas-category-nav button.canvas-subcategory{margin-left:0}body.ui-teacher .schedule-date-tools{display:flex}body.ui-teacher .schedule-date-tools input{width:150px;min-width:0}body.ui-teacher .schedule-date-tools select{width:100%;max-width:100%}body.ui-teacher .schedule-empty-state h3{font-size:20px}body.ui-teacher #prep-schedule-content{padding:0 12px 16px}body.ui-teacher #prep-library-content{padding:16px}body.ui-teacher #prep-library-content .prep-library-list{grid-template-columns:minmax(0,1fr)}body.ui-teacher .schedule-segmented button{padding:8px;font-size:13px}body.ui-teacher .canvas-library-tools{padding:16px}}
/* Compact reference-inspired navigation. */
body.ui-teacher #teacher-shell{grid-template-columns:224px minmax(0,1fr)}
body.ui-teacher #teacher-shell.teacher-nav-collapsed{grid-template-columns:72px minmax(0,1fr)}
body.ui-teacher #teacher-shell>#sidebar{padding:24px 12px 16px;border-right:1px solid var(--border)}
body.ui-teacher #sidebar .sb-brand{padding:0 12px;gap:10px;margin-bottom:20px;min-height:40px}
body.ui-teacher #sidebar .sb-brand img{width:36px;height:36px}
body.ui-teacher #sidebar .brand-title{font-size:18px;line-height:26px;font-weight:500}
body.ui-teacher #sidebar .brand-sub{display:none}
body.ui-teacher #sidebar .sb-nav{gap:6px}
body.ui-teacher #sidebar .nav-item{min-height:44px;padding:10px 12px;gap:12px;font-size:14px;font-weight:400;line-height:24px;border-radius:8px;color:var(--text-2)}
body.ui-teacher #sidebar .nav-item.active{background:#eeedf9!important;color:#6264c8!important;font-weight:500}
body.ui-teacher #sidebar .nav-item:hover{background:#f5f5fa}
body.ui-teacher #sidebar .nav-item .icon{width:20px;height:20px;flex:0 0 20px}
body.ui-teacher #sidebar svg{width:20px;height:20px;stroke-width:1.5}
body.ui-teacher #sidebar #teacher-context-switcher{margin-bottom:24px}
body.ui-teacher #sidebar .teacher-context-trigger{min-height:48px;padding:10px 24px 10px 12px;background:#f8f9fb;border:1px solid var(--border);border-radius:8px}
body.ui-teacher #sidebar .teacher-context-trigger-label{display:none}
body.ui-teacher #sidebar .teacher-context-trigger-copy{font-size:13px}
body.ui-teacher #sidebar .teacher-account-trigger{min-height:48px;border-radius:8px;padding:8px}
body.ui-teacher #sidebar .teacher-account-avatar{width:30px;height:30px;border-radius:50%;font-size:13px;background:#eeedf9;color:#6264c8}
body.ui-teacher #sidebar .teacher-account-copy strong{font-size:13px;font-weight:400}
body.ui-teacher #sidebar .teacher-account-copy small{display:none}
body.ui-teacher #teacher-nav-collapse{min-height:36px;padding:8px 12px;border:0;background:transparent;border-radius:8px;justify-content:flex-start;font-size:13px;color:var(--text-2)}
body.ui-teacher #teacher-nav-collapse:hover{background:#f5f5fa}
body.ui-teacher .teacher-nav-collapsed #sidebar{padding-inline:10px}
body.ui-teacher .teacher-nav-collapsed #sidebar .nav-item,body.ui-teacher .teacher-nav-collapsed #teacher-nav-collapse{justify-content:center;padding-inline:0}
body.ui-teacher .teacher-nav-collapsed #teacher-nav-collapse svg{transform:rotate(180deg)}
body.ui-teacher #panel-history{padding:0}
body.ui-teacher #panel-history #body-history{height:100%;flex:1 1 0;min-height:0}
body.ui-teacher .schedule-view-tools .btn[aria-pressed="true"]{background:var(--primary-selected);color:var(--primary);border-color:#d9d8f0}
@media(max-width:768px){body.ui-teacher #teacher-shell,body.ui-teacher #teacher-shell.teacher-nav-collapsed{grid-template-columns:64px minmax(0,1fr)}body.ui-teacher #teacher-shell>#sidebar{padding:20px 6px 12px}body.ui-teacher #sidebar .sb-brand{padding:0}body.ui-teacher #sidebar .nav-item{padding:10px 0;justify-content:center}body.ui-teacher #sidebar .teacher-context-trigger{padding:8px 0;border:0;background:transparent}body.ui-teacher #sidebar .teacher-account-trigger{padding:8px 0;justify-content:center}}

/* Consistent optical weight for the four primary teaching destinations. */
body.ui-teacher #sidebar .sb-nav .icon{align-items:center;justify-content:center;width:22px;height:22px;flex-basis:22px}
body.ui-teacher #sidebar .sb-nav .icon svg{display:block;width:22px;height:22px;stroke-width:1.8}
body.ui-teacher #sidebar .sb-nav .nav-item.active{box-shadow:inset 0 0 0 1px #dedcf6}

/* One icon axis for every control in the collapsed navigation rail. */
body.ui-teacher .teacher-nav-collapsed #sidebar .sb-brand,
body.ui-teacher .teacher-nav-collapsed #sidebar .nav-item,
body.ui-teacher .teacher-nav-collapsed #sidebar .teacher-context-trigger,
body.ui-teacher .teacher-nav-collapsed #sidebar .teacher-account-trigger,
body.ui-teacher .teacher-nav-collapsed #teacher-nav-collapse{display:flex;align-items:center;justify-content:center;gap:0;padding-inline:0;width:100%;box-sizing:border-box}
body.ui-teacher .teacher-nav-collapsed #sidebar .icon{display:flex;align-items:center;justify-content:center;margin:0;line-height:0}
body.ui-teacher #teacher-nav-collapse svg{display:block;flex:none;margin:0;transform-origin:center}
