*{box-sizing:border-box}
body{margin:0;font:14px/1.6 "Microsoft YaHei","PingFang SC",sans-serif;background:#f0f2f5;color:#1f2937}
a{color:#1d4ed8;text-decoration:none}a:hover{text-decoration:underline}
.layout{display:flex;min-height:100vh}
.side{width:210px;background:#0f2a4d;color:#cbd5e1;flex-shrink:0}
.side .brand{padding:16px 18px;font-size:17px;color:#fff;font-weight:700;border-bottom:1px solid #ffffff1a}
.side .sec{padding:14px 18px 4px;font-size:12px;color:#7f93b2}
.side a{display:block;padding:9px 18px 9px 26px;color:#cbd5e1}
.side a:hover{background:#ffffff14;text-decoration:none}
.side a.on{background:#1d4ed8;color:#fff}
.main{flex:1;min-width:0;display:flex;flex-direction:column}
.top{height:52px;background:#fff;border-bottom:1px solid #e5e7eb;display:flex;align-items:center;justify-content:space-between;padding:0 24px}
.top form{display:inline}
.content{padding:20px 24px;max-width:1200px;width:100%}
.foot{margin-top:auto;padding:12px 24px;color:#9ca3af;font-size:12px}
.card{background:#fff;border-radius:6px;padding:18px 20px;box-shadow:0 1px 2px #0000000f;margin-bottom:16px}
.card h2,.card h3{margin:0 0 14px;font-size:16px}
.head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}
.head h2{margin:0}
label{display:block;margin:12px 0 4px;font-weight:600;font-size:13px}
input,select,textarea{width:100%;padding:7px 10px;border:1px solid #d1d5db;border-radius:4px;font:inherit;background:#fff}
input:focus,select:focus,textarea:focus{outline:2px solid #bfdbfe;border-color:#3b82f6}
input[type=checkbox],input[type=radio]{width:auto;margin-right:4px}
input[readonly]{background:#f3f4f6}
button,.btn{background:#1d4ed8;color:#fff;border:0;border-radius:4px;padding:7px 16px;cursor:pointer;display:inline-block;font:inherit}
button:hover,.btn:hover{background:#1e40af;text-decoration:none}
.btn.sm,button.sm{padding:2px 10px;font-size:12px}
.gray{background:#6b7280!important}.red{background:#dc2626!important}.green{background:#16a34a!important}
.link{background:none;color:#1d4ed8;padding:0}.link:hover{background:none;text-decoration:underline}
.link.red{background:none!important;color:#dc2626}
table{width:100%;border-collapse:collapse}
th{background:#f9fafb;text-align:left;font-weight:600;color:#4b5563}
th,td{padding:8px 10px;border-bottom:1px solid #eef0f3;vertical-align:top}
tr:hover td{background:#fafcff}
.notifications{position:fixed;right:20px;bottom:20px;z-index:1000;width:min(380px,calc(100vw - 32px));max-height:70vh;overflow-y:auto;display:flex;flex-direction:column;gap:10px}
.notifications:empty{display:none}
.notification{display:flex;align-items:flex-start;gap:12px;padding:14px 14px 14px 16px;border:1px solid #bfdbfe;border-left:4px solid #2563eb;border-radius:8px;background:#eff6ff;color:#1e3a8a;box-shadow:0 6px 24px rgba(15,23,42,.18)}
.notification-error{background:#fef2f2;border-color:#fecaca;border-left-color:#dc2626;color:#991b1b}
.notification-message{flex:1;min-width:0;white-space:pre-wrap;overflow-wrap:anywhere}
.notification-close{flex:none;padding:0 4px;background:transparent;color:inherit;font-size:20px;line-height:1;opacity:.75}
.notification-close:hover{background:transparent;opacity:1}
@media(max-width:600px){.notifications{right:16px;bottom:16px}}
.err{background:#fee2e2;color:#991b1b;padding:10px 14px;border-radius:4px;margin-bottom:14px}
.warn{background:#fef3c7;color:#92400e;padding:10px 14px;border-radius:4px;margin-bottom:14px}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}
.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:0 20px}
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:16px}
.stats div{background:#fff;border-radius:6px;padding:16px 20px;box-shadow:0 1px 2px #0000000f}
.stats b{display:block;font-size:26px;color:#1d4ed8}
.tag{display:inline-block;padding:0 8px;border-radius:10px;font-size:12px;background:#e5e7eb}
.tag.ok{background:#dcfce7;color:#166534}.tag.bad{background:#fee2e2;color:#991b1b}.tag.info{background:#dbeafe;color:#1e40af}
.muted{color:#9ca3af;font-size:12px}
.filter{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.filter input,.filter select{width:auto;min-width:130px}
.pager{margin-top:14px;display:flex;gap:10px;align-items:center;justify-content:flex-end}
.perm-group{border:1px solid #e5e7eb;border-radius:4px;padding:8px 14px;margin-bottom:10px}
.perm-group b{display:block;margin-bottom:4px}
.perm-group label{display:inline-block;margin:2px 18px 2px 0;font-weight:400}
.staff-picker-control{position:relative}
.staff-picker.is-enhanced .staff-input{display:flex;align-items:center;flex-wrap:wrap;gap:5px;border:1px solid #d1d5db;border-radius:4px;padding:4px 8px;min-height:39px;background:#fff;cursor:text}
.staff-picker.is-enhanced .staff-input:focus-within{outline:2px solid #bfdbfe;border-color:#3b82f6}
.staff-selected{display:contents}
.staff-chip{display:inline-flex;align-items:center;gap:4px;max-width:100%;padding:2px 6px 2px 9px;border-radius:5px;background:#eff6ff;color:#1e40af;font-size:12px;line-height:1.6}
.staff-chip-text{overflow-wrap:anywhere;min-width:0}
.staff-chip-remove{flex:none;padding:0 3px;background:transparent;color:#475569;font-size:17px;line-height:1}
.staff-chip-remove:hover{background:#dbeafe;color:#1e40af}
.staff-picker.is-enhanced .staff-input input{flex:1 1 155px;width:auto;min-width:0;padding:3px 2px;border:0;outline:0;background:transparent}
.staff-panel{margin-top:5px;border:1px solid #dbe3ef;border-radius:8px;background:#fff;box-shadow:0 10px 24px rgba(15,23,42,.16);overflow:hidden}
.staff-picker.is-enhanced .staff-panel{position:absolute;top:100%;left:0;right:0;z-index:20}
.staff-panel[hidden]{display:none}
.staff-options{max-height:210px;overflow-y:auto;padding:5px}
.staff-option{display:flex;align-items:baseline;gap:6px;margin:0;padding:7px 9px;border-radius:5px;font-weight:400;cursor:pointer;overflow-wrap:anywhere}
.staff-option:hover,.staff-option:focus-within{background:#eff6ff}
.staff-option[hidden]{display:none}
.staff-option input{flex:none}
.staff-empty{margin:0;padding:10px 14px}
.staff-panel-footer{padding:6px 10px;border-top:1px solid #eef2f7;text-align:right}
.staff-panel-footer[hidden]{display:none}
.staff-done{padding:3px 10px;font-size:12px}
.staff-selection{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.schedule-table{overflow-x:auto}.schedule-table table{min-width:650px}
.teacher-schedule table{table-layout:fixed;min-width:980px;border:1px solid #e2e8f0}
.teacher-schedule .schedule-caption{text-align:left;color:#64748b;font-size:12px;padding:0 0 8px}
.teacher-schedule th,.teacher-schedule td{border:1px solid #e2e8f0;padding:8px;vertical-align:middle}
.teacher-schedule thead th{text-align:center;background:#eff6ff;color:#1e3a8a}
.teacher-schedule thead th:first-child{width:128px}
.teacher-schedule .schedule-slot{text-align:center;background:#f8fafc;color:#334155;overflow-wrap:anywhere}
.schedule-slot span,.schedule-slot small{display:block}.schedule-slot small{margin-top:4px;color:#64748b;font-size:11px;font-weight:400}
.teacher-schedule td{height:80px;text-align:center;background:#fff}
.teacher-schedule tr:hover td{background:#fff}
.schedule-lesson{display:flex;flex-direction:column;gap:2px;text-align:left;padding:8px;border-radius:8px;background:#eff6ff;color:#1e3a8a;overflow-wrap:anywhere;line-height:1.45}
.schedule-lesson+.schedule-lesson{margin-top:6px}
.schedule-lesson strong{font-size:14px}.schedule-lesson span{font-size:12px}
.schedule-lesson .schedule-lesson-time{color:#475569}.schedule-lesson .schedule-lesson-type{color:#1d4ed8}
.schedule-empty{color:#cbd5e1}
.schedule-metadata{overflow-wrap:anywhere;white-space:pre-wrap}
.review-header,.review-section,.review-decision{border:1px solid #e5eaf2;border-radius:10px;box-shadow:0 2px 8px rgba(15,35,65,.04)}
.review-heading,.review-heading-actions,.review-section-head,.review-counts{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.review-heading{align-items:flex-start;padding-bottom:18px;border-bottom:1px solid #edf1f6}
.review-heading h2{margin:3px 0 0;font-size:20px;overflow-wrap:anywhere}.review-eyebrow{font-size:12px;color:#64748b;font-weight:600;letter-spacing:.03em}
.review-back{font-size:13px;font-weight:600}.review-status,.issue-badge{display:inline-flex;align-items:center;border-radius:999px;font-size:12px;font-weight:600;white-space:nowrap;padding:3px 10px}
.review-status{background:#e8f0fc;color:#1d4ed8}.status-published{background:#e8f7ef;color:#187346}.status-failed{background:#fef0ef;color:#b42318}
.review-metadata{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:18px 0}
.review-metadata div{min-width:0}.review-metadata dt{font-size:12px;color:#64748b}.review-metadata dd{margin:4px 0 0;color:#25344a;font-weight:600;white-space:pre-wrap;overflow-wrap:anywhere}.review-reason{grid-column:span 2}
.review-progress{padding:14px 16px;border-radius:8px;background:#f7f9fc}.review-progress-top{display:flex;justify-content:space-between;align-items:center}.review-progress-top label{margin:0;color:#334155}.review-progress-top strong{color:#1d4ed8}.review-progress p{margin:4px 0 0;font-size:12px;color:#64748b}
.review-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.review-summary>div{background:#fff;border:1px solid #e5eaf2;border-radius:10px;padding:15px 18px}.review-summary span,.review-summary small{display:block;color:#64748b;font-size:12px}.review-summary strong{display:block;margin:2px 0;color:#172d4d;font-size:24px;line-height:1.3}
.review-decision{display:flex;align-items:center;justify-content:space-between;gap:20px}.review-decision h2{margin:0 0 5px;color:#1e3a5f}.review-decision p{margin:3px 0;color:#475569}.review-decision .review-note{font-size:12px;color:#64748b}.review-decision form{flex:none}
.review-section-head{align-items:flex-start;margin-bottom:16px}.review-section-head h2{margin:0;color:#1f334e}.review-section-head p{margin:4px 0 0;color:#64748b;font-size:12px}.review-total{color:#64748b;font-size:12px;white-space:nowrap}
.issue-error{color:#b42318;background:#fef0ef}.issue-warning{color:#9a6000;background:#fff6e3}
.review-issue-filter{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}.review-issue-filter label{margin:0;color:#475569}.review-issue-filter select{width:auto;min-width:160px;margin:0}.review-issue-filter span{color:#64748b;font-size:12px}.review-issues tr[hidden]{display:none}
.review-issues{max-height:430px;overflow:auto;border:1px solid #e8edf4;border-radius:8px}.review-issues table{min-width:620px}.review-issues th{position:sticky;top:0;background:#f7f9fc;color:#64748b;font-size:12px;z-index:1}.review-issues td{padding:12px 10px}.review-issues th:first-child{width:85px}.review-issues th:nth-child(2){width:165px}.review-issues th:nth-child(3){width:95px}.review-location{color:#64748b;font-size:12px;overflow-wrap:anywhere}.review-issue-message{overflow-wrap:anywhere}
.review-empty{display:flex;flex-direction:column;gap:4px;padding:22px;text-align:center;border:1px dashed #dbe3ee;border-radius:8px;color:#64748b}.review-empty strong{color:#334155}.review-empty span{font-size:12px}.review-empty[hidden],.review-teacher[hidden]{display:none}
.review-teacher-search{max-width:320px;margin-bottom:12px}.review-teacher-search label{margin:0 0 4px;color:#475569}.review-teacher-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px;max-height:360px;overflow:auto}
.review-teacher{display:flex;align-items:center;gap:10px;padding:11px 12px;border:1px solid #e5ebf3;border-radius:8px;color:#263b57;background:#fff}.review-teacher:hover,.review-teacher:focus-visible{border-color:#9bbcf4;background:#f6f9ff;text-decoration:none}.review-teacher-avatar{display:grid;place-items:center;flex:none;width:36px;height:36px;border-radius:9px;background:#e8f0ff;color:#315b9d;font-size:12px;font-weight:700}.review-teacher-info{display:flex;flex:1;min-width:0;flex-direction:column}.review-teacher-info strong{overflow-wrap:anywhere}.review-teacher-info small{color:#64748b;font-size:12px}.review-teacher-arrow{color:#94a3b8;font-size:22px}
.review-periods{display:grid;grid-template-columns:repeat(auto-fill,minmax(205px,1fr));gap:10px}.review-period{display:flex;gap:10px;align-items:flex-start;padding:12px;border:1px solid #e5ebf3;border-radius:8px;background:#fbfcfe}.review-period-number{display:grid;place-items:center;flex:none;width:32px;height:32px;border-radius:8px;background:#eaf1fc;color:#365b91;font-size:12px;font-weight:700}.review-period div{min-width:0}.review-period strong,.review-period div span{display:block;overflow-wrap:anywhere}.review-period div span{color:#64748b;font-size:12px;margin-top:3px}
.review-log-note{color:#64748b;font-size:12px;margin:4px 0 16px}
.period-editor summary,.period-add summary{color:#1d4ed8;cursor:pointer;font-size:12px;font-weight:600;margin-top:8px}.period-editor form{min-width:170px}.period-editor label,.period-add label{color:#475569;font-size:12px}.period-editor input,.period-add input{font-size:13px}.period-actions{display:flex;gap:8px;margin-top:12px}.period-add{margin-top:16px;padding:12px;border:1px dashed #cbd5e1;border-radius:8px}.period-add summary{margin:0}.period-add-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-bottom:12px}.review-section>.review-note{font-size:12px;color:#64748b}
@media(max-width:700px){.review-metadata,.review-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.review-decision{align-items:flex-start;flex-direction:column}.review-periods,.review-teacher-list{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}}
@media(max-width:600px){.review-issues table{min-width:0;display:block}.review-issues thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.review-issues tbody{display:block}.review-issues tr{display:grid;grid-template-columns:auto 1fr auto;align-items:start;gap:4px;padding:12px;border-bottom:1px solid #e8edf4}.review-issues tr:last-child{border-bottom:0}.review-issues td{padding:0 4px;border:0}.review-issues td:last-child{grid-column:1 / -1;padding:6px 4px 0}.review-issues tr:hover td{background:transparent}}
[data-schedule-progress] progress{width:100%;height:18px;accent-color:#2563eb}
.inline{display:inline}
.mono{font-family:Consolas,monospace;background:#f3f4f6;padding:2px 8px;border-radius:4px;font-size:15px}
.login{max-width:380px;margin:12vh auto}
@media(max-width:800px){.side{display:none}.grid,.grid3,.stats{grid-template-columns:1fr}}

.avatar{display:inline-block;border-radius:50%;object-fit:cover;color:#fff;text-align:center;font-weight:600;vertical-align:middle;margin-right:8px;overflow:hidden}
.top .who{display:inline-flex;align-items:center}
.calwrap{margin:12px 0;padding:18px;border-radius:16px;background:linear-gradient(rgba(255,255,255,.28),rgba(255,255,255,.28)),var(--bg) center/cover no-repeat;box-shadow:inset 0 0 0 1px rgba(255,255,255,.6)}
.calwrap .plan-legend{background:rgba(255,255,255,.75);backdrop-filter:blur(6px);border-radius:10px;padding:8px 12px;margin:0 0 12px}
.plancal{table-layout:fixed;border-collapse:separate;border-spacing:8px;width:100%}
.plancal th{background:rgba(255,255,255,.78);backdrop-filter:blur(6px);color:#475569;font-weight:600;padding:8px 4px;text-align:center;border-radius:10px;border:0}.plancal th.wk{color:#e11d48}
.plancal td{border:0;padding:0;height:78px}
.plancal td.day{background:rgba(255,255,255,.78);backdrop-filter:blur(6px);border-radius:12px;padding:8px 6px 6px;text-align:center;transition:transform .15s,box-shadow .15s,background .15s}
.plancal td.day:hover{transform:translateY(-2px);background:rgba(255,255,255,.92);box-shadow:0 6px 16px rgba(30,41,59,.18)}
.plancal td.day.wk{background:rgba(255,241,242,.8)}.plancal td.day.today{box-shadow:0 0 0 2px #fb7185}.plancal td.day.today .dnum{color:#e11d48}
.plancal td.out{background:transparent}
.plancal .dnum{font-size:15px;font-weight:700;color:#334155;margin-bottom:6px;text-align:left;padding-left:4px}
.plancal .chips{display:flex;gap:4px;justify-content:center}
.day-summary{display:flex;flex-direction:column;align-items:center;gap:3px;line-height:1.3}
.summary-item{font-size:12px;font-weight:600;color:#1e40af;overflow-wrap:anywhere}
.summary-item.off{color:#64748b;font-weight:400}
.custom-summary{color:#9a3412;white-space:pre-wrap}
.custom-day-button{font-size:11px;padding:3px 6px;margin-top:5px;border:1px solid #d6c3a9;background:#fff7ed;color:#9a3412;border-radius:6px;cursor:pointer}
.custom-day-text{font-size:12px;color:#9a3412;white-space:pre-wrap;overflow-wrap:anywhere}
.custom-day-text[hidden],.chips[hidden]{display:none}
.chip{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:24px;padding:0 4px;border-radius:12px;border:0;font-size:12px;font-weight:600;line-height:1}
.plancal button.chip{cursor:pointer;transition:filter .15s}.plancal button.chip:hover:not(:disabled){filter:brightness(.92)}.plancal button.chip:disabled{cursor:default}
.c0{background:#fde68a;color:#92400e}.c1{background:#bfdbfe;color:#1e40af}.c2{background:#ddd6fe;color:#5b21b6}
.chip.off{background:#eef2f7;color:#b6c0cc}
.plan-legend{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.plan-legend .chip{padding:0 12px}
.segpop{position:fixed;z-index:50;background:#fff;border:1px solid #cbd5e1;border-radius:10px;box-shadow:0 8px 24px rgba(15,23,42,.18);padding:8px;display:grid;grid-template-columns:repeat(4,1fr);gap:6px;width:200px}
.segpop[hidden]{display:none}.segpop button{padding:6px 0;border-radius:6px;border:1px solid #e2e8f0;background:#f8fafc;color:#1e293b;cursor:pointer;font-size:13px}.segpop button:hover{background:#dbeafe}.segpop button.cur{background:#2563eb;color:#fff}

.bgcards{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px}
.bgcard{border:1px solid #e2e8f0;border-radius:12px;padding:10px;background:#fff}.bgcard img{width:100%;aspect-ratio:3/2;object-fit:cover;border-radius:8px;margin-bottom:6px}
.calnav{display:flex;gap:8px;align-items:center}
.btn.disabled{opacity:.45;pointer-events:none}
