.ledger-head{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin:4px 0 18px}.ledger-head h2{font-size:24px;font-weight:750}.ledger-head p{font-size:14px;color:var(--muted);margin-top:7px}.ledger-head .field{min-width:150px}.ledger-legend{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px;font-size:13px;font-weight:650}.ledger-legend span,.ledger-legend b{padding:7px 10px;background:white;border:1px solid var(--line);border-radius:7px}.ledger-legend b{color:#19704f;background:#e9f7ee;border-color:#b9dfc6}.ledger-wrap{overflow:auto;max-height:68vh;background:white;border:1px solid var(--line);border-radius:12px}.ledger-table{font-size:14px;min-width:1500px}.ledger-table th,.ledger-table td{padding:8px;text-align:center;min-width:64px;height:58px}.ledger-table thead th{position:sticky;top:0;z-index:4;font-size:14px;background:#f5f7fa}.ledger-table th small{display:block;font-size:9px;color:#24805b}.ledger-table .sticky-name{position:sticky;left:0;z-index:3;min-width:150px;text-align:left;background:white}.ledger-table thead .sticky-name{z-index:6;background:#f5f7fa}.ledger-table .sticky-score{position:sticky;left:150px;z-index:3;min-width:112px;background:white}.ledger-table thead .sticky-score{z-index:6;background:#f5f7fa}.ledger-table .sticky-name strong{display:block;font-size:16px;font-weight:750}.ledger-table .sticky-name small{display:block;font-size:11px;color:var(--muted);margin-top:3px}.ledger-table .today{background:#f0f5fb}.ledger-empty{border:0;background:transparent;color:#9aa7b7;font-size:18px;padding:8px}.ledger-cell{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px;width:100%;min-height:42px;padding:5px;border:1px solid #efd2ce;background:#fff4f1;color:#943b34;font-size:11px;line-height:1.25}.ledger-cell span{white-space:nowrap}.ledger-cell.qualified{background:#eaf7ef;border-color:#abd6bb;color:#166443}.ledger-cell .offset{text-decoration:line-through;opacity:.7}.ledger-cell b{font-size:10px;grid-column:1/-1}.ledger-quick-controls{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.event-picker{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin:14px 0 18px}.event-picker button{font-size:14px;font-weight:700;text-align:left;padding:13px}.event-picker button b{float:right}.event-picker button.active{color:white;background:#245a98;border-color:#245a98}.secondary-tools{margin-top:18px}.student-point-hero .badge{font-size:20px;padding:12px 16px}.name-grid .name-card strong{font-size:15px}.name-grid .name-card small{font-size:12px}.exam-management{margin-top:24px}.exam-management .page-title{display:none}
@media(max-width:700px){.ledger-head{align-items:stretch;flex-direction:column}.ledger-head .actions{width:100%}.ledger-quick-controls,.event-picker{grid-template-columns:1fr 1fr}.ledger-wrap{max-height:62vh}.ledger-table .sticky-name{min-width:125px}.ledger-table .sticky-score{left:125px;min-width:105px}.ledger-table .sticky-name strong{font-size:15px}}
.ledger-cell .test-rate{color:#245a98;font-weight:750}.ledger-cell .pending{grid-column:1/-1;color:#8a5a08;background:#fff2c8;border-radius:4px;padding:2px}.checkin-review{margin:0 0 14px;background:#fff;border:1px solid var(--line);border-radius:12px}.checkin-review summary{cursor:pointer;padding:14px 16px;font-weight:750}.checkin-review summary b{display:inline-grid;place-items:center;min-width:24px;height:24px;margin-left:6px;border-radius:20px;background:#e9f0fb;color:#245a98}.checkin-review-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:10px;padding:0 14px 14px}.checkin-review-grid article{display:grid;gap:9px;padding:13px;border:1px solid var(--line);border-radius:10px;background:#fafbfc}.checkin-review-grid article strong,.checkin-review-grid article small{display:block}.checkin-review-grid article small{margin-top:3px;color:var(--muted)}.student-checkins{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:18px}.student-checkin-card{display:grid;gap:16px;padding:20px;border:1px solid var(--line);border-radius:14px;background:#fff}.student-checkin-card>div>span{font-size:12px;color:#42619a;font-weight:750}.student-checkin-card h3{margin:5px 0 7px}.student-checkin-card p{color:var(--muted);font-size:14px;line-height:1.6}.student-checkin-card.pending{border-color:#e9c56c;background:#fffdf5}.student-checkin-card.approved{border-color:#a9d9bd;background:#f5fbf7}.student-checkin-card.rejected{border-color:#e7b3ad;background:#fff8f7}.checkin-state{display:grid;gap:5px}.checkin-state small{color:var(--muted)}.photo-picker{display:grid;place-items:center;min-height:150px;margin:18px 0;border:2px dashed #aebbd0;border-radius:12px;color:#245a98;font-weight:750;cursor:pointer}.photo-picker input{margin-top:12px;max-width:100%}.camera-preview{display:block;width:100%;max-height:58vh;margin:14px 0;border-radius:12px;background:#111;object-fit:contain}.cell-checkins{display:grid;gap:8px;margin-top:14px}.cell-checkins a{padding:10px;border-radius:8px;background:#f2f6fb}.button.camera,.camera{background:#1d2939;color:#fff}@media(max-width:700px){.student-checkins{grid-template-columns:1fr}.checkin-review-grid{grid-template-columns:1fr}.ledger-cell{font-size:10px}}
.ledger-table .remark-head,.ledger-table .ledger-remark{min-width:300px;text-align:left}.ledger-remark{vertical-align:top}.ledger-inline-adjust{display:grid;grid-template-columns:68px 1fr auto;gap:6px;align-items:center}.ledger-inline-adjust input{min-width:0;padding:7px 8px;font-size:12px}.ledger-inline-adjust button{padding:7px 10px;font-size:12px;background:#245a98;color:#fff}.remark-history{display:grid;gap:3px;margin-bottom:6px}.remark-history small{display:block;color:#66758a;white-space:normal}.remark-history b{color:#245a98}.score-detail-open{margin-top:20px;border-top:1px solid var(--line);padding-top:18px}.score-detail-open>h3{margin-bottom:14px}@media(max-width:700px){.ledger-table .remark-head,.ledger-table .ledger-remark{min-width:250px}.ledger-inline-adjust{grid-template-columns:58px 1fr}.ledger-inline-adjust button{grid-column:1/-1}}
.ledger-table{min-width:1480px;width:100%;border-collapse:separate;border-spacing:0}.ledger-table th,.ledger-table td{min-width:108px;border-bottom:1px solid var(--line)}.ledger-table thead th{height:54px;white-space:nowrap;color:#344254}.ledger-table tbody td{height:64px}.ledger-table .sticky-name{min-width:150px}.ledger-table .sticky-score{min-width:112px}.ledger-field{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:2px;width:100%;min-height:44px;padding:5px;border:1px solid #e4eaf1;border-radius:7px;background:#f8fafc;color:#384a60;font-size:12px;line-height:1.3;cursor:pointer}.ledger-field span{display:block;white-space:normal}.ledger-field strong{font-size:15px}.ledger-field small{font-size:10px;color:#66758a}.ledger-field.qualified{background:#e9f7ee;border-color:#b9dfc6;color:#176043}.ledger-field.qualified small{color:#2b7751}.ledger-field .offset{text-decoration:line-through;opacity:.7}.ledger-missing{color:#9aa7b7}.ledger-table .ledger-empty{width:100%;font-size:20px}.ledger-table .ledger-remark{min-width:300px}@media(max-width:700px){.ledger-table{min-width:1450px}.ledger-table .sticky-name{min-width:125px}.ledger-table .sticky-score{min-width:105px}.ledger-field{font-size:11px}}
.ledger-scroll-hint{margin:0 0 8px;color:var(--muted);font-size:12px}
.ledger-wrap{display:block;width:100%;max-width:100%;min-width:0;max-height:min(68vh,640px);overflow-x:auto;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-x pan-y;scrollbar-width:thin;scrollbar-color:#9aaec4 #eef2f6;-webkit-overflow-scrolling:touch}
.ledger-wrap:focus-visible{outline:2px solid #245a98;outline-offset:2px}
.ledger-wrap::-webkit-scrollbar{width:10px;height:10px}.ledger-wrap::-webkit-scrollbar-thumb{background:#9aaec4;border-radius:10px}.ledger-wrap::-webkit-scrollbar-track{background:#eef2f6}
.ledger-table{width:max-content;min-width:100%;table-layout:fixed}.ledger-table th,.ledger-table td{width:126px;min-width:126px;max-width:170px;overflow-wrap:anywhere}
.ledger-table .sticky-id{position:sticky;left:0;z-index:3;width:92px;min-width:92px;max-width:92px;background:#fff;text-align:left;white-space:nowrap}
.ledger-table .sticky-name{left:92px;width:145px;min-width:145px;max-width:145px}.ledger-table .sticky-score{left:237px;width:112px;min-width:112px;max-width:112px}
.ledger-table thead .sticky-id{z-index:8;background:#edf2fa}.ledger-table thead .sticky-name,.ledger-table thead .sticky-score{z-index:8;background:#edf2fa}
.ledger-table .remark-head,.ledger-table .ledger-remark{width:300px;min-width:300px;max-width:300px}
.ledger-table thead tr.ledger-groups th{top:0;height:42px;background:#dfe8f8;color:#172f50;font-weight:750;border-bottom:1px solid #a5b9d5}
.ledger-table thead tr.ledger-notes th{top:42px;height:48px;background:#eaf0fa;font-size:11px;white-space:normal;line-height:1.35;color:#405675}
.ledger-table thead tr.ledger-subheads th{top:90px;height:42px;background:#f2f5fb;font-size:12px}
.ledger-table thead tr.ledger-groups .sticky-id,.ledger-table thead tr.ledger-groups .sticky-name,.ledger-table thead tr.ledger-groups .sticky-score{background:#dfe8f8}
@media(max-width:700px){.ledger-wrap{max-height:60vh}.ledger-table .sticky-id{width:78px;min-width:78px;max-width:78px}.ledger-table .sticky-name{left:78px;width:110px;min-width:110px;max-width:110px}.ledger-table .sticky-score{position:static}.ledger-table thead .sticky-score{position:sticky;left:auto}}
.reference-main.ledger-main{max-width:none;width:100%;padding-left:clamp(12px,2vw,32px);padding-right:clamp(12px,2vw,32px)}
.ledger-scroll-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 8px}
.ledger-scroll-toolbar .ledger-scroll-hint{margin:0}
.ledger-scroll-controls{display:flex;gap:8px;flex:none}
.ledger-scroll-controls[hidden]{display:none}
.ledger-scroll-controls button{min-width:84px;padding:7px 12px;background:#fff;border:1px solid #b8c9df;color:#214a7e;font-size:12px;font-weight:700}
.ledger-scroll-controls button:disabled{opacity:.38;cursor:default}
.ledger-table .group-start{border-left:2px solid #9bb2d1}
.ledger-table thead .group-start{border-left-color:#8fa9cd}
.ledger-table tbody tr:nth-child(even) .group-start{border-left-color:#a9bad1}
@media(max-width:700px){.ledger-scroll-toolbar{align-items:flex-start;flex-direction:column}.ledger-scroll-controls{align-self:flex-end}.ledger-scroll-controls button{min-width:72px}}
/* Keep the full daily sheet inside the available desktop width. */
.ledger-wrap{overflow-x:hidden;overflow-y:auto}
.ledger-table{width:100%;min-width:0;table-layout:fixed}
.ledger-table col.ledger-col-id{width:6.5%}
.ledger-table col.ledger-col-name{width:8%}
.ledger-table col.ledger-col-score{width:8.5%}
.ledger-table col.ledger-col-standard{width:6.5%}
.ledger-table col.ledger-col-discipline{width:6.5%}
.ledger-table col.ledger-col-study{width:7%}
.ledger-table col.ledger-col-offset{width:9%}
.ledger-table col.ledger-col-remark{width:15.5%}
.ledger-table th,.ledger-table td{width:auto;min-width:0;max-width:none;padding:6px 4px;font-size:12px;line-height:1.25;white-space:normal;overflow-wrap:anywhere}
.ledger-table thead th{white-space:normal}
.ledger-table .sticky-id,.ledger-table .sticky-name,.ledger-table .sticky-score{position:static;left:auto;width:auto;min-width:0;max-width:none}
.ledger-table thead .sticky-id,.ledger-table thead .sticky-name,.ledger-table thead .sticky-score{position:sticky;top:0;left:auto;z-index:8}
.ledger-table .sticky-name strong{font-size:14px;line-height:1.25}
.ledger-table .sticky-score .badge{font-size:11px;padding:5px 6px;white-space:normal}
.ledger-table .remark-head,.ledger-table .ledger-remark{width:auto;min-width:0;max-width:none}
.ledger-table thead tr.ledger-notes th{height:62px;font-size:10px;line-height:1.3}
.ledger-table thead tr.ledger-subheads th{top:104px}
.ledger-table .ledger-field{min-height:38px;padding:3px 2px;font-size:11px}
.ledger-table .ledger-field strong{font-size:12px}
.ledger-table .ledger-field small{font-size:9px}
.ledger-table .ledger-inline-adjust{grid-template-columns:46px minmax(0,1fr);gap:4px}
.ledger-table .ledger-inline-adjust button{grid-column:1/-1;padding:4px}
.ledger-table .ledger-inline-adjust input{padding:5px 3px;font-size:11px}
.ledger-cards{display:none}
@media(max-width:900px){
 .ledger-wrap{display:none}
 .ledger-cards{display:grid;gap:12px}
 .ledger-card{min-width:0;border:1px solid var(--line);border-radius:12px;background:#fff;padding:14px}
 .ledger-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-bottom:10px;border-bottom:1px solid var(--line)}
 .ledger-card-head>div:first-child{display:grid;gap:2px}
 .ledger-card-head small{color:var(--muted);font-size:12px}
 .ledger-card-head strong{font-size:17px}
 .ledger-card-group{padding:11px 0;border-bottom:1px solid var(--line)}
 .ledger-card-group:last-child{border-bottom:0;padding-bottom:0}
 .ledger-card-group h3{font-size:13px;margin:0 0 9px;color:#214a7e}
 .ledger-card-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
 .ledger-card-field{min-width:0;display:grid;gap:5px;align-content:start;padding:8px;border:1px solid #e4eaf1;border-radius:8px}
 .ledger-card-field>span{font-size:11px;color:var(--muted)}
 .ledger-card-field .ledger-field{min-height:36px}
 .ledger-card .ledger-inline-adjust{grid-template-columns:64px minmax(0,1fr) auto}
 .ledger-card .ledger-inline-adjust button{grid-column:auto}
}
@media(max-width:540px){
 .ledger-card-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
 .ledger-card .ledger-inline-adjust{grid-template-columns:56px minmax(0,1fr)}
 .ledger-card .ledger-inline-adjust button{grid-column:1/-1}
}
/* The desktop sheet is for comparing the whole class: detail and editing open on demand. */
.ledger-table tbody td{height:31px;padding:2px 4px;line-height:1.15;vertical-align:middle}
.ledger-table tbody .sticky-name strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ledger-table tbody .sticky-score .badge{font-size:10px;padding:2px 5px;white-space:nowrap}
.ledger-table .ledger-field.compact{display:block;min-height:24px;height:24px;padding:2px 3px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:19px;font-size:11px}
.ledger-table .ledger-field.compact strong{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:11px;line-height:19px;font-weight:650}
.ledger-table tbody .ledger-empty{min-height:24px;height:24px;padding:0 2px;line-height:22px;font-size:17px}
.ledger-table tbody .ledger-missing{font-size:10px;white-space:nowrap}
.ledger-table .ledger-remark{vertical-align:middle;text-align:center}
.ledger-remark-open,.ledger-remark-read{display:block;width:100%;min-height:24px;max-height:24px;padding:2px 5px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:11px;line-height:19px;text-align:left}
.ledger-remark-open{border:1px solid #d8e3f0;background:#f5f8fc;color:#245a98}
.ledger-remark-read{color:#66758a}
.ledger-table thead tr.ledger-groups th{height:33px}
.ledger-table thead tr.ledger-notes th{top:33px;height:40px;font-size:10px}
.ledger-table thead tr.ledger-subheads th{top:73px;height:30px}
.ledger-table tbody tr:hover td{background:#f6f9fc}
.ledger-table tbody tr:hover .ledger-field.compact{border-color:#b7cde6}
.ledger-fullscreen-bar{display:none}
.ledger-wrap.fullscreen{position:fixed;inset:10px;z-index:50;width:auto;max-width:none;max-height:none;height:auto;overflow:auto;border:1px solid #9db5d3;box-shadow:0 18px 70px #20365755}
.ledger-wrap.fullscreen .ledger-fullscreen-bar{display:flex;position:sticky;top:0;z-index:12;align-items:center;justify-content:space-between;gap:12px;height:42px;padding:4px 12px;background:#173d6b;color:white;font-size:14px}
.ledger-wrap.fullscreen .ledger-fullscreen-bar button{min-height:30px;padding:3px 10px;background:#fff;color:#173d6b}
.ledger-wrap.fullscreen .ledger-table thead tr.ledger-groups th{top:42px}
.ledger-wrap.fullscreen .ledger-table thead tr.ledger-notes th{top:75px}
.ledger-wrap.fullscreen .ledger-table thead tr.ledger-subheads th{top:115px}
@media(max-width:900px){.ledger-wrap.fullscreen{display:block}.ledger-wrap.fullscreen .ledger-table{min-width:1100px}.ledger-wrap.fullscreen .ledger-fullscreen-bar{min-width:1100px}}
