/* Only this strip and modal are styled here; inbox layout and scroll stay intact. */
.statistics-strip[hidden],.statistics-dialog [hidden]{display:none!important}
.statistics-strip{display:flex;align-items:center;justify-content:center;gap:12px;min-width:0;flex:0 1 auto;white-space:nowrap;font-size:11px;color:var(--muted)}
.statistics-summary{display:flex;align-items:center;gap:12px;min-width:0;overflow:auto}
.statistics-summary-item{display:inline-flex;align-items:baseline;gap:3px;white-space:nowrap}
.statistics-summary-item+.statistics-summary-item{border-left:1px solid var(--line);padding-left:12px}
.statistics-summary strong{color:var(--green);font-size:13px;font-variant-numeric:tabular-nums}
.statistics-open{flex-shrink:0;padding:4px 7px;background:transparent;color:var(--green);font-size:11px;white-space:nowrap}
.statistics-open:hover{background:var(--rail)}
.statistics-dialog{width:min(1120px,calc(100vw - 40px));max-height:calc(100dvh - 40px);padding:26px;border:1px solid var(--line);border-radius:18px;background:var(--statistics-surface,#fff);color:var(--ink,#253c34);box-shadow:0 24px 90px #18391b35;overflow:auto;overscroll-behavior:contain}
.statistics-dialog::backdrop{background:#10251f66;backdrop-filter:blur(3px)}
.statistics-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:20px}
.statistics-heading>button{flex-shrink:0;white-space:nowrap}
.statistics-heading h2{font-size:25px;letter-spacing:-.7px;margin:3px 0 8px}
.statistics-eyebrow{font-size:11px;color:var(--green);font-weight:700;margin:0}
.statistics-muted{font-size:12px;color:var(--muted);line-height:1.7;margin:7px 0}
.statistics-filters{display:grid;grid-template-columns:minmax(130px,1.1fr) minmax(110px,.9fr) minmax(140px,1fr) minmax(140px,1fr) auto;align-items:end;gap:10px;padding:15px;background:var(--rail);border:1px solid var(--line);border-radius:12px}
.statistics-filters label{display:flex;flex-direction:column;gap:6px;font-size:11px;margin:0;color:var(--muted)}
.statistics-filters input,.statistics-filters select,.statistics-filters button{height:38px;padding:7px 10px;font-size:12px}
.statistics-feedback{font-size:12px;line-height:1.7;color:var(--muted);margin:12px 0;min-height:20px}
.statistics-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.statistics-card{padding:17px;border:1px solid var(--line);border-radius:12px;background:var(--statistics-surface,#fff);display:flex;flex-direction:column;gap:8px}
.statistics-card span{font-size:12px;color:var(--muted)}
.statistics-card strong{font-size:25px;color:var(--green);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.statistics-section{border:1px solid var(--line);border-radius:12px;margin-top:18px;padding:17px;min-width:0}
.statistics-section h3{font-size:14px;margin:0 0 10px;line-height:1.5}
.statistics-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.statistics-section-heading h3{margin:0}
.statistics-table-wrap{overflow:auto;min-width:0}
.statistics-table{width:100%;border-collapse:collapse;font-size:12px;text-align:left}
.statistics-table th{font-weight:600;color:var(--muted);white-space:nowrap;background:var(--rail)}
.statistics-table th,.statistics-table td{padding:10px 12px;border-bottom:1px solid var(--line);vertical-align:top;line-height:1.6;overflow-wrap:anywhere;max-width:260px}
.statistics-table td{font-variant-numeric:tabular-nums}
.statistics-table tbody tr:last-child td{border-bottom:0}
.statistics-empty{font-size:12px;color:var(--muted);text-align:center;padding:22px 8px;margin:0}
.statistics-search{display:flex;gap:7px;max-width:340px;min-width:0}
.statistics-search input{width:220px;font-size:12px;padding:7px 10px}
.statistics-search button,.statistics-pagination button{font-size:12px;padding:7px 11px;white-space:nowrap}
.statistics-pagination{display:flex;align-items:center;justify-content:flex-end;gap:7px;padding-top:12px}
.statistics-pagination>span{margin-right:auto}
.statistics-chart-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.statistics-bars{max-height:380px;overflow:auto;padding-right:4px}
.statistics-bar-row{display:grid;grid-template-columns:77px minmax(32px,1fr) auto;gap:8px;align-items:center;min-height:26px;font-size:10px}
.statistics-bar-label{color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.statistics-bar-track{display:flex;height:10px;overflow:hidden;border-radius:3px;background:var(--rail)}
.statistics-bar-inbound{background:var(--green);height:100%}.statistics-bar-outbound{background:#9ecfb5;height:100%}
.statistics-bar-value{font-size:10px;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.statistics-basis{padding-top:15px;font-size:11px;line-height:1.8;color:var(--muted);margin:18px 0 0;border-top:1px solid var(--line)}
html:is([data-theme=theme-13],[data-theme=theme-14],[data-theme=theme-15],[data-theme=theme-16]) .statistics-dialog{--statistics-surface:var(--rail)}
.statistics-filters>button{color:var(--on-accent,#fff)}
@media(max-width:1550px){.topbar:has(.statistics-strip:not([hidden])){flex-wrap:wrap}.topbar .statistics-strip{order:3;flex-basis:100%;justify-content:flex-end;padding:4px 0 2px;border-top:1px solid var(--line)}}
@media(max-width:850px){.statistics-filters{grid-template-columns:1fr 1fr}.statistics-filters button{grid-column:1/-1}.statistics-chart-grid{grid-template-columns:1fr}.statistics-cards{gap:8px}.statistics-card{padding:13px}.statistics-card strong{font-size:21px}}
@media(max-width:680px){.topbar .statistics-strip{justify-content:space-between;gap:8px;font-size:10px}.statistics-summary{gap:8px}.statistics-summary-item+.statistics-summary-item{padding-left:8px}.statistics-summary strong{font-size:11px}.statistics-open{font-size:10px}.statistics-dialog{width:calc(100vw - 18px);max-height:calc(100dvh - 18px);padding:15px;border-radius:13px}.statistics-cards{grid-template-columns:1fr 1fr}.statistics-section{padding:12px}.statistics-section-heading{align-items:stretch;flex-direction:column}.statistics-search,.statistics-search input{width:100%;max-width:none}.statistics-table th,.statistics-table td{padding:9px 8px}.statistics-bar-row{grid-template-columns:70px minmax(25px,1fr) auto;gap:5px}.statistics-heading h2{font-size:22px}}
