.stats-report {
  --sr-paper:var(--panel);--sr-ink:#152640;--sr-muted:#536577;--sr-line:#dce4eb;
  --sr-wash:#f3f6f9;--sr-blue:#3957cc;--sr-teal:#087d78;--sr-soft-teal:#e4f4f0;
  --sr-gap:clamp(14px,1.3vw,22px);--sr-pad:clamp(16px,1.5vw,26px);
  max-width:1780px;margin:0 auto;color:var(--sr-ink);font-variant-numeric:tabular-nums;container-type:inline-size
}
:root[data-theme=dark] .stats-report{
  --sr-paper:#212c3b;--sr-ink:#edf3fb;--sr-muted:#b2c1d2;--sr-line:#39485a;
  --sr-wash:#2b3849;--sr-blue:#a8baff;--sr-teal:#77d8c8;--sr-soft-teal:#1d403d
}
#workspace:has(.stats-report){background:#f5f7fa}
:root[data-theme=dark] #workspace:has(.stats-report){background:#18202b}
.stats-report :is(h1,h2,h3,h4,p){margin:0}
.stats-report .sr-header,.stats-report .sr-controls,.sr-actions,.sr-dates,.sr-tabs,.sr-presets,
.sr-metric-label,.sr-metric-note,.sr-metric-value,.sr-panel-head,.sr-hour-readout,.sr-context,.sr-ref,.sr-pager,.sr-order{
  display:flex;align-items:center
}
.stats-report .sr-header{justify-content:space-between;flex-wrap:wrap;gap:14px 20px;margin:0 0 22px}
.sr-header h1{font-weight:720;font-size:clamp(30px,2.5vw,42px);line-height:1.12;letter-spacing:-.05em}
.sr-title-line{position:relative;display:flex;align-items:center;gap:14px}
.sr-guide summary{display:inline-flex;align-items:center;gap:5px;width:max-content;cursor:pointer;list-style:none;color:var(--sr-muted);font-size:12px}
.sr-guide summary::-webkit-details-marker{display:none}
.sr-guide summary:hover,.sr-guide[open] summary{color:var(--sr-teal)}
.sr-guide summary .ico{width:14px;height:14px}
.sr-guide dl{position:absolute;z-index:3;top:100%;left:0;width:min(355px,94cqw);padding:16px 18px;background:var(--sr-paper);border:1px solid var(--sr-line);box-shadow:0 8px 28px #10243824;border-radius:10px;margin:5px 0 0;font-size:13px}
.sr-guide dt{font-weight:650}.sr-guide dd{margin:2px 0 9px;color:var(--sr-muted)}.sr-guide dd:last-child{margin-bottom:0}
.sr-context{gap:5px 10px;flex-wrap:wrap;margin-top:8px;color:var(--sr-muted);font-size:12px}
.sr-context span+span{display:flex;align-items:center;gap:10px}
.sr-context span+span::before{content:"";width:3px;height:3px;border-radius:50%;background:currentColor}
.sr-actions,.sr-dates{gap:8px;flex-wrap:wrap}
.stats-report .sr-actions :is(a,button),.stats-report .sr-date{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:37px;padding:7px 12px;
  border:1px solid var(--sr-line);border-radius:9px;text-decoration:none;background:var(--sr-paper);color:var(--sr-ink);font-size:12px;font-weight:600
}
.sr-actions .ico,.sr-dates .ico{width:15px;height:15px}
.stats-report .sr-actions .sr-export{background:#304bc2;color:white;border-color:#304bc2}
.stats-report .sr-actions .sr-export:hover{background:#243ca6}
.stats-report .sr-controls{justify-content:space-between;flex-wrap:wrap;gap:8px 14px;padding:0 0 9px;border-bottom:1px solid var(--sr-line);margin-bottom:18px}
.sr-tabs{gap:4px;flex-wrap:wrap}
.stats-report .sr-tabs button{position:relative;display:flex;align-items:center;gap:7px;padding:9px 12px;background:transparent;border:0;color:var(--sr-muted);font-size:13px;font-weight:590;border-radius:7px}
.stats-report .sr-tabs button[aria-selected=true]{background:var(--sr-soft-teal);color:var(--sr-teal)}
.sr-tabs .ico{width:16px;height:16px}
.stats-report .sr-presets{padding:3px;gap:2px;border-radius:8px;background:var(--sr-wash);border:1px solid var(--sr-line)}
.stats-report .sr-presets button{background:transparent;border:0;color:var(--sr-muted);font-size:11px;line-height:17px;font-weight:600;padding:3px 7px}
.stats-report .sr-presets button[aria-pressed=true]{background:var(--sr-paper);box-shadow:0 1px 4px #15264124;color:var(--sr-blue)}
.stats-report .sr-date{min-height:30px;line-height:16px;padding:6px 9px}
.sr-date .ico:last-child{width:12px}
.sr-filters:empty{display:none}
.sr-filters{display:flex;flex-wrap:wrap;gap:5px;margin:0 0 12px}
.stats-report .sr-filter-chip{background:var(--sr-paper);border:1px solid var(--sr-line);border-radius:20px;padding:3px 9px;font-size:12px;display:inline-flex;align-items:center;gap:7px}
.sr-filter-chip .ico{width:12px;height:12px}
.sr-kpis{display:grid;grid-template-columns:1.28fr repeat(3,minmax(0,1fr));overflow:hidden;margin-bottom:var(--sr-gap);border:1px solid var(--sr-line);background:var(--sr-paper);border-radius:15px;box-shadow:0 3px 14px -9px #192e471c}
.sr-metric{padding:clamp(16px,1.5vw,27px);min-width:0}
.sr-metric:not(:first-child)+.sr-metric{border-left:1px solid var(--sr-line)}
.sr-metric-label{gap:8px;color:var(--sr-muted);min-height:20px}
.stats-report .sr-metric h2{font-size:13px;font-weight:580;line-height:1.25}
.sr-metric-label .ico{width:17px;height:17px;color:var(--sr-teal)}
.sr-metric-value{justify-content:space-between;gap:10px;margin:14px 0 9px;min-height:40px}
.sr-metric-value strong{font-size:clamp(27px,2.65vw,43px);font-weight:675;letter-spacing:-.065em;line-height:1.03;overflow-wrap:anywhere}
.sr-metric-note{gap:7px;min-height:20px;flex-wrap:wrap;font-size:11px;color:var(--sr-muted)}
.sr-change{padding:2px 5px;line-height:1.45;border-radius:5px;font-weight:640;white-space:nowrap}
.sr-gain{background:var(--sr-soft-teal);color:var(--sr-teal)}.sr-loss{background:#f9e8e7;color:#983e3a}
.sr-metric-main{background:linear-gradient(113deg,#123c47,#0d5258);color:#fff}
.sr-metric-main .sr-metric-label,.sr-metric-main .sr-metric-note{color:#d4e9e8}
.sr-metric-main .sr-metric-label .ico{color:#8ce0d2}
.sr-metric-main .sr-change{background:#ffffff21;color:white}
.sr-mini-series{display:flex;align-items:flex-end;gap:3px;flex:1;max-width:95px;min-width:0;height:34px}
.sr-mini-series i{background:#87dad0;opacity:.8;width:0;flex:1;height:var(--bar-height);border-radius:2px 2px 0 0}
:root[data-theme=dark] .sr-loss{color:#ffd1cb;background:#563638}
.sr-primary-grid,.sr-detail-grid{display:grid;gap:var(--sr-gap);grid-template-columns:minmax(0,1.65fr) minmax(270px,1fr)}
.sr-detail-grid{grid-template-columns:minmax(0,1fr) minmax(0,1.16fr);align-items:start;margin-top:var(--sr-gap)}
.sr-detail-column{display:grid;gap:var(--sr-gap);min-width:0}
.sr-leaders .sr-panel-head{margin-bottom:8px}
.sr-leaders .sr-panel-head a{display:inline-flex;align-items:center;gap:4px;color:var(--sr-blue);font-size:12px;text-decoration:none}
.sr-leaders .sr-panel-head a:hover{text-decoration:underline}
.sr-leaders .sr-panel-head a .ico{color:inherit;width:13px;height:13px}
.sr-leaders ol{padding:0;margin:0;list-style:none}
.sr-leaders li{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;padding:7px 0;font-size:13px}
.sr-leaders li+li{border-top:1px solid var(--sr-line)}
.sr-rank{display:grid;place-items:center;border-radius:6px;width:23px;height:23px;background:var(--sr-wash);color:var(--sr-muted);font-size:11px}
.sr-leader-title{min-width:0;overflow-wrap:anywhere;font-weight:600}
.sr-leaders small{color:var(--sr-muted);font-size:11px;font-weight:400}
.sr-leader-title small{display:block}
.sr-panel{padding:var(--sr-pad);min-width:0;border:1px solid var(--sr-line);border-radius:15px;background:var(--sr-paper);box-shadow:0 3px 14px -9px #192e471c}
.sr-panel-head{justify-content:space-between;gap:10px;margin-bottom:19px}
.stats-report .sr-panel-head h2,.stats-report .dt-head h2{font-size:18px;color:var(--sr-ink);line-height:1.25;letter-spacing:-.025em;font-weight:650}
.sr-panel-head .ico{color:var(--sr-muted);height:17px;width:17px}
.sr-panel-head p{font-size:12px;color:var(--sr-muted);margin-top:4px}
.sr-trend{display:flex;flex-direction:column;justify-content:space-between}
.sr-trend .dt-body{grid-template-rows:clamp(146px,13vw,205px) 18px}
.sr-trend-summary{display:flex;flex-wrap:wrap;gap:12px 23px;border-top:1px solid var(--sr-line);padding-top:12px;margin-top:13px}
.sr-trend-summary>div{display:grid;gap:2px}.sr-trend-summary span,.sr-hour-focus span{font-size:11px;color:var(--sr-muted)}
.sr-trend-summary b{font-size:13px;font-weight:640}
.sr-hourly{display:flex;flex-direction:column}
.sr-hour-focus{display:grid;gap:3px}
.sr-hour-focus strong{font-size:clamp(23px,2.3vw,34px);font-weight:650;letter-spacing:-.045em;color:var(--sr-ink);line-height:1.25}
.sr-histogram{display:grid;grid-template-columns:repeat(24,minmax(0,1fr));align-items:stretch;gap:2px;flex:1;min-height:94px;padding-top:12px;position:relative;
  background:repeating-linear-gradient(to top,var(--sr-line) 0 1px,transparent 1px 33.33%);border-bottom:1px solid var(--sr-line)}
.stats-report .sr-histogram button{align-self:stretch;display:flex;align-items:flex-end;justify-content:center;min-width:0;border:0;background:transparent;padding:0;border-radius:0}
.stats-report .sr-histogram button:hover,.stats-report .sr-histogram button:focus-visible{background:var(--sr-soft-teal)}
.sr-histogram i{width:100%;max-width:21px;height:var(--bar-height);border-radius:3px 3px 0 0;background:#6bb9ae}
.sr-histogram button[aria-pressed=true] i{background:#067a75}
.sr-hour-axis{display:flex;justify-content:space-between;font-size:10px;color:var(--sr-muted);margin-top:4px}
.sr-hour-readout{gap:5px 10px;flex-wrap:wrap;border-top:1px solid var(--sr-line);padding-top:11px;margin-top:13px;color:var(--sr-muted);font-size:11px;min-height:40px}
.sr-hour-readout b{color:var(--sr-teal)}.sr-hour-readout small{font-size:11px}
.sr-table-scroll{width:100%;overflow:auto}
.sr-detail-grid table{border-collapse:collapse;width:100%;font-size:12px}
.sr-detail-grid th,.sr-detail-grid td{text-align:right;padding:8px 7px;border-bottom:1px solid var(--sr-line)}
.sr-detail-grid th:not(:first-child),.sr-detail-grid td:not(:first-child){white-space:nowrap}
.sr-detail-grid th:first-child,.sr-detail-grid td:first-child{text-align:left;padding-left:2px}
.sr-detail-grid th{font-size:11px;color:var(--sr-muted);font-weight:600}
.sr-detail-grid tbody tr:last-child td{border-bottom:0}
.sr-source-strip{height:11px;border-radius:4px;overflow:hidden;display:flex;gap:2px;margin:6px 0 13px;background:var(--sr-wash)}
.sr-ref{gap:8px;overflow-wrap:anywhere}.sr-ref i{flex:none;width:8px;height:8px;border-radius:3px}
.sr-order{font-size:11px;color:var(--sr-muted);gap:6px}.sr-order .ico{width:13px;height:13px}
.sr-pager{justify-content:flex-end;gap:4px;margin-top:10px}
.sr-pager span{font-size:11px;color:var(--sr-muted);margin-right:4px}
.stats-report .sr-pager button{min-height:27px;min-width:29px;padding:1px 6px;background:var(--sr-paper);border:1px solid var(--sr-line);color:var(--sr-ink);font-size:17px}
.sr-empty{padding:22px 4px;color:var(--sr-muted);font-size:13px}
@container (max-width:850px){
  .sr-controls{row-gap:9px}.sr-metric{padding:15px 12px}.sr-mini-series{max-width:55px;gap:2px}
  .sr-primary-grid{grid-template-columns:minmax(0,1.45fr) minmax(225px,1fr)}
}
@container (max-width:680px){
  .sr-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sr-metric:nth-child(3),.sr-metric:nth-child(4){border-top:1px solid var(--sr-line)}
  .sr-metric:nth-child(3){border-left:0!important}
  .sr-primary-grid,.sr-detail-grid{grid-template-columns:minmax(0,1fr)}
  .sr-mini-series{display:none}.sr-metric-value{margin:9px 0 6px}
  .stats-report .sr-controls{align-items:flex-start;flex-direction:column}
  .sr-hourly .sr-histogram{height:110px;flex:none}
  .sr-header h1{font-size:30px}.sr-header .sr-context{font-size:11px}
  .stats-report .sr-tabs button{padding:7px 8px;font-size:12px}
}
@container (max-width:390px){
  .sr-tabs .ico{display:none}.sr-actions{gap:5px}.sr-metric h2{font-size:12px}
  .stats-report .sr-presets button{font-size:10px;padding:2px 5px}.stats-report .sr-date{font-size:11px}
  .sr-trend-summary{gap:10px}.sr-trend-summary>div{flex:1}
  .sr-detail-grid th,.sr-detail-grid td{padding:7px 3px}
}
