/* 知行工作站（教师端）主样式。
   由 index.html 内嵌 <style> 块抽取合并（2026-09-19），原有顺序与层级保持不变。
   教学记录编辑器专用样式见 record-workspace.css。 */
:root{--blue:#2468d8;--blue2:#1557bf;--soft:#eaf2ff;--bg:#f3f6fa;--panel:#fff;--text:#182536;--muted:#77869a;--line:#e1e8f0;--green:#2f7b62;--gold:#b87924;--red:#c44f55;--shadow:0 10px 30px rgba(36,67,100,.06);--r:15px}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:"PingFang SC","Microsoft YaHei",Arial,sans-serif;color:var(--text);background:var(--bg)}button,input,select,textarea{font:inherit}button{cursor:pointer}
.app{display:grid;grid-template-columns:226px 1fr;min-height:100vh}.sidebar{height:100vh;position:sticky;top:0;background:#fff;border-right:1px solid var(--line);padding:22px 14px 16px;display:flex;flex-direction:column;z-index:30}.brand{display:flex;align-items:center;gap:11px;padding:0 8px 19px;border-bottom:1px solid var(--line)}.brand-mark{width:40px;height:40px;border-radius:11px;background:var(--blue);color:#fff;display:grid;place-items:center;font-weight:900}.brand strong{display:block;font-size:17px}.brand small{color:var(--muted);font-size:11px}.nav{overflow:auto;padding-top:7px}.nav-group{margin:15px 8px 6px;color:#9aa6b5;font-size:11px;font-weight:700;letter-spacing:.08em}.nav-btn{width:100%;border:0;background:transparent;color:#47586b;display:flex;align-items:center;gap:11px;padding:11px 12px;border-radius:11px;margin:2px 0;text-align:left;position:relative}.nav-btn:hover{background:#f6f8fb}.nav-btn.active{background:var(--soft);color:var(--blue2);font-weight:850}.nav-btn.active:before{content:"";position:absolute;left:0;top:8px;bottom:8px;width:3px;background:var(--blue);border-radius:3px}.nav-icon{width:20px;text-align:center}.role-only{display:none}.side-footer{margin-top:auto;padding:12px 8px;color:#9aa6b5;font-size:11px;line-height:1.7}
.main{min-width:0}.topbar{height:72px;position:sticky;top:0;z-index:25;background:rgba(243,246,250,.94);backdrop-filter:blur(10px);border-bottom:1px solid rgba(225,232,240,.7);padding:0 28px;display:flex;align-items:center;justify-content:space-between}.page-title h1{margin:0;font-size:22px;font-weight:900}.page-title p{margin:4px 0 0;color:var(--muted);font-size:12px}.user-tools{display:flex;align-items:center;gap:10px}.weather-mini{display:flex;gap:8px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:10px;padding:7px 10px;font-size:11px;color:#506176}.role-switch{display:flex;background:#e9eef4;padding:3px;border-radius:9px}.role-switch button{border:0;background:transparent;color:#758394;border-radius:7px;padding:7px 10px;font-size:11px}.role-switch button.active{background:#fff;color:var(--blue2);font-weight:800;box-shadow:0 2px 7px rgba(0,0,0,.05)}.avatar{width:37px;height:37px;border-radius:50%;display:grid;place-items:center;background:#d9e9ff;color:var(--blue2);font-weight:900}.icon-btn{width:37px;height:37px;background:#fff;border:1px solid var(--line);border-radius:10px}.content{padding:22px 28px 40px}.view{display:none}.view.active{display:block}
.panel{background:#fff;border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow)}.panel-head{padding:17px 19px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:10px}.panel-head h3{margin:0;font-size:16px}.sub{font-size:11px;color:var(--muted);margin-left:7px}.panel-body{padding:18px}.grid{display:grid;gap:16px}.stack{display:grid;gap:16px}.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.btn{border:1px solid var(--line);background:#fff;color:#45586b;padding:9px 12px;border-radius:9px;font-size:12px;font-weight:750}.btn:hover{border-color:#acc3dc}.btn.primary{background:var(--blue);border-color:var(--blue);color:#fff}.btn.soft{background:var(--soft);border-color:#d7e6fb;color:var(--blue2)}.btn.danger{color:var(--red);background:#fff7f7}.btn:disabled{opacity:.5}.badge{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-size:10px;background:#eef3f7;color:#66798c}.badge.blue{background:#e8f1ff;color:#2d64ad}.badge.green{background:#e9f4ef;color:#2d7559}.badge.gold{background:#fff4e4;color:#9b691f}.badge.red{background:#fff0f1;color:#b9474f}.notice{background:#f4f8fd;border:1px solid #e0ebf6;border-radius:10px;padding:11px 13px;color:#526b82;font-size:12px;line-height:1.7}.kpi-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.kpi{border:1px solid var(--line);background:#fff;border-radius:12px;padding:14px}.kpi .label{font-size:11px;color:var(--muted)}.kpi .value{font-size:24px;font-weight:900;margin-top:6px}.kpi .delta{font-size:10px;color:#638096;margin-top:4px}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:12px}table{width:100%;border-collapse:collapse;min-width:760px}th,td{padding:11px 13px;border-bottom:1px solid var(--line);font-size:12px;text-align:left}th{background:#f7f9fb;color:#65788b;font-weight:800}tr:last-child td{border-bottom:0}tbody tr:hover{background:#fbfdff}.link{color:var(--blue2);font-weight:800;cursor:pointer}.danger-link{color:var(--red);font-weight:800;cursor:pointer}.muted{color:var(--muted)}
.field{display:grid;gap:6px;margin-bottom:12px}.field label{font-size:11px;color:#566a7e;font-weight:800}.field input,.field select,.field textarea{border:1px solid #d8e2eb;border-radius:9px;padding:10px 11px;background:#fff;outline:none;width:100%}.field textarea{min-height:100px;resize:vertical}.form-row{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.tabs{display:flex;gap:5px;border-bottom:1px solid var(--line);padding-bottom:12px;margin-bottom:16px}.tab{border:0;background:transparent;color:#6f8090;padding:8px 11px;border-radius:8px}.tab.active{background:var(--soft);color:var(--blue2);font-weight:850}.chips{display:flex;gap:8px;flex-wrap:wrap}.chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:9px;padding:7px 9px;font-size:11px;background:#fff}
.dashboard-grid{grid-template-columns:minmax(0,1.72fr) minmax(320px,.72fr)}.schedule{display:grid;grid-template-columns:70px repeat(5,1fr);min-width:760px;border:1px solid var(--line);border-radius:12px;overflow:hidden}.sch{padding:7px;min-height:57px;border-right:1px solid var(--line);border-bottom:1px solid var(--line)}.sch:nth-child(6n){border-right:0}.sch.head{background:#f7f9fb;text-align:center;min-height:40px;color:#657788;font-size:10px;font-weight:800}.sch.time{text-align:center;color:#8492a0;font-size:10px;background:#fbfcfd}.lesson{background:#edf5ff;border-left:3px solid #4b91e3;border-radius:8px;padding:7px;font-size:11px}.lesson.alt{background:#fff6e8;border-left-color:#d3943c}.lesson small{display:block;color:#71869a;margin-top:3px}.todo-list{display:grid;gap:9px}.todo-item{display:flex;gap:9px;align-items:flex-start;border:1px solid var(--line);border-radius:10px;padding:10px}.todo-item input{margin-top:2px}.todo-item b{display:block;font-size:12px}.todo-item small{color:var(--muted);font-size:10px}.todo-item .grow{flex:1}.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}.cal-grid span,.cal-grid button{height:29px;border:0;background:transparent;border-radius:7px;display:grid;place-items:center;font-size:10px}.cal-grid .dow{color:#9aa5af}.cal-grid .today{background:var(--blue);color:#fff}.cal-grid .event{outline:1px solid #92b6dc;color:#366792}.calendar-note{margin-top:10px;background:#f7faff;border-radius:9px;padding:9px;font-size:10px;color:#60758a}
.home-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:16px}.home-card{background:#fff;border:1px solid var(--line);border-radius:13px;padding:14px;cursor:pointer}.home-card b{display:block;margin-bottom:6px}.home-card p{margin:0;color:var(--muted);font-size:10px;line-height:1.6}
.analysis-toolbar{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px}.metric-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:14px}.distribution{display:grid;gap:10px}.dist-row{display:grid;grid-template-columns:70px 1fr 48px;gap:8px;align-items:center;font-size:11px}.bar{height:8px;background:#edf1f5;border-radius:99px;overflow:hidden}.bar i{display:block;height:100%;background:#5e8fc4}.trend-chart{position:relative;height:240px;border-left:1px solid #dce4ec;border-bottom:1px solid #dce4ec;margin:24px 12px 30px 46px}.trend-chart .h{position:absolute;left:0;right:0;border-top:1px dashed #e6ecf1}.trend-chart .yl{position:absolute;left:-40px;transform:translateY(-50%);color:#8795a2;font-size:10px}.trend-svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}.xlabels{position:absolute;left:0;right:0;bottom:-27px;display:grid;grid-template-columns:repeat(6,1fr);font-size:9px;color:#7e8d9b;text-align:center}.selected-box{border:1px solid var(--line);border-radius:10px;padding:10px;background:#fbfdff;font-size:11px}
.workspace-layout{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(330px,.72fr);gap:16px}.record-list{display:grid;gap:9px}.record-row{display:grid;grid-template-columns:24px 38px 1fr auto;gap:10px;align-items:flex-start;border:1px solid var(--line);border-radius:12px;padding:12px}.record-icon{width:36px;height:36px;border-radius:9px;background:#edf4fb;display:grid;place-items:center}.record-row h4{margin:0 0 5px}.record-row p{margin:0;color:var(--muted);font-size:10px;line-height:1.6}.record-side{text-align:right;font-size:10px;color:var(--muted)}.record-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:7px}.template-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.template-card{border:1px solid var(--line);border-radius:11px;padding:12px;cursor:pointer}.template-card h4{margin:7px 0 4px}.template-card p{font-size:10px;color:var(--muted);line-height:1.55;margin:0}.template-preview{background:#fbfdff;border:1px dashed #c9d7e4;border-radius:10px;padding:11px;font-size:10px;line-height:1.8;white-space:pre-wrap}.doc-preview{background:#fff;border:1px solid #cfd9e3;box-shadow:0 8px 22px rgba(0,0,0,.05);padding:28px 34px;min-height:460px;line-height:1.9;font-size:12px}.doc-preview h2{text-align:center;margin:0 0 20px;font-size:20px}.doc-preview h3{font-size:14px;margin:17px 0 7px}.info-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.info-item{border:1px solid var(--line);border-radius:10px;padding:11px;background:#fbfdff}.info-item small{display:block;color:var(--muted);font-size:10px;margin-bottom:4px}.phone-mask{border:0;background:none;color:var(--blue2);font-weight:800;padding:0}.class-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.class-card{background:#fff;border:1px solid var(--line);border-radius:13px;padding:16px}.class-card h3{margin:8px 0 4px}.class-card p{margin:0;color:var(--muted);font-size:11px}.class-meta{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px}
.backdrop{position:fixed;inset:0;background:rgba(25,41,57,.44);display:none;align-items:center;justify-content:center;padding:18px;z-index:100}.backdrop.open{display:flex}.modal{width:min(650px,96vw);max-height:90vh;overflow:auto;background:#fff;border-radius:15px;box-shadow:0 24px 70px rgba(0,0,0,.22)}.modal.wide{width:min(920px,96vw)}.modal.xwide{width:min(1120px,97vw)}.modal-head{padding:17px 19px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center}.modal-head h3{margin:0}.close{border:0;background:#eff3f6;width:30px;height:30px;border-radius:8px}.modal-body{padding:18px}.modal-foot{padding:13px 18px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:8px}.toast{position:fixed;right:22px;bottom:22px;width:330px;background:#173f66;color:#fff;border-radius:12px;padding:14px 15px;box-shadow:0 18px 50px rgba(0,0,0,.22);display:none;z-index:220}.toast.show{display:block}.toast b{display:block;margin-bottom:4px}.toast p{margin:0;color:#d7e4ef;font-size:11px;line-height:1.55}.exam-picker-list{display:grid;gap:7px;max-height:360px;overflow:auto}.exam-row{display:grid;grid-template-columns:24px 1fr 110px 90px;gap:8px;align-items:center;border:1px solid var(--line);border-radius:9px;padding:9px;font-size:11px}.guardian-edit{display:grid;grid-template-columns:1fr 1fr 1.2fr auto;gap:8px;align-items:end;padding:10px;background:#f7f9fb;border:1px solid var(--line);border-radius:10px;margin-bottom:8px}
@media(max-width:1120px){.dashboard-grid,.workspace-layout{grid-template-columns:1fr}.home-cards,.class-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:820px){.app{grid-template-columns:72px 1fr}.brand div:last-child,.nav-btn span:last-child,.nav-group,.side-footer{display:none}.nav-btn{justify-content:center}.topbar{padding:0 16px}.content{padding:16px}.weather-mini,.role-switch{display:none}.kpi-grid,.metric-grid,.home-cards,.class-grid,.info-grid,.analysis-toolbar,.form-row{grid-template-columns:1fr}}

/* 消息中心 */
.notif-item{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;border:1px solid var(--line);border-radius:11px;padding:11px 12px;background:#fff}.notif-item.unread{background:#f6faff;border-color:#dbe8fb}.notif-main{flex:1;min-width:0}.notif-title{font-size:12px;font-weight:800}.notif-content{font-size:11px;color:var(--muted);margin-top:4px;line-height:1.6;word-break:break-all}.notif-meta{font-size:10px;color:#a0acba;margin-top:6px}.notif-ops{display:flex;flex-direction:column;gap:5px;flex:0 0 auto}.notif-ops .btn{padding:5px 9px;font-size:11px}
/* 座位表编辑器 */
.seat-toolbar{border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin-bottom:14px;display:grid;gap:10px;background:#fbfdff}
.seat-tb-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px}
.seat-tb-row label{color:#566a7e;font-weight:700;display:inline-flex;align-items:center;gap:4px}
.seat-tb-row input[type=number]{width:52px;padding:5px 6px;border:1px solid #d8e2eb;border-radius:7px}
.seat-tb-row select{padding:6px 8px;border:1px solid #d8e2eb;border-radius:7px;background:#fff}
.seat-hint{color:#9aa5b0;font-size:11px}
.seat-layout{display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:16px;align-items:start}
.seat-canvas-wrap{overflow:auto;border:1px solid var(--line);border-radius:12px;padding:16px;background:#fafbfd;min-height:320px}
.seat-canvas{display:flex;flex-direction:column;gap:10px;min-width:max-content}
.seat-podium{margin:0 auto 6px;padding:10px 40px;background:#e8edf3;color:#65788b;border-radius:10px;font-size:12px;font-weight:800;text-align:center}
.seat-podium-row{display:flex;justify-content:center;gap:10px}
.seat-grid{display:grid;gap:8px;margin:0 auto}
.seat-cell{position:relative;min-width:64px;height:52px;border:1.5px dashed #c3d2e2;border-radius:9px;background:#fff;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;cursor:pointer;transition:.12s}
.seat-cell:hover{border-color:#6f9fd8;box-shadow:0 0 0 3px rgba(111,159,216,.15)}
.seat-cell.occupied{background:#e8f1ff;border:1.5px solid #6f9fd8;color:#2d64ad}
.seat-cell.occupied.locked{background:#fff6e8;border-color:#d9a24b;color:#8a5a1c}
.seat-cell.aisle{background:repeating-linear-gradient(45deg,#eef1f4,#eef1f4 4px,#e3e8ee 4px,#e3e8ee 8px);border:1.5px solid #d5dde5;color:#a0acba;font-size:10px}
.seat-cell.empty{background:#fbfbfc;border:1.5px dotted #d5dde5;color:#b8c2cc;font-size:10px}
.seat-cell.lockmark::after{content:"锁";position:absolute;top:-8px;right:-6px;background:#d9a24b;color:#fff;font-size:9px;padding:1px 4px;border-radius:6px;font-weight:700}
.seat-cell .seat-name{max-width:56px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.seat-cell.dragover{border-color:#2468d8;box-shadow:0 0 0 3px rgba(36,104,216,.25);background:#eaf2ff}
.seat-group{display:flex;flex-direction:column;align-items:center;gap:8px}
.seat-group-name{font-size:12px;font-weight:800;color:#65788b}
.seat-group-seats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.seat-side{border:1px solid var(--line);border-radius:12px;background:#fff;position:sticky;top:0}
.seat-side-head{padding:12px 14px;border-bottom:1px solid var(--line);font-weight:800;font-size:13px;display:flex;align-items:center;gap:6px}
.seat-unassigned{padding:12px;display:grid;gap:7px;max-height:520px;overflow:auto}
.seat-student{border:1px solid #dbe4ee;border-radius:9px;padding:8px 10px;background:#fff;cursor:grab;font-size:12px;font-weight:700;display:flex;justify-content:space-between;align-items:center}
.seat-student:active{cursor:grabbing}
.seat-student.dragging{opacity:.5}
.seat-student small{color:#9aa5b0;font-weight:500}
.seat-cell-menu{position:fixed;z-index:300;min-width:200px;max-width:260px;max-height:340px;overflow:auto;background:#fff;border:1px solid #dbe4ee;border-radius:12px;box-shadow:0 12px 34px rgba(0,0,0,.16);padding:8px}
.seat-cell-menu-title{font-size:11px;font-weight:800;color:#65788b;padding:4px 6px 6px;border-bottom:1px solid #eef2f6;margin-bottom:6px}
.seat-cell-menu-list{display:grid;gap:3px;max-height:200px;overflow:auto}
.seat-cell-menu-item{display:flex;justify-content:space-between;align-items:center;gap:8px;border:0;background:#f7f9fb;border-radius:7px;padding:7px 9px;font-size:12px;font-weight:700;cursor:pointer;text-align:left}
.seat-cell-menu-item:hover{background:#eaf2ff}
.seat-cell-menu-item.active{background:#e8f1ff;color:#2d64ad}
.seat-cell-menu-item small{color:#9aa5b0;font-weight:500}
.seat-cell-menu-empty{color:#9aa5b0;font-size:11px;text-align:center;padding:10px 0}
.seat-cell-menu-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px;padding-top:6px;border-top:1px solid #eef2f6}
.seat-cell-menu-actions button{border:1px solid #dbe4ee;background:#fff;border-radius:7px;padding:5px 9px;font-size:11px;font-weight:700;cursor:pointer;color:#566a7e}
.seat-cell-menu-actions button:hover{border-color:#6f9fd8;color:#2d64ad}
/* 宿舍 */
.dorm-building{border:1px solid var(--line);border-radius:12px;background:#fff;margin-bottom:14px;overflow:hidden}
.dorm-building-head{padding:13px 16px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center}
.dorm-building-head h3{margin:0;font-size:14px}
.dorm-building-gender{font-size:11px;color:var(--muted)}
.dorm-building-rooms{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px;padding:13px 16px}
.dorm-room{border:1px solid var(--line);border-radius:10px;background:#fbfdff;padding:11px}
.dorm-room-head{margin-bottom:9px}
.dorm-room-head b{font-size:12px}
.dorm-room-beds{display:grid;grid-template-columns:repeat(2,1fr);gap:7px}
.dorm-bed{position:relative;height:50px;border:1.5px dashed #c3d2e2;border-radius:8px;background:#fff;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;color:#566a7e}
.dorm-bed.occupied{background:#e8f1ff;border-color:#6f9fd8;color:#2d64ad;cursor:pointer}
.dorm-bed.occupied:hover{border-color:#2468d8;box-shadow:0 0 0 3px rgba(36,104,216,.15)}
.dorm-bed .bed-no{position:absolute;top:3px;left:6px;font-size:9px;color:#9aa5b0}
.duty-roster-row{display:flex;gap:8px;align-items:center;margin-bottom:8px}
.duty-roster-row input{flex:1;border:1px solid #d8e2eb;border-radius:7px;padding:7px 9px}
/* 左下角头像菜单 */
.teacher-profile{display:flex;align-items:center;gap:10px;padding:10px 8px;border-top:1px solid var(--line);cursor:pointer;user-select:none}
.teacher-profile .avatar{width:34px;height:34px;border-radius:50%;background:#d9e9ff;color:var(--blue2);display:grid;place-items:center;font-weight:900;flex:0 0 auto}
.teacher-profile strong{display:block;font-size:12px}
.teacher-profile span{color:var(--muted);font-size:10px}
.profile-menu{position:absolute;left:12px;bottom:70px;width:200px;background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);padding:6px;z-index:60}
.profile-menu button{display:flex;align-items:center;gap:10px;width:100%;border:0;background:transparent;color:var(--text);padding:10px 12px;border-radius:8px;font-size:13px;cursor:pointer;text-align:left}
.profile-menu button:hover{background:var(--soft)}
.profile-menu[hidden],.profile-submenu[hidden],.password-pane[hidden]{display:none !important}
.profile-sub{position:relative}
.profile-sub>button{display:flex;align-items:center;gap:10px;width:100%;border:0;background:transparent;color:var(--text);padding:10px 12px;border-radius:8px;font-size:13px;cursor:pointer;text-align:left}
.profile-sub>button:hover{background:var(--soft)}
.sub-arrow{margin-left:auto;font-size:15px;line-height:1;color:var(--muted)}
.profile-submenu{position:absolute;left:calc(100% + 8px);bottom:-6px;width:170px;background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);padding:6px;z-index:80}
.profile-submenu button{display:block;width:100%;border:0;background:transparent;color:var(--text);padding:9px 12px;border-radius:8px;font-size:13px;cursor:pointer;text-align:left}
.profile-submenu button:hover{background:var(--soft)}
.brand-mark img{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;display:block}
.password-tabs{display:flex;gap:8px;margin-bottom:14px}
.password-tabs button{flex:1;border:1px solid var(--line);background:var(--panel);color:var(--text);border-radius:8px;padding:8px 10px;font-size:13px;cursor:pointer}
.password-tabs button.active{border-color:var(--blue);color:var(--blue);background:var(--soft)}
.password-pane{display:grid;gap:12px}
.password-pane .field{display:grid;gap:5px;font-size:12px;color:var(--muted)}
.password-pane .field input{width:100%;border:1px solid var(--line);border-radius:8px;padding:9px 11px;font-size:13px;color:var(--text);background:var(--panel)}
.sidebar{position:relative}
/* 主题切换 */
body[data-theme="dark"]{--blue:#3b82f6;--blue2:#60a5fa;--soft:#1e3a5f;--bg:#111827;--panel:#1f2937;--text:#e5e7eb;--muted:#9ca3af;--line:#374151;--red:#f87171;--green:#34d399;--gold:#fbbf24}
body[data-theme="dark"] .topbar{background:rgba(17,24,39,.94);border-bottom:1px solid #374151}
body[data-theme="dark"] .sidebar{background:#111827;border-right-color:#374151}
body[data-theme="dark"] .btn{background:#1f2937;color:#e5e7eb}
body[data-theme="dark"] .panel,.panel-body{background:var(--panel)}
body[data-theme="dark"] input,body[data-theme="dark"] select,body[data-theme="dark"] textarea{background:#111827;color:#e5e7eb;border-color:#374151}
body[data-theme="green"]{--blue:#16a34a;--blue2:#15803d;--soft:#e8f7ee}
body[data-theme="purple"]{--blue:#7c4dff;--blue2:#6d3cf0;--soft:#f1edfb}
.theme-swatch{display:flex;flex-direction:column;align-items:center;gap:6px;border:0;background:transparent;cursor:pointer;font-size:12px;color:var(--muted);padding:0}
.theme-swatch span{width:40px;height:40px;border-radius:10px;display:block}
.theme-swatch.active{color:var(--blue2)}
.theme-swatch.active span{outline:2px solid var(--blue);outline-offset:2px}
.settings-section{padding:12px 0;border-bottom:1px solid var(--line)}
.settings-section:last-child{border-bottom:0}
.settings-section h3{margin:0 0 10px;font-size:13px}
.settings-desc{margin:0 0 10px;font-size:12px;color:var(--muted)}
.logo-fallback{display:inline-flex;align-items:center;justify-content:center;width:56px;height:56px;border-radius:12px;background:var(--blue);color:#fff;font-size:22px;font-weight:700}
.settings-drawer-mask{position:fixed;inset:0;background:rgba(25,41,57,.4);z-index:200}
.settings-drawer-panel{position:fixed;top:0;right:0;bottom:0;width:min(400px,92vw);background:var(--panel);z-index:201;display:flex;flex-direction:column;box-shadow:-12px 0 40px rgba(0,0,0,.18)}
.settings-drawer-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid var(--line)}
.settings-drawer-head h3{margin:0;font-size:15px}
.settings-drawer-body{padding:18px;overflow:auto}
.logo-editor-preview{display:flex;align-items:center;justify-content:center;width:72px;height:72px;margin-bottom:14px}
.logo-editor-preview img,.logo-editor-preview span{width:72px;height:72px;object-fit:cover;display:flex;align-items:center;justify-content:center;background:var(--blue);color:#fff;font-size:26px;font-weight:700}
.logo-shape-label{font-size:12px;color:var(--muted);margin:12px 0 6px}
.logo-shape-options{display:flex;gap:8px;margin-bottom:14px}
.logo-shape-options button{border:1px solid var(--line);background:var(--panel);color:var(--text);border-radius:8px;padding:6px 12px;font-size:12px;cursor:pointer}
.logo-shape-options button.active{border-color:var(--blue);color:var(--blue2);background:var(--soft)}
.logo-name-label{font-size:12px;color:var(--muted);display:block;margin-bottom:6px}
.logo-editor input[type="text"]{width:100%;border:1px solid var(--line);border-radius:8px;padding:9px 11px;font-size:13px;background:var(--panel);color:var(--text)}
/* v4 refinements */
.todo-item{position:relative;cursor:pointer}
.todo-item .todo-toggle{margin-left:auto;border:0;background:transparent;color:#7b8b9c;font-size:16px;padding:0 2px}
.todo-detail{display:none;margin-top:8px;padding:9px 10px;background:#f7faff;border-radius:8px;color:#61768c;font-size:10px;line-height:1.65}
.todo-item.expanded .todo-detail{display:block}
.todo-row-actions{display:flex;gap:7px;align-items:center}
.todo-complete{color:#2f7b62;font-weight:800}
.schedule.full-day .sch{min-height:48px}
.schedule.full-day .lesson{position:relative;padding-right:48px}
.lesson .adjust-inline{position:absolute;right:6px;top:6px;border:0;background:#fff;color:#2468d8;border-radius:6px;padding:3px 6px;font-size:9px;font-weight:800;box-shadow:0 1px 4px rgba(0,0,0,.08)}
.schedule-legend{display:flex;gap:14px;align-items:center;font-size:10px;color:#6c7e91;margin:10px 0 0}
.schedule-legend i{width:10px;height:10px;border-radius:3px;display:inline-block;margin-right:5px;vertical-align:-1px}
.exam-top-actions .btn{min-width:92px}
.score-toolbar{display:grid;grid-template-columns:repeat(3,minmax(150px,220px));gap:10px;align-items:end}
.import-methods{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0}
.method-card{border:1px solid var(--line);border-radius:12px;padding:14px;cursor:pointer;background:#fff}
.method-card.active{border-color:#8eb6e6;background:#f3f8ff;box-shadow:0 0 0 2px rgba(36,104,216,.08)}
.method-card b{display:block;margin-bottom:5px}.method-card small{color:var(--muted);line-height:1.6}
.template-creator-grid{display:grid;grid-template-columns:minmax(430px,.9fr) minmax(520px,1.1fr);gap:18px}
.template-form-shell{border:1px solid var(--line);border-radius:12px;padding:14px;background:#fbfdff}
.rich-shell{border:1px solid #cfd9e3;border-radius:10px;background:#fff;overflow:hidden}
.rich-toolbar{display:flex;flex-wrap:wrap;gap:5px;padding:8px;border-bottom:1px solid var(--line);background:#f7f9fb;position:sticky;top:0;z-index:2}
.rich-toolbar button,.rich-toolbar select,.rich-toolbar input[type=color]{height:31px;border:1px solid var(--line);background:#fff;border-radius:7px;padding:0 9px;font-size:11px}
.rich-toolbar input[type=color]{width:38px;padding:3px}
.rich-editor{min-height:510px;padding:34px 40px;outline:none;line-height:1.85;font-size:12px}
.rich-editor h1,.rich-editor h2{text-align:center}.rich-editor table{width:100%;border-collapse:collapse;margin:12px 0}.rich-editor th,.rich-editor td{border:1px solid #cfd7df;padding:8px}
.field-help{font-size:10px;color:#8b99a7;margin-top:-2px}
.work-table-editor{display:grid;gap:8px}
.work-row{display:grid;grid-template-columns:1.4fr 1fr 1fr auto;gap:7px;align-items:end}
.template-field-row{display:grid;grid-template-columns:1.3fr 1fr .8fr auto;gap:8px;align-items:end;border:1px solid var(--line);border-radius:9px;padding:9px;margin-bottom:8px;background:#fbfdff}
.record-title-note{display:flex;align-items:center;gap:8px;color:#6b7c8f;font-size:10px;margin:-5px 0 12px}
.leave-tabs{display:flex;gap:6px;border-bottom:1px solid var(--line);padding-bottom:11px;margin-bottom:14px}
.leave-pane{display:none}.leave-pane.active{display:block}
.attendance-status{display:inline-flex;gap:5px;align-items:center}
.small-dot{width:7px;height:7px;border-radius:50%;display:inline-block}
@media(max-width:1100px){.template-creator-grid{grid-template-columns:1fr}.score-toolbar{grid-template-columns:1fr 1fr}}

/* v5: todo selection/accordion, score filter confirmation, head-teacher leave visibility */
#todoPreview{
  max-height:132px;
  overflow-y:auto;
  padding-right:4px;
  scroll-behavior:smooth;
}
#todoPreview::-webkit-scrollbar,#todoCenterList::-webkit-scrollbar{width:6px}
#todoPreview::-webkit-scrollbar-thumb,#todoCenterList::-webkit-scrollbar-thumb{background:#cbd8e6;border-radius:10px}
.todo-scroll-note{font-size:10px;color:#8a98a8;text-align:center;margin-top:6px}
.todo-item{cursor:pointer;transition:.15s ease}
.todo-item:hover{border-color:#b9cce0;background:#fbfdff}
.todo-item.expanded{border-color:#9cbce0;background:#f7fbff}
.todo-item .select-box{margin-top:2px}
.todo-detail{display:none;margin-top:9px;padding:10px 11px;border:1px solid #e2ebf5;background:#fff;border-radius:8px;color:#5e7185;font-size:10px;line-height:1.7}
.todo-item.expanded .todo-detail{display:block}
.todo-caret{margin-left:auto;border:0;background:transparent;color:#7e90a3;font-size:15px;padding:2px 4px;transition:.15s}
.todo-item.expanded .todo-caret{transform:rotate(180deg)}
.todo-delete-footer{background:#fff7f7;border-color:#f1cfd2;color:#c44f55}
.todo-delete-footer:disabled{opacity:.45;cursor:not-allowed}
.score-filter-box{display:flex;gap:10px;align-items:end;flex-wrap:wrap}
.score-filter-box .field{margin:0;min-width:210px}
.score-result-hint{font-size:11px;color:#6f8194;margin-left:2px}
#studentLeaveTabBtn,#studentLeaveQuickBtn{display:none}
.head-mode #studentLeaveTabBtn{display:inline-flex!important}
.head-mode #studentLeaveQuickBtn{display:inline-flex!important}
@media(max-width:900px){
  #todoPreview{max-height:146px}
  .score-filter-box .field{min-width:180px;flex:1}
}

/* ===== v6 班级管理全面优化 ===== */
:root{--cyan:#10a6c7;--purple:#7257d5;--orange:#dd8a34}
body{background:linear-gradient(180deg,#f5f8fc 0,#f2f6fa 100%)}
.sidebar{box-shadow:4px 0 18px rgba(34,66,99,.025)}
.nav-group{margin-top:18px}.nav-btn{font-size:13px}
.content{max-width:1680px;margin:0 auto;width:100%}
.panel{box-shadow:0 10px 28px rgba(42,70,100,.055)}
.role-lock{opacity:.48;pointer-events:none}
.permission-note{display:flex;gap:8px;align-items:center;padding:10px 12px;border-radius:10px;background:#f5f8fc;border:1px solid #e2eaf3;color:#607489;font-size:11px}
.health-tag{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;background:#fff4e6;color:#a36a22;font-size:10px;font-weight:750}
.health-tag.none{background:#eef4f7;color:#738495}
.status-dot{width:7px;height:7px;border-radius:50%;display:inline-block;margin-right:5px}
.status-school{background:#29a06f}.status-leave{background:#e09a38}
.class-dashboard{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}
.mini-stat{background:#fff;border:1px solid var(--line);border-radius:13px;padding:14px}
.mini-stat small{color:var(--muted)}.mini-stat b{display:block;font-size:23px;margin-top:5px}
.score-controls{display:grid;grid-template-columns:170px 170px 180px 180px minmax(200px,1fr) auto;gap:9px;align-items:end}
.score-controls .field{margin:0}
.score-all-table table{min-width:1450px}
.score-all-table th,.score-all-table td{text-align:center;padding:9px 8px}
.score-all-table th:first-child,.score-all-table td:first-child,
.score-all-table th:nth-child(2),.score-all-table td:nth-child(2){text-align:left;position:sticky;background:#fff;z-index:2}
.score-all-table th:first-child,.score-all-table td:first-child{left:0}
.score-all-table th:nth-child(2),.score-all-table td:nth-child(2){left:92px}
.score-all-table th{background:#f7f9fb!important;z-index:3}
.score-all-table .total-cell{font-weight:900;color:#1f5fb8;background:#f5f9ff}
.classroom-shell{background:#f5f8fc;border:1px solid #dbe5ef;border-radius:16px;padding:16px;overflow:hidden}
.seating-controls{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:12px}
.seating-controls label{display:inline-flex;gap:5px;align-items:center;font-size:11px;color:#596d80}
.seat-permission-note{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid #dbe7f4;background:#f5f9ff;border-radius:11px;margin-bottom:12px;color:#55708d;font-size:11px}
.seat-permission-note b{color:#1f5fae}
.seat-summary{display:flex;gap:7px;flex-wrap:wrap;margin:0 0 12px}
.seat-summary span{display:inline-flex;align-items:center;gap:5px;padding:5px 9px;border-radius:999px;background:#fff;border:1px solid #dce6ef;color:#66798b;font-size:10px}
.seat-layout-editor{display:none;padding:11px 12px;margin-bottom:12px;border:1px dashed #aac5e3;background:#f8fbff;border-radius:12px}
.seat-layout-editor.active{display:block}
.seat-layout-tools{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.seat-layout-tools .tool.active{background:#e7f1ff;border-color:#7eb0ec;color:#175da9}
.seat-layout-tools label{display:inline-flex;gap:5px;align-items:center;font-size:10px;color:#677b8e}
.classroom-stage{background:#fff;border:1px solid #dce6ef;border-radius:14px;padding:13px 14px 10px;margin-bottom:12px}
.classroom-blackboard{height:40px;display:flex;align-items:center;justify-content:center;border-radius:9px;background:#173f66;color:#fff;font-weight:850;letter-spacing:.2em;box-shadow:0 7px 16px rgba(23,63,102,.12)}
.classroom-front-row{display:grid;grid-template-columns:1fr 220px 1fr;gap:12px;align-items:center;margin-top:10px}
.classroom-front-note{text-align:center;color:#8c9baa;font-size:9px}
.podium{background:#e9f0f7;border:1px solid #cbd9e7;color:#314f6c;border-radius:10px;padding:9px;text-align:center;font-weight:850}
.special-slot{border:1.5px dashed #afc4d8;background:#fff;border-radius:11px;min-height:58px;padding:8px;text-align:center;color:#7d8f9f;font-size:9px}
.special-slot.has-student{border-style:solid;border-color:#8db7e4;background:#f6faff;color:#314f6d}
.classroom-floor{display:grid;grid-template-columns:42px minmax(0,1fr) 42px;gap:10px;align-items:stretch}
.side-aisle{display:flex;align-items:center;justify-content:center;min-height:430px;border-radius:10px;background:repeating-linear-gradient(180deg,#edf5fc 0,#edf5fc 18px,#e4eef8 18px,#e4eef8 36px);border:1px dashed #bfd1e3;color:#6f879d;font-size:9px;writing-mode:vertical-rl;letter-spacing:.18em}
.seat-layout-grid{display:grid;gap:8px;align-items:stretch;min-width:0}
.seat-layout-cell{min-width:0;min-height:72px;border-radius:10px;position:relative;transition:.15s ease}
.seat-layout-cell.seat{background:#fff;border:1px solid #d6e2ee}
.seat-layout-cell.seat.vacant{border-style:dashed;background:#fbfdff}
.seat-layout-cell.aisle{display:flex;align-items:center;justify-content:center;background:repeating-linear-gradient(135deg,#edf5fc 0,#edf5fc 9px,#e4eef8 9px,#e4eef8 18px);border:1px dashed #bfd2e4;color:#7690a8;font-size:8px;letter-spacing:.08em}
.seat-layout-cell.empty{background:transparent;border:1px dashed #e1e8ef}
.seat-layout-cell.editable{cursor:pointer}
.seat-layout-cell.editable:hover{box-shadow:0 0 0 2px #8bb8ea inset}
.seat-card{height:100%;box-sizing:border-box;position:relative;padding:8px 9px;background:#fff;border-radius:9px;cursor:grab}
.seat-card.dragging{opacity:.4}
.seat-card.locked{box-shadow:0 0 0 2px #e4ab4d inset;background:#fffaf0}
.seat-card.readonly{cursor:default}
.seat-card .seat-no{display:block;padding-right:25px;font-size:8px;color:#91a0ad;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.seat-card b{display:block;margin:4px 0 3px;font-size:11px;color:#203448}
.seat-card small{display:block;color:#748899;font-size:8px;line-height:1.45}
.seat-card .group-badge{display:inline-flex;margin-top:5px;padding:2px 5px;border-radius:999px;background:#edf5ff;color:#3772af;font-size:7px}
.seat-lock{position:absolute;right:5px;top:5px;border:0;background:#eef3f7;border-radius:6px;font-size:9px;padding:3px 5px;cursor:pointer}
.seat-lock:hover{background:#e4edf6}
.seat-vacant-content{height:100%;display:flex;align-items:center;justify-content:center;color:#9aa8b5;font-size:9px}
.seat-waiting{margin-top:12px;padding:10px 11px;border:1px solid #dce6ef;background:#fff;border-radius:12px}
.seat-waiting-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.seat-waiting-list{display:flex;gap:7px;flex-wrap:wrap;min-height:28px}
.seat-waiting-chip{display:inline-flex;align-items:center;gap:5px;border:1px solid #d6e2ee;background:#f8fbfe;border-radius:999px;padding:5px 8px;font-size:9px;color:#486077}
.seat-waiting-chip[draggable=true]{cursor:grab}
.seat-back-label{text-align:center;margin-top:10px;color:#8b9baa;font-size:9px;letter-spacing:.12em}
.seat-manage-hidden{display:none!important}
@media(max-width:1200px){
  .classroom-floor{grid-template-columns:32px minmax(0,1fr) 32px}
  .side-aisle{min-height:380px}
  .seat-layout-grid{gap:6px}
  .seat-layout-cell{min-height:66px}
}

.dorm-layout{display:grid;grid-template-columns:330px 1fr;gap:15px}
.dorm-room-list{display:grid;gap:9px}
.dorm-room{border:1px solid var(--line);border-radius:12px;background:#fff;padding:12px;cursor:pointer}
.dorm-room.active{border-color:#8eb8e7;background:#f6faff}
.bed-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.bed-card{border:1px solid var(--line);border-radius:12px;padding:13px;background:#fbfdff;min-height:95px}
.bed-card.empty{border-style:dashed;color:#8c9aa8;display:grid;place-items:center}
.duty-week{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.duty-day{border:1px solid #dbe5ef;border-radius:14px;background:#fff;overflow:hidden;box-shadow:0 3px 12px rgba(35,62,91,.035);transition:.18s ease}
.duty-day.today{border-color:#78aef0;box-shadow:0 0 0 2px #dcecff inset,0 8px 20px rgba(42,116,219,.08)}
.duty-day-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 11px;background:#f8fafc;border-bottom:1px solid #e2e9f0}
.duty-day-head h4{margin:0;font-size:12px}
.duty-day-head .day-meta{display:flex;align-items:center;gap:6px}
.duty-today-badge{padding:3px 7px;border-radius:999px;background:#e8f2ff;color:#276bc1;font-size:8px;font-weight:800}
.duty-adjust-btn{border:1px solid #d9e7f6;background:#f3f8ff;color:#2469bd;border-radius:8px;padding:5px 8px;font-size:9px;font-weight:800;cursor:pointer}
.duty-adjust-btn:hover{background:#e8f2ff}
.duty-list{padding:4px 11px 7px}
.duty-job{display:grid;grid-template-columns:minmax(58px,.78fr) minmax(0,1.22fr);gap:8px;align-items:center;padding:7px 0;border-bottom:1px dashed #e4eaf0;font-size:9px}
.duty-job:last-child{border-bottom:0}
.duty-job-name{color:#718399;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.duty-job-student{font-weight:800;color:#23384e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.duty-job-student.health{color:#b77717}
.duty-health-mark{font-size:8px;margin-left:3px;color:#b77717}
.duty-week-note{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:11px;color:#7c8da0;font-size:9px}
.duty-coverage{padding:4px 8px;border-radius:999px;background:#edf8f3;color:#3b8465;font-size:9px;white-space:nowrap}
.duty-toolbar-note{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid #dbe7f4;background:#f5f9ff;border-radius:11px;margin-bottom:12px;color:#55708d;font-size:10px}
.duty-modal-grid{display:grid;grid-template-columns:1fr;gap:9px}
.duty-edit-row{display:grid;grid-template-columns:minmax(150px,.7fr) minmax(230px,1fr) 36px;gap:8px;align-items:end;padding:9px;border:1px solid #e1e8ef;border-radius:10px;background:#fbfcfe}
.duty-edit-row .field{margin:0}
.duty-edit-row input,.duty-edit-row select{width:100%;height:40px;box-sizing:border-box}
.duty-row-delete{width:36px;height:40px;border:1px solid #f0cfd2;background:#fff7f7;color:#c64e55;border-radius:9px;cursor:pointer;font-size:16px}
.duty-row-delete:hover{background:#ffeded}
.duty-add-row{width:100%;margin-top:10px;border-style:dashed!important}
.duty-modal-warning{padding:9px 11px;border-radius:9px;background:#fff9eb;border:1px solid #f0dfb7;color:#8b681a;font-size:9px;display:none}
.duty-modal-warning.show{display:block}
.duty-select-health{color:#a36a10}
@media(max-width:1200px){.duty-week{grid-template-columns:repeat(2,1fr)}}
@media(max-width:720px){.duty-week{grid-template-columns:1fr}.duty-edit-row{grid-template-columns:1fr}.duty-row-delete{width:100%}}
.fee-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:15px}
.fee-card{border:1px solid var(--line);border-radius:12px;background:#fff;padding:14px}
.fee-card b{font-size:22px;display:block;margin-top:5px}
.fee-paid{color:#27805d}.fee-unpaid{color:#c55258}.fee-part{color:#b67c23}
.template-start{display:grid;grid-template-columns:320px 1fr;gap:16px}
.template-choice{display:grid;gap:9px}
.template-choice-card{border:1px solid var(--line);border-radius:12px;padding:12px;background:#fff;cursor:pointer}
.template-choice-card.selected{border-color:#8ab5e8;background:#f4f9ff;box-shadow:0 0 0 2px rgba(36,104,216,.08)}
.template-schema{border:1px dashed #c8d7e5;border-radius:12px;padding:14px;background:#fbfdff;min-height:190px}
.template-schema h4{margin:0 0 10px}.template-schema p{font-size:11px;color:#65798d;line-height:1.7}
.template-stage{display:none}.template-stage.active{display:block}
.comm-editor,.record-editor-v6{display:grid;grid-template-columns:minmax(400px,.9fr) minmax(470px,1.1fr);gap:16px}
.ai-tools-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.ai-tool-card{display:block;text-decoration:none;color:inherit;border:1px solid var(--line);background:#fff;border-radius:14px;padding:17px;transition:.15s}
.ai-tool-card:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(36,104,216,.10);border-color:#b8d0eb}
.ai-logo{width:42px;height:42px;border-radius:12px;background:var(--soft);display:grid;place-items:center;color:var(--blue2);font-weight:900;font-size:18px;margin-bottom:10px}
.ai-pet-btn{position:fixed;right:24px;bottom:24px;z-index:80;width:58px;height:58px;border:0;border-radius:50%;background:linear-gradient(145deg,#2468d8,#5b8df0);color:#fff;box-shadow:0 14px 32px rgba(36,104,216,.32);font-size:25px}
.ai-pet-panel{position:fixed;right:24px;bottom:94px;width:360px;height:470px;background:#fff;border:1px solid var(--line);border-radius:17px;box-shadow:0 22px 60px rgba(29,52,78,.22);z-index:81;display:none;overflow:hidden}
.ai-pet-panel.open{display:grid;grid-template-rows:auto 1fr auto}
.ai-pet-head{padding:13px 15px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;background:#f7faff}
.ai-chat{padding:13px;overflow:auto;display:grid;gap:10px;align-content:start}
.ai-msg{max-width:86%;padding:9px 11px;border-radius:12px;font-size:11px;line-height:1.65}
.ai-msg.bot{background:#f0f5fb;color:#435b73}.ai-msg.user{background:#2468d8;color:#fff;margin-left:auto}
.ai-input{display:flex;gap:7px;padding:11px;border-top:1px solid var(--line)}.ai-input input{flex:1;border:1px solid var(--line);border-radius:9px;padding:9px}
.remark-editor{display:grid;gap:7px}
@media(max-width:1200px){
 .score-controls{grid-template-columns:repeat(3,1fr)}
 .dorm-layout,.comm-editor,.record-editor-v6,.template-start{grid-template-columns:1fr}
 .duty-week{grid-template-columns:1fr 1fr}
 .ai-tools-grid{grid-template-columns:1fr 1fr}
}

/* ===== v7 focused interaction polish ===== */
.home-cards.v7{grid-template-columns:repeat(4,1fr)}
.home-card .mini-icon{width:34px;height:34px;border-radius:10px;background:#eef5ff;color:#2468d8;display:grid;place-items:center;margin-bottom:10px;font-weight:900}
.home-card.role-only{display:block}
.swap-schedule-box{border:1px solid var(--line);background:#f8fbff;border-radius:12px;padding:11px;margin-top:8px;max-height:150px;overflow:auto}
.swap-schedule-box .swap-line{padding:7px 8px;border-bottom:1px dashed #dce6ef;font-size:10px}.swap-schedule-box .swap-line:last-child{border:0}
.score-controls.v7{grid-template-columns:170px 170px 190px minmax(220px,1fr) auto auto}
.sortable{cursor:pointer;user-select:none;white-space:nowrap}.sortable:hover{color:var(--blue2)}.sort-mark{font-size:9px;color:#88a0b7;margin-left:3px}
.score-filter-summary{font-size:10px;color:#667b90;margin:10px 0 7px}
.analysis-v7-toolbar{display:grid;grid-template-columns:170px 170px 210px minmax(250px,1fr) auto;gap:9px;align-items:end}
.analysis-mode-switch{display:flex;gap:8px;margin:14px 0}.analysis-mode-switch .btn.active{background:var(--blue);color:#fff;border-color:var(--blue)}
.selected-exams{display:flex;gap:6px;flex-wrap:wrap;align-items:center;min-height:38px;padding:6px 8px;border:1px solid var(--line);border-radius:10px;background:#fff}
.exam-chip{font-size:9px;border-radius:999px;padding:5px 8px;background:#edf4ff;color:#315f9d;font-weight:750}
.analysis-grid-v7{display:grid;grid-template-columns:1.35fr .65fr;gap:14px;margin-top:14px}
.trend-panel-v7{border:1px solid var(--line);border-radius:14px;background:#fff;overflow:hidden}.trend-panel-v7 .panel-head{padding:13px 15px}.trend-panel-v7 .panel-body{padding:14px 16px}
.trend-svg-v7{width:100%;height:270px;border-left:1px solid #e5edf5;border-bottom:1px solid #e5edf5;background:linear-gradient(to bottom,transparent 24%,#edf2f7 25%,transparent 26%,transparent 49%,#edf2f7 50%,transparent 51%,transparent 74%,#edf2f7 75%,transparent 76%)}
.analysis-side-list{display:grid;gap:9px}.analysis-side-item{border:1px solid var(--line);border-radius:11px;padding:11px;background:#fff}.analysis-side-item b{display:block;margin-bottom:4px}.analysis-side-item small{color:var(--muted)}
.leave-rule-bar{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:11px 13px;background:#f5f8fc;border:1px solid #e1e9f2;border-radius:11px;margin-bottom:12px}.leave-rule-bar select{min-width:260px}
.leave-cards{display:grid;gap:10px}.leave-card-v7{border:1px solid var(--line);border-radius:13px;background:#fff;padding:13px}.leave-card-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.leave-card-actions{display:flex;gap:7px;align-items:center}
.approval-flow{display:grid;grid-template-columns:repeat(4,1fr);gap:0;margin:18px 0 13px}.approval-step{position:relative;text-align:center;color:#8a9aaa;font-size:9px}.approval-step:not(:last-child):after{content:'';position:absolute;height:2px;background:#dfe8f1;left:57%;right:-43%;top:13px}.approval-step.done:not(:last-child):after{background:#4da37c}.approval-dot{width:27px;height:27px;border-radius:50%;margin:0 auto 6px;display:grid;place-items:center;background:#e7eef5;color:#8294a6;font-weight:900}.approval-step.done .approval-dot{background:#2f956b;color:#fff}.approval-step.current .approval-dot{background:#d48b2e;color:#fff}.approval-step.skippable .approval-dot{background:#eaf2ff;color:#2468d8}
.class-card-actions-v7{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}.class-card-actions-v7 .btn{font-size:10px;padding:7px 10px}.class-card .head-tools{margin-top:10px;padding-top:10px;border-top:1px dashed #dfe7ef}.class-card .head-tools small{display:block;color:#8798a8;margin-bottom:7px}
.exam-picker-v7-list{max-height:390px;overflow:auto;border:1px solid var(--line);border-radius:11px}.exam-picker-v7-row{display:grid;grid-template-columns:30px 1fr 120px 80px;gap:8px;align-items:center;padding:9px 11px;border-bottom:1px solid #e8edf3}.exam-picker-v7-row:last-child{border:0}
@media(max-width:1200px){.home-cards.v7{grid-template-columns:repeat(2,1fr)}.analysis-v7-toolbar,.score-controls.v7{grid-template-columns:repeat(3,1fr)}.analysis-grid-v7{grid-template-columns:1fr}}

/* v7.1 成绩总览表：紧凑列宽，不再把整行空白平均分给每一列 */
.score-all-table{
  overflow-x:auto;
  background:#fff;
}
.score-all-table table{
  width:max-content !important;
  min-width:0 !important;
  table-layout:auto;
}
.score-all-table th,
.score-all-table td{
  white-space:nowrap;
  padding:9px 12px;
}
.score-all-table th:nth-child(1),
.score-all-table td:nth-child(1){width:104px;min-width:104px;max-width:104px}
.score-all-table th:nth-child(2),
.score-all-table td:nth-child(2){width:92px;min-width:92px;max-width:92px}
.score-all-table th:nth-child(n+3):nth-child(-n+11),
.score-all-table td:nth-child(n+3):nth-child(-n+11){width:68px;min-width:68px;max-width:68px;text-align:center}
.score-all-table th:nth-child(12),
.score-all-table td:nth-child(12){width:76px;min-width:76px;max-width:76px;text-align:center}
.score-all-table th:nth-child(13),
.score-all-table td:nth-child(13){width:58px;min-width:58px;max-width:58px;text-align:center}

/* 单科成绩表也保持紧凑，避免宽屏下出现巨大空隙 */
.score-all-table table:not(:has(th:nth-child(10))) th,
.score-all-table table:not(:has(th:nth-child(10))) td{
  width:auto;
  min-width:90px;
  max-width:none;
}
.score-all-table table:not(:has(th:nth-child(10))) th:first-child,
.score-all-table table:not(:has(th:nth-child(10))) td:first-child{min-width:110px}
.score-all-table table:not(:has(th:nth-child(10))) th:nth-child(2),
.score-all-table table:not(:has(th:nth-child(10))) td:nth-child(2){min-width:100px}

/* v7.2 成绩表：自适应铺满可用区域，但绝不超出容器 */
.score-all-table{
  width:100%;
  max-width:100%;
  overflow:hidden;
}

.score-all-table table,
#classScoreTable{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  table-layout:fixed !important;
  border-collapse:collapse;
}

#classScoreTable th,
#classScoreTable td{
  box-sizing:border-box;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  padding:9px 8px;
  text-align:center;
  font-size:clamp(11px, .72vw, 13px);
}

/* 班主任全科成绩：13列刚好按比例铺满整张表 */
.head-mode #classScoreTable th:nth-child(1),
.head-mode #classScoreTable td:nth-child(1){width:8.5%}

.head-mode #classScoreTable th:nth-child(2),
.head-mode #classScoreTable td:nth-child(2){width:8.5%}

.head-mode #classScoreTable th:nth-child(n+3):nth-child(-n+11),
.head-mode #classScoreTable td:nth-child(n+3):nth-child(-n+11){width:7.5%}

.head-mode #classScoreTable th:nth-child(12),
.head-mode #classScoreTable td:nth-child(12){width:8%}

.head-mode #classScoreTable th:nth-child(13),
.head-mode #classScoreTable td:nth-child(13){width:7.5%}

/* 任课教师单科成绩：5列也铺满，不留大片空白 */
body:not(.head-mode) #classScoreTable th:nth-child(1),
body:not(.head-mode) #classScoreTable td:nth-child(1){width:16%}

body:not(.head-mode) #classScoreTable th:nth-child(2),
body:not(.head-mode) #classScoreTable td:nth-child(2){width:18%}

body:not(.head-mode) #classScoreTable th:nth-child(3),
body:not(.head-mode) #classScoreTable td:nth-child(3){width:16%}

body:not(.head-mode) #classScoreTable th:nth-child(4),
body:not(.head-mode) #classScoreTable td:nth-child(4){width:34%}

body:not(.head-mode) #classScoreTable th:nth-child(5),
body:not(.head-mode) #classScoreTable td:nth-child(5){width:16%}

/* 学号、姓名保持易读；其余成绩列均衡铺开 */
#classScoreTable th:first-child,
#classScoreTable td:first-child{
  text-align:left;
  padding-left:12px;
}

#classScoreTable th:nth-child(2),
#classScoreTable td:nth-child(2){
  text-align:left;
}

#classScoreTable .total-cell{
  background:#f4f8fd;
}

/* 较窄屏幕继续自适应，不横向溢出 */
@media (max-width:1200px){
  #classScoreTable th,
  #classScoreTable td{
    padding:8px 5px;
    font-size:11px;
  }
}

@media (max-width:980px){
  #classScoreTable th,
  #classScoreTable td{
    padding:7px 4px;
    font-size:10px;
  }
}

/* v8.0 值日安排权限与姓名样式 */
#duty .duty-job-student,
#duty .duty-job-student.health{
  color:#172536 !important;
  font-weight:800;
}
#duty .duty-health-mark{display:none!important}
.duty-manage-hidden{display:none!important}

/* ===== v8.1 家校沟通：与教学记录统一的文档编辑结构 ===== */
.comm-v81-modal{width:min(96vw,1660px)!important;max-width:none!important;height:min(96vh,1040px)!important;max-height:96vh!important;border-radius:16px!important;overflow:hidden;display:grid;grid-template-rows:auto 1fr auto}
.comm-v81-head{position:relative!important;z-index:5;min-height:72px;padding:14px 18px 14px 20px!important;background:#fff;box-shadow:0 4px 18px rgba(28,55,84,.035)}
.comm-v81-head-actions{display:flex;align-items:center;gap:9px}.comm-v81-head-actions .close{position:static!important;width:36px;height:36px}
.comm-v81-body{min-height:0;background:#f6f8fb;padding:14px 16px}
.comm-v81-layout{height:100%;min-height:0;display:grid;grid-template-columns:minmax(390px,.82fr) minmax(760px,1.68fr);gap:14px}
.comm-v81-left{min-height:0;background:#fff;border:1px solid #dce5ee;border-radius:12px;display:flex;flex-direction:column;overflow:hidden}
.comm-v81-meta{padding:14px;border-bottom:1px solid #e3eaf1;background:#fff;flex:0 0 auto}.comm-v81-meta .field{margin-bottom:10px}.comm-v81-meta .field:last-child{margin-bottom:0}.comm-v81-meta input,.comm-v81-meta select{height:42px;width:100%}
.comm-v81-fields{padding:12px 14px 18px;overflow:auto;min-height:0;flex:1}.comm-v81-fields textarea{min-height:86px}.comm-v81-fields .field{margin-bottom:10px}
.comm-v81-editor-wrap{min-height:0;background:#fff;border:1px solid #dce5ee;border-radius:12px;overflow:hidden;display:grid;grid-template-rows:46px auto 1fr}
.comm-v81-editor-head{height:46px;padding:0 14px;border-bottom:1px solid #e4ebf2;display:flex;align-items:center;justify-content:space-between;background:#fbfcfe}.comm-v81-editor-head>div{display:flex;align-items:baseline;gap:9px}.comm-v81-editor-head span{font-size:10px;color:#8190a0}
.comm-v81-toolbar{display:flex;flex-wrap:wrap;gap:6px;padding:8px 10px;border-bottom:1px solid #e4ebf2;background:#f7f9fc}.comm-v81-toolbar button,.comm-v81-toolbar select{height:30px;border:1px solid #d8e3ed;border-radius:7px;background:#fff;padding:0 9px;font-size:10px;cursor:pointer}
.comm-v81-canvas{position:relative;min-height:0;overflow:auto;background:#eef2f6;padding:24px;box-sizing:border-box;outline:none}.comm-v81-canvas:before{content:"";display:block;position:absolute;left:50%;top:18px;transform:translateX(-50%);width:min(850px,calc(100% - 36px));min-height:calc(100% - 36px);background:#fff;border:1px solid #e1e7ee;box-shadow:0 8px 22px rgba(34,56,79,.08);pointer-events:none}.comm-v81-canvas>*{position:relative;z-index:1;width:min(770px,calc(100% - 70px));margin-left:auto;margin-right:auto}.comm-v81-canvas h2{text-align:center;font-size:24px;margin-top:8px;margin-bottom:28px}.comm-v81-canvas h3{font-size:15px;margin-top:20px}.comm-v81-canvas p{font-size:13px;line-height:1.75}.comm-v81-empty{text-align:center;padding-top:180px!important}
.comm-v81-foot{min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:9px 16px!important;background:#fff;box-shadow:0 -4px 18px rgba(28,55,84,.025)}
.comm-channel-line{display:flex;align-items:center;gap:9px;flex-wrap:nowrap;min-width:0}.comm-channel-line>b{font-size:11px;white-space:nowrap}.comm-channel-chip{display:inline-flex!important;align-items:center;gap:6px!important;width:auto!important;min-width:auto!important;height:34px!important;padding:0 12px!important;margin:0!important;border:1px solid #d8e3ed!important;border-radius:9px!important;background:#fff!important;white-space:nowrap!important;font-size:10px!important}.comm-channel-chip input{margin:0!important;width:14px!important;height:14px!important;flex:0 0 auto}

/* ===== v8.1 新建考试：班级/科目横向排列，取消“考试范围” ===== */
.exam-create-v81 .modal-body{padding-top:14px}.exam-v81-basic-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr .7fr;gap:12px;margin-bottom:14px}.exam-v81-basic-grid .field{margin:0}.exam-v81-row-field{margin:12px 0}.exam-inline-options{display:flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important;flex-wrap:nowrap!important;overflow-x:auto;padding:2px 1px 5px}.exam-inline-chip{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;flex:0 0 auto!important;width:auto!important;min-width:92px!important;height:42px!important;padding:0 13px!important;border:1px solid #d9e4ef!important;border-radius:10px!important;background:#fff!important;white-space:nowrap!important;font-size:11px!important}.exam-inline-chip input{width:14px!important;height:14px!important;margin:0!important}.exam-inline-chip.locked{background:#f6f9fc!important}.exam-subjects-v81 .exam-inline-chip{min-width:72px!important}.exam-teacher-map-v81{margin-top:12px}.exam-analysis-check{display:inline-flex;align-items:center;gap:6px;margin-top:8px;font-size:11px}

@media(max-width:1150px){.comm-v81-layout{grid-template-columns:minmax(340px,.9fr) minmax(620px,1.5fr)}.exam-v81-basic-grid{grid-template-columns:1fr 1fr}.comm-channel-line{overflow-x:auto}}

/* ===== v8.2 家校沟通：只优化该弹窗 ===== */
.comm-v82-modal{
  width:min(96vw,1720px)!important;
  height:min(92vh,980px)!important;
  max-height:92vh!important;
  display:grid!important;
  grid-template-rows:72px minmax(0,1fr) 64px!important;
  overflow:hidden!important;
  isolation:isolate;
  background:#fff;
}

.comm-v82-modal .comm-v81-head{
  min-height:0!important;
  height:72px;
  box-sizing:border-box;
  position:relative!important;
  z-index:20!important;
  flex:0 0 auto;
}

.comm-v82-body{
  min-height:0!important;
  height:auto!important;
  overflow:hidden!important;
  padding:12px 14px!important;
  box-sizing:border-box;
}

.comm-v82-layout{
  height:100%!important;
  min-height:0!important;
  grid-template-columns:minmax(390px,.78fr) minmax(760px,1.72fr)!important;
  gap:12px!important;
  overflow:hidden!important;
}

.comm-v82-layout .comm-v81-left{
  min-height:0!important;
  height:100%!important;
  overflow:hidden!important;
}

.comm-v82-layout .comm-v81-fields{
  min-height:0!important;
  overflow:auto!important;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}

.comm-v82-editor-wrap{
  min-height:0!important;
  height:100%!important;
  overflow:hidden!important;
  grid-template-rows:46px auto minmax(0,1fr)!important;
}

.comm-v82-editor-wrap .comm-v81-editor-head{
  height:46px!important;
  min-height:46px!important;
}

.comm-v82-editor-wrap .comm-v81-toolbar{
  flex:0 0 auto;
  position:relative!important;
  z-index:4;
  max-height:78px;
  overflow:auto;
  box-sizing:border-box;
}

.comm-v82-canvas{
  min-height:0!important;
  height:100%!important;
  overflow:auto!important;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  padding:18px 22px 30px!important;
  background:#edf2f7!important;
  box-sizing:border-box;
}

/* 取消 v8.1 的伪元素“纸张”，改用真实 DOM 纸张，避免正文与底栏穿模 */
.comm-v82-canvas::before{
  display:none!important;
}

.comm-v82-canvas > *{
  width:auto!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
}

.comm-v82-canvas .comm-letter-v82{
  width:min(850px,calc(100% - 16px))!important;
  min-height:calc(100% - 8px);
  margin:0 auto!important;
  padding:46px 58px 50px;
  box-sizing:border-box;
  background:#fff;
  border:1px solid #dfe6ed;
  box-shadow:0 8px 24px rgba(35,57,80,.08);
  color:#202e3d;
  position:relative;
  z-index:1;
}

.comm-v82-canvas .comm-letter-title-v82{
  margin:0 0 30px!important;
  text-align:center!important;
  font-size:24px!important;
  line-height:1.45!important;
  font-weight:800;
  letter-spacing:.02em;
}

.comm-v82-canvas .comm-letter-v82 p{
  margin:0 0 14px;
  font-size:13px;
  line-height:1.9;
  text-align:justify;
}

.comm-v82-canvas .comm-letter-salutation-v82{
  text-align:left!important;
  margin-bottom:12px!important;
}

.comm-v82-canvas .comm-notice-info-v82{
  margin:20px 0 22px;
  border:1px solid #dbe5ef;
  border-radius:10px;
  background:#f8fbff;
  overflow:hidden;
}

.comm-v82-canvas .comm-info-row-v82{
  display:grid;
  grid-template-columns:110px minmax(0,1fr);
  border-bottom:1px solid #e4ebf2;
}

.comm-v82-canvas .comm-info-row-v82:last-child{
  border-bottom:0;
}

.comm-v82-canvas .comm-info-label-v82{
  padding:10px 12px;
  background:#f1f6fb;
  color:#55708c;
  font-weight:700;
  font-size:12px;
}

.comm-v82-canvas .comm-info-value-v82{
  padding:10px 13px;
  font-size:12px;
  line-height:1.7;
  background:#fff;
}

.comm-v82-canvas .comm-notice-block-v82{
  margin:18px 0;
}

.comm-v82-canvas .comm-notice-block-v82 b{
  display:block;
  margin-bottom:6px;
  font-size:13px;
  color:#1c3550;
}

.comm-v82-canvas .comm-warm-tip-v82{
  margin:20px 0!important;
  padding:12px 14px;
  border-left:3px solid #6ea6e7;
  background:#f5f9fe;
  color:#3f5872;
  border-radius:0 8px 8px 0;
}

.comm-v82-canvas .comm-letter-sign-v82{
  margin-top:30px!important;
  text-align:right!important;
  line-height:1.9!important;
}

.comm-v82-modal .comm-v81-foot{
  height:64px!important;
  min-height:64px!important;
  box-sizing:border-box;
  position:relative!important;
  z-index:30!important;
  background:#fff!important;
  border-top:1px solid #e1e8ef;
  box-shadow:0 -5px 18px rgba(33,55,78,.05)!important;
  overflow:hidden;
}

/* 底部渠道保持一行；空间不足时仅渠道区域横向滚动，不挤压正文 */
.comm-v82-modal .comm-channel-line{
  min-width:0;
  flex:1 1 auto;
  overflow-x:auto;
  overflow-y:hidden;
  white-space:nowrap;
  padding-bottom:2px;
}

.comm-v82-modal .comm-channel-chip{
  flex:0 0 auto;
}

/* 防止旧弹窗的外层滚动条进入内容区 */
#commWizardModal{
  overflow:hidden!important;
}

@media(max-width:1180px){
  .comm-v82-layout{
    grid-template-columns:minmax(340px,.9fr) minmax(620px,1.5fr)!important;
  }
  .comm-v82-canvas .comm-letter-v82{
    padding:38px 42px 44px;
  }
}

/* ===== v8.3 费用管理 ===== */
.fee-v83-project-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.fee-v83-project-card{border:1px solid #dce6ef;background:#fff;border-radius:16px;padding:16px;min-height:178px;box-sizing:border-box;cursor:pointer;transition:.18s ease;position:relative;overflow:hidden}
.fee-v83-project-card:hover{transform:translateY(-2px);box-shadow:0 10px 26px rgba(34,62,91,.08);border-color:#bcd3ea}
.fee-v83-project-card.add{border-style:dashed;display:flex;align-items:center;justify-content:center;text-align:center;background:#fbfdff}
.fee-v83-project-card.add:hover{background:#f5f9ff}
.fee-v83-project-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.fee-v83-project-icon{width:38px;height:38px;border-radius:11px;background:#eaf3ff;color:#2267bb;display:flex;align-items:center;justify-content:center;font-weight:900;font-size:15px;flex:0 0 auto}
.fee-v83-project-actions{display:flex;gap:6px}
.fee-v83-icon-btn{border:1px solid #dce6ef;background:#fff;border-radius:8px;padding:5px 8px;color:#60758a;font-size:9px;cursor:pointer}
.fee-v83-icon-btn:hover{background:#f5f9fd}
.fee-v83-project-card h3{margin:13px 0 4px;font-size:16px;color:#1d3044}
.fee-v83-project-meta{color:#7b8da0;font-size:10px;line-height:1.6;min-height:32px}
.fee-v83-progress{height:7px;border-radius:999px;background:#edf2f6;overflow:hidden;margin:13px 0 9px}
.fee-v83-progress>i{display:block;height:100%;background:#4c8bcf;border-radius:999px}
.fee-v83-project-bottom{display:flex;justify-content:space-between;align-items:end;gap:10px}
.fee-v83-stat strong{display:block;font-size:20px;color:#1d3044;line-height:1}
.fee-v83-stat span{font-size:9px;color:#8595a4}
.fee-v83-pending{font-size:9px;color:#bf6a27;background:#fff5e9;border-radius:999px;padding:5px 8px;white-space:nowrap}
.fee-v83-overview-note{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 13px;border:1px solid #dce7f2;border-radius:11px;background:#f6faff;margin-bottom:14px;color:#5a728a;font-size:10px}
.fee-v83-detail{display:none}.fee-v83-detail.active{display:block}.fee-v83-overview.hidden{display:none}
.fee-v83-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:13px}
.fee-v83-detail-title{display:flex;align-items:center;gap:10px}
.fee-v83-back{width:34px;height:34px;border:1px solid #dce6ef;background:#fff;border-radius:9px;cursor:pointer;font-size:16px;color:#49647e}
.fee-v83-back:hover{background:#f5f9fd}
.fee-v83-detail-title h3{margin:0;font-size:17px}.fee-v83-detail-sub{font-size:10px;color:#8293a4;margin-top:3px}
.fee-v83-detail-actions{display:flex;gap:8px;flex-wrap:wrap}
.fee-v83-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:13px}
.fee-v83-kpi{border:1px solid #dfe7ee;border-radius:12px;background:#fff;padding:12px}
.fee-v83-kpi small{display:block;color:#8394a5;font-size:9px;margin-bottom:5px}.fee-v83-kpi b{font-size:20px;color:#21364b}
.fee-v83-help{padding:9px 11px;border-radius:10px;background:#f5f9ff;border:1px solid #dce8f5;color:#58728d;font-size:9px;margin-bottom:10px;line-height:1.65}
.fee-v83-filterbar{display:grid;grid-template-columns:160px minmax(240px,1fr) auto auto;gap:8px;align-items:center;margin-bottom:10px}
.fee-v83-selected-bar{display:none;align-items:center;justify-content:space-between;gap:10px;padding:9px 11px;border:1px solid #cfe1f6;background:#eef6ff;border-radius:10px;margin-bottom:10px}
.fee-v83-selected-bar.active{display:flex}.fee-v83-selected-bar b{color:#2468b8}
.fee-v83-table-wrap{overflow:auto;border:1px solid #e0e7ee;border-radius:12px}
#feeTableV83{width:100%;border-collapse:collapse;table-layout:fixed}
#feeTableV83 th,#feeTableV83 td{padding:9px 8px;border-bottom:1px solid #e8edf2;font-size:9px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#feeTableV83 th{background:#f7f9fb;color:#61768a;font-weight:800;position:sticky;top:0;z-index:2}
#feeTableV83 tr:last-child td{border-bottom:0}
#feeTableV83 .fee-v83-check-col{width:38px;text-align:center}
#feeTableV83 .fee-v83-student-col{width:120px}#feeTableV83 .fee-v83-id-col{width:105px}
#feeTableV83 .fee-v83-money-col{width:90px}#feeTableV83 .fee-v83-status-col{width:82px}
#feeTableV83 .fee-v83-date-col{width:95px}#feeTableV83 .fee-v83-action-col{width:72px}
.fee-v83-money{font-variant-numeric:tabular-nums}.fee-v83-note-cell{color:#6c8195}.fee-v83-link{color:#1765bc;font-weight:800;cursor:pointer}.fee-v83-link:hover{text-decoration:underline}
.fee-v83-student-preview{display:flex;gap:6px;flex-wrap:wrap;max-height:86px;overflow:auto;padding:8px;border:1px solid #e1e8ef;border-radius:9px;background:#fafcfe}
.fee-v83-student-chip{padding:4px 7px;border-radius:999px;background:#edf4fb;color:#48627c;font-size:9px}
.fee-v83-form-note{padding:8px 10px;background:#f5f9ff;border:1px solid #dbe8f6;border-radius:9px;color:#5b738c;font-size:9px}
.fee-v83-danger-note{padding:8px 10px;background:#fff8ec;border:1px solid #f0dfbd;border-radius:9px;color:#8a671f;font-size:9px}
.fee-v83-amount-preview{font-size:10px;color:#5c738a;margin-top:5px}
@media(max-width:1180px){.fee-v83-project-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.fee-v83-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.fee-v83-project-grid,.fee-v83-kpis{grid-template-columns:1fr}.fee-v83-filterbar{grid-template-columns:1fr}}

/* ===== v8.4 学生档案编辑：监护人主联系人唯一 ===== */
.student-edit-v84{
  width:min(980px,96vw)!important;
  max-height:92vh!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr) auto!important;
  overflow:hidden!important;
}
.student-edit-v84 .modal-head{
  position:relative;
  z-index:10;
  background:#fff;
}
.student-edit-v84 .modal-body{
  min-height:0;
  overflow:auto;
  padding:18px 20px 22px;
}
.student-edit-v84 .modal-foot{
  position:relative;
  z-index:10;
  background:#fff;
  box-shadow:0 -4px 14px rgba(28,49,70,.04);
}
.student-v84-section{
  border:1px solid #e0e8f0;
  border-radius:14px;
  background:#fff;
  padding:15px;
  margin-bottom:14px;
}
.student-v84-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:13px;
}
.student-v84-section-title{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:850;
  color:#21364b;
}
.student-v84-section-title small{
  font-size:10px;
  font-weight:500;
  color:#8294a6;
}
.student-v84-basic-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:11px 12px;
}
.student-v84-basic-grid .span-2{grid-column:1/-1}
.guardian-v84-list{display:grid;gap:10px}
.guardian-v84-card{
  border:1px solid #dfe7ef;
  border-radius:12px;
  background:#f9fbfd;
  padding:12px;
  transition:.16s ease;
}
.guardian-v84-card.primary{
  border-color:#9fc5ef;
  background:#f3f8ff;
  box-shadow:0 0 0 2px rgba(52,120,201,.05) inset;
}
.guardian-v84-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.guardian-v84-identity{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.guardian-v84-order{
  color:#657b91;
  font-size:10px;
  font-weight:800;
}
.guardian-v84-badge{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:4px 8px;
  font-size:9px;
  background:#edf2f6;
  color:#65798d;
  white-space:nowrap;
}
.guardian-v84-card.primary .guardian-v84-badge{
  background:#e3f0ff;
  color:#1764b5;
}
.guardian-v84-primary-choice{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:10px;
  color:#536b82;
  cursor:pointer;
  user-select:none;
}
.guardian-v84-primary-choice input{margin:0}
.guardian-v84-fields{
  display:grid;
  grid-template-columns:1fr 1fr 1.25fr;
  gap:10px;
}
.guardian-v84-actions{
  display:flex;
  align-items:center;
  gap:7px;
}
.guardian-v84-tip{
  margin-top:10px;
  padding:9px 11px;
  border:1px solid #dbe8f7;
  border-radius:10px;
  background:#f5f9ff;
  color:#5b748e;
  font-size:9px;
  line-height:1.6;
}
.student-v84-dorm-grid{
  display:grid;
  grid-template-columns:1.25fr 1fr 1fr;
  gap:10px;
}
.student-v84-required{color:#d35a5f;margin-left:2px}
@media(max-width:760px){
  .student-v84-basic-grid,.guardian-v84-fields,.student-v84-dorm-grid{grid-template-columns:1fr}
  .student-v84-basic-grid .span-2{grid-column:auto}
  .guardian-v84-card-head{align-items:flex-start;flex-direction:column}
}

/* ===== v9.0 collapsible sidebar groups ===== */
.nav-v90{padding-top:6px}.nav-section-v90{margin-bottom:4px}.nav-v90 .nav-group-toggle-v90{width:100%;border:0;background:transparent;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 10px 7px;margin:0;cursor:pointer;color:#94a3b4;font:inherit;font-size:10px;font-weight:850;text-align:left;border-radius:8px}.nav-v90 .nav-group-toggle-v90:hover{color:#5f7690;background:#f7f9fc}.nav-group-arrow-v90{width:18px;height:18px;display:grid;place-items:center;color:#93a3b4;font-size:13px;transition:transform .18s ease}.nav-section-v90.collapsed .nav-group-arrow-v90{transform:rotate(-90deg)}.nav-section-v90.collapsed .nav-group-body-v90{display:none}.nav-section-v90 .nav-btn{width:100%}

/* ===== v9.0 fee alignment / delete ===== */
.fee-v90-payment-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:start}.fee-v90-payment-field{margin:0!important;display:grid;grid-template-rows:18px 44px 20px;align-content:start}.fee-v90-payment-field label{margin:0!important;line-height:18px!important}.fee-v90-payment-field select,.fee-v90-payment-field input{width:100%!important;height:44px!important;min-height:44px!important;margin:0!important;box-sizing:border-box!important}.fee-v90-field-foot{min-height:20px;line-height:20px;margin:0!important;padding:0 2px;color:#8394a5;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fee-v90-delete-btn{color:#c44f55!important;border-color:#f0d2d5!important;background:#fffafa!important}.fee-v90-delete-btn:hover{background:#fff1f2!important}.fee-delete-v90-modal{width:min(520px,92vw)!important}.fee-delete-v90-icon{width:48px;height:48px;margin:2px auto 12px;border-radius:50%;display:grid;place-items:center;background:#fff0f1;color:#c44f55;font-size:22px;font-weight:900}.fee-delete-v90-title{text-align:center;margin:0 0 8px}.fee-delete-v90-desc{text-align:center;color:#667b90;line-height:1.7;margin:0 0 14px}.fee-delete-v90-warning{border:1px solid #f0d8b4;background:#fff8ec;color:#886521;border-radius:10px;padding:10px 12px;line-height:1.65;font-size:10px}
@media(max-width:700px){.fee-v90-payment-row{grid-template-columns:1fr}}
