:root{--ink:#18343b;--muted:#718487;--line:#d9e5e3;--mint:#e6f4ef;--teal:#16756f;--coral:#c85242;--paper:#fff;--bg:#f3f7f6}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",sans-serif}.app{max-width:1120px;margin:auto;padding:28px 20px 60px}.topbar,.toolbar,.panel-head,.student-row,.stats,.toolbar-actions{display:flex;align-items:center;justify-content:space-between;gap:16px}.topbar{align-items:flex-start;margin-bottom:24px}.eyebrow{margin:0 0 5px;color:var(--teal);font-size:10px;font-weight:800;letter-spacing:1px}.topbar h1,h2{margin:0}.topbar h1{font-size:28px}.subtitle,.hint{margin:5px 0 0;color:var(--muted)}.top-actions{display:flex;gap:10px}.top-actions label{display:grid;gap:5px;color:var(--muted);font-size:12px}.top-actions input{height:38px;padding:0 10px;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--ink)}.toolbar{align-items:flex-end;margin-bottom:16px;flex-wrap:wrap}.group-tabs{display:flex;gap:6px;flex-wrap:wrap}.group-tab,button{font:inherit;cursor:pointer}.group-tab{padding:8px 12px;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--muted)}.group-tab.active{background:var(--teal);border-color:var(--teal);color:#fff}.toolbar-actions{flex-wrap:wrap;justify-content:flex-end}button{border-radius:7px;padding:9px 13px;border:1px solid var(--line);background:#fff;color:var(--ink);font-weight:700}.primary{background:var(--teal);border-color:var(--teal);color:#fff}.secondary:hover,.ghost:hover{background:var(--mint)}.ghost{border-color:transparent;background:transparent;color:var(--muted)}.panel{background:var(--paper);border:1px solid var(--line);border-radius:10px;padding:22px;box-shadow:0 8px 25px #18343b0b}.panel-head{align-items:flex-start;margin-bottom:18px}.student-list{display:grid;gap:8px}.student-row{padding:12px 14px;border:1px solid var(--line);border-radius:8px}.student-name{font-weight:750}.status-buttons{display:flex;gap:6px}.status{width:38px;height:34px;padding:0;font-size:18px}.status.done{color:#19836c;background:#edf9f4;border-color:#bfe7d9}.status.missed{color:var(--coral);background:#fff2ef;border-color:#f1c7c0}.status.leave{color:#788789;background:#f4f6f6;border-color:#d8e0df}.stats{justify-content:flex-start;flex-wrap:wrap;margin-top:20px;padding-top:16px;border-top:1px solid var(--line);color:var(--muted)}.stats strong{margin-right:4px;color:var(--ink);font-size:20px}.stat.done strong{color:#19836c}.stat.missed strong{color:var(--coral)}.empty{padding:35px;text-align:center;color:var(--muted)}.hidden{display:none!important}.manager{margin-top:16px}.roster-group{border-top:1px solid var(--line);padding:14px 0}.roster-group-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.roster-name,.roster-students input{height:34px;padding:0 8px;border:1px solid var(--line);border-radius:6px}.roster-students{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:7px}.roster-student{display:flex;gap:5px}.roster-student input{width:100%}.remove{padding:4px 8px;color:var(--coral)}.add-student{margin-top:8px;padding:5px 9px;font-size:12px}.toast{min-height:24px;margin:12px 2px;color:var(--teal);font-weight:700}@media(max-width:700px){.app{padding:18px 12px}.topbar{display:block}.top-actions{margin-top:14px}.top-actions label{flex:1}.toolbar-actions{justify-content:flex-start}.panel{padding:16px}.student-row{align-items:flex-start}.student-name{padding-top:6px}.status-buttons{flex-shrink:0}}
:root{--x:0}.student-list{overflow-x:auto}.subject-head,.student-row{display:grid;grid-template-columns:minmax(150px,1fr) repeat(var(--subject-count,3),minmax(92px,1fr));min-width:620px}.subject-head{padding:0 14px 9px;color:var(--muted);font-size:13px;font-weight:800;text-align:center}.subject-head span:first-child{text-align:left}.student-row{transition:border-color .15s,background .15s}.student-row:hover{border-color:#a9cbc5;background:#fbfefd}.status-buttons{justify-content:center}.status:not(.done){display:block;color:transparent;background:#f7faf9;border:1.5px solid #cbdcda}.status:not(.done):hover{border-color:var(--teal);background:var(--mint)}.status.done{display:block;color:#fff;background:var(--teal);border-color:var(--teal);box-shadow:0 3px 8px #16756f33}.status{border-radius:50%;width:34px;height:34px}.status-buttons .status:nth-child(n+2){display:none}
 .column-delete{border:0;background:transparent;color:var(--coral);padding:0 2px;font-size:14px;line-height:1}.column-delete:hover{background:#fff0ed;border-radius:4px}
 .panel{border-color:#cfe1de;box-shadow:0 14px 35px rgba(24,52,59,.08)}.subject-head{background:#edf7f4;border-radius:7px;padding:11px 14px;color:#176f69;position:sticky;top:0;z-index:2}.student-row{min-height:52px;background:#fff}.student-row:nth-child(odd){background:#fbfdfc}.status{width:38px;height:38px}.student-name{font-size:15px}.toolbar-actions{gap:8px}.primary{box-shadow:0 5px 14px rgba(22,117,111,.24)}
@media (max-width:700px){
  body{font-size:14px}.app{padding:14px 10px 40px;max-width:none}.topbar{margin-bottom:12px}.topbar h1{font-size:22px}.subtitle{font-size:12px;margin-top:2px}.eyebrow{font-size:9px}.top-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.top-actions input{height:36px;width:100%;font-size:13px}.toolbar{display:block;margin-bottom:10px}.group-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(2,38px);width:100%;gap:6px;padding:2px 0 8px;overflow:visible}.group-tab{width:100%;min-width:0;height:38px;padding:0 4px;font-size:13px}.toolbar-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}.toolbar-actions button{min-height:40px;padding:8px 6px;font-size:12px}.toolbar-actions .primary{grid-column:1 / -1;order:-1;min-height:46px;font-size:15px}.panel{padding:14px 10px;border-radius:9px}.panel-head{margin-bottom:12px;align-items:flex-end}.panel-head h2{font-size:20px}.hint{font-size:11px;text-align:right}.student-list{margin:0 -2px;padding-bottom:3px;overflow-x:auto;-webkit-overflow-scrolling:touch}.subject-head,.student-row{grid-template-columns:112px repeat(var(--subject-count,3),92px);min-width:388px}.subject-head{padding:9px 8px;font-size:12px;position:sticky;left:0}.student-row{min-height:58px;padding:9px 8px}.student-name{position:sticky;left:0;z-index:1;background:inherit;font-size:14px}.status{width:42px;height:42px}.stats{gap:10px 14px;margin-top:14px;padding-top:12px;font-size:12px}.stats strong{font-size:18px}.manager{margin-top:10px}.roster-students{grid-template-columns:1fr}.toast{font-size:12px}
}
#deleteSubject{display:none}
.subject-head span{display:flex;align-items:center;justify-content:center;gap:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.subject-head span:first-child{justify-content:flex-start}
.preview-modal{position:fixed;inset:0;z-index:20;display:grid;place-items:center;padding:18px;background:rgba(24,52,59,.65)}.preview-card{width:min(720px,100%);max-height:92vh;overflow:auto;padding:16px;border-radius:12px;background:#fff;box-shadow:0 18px 50px rgba(0,0,0,.25)}.preview-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.preview-card img{display:block;width:100%;height:auto;border:1px solid var(--line);border-radius:7px}.preview-download{display:flex;align-items:center;justify-content:center;margin-top:12px;min-height:46px;text-decoration:none;border-radius:7px;font-weight:800}.preview-tip{margin:10px 0 0;color:var(--muted);font-size:12px;text-align:center}
@media (max-width:700px){.topbar h1{font-weight:850}.toolbar-actions .secondary,.toolbar-actions .ghost{font-size:13px}.panel-head{padding:2px 4px}.subject-head{box-shadow:0 2px 5px rgba(24,52,59,.08)}.student-row{border-radius:10px;margin-bottom:2px}.student-list{border-radius:10px}.stats{background:#f7fbfa;border-radius:8px;padding:12px 8px}}
@media (max-width:700px){
  .student-list{display:block;overflow-x:auto;overflow-y:hidden;padding:0 0 8px;scrollbar-width:thin}
  .subject-head,.student-row{width:max-content;min-width:100%;grid-template-columns:112px repeat(var(--subject-count,3),82px);column-gap:0}
  .subject-head{min-height:42px;position:sticky;left:0;top:0}
  .student-row{min-height:54px;margin-bottom:6px;padding:6px 8px}
  .student-name{position:sticky;left:0;z-index:3;display:flex;align-items:center;min-height:42px;background:inherit;box-shadow:6px 0 8px -8px rgba(24,52,59,.35)}
  .status-buttons{display:grid;place-items:center;min-width:82px;height:42px}
  .status{width:32px;height:32px;font-size:16px}
}
