.statistics {
  --stats-panel: #fff;
  --stats-border: #cfdce4;
  --stats-subtle: #f1f6f9;
  --stats-blue: #0875b1;
  display: grid;
  gap: 14px;
  min-width: 0;
  padding-block-end: 60px;
}
.statistics h1, .statistics h2, .statistics p { margin: 0; }
.stats-heading, .stats-heading > div, .stats-sync,
.stats-table-intro, .stats-controls, .stats-table-actions, .stats-footer {
  display: flex;
  align-items: center;
  gap: 9px;
}
.stats-heading { justify-content: space-between; flex-wrap: wrap; }
.stats-heading > div { flex-wrap: wrap; }
.stats-source, .stats-timezone, .stats-sync [role="status"], .stats-footer {
  color: var(--quiet);
  font-size: 13px;
}
.stats-source { padding-left: 10px; border-left: 1px solid #c2d1dc; font-weight: 600; }
.statistics .workspace-toolbar { margin: 0; }
.stats-scope .stats-timezone { margin-inline-start: auto; }
.stats-scope button[data-value="accounts"], .stats-scope .stats-date-trigger { font-weight: 700; }
.statistics :is(button, select, input):focus-visible { outline-offset: 2px; }
.statistics button[aria-expanded="true"], .statistics button[aria-pressed="true"]:not(.seg button, .stats-levels button) {
  color: #095c87;
  border-color: #9ac8e0;
  background: #e8f5fc;
}
.statistics button[aria-busy="true"] .mf-icon { animation: stats-spin 900ms linear infinite; }
@keyframes stats-spin { to { transform: rotate(360deg); } }
.stats-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.stats-card {
  --trend-color: #95cbe8;
  display: flex;
  flex-direction: column;
  background: var(--stats-panel);
  border: 1px solid var(--stats-border);
  border-radius: 10px;
  padding: 13px;
  min-width: 0;
  box-shadow: 0 1px 2px #1c2b330b;
}
.stats-card:first-child { background: #f2faff; border-color: #bdd9ea; }
.stats-card.green { --trend-color: #a1d3ba; }
.stats-card.cyan { --trend-color: #9bd2da; }
.stats-card-cost {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 3px 8px;
}
.stats-card-heading, .stats-card-cost { color: var(--quiet); font-size: 12px; }
.stats-card-heading { font-weight: 600; }
.stats-card > strong {
  display: block;
  margin-block: 3px 5px;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.stats-card-rates {
  margin-block-start: 8px;
  padding-block-start: 7px;
  border-block-start: 1px solid #e3eaef;
  display: grid;
  gap: 3px;
}
.stats-card > strong + .stats-card-rates { margin-block-start: auto; }
.stats-card-cost b { color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stats-trend, .stats-trend-empty { height: 24px; margin-block-start: auto; }
.stats-card:first-child :is(.stats-trend, .stats-trend-empty) { height: 44px; }
.stats-trend { position: relative; cursor: crosshair; touch-action: pan-y; }
.stats-trend:focus-visible { outline: 2px solid var(--stats-blue); outline-offset: 2px; border-radius: 3px; }
.stats-trend-bars { display: flex; align-items: end; height: 100%; }
.stats-trend i {
  flex: 1;
  min-width: 0;
  height: var(--height);
  border-radius: 2px 2px 0 0;
  background: var(--trend-color);
}
.stats-trend:not(.stats-trend-dense) i:not(:last-child) { border-inline-end: 2px solid transparent; background-clip: padding-box; }
.stats-trend i:last-child { background: #3783a8; }
.stats-trend i.is-inspected { background: #075d85; box-shadow: inset 0 2px #084c6b; min-height: 2px; }
.stats-trend-tip {
  position: absolute;
  z-index: 5;
  inset: auto 0 calc(100% + 6px);
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 5px 8px;
  border: 1px solid #bed3e1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 3px 12px #243d5626;
  pointer-events: none;
}
.stats-trend-tip time, .stats-trend-tip b { display: block; }
.stats-trend-tip time { color: var(--quiet); font-size: 11px; }
.stats-trend-tip b { font-size: 13px; font-variant-numeric: tabular-nums; }
.stats-trend-rate {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 1px 8px;
  margin-block-start: 3px;
  padding-block-start: 3px;
  border-block-start: 1px solid #e3eaef;
  color: var(--quiet);
  font-size: 11px;
}
.stats-trend-rate b { color: var(--ink); }
.stats-date { position: relative; max-width: 100%; }
.stats-date-trigger span { text-align: start; }
.stats-date-trigger .icon-down { width: 12px; height: 12px; margin-inline-start: 2px; }
.stats-date-popup {
  position: absolute;
  z-index: 5;
  inset: calc(100% + 7px) 0 auto auto;
  width: min(730px, calc(100vw - 2 * clamp(14px, 2.2vw, 34px)));
  max-height: min(570px, 66dvh);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--stats-border);
  border-radius: 10px;
  background: var(--stats-panel);
  box-shadow: 0 12px 32px #20374730;
}
.stats-date-content { display: grid; grid-template-columns: 190px minmax(0, 1fr); }
.stats-date-content fieldset {
  display: grid;
  align-content: start;
  gap: 2px;
  border: 0;
  border-inline-end: 1px solid #e0e9ef;
  min-width: 0;
  margin: 0;
  padding: 11px;
  background: #f6f9fb;
}
.stats-date-content fieldset label {
  display: flex;
  align-items: center;
  min-height: 32px;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 5px;
  font-size: 13px;
  cursor: pointer;
}
.stats-date-content fieldset label:hover { background: #eaf1f6; }
.stats-date-content fieldset label:has(:checked) { color: #095c87; background: #dfedf6; font-weight: 650; }
.stats-date-content input[type="radio"] {
  flex: none;
  width: 15px;
  height: 15px;
  min-height: 0;
  margin: 0;
  accent-color: var(--stats-blue);
}
.stats-calendar { position: relative; min-width: 0; padding: 12px; }
.stats-calendar-nav {
  position: absolute;
  inset: 10px 12px auto;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.stats-calendar-nav button {
  min-width: 33px;
  min-height: 32px;
  padding: 4px;
  pointer-events: auto;
}
.stats-calendar-prev .mf-icon { rotate: 180deg; }
.stats-calendar-months { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.stats-calendar-month h3 {
  display: grid;
  place-items: center;
  padding-inline: 32px;
  min-height: 32px;
  margin: 0 0 7px;
  text-align: center;
  font-size: 14px;
  font-weight: 680;
}
.stats-calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.stats-calendar-days abbr { padding: 4px 0; font-size: 12px; text-align: center; text-decoration: none; color: var(--quiet); }
.stats-calendar .stats-calendar-day {
  width: 100%;
  min-height: 32px;
  padding: 0;
  border: 1px solid transparent;
  font-variant-numeric: tabular-nums;
  border-radius: 5px;
  background: transparent;
}
.stats-calendar .stats-calendar-day:hover:not(:disabled) { background: #eaf3f9; border-color: #a9c8dd; }
.stats-calendar .stats-calendar-day.is-today { border-color: #7eb4d3; color: #09679c; font-weight: 700; }
.statistics .stats-calendar .stats-calendar-day.is-between { color: #144e72; background: #dfedf7; border-color: transparent; }
.statistics .stats-calendar .stats-calendar-day.is-edge { color: #fff; background: #086fa9; border-color: #086fa9; font-weight: 700; }
.stats-calendar-day:disabled, .stats-calendar-nav button:disabled, .stats-date-footer button:disabled { cursor: default; }
.stats-date-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 7px;
  padding: 9px 12px;
  border-top: 1px solid #e0e9ef;
  background: var(--stats-panel);
}
.stats-date-footer p { margin-inline-end: auto; color: var(--quiet); font-size: 12px; }
@media (prefers-reduced-motion: no-preference) {
  .stats-date-popup.is-opening { animation: panel-reveal var(--reveal-duration) var(--reveal-easing); }
}
.statistics .stats-segment { gap: 2px; padding: 3px; border-radius: 7px; border: 1px solid var(--stats-border); background: #f5f8fa; }
.statistics .stats-segment button {
  color: var(--ink);
  background: transparent;
  border: none;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 4px;
  white-space: nowrap;
}
.statistics .stats-segment button:hover { background: #e6eff5; }
.statistics .stats-segment button[aria-pressed="true"] {
  background: #def0fa;
  color: #095c87;
  box-shadow: inset 0 0 0 1px #b6d8e9;
}
.stats-workarea {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-inline: calc(-1 * var(--workspace-side-padding));
}
.stats-workarea:has(.stats-options) { grid-template-columns: minmax(0, 1fr) 285px; }
.stats-workspace, .stats-options {
  min-width: 0;
  border: 1px solid var(--stats-border);
  border-radius: 11px;
  background: var(--stats-panel);
  box-shadow: 0 1px 2px #1c2b330d;
}
.stats-table-intro {
  padding: 12px 14px 7px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.stats-table-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-width: 0;
}
.stats-table-intro h2 { font-size: 19px; }
.stats-table-intro .workspace-toolbar { flex: 1; justify-content: end; flex-wrap: wrap; }
.stats-presets-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 14px 10px;
}
.stats-presets-bar button { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.stats-preset-entry {
  position: relative;
  display: inline-flex;
  min-width: 0;
  max-width: min(100%, 260px);
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}
.stats-preset-entry:has(.stats-preset-tab[aria-pressed="true"]) { border-color: #9ac8e0; background: #e8f5fc; }
.stats-presets-bar .stats-preset-tab { min-width: 0; min-height: 30px; border: 0; border-radius: 5px 0 0 5px; }
.stats-preset-tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-preset-tab i { flex: 0 0 7px; height: 7px; border-radius: 50%; background: #ae7507; }
.statistics .stats-preset-more {
  flex: none;
  width: 30px;
  min-height: 30px;
  padding: 0;
  border: 0;
  border-inline-start: 1px solid #d7e2e9;
  border-radius: 0 5px 5px 0;
  background: transparent;
  color: var(--quiet);
  font-size: 18px;
  line-height: 1;
}
.statistics .stats-preset-more:is(:hover, [aria-expanded="true"]):not(:disabled) { background: #e3eff6; color: var(--text); }
.stats-preset-menu {
  position: absolute;
  z-index: 12;
  inset: calc(100% + 5px) auto auto 0;
  display: grid;
  width: min(232px, calc(100vw - 16px));
  max-height: min(55dvh, 340px);
  overflow: auto;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 8px 24px #1f3f5426;
}
.stats-preset-menu[hidden] { display: none; }
.stats-preset-menu.is-above { inset-block: auto calc(100% + 5px); }
.stats-presets-bar .stats-preset-menu button {
  justify-content: start;
  padding: 7px 10px;
  border-color: transparent;
  background: transparent;
  text-align: start;
}
.stats-presets-bar .stats-preset-menu button:focus-visible { outline-offset: -2px; }
.stats-presets-bar .stats-preset-menu button:hover { background: #eef5f9; }
.stats-presets-bar .stats-preset-menu .stats-preset-delete-action {
  margin-top: 4px;
  border-top-color: var(--border);
  border-radius: 0 0 5px 5px;
  color: var(--danger);
}
.stats-presets-bar .stats-preset-menu .stats-preset-delete-action:hover { background: #fff0f1; }
.stats-preset-remove-name { overflow-wrap: anywhere; }
.stats-team-presets { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
.stats-team-presets h3 { margin: 0; font-size: 14px; }
.stats-presets-bar .stats-update-preset { color: #785311; background: #fff6df; border-color: #d6b775; }
.stats-presets-bar .stats-update-preset:hover { background: #ffefca; }
.statistics .stats-controls { padding: 6px 14px 9px; flex-wrap: wrap; }
.statistics .stats-level-row { justify-content: space-between; align-items: end; padding-block: 7px 0; background: #f1f6f9; }
.stats-levels { display: flex; flex: 1 1 520px; gap: 7px; min-width: 0; max-width: 850px; }
.stats-level-tab {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  border: 1px solid #d4e0e8;
  border-radius: 9px 9px 0 0;
  background: #eaf1f5;
}
.stats-level-tab:hover { background: #f7fbfd; }
.stats-level-tab.is-active {
  background: #fff;
  color: #0a658f;
  border-color: #a7cfe5;
  box-shadow: inset 0 2px #1880b5;
}
.statistics .stats-level-button,
.statistics .stats-level-button:hover:not(:disabled) {
  flex: 1;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 3px 6px;
  min-width: 0;
  min-height: 41px;
  padding: 6px 10px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  text-align: start;
  font-weight: 660;
}
.stats-level-button .mf-icon { width: 20px; height: 20px; }
.stats-level-label { min-width: 0; }
.stats-level-selection {
  display: inline-flex;
  align-items: center;
  flex: none;
  padding-inline-start: 6px;
  margin-inline-end: 5px;
  border-radius: 5px;
  background: #096da5;
  color: white;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.stats-level-selection[hidden] { display: none; }
.statistics .stats-clear-selection {
  min-height: 24px;
  min-width: 23px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  color: inherit;
  background: transparent;
}
.statistics .stats-clear-selection:hover:not(:disabled) { background: #075986; }
.stats-clear-selection .mf-icon { width: 12px; height: 12px; }
.stats-search-row {
  position: relative;
  margin: 2px 14px 10px;
  border: 1px solid #b6c5d0;
  border-radius: 7px;
  background: #fff;
}
.stats-search-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 38px;
  padding: 3px 8px;
}
.stats-search-content > .mf-icon { flex: none; color: #637989; }
.stats-search-content:has(.stats-search input:focus) { outline: 2px solid #0877cb; border-radius: inherit; }
.stats-search-row .stats-search { flex: 1 1 160px; width: auto; min-width: 0; border: 0; background: transparent; padding: 0 3px; cursor: text; }
.stats-search-row .stats-search:focus-within { outline: 0; }
.stats-search-row .stats-search input { min-height: 30px; }
.stats-search .icon-down { width: 12px; height: 12px; margin-inline: 4px; }
.stats-search-row:has(.stats-filter-popup:not([hidden])) .icon-down { rotate: 180deg; }
.stats-applied-filter {
  display: inline-flex;
  align-items: center;
  max-width: min(100%, 395px);
  min-width: 0;
  border: 1px solid #cfdee8;
  border-radius: 5px;
  background: #eef4f8;
}
.stats-search-row .stats-applied-filter-label {
  display: block;
  min-width: 0;
  min-height: 27px;
  overflow: hidden;
  padding: 4px 7px;
  background: transparent;
  border: 0;
  border-radius: 4px 0 0 4px;
  font-size: 13px;
  text-align: start;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stats-search-row .stats-applied-filter-label strong { font-weight: 700; }
.stats-search-row :is(.stats-chip-remove, .stats-search-clear), .stats-filter-token button {
  flex: none;
  min-width: 26px;
  min-height: 26px;
  padding: 2px 5px;
  border: 0;
  border-radius: 4px;
  background: transparent;
}
.stats-search-row .stats-search-clear { margin-inline-start: auto; }
.stats-search-row :is(button.stats-applied-filter-label, .stats-chip-remove, .stats-search-clear):hover,
.stats-filter-token button:hover { background: #dcebf3; }
.stats-search-row .stats-chip-remove .mf-icon, .stats-filter-token button .mf-icon { width: 12px; height: 12px; }
.stats-search-clear {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.stats-filter-popup {
  position: absolute;
  z-index: 7;
  inset: calc(100% + 7px) auto auto 0;
  display: flex;
  flex-direction: column;
  width: min(355px, 100%);
  max-height: min(65dvh, 480px);
  overflow: hidden;
  border: 1px solid var(--stats-border);
  border-radius: 9px;
  background: var(--stats-panel);
  box-shadow: 0 8px 24px #20374729;
}
.stats-filter-popup[hidden] { display: none; }
.stats-filter-popup[data-editor] { width: min(810px, 100%); }
.stats-filter-popup.is-above { inset-block: auto calc(100% + 7px); }
.stats-filter-popup-head {
  display: flex;
  align-items: center;
  flex: none;
  gap: 6px;
  padding: 6px 9px;
  background: #f3f7fa;
  border-bottom: 1px solid #dce6ed;
}
.stats-filter-popup-head h2 { flex: 1; min-width: 0; font-size: 14px; }
.stats-filter-popup-head button { min-height: 30px; min-width: 30px; padding: 3px 5px; border: 0; background: transparent; }
.stats-filter-popup-head button:hover { background: #e4eef5; }
.stats-filter-popup-head button .mf-icon { width: 13px; height: 13px; }
.stats-filter-popup-body { padding: 9px; min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.stats-filter-popup[data-editor] .stats-filter-popup-body { padding: 12px; }
.stats-filter-popup-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #e3eaef;
  padding-top: 10px;
}
.stats-filter-preview { color: var(--quiet); font-size: 13px; }
.stats-filter-preview[data-empty="true"] { color: #99521c; }
.stats-filter-buttons { display: flex; gap: 7px; margin-inline-start: auto; }
.stats-filter-buttons button { min-height: 35px; padding-inline: 12px; }
.statistics .stats-filter-buttons .primary { background: var(--stats-blue); border-color: var(--stats-blue); }
.statistics .stats-filter-buttons .primary:hover:not(:disabled) { background: #075e91; border-color: #075e91; }
.stats-filter-buttons .primary:disabled { cursor: default; }
.stats-filter-scope { display: flex; flex-wrap: wrap; gap: 5px; }
.stats-filter-scope select[data-filter] { min-height: 32px; }
.stats-table-actions { flex-wrap: wrap; justify-content: end; margin-block-end: 5px; margin-inline-start: auto; }
.stats-feedback { font-size: 12px; color: var(--quiet); background: #f6fafc; border-top: 1px solid #e5edf2; padding: 7px 14px; }
.stats-scroll { max-width: 100%; max-height: max(290px, calc(100dvh - 385px)); overflow: auto; border-top: 1px solid var(--stats-border); scrollbar-gutter: stable; }
.stats-scroll table { border-collapse: separate; border-spacing: 0; min-width: 100%; table-layout: auto; font-size: 13px; }
.stats-scroll table.stats-sized { min-width: 0; table-layout: fixed; }
.stats-scroll .stats-selection-col { width: 38px; }
.stats-scroll thead { position: sticky; top: 0; z-index: 3; }
.stats-scroll th { position: relative; min-width: 48px; background: #edf4f8; border-top: 0; border-right: 1px solid #dde7ed; padding: 0; }
.stats-scroll th:last-child { border-right: 0; }
.stats-scroll :is(th, td) { border-bottom: 1px solid #e2ebf1; color: var(--ink); }
.stats-scroll td { border-top: 0; padding: 8px 11px; position: relative; vertical-align: middle; }
.stats-scroll .stats-sized td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-scroll td small { display: block; font-size: 11px; color: var(--quiet); }
.stats-sized td > small,
.stats-sized .stats-delivery-status :is(.mf-badge, small),
.statistics .stats-sized .stats-object-label :is(.stats-row-name, .meta-id),
.stats-sized .stats-object-label > strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stats-scroll td.stats-numeric { text-align: right; }
.stats-scroll .stats-ads-column { min-width: 112px; text-align: center; }
.stats-scroll td.stats-ads-column { padding-inline: 5px; }
.stats-scroll .stats-sized .stats-ads-column { min-width: 0; }
.stats-ad-counts {
  --ads-active: #087a4a;
  --ads-rejected: #bd192f;
  --ads-paused: #946500;
  display: inline-block;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  white-space: nowrap;
}
.stats-ad-count-active { color: var(--ads-active); }
.stats-ad-count-rejected { color: var(--ads-rejected); }
.stats-ad-count-paused { color: var(--ads-paused); }
.stats-ad-count.is-zero, .stats-ad-count-separator { color: #657682; }
.stats-ad-count-separator { margin-inline: 4px; }
.stats-delivery-status .mf-badge {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
  padding-block: 2px;
}
.stats-delivery-status .mf-badge.pending { color: #765000; background: #fff0c6; }
.stats-scroll .stats-delivery-status small { margin-top: 3px; overflow-wrap: anywhere; }
.stats-scroll :is(td, th):nth-child(2) {
  position: sticky;
  left: 38px;
  z-index: 1;
  border-right: 1px solid #dfe9ee;
  min-width: clamp(180px, 22vw, 315px);
}
.stats-scroll .stats-sized :is(td, th):nth-child(2) { min-width: 0; }
.stats-scroll th:nth-child(2) { z-index: 3; }
.stats-scroll tbody tr.stats-selected { --row-bg: #dceefa; }
.stats-scroll td { background: var(--row-bg); }
.stats-scroll :is(th, td).stats-selection { position: sticky; z-index: 2; left: 0; width: 38px; min-width: 38px; padding: 4px 8px; text-align: center; }
.stats-scroll th.stats-selection { z-index: 4; }
.statistics input[type="checkbox"] { min-height: 0; width: 15px; height: 15px; margin: 0; accent-color: var(--stats-blue); cursor: pointer; }
.stats-scroll .stats-sort {
  min-height: 38px;
  display: flex;
  align-items: center;
  width: 100%;
  gap: 4px;
  justify-content: space-between;
  border: 0;
  border-radius: 0;
  color: #192a33;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  padding: 6px 10px 6px 7px;
  background: transparent;
}
.stats-sort-label { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: start; white-space: normal; }
.stats-sized .stats-sort-label { white-space: nowrap; }
.stats-scroll .stats-ads-column .stats-sort { justify-content: center; gap: 2px; padding-inline: 4px 9px; }
.stats-ads-column .stats-sort-label { text-align: center; }
.stats-column-resizer {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  z-index: 2;
  width: 9px;
  cursor: col-resize;
  touch-action: none;
  user-select: none;
}
.stats-column-resizer:is(:hover, :focus-visible)::after,
.is-resizing-columns .stats-column-resizer:focus::after {
  content: '';
  position: absolute;
  inset-block: 5px;
  inset-inline-end: 1px;
  width: 2px;
  border-radius: 2px;
  background: var(--stats-blue);
}
.stats-column-resizer:focus-visible { outline: 2px solid #087bec; outline-offset: -2px; }
.is-resizing-columns .stats-scroll { cursor: col-resize; user-select: none; }
.stats-scroll .stats-sort:hover { background: #e0edf5; }
.stats-sort[data-stat-move] { cursor: grab; touch-action: pan-y; user-select: none; }
.is-moving-columns .stats-scroll, .is-moving-columns .stats-sort { cursor: grabbing; user-select: none; }
.is-moving-columns .stats-scroll tr > :nth-child(n + 3) {
  translate: var(--stats-column-shift, 0px) 0;
  transition: translate 150ms cubic-bezier(.2, .7, .3, 1);
}
.stats-scroll :is(th, td).stats-moving-source { background: #deedf7; }
.stats-column-drag-label {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 8;
  max-width: calc(100vw - 16px);
  padding: 5px 9px;
  border: 1px solid #93bed8;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 3px 12px #20445e24;
  color: #095c87;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}
.stats-scroll th[data-drop-edge="before"] { box-shadow: inset 3px 0 var(--stats-blue); }
.stats-scroll th[data-drop-edge="after"] { box-shadow: inset -3px 0 var(--stats-blue); }
.stats-scroll [aria-sort] .stats-sort { color: #0874b8; }
.stats-sort::after { content: '↕'; flex: none; width: 9px; font-size: 13px; text-align: center; }
[aria-sort="descending"] .stats-sort::after { content: '↓'; }
[aria-sort="ascending"] .stats-sort::after { content: '↑'; }
[data-stat-selection-bar] { display: contents; }
.stats-selection-bar {
  position: fixed;
  z-index: 8;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  translate: -50% 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  width: max-content;
  max-width: calc(100vw - 24px);
  padding: 6px;
  border: 1px solid #b6d2e3;
  border-radius: 12px;
  background: #f7fbfe;
  box-shadow: 0 6px 24px #243d5640;
}
.stats-selection-total {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 7px;
  color: #174d69;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.stats-selection-total strong {
  display: grid;
  place-items: center;
  min-width: 24px;
  min-height: 24px;
  padding-inline: 4px;
  border-radius: 20px;
  background: #096da5;
  color: white;
  font-variant-numeric: tabular-nums;
}
.stats-selection-actions { display: flex; flex-wrap: wrap; gap: 2px; padding-inline-start: 4px; border-inline-start: 1px solid #cfdce4; }
.stats-selection-bar :is(.stats-selection-action, .stats-selection-dismiss) {
  min-height: 32px;
  padding: 3px 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #175678;
  font-size: 13px;
  white-space: nowrap;
}
.stats-selection-bar [data-id="pause"] { color: #835200; }
.stats-selection-bar [data-id="start"] { color: #086747; }
.stats-selection-bar [data-id="delete"] { color: #a41625; }
.stats-selection-bar button:hover:not(:disabled) { background: #e5f1f9; border-color: #c3deed; }
.stats-selection-bar [data-id="delete"]:hover:not(:disabled) { background: #fce8e9; border-color: #ebbec5; }
.stats-selection-bar .mf-icon { width: 15px; height: 15px; }
.stats-selection-bar button:disabled { opacity: .45; }
@media (max-width: 720px) {
  .statistics { padding-block-end: 102px; }
}
.stats-object {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: min(390px, 32vw);
  min-width: 118px;
}
.stats-sized .stats-object { min-width: 0; max-width: none; }
.stats-object-label { display: block; flex: 1; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.statistics .stats-row-name {
  background: transparent;
  border: 0;
  color: #086a9e;
  min-height: 0;
  padding: 0;
  text-align: left;
  line-height: 1.35;
  justify-content: start;
}
.statistics .stats-row-name:hover { text-decoration: underline; }
.statistics .stats-sized .stats-object-label :is(.stats-row-name, .meta-id),
.stats-sized .stats-object-label > strong { display: block; }
.statistics .stats-row-menu { padding: 0 4px; border: 0; background: transparent; min-width: 23px; min-height: 24px; }
.statistics .stats-row-menu:hover { background: #e0eef6; color: #085e8a; }
.statistics .stats-rename { min-width: 22px; min-height: 24px; padding: 3px; border: 0; background: transparent; color: #47677b; }
.stats-rename .mf-icon { width: 13px; height: 13px; }
.statistics .stats-rename:hover { color: #07597f; background: #e0eef6; }
.stats-inline-editor { min-width: 0; }
.stats-inline-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; }
.stats-inline-editor small { white-space: normal; overflow-wrap: anywhere; }
.stats-inline-editor small.stats-inline-error { color: #a02435; }
.statistics .stats-inline-controls input { flex: 1 1 38px; width: 100%; min-width: 0; min-height: 25px; padding: 2px 4px; font: inherit; }
.statistics .stats-inline-controls button { padding: 0; min-width: 22px; min-height: 25px; }
.stats-inline-controls .mf-icon { width: 14px; height: 14px; }
.statistics .stats-inline-save { color: #096087; background: #e4f4fc; border-color: #a9cfe1; }
.statistics .stats-inline-save:hover { background: #cdeaf8; }
.statistics .stats-budget-edit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-height: 22px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}
.stats-budget-amount { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-budget-edit .mf-icon { flex: none; width: 13px; height: 13px; color: #47677b; }
.statistics .stats-budget-edit:hover:not(:disabled) { color: #07597f; background: #e5f1f8; }
.stats-budget-popup {
  position: fixed;
  z-index: 7;
  width: min(234px, calc(100vw - 16px));
  max-height: calc(100dvh - 16px);
  overflow: auto;
  padding: 10px;
  border: 1px solid #bacdd9;
  border-radius: 8px;
  background: var(--stats-panel);
  box-shadow: 0 6px 20px #20374729;
}
.stats-budget-popup:focus { outline: none; }
.stats-budget-popup-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 7px;
  font-size: 13px;
}
.stats-budget-popup-heading span { color: var(--quiet); font-size: 11px; }
.stats-budget-popup .stats-inline-controls { flex-wrap: nowrap; gap: 5px; }
.statistics .stats-budget-popup .stats-inline-controls input {
  min-height: 32px;
  padding-inline: 7px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.statistics .stats-budget-popup .stats-inline-controls button { flex: 0 0 32px; min-height: 32px; }
.stats-budget-popup small { display: block; color: var(--quiet); font-size: 12px; }
.stats-budget-popup .stats-inline-controls small { flex: 1; }
.stats-budget-popup form > small { margin-top: 6px; }
.statistics .stats-delivery-switch {
  display: inline-block;
  position: relative;
  flex: 0 0 32px;
  min-width: 32px;
  min-height: 19px;
  height: 19px;
  margin-inline-end: 3px;
  padding: 0;
  border: 1px solid #acbbc6;
  border-radius: 99px;
  background: #fff;
  color: #293d49;
}
.stats-delivery-switch::before {
  content: '';
  position: absolute;
  inset-block-start: 2px;
  inset-inline-start: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: currentColor;
  transition: translate 140ms ease;
}
.statistics .stats-delivery-switch[aria-checked="true"] { background: #e1eff9; border-color: #a7c7dd; color: #0875b1; }
.statistics .stats-delivery-switch:hover:not(:disabled) { border-color: currentColor; }
.stats-delivery-switch[aria-checked="true"]::before { translate: 13px; }
.stats-change-form p { margin: 0; }
.stats-change-form .actions { margin-top: 3px; flex-wrap: wrap; }
.stats-selection-review { padding-left: 1.25rem; margin: 0; overflow-wrap: anywhere; }
.stats-selection-review li + li { margin-top: 8px; }
.stats-selection-review small { display: block; color: var(--quiet); }
.stats-selection-fields { min-width: 0; display: grid; gap: 8px; border: 1px solid #d9e5ed; border-radius: 7px; padding: 8px; }
.stats-selection-fields label { display: grid; gap: 4px; }
.stats-selection-fields input { width: 100%; }
.stats-selection-failures { display: grid; gap: 7px; padding-left: 1.25rem; overflow-wrap: anywhere; }
.stats-change-form .stats-selection-copy { display: flex; align-items: center; gap: 8px; }
.stats-change-form .stats-selection-copy input { margin: 0; min-height: 0; width: 16px; height: 16px; }
.stats-change-form .stats-selection-delete { background: #a41625; border-color: #a41625; }
.stats-change-form .stats-selection-delete:hover:not(:disabled) { background: #891322; border-color: #891322; }
.stats-change-submit[aria-busy="true"]::before {
  content: '';
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: stats-spin 850ms linear infinite;
}
.stats-scroll .stats-empty td { padding: 34px 15px; color: var(--quiet); height: 160px; text-align: center; white-space: normal; }
.stats-empty td span { position: sticky; left: 15px; display: inline-block; }
.stats-footer { padding: 8px 14px; justify-content: space-between; }
.stats-footer > div { display: flex; gap: 6px; }
.stats-options { position: sticky; top: calc(var(--accounts-nav-height) + 10px); overflow: hidden; }
.stats-options-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: #eef6fa;
  border-bottom: 1px solid var(--stats-border);
}
.stats-options h2 { font-size: 15px; }
.stats-options-head button { min-width: 30px; padding: 5px; }
.stats-options-body { padding: 11px; max-height: min(65dvh, 550px); overflow: auto; }
.stats-options-body > button { margin-bottom: 10px; }
.stats-options-body fieldset { border: 0; padding: 0; margin: 0 0 12px; }
.stats-options-body legend { color: var(--quiet); font-size: 12px; font-weight: 680; border-bottom: 1px solid #e3eaef; width: 100%; padding: 0 0 5px; }
.stats-column-option, .stats-preset, .stats-check, .stats-column-order { display: flex; align-items: center; gap: 6px; }
.stats-column-option { justify-content: space-between; min-height: 32px; }
.stats-column-order button { min-width: 25px; min-height: 25px; padding: 0 4px; }
.stats-check { font-size: 13px; padding: 5px 0; cursor: pointer; }
.stats-check span { min-width: 0; overflow-wrap: anywhere; }
.stats-check input { flex: none; }
.stats-options-form, .stats-filter-list { display: grid; gap: 8px; }
:is(.stats-options-form, .stats-filter-list) label { display: grid; gap: 4px; font-size: 12px; }
:is(.stats-options, .stats-filter-list) :is(input:not([type="checkbox"]), select) { width: 100%; min-width: 0; }
.stats-filter-values { max-height: 170px; overflow: auto; }
.stats-filter-fields { max-height: 235px; overflow: auto; }
.stats-filter-fields button { width: 100%; justify-content: start; border: 0; min-height: 32px; padding: 4px 7px; }
.stats-filter-fields button:hover { background: #eaf3f8; }
.stats-filter-fields .stats-filter-active { color: #095c87; background: #eaf3f8; }
.stats-filter-list .stats-filter-search {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-inline: 7px;
  border: 1px solid #beccd6;
  border-radius: 6px;
  color: var(--quiet);
}
.stats-filter-search:focus-within { border-color: var(--stats-blue); box-shadow: 0 0 0 1px var(--stats-blue); }
.stats-filter-search .mf-icon { width: 14px; height: 14px; flex: none; }
.stats-filter-search input { min-height: 30px; border: 0; padding: 2px 0; background: transparent; }
.statistics .stats-filter-search input:focus-visible { outline: 0; }
.stats-filter-list .stats-check { display: flex; gap: 7px; font-size: 13px; }
.stats-filter-editor-fields > .stats-check, .stats-filter-condition-value > .stats-check {
  margin-top: 4px;
  border-bottom: 1px solid #e3eaef;
}
.stats-filter-editor { display: grid; gap: 11px; }
.stats-filter-editor-fields { min-width: 0; }
.stats-filter-editor.has-name-field .stats-filter-editor-fields {
  display: grid;
  grid-template-columns: minmax(155px, 30%) minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}
.stats-filter-list [data-stat-filter-object], .stats-filter-list .stats-filter-condition select[data-filter] {
  min-height: 36px;
  max-width: none;
  padding-block: 4px;
}
.stats-text-filter, .stats-filter-condition { display: grid; gap: 7px; min-width: 0; }
.stats-filter-condition { grid-template-columns: minmax(115px, 32%) minmax(0, 1fr); align-items: start; }
.stats-filter-condition.has-list .stats-filter-condition-value { display: grid; }
.stats-filter-term-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 2px 6px;
  border: 1px solid #beccd6;
  border-radius: 6px;
  background: #fff;
}
.stats-filter-term-box:focus-within { border-color: var(--stats-blue); box-shadow: 0 0 0 1px var(--stats-blue); }
.stats-filter-list .stats-filter-term-box input { width: auto; flex: 1 1 100px; min-height: 30px; padding: 3px 1px; border: 0; background: transparent; }
.statistics .stats-filter-term-box input:focus-visible { outline: 0; }
.stats-filter-token { display: inline-flex; align-items: center; min-width: 0; max-width: 100%; padding-inline-start: 5px; border-radius: 4px; background: #edf3f7; }
.stats-filter-token > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 670px) {
  .stats-filter-editor.has-name-field .stats-filter-editor-fields, .stats-filter-condition { grid-template-columns: minmax(0, 1fr); }
}
.stats-filter-join { display: flex; justify-content: center; gap: 16px; padding-block: 1px; }
.stats-filter-list .stats-filter-join label { display: flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer; }
.stats-filter-list .stats-filter-join input[type="radio"] {
  width: 14px;
  height: 14px;
  min-height: 0;
  margin: 0;
  accent-color: var(--stats-blue);
}
.stats-filter-range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.stats-filter-range input { min-height: 32px; padding: 3px 5px; }
.stats-preset { margin-top: 8px; }
.stats-preset > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.stats-preset > button { min-width: 29px; padding: 3px; }
@media (max-width: 1100px) {
  .stats-workarea:has(.stats-options) { grid-template-columns: minmax(0, 1fr) 250px; }
}
@media (max-width: 850px) {
  .stats-date { margin-inline-start: auto; }
  .stats-workarea:has(.stats-options) { grid-template-columns: minmax(0, 1fr); }
  .stats-options { grid-row: 1; position: static; }
  .stats-options-body { max-height: 260px; }
  .stats-table-intro .workspace-toolbar { justify-content: flex-start; flex-basis: 100%; }
  .stats-object { max-width: 210px; }
}
@media (661px <= width <= 940px) {
  .stats-cards { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .stats-card { grid-column: span 2; }
  .stats-card:nth-child(-n+2) { grid-column: span 3; }
}
@media (max-width: 660px) {
  .stats-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-card:first-child { grid-column: span 2; }
  .stats-date-content { grid-template-columns: 155px minmax(0, 1fr); }
  .stats-calendar-months { grid-template-columns: minmax(0, 1fr); }
  .stats-calendar-month:first-child { display: none; }
}
@media (max-width: 600px) {
  .stats-scope .stats-timezone { margin-inline-start: 0; }
  .statistics .stats-segment { flex-wrap: wrap; }
  .stats-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); flex-basis: 100%; gap: 4px; }
  .stats-level-tab { flex-direction: column; align-items: stretch; }
  .statistics .stats-level-button,
  .statistics .stats-level-button:hover:not(:disabled) {
    flex: 1 1 auto;
    justify-content: center;
    gap: 4px;
    padding-inline: 6px;
    font-size: 12px;
    line-height: 1.25;
    text-align: center;
  }
  .stats-level-button .mf-icon { width: 15px; height: 15px; }
  .stats-level-selection { align-self: center; margin: 0 0 4px; }
  .stats-scroll .stats-sized :is(td, th):nth-child(2) { position: relative; left: auto; }
}
@media (max-width: 480px) {
  .stats-date-content { grid-template-columns: minmax(0, 1fr); }
  .stats-date-content fieldset {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-inline-end: 0;
    border-bottom: 1px solid #e0e9ef;
  }
  .stats-date-footer { flex-wrap: wrap; }
  .stats-date-footer p:not(:empty) { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .statistics button[aria-busy="true"] .mf-icon, .stats-change-submit[aria-busy="true"]::before { animation: none; }
  .stats-delivery-switch::before, .is-moving-columns .stats-scroll tr > :nth-child(n + 3) { transition: none; }
}
