.analytics-root {
  --inbound: #0f9bb8;
  --outbound: #2463eb;
  --forwarded: #8854d0;
  min-width: 0;
}

.analytics-root .page-head {
  margin-bottom: 16px;
}

.analytics-toolbar {
  display: flex;
  align-items: end;
  gap: 14px;
  padding: 14px;
  flex-wrap: wrap;
}

.analytics-toolbar label {
  display: grid;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #56657a;
}

.analytics-toolbar input,.analytics-toolbar select {
  min-height: 35px;
  border: 1px solid #d7e0eb;
  border-radius: 6px;
  padding: 7px 10px;
  background: #fff;
  max-width: 100%;
}

.analytics-toolbar label:nth-child(3) {
  flex: 1;
  min-width: 180px;
}

.analytics-status {
  font-size: 12px;
  color: #16754c;
  white-space: nowrap;
}

.analytics-status:before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  background: currentColor;
  border-radius: 50%;
  margin-right: 7px;
}

.analytics-root .is-warning {
  color: #a66b12;
}

.analytics-coverage {
  font-size: 11px;
  color: #68758b;
  line-height: 1.5;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #e1e9f2;
  border-radius: 9px;
  background: #f8fbff;
}

.analytics-coverage.is-warning {background: #fff8ea;border-color: #f1dba8;color: #8a5b08;}

.analytics-metrics {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
  margin: 0;
}

.analytics-summary {
  display: grid;
  grid-template-columns: minmax(0,1.25fr) minmax(300px,1fr);
  gap: 14px;
  align-items: stretch;
}

.analytics-metric {
  padding: 16px 18px;
  background: linear-gradient(160deg,#fff,#f7fbff);
  border: 1px solid #e1e7ef;
  border-radius: 14px;
  min-width: 0;
}

.analytics-metric>span {
  display: block;
  font-size: 11px;
  color: #66738b;
  font-weight: 600;
}

.analytics-metric>strong {
  display: block;
  font-size: clamp(21px,2vw,29px);
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  margin: 8px 0 5px;
  letter-spacing: -.5px;
  overflow-wrap: anywhere;
  color: #203149;
}

.analytics-metric>small {
  font-size: 11px;
  color: #8190a5;
}

.analytics-direction-mix {
  height: 100%;
}

.analytics-direction-body {
  padding: 18px;
}

.analytics-direction-stack {
  display: flex;
  height: 20px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef6;
  margin-bottom: 12px;
}

.analytics-direction-stack span {
  height: 100%;
  transition: width .25s ease;
}

.analytics-direction-list {
  display: grid;
  gap: 10px;
}

.analytics-direction-list>div {
  display: grid;
  grid-template-columns: 9px 1fr auto auto;
  align-items: center;
  gap: 9px;
  font-size: 12px;
}

.analytics-direction-list i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

.analytics-direction-list strong {
  font-variant-numeric: tabular-nums;
}

.analytics-direction-list small {
  width: 84px;
  color: #66758b;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.analytics-chart {
  margin: 14px 0;
}

.analytics-chart .panel-head select {
  padding: 6px;
  border: 1px solid #d9e2ec;
  border-radius: 6px;
  background: white;
}

.analytics-chart-wrap {
  position: relative;
  padding: 0 6px;
}

.analytics-chart canvas {
  display: block;
  width: 100%;
  height: 260px;
  outline-offset: -3px;
}

.analytics-chart-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding: 0 18px 8px;
}

.analytics-chart-legend button {
  font-size: 11px;
  border: 0;
  background: transparent;
  color: #546278;
  cursor: pointer;
  padding: 4px;
}

.analytics-chart-legend button:before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 3px;
  background: var(--series-color);
  margin: 0 6px 3px 0;
}

.analytics-chart-legend button[aria-pressed=false] {
  opacity: .4;
  text-decoration: line-through;
}

.analytics-tooltip {
  position: absolute;
  top: 5px;
  left: 84px;
  right: 18px;
  background: #172a43ee;
  color: #fff;
  font-size: 11px;
  border-radius: 5px;
  padding: 8px;
  pointer-events: none;
  white-space: normal;
  z-index: 1;
}

.analytics-chart-stats {
  padding: 12px 18px;
  border-top: 1px solid #e9edf3;
  font-size: 11px;
  color: #66758b;
  white-space: pre-wrap;
  line-height: 1.7;
}

.analytics-kernel {
  padding-bottom: 12px;
  margin: 14px 0;
}

.analytics-kernel .analytics-metrics {
  grid-template-columns: repeat(5,minmax(0,1fr));
  padding: 0 14px;
  margin: 0;
}

.analytics-kernel #analyticsCapture {
  font-size: 11px;
  margin: 12px 16px 0;
  color: #61718a;
}

.analytics-distributions {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
}

.analytics-distribution .panel-head {
  padding: 12px;
  gap: 8px;
  font-size: 12px;
}

.analytics-distribution small {
  font-size: 10px;
  color: #7b889b;
}

.distribution-body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  min-height: 126px;
}

.distribution-ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  position: relative;
  background: #edf1f6;
}

.distribution-ring:before {
  content: '';
  position: absolute;
  inset: 11px;
  background: #fff;
  border-radius: 50%;
}

.distribution-ring strong {
  position: relative;
  z-index: 1;
  font-size: 10px;
  color: #4a5c73;
  text-align: center;
}

.distribution-legend {
  min-width: 0;
  flex: 1;
}

.distribution-legend>div {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  margin: 9px 0;
}

.distribution-legend i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.distribution-legend span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.distribution-legend strong {
  font-weight: 500;
}

.analytics-top-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
}

.analytics-flow-grid {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 14px;
}

.analytics-top-grid>.analytics-top:last-child {
  grid-column: 1 / -1;
}

.analytics-top .panel-head {
  padding: 12px;
  font-size: 12px;
  gap: 8px;
}

.analytics-top .data-table {
  width: 100%;
  table-layout: fixed;
}

.analytics-top .data-table th,.analytics-top .data-table td {
  padding: 9px 11px;
  font-size: 11px;
}

.analytics-top th:first-child {
  width: 55%;
}

.analytics-top-count-only th:first-child {width: 68%;}
.analytics-top-count-only th:last-child,.analytics-top-count-only tbody tr:not([data-empty]) td:last-child {display: none;}
.analytics-flow-grid .analytics-top th:first-child {width: 70%;}

.analytics-top .data-table td {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.analytics-top .data-table td:first-child {
  font-family: ui-monospace,monospace;
  color: #344861;
}

.analytics-top .analytics-empty-row {text-align: center;color: #718199;padding: 35px 10px;font-family: inherit;}

.analytics-top .table-shell {
  min-height: 205px;
  overflow-x: auto;
}

.analytics-top td:nth-child(2) {
  background-image: linear-gradient(to right,#8db8f1 var(--rank-percent,0%),#edf2f8 var(--rank-percent,0%));
  background-size: calc(100% - 22px) 6px;
  background-repeat: no-repeat;
  background-position: 11px calc(100% - 4px);
  font-weight: 750;
  color: #203f68;
}

.analytics-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid #edf1f6;
  font-size: 10px;
  color: #7c889b;
}

.analytics-pagination .btn {
  padding: 3px 9px;
  min-height: 24px;
}

.analytics-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 12px;
}

.analytics-section-heading h2 {
  font-size: 16px;
  margin: 0;
}

.analytics-section-heading span {
  font-size: 11px;
  color: #7a889c;
}

.application-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: middle;
  margin-right: 7px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.analytics-method {
  padding: 12px 14px;
  border: 1px solid #e1e8f2;
  background: #f8fbff;
  border-radius: 10px;
  color: #65748b;
  font-size: 11px;
  line-height: 1.6;
}

.analytics-method summary {
  cursor: pointer;
  font-weight: 700;
}

.analytics-method p {
  margin: 8px 0 0;
}

.analytics-root button:focus-visible,.analytics-root input:focus-visible,.analytics-root select:focus-visible {
  outline: 2px solid #2463eb;
  outline-offset: 2px;
}

@media(max-width:1400px) {
  .analytics-summary {grid-template-columns: 1fr;}
}

@media(max-width:850px) {
  .analytics-top-grid {grid-template-columns: 1fr;}
  .analytics-kernel .analytics-metrics {grid-template-columns: repeat(2,minmax(0,1fr));}
}

@media(max-width:560px) {
  .analytics-metrics {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .analytics-distributions {
    grid-template-columns: 1fr;
  }
  .analytics-toolbar label {
    width: 100%;
  }
  .analytics-section-heading {
    align-items: start;
    flex-direction: column;
    gap: 5px;
  }
  .analytics-chart canvas {
    height: 230px;
  }
  .analytics-root .page-head {
    align-items: start;
    gap: 8px;
  }
  .analytics-metric strong {
    font-size: 18px;
  }
}
