/* Attendance: continuous lesson history and a shared, non-expiring lesson balance. */
.lesson-summary{border-top:1px solid var(--line);padding-top:14px;margin-top:5px}.lesson-summary-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.lesson-balance{display:inline-block;padding:6px 9px;border-radius:8px;background:#edf1ed;font-size:.8rem;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}.lesson-balance.debt,.lesson-account-balance.debt{background:#fbe7e1;color:#a23c28}.lesson-balance.low{background:#fff2d7;color:#795c18}.lesson-history-link{font-size:.75rem;min-height:36px}.lesson-direction{display:flex;justify-content:space-between;gap:8px;font-size:.7rem;color:var(--muted);margin:13px 0 5px}.lesson-timeline{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:3px}.lesson-timeline-full{grid-template-columns:repeat(auto-fill,minmax(62px,1fr));max-height:330px;overflow-y:auto;padding:3px}.lesson-day{display:flex;align-items:center;flex-direction:column;gap:5px;justify-content:center;min-height:80px;padding:5px 1px;background:transparent;border-radius:9px;color:var(--green)}.lesson-day:hover{background:#f2f5f1}.lesson-day time{font-size:.69rem;color:var(--muted);font-variant-numeric:tabular-nums}.lesson-kind{font-size:.63rem;color:var(--muted)}.lesson-mark{display:inline-grid;place-items:center;flex:none;width:34px;height:34px;border-radius:10px;font-size:1.25rem;font-weight:700}.lesson-mark.present{background:#e1f1e6;color:#17633b}.lesson-mark.absent{background:#fbe7e1;color:#a23c28}.lesson-mark.excused{background:#e5edf9;color:#375c95}.lesson-mark.unmarked{background:#edf0ed;color:#5b6d64}.lesson-legend{display:flex;align-items:center;flex-wrap:wrap;gap:9px 15px;margin:15px 0;font-size:.72rem;color:var(--muted)}.lesson-legend>span{display:flex;align-items:center;gap:5px}.lesson-legend .lesson-mark{width:24px;height:24px;border-radius:7px;font-size:.9rem}.lesson-empty-history,.lesson-no-credit{margin-top:10px;font-size:.75rem}.lesson-rules{margin-top:22px}.lesson-filters{display:grid;grid-template-columns:1fr 1.5fr auto;align-items:end;gap:12px;margin-bottom:22px}.lesson-events{display:grid;gap:12px}.lesson-event-card{text-align:left;display:flex;align-items:center;justify-content:space-between;gap:16px;color:var(--green);width:100%}.lesson-event-card>div:first-child{display:grid;gap:6px}.lesson-event-card>div:first-child>span{font-size:.9rem}.lesson-event-progress{display:grid;gap:5px;text-align:right;flex-shrink:0}.lesson-event-progress b{font-size:1.2rem}.lesson-event-progress span{font-size:.75rem;color:var(--muted)}.lesson-attendance-rows{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.lesson-attendance-row{display:grid;gap:12px;min-width:0}.lesson-row-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.lesson-row-heading>strong{min-width:0;overflow-wrap:anywhere}.lesson-row-impact{background:#f2f5ee;padding:10px;border-radius:9px;font-size:.8rem}.lesson-dialog{width:min(660px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:24px;border:1px solid var(--line);border-radius:20px;color:#152f26;background:white;overflow:auto;overscroll-behavior:contain;box-shadow:0 18px 65px #102e2533}.lesson-dialog::backdrop{background:#102e2577}.lesson-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:18px}.lesson-dialog-heading h2{overflow-wrap:anywhere}.lesson-dialog .sheet-close{flex-shrink:0;background:#edf1ed;color:var(--green);min-width:44px;min-height:44px;border-radius:10px;font-size:1.6rem}.lesson-account-balance{display:inline-block;font-size:1.4rem;font-weight:700;border-radius:10px;margin-bottom:10px;font-variant-numeric:tabular-nums;padding:6px 10px;background:#edf3ea}.lesson-credit-actions{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0}.lesson-credit-form{margin:18px 0;padding:16px;background:#f4f7f0;border:1px solid var(--line);border-radius:14px}.lesson-credit-form .two{grid-template-columns:1.3fr 1fr}.lesson-history-details{margin:18px 0 0;border-top:1px solid var(--line);padding-top:14px}.lesson-history-details summary{font-size:.85rem;font-weight:700;cursor:pointer;min-height:34px}.lesson-log{display:grid;gap:12px;font-size:.85rem;margin-top:10px}.lesson-log>div{padding:10px 0;border-bottom:1px solid var(--line)}.lesson-log strong,.lesson-log small{display:block;margin-bottom:4px}.lesson-log p{overflow-wrap:anywhere}.lesson-current-status{display:flex;align-items:center;gap:9px;margin:16px 0}.lesson-read-reason{padding:14px;background:#f3f6f1;border-radius:10px;margin-top:14px}.lesson-mark-preview,.lesson-credit-preview{background:#edf2e9;border-radius:10px;padding:12px}.lesson-cancelled{opacity:.65}.lesson-dialog .error:empty{display:none}.lesson-dialog input:read-only{background:#f1f3ef}.lesson-dialog button:focus-visible,.lesson-day:focus-visible{outline:3px solid #2984d1;outline-offset:2px}
@media(max-width:650px){.lesson-filters{grid-template-columns:1fr 1fr;gap:10px}.lesson-filters .btn{grid-column:1/-1}.lesson-attendance-rows{grid-template-columns:1fr}.lesson-dialog{padding:18px 14px;border-radius:17px;max-height:calc(100dvh - 20px);width:calc(100vw - 18px)}.lesson-event-card{padding:17px 14px}.lesson-event-progress{max-width:105px}.lesson-event-progress span{white-space:normal}.lesson-summary-head{gap:2px}.lesson-credit-actions .btn{width:100%}.lesson-credit-form{padding:13px}.lesson-dialog .two{grid-template-columns:1fr}.lesson-direction{font-size:.66rem}.lesson-history-link{font-size:.72rem}.lesson-legend{gap:8px 10px;font-size:.7rem}}
@media(max-width:380px){.lesson-mark{width:30px;height:30px}.lesson-timeline{gap:1px}.lesson-day time{font-size:.65rem}.lesson-row-heading{align-items:start;flex-wrap:wrap}.lesson-event-card{gap:9px}.lesson-event-progress{max-width:90px}}
