#historyPanel{max-width:1450px;margin:0 auto}.history-toolbar .title{gap:12px;flex-wrap:wrap}.history-actions{display:flex;gap:8px;flex-wrap:wrap}.history-filter{display:flex;gap:16px;align-items:end;flex-wrap:wrap}.history-filter label{min-width:150px;margin-bottom:8px}.history-check{display:flex;align-items:center;gap:8px}.history-check input{width:auto}.history-status{padding:13px 16px;background:#edf4ff;border-radius:8px;line-height:1.7;font-size:13px;white-space:pre-line}.history-status.warning{color:#92591b;background:#fff5e6}.history-status.error{color:#a72e46;background:#fff0f2}.history-presets{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.history-presets button.selected,.history-tabs button.selected{background:#225cc8;color:#fff}.history-rules{display:grid;grid-template-columns:1fr 1fr;gap:14px}.history-rule{padding:18px 20px;border:1px solid #dfe7f3;border-radius:10px;background:#fff}.history-rule h3{margin:0 0 8px;font-size:16px}.history-rule p{margin:4px 0;overflow-wrap:anywhere}.history-rule strong{color:#2559a6}.history-rule small{line-height:1.8}.history-tabs{display:flex;gap:8px;margin:22px 0 14px}.history-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.history-kpi{padding:20px}.history-kpi strong{display:block;font-size:27px;margin:12px 0 8px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.history-kpi p{margin:0;font-size:12px}.history-kpi .positive{color:#089578}.history-kpi .negative{color:#b34453}.history-flag{border-left:4px solid #d99531;padding:12px 16px;background:#fff7e9;margin:16px 0;color:#815822;line-height:1.7}.history-section{margin-top:16px}.history-section h2{font-size:18px}.history-section .title{gap:12px;flex-wrap:wrap}.history-tables{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:18px}.history-table{overflow:auto;max-height:510px}.history-table table{font-size:12px;white-space:nowrap}.history-table td,.history-table th{padding:12px 10px;font-variant-numeric:tabular-nums}.history-table tr.high{background:#fff5e5}.history-table td small{display:block;font-size:10px}.history-table progress{width:64px;height:7px;accent-color:#3268cf;vertical-align:middle;margin-left:6px}.history-high-picker{display:flex;align-items:center;gap:10px;font-size:12px;color:#687f9f}.history-high-picker select{width:140px}.history-detail-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.history-detail-actions select{width:170px}.history-footnote{font-size:12px;line-height:1.8}.history-definition p{margin:10px 0}.history-definition summary{cursor:pointer;color:#375983}.history-empty{text-align:center;padding:40px 16px;background:#f9fbff;border:1px dashed #cfdbed;border-radius:10px;color:#7689a3}.history-kpis .card{margin-bottom:0}@media(max-width:1050px){.history-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.history-tables{grid-template-columns:1fr}}@media(max-width:650px){.history-rules{grid-template-columns:1fr}.history-toolbar{padding:16px}.history-filter{gap:10px}.history-filter label{min-width:120px;flex:1}.history-kpis{gap:10px}.history-kpi{padding:15px}.history-kpi strong{font-size:23px}.history-rule{padding:15px}.history-section{padding:16px}.history-heading h1{font-size:24px}.history-check{font-size:12px}.history-actions button{padding:10px 13px}.history-high-picker{flex-wrap:wrap}.admin-nav{overflow-x:auto}.admin-nav button{white-space:nowrap;font-size:12px}.history-kpi p{font-size:11px}}

/* Ordered cumulative extremes, shared by both historical views. */
.extrema-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:16px 0}.extrema-grid>div{padding:16px;border:1px solid #dce5f3;border-radius:10px;background:#f8faff}.extrema-grid h3{font-size:15px;margin:0 0 12px}.extrema-grid strong{display:block;font-size:26px;font-variant-numeric:tabular-nums}.extrema-grid small{display:block;color:#687f9f;line-height:1.8}.history-table td small{white-space:normal;min-width:140px}@media(max-width:650px){.extrema-grid{grid-template-columns:1fr}}
