/* Scoped overview dashboard; the Comic theme provides the ink and paper palette. */
.admin-statistics{--stat-ink:var(--ink,#121b23);--stat-paper:var(--panel,#fbf6e8);--stat-muted:var(--muted,#5b5548);--stat-teal:var(--teal,#1d6370);--stat-red:var(--red,#b62e35);display:grid;gap:24px;min-width:0;color:var(--stat-ink)}
.admin-statistics *{box-sizing:border-box}
.admin-statistics [hidden]{display:none!important}
.admin-statistics .sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.admin-stat-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;flex-wrap:wrap}
.admin-stat-head p{margin:0;font-size:13px;line-height:1.65;color:var(--stat-muted)}
.admin-stat-updated{display:flex;flex-direction:column;gap:3px;font-size:12px;line-height:1.6;color:var(--stat-muted)}
.admin-stat-updated time{color:var(--stat-ink);font-variant-numeric:tabular-nums}
.admin-stat-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.admin-stat-kpi{min-width:0;padding:18px 18px 16px;background:var(--stat-paper);border:2px solid var(--stat-ink);box-shadow:2px 2px 0 var(--stat-ink)}
.admin-stat-kpi-label{display:block;font-size:12px;line-height:1.6;min-height:38px;color:var(--stat-muted)}
.admin-stat-kpi-value{display:block;font:850 clamp(29px,2.6vw,39px)/1.15 var(--heading,'Roboto Condensed',sans-serif);letter-spacing:-.5px;font-variant-numeric:tabular-nums;color:var(--stat-red);overflow-wrap:anywhere;margin:10px 0 7px}
.admin-stat-kpi small{display:block;font-size:11px;line-height:1.6;color:var(--stat-muted)}
.admin-stat-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;border-top:1px solid #b7a17a;padding-top:20px}
.admin-stat-periods{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;width:min(100%,390px)}
.admin-stat-periods button{min-height:44px;min-width:0;padding:10px 13px;border:1px solid var(--stat-ink);background:var(--stat-paper);color:var(--stat-ink);font:650 13px/1.4 var(--body,Arial,sans-serif);cursor:pointer;overflow-wrap:anywhere}
.admin-stat-periods button[aria-pressed="true"]{background:var(--stat-ink);color:#fffaf0;box-shadow:2px 2px 0 var(--stat-red)}
.admin-stat-periods button:hover:not([aria-pressed="true"]){background:var(--panel2,#eee2c7)}
.admin-stat-periods button:focus-visible,.admin-statistics summary:focus-visible{outline:3px solid var(--stat-teal);outline-offset:3px}
.admin-stat-periods button:disabled{cursor:default;opacity:.55}
.admin-stat-range{margin:0;font-size:12px;line-height:1.6;color:var(--stat-muted);font-variant-numeric:tabular-nums}
.admin-stat-period-panel{display:grid;gap:20px;min-width:0}
.admin-stat-sections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}
.admin-stat-section{min-width:0;padding:22px;background:var(--stat-paper);border:2px solid var(--stat-ink);box-shadow:3px 3px 0 #cbbb9c}
.admin-stat-section-wide{grid-column:1/-1}
.admin-stat-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:18px}
.admin-stat-section h3{font:850 25px/1.2 var(--heading,'Roboto Condensed',sans-serif);margin:0;overflow-wrap:anywhere}
.admin-stat-section h4{font:800 19px/1.3 var(--heading,'Roboto Condensed',sans-serif);margin:0 0 12px}
.admin-stat-section .admin-stat-caption{margin:6px 0 0;font-size:12px;line-height:1.6;color:var(--stat-muted)}
.admin-stat-badge{display:inline-block;font-size:10px;font-weight:750;letter-spacing:.7px;line-height:1.4;padding:5px 8px;background:var(--panel2,#eee2c7);border:1px solid #b7a17a;color:var(--stat-ink);text-transform:uppercase}
.admin-stat-list{margin:0;display:grid;gap:0}
.admin-statistics .admin-stat-list+.admin-stat-list{margin-top:14px}
.admin-stat-list>div{display:grid;grid-template-columns:minmax(0,1fr) minmax(75px,auto);gap:14px;align-items:start;padding:12px 0;border-bottom:1px solid #d4c3a4;min-width:0}
.admin-stat-list>div:first-child{padding-top:0}
.admin-stat-list>div:last-child{border-bottom:0;padding-bottom:0}
.admin-stat-list dt{min-width:0;font-size:13px;line-height:1.6;color:var(--stat-muted);overflow-wrap:anywhere}
.admin-stat-list dd{min-width:0;max-width:240px;margin:0;text-align:right;font-size:17px;font-weight:750;line-height:1.4;color:var(--stat-ink);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.admin-stat-list .admin-stat-row-important dd{color:var(--stat-teal)}
.admin-stat-list dt small{display:block;margin-top:4px;font-size:11px;line-height:1.6;color:var(--stat-muted)}
.admin-stat-finance-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:25px}
.admin-stat-note{padding:12px 14px;margin:18px 0 0;border-left:3px solid var(--stat-teal);background:var(--paper,#f5edd9);color:var(--stat-muted);font-size:12px;line-height:1.7;overflow-wrap:anywhere}
.admin-stat-note-warning{border-left-color:#744e15;background:#f8e7b7;color:#684515}
.admin-stat-empty{padding:18px;border:1px dashed #b7a17a;background:var(--paper,#f5edd9);color:var(--stat-muted);font-size:13px;line-height:1.7;margin:0}
.admin-stat-statuses{display:flex;gap:9px;flex-wrap:wrap;margin:17px 0 0}
.admin-stat-status{display:inline-flex;gap:7px;align-items:center;padding:6px 10px;background:var(--panel2,#eee2c7);border:1px solid #b7a17a;font-size:11px;line-height:1.6;color:var(--stat-ink)}
.admin-stat-status[data-state="unavailable"]{background:#f8e7b7;border-color:#9f793c;color:#684515}
.admin-stat-status[data-state="available"]{background:#e2ede4;border-color:#527a5f;color:#206447}
.admin-stat-chart-block{margin-top:22px;padding-top:20px;border-top:1px solid #d4c3a4}
.admin-stat-chart-legend{display:flex;gap:20px;flex-wrap:wrap;color:var(--stat-muted);font-size:11px;line-height:1.6;margin:0 0 14px}
.admin-stat-chart-legend span{display:flex;gap:7px;align-items:center}
.admin-stat-chart-legend i{display:block;width:10px;height:10px;background:var(--stat-teal)}
.admin-stat-chart-legend span:nth-child(2) i{background:var(--stat-red)}
.admin-stat-chart{height:160px;border-bottom:1px solid #b7a17a;display:flex;align-items:stretch;gap:4px;list-style:none;padding:0;margin:0;min-width:0;background:repeating-linear-gradient(to top,transparent 0,transparent 39px,#d4c3a454 39px,#d4c3a454 40px)}
.admin-stat-chart>li{flex:1;min-width:0;display:flex;align-items:flex-end;gap:1px}
.admin-stat-chart>li>span{flex:1;min-width:0;display:block;background:var(--stat-teal)}
.admin-stat-chart>li>span:nth-child(2){background:var(--stat-red)}
.admin-stat-chart-labels{display:flex;justify-content:space-between;gap:12px;font-size:10px;line-height:1.6;color:var(--stat-muted);font-variant-numeric:tabular-nums;margin:7px 0 0}
.admin-stat-details{margin-top:16px}
.admin-stat-details summary{cursor:pointer;min-height:44px;display:flex;align-items:center;gap:8px;font-size:12px;font-weight:650;color:var(--stat-teal)}
.admin-stat-details summary::before{content:'+';font-size:18px;font-weight:750}
.admin-stat-details[open] summary::before{content:'−'}
.admin-stat-table-scroll{max-width:100%;overflow-x:auto;border:1px solid #b7a17a}
.admin-stat-table{width:100%;min-width:360px;border-collapse:collapse;font-size:12px;background:var(--stat-paper)}
.admin-stat-table th,.admin-stat-table td{padding:10px 13px;text-align:left;border-bottom:1px solid #d4c3a4;font-variant-numeric:tabular-nums}
.admin-stat-table th{background:var(--panel2,#eee2c7);font-weight:700;color:var(--stat-ink)}
.admin-stat-table td{color:var(--stat-muted)}
.admin-stat-table th:not(:first-child),.admin-stat-table td:not(:first-child){text-align:right}
.admin-stat-synthetic{margin-top:18px;padding-top:16px;border-top:1px dashed #b7a17a}
.admin-stat-subsection{margin-top:22px;padding-top:20px;border-top:1px solid #d4c3a4}
.admin-stat-synthetic .admin-stat-list dd{color:var(--stat-muted);font-size:14px}
.admin-stat-footer{margin:0;font-size:11px;line-height:1.7;color:var(--stat-muted)}
@media(max-width:1100px){.admin-stat-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-stat-sections{gap:16px}.admin-stat-section{padding:18px}.admin-stat-finance-grid{gap:20px}}
@media(max-width:880px){.admin-stat-sections{grid-template-columns:minmax(0,1fr)}.admin-stat-finance-grid{grid-template-columns:minmax(0,1fr);gap:22px}.admin-stat-finance-grid>div+div{padding-top:20px;border-top:1px solid #d4c3a4}.admin-stat-section-wide{grid-column:auto}}
@media(max-width:480px){.admin-statistics{gap:20px}.admin-stat-head{gap:12px}.admin-stat-kpis{gap:10px}.admin-stat-kpi{padding:14px 12px}.admin-stat-kpi-label{font-size:11px;min-height:36px}.admin-stat-kpi-value{font-size:29px;letter-spacing:-.3px}.admin-stat-periods{width:100%;gap:6px}.admin-stat-periods button{padding:10px 8px;font-size:12px}.admin-stat-toolbar{gap:12px}.admin-stat-section{padding:17px 15px}.admin-stat-section h3{font-size:24px}.admin-stat-list>div{gap:12px;grid-template-columns:minmax(0,1fr) minmax(65px,auto)}.admin-stat-list dt{font-size:12px}.admin-stat-list dd{font-size:16px;max-width:170px}.admin-stat-chart{gap:2px;height:145px}.admin-stat-note{padding:11px 12px}.admin-stat-chart-legend{gap:14px}}
@media(prefers-reduced-motion:reduce){.admin-statistics *{scroll-behavior:auto}}
