:root{font-family:'Microsoft YaHei','PingFang SC',system-ui,sans-serif;color:#243b36;background:#f6f5ef;font-size:16px}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}.top{background:#fff;border-bottom:1px solid #e8ece6}.top-inner{max-width:1200px;margin:auto;padding:17px 24px;display:flex;justify-content:space-between;gap:16px;align-items:center}.brand{display:flex;align-items:center;gap:11px;text-decoration:none;color:#203b33}.brand-mark{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:#276a55;color:#fff;font-size:21px;font-weight:700}.brand strong{display:block;font-size:19px;letter-spacing:2px}.brand small{display:block;font-size:11px;color:#84928b;margin-top:2px}.top-actions{display:flex;gap:14px;align-items:center;font-size:13px;color:#6f7f77}.container{max-width:1200px;margin:auto;padding:42px 24px 70px;min-height:75vh}footer{text-align:center;color:#9aa89f;font-size:12px;padding:20px}.eyebrow{color:#699483;font-size:12px;font-weight:700;letter-spacing:2px;margin:0 0 11px}.heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:25px}h1{font-size:30px;margin:0 0 8px;letter-spacing:.5px}h2{font-size:19px;margin:0}p{line-height:1.7}.sub,.muted{color:#87948d;font-size:14px;margin:0}.panel{background:#fff;border:1px solid #e6ebe5;border-radius:16px;box-shadow:0 8px 25px #243b3608;padding:24px}.login{max-width:430px;margin:8vh auto}.login h1{font-size:27px}.login form{margin-top:28px}.field{display:block;margin:0 0 16px}.field span{display:block;color:#53665c;font-size:13px;font-weight:600;margin-bottom:8px}input,select,textarea{border:1px solid #dce5de;border-radius:9px;background:#fff;color:#263e36;padding:11px 12px;max-width:100%}input:focus,select:focus,textarea:focus{outline:2px solid #91bda9;outline-offset:1px}.field input,.field select,.field textarea{width:100%}textarea{resize:vertical;min-height:120px}.btn{border:1px solid #276a55;background:#276a55;color:white;padding:10px 17px;border-radius:9px;font-weight:600;white-space:nowrap}.btn:hover{background:#1d5745}.btn.secondary{background:#fff;color:#276a55;border-color:#cbded3}.btn.secondary:hover{background:#f1f7f2}.btn.full{width:100%}.link-button{background:none;border:0;color:#39725d;padding:4px}.link-button:hover{text-decoration:underline}.save-status.error,.error{color:#b34c3b}.error{font-size:13px;line-height:1.5}.class-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px}.class-card{display:block;text-align:left;width:100%;border:1px solid #e3ebe4;border-radius:14px;background:#fff;padding:23px;color:inherit;box-shadow:0 8px 25px #243b3608}.class-card:hover{border-color:#8bb7a2;transform:translateY(-1px)}.class-card .icon{width:40px;height:40px;display:grid;place-items:center;background:#edf5ed;color:#438269;border-radius:10px;margin-bottom:20px}.class-card strong{display:block;font-size:18px}.class-card small{display:block;color:#929e97;margin-top:9px}.empty{text-align:center;padding:55px 20px;color:#87948d}.inline-form{display:flex;gap:10px;flex-wrap:wrap}.inline-form input{flex:1;min-width:160px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:17px}.section-head p{margin:5px 0 0}.split{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(260px,.85fr);gap:18px}.stack{display:grid;gap:18px}.row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 0;border-bottom:1px solid #f0f2ed}.row:last-child{border:0}.row strong{font-size:14px}.row small{display:block;color:#9aa59f;margin-top:4px}.row-actions{display:flex;gap:8px;align-items:center}.row-actions button{font-size:13px}.back{margin-bottom:23px;display:inline-block}.counter{font-size:13px;color:#83a091}.table-wrap{overflow:auto;border:1px solid #e8ede8;border-radius:12px}.records{border-collapse:separate;border-spacing:0;width:100%;min-width:660px;text-align:left;font-size:14px}.records th,.records td{padding:13px 12px;border-bottom:1px solid #edf1ec;vertical-align:middle}.records th{color:#74877b;font-size:12px;background:#f8faf7;white-space:nowrap}.records tr:last-child td{border:0}.records th:first-child,.records td:first-child{position:sticky;left:0;background:#fff;z-index:1;min-width:110px}.records th:first-child{background:#f8faf7;z-index:2}.records td:nth-child(2){min-width:245px}.attendance-buttons{display:flex;gap:5px}.chip{border:1px solid #e1e9e1;color:#7a8b80;background:#fff;padding:7px 9px;border-radius:8px;font-size:13px;white-space:nowrap}.chip.active{background:#e6f3e9;color:#286c4c;border-color:#8fc6a3;font-weight:700}.chip.active.leave{background:#fff4df;color:#9a6a23;border-color:#efd19b}.chip.active.absent{background:#fbecea;color:#ae5042;border-color:#e7b5ad}.hw{min-width:90px}.hw.active{background:#e6f3e9;color:#286c4c;border-color:#8fc6a3}.hw.na{background:#f1f1ef;color:#777;border-color:#d7d9d5}.tools{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.date-filter{width:150px}.note{font-size:12px;color:#93a097;line-height:1.6}.badge{background:#edf5ee;color:#628674;border-radius:999px;padding:5px 9px;font-size:12px}dialog{border:0;border-radius:16px;padding:0;width:min(440px,calc(100vw - 32px));box-shadow:0 20px 80px #1f392f45}dialog::backdrop{background:#172c2580}.dialog-inner{padding:26px}.dialog-inner h2{margin-bottom:8px}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.hidden{display:none!important}@media(max-width:700px){.top-inner{padding:13px 16px}.brand-mark{width:36px;height:36px}.brand strong{font-size:17px}.top-actions{gap:7px;flex-wrap:wrap;justify-content:flex-end}.container{padding:30px 15px 50px}h1{font-size:25px}.heading{align-items:flex-start}.panel{padding:18px}.split{grid-template-columns:1fr}.records th,.records td{padding:11px 9px}.records th:first-child,.records td:first-child{min-width:88px}.records td:nth-child(2){min-width:220px}.chip{padding:8px 7px}.row-actions{flex-wrap:wrap;justify-content:flex-end}.save-status{max-width:150px}}
:root .form-space{height:18px}.export-link{text-decoration:none}
@media(max-width:700px){.records th:first-child,.records td:first-child{width:84px;min-width:84px;max-width:84px;overflow-wrap:anywhere}.attendance-buttons{gap:3px}.attendance-buttons .chip{font-size:12px;padding:8px 5px}.records td:nth-child(2){min-width:212px}}
.lesson-tabs{display:flex;gap:6px;margin:0 0 18px;border-bottom:1px solid #dee7dd}.lesson-tab{border:0;border-bottom:3px solid transparent;background:transparent;color:#77877e;padding:12px 25px;font-weight:700}.lesson-tab.selected{color:#276a55;border-bottom-color:#276a55}.attendance-legend{display:flex;flex-wrap:wrap;align-items:center;gap:7px;color:#84948a;font-size:13px;background:#f8faf7;padding:12px 14px;border-radius:9px;line-height:1.5}.attendance-legend b{font-weight:400;color:#bdc9c0}.legend-present{color:#317558}.legend-leave{color:#a77327}.legend-absent{color:#b35547}.attendance-counts{display:flex;gap:20px;flex-wrap:wrap;margin:20px 0;color:#819088;font-size:13px}.attendance-counts strong{color:#365e4d;margin-left:3px}.student-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.student-card{display:flex;align-items:center;justify-content:space-between;gap:8px;text-align:left;min-height:84px;border:1px solid #e3eae3;border-radius:12px;background:#fbfcfa;padding:17px 19px;color:#334a3e}.student-card:hover{border-color:#a6c8b3}.student-card:focus-visible{outline:2px solid #619b7b;outline-offset:2px}.student-name{font-weight:700;font-size:16px;overflow-wrap:anywhere}.student-status{flex-shrink:0;font-size:12px;border-radius:20px;padding:5px 10px;color:#839187;background:#eef1ed}.student-card[data-status="到课"]{background:#edf7ef;border-color:#afd8b9}.student-card[data-status="到课"] .student-status{background:#d9efde;color:#287148}.student-card[data-status="请假"]{background:#fff8eb;border-color:#ecd6aa}.student-card[data-status="请假"] .student-status{background:#f9e8c7;color:#98691d}.student-card[data-status="缺课"]{background:#fdf1ef;border-color:#e9c0b8}.student-card[data-status="缺课"] .student-status{background:#f8dcd6;color:#a74739}.homework-records{min-width:420px}.homework-records td:nth-child(2){min-width:110px}@media(max-width:700px){.student-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.student-card{min-height:74px;padding:13px 11px}.student-name{font-size:15px}.student-status{font-size:11px;padding:5px 7px}.attendance-counts{gap:12px}.lesson-tab{padding:11px 20px}.homework-records td:nth-child(2){min-width:110px}}
.homework-count{display:block;margin-top:5px;font-weight:400;color:#98a59c}.homework-count strong{color:#638b73}.hw.incomplete{background:#fff2e9;color:#a86438;border-color:#e9c6ad}.class-actions{display:flex;gap:9px;flex-wrap:wrap}@media(max-width:700px){.class-actions{justify-content:flex-end}.class-actions .btn{padding:10px 11px}}

/* 统一的圆角按钮与页面布局 */
:root{--ink:#213d35;--green:#286c57;--green-dark:#1b5845;--line:#d5e4d9;--paper:#fff;--radius:12px;--button-shadow:0 3px 0 #cedcd1,0 6px 13px #294f3c12}
body{color:var(--ink);background:radial-gradient(ellipse at 9% 0%,#e6f2e8 0,transparent 34%),radial-gradient(ellipse at 98% 14%,#f2ead8 0,transparent 30%),#f6f7f1}
.top{background:#ffffffed;border-bottom:1px solid #dce8df;box-shadow:0 5px 20px #254c3510}
.top-inner{max-width:1200px;padding:16px 24px}.brand-mark{border-radius:12px;background:linear-gradient(145deg,#39896d,#22644e);box-shadow:0 3px 0 #174b3a,0 7px 14px #22644e24}.brand strong{letter-spacing:1px}.brand small{color:#758c7e}
.container{padding-top:40px}h1{color:#173e31;font-weight:750}h2{color:#234b3d}.sub{color:#6f8578}.panel{border-color:#e0eae1;box-shadow:0 4px 0 #e5ebe2,0 12px 32px #294d3910}.heading{align-items:center;min-height:64px}.heading>div:first-child{min-width:0}
button,.export-link{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;border:1px solid #bcd2c2;border-radius:var(--radius);background:linear-gradient(180deg,#fff,#f4f8f3);color:#315d4c;box-shadow:var(--button-shadow);font-weight:650;line-height:1.25;text-decoration:none;transition:transform .12s ease,box-shadow .12s ease,background .12s ease}
button:hover,.export-link:hover{background:linear-gradient(180deg,#fff,#eaf4ec);border-color:#87b39a;text-decoration:none;transform:translateY(-1px);box-shadow:0 4px 0 #c5d9c8,0 8px 16px #294f3c18}
button:active,.export-link:active{transform:translateY(2px);box-shadow:0 1px 0 #bdcfbf,0 2px 5px #294f3c16}
button:focus-visible,.export-link:focus-visible{outline:3px solid #7cb79b;outline-offset:2px}button[hidden]{display:none!important}
.btn{padding:10px 19px;border-color:#1e604b;border-radius:var(--radius);background:linear-gradient(180deg,#378767,#23664f);color:#fff;box-shadow:0 3px 0 #194d3d,0 7px 14px #22644e25}.btn:hover{background:linear-gradient(180deg,#409173,#28745a);border-color:#1e604b;box-shadow:0 4px 0 #194d3d,0 8px 16px #22644e28}.btn:active{box-shadow:0 1px 0 #194d3d,0 2px 6px #22644e20}
.btn.secondary,.link-button,.lesson-tab,.chip{border:1px solid #c4d9ca;border-radius:var(--radius);background:linear-gradient(180deg,#fff,#f3f8f3);color:#315f4b;box-shadow:var(--button-shadow)}
.link-button{padding:9px 14px;white-space:nowrap}.link-button:hover,.btn.secondary:hover,.lesson-tab:hover,.chip:hover{background:linear-gradient(180deg,#fff,#eaf4ec);border-color:#8fbba0}
.top-actions{gap:10px}.top-actions .link-button{min-height:40px;padding:8px 13px}.save-status{color:#54836a}.back{margin:0 0 24px}
.class-grid{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:18px}.class-card{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;text-align:left;min-height:176px;padding:22px;border:1px solid #cfe1d3;border-radius:var(--radius);background:linear-gradient(155deg,#fff 0%,#f5faf3 100%);box-shadow:0 4px 0 #d7e5d8,0 12px 24px #294f3c13}.class-card:hover{border-color:#8ab59a;box-shadow:0 5px 0 #c7ddcb,0 14px 26px #294f3c1b}.class-card .icon{margin-bottom:18px;background:#dceee0;border:1px solid #c2e0c9}.class-card strong{font-size:18px}.class-card small{font-size:13px;color:#748d7d}
.class-actions{display:grid;grid-template-columns:repeat(2,minmax(124px,1fr));gap:10px}.class-actions .btn{width:100%}.row{gap:16px;min-height:64px}.row-actions{display:grid;grid-template-columns:repeat(2,minmax(66px,1fr));gap:8px}.row-actions .link-button{width:100%;min-height:40px;padding:8px 12px}.section-head{min-height:44px;align-items:center}.section-head .btn{align-self:center}.date-filter{height:44px;border-radius:var(--radius)}
.lesson-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,150px));gap:10px;margin:0 0 20px;border:0}.lesson-tab{padding:10px 18px}.lesson-tab.selected{color:#fff;border-color:#23664f;background:linear-gradient(180deg,#378767,#23664f);box-shadow:0 3px 0 #194d3d,0 7px 14px #22644e25}
.student-grid{gap:14px}.student-card{display:flex;align-items:center;justify-content:space-between;min-height:86px;padding:17px 18px;border-radius:var(--radius);box-shadow:0 3px 0 #dce6db,0 7px 15px #294f3c0d}.student-card:hover{box-shadow:0 4px 0 #cbdecf,0 8px 16px #294f3c17}.student-card[data-status="到课"]{background:linear-gradient(180deg,#f0faf1,#e5f4e8);border-color:#afd8b9;box-shadow:0 3px 0 #c4dfc8,0 7px 15px #294f3c0d}.student-card[data-status="请假"]{background:linear-gradient(180deg,#fffaf0,#fff4df);border-color:#ecd6aa;box-shadow:0 3px 0 #eddfbf,0 7px 15px #8060210d}.student-card[data-status="缺课"]{background:linear-gradient(180deg,#fff6f4,#fbe9e6);border-color:#e9c0b8;box-shadow:0 3px 0 #eed0c9,0 7px 15px #8b38250d}.student-status{border-radius:8px}
.chip{min-height:42px;padding:8px 12px}.chip.hw{min-width:92px}.chip.active{background:linear-gradient(180deg,#f0faf1,#e4f3e7);color:#286c4c;border-color:#a2cdb0}.chip.incomplete{background:linear-gradient(180deg,#fff8f1,#fff0e5);color:#9a5f35;border-color:#e9c6ad}.chip.na{background:linear-gradient(180deg,#fafaf8,#f0f1ef);color:#737d76;border-color:#d7ded7}.records th,.records td{vertical-align:middle}.records th:not(:first-child),.records td:not(:first-child){text-align:center}.dialog-actions{display:grid;grid-template-columns:repeat(2,minmax(0,110px));justify-content:end;gap:10px}.dialog-actions button{width:100%}input,select,textarea{border-radius:var(--radius);border-color:#cbded0;background:#fff}input,select{min-height:44px}
@media(max-width:700px){.top-inner{padding:12px 15px;align-items:center}.top-actions{justify-content:flex-end;gap:7px}.top-actions .link-button{min-height:38px;padding:8px 11px}.container{padding:28px 15px 50px}.heading{display:grid;grid-template-columns:1fr;align-items:start;gap:17px}.heading>.btn,.heading>.export-link{justify-self:start}.class-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:10px}.class-actions .btn{padding:10px 9px}.panel{padding:18px}.section-head{gap:12px}.student-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.student-card{min-height:76px;padding:13px 11px}.lesson-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.row{gap:10px}.row-actions{grid-template-columns:repeat(2,minmax(58px,1fr));gap:6px}.row-actions .link-button{padding:8px 9px}.date-filter{width:142px}.records td:nth-child(2){min-width:110px}.chip{min-height:40px}}
.lesson-bottom{margin:22px 0 0;grid-template-columns:repeat(2,minmax(0,1fr));max-width:600px}.lesson-bottom .lesson-tab{width:100%}
.lesson-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px}.history-notice{margin:-8px 0 20px;padding:12px 15px;background:#fff5df;border:1px solid #e8d4a8;border-radius:12px;color:#805c22;font-size:14px}@media(max-width:700px){.lesson-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.lesson-actions>*{width:100%;padding-left:8px;padding-right:8px}.history-notice{margin:0 0 18px}}
.lesson-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:20px}.lesson-heading h1{margin-bottom:8px}.lesson-heading #back{flex-shrink:0}.lesson-actions{justify-content:flex-start;margin-bottom:22px}.lesson-actions>*{min-width:120px}.lesson-panel #add-assignment{min-height:38px;padding:7px 13px;font-size:14px}.history-notice{margin:0 0 20px}@media(max-width:700px){.lesson-heading{align-items:flex-start}.lesson-actions{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:20px}.lesson-actions>*{min-width:0}.lesson-panel #add-assignment{min-height:38px;padding:7px 10px;font-size:13px}}
.management-nav{display:flex;justify-content:space-between;gap:10px;margin-bottom:24px}@media(max-width:700px){.lesson-heading #back{max-width:54%;white-space:normal}.management-nav button{padding:9px 12px}}

/* 手机端优先：减少留白，保留清晰的点击区域。 */
@media(max-width:700px){
 .top-inner{padding:7px 12px;min-height:52px}.brand-mark{width:34px;height:34px;font-size:18px}.brand strong{font-size:16px}.brand small{font-size:10px}.top-actions{gap:5px;font-size:12px}.top-actions .link-button{min-height:36px;padding:6px 9px}
 .container{padding:15px 12px 28px;min-height:0}footer{padding:12px;font-size:11px}.heading{gap:10px;margin-bottom:16px}.heading h1,.lesson-heading h1{font-size:21px;margin-bottom:3px}.sub{font-size:12px;line-height:1.45}
 .btn,.link-button,.lesson-tab{min-height:40px;padding:8px 11px;font-size:14px}.panel{padding:13px;border-radius:12px}.section-head{min-height:36px;margin-bottom:9px;gap:8px}.section-head h2{font-size:16px}.section-head p{margin-top:3px}.empty{padding:25px 10px;font-size:13px}
 .class-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.class-card{min-height:94px;padding:14px;justify-content:center}.class-card strong{font-size:16px}.class-card small{font-size:12px;margin-top:6px}
 .lesson-heading{margin-bottom:10px;gap:8px}.lesson-heading #back{font-size:12px;min-height:38px;padding:7px 9px}.lesson-actions{gap:8px;margin-bottom:12px}.history-notice{padding:8px 10px;margin:0 0 10px;font-size:12px}
 .attendance-legend{gap:4px;padding:7px 8px;font-size:11px}.attendance-counts{justify-content:space-between;gap:5px;margin:10px 0;font-size:12px}.student-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.student-card{min-height:54px;padding:8px 7px;gap:4px}.student-name{font-size:13px}.student-status{font-size:10px;padding:4px 5px}
 .lesson-bottom{position:sticky;bottom:5px;z-index:5;gap:8px;margin:12px 0 0}.lesson-bottom .lesson-tab{min-height:42px}
 .homework-records{min-width:370px}.records th,.records td{padding:7px 6px}.records th:first-child,.records td:first-child{width:70px;min-width:70px;max-width:70px}.records td:nth-child(2),.homework-records td:nth-child(2){min-width:96px}.chip.hw{min-height:38px;min-width:76px;padding:6px 8px;font-size:12px}.homework-count{margin-top:2px}.note{font-size:11px;margin:7px 0 0}
 .management-nav{margin-bottom:12px}.management-nav button{min-height:38px;padding:7px 10px}.split{gap:12px}.row{min-height:48px;padding:7px 0}.row-actions .link-button{min-height:36px}.date-filter{height:40px;min-height:40px;width:138px}
 dialog{max-height:calc(100dvh - 24px);overflow:auto}.dialog-inner{padding:20px}.dialog-inner h2{font-size:18px}.form-space{height:10px!important}.field{margin-bottom:12px}.dialog-actions{margin-top:12px}
}
@media(max-width:340px){.student-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.pagination{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:14px;color:#637c6d;font-size:13px}.pagination>div{display:flex;gap:8px}.pagination button{min-height:40px;padding:7px 12px}@media(max-width:700px){.pagination{margin-top:10px;font-size:12px}.pagination>div{gap:6px}.pagination button{min-height:36px;padding:6px 9px;font-size:12px}}
[hidden]{display:none!important}.management-tabs{display:flex;gap:8px;margin:0 0 12px}.management-tabs button{flex:1}
.student-name{min-width:0}
