/* Riwayat koreksi: alur ringkas pilih halaqah -> pilih santri -> buka sesi. */
#historyView{max-width:1050px;margin-inline:auto}
#historyView .history-view-heading{align-items:flex-start;margin-bottom:18px}
#historyView .history-view-heading h2{margin-bottom:6px}
#historyView .history-view-heading p:last-child{margin:0;color:var(--muted)}
.history-report-menu{position:relative}
.history-report-menu>summary{padding:9px 13px;border:1px solid var(--line);border-radius:10px;background:var(--surface,#fff);color:var(--ink);font-size:12px;font-weight:750;cursor:pointer;list-style:none}
.history-report-menu>summary::-webkit-details-marker{display:none}
.history-report-menu>div{position:absolute;z-index:12;right:0;top:calc(100% + 6px);display:grid;gap:6px;min-width:140px;padding:8px;border:1px solid var(--line);border-radius:12px;background:var(--surface,#fff);box-shadow:var(--shadow)}
.history-report-menu button{width:100%;font-size:11px}
#historyView .history-class-toolbar{position:relative;grid-template-columns:minmax(260px,.9fr) minmax(280px,1.1fr);gap:13px;margin:12px 0 20px;padding:7px;border:0;border-radius:20px;background:linear-gradient(135deg,color-mix(in srgb,var(--pale) 74%,var(--surface)),color-mix(in srgb,var(--surface) 88%,var(--pale)));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--green) 11%,var(--line)),0 10px 28px color-mix(in srgb,var(--green) 7%,transparent);overflow:hidden}
#historyView .history-class-toolbar::after{content:"";position:absolute;right:-38px;top:-62px;width:145px;height:145px;border:25px solid color-mix(in srgb,var(--green) 5%,transparent);border-radius:50%;pointer-events:none}
#historyView .history-class-toolbar>label{position:relative;z-index:1;display:grid;grid-template-columns:1fr;gap:10px;min-width:0;padding:14px;border:1px solid color-mix(in srgb,var(--green) 13%,var(--line));border-radius:16px;background:color-mix(in srgb,var(--surface) 96%,var(--pale));box-shadow:0 5px 16px rgba(35,68,53,.05);transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}
#historyView .history-class-toolbar>label:focus-within{border-color:color-mix(in srgb,var(--green) 55%,var(--line));box-shadow:0 0 0 3px color-mix(in srgb,var(--green) 10%,transparent),0 9px 22px rgba(35,68,53,.08);transform:translateY(-1px)}
.history-field-heading{display:grid!important;grid-template-columns:38px minmax(0,1fr);grid-template-rows:auto auto;align-items:center;column-gap:10px;min-height:38px;color:var(--ink)!important}
.history-field-heading>i{grid-row:1/3;display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:linear-gradient(145deg,var(--pale),color-mix(in srgb,var(--pale) 70%,var(--green)));color:var(--green);font:700 21px/1 Georgia,serif;font-style:normal}
.history-field-heading>b{align-self:end;font-size:12px;line-height:1.15;letter-spacing:.04em;text-transform:uppercase}
.history-field-heading>small{align-self:start;color:var(--muted);font-size:10px;font-weight:500;line-height:1.2;text-transform:none;letter-spacing:0}
#historyView .history-class-toolbar select,#historyView .history-class-toolbar input{width:100%;height:48px;min-width:0;padding:0 13px;border:1px solid color-mix(in srgb,var(--green) 18%,var(--line));border-radius:12px;background:var(--surface,#fff);color:var(--ink);font-size:13px;outline:0;box-shadow:inset 0 1px 2px rgba(25,52,40,.035)}
#historyView .history-class-toolbar select:focus,#historyView .history-class-toolbar input:focus{border-color:var(--green);box-shadow:0 0 0 3px color-mix(in srgb,var(--green) 9%,transparent)}
#historyView .history-student-search .history-field-heading>i{background:linear-gradient(145deg,color-mix(in srgb,var(--pale) 72%,#e7d7af),var(--pale))}
#historyView .progress-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0 0}
.history-student-card{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:11px;min-height:78px;padding:13px 14px;border:1px solid var(--line);border-radius:14px;background:var(--surface,#fff);color:var(--ink);text-align:left}
.history-student-card:hover{border-color:var(--green);box-shadow:0 8px 20px color-mix(in srgb,var(--green) 10%,transparent);transform:translateY(-1px)}
.history-student-card>span:nth-child(2){display:grid;gap:4px;min-width:0}
.history-student-card strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.history-student-card small{color:var(--muted);font-size:11px}
.history-student-card>b{color:var(--green);font-size:22px}
.history-student-avatar{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:linear-gradient(145deg,var(--pale),color-mix(in srgb,var(--pale) 70%,var(--green)));color:var(--green);font:700 18px Georgia,serif}
.history-selected-student{display:flex;align-items:center;gap:13px;margin:4px 0 15px;padding:12px 14px;border:1px solid color-mix(in srgb,var(--green) 26%,var(--line));border-radius:14px;background:var(--pale)}
.history-selected-student>div{display:grid;gap:2px;min-width:0;flex:1}
.history-selected-student small{color:var(--green);font-size:9px;font-weight:900;letter-spacing:.13em}
.history-selected-student strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:17px}
#historyView.student-history-open .history-class-toolbar,#historyView.student-history-open #progressSummary,#historyView.student-history-open #progressSummaryNote{display:none}
#historyView .history-list{margin-top:0}
#historyView .history-item{grid-template-columns:12px minmax(0,1fr) auto;min-height:68px;padding:13px 15px;border-radius:13px}
.history-pick-hint{padding:20px;border:1px dashed var(--line);border-radius:14px;background:var(--surface,#fff);color:var(--muted);text-align:center}
.history-compare-help{display:grid;gap:4px;margin:14px 0 9px;padding:11px 13px;border:1px solid #b9d5e5;border-radius:12px;background:#eef8fd;color:#244d63}
.history-compare-help strong{font-size:13px}.history-compare-help span{font-size:11px;line-height:1.45}
.history-legend label{border-color:#d3e2e9;background:#f8fcfe}.history-legend input[type="checkbox"]{width:18px;height:18px;accent-color:#347fa5}.history-legend label:has(input:checked){border-color:#79abc4;background:#eef8fd;box-shadow:0 0 0 2px rgba(52,127,165,.08)}
.history-more-menu>small{display:block;padding:6px 8px 8px;border-bottom:1px solid #ecd4d0;color:#9b473d;font-size:8px;font-weight:900;letter-spacing:.12em}
.history-more-menu #historyDelete{margin-top:5px;border:1px solid #efc7c1;background:#fff7f5;color:#a9362b}
.history-more-menu #historyDelete:hover{background:#ffe9e5}
@media(max-width:760px){#historyView{padding:19px 14px 95px}.history-report-menu{align-self:flex-start}#historyView .history-class-toolbar{grid-template-columns:1fr;padding:7px}.history-field-heading{grid-template-columns:34px minmax(0,1fr);min-height:34px}.history-field-heading>i{width:34px;height:34px;font-size:18px}#historyView .history-class-toolbar>label{padding:12px}#historyView .progress-summary{grid-template-columns:1fr 1fr}.history-selected-student{align-items:stretch;flex-wrap:wrap}.history-selected-student>div{order:-1;flex-basis:100%}.history-selected-student>button{flex:1}.history-student-card{min-height:72px;padding:11px}.history-student-avatar{width:38px;height:38px}}
@media(max-width:430px){#historyView .progress-summary{grid-template-columns:1fr}}
