:root {
  --screen-bg: #08111f;
  --panel-bg: #101b2b;
  --panel-bg-strong: #152235;
  --line: #26384e;
  --line-soft: rgba(85, 111, 143, 0.28);
  --cyan: #6f9ff8;
  --cyan-strong: #5b8def;
  --blue: #5b8def;
  --green: #35c59a;
  --orange: #e5a348;
  --violet: #9a84e8;
  --pink: #e66f83;
  --text: #f1f5fb;
  --muted: #a9b8ca;
  --quiet: #7f91a8;
}

body {
  color: var(--text);
  background: var(--screen-bg);
}

button,
select {
  color: #d9e3f0;
  border-color: #344a64;
  border-radius: 6px;
  background: #152337;
}

button:hover,
button.active {
  color: #fff;
  border-color: #6f9ff8;
  background: #365f9c;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline-color: #9cbcff;
}

.screen-shell {
  background: #08111f;
}

.screen-canvas {
  --frame-x: clamp(14px, 1.35vw, 34px);
  --frame-top: clamp(12px, 1.4dvh, 22px);
  --frame-bottom: clamp(14px, 1.6dvh, 26px);
  --header-h: clamp(58px, 6.6dvh, 84px);
  --grid-gap: clamp(8px, 0.7vw, 16px);
  --rail-left: clamp(300px, 19vw, 420px);
  --rail-right: clamp(320px, 20vw, 450px);
  --fs-title: clamp(26px, 2vw, 42px);
  --fs-panel: clamp(15px, 0.9vw, 19px);
  --fs-body: clamp(13px, 0.72vw, 16px);
  --fs-small: clamp(12px, 0.64vw, 14px);
  --fs-tiny: clamp(11px, 0.58vw, 13px);
  --fs-metric: clamp(20px, 1.35vw, 30px);
  background:
    radial-gradient(circle at 50% 45%, rgba(61, 93, 137, 0.12), transparent 44%),
    #08111f;
}

.screen-canvas::before,
.screen-frame {
  display: none;
}

.command-header {
  grid-template-columns:
    minmax(0, var(--rail-left))
    minmax(220px, 1fr)
    max-content;
  padding: 0;
  border-bottom: 1px solid #22344a;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: #35c59a;
  box-shadow: none;
}

.command-status b {
  color: #e5ecf5;
}

.command-title {
  display: grid;
  align-self: stretch;
  min-height: 0;
  place-items: center;
  overflow: hidden;
}

.command-title > div {
  box-sizing: border-box;
  display: grid;
  width: min(480px, 100%);
  height: 100%;
  min-width: 0;
  max-height: 100%;
  padding: clamp(2px, 0.35dvh, 4px) 32px;
  place-items: center;
}

.command-title > div::before,
.command-title > div::after {
  display: none;
}

.command-title h1 {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: clamp(22px, min(2vw, 3.6dvh), 42px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
  text-shadow: none;
}

.screen-controls {
  gap: 6px;
  min-width: max-content;
}

.screen-view-switch,
.screen-controls > button {
  flex: 0 0 auto;
}

.screen-controls button,
.screen-controls select,
.geo-actions button,
.geo-actions select {
  min-height: 30px;
  padding-inline: 10px;
  border-radius: 6px;
}

.period-switch {
  flex: 0 0 100px;
  min-width: 100px;
  gap: 4px;
}

.period-switch select {
  flex: 0 0 100px;
  width: 100px;
  height: 30px;
  min-height: 30px;
  padding-right: 28px;
  padding-left: 10px;
  color: #dbe5f2;
  border-color: #344a64;
  border-radius: 6px;
  background-color: #111e30;
}

.operations-column {
  gap: var(--grid-gap);
}

.operations-left {
  grid-template-rows: minmax(0, 1.04fr) minmax(0, 0.66fr) minmax(0, 0.92fr);
}

.operations-center {
  grid-template-rows: minmax(0, 1fr) clamp(206px, 24dvh, 252px);
}

.monitor-panel {
  border: 1px solid #26384e;
  border-radius: 12px;
  background: #101b2b;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.13);
}

.monitor-panel::before {
  display: none;
}

.panel-heading {
  min-height: clamp(38px, 4.2dvh, 48px);
  padding: 0 clamp(12px, 0.9vw, 18px);
  border-bottom: 1px solid #26384e;
}

.panel-heading::before,
.operations-right .panel-heading::before {
  background: #152235;
  opacity: 1;
  transform: none;
}

.panel-heading h2 {
  color: #eef3fa;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-weight: 600;
  letter-spacing: 0;
  text-shadow: none;
}

.panel-heading p,
.panel-heading > small {
  color: #91a5bb;
  letter-spacing: 0;
}

.overview-panel .panel-heading h2 {
  font-size: var(--fs-panel);
}

.overview-panel > .panel-heading {
  min-height: clamp(36px, 3.8dvh, 44px);
}

.metric-deck {
  gap: 0;
  padding: 0;
  background: transparent;
}

.metric-card {
  padding: 6px 11px;
  border: 0;
  border-right: 1px solid #26384e;
  border-bottom: 1px solid #26384e;
  background: transparent;
}

.overview-panel .metric-card {
  padding-block: 5px;
}

.metric-card:nth-child(2n) {
  border-right: 0;
}

.metric-card:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.metric-card::after {
  display: none;
}

.metric-card > span,
.metric-card p {
  color: #9bacc0;
  font-size: var(--fs-tiny);
  line-height: 1.25;
}

.metric-card > span {
  color: #b7c6d8;
  font-weight: 600;
}

.metric-card strong {
  color: #f0f4fa;
  text-shadow: none;
}

.metric-primary strong,
.metric-card.operating-result-card strong {
  color: #6f9ff8;
}

.metric-card.operating-result-card strong {
  font-size: clamp(14px, 0.95vw, 20px);
}

.metric-card #metricProfitMeta,
.metric-card #metricTokens {
  min-height: 2.4em;
  overflow: visible;
  line-height: 1.2;
  text-overflow: clip;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.conversion-bars,
.data-table,
.ranking-list,
.quality-grid {
  scrollbar-color: rgba(114, 137, 164, 0.55) transparent;
}

.conversion-row span,
.data-table-row,
.ranking-list,
.quality-item span {
  color: #c3cfdd;
}

.conversion-track,
.ranking-track,
.quality-track {
  background: #1b2b3f;
}

.conversion-track i,
.ranking-track i,
.quality-track i {
  background: #5b8def;
}

.conversion-bars > .consumer-top-row {
  grid-template-columns: 24px minmax(0, 1fr) minmax(156px, 1.25fr);
  gap: 8px;
  align-items: start;
  height: auto;
  min-height: 72px;
  padding: 8px 4px;
  box-sizing: border-box;
  overflow: visible;
  border-bottom-color: #26384e;
  border-radius: 6px;
}

.conversion-bars {
  grid-auto-rows: minmax(72px, max-content);
  align-content: start;
  gap: 0;
  padding: 5px 8px;
  overflow-x: hidden;
  overflow-y: auto;
}

.consumer-top-row > b {
  color: #8fb3f4;
  padding-top: 1px;
}

.consumer-top-identity,
.consumer-top-metrics {
  align-content: start;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
}

.consumer-top-identity {
  grid-template-rows: repeat(2, minmax(17px, auto));
}

.consumer-top-metrics {
  grid-template-rows: repeat(3, minmax(17px, auto));
}

.consumer-top-identity strong,
.consumer-top-identity small,
.consumer-top-metrics strong,
.consumer-top-metrics small {
  display: block;
  width: 100%;
  max-width: 100%;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.consumer-top-identity strong,
.consumer-top-metrics strong {
  color: #edf2f8;
}

.consumer-top-identity small,
.consumer-top-metrics small {
  color: #91a5bb;
}

.consumer-top-row:hover {
  background: #152235;
}

.high-value-users {
  padding-block: 5px 8px;
}

.high-value-user-row {
  display: grid;
  grid-template-columns: 24px minmax(72px, 0.7fr) minmax(156px, 1.3fr);
  gap: 7px;
  align-items: center;
  min-width: 0;
  min-height: 66px;
  padding: 6px 3px;
  cursor: pointer;
  border-bottom: 1px solid #26384e;
}

.high-value-user-row:last-child {
  border-bottom: 0;
}

.high-value-user-row > b {
  color: #8fb3f4;
  font-size: var(--fs-tiny);
  font-variant-numeric: tabular-nums;
}

.high-value-user-identity,
.high-value-user-metrics {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.high-value-user-identity strong,
.high-value-user-metrics strong {
  color: #edf2f8;
  font-size: var(--fs-small);
  line-height: 1.15;
}

.high-value-user-identity small,
.high-value-user-metrics small {
  color: #91a5bb;
  font-size: var(--fs-tiny);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.high-value-user-metrics {
  justify-items: end;
  text-align: right;
}

.high-value-user-metrics strong {
  color: #66d8b6;
}

.high-value-user-row:hover {
  background: #152235;
}

.high-value-user-row:focus-visible {
  outline: 2px solid #6f9ff8;
  outline-offset: -2px;
}

.map-panel {
  overflow: hidden;
  border: 1px solid #26384e;
  border-radius: 12px;
  background: #0d1827;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.16);
}

.map-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  min-height: clamp(42px, 4.6dvh, 54px);
  margin: 0;
  padding-inline: 16px;
  border-bottom-color: #26384e;
  background: #152235;
}

.map-heading::before {
  background: #152235;
}

.map-heading > div:first-child,
.map-heading > div:first-child > div {
  min-width: 0;
}

.map-heading p {
  max-width: none;
  overflow: visible;
  font-size: var(--fs-small);
  text-overflow: clip;
  white-space: nowrap;
}

.geo-drilldown {
  padding: 0;
}

.geo-drilldown::before,
.geo-drilldown::after {
  display: none;
}

.geo-breadcrumb {
  min-height: 30px;
  padding: 4px 16px;
  color: #91a5bb;
  border-bottom: 1px solid rgba(38, 56, 78, 0.76);
}

.geo-breadcrumb button {
  color: #8fb3f4;
}

.geo-breadcrumb button + button::before {
  margin-right: 7px;
  color: #60748c;
  content: "/";
  pointer-events: none;
}

.geo-breadcrumb button:hover,
.geo-breadcrumb button:focus-visible {
  color: #ffffff;
}

.geo-layout,
.geo-drilldown[data-level="china"] .geo-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.geo-drilldown[data-level="province"] .geo-layout,
.geo-drilldown[data-level="city"] .geo-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(250px, 29%, 320px);
  gap: 12px;
}

.geo-map-stage,
.geo-drilldown[data-level="china"] .geo-map-stage {
  width: 100%;
  height: 100%;
  place-self: stretch;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(71, 112, 165, 0.2), transparent 48%),
    linear-gradient(180deg, #0d1928, #0a1421);
}

.geo-map-stage::before {
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(83, 125, 179, 0.12), transparent 65%);
}

.geo-national-overview {
  position: absolute;
  z-index: 8;
  top: 14px;
  left: 14px;
  width: clamp(230px, 26%, 310px);
  padding: 10px 12px;
  pointer-events: none;
  border: 1px solid rgba(111, 159, 248, 0.34);
  border-radius: 10px;
  background: rgba(16, 27, 43, 0.9);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
}

.geo-national-overview[hidden],
.geo-consumption-charts[hidden],
.geo-heat-legend[hidden] {
  display: none;
}

.geo-national-overview header {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 7px;
  border-bottom: 1px solid #2a3e57;
}

.geo-national-overview header span {
  flex: 0 0 auto;
  color: #eef3fa;
  font-size: var(--fs-small);
  font-weight: 600;
  white-space: nowrap;
}

.geo-national-overview header small {
  min-width: 0;
  overflow: hidden;
  color: #89aef4;
  font-size: var(--fs-tiny);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-national-overview > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 10px;
  padding-top: 8px;
}

.geo-national-overview > div span {
  display: grid;
  gap: 2px;
  color: #91a5bb;
  font-size: var(--fs-tiny);
}

.geo-national-overview strong {
  color: #f2f6fb;
  font-size: var(--fs-body);
  font-variant-numeric: tabular-nums;
}

.geo-drilldown[data-level="china"] .geo-layout {
  grid-template-columns: minmax(0, 1fr) clamp(205px, 22%, 278px);
  gap: 12px;
}

.geo-consumption-charts {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  padding: 10px 11px;
  overflow: hidden;
  border: 1px solid rgba(111, 159, 248, 0.28);
  border-radius: 10px;
  background: rgba(16, 27, 43, 0.86);
}

.geo-consumption-charts > header {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid #2a3e57;
}

.geo-consumption-charts > header span {
  color: #eef3fa;
  font-size: var(--fs-small);
  font-weight: 600;
  white-space: nowrap;
}

.geo-consumption-charts > header small {
  color: #8fa3ba;
  font-size: var(--fs-tiny);
  line-height: 1.3;
  text-align: right;
}

.geo-consumption-groups {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  padding-top: 6px;
  overflow: hidden;
}

.geo-consumption-group {
  display: block;
  height: 100%;
  min-height: 0;
}

.geo-consumption-rows {
  display: block;
  height: 100%;
  min-height: 0;
  padding-right: 3px;
  overflow-x: hidden;
  overflow-y: auto;
  outline: none;
  scrollbar-gutter: stable;
}

.geo-consumption-rows:focus-visible {
  outline: 1px solid rgba(91, 141, 239, 0.62);
  outline-offset: -1px;
}

.geo-consumption-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-areas:
    "rank identity"
    "rank metrics";
  gap: 7px 9px;
  min-height: 76px;
  min-width: 0;
  padding: 11px 3px;
  border-bottom: 1px solid rgba(111, 137, 170, 0.34);
}

.geo-consumption-rank {
  display: block;
  grid-area: rank;
  align-self: stretch;
  padding: 2px 7px 0 0;
  color: #8fa3ba;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  border-right: 1px solid rgba(111, 137, 170, 0.3);
}

.geo-consumption-row:first-child .geo-consumption-rank {
  color: #e5b564;
}

.geo-consumption-identity {
  display: grid;
  grid-area: identity;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  min-width: 0;
}

.geo-consumption-identity strong,
.geo-consumption-identity small {
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
}

.geo-consumption-identity strong {
  color: #eff6ff;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
}

.geo-consumption-identity small {
  color: #7289a3;
  font-size: 11px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

.geo-consumption-metrics {
  display: grid;
  grid-area: metrics;
  gap: 4px;
  min-width: 0;
}

.geo-consumption-metric {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-width: 0;
  color: #9fb2c7;
  font-size: 12px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.geo-consumption-metric + .geo-consumption-metric {
  padding-top: 5px;
  border-top: 1px solid rgba(111, 137, 170, 0.24);
}

.geo-consumption-metric span,
.geo-consumption-metric strong {
  white-space: nowrap;
}

.geo-consumption-metric span {
  color: #8fa3ba;
}

.geo-consumption-metric strong {
  min-width: 0;
  overflow: visible;
  color: #edf2f8;
  font-size: inherit;
  font-weight: 700;
  text-align: right;
  text-overflow: clip;
}

.geo-consumption-empty {
  margin: 2px 0 0;
  color: #7289a3;
  font-size: var(--fs-tiny);
}

.geo-map-footer {
  position: absolute;
  z-index: 8;
  right: auto;
  bottom: 10px;
  left: 14px;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  width: max-content;
  max-width: calc(100% - 28px);
  min-width: 0;
  pointer-events: none;
}

.geo-map-footer .geo-heat-legend {
  position: static;
  flex: 0 1 auto;
  display: grid;
  grid-template-columns: auto minmax(82px, 118px) auto auto;
  gap: 7px;
  align-items: center;
  padding: 7px 10px;
  pointer-events: none;
  color: #9bacc0;
  font-size: var(--fs-tiny);
  border: 1px solid rgba(52, 74, 100, 0.9);
  border-radius: 8px;
  background: rgba(16, 27, 43, 0.9);
}

.geo-map-footer .geo-map-caption {
  position: static;
  z-index: auto;
  bottom: auto;
  left: auto;
  flex: 0 0 auto;
  max-width: none;
  transform: none;
}

.geo-heat-legend > span {
  color: #d9e3ef;
  font-weight: 600;
}

.geo-heat-legend > i {
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, #274665, #4a74a8, #6f9ff8);
}

.geo-map-mount,
.geo-drilldown[data-level="china"] .geo-map-mount {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: clamp(18px, 2.2vw, 42px) clamp(20px, 2.6vw, 54px) 46px;
}

.geo-drilldown[data-level="china"] .geo-map-mount {
  padding-right: clamp(14px, 1.6vw, 28px);
  padding-left: clamp(250px, 31%, 340px);
  transform: translateY(-8px);
}

.geo-map-mount svg,
.geo-drilldown[data-level="china"] .geo-map-mount svg {
  display: block !important;
  width: 100%;
  height: 100%;
  overflow: visible;
  shape-rendering: geometricPrecision;
  text-rendering: geometricPrecision;
}

.national-3d-map {
  filter: none !important;
  transform: none !important;
}

.geo-drilldown[data-level="china"] .geo-map-mount #fig-map-decoration,
.geo-drilldown[data-level="china"] .geo-map-mount .map-decoration,
.geo-drilldown[data-level="china"] .geo-map-mount .map-outline,
.geo-drilldown[data-level="china"] .geo-map-mount .legacy-map-decoration {
  display: initial !important;
  pointer-events: none;
  opacity: 0.5;
}

.geo-drilldown[data-level="china"] .geo-map-mount [data-province] {
  outline: none;
  opacity: 1 !important;
}

.geo-drilldown[data-level="china"] .geo-map-mount .province-shape,
.geo-drilldown[data-level="china"] .geo-map-mount .province-face {
  fill: var(--province-face, #2b4f74) !important;
  fill-opacity: 0.96 !important;
  stroke: #7598be !important;
  stroke-opacity: 0.9 !important;
  stroke-width: 1.2 !important;
  filter: none !important;
  pointer-events: all;
  transition:
    fill 150ms ease-out,
    stroke 150ms ease-out,
    filter 150ms ease-out;
}

.geo-drilldown[data-level="china"] .geo-map-mount .province-hit-geometry {
  pointer-events: all;
}

.geo-drilldown[data-level="china"] .geo-map-mount .province-label {
  fill: #dce7f3 !important;
  opacity: 0.9 !important;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif !important;
  font-weight: 600;
  paint-order: stroke;
  stroke: rgba(8, 17, 31, 0.78);
  stroke-width: 1;
  stroke-linejoin: round;
  filter: none !important;
  pointer-events: visiblePainted;
}

.geo-drilldown[data-level="china"] .geo-map-mount [data-province="北京"] .province-label,
.geo-drilldown[data-level="china"] .geo-map-mount [data-province="天津"] .province-label,
.geo-drilldown[data-level="china"] .geo-map-mount [data-province="上海"] .province-label,
.geo-drilldown[data-level="china"] .geo-map-mount [data-province="香港"] .province-label,
.geo-drilldown[data-level="china"] .geo-map-mount [data-province="澳门"] .province-label {
  font-size: 10px !important;
}

.geo-drilldown[data-level="china"] .geo-map-mount [data-province]:hover .province-shape,
.geo-drilldown[data-level="china"] .geo-map-mount [data-province]:focus-visible .province-shape {
  fill: #5b8def !important;
  fill-opacity: 1 !important;
  stroke: #f4f7fb !important;
  stroke-opacity: 1 !important;
  stroke-width: 2.8 !important;
  filter: none !important;
}

.geo-map-mount [data-geo-city],
.geo-map-mount [data-geo-district] {
  outline: none;
}

.regional-3d-map {
  filter: none !important;
  transform: none !important;
}

.regional-depth-layer path {
  fill: #172c46;
  fill-opacity: 0.9;
  stroke: none;
}

.regional-depth-layer:first-child path {
  fill: #0d1d31;
}

.geo-map-mount .geo-surface {
  stroke: #7999bc;
  stroke-opacity: 0.94;
  stroke-width: 1.25;
  transition:
    fill 150ms ease-out,
    stroke 150ms ease-out,
    filter 150ms ease-out;
}

.geo-map-mount .map-surface-highlight {
  fill: url("#jingshu-map-surface-sheen") !important;
  fill-opacity: 0.12 !important;
  stroke: rgba(205, 221, 240, 0.18);
  mix-blend-mode: normal;
}

.geo-map-mount [data-geo-city]:hover .geo-surface,
.geo-map-mount [data-geo-city]:focus-visible .geo-surface,
.geo-map-mount [data-geo-district]:hover .geo-surface,
.geo-map-mount [data-geo-district]:focus-visible .geo-surface,
.geo-map-mount .geo-selected .geo-surface {
  fill: #5b8def !important;
  stroke: #f5f8fc;
  stroke-width: 2.6;
  filter: none !important;
}

.geo-hover-card {
  min-width: 136px;
  padding: 9px 11px;
  border-color: #445c78;
  border-radius: 8px;
  background: #172539;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
}

.geo-hover-card strong {
  color: #f3f6fa;
}

.geo-hover-card span {
  color: #aabbd0;
}

.geo-map-caption {
  max-width: min(280px, calc(100% - 28px));
  padding: 7px 12px;
  color: #c0cede;
  border-color: #354a64;
  border-radius: 8px;
  background: rgba(17, 31, 49, 0.94);
  transform: none;
}

.geo-detail {
  position: absolute;
  z-index: 12;
  top: 12px;
  right: 12px;
  bottom: 54px;
  width: clamp(260px, 31%, 340px);
  padding: 12px;
  overflow: auto;
  border: 1px solid #344a64;
  border-radius: 10px;
  background: rgba(16, 27, 43, 0.96);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.32);
}

.geo-drilldown[data-level="province"] .geo-detail,
.geo-drilldown[data-level="city"] .geo-detail {
  position: relative;
  inset: auto;
  width: auto;
  height: 100%;
  max-height: none;
  align-self: stretch;
  padding: 12px;
  box-shadow: none;
}

.geo-summary {
  gap: 7px;
}

.geo-summary article {
  padding: 8px 9px;
  border-color: #2c4059;
  border-radius: 7px;
  background: #152235;
}

.geo-city-list,
.geo-user-list {
  gap: 5px;
  margin-top: 10px;
}

.geo-city-list button,
.geo-user-list button {
  min-height: 32px;
  padding: 6px 8px;
  color: #d1dbe7;
  border-color: #2c4059;
  border-radius: 6px;
  background: #111e30;
}

.geo-empty {
  color: #8ea0b5;
  border-color: #344a64;
  border-radius: 7px;
}

.realtime-center-panel {
  align-self: stretch;
  min-height: 206px;
  max-height: none;
  overflow: hidden;
}

.realtime-center-panel .panel-heading {
  min-height: 38px;
}

.realtime-center-panel .hourly-insights {
  grid-template-columns:
    minmax(0, 1fr) minmax(0, 0.95fr) minmax(0, 0.95fr)
    minmax(0, 1.1fr) minmax(0, 1.15fr);
  margin: 0;
  border: 0;
  border-bottom: 1px solid #26384e;
  background: #111e30;
}

.realtime-center-panel .hourly-insights > span {
  min-height: 34px;
  padding: 5px 10px;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #91a5bb;
  border-right-color: #344a64;
  white-space: nowrap;
}

.realtime-center-panel .hourly-insights > span:last-child {
  border-right: 0;
}

.realtime-center-panel .hourly-insights strong {
  margin: 0;
  color: #edf2f8;
  font-size: var(--fs-tiny);
}

.realtime-center-panel #hourlyUsage[data-health="healthy"] {
  color: #35c59a;
}

.realtime-center-panel #hourlyUsage[data-health="calling"] {
  color: #67a2ff;
}

.realtime-center-panel #hourlyUsage[data-health="degraded"] {
  color: #e5a348;
}

.realtime-center-panel #hourlyUsage[data-health="unhealthy"] {
  color: #e66f83;
}

.realtime-center-panel .hourly-grid {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.realtime-center-panel .realtime-traffic-list {
  gap: 0;
  height: 100%;
  min-height: 134px;
  max-height: none;
  padding: 0;
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-gutter: stable;
  border-right: 1px solid #26384e;
  border-bottom: 1px solid #26384e;
  border-left: 1px solid #26384e;
  border-radius: 0 0 6px 6px;
}

.realtime-center-panel .realtime-traffic-row {
  display: grid;
  grid-template-columns:
    clamp(30px, 2.2vw, 48px) minmax(118px, 1.35fr) minmax(80px, 0.72fr)
    minmax(64px, 0.58fr) minmax(60px, 0.54fr)
    minmax(82px, 0.82fr) minmax(142px, 1.18fr) minmax(80px, 0.7fr);
  gap: 0;
  align-items: center;
  min-width: 640px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #26384e;
  background: transparent;
}

.realtime-center-panel .realtime-traffic-row > * {
  display: flex;
  min-width: 0;
  min-height: 34px;
  padding: 5px 9px;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-right: 1px solid #2f435d;
}

.realtime-center-panel .realtime-traffic-row > *:last-child {
  border-right: 0;
}

.realtime-center-panel .realtime-traffic-header {
  position: sticky;
  z-index: 2;
  top: 0;
  min-height: 28px;
  color: #91a5bb;
  border-bottom-color: #344a64;
  background: #162438;
}

.realtime-center-panel .realtime-traffic-header span {
  min-width: 0;
  overflow: hidden;
  font-size: var(--fs-tiny);
  font-weight: 600;
  text-overflow: clip;
  white-space: nowrap;
}

.realtime-center-panel .realtime-traffic-header > * {
  min-height: 32px;
  padding-inline: 6px;
}

.realtime-center-panel .realtime-traffic-model,
.realtime-center-panel .realtime-traffic-metric,
.realtime-center-panel .realtime-traffic-token,
.realtime-center-panel .realtime-traffic-health {
  min-width: 0;
  overflow: hidden;
  font-size: var(--fs-tiny);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.realtime-center-panel .realtime-traffic-model {
  color: #edf2f8;
}

.realtime-center-panel .realtime-traffic-metric {
  color: #a9b8ca;
}

.realtime-center-panel .realtime-traffic-token {
  color: #8fb3f4;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.realtime-center-panel .realtime-traffic-health {
  color: #7f91a8;
}

.realtime-center-panel .realtime-traffic-health.healthy {
  color: #35c59a;
}

.realtime-center-panel .realtime-traffic-health.calling {
  color: #67a2ff;
}

.realtime-center-panel .realtime-traffic-health.degraded {
  color: #e5a348;
}

.realtime-center-panel .realtime-traffic-health.unhealthy {
  color: #e66f83;
}

.bridge-bar-stage {
  border-bottom-color: #31465f;
  background: transparent;
}

.bridge-bar {
  background: #5b8def;
  box-shadow: none;
}

.bridge-chart {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  padding: 0;
}

.finance-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  border-bottom: 1px solid #26384e;
}

.finance-summary-item {
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 5px 9px 4px;
  align-content: center;
  border-right: 1px solid #26384e;
}

.finance-summary-item:last-child {
  border-right: 0;
}

.finance-summary-item span,
.finance-summary-item strong,
.finance-summary-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-summary-item span {
  color: #a9b8ca;
  font-size: 10px;
  font-weight: 550;
}

.finance-summary-item strong {
  color: #eff4fa;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.finance-summary-item small {
  color: #7f91a8;
  font-size: 9.5px;
  line-height: 1.15;
}

.finance-summary-item.revenue strong {
  color: #6f9ff8;
}

.finance-summary-item.points strong {
  color: #aa96eb;
}

.finance-summary-item.cost strong {
  color: #e5a348;
}

.finance-record-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  min-height: 49px;
  padding: 5px 9px 6px;
  background: rgba(13, 27, 43, 0.38);
}

.finance-record-summary > article {
  display: grid;
  gap: 2px;
  min-width: 0;
  align-content: center;
}

.finance-record-summary > article:last-child {
  padding-left: 10px;
  border-left: 1px solid #26384e;
}

.finance-record-summary small,
.finance-record-summary strong,
.finance-record-summary em {
  display: block;
  min-width: 0;
  white-space: normal;
}

.finance-record-summary small {
  color: #9eb0c4;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

.finance-record-summary strong {
  color: #d9e3ef;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.finance-record-summary em {
  color: #7f91a8;
  font-size: 10px;
  font-style: normal;
  line-height: 1.2;
}

.finance-record-summary > article:first-child strong {
  color: #35c59a;
}

.finance-coverage {
  display: grid;
  grid-template-rows: auto auto 3px;
  gap: 3px;
  min-width: 0;
  padding: 6px 9px 7px;
  align-content: center;
}

.finance-coverage-heading,
.finance-coverage-meta {
  display: flex;
  gap: 8px;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
}

.finance-coverage-heading span,
.finance-coverage-heading strong,
.finance-coverage-meta small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-coverage-heading span {
  color: #b6c4d4;
  font-size: 10px;
  font-weight: 600;
}

.finance-coverage-heading strong {
  color: #35c59a;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.finance-coverage.is-warning .finance-coverage-heading strong,
.finance-coverage.is-warning .finance-coverage-meta small:last-child {
  color: #e5a348;
}

.finance-coverage-meta small {
  color: #7f91a8;
  font-size: 9.5px;
}

.finance-coverage-track {
  height: 3px;
  overflow: hidden;
  background: #1b2b3f;
}

.finance-coverage-track i {
  display: block;
  width: var(--value);
  height: 100%;
  background: #35c59a;
}

.model-ranking-row,
.data-table-row {
  border-bottom-color: #26384e;
}

.model-ranking-row > b,
.data-table-row b {
  color: #8fb3f4;
}

.model-ranking-name,
.model-ranking-value,
.points-item strong {
  color: #edf2f8;
}

.model-ranking-meta,
.points-item span,
.points-item small {
  color: #91a5bb;
}

.operations-health-panel .panel-heading h2,
.operations-health-panel .panel-heading > small {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.operations-health-panel .panel-heading > small {
  flex: 0 0 auto;
}

.operations-health-content {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1.08fr) minmax(0, 0.92fr);
}

.compact-ledger {
  overflow: auto;
  border-right: 0;
  border-bottom: 1px solid #26384e;
}

.points-summary {
  overflow: visible;
}

.points-item span,
.points-item strong,
.points-item small {
  overflow: visible;
  line-height: 1.2;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.points-item strong {
  margin-top: 2px;
  font-size: var(--fs-small);
}

.points-item small {
  margin-top: 3px;
}

.compact-quality {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: auto;
}

.compact-quality h3 {
  margin-top: 5px;
}

.quality-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 10px;
  padding-top: 5px;
}

.quality-item > div:first-child {
  align-items: flex-start;
}

.quality-item span {
  flex: 1 1 auto;
  overflow: visible;
  line-height: 1.2;
  text-overflow: clip;
  white-space: normal;
}

.quality-item strong {
  flex: 0 0 auto;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.economics-dialog,
.region-dialog {
  padding: 0;
  color: var(--text);
  border: 1px solid #344a64;
  border-radius: 14px;
  background: #101b2b;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

.economics-dialog::backdrop,
.region-dialog::backdrop {
  background: rgba(4, 9, 17, 0.78);
  backdrop-filter: blur(4px);
}

.region-dialog {
  width: min(760px, calc(100vw - 36px));
  max-height: calc(100dvh - 36px);
}

.region-dialog > section {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 38px);
}

.region-dialog header {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px 20px;
  border-bottom: 1px solid #26384e;
  background: #152235;
}

.region-dialog header p,
.region-dialog header h2 {
  margin: 0;
}

.region-dialog header p {
  color: #91a5bb;
  font-size: 12px;
}

.region-dialog header h2 {
  margin-top: 5px;
  font-size: 21px;
}

.region-dialog header button {
  min-height: 32px;
  padding: 0 12px;
}

.region-dialog-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 16px 20px 10px;
}

.region-dialog-summary article {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #2c4059;
  border-radius: 8px;
  background: #152235;
}

.region-dialog-summary span,
.region-dialog-summary strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.region-dialog-summary span {
  color: #91a5bb;
  font-size: 12px;
}

.region-dialog-summary strong {
  margin-top: 4px;
  color: #eff4fa;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.region-dialog-notice {
  margin: 0;
  padding: 10px 20px;
  color: #c9b98e;
  font-size: 12px;
  line-height: 1.65;
  background: rgba(122, 93, 42, 0.14);
}

.region-dialog-users {
  display: grid;
  gap: 6px;
  min-height: 0;
  padding: 14px 20px 20px;
  overflow: auto;
}

.region-dialog-users > strong {
  margin-bottom: 3px;
  color: #e7edf5;
  font-size: 14px;
}

.region-dialog-users button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  text-align: left;
}

.region-dialog-users button span,
.region-dialog-users button small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.period-dialog {
  color: #f1f5fb;
  border-color: #344a64;
  background: #101b2b;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.56);
}

.period-dialog header {
  border-bottom-color: #26384e;
  background: #152235;
}

.period-dialog header p {
  color: #8fb3f4;
}

.period-dialog-fields input {
  color: #f1f5fb;
  border-color: #344a64;
  background: #111e30;
}

.period-dialog footer button[type="submit"] {
  color: #fff;
  background: #5b8def;
}

@media (max-width: 1500px) {
  .screen-canvas {
    --rail-left: 300px;
    --rail-right: 320px;
  }

  .metric-card {
    padding-inline: 8px;
  }

  .metric-card strong {
    font-size: 16px;
    letter-spacing: -0.02em;
  }

  .metric-card.operating-result-card strong {
    font-size: 14px;
  }

  .metric-card small {
    font-size: 10px;
  }

  .bridge-column strong,
  .bridge-column > span {
    font-size: 9.5px;
    letter-spacing: -0.02em;
  }

  .command-status span {
    display: none;
  }

  .geo-detail {
    width: 270px;
  }

  .conversion-bars > .consumer-top-row {
    grid-template-columns: 22px minmax(0, 1fr) minmax(136px, 1.3fr);
    gap: 6px;
    min-height: 70px;
    padding-block: 7px;
  }

  .high-value-user-row {
    grid-template-columns: 22px minmax(64px, 0.62fr) minmax(132px, 1.38fr);
    gap: 5px;
  }

  .realtime-center-panel .realtime-traffic-row > *,
  .realtime-center-panel .realtime-traffic-header > * {
    padding-inline: 4px;
  }

  .realtime-center-panel .hourly-insights > span {
    flex-direction: column;
    gap: 1px;
    padding-block: 3px;
    padding-inline: 4px;
  }

  .realtime-center-panel .realtime-traffic-model {
    overflow: visible;
    line-height: 1.15;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .geo-national-overview {
    width: 170px;
    padding: 8px 9px;
  }

  .geo-national-overview > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding-top: 6px;
  }

  .geo-national-overview header {
    padding-bottom: 5px;
  }

  .geo-drilldown[data-level="china"] .geo-layout {
    grid-template-columns: minmax(0, 1fr) minmax(176px, 22%);
    gap: 8px;
  }

  .geo-drilldown[data-level="china"] .geo-map-mount {
    padding-right: 10px;
    padding-left: clamp(190px, 38%, 215px);
  }

  .geo-consumption-charts {
    padding: 8px;
  }

  .geo-consumption-charts > header small {
    display: none;
  }

  .geo-consumption-row {
    grid-template-columns: 24px minmax(0, 1fr);
    grid-template-areas:
      "rank identity"
      "rank metrics";
    gap: 6px 7px;
    min-height: 72px;
    padding: 9px 2px;
  }

  .geo-consumption-metric {
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 5px;
    font-size: 11px;
  }

  .geo-map-footer {
    gap: 6px;
  }

  .geo-map-footer .geo-heat-legend {
    grid-template-columns: auto minmax(48px, 74px) auto auto;
    gap: 5px;
    padding-inline: 7px;
  }

  .geo-map-footer .geo-map-caption {
    max-width: none;
    padding-inline: 8px;
  }

}

@media (min-width: 2400px) {
  .screen-canvas {
    --rail-left: 420px;
    --rail-right: 450px;
    --fs-body: 16px;
    --fs-small: 14px;
    --fs-tiny: 13px;
  }

  .geo-drilldown[data-level="china"] .geo-layout {
    grid-template-columns: minmax(0, 1fr) clamp(320px, 22%, 440px);
    gap: 20px;
  }

  .geo-consumption-charts {
    padding: 14px 16px;
  }

  .geo-consumption-groups {
    gap: 12px;
    padding-top: 12px;
  }

  .geo-consumption-rows {
    gap: 7px;
  }

}

@media (max-height: 760px) {
  .screen-canvas {
    --frame-top: 8px;
    --frame-bottom: 10px;
    --header-h: 58px;
    --grid-gap: 7px;
  }

  .panel-heading {
    min-height: 36px;
  }

  .operations-center {
    grid-template-rows: minmax(0, 1fr) clamp(190px, 27dvh, 206px);
  }

  .realtime-center-panel {
    min-height: 190px;
  }

  .realtime-center-panel .realtime-traffic-list {
    min-height: 118px;
  }

  .geo-detail {
    top: 8px;
    right: 8px;
    bottom: 48px;
  }

  .geo-consumption-charts {
    padding: 7px 8px;
  }

  .geo-consumption-charts > header {
    gap: 4px;
    padding-bottom: 5px;
  }

  .geo-consumption-groups {
    gap: 5px;
    padding-top: 5px;
  }

  .command-title h1 {
    font-size: clamp(22px, min(1.8vw, 3.4dvh), 34px);
  }
}

/* 双视图沿用原始三栏骨架，只切换各固定位置中的数据。 */
.screen-view-switch {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid #344a64;
  border-radius: 7px;
  background: #0b1727;
}

.command-header > .header-view-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  justify-self: start;
}

.task-queue-entry {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: #91a5bb;
  border: 1px solid #344a64;
  border-radius: 7px;
  background: #0b1727;
  font-size: 11px;
  text-decoration: none;
}

.task-queue-entry:hover {
  color: #f0f5fb;
  background: #24405f;
}

.task-queue-entry:focus-visible {
  outline: 2px solid #67a2ff;
  outline-offset: 2px;
}

.screen-view-switch button {
  min-height: 26px;
  padding: 0 9px;
  color: #91a5bb;
  border: 0;
  border-radius: 5px;
  background: transparent;
  font-size: 11px;
}

.screen-view-switch button:hover,
.screen-view-switch button.active {
  color: #f0f5fb;
  background: #24405f;
}

.screen-view-switch button:focus-visible {
  outline: 2px solid #67a2ff;
  outline-offset: 2px;
}

.panel-heading-action {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 0 9px;
  color: #dbe5f2;
  font-size: 11px;
  border: 1px solid #344a64;
  border-radius: 6px;
  background: #111e30;
}

.panel-heading-action:hover {
  border-color: #5b8def;
  background: #1a2c43;
}

.panel-heading-action:focus-visible {
  outline: 2px solid #67a2ff;
  outline-offset: 2px;
}

.screen-canvas[data-screen-view] [data-screen-panel] {
  display: none;
}

.screen-canvas[data-screen-view="billing"] [data-screen-panel~="billing"],
.screen-canvas[data-screen-view="tokens"] [data-screen-panel~="tokens"] {
  display: flex;
}

.token-user-row .high-value-user-metrics strong {
  color: #6f9ff8;
}

.realtime-center-panel .hourly-insights small {
  color: inherit;
  font-size: inherit;
}

.realtime-center-panel .realtime-traffic-row {
  grid-template-columns:
    42px minmax(190px, 1.6fr) minmax(68px, .55fr)
    minmax(68px, .55fr) minmax(150px, 1.05fr) minmax(68px, .6fr);
  min-width: 640px;
}

.token-history-panel {
  min-height: 0;
}

.token-hour-axis-note {
  color: #a9bdd3;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.token-history-insights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  flex: 0 0 auto;
  border-bottom: 1px solid #26384e;
  background: #111e30;
}

.token-history-insights > span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px 10px;
  color: #91a5bb;
  font-size: 11px;
  border-right: 1px solid #344a64;
}

.token-history-insights > span:last-child {
  border-right: 0;
}

.token-history-insights strong {
  overflow: hidden;
  color: #edf2f8;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.token-hour-chart {
  display: grid;
  grid-template-columns: repeat(var(--buckets, 24), minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  gap: 3px;
  min-height: 0;
}

.token-history-plot {
  --plot-top: 26px;
  --plot-bottom: 26px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  container-type: inline-size;
}

.token-history-y-axis {
  position: relative;
  display: flex;
  padding: var(--plot-top) 8px var(--plot-bottom) 0;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  min-height: 0;
  border-right: 1px solid #26384e;
  background: #0e1a2a;
}

.token-history-y-axis::before {
  position: absolute;
  top: 6px;
  right: 8px;
  color: #8fa8c3;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  content: attr(data-unit);
}

.token-history-y-axis span {
  color: #a9bdd3;
  font-size: 10px;
  font-weight: 550;
  line-height: 1.1;
  white-space: nowrap;
}

.token-history-y-axis.is-empty {
  justify-content: flex-end;
}

.token-history-chart {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: var(--plot-top) 10px 8px 8px;
  overflow: hidden;
}

.token-history-chart::before {
  position: absolute;
  inset: var(--plot-top) 10px var(--plot-bottom) 8px;
  pointer-events: none;
  background-image: linear-gradient(to bottom, rgba(111, 159, 248, 0.14) 1px, transparent 1px);
  background-size: 100% 25%;
  border-bottom: 1px solid rgba(111, 159, 248, 0.14);
  content: "";
}

.token-hour-cell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: minmax(48px, 1fr) 18px;
  gap: 6px;
  min-width: 0;
  min-height: 0;
  padding: 0 1px;
  align-items: end;
  justify-items: center;
  border: 0;
  background: transparent;
}

.token-hour-bar {
  display: block;
  width: min(16px, 56%);
  height: var(--height);
  min-height: 0;
  align-self: end;
  border-radius: 3px 3px 1px 1px;
  background: #5b8def;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.token-hour-cell > span {
  max-width: 100%;
  overflow: hidden;
  color: #a9bdd3;
  font-size: 10.5px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.token-hour-cell.is-peak > span {
  color: #f0bd63;
  font-weight: 700;
}

.token-chart-tooltip {
  position: absolute;
  z-index: 30;
  width: 250px;
  padding: 10px 11px 9px;
  pointer-events: none;
  color: #eaf1f9;
  border: 1px solid #3a506c;
  border-radius: 8px;
  background: #0b1727;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34);
}

.token-chart-tooltip::after {
  position: absolute;
  left: var(--arrow-x, 50%);
  width: 8px;
  height: 8px;
  transform: translateX(-50%) rotate(45deg);
  border: solid #3a506c;
  background: #0b1727;
  content: "";
}

.token-chart-tooltip[data-placement="above"]::after {
  bottom: -5px;
  border-width: 0 1px 1px 0;
}

.token-chart-tooltip[data-placement="below"]::after {
  top: -5px;
  border-width: 1px 0 0 1px;
}

.token-chart-tooltip-heading {
  display: grid;
  gap: 3px;
  padding-bottom: 8px;
  border-bottom: 1px solid #263a52;
}

.token-chart-tooltip-heading span,
.token-chart-tooltip-row span {
  color: #8fa4bb;
  font-size: 10.5px;
  line-height: 1.2;
}

.token-chart-tooltip-heading strong {
  color: #eef4fb;
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.token-chart-tooltip-metrics {
  display: grid;
  gap: 6px;
  padding-top: 8px;
}

.token-chart-tooltip-row {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
}

.token-chart-tooltip-row strong {
  color: #e8eff8;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}

.token-chart-tooltip-row.is-tokens strong {
  color: #43d9ff;
}

.token-chart-tooltip-row.is-cost strong {
  color: #f0bd63;
}

.token-hour-cell:hover .token-hour-bar,
.token-hour-cell:focus-visible .token-hour-bar {
  background: #74a7ff;
}

.token-hour-cell:focus-visible {
  border-radius: 4px;
  outline: 2px solid #6f9ff8;
  outline-offset: -1px;
}

@container (max-width: 850px) {
  .token-history-chart.is-dense .token-hour-cell:nth-child(even):not(.is-peak):not(:last-child) > span {
    visibility: hidden;
  }

  .token-history-chart.is-dense .token-hour-cell > span {
    width: max-content;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
  }

  .token-history-chart.is-dense .token-hour-cell:has(+ .is-peak) > span {
    visibility: hidden;
  }

  .token-history-chart.is-dense .token-hour-cell.is-peak + .token-hour-cell > span {
    visibility: hidden;
  }

  .token-history-chart.is-dense .token-hour-cell:last-child > span {
    justify-self: end;
    transform: translateX(3px);
  }

  .token-history-chart.is-dense .token-hour-cell:nth-last-child(2) > span {
    transform: translateX(-3px);
  }
}

.token-composition-grid {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
}

.token-io-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 0;
}

.token-io-metric {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label label"
    "value ratio";
  gap: 2px 8px;
  min-width: 0;
  padding: 5px 10px 3px;
  align-content: center;
  border-right: 1px solid #26384e;
}

.token-io-metric:last-child {
  border-right: 0;
}

.token-io-metric span {
  grid-area: label;
  color: #a9bdd3;
  font-size: 11px;
  font-weight: 550;
}

.token-io-metric strong {
  grid-area: value;
  overflow: visible;
  color: #68dfff;
  font-size: 16px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  text-overflow: clip;
  white-space: nowrap;
}

.token-io-metric.output strong {
  color: #b39aff;
}

.token-io-metric small {
  grid-area: ratio;
  align-self: end;
  color: #edf2f8;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.token-io-split {
  height: 6px;
  margin: 1px 10px 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #6e5cc3;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.token-io-split i {
  display: block;
  width: var(--input-ratio);
  height: 100%;
  border-radius: inherit;
  background: #43d9ff;
}

.screen-canvas[data-screen-view="tokens"] [data-area="quality"] .operations-health-content {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(48px, .95fr) minmax(48px, 1.05fr);
  overflow: hidden;
}

.screen-canvas[data-screen-view="tokens"] [data-area="quality"] .compact-ledger,
.screen-canvas[data-screen-view="tokens"] [data-area="quality"] .compact-quality {
  overflow: hidden;
}

.screen-canvas[data-screen-view="tokens"] [data-area="quality"] .points-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  padding: 3px 6px 4px;
  overflow: hidden;
}

.screen-canvas[data-screen-view="tokens"] [data-area="quality"] .points-item {
  display: grid;
  grid-template-rows: auto auto;
  align-content: center;
  gap: 2px;
  min-height: 0;
  padding: 2px 7px;
  overflow: hidden;
  border: 0;
  border-right: 1px solid #2a3d55;
  background: transparent;
}

.screen-canvas[data-screen-view="tokens"] [data-area="quality"] .points-item:last-child {
  border-right: 0;
}

.screen-canvas[data-screen-view="tokens"] [data-area="quality"] .points-item span,
.screen-canvas[data-screen-view="tokens"] [data-area="quality"] .points-item strong,
.screen-canvas[data-screen-view="tokens"] [data-area="quality"] .points-item small {
  overflow: hidden;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-canvas[data-screen-view="tokens"] [data-area="quality"] .points-item span,
.screen-canvas[data-screen-view="tokens"] [data-area="quality"] .points-item small {
  color: #a9bdd3;
  font-size: 10.5px;
  font-weight: 500;
}

.screen-canvas[data-screen-view="tokens"] [data-area="quality"] .points-item strong {
  margin-top: 0;
  font-size: 12.5px;
  line-height: 1;
}

.screen-canvas[data-screen-view="tokens"] [data-area="quality"] .points-item small {
  display: block;
  margin-top: 0;
}

.screen-canvas[data-screen-view="tokens"] [data-area="quality"] .points-item.is-positive strong {
  color: #55ddb1;
}

.screen-canvas[data-screen-view="tokens"] [data-area="quality"] .points-item.is-warning strong {
  color: #f0bd63;
}

.screen-canvas[data-screen-view="tokens"] [data-area="quality"] .compact-quality {
  grid-template-rows: minmax(0, 1fr);
}

.screen-canvas[data-screen-view="tokens"] [data-area="quality"] .compact-quality h3 {
  display: none;
}

.screen-canvas[data-screen-view="tokens"] [data-area="quality"] .quality-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto;
  gap: 4px 10px;
  padding: 5px 7px 6px;
  align-content: center;
  overflow: hidden;
}

.screen-canvas[data-screen-view="tokens"] [data-area="quality"] .quality-item {
  display: grid;
  grid-template-rows: auto 3px;
  gap: 5px;
  align-content: center;
  min-width: 0;
  min-height: 0;
}

.screen-canvas[data-screen-view="tokens"] [data-area="quality"] .quality-item > div:first-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  margin-bottom: 0;
}

.screen-canvas[data-screen-view="tokens"] [data-area="quality"] .quality-item strong {
  justify-self: start;
  color: #edf2f8;
}

.screen-canvas[data-screen-view="tokens"] [data-area="quality"] .quality-track {
  height: 3px;
}

.screen-canvas[data-screen-view="tokens"] [data-area="quality"] .quality-item span,
.screen-canvas[data-screen-view="tokens"] [data-area="quality"] .quality-item strong {
  overflow: hidden;
  font-size: 10.5px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1500px) {
  .token-hour-chart {
    gap: 2px;
  }

  .token-history-plot {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .token-history-y-axis {
    padding-right: 6px;
  }

  .token-history-y-axis::before {
    right: 6px;
    font-size: 9.5px;
  }

  .token-history-y-axis span {
    font-size: 9.5px;
  }

  .token-hour-cell > span {
    font-size: 9.5px;
  }

  .token-hour-bar {
    width: min(12px, 58%);
  }
}

.metric-card.metric-decision strong {
  font-size: clamp(18px, 1.25vw, 25px);
}

.metric-card.metric-supporting strong {
  font-size: clamp(15px, 1vw, 20px);
}

.metric-card.metric-cost strong {
  color: #e5a348;
}

#metricContributionCard[data-status="complete"] strong,
#metricCoverageCard[data-status="complete"] strong {
  color: #35c59a;
}

#metricContributionCard[data-status="missing"] strong,
#metricContributionCard[data-status="logged"] strong,
#metricCoverageCard[data-status="incomplete"] strong {
  color: #e5a348;
}

.metric-card #metricContributionMeta {
  min-height: 0;
  overflow: visible;
  line-height: 1.2;
  text-overflow: clip;
  white-space: normal;
}

.overview-panel .metric-card p {
  min-height: 0;
  max-height: 2.5em;
  overflow: hidden;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.risk-user-row .high-value-user-metrics small:first-of-type {
  color: #b7c6d8;
}

.risk-user-row[data-risk="missing"] .high-value-user-metrics > strong,
.risk-user-row[data-risk="complete"] .high-value-user-metrics > strong {
  color: #e5a348;
}

.billing-trend-panel {
  min-height: 0;
}

.billing-trend-panel > .panel-heading {
  gap: 12px;
}

.billing-trend-tools {
  display: flex;
  gap: 10px;
  min-width: 0;
  justify-content: flex-end;
  align-items: center;
}

.billing-trend-legend {
  color: #a7b9cc;
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
}

.billing-trend-tools select {
  min-width: 96px;
  height: 28px;
  padding: 0 8px;
  flex: 0 0 auto;
  font-size: 11px;
}

.billing-trend-summary {
  max-width: 460px;
  color: #c4d1df;
  font-size: 11.5px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  text-align: right;
}

.billing-trend-plot {
  --billing-plot-top: 28px;
  --billing-plot-bottom: 43px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.billing-trend-y-axis {
  position: relative;
  display: flex;
  padding: var(--billing-plot-top) 7px var(--billing-plot-bottom) 0;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  border-right: 1px solid #26384e;
  background: #0e1a2a;
}

.billing-trend-y-axis::before {
  position: absolute;
  top: 7px;
  right: 7px;
  color: #a5b8cd;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1;
  content: attr(data-unit);
}

.billing-trend-y-axis span {
  color: #a9bdd3;
  font-size: 10.5px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.billing-trend-chart {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 21px;
  gap: 3px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 7px 10px 4px 8px;
  overflow: hidden;
  container-type: inline-size;
}

.billing-line-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  margin-top: 15px;
  background-image: linear-gradient(
    to bottom,
    rgba(111, 159, 248, 0.12) 1px,
    transparent 1px
  );
  background-size: 100% 25%;
  border-bottom: 1px solid rgba(111, 159, 248, 0.2);
}

.billing-line-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.billing-line-area {
  fill: rgba(66, 216, 245, 0.1);
}

.billing-line-path {
  fill: none;
  stroke: #42d8f5;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.billing-line-point {
  position: absolute;
  top: var(--y);
  left: var(--x);
  z-index: 2;
  width: 1px;
  height: 1px;
  transform: translate(-50%, -50%);
}

.billing-line-point > i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  transform: translate(-50%, -50%);
  border: 1px solid #93b5f5;
  border-radius: 50%;
  background: #13233a;
}

.billing-line-point.has-change > i {
  width: 8px;
  height: 8px;
  border-color: #f2ba68;
  background: #e5a348;
}

.billing-line-point.is-total > i {
  width: 10px;
  height: 10px;
  border: 2px solid #b4caf7;
  background: #5b8def;
}

.billing-line-value {
  position: absolute;
  left: 50%;
  min-width: max-content;
  padding: 2px 4px;
  color: #dce8f7;
  font-size: 9.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
  border-radius: 3px;
  background: rgba(14, 26, 42, 0.84);
}

.billing-line-value[data-side="above"] {
  bottom: 7px;
  transform: translateX(-50%);
}

.billing-line-value[data-side="below"] {
  top: 7px;
  transform: translateX(-50%);
}

.billing-line-point.has-change .billing-line-value {
  color: #f1bd72;
}

.billing-line-point.is-total .billing-line-value {
  color: #9bbdf9;
  font-size: 10.5px;
  font-weight: 750;
}

.billing-line-point:focus-visible {
  outline: 2px solid #6f9ff8;
  outline-offset: 5px;
}

.billing-line-x-axis {
  display: grid;
  grid-template-columns: repeat(var(--points), minmax(0, 1fr));
  gap: 0;
  min-width: 0;
  align-items: end;
}

.billing-line-x-axis span {
  min-width: 0;
  overflow: hidden;
  color: #91a5bb;
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.billing-line-x-axis span:first-child,
.billing-line-x-axis span:last-child {
  color: #b7c8dc;
  font-weight: 700;
}

.billing-line-x-axis span.is-hidden {
  visibility: hidden;
}

.billing-trend-chart.is-dense .billing-line-x-axis span {
  font-size: 8.5px;
}

@media (max-width: 1500px) {
  .billing-trend-plot {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .billing-trend-y-axis {
    padding-right: 5px;
  }

  .billing-trend-y-axis::before {
    right: 5px;
    font-size: 9.5px;
  }

  .billing-trend-y-axis span {
    font-size: 9.5px;
  }

  .billing-trend-summary {
    max-width: 280px;
    font-size: 10px;
  }

  .billing-trend-legend {
    display: none;
  }

  .billing-line-value,
  .billing-line-x-axis span {
    font-size: 9px;
  }
}

.operations-health-panel .operations-health-content {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, .8fr) minmax(0, 1.2fr);
  overflow: hidden;
}

.operations-health-panel .compact-ledger,
.operations-health-panel .compact-quality {
  display: grid;
  overflow: hidden;
}

.operations-health-panel .points-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  gap: 3px;
  height: 100%;
  padding: 4px;
  align-content: stretch;
  overflow: hidden;
}

.operations-health-panel .points-item {
  display: grid;
  min-height: 0;
  padding: 3px 5px;
  align-content: center;
  overflow: hidden;
}

.operations-health-panel .points-item span,
.operations-health-panel .points-item strong,
.operations-health-panel .points-item small {
  overflow: hidden;
  font-size: 10px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-health-panel .points-item strong,
.operations-health-panel .points-item small {
  margin-top: 1px;
}

.operations-health-panel .compact-quality {
  grid-template-rows: minmax(0, 1fr);
}

.operations-health-panel .compact-quality h3 {
  display: none;
}

.operations-health-panel .quality-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 3px 8px;
  height: 100%;
  padding: 4px 6px 5px;
  align-content: stretch;
  overflow: hidden;
}

.operations-health-panel .quality-item {
  display: grid;
  align-content: center;
}

.operations-health-panel .quality-item > div:first-child {
  gap: 4px;
  margin-bottom: 2px;
}

.operations-health-panel .quality-item span,
.operations-health-panel .quality-item strong {
  overflow: hidden;
  font-size: 10px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

+:root {
  --motion-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --motion-ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

@keyframes ambient-data-breathe {
  0%, 100% {
    opacity: 0.48;
    transform: scale(0.98);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.025);
  }
}

@keyframes live-status-pulse {
  0% {
    opacity: 0.6;
    transform: scale(0.8);
  }
  72%, 100% {
    opacity: 0;
    transform: scale(2.2);
  }
}

@keyframes token-bar-arrive {
  from {
    opacity: 0.45;
    transform: scaleY(0.92);
  }
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

.status-dot {
  position: relative;
}

.status-dot::after {
  position: absolute;
  inset: -3px;
  border: 1px solid rgba(53, 197, 154, 0.7);
  border-radius: 50%;
  content: "";
  pointer-events: none;
  animation: live-status-pulse 2.8s var(--motion-ease-out) infinite;
}

.geo-map-stage::before {
  transform-origin: center;
  animation: ambient-data-breathe 7.2s var(--motion-ease-in-out) infinite;
  will-change: transform, opacity;
}

.token-history-panel::after {
  position: absolute;
  z-index: 0;
  inset: 12% 8%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(91, 141, 239, 0.12), transparent 68%);
  content: "";
  pointer-events: none;
  transform-origin: center;
  animation: ambient-data-breathe 7.2s var(--motion-ease-in-out) infinite;
  will-change: transform, opacity;
}

.token-history-panel > * {
  position: relative;
  z-index: 1;
}

.token-hour-bar {
  transform-origin: center bottom;
  animation: token-bar-arrive 260ms var(--motion-ease-out) both;
}

@media (prefers-reduced-motion: reduce) {
  .status-dot::after,
  .geo-map-stage::before,
  .token-history-panel::after,
  .token-hour-bar {
    animation: none !important;
  }
}

.command-status span {
  margin-top: 0;
}


/* Token 大屏侧栏密度：保持三栏位置，只把空白还给数据。 */
.screen-canvas[data-screen-view="tokens"] .operations-left {
  grid-template-rows:
    clamp(180px, 21dvh, 200px)
    minmax(0, 1fr)
    minmax(0, 1fr);
}

.screen-canvas[data-screen-view="tokens"] .operations-center {
  grid-template-rows: minmax(0, 1fr) clamp(300px, 35dvh, 350px);
}

.screen-canvas[data-screen-view="tokens"] .realtime-center-panel {
  min-height: 300px;
}

.screen-canvas[data-screen-view="tokens"] .operations-right {
  grid-template-rows:
    clamp(104px, 12dvh, 116px)
    minmax(0, 1fr)
    minmax(0, 1fr)
    clamp(150px, 18dvh, 170px);
}

.screen-canvas[data-screen-view="tokens"] .panel-heading h2 {
  font-size: 17px;
  font-weight: 650;
  line-height: 1.15;
}

.screen-canvas[data-screen-view="tokens"] .token-overview-panel .metric-card {
  padding: 3px 10px;
}

.screen-canvas[data-screen-view="tokens"] .token-overview-panel .metric-card > span {
  color: #a9bdd3;
  font-size: 12px;
  font-weight: 500;
}

.screen-canvas[data-screen-view="tokens"] .token-overview-panel .metric-card strong {
  font-size: clamp(17px, 1.15vw, 22px);
  line-height: 1;
}

.screen-canvas[data-screen-view="tokens"] .token-overview-panel .panel-heading > small {
  max-width: 190px;
  overflow: hidden;
  color: #a9bdd3;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-canvas[data-screen-view="tokens"] .cache-hit-metric strong {
  color: #55ddb1;
}

.screen-canvas[data-screen-view="tokens"] .cache-miss-metric strong {
  color: #f0bd63;
}

.screen-canvas[data-screen-view="tokens"] .token-users-panel .high-value-users {
  padding: 2px 7px 4px;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.screen-canvas[data-screen-view="tokens"] .token-users-panel .high-value-user-row {
  min-height: 44px;
  padding: 3px 2px;
}

.screen-canvas[data-screen-view="tokens"] .token-users-panel .high-value-user-row > b,
.screen-canvas[data-screen-view="tokens"] .operations-right .model-ranking-row > b,
.screen-canvas[data-screen-view="tokens"] .operations-right .ranking-row > b {
  font-size: 11px;
  font-weight: 700;
}

.screen-canvas[data-screen-view="tokens"] .token-users-panel .high-value-user-row:first-child > b,
.screen-canvas[data-screen-view="tokens"] .operations-right .ranking-list > :first-child > b {
  color: #f0bd63;
}

.screen-canvas[data-screen-view="tokens"] .token-users-panel .high-value-user-identity,
.screen-canvas[data-screen-view="tokens"] .token-users-panel .high-value-user-metrics {
  gap: 1px;
}

.screen-canvas[data-screen-view="tokens"] .token-users-panel .high-value-user-identity strong,
.screen-canvas[data-screen-view="tokens"] .token-users-panel .high-value-user-metrics strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-canvas[data-screen-view="tokens"] .token-users-panel .high-value-user-identity small,
.screen-canvas[data-screen-view="tokens"] .token-users-panel .high-value-user-metrics small {
  overflow: hidden;
  font-size: 11px;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-canvas[data-screen-view="tokens"] .token-consumption-row .high-value-user-metrics {
  width: 100%;
  align-content: center;
}

.screen-canvas[data-screen-view="tokens"] .token-user-split-track {
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #6e5cc3;
}

.screen-canvas[data-screen-view="tokens"] .token-user-split-track i {
  display: block;
  width: var(--input-ratio);
  height: 100%;
  border-radius: inherit;
  background: #43d9ff;
}

.screen-canvas[data-screen-view="tokens"] .operations-right .ranking-list {
  grid-auto-rows: minmax(46px, max-content);
  gap: 4px;
  align-content: start;
  padding: 6px 8px 8px;
  scroll-padding-block: 6px 8px;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.screen-canvas[data-screen-view="tokens"] .operations-right .model-ranking-row {
  grid-template-columns: 22px minmax(0, 1fr) minmax(118px, auto);
  gap: 7px;
  min-height: 0;
  padding: 4px 3px 6px;
}

.screen-canvas[data-screen-view="tokens"] .operations-right .model-ranking-content,
.screen-canvas[data-screen-view="tokens"] .operations-right .ranking-content,
.screen-canvas[data-screen-view="tokens"] .operations-right .ranking-label {
  gap: 3px;
}

.screen-canvas[data-screen-view="tokens"] .operations-right .model-ranking-name,
.screen-canvas[data-screen-view="tokens"] .operations-right .ranking-label span,
.screen-canvas[data-screen-view="tokens"] .operations-right .ranking-row > strong,
.screen-canvas[data-screen-view="tokens"] .operations-right .model-ranking-value {
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.08;
}

.screen-canvas[data-screen-view="tokens"] .operations-right .model-ranking-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-canvas[data-screen-view="tokens"] .operations-right .model-ranking-meta,
.screen-canvas[data-screen-view="tokens"] .operations-right .ranking-label small,
.screen-canvas[data-screen-view="tokens"] .operations-right .model-ranking-value small {
  color: #a9bdd3;
  font-size: 11px;
  line-height: 1.2;
}

.screen-canvas[data-screen-view="tokens"] .operations-right .model-ranking-value {
  min-width: 118px;
  font-size: 11.5px;
}

.screen-canvas[data-screen-view="tokens"] .operations-right .ranking-row {
  grid-template-columns: 22px minmax(0, 1fr) minmax(118px, auto);
  gap: 7px;
  min-height: 0;
  padding: 4px 3px 6px;
}

.screen-canvas[data-screen-view="tokens"] .operations-right .ranking-row > strong {
  min-width: 118px;
  overflow: visible;
  font-size: 11.5px;
  text-overflow: clip;
}

.screen-canvas[data-screen-view="tokens"] .operations-right .ranking-track {
  height: 4px;
  background: #22354b;
}

.recent-calls-dialog {
  width: min(1480px, calc(100vw - 32px));
}

.recent-calls-dialog header {
  position: relative;
  justify-content: center;
  align-items: center;
  padding-inline: 96px;
  text-align: center;
}

.recent-calls-dialog header > div {
  margin-inline: auto;
}

.recent-calls-dialog header > button {
  position: absolute;
  top: 18px;
  right: 20px;
}

.recent-calls-toolbar {
  display: flex;
  flex: 0 0 auto;
  gap: 16px 28px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid #26384e;
  background: #101d2e;
}

.recent-calls-toolbar label,
.recent-calls-pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #a9bdd3;
  font-size: 12px;
}

.recent-calls-toolbar input,
.recent-calls-toolbar select,
.recent-calls-toolbar button {
  min-height: 30px;
  padding: 0 10px;
  color: #edf2f8;
  border: 1px solid #344a64;
  border-radius: 6px;
  background: #111e30;
}

.recent-calls-toolbar button:hover:not(:disabled),
.recent-calls-toolbar input:focus-visible,
.recent-calls-toolbar select:focus-visible,
.recent-calls-toolbar button:focus-visible {
  border-color: #67a2ff;
  outline: none;
}

.recent-calls-toolbar button:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.recent-calls-pagination > span {
  min-width: 88px;
  color: #edf2f8;
  text-align: center;
}

.recent-calls-toolbar select {
  min-width: 100px;
}

.recent-calls-custom-range {
  display: flex;
  gap: 8px;
  align-items: center;
}

.recent-calls-custom-range[hidden] {
  display: none;
}

.recent-calls-range-error {
  min-width: 0;
  color: #f07d90;
  font-size: 11px;
}

.recent-calls-dialog .economics-notice {
  justify-content: center;
  text-align: center;
}

.recent-calls-dialog .economics-table-wrap {
  flex: 1 1 auto;
}

.recent-calls-dialog .economics-table-wrap table {
  min-width: 1120px;
}

.recent-calls-dialog .economics-table-wrap th,
.recent-calls-dialog .economics-table-wrap td {
  vertical-align: middle;
  text-align: center;
}

.recent-calls-dialog .economics-table-wrap td span,
.recent-calls-dialog .economics-table-wrap td small,
.recent-calls-dialog footer {
  text-align: center;
}

.recent-calls-dialog td[data-health="healthy"] > span {
  color: #55ddb1;
}

.recent-calls-dialog td[data-health="degraded"] > span,
.recent-calls-dialog td[data-health="calling"] > span {
  color: #f0bd63;
}

.recent-calls-dialog td[data-health="unhealthy"] > span {
  color: #f07d90;
}

.screen-canvas[data-screen-view="tokens"] .token-hour-cell > span {
  font-size: 10.5px;
}

.screen-canvas[data-screen-view="tokens"] .realtime-center-panel .hourly-insights > span {
  color: #a9bdd3;
  font-size: 11px;
}

.screen-canvas[data-screen-view="tokens"] .realtime-center-panel .hourly-insights strong {
  font-size: 12px;
}

.screen-canvas[data-screen-view="tokens"] .realtime-center-panel .realtime-traffic-row > * {
  font-size: 11px;
}

.screen-canvas[data-screen-view="tokens"] .realtime-center-panel .realtime-traffic-model {
  font-size: 12px;
}

.screen-canvas[data-screen-view="tokens"] .operations-health-panel .points-item span,
.screen-canvas[data-screen-view="tokens"] .operations-health-panel .points-item small,
.screen-canvas[data-screen-view="tokens"] .operations-health-panel .quality-item span {
  font-size: 11px;
}

.screen-canvas[data-screen-view="tokens"] .operations-health-panel .points-item strong,
.screen-canvas[data-screen-view="tokens"] .operations-health-panel .quality-item strong {
  font-size: 12px;
}

@media (max-height: 800px) {
  .screen-canvas[data-screen-view="tokens"] .operations-center {
    grid-template-rows: minmax(0, 1fr) 270px;
  }

  .screen-canvas[data-screen-view="tokens"] .realtime-center-panel {
    min-height: 270px;
  }

  .screen-canvas[data-screen-view="tokens"] .operations-left {
    grid-template-rows: 168px minmax(0, 1fr) minmax(0, 1fr);
  }

  .screen-canvas[data-screen-view="tokens"] .operations-right {
    grid-template-rows: 108px minmax(0, 1fr) minmax(0, 1fr) 140px;
  }

  .screen-canvas[data-screen-view="tokens"] .token-users-panel .high-value-user-row {
    min-height: 36px;
    padding-block: 1px;
  }

  .screen-canvas[data-screen-view="tokens"] .token-users-panel .high-value-users {
    padding-block: 1px;
  }

  .screen-canvas[data-screen-view="tokens"] .token-users-panel .high-value-user-identity strong,
  .screen-canvas[data-screen-view="tokens"] .token-users-panel .high-value-user-metrics strong {
    font-size: 11.5px;
    line-height: 1;
  }

  .screen-canvas[data-screen-view="tokens"] .token-users-panel .high-value-user-identity small,
  .screen-canvas[data-screen-view="tokens"] .token-users-panel .high-value-user-metrics small {
    font-size: 11px;
    line-height: 1;
  }

  .screen-canvas[data-screen-view="tokens"] .token-users-panel .high-value-user-identity,
  .screen-canvas[data-screen-view="tokens"] .token-users-panel .high-value-user-metrics {
    gap: 0;
  }

  .screen-canvas[data-screen-view="tokens"] .operations-right .ranking-list {
    grid-auto-rows: minmax(44px, max-content);
    gap: 3px;
    padding: 4px 7px 6px;
    scroll-padding-block: 4px 6px;
  }

  .screen-canvas[data-screen-view="tokens"] [data-area="quality"] .quality-grid {
    gap: 3px 8px;
    padding: 4px 7px 5px;
  }

  .screen-canvas[data-screen-view="tokens"] .operations-right .model-ranking-row,
  .screen-canvas[data-screen-view="tokens"] .operations-right .ranking-row {
    gap: 6px;
    padding: 4px 2px 5px;
  }

  .screen-canvas[data-screen-view="tokens"] .operations-right .model-ranking-name,
  .screen-canvas[data-screen-view="tokens"] .operations-right .ranking-label span,
  .screen-canvas[data-screen-view="tokens"] .operations-right .ranking-row > strong,
  .screen-canvas[data-screen-view="tokens"] .operations-right .model-ranking-value {
    font-size: 12px;
  }

  .screen-canvas[data-screen-view="tokens"] .token-io-metric {
    gap: 1px 6px;
    padding: 2px 8px 1px;
  }

  .screen-canvas[data-screen-view="tokens"] .token-io-metric strong {
    font-size: 14px;
    line-height: 1.2;
  }

  .screen-canvas[data-screen-view="tokens"] .token-io-metric span {
    font-size: 11px;
  }

  .screen-canvas[data-screen-view="tokens"] .token-io-metric small {
    font-size: 11px;
    line-height: 1.2;
  }

  .screen-canvas[data-screen-view="tokens"] .token-io-split {
    height: 5px;
    margin: 0 8px 5px;
  }
}

@media (max-width: 1500px) {
  .bridge-column strong {
    font-size: 10px;
  }

  .bridge-column > span {
    font-size: 11px;
    letter-spacing: 0;
  }

  .screen-canvas[data-screen-view="tokens"] .token-hour-cell > span {
    font-size: 9.5px;
    letter-spacing: -0.02em;
  }
}


/* Progressive, panel-local loading state; the sealed v113 layout stays unchanged. */
.monitor-panel[data-loading="true"] {
  isolation: isolate;
}

.monitor-panel[data-loading="true"] > :not(.panel-heading):not(.dashboard-skeleton) {
  visibility: hidden;
}

.monitor-panel[data-loading="true"] .panel-heading > small,
.monitor-panel[data-loading="true"] .billing-trend-summary {
  visibility: hidden;
}

.dashboard-skeleton {
  --skeleton-surface: rgba(57, 77, 101, 0.34);
  --skeleton-line: rgba(126, 149, 177, 0.28);
  --skeleton-strong: rgba(151, 176, 207, 0.38);
  position: absolute;
  z-index: 5;
  inset: clamp(44px, 4.6dvh, 54px) clamp(8px, 0.65vw, 14px)
    clamp(8px, 0.8dvh, 12px);
  display: grid;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  pointer-events: none;
}

.overview-panel > .dashboard-skeleton {
  top: clamp(42px, 4.2dvh, 50px);
}

.dashboard-skeleton > i {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 6px;
  background-color: var(--skeleton-surface);
}

.dashboard-skeleton > i::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 18%,
    rgba(185, 205, 228, 0.13) 44%,
    rgba(210, 226, 244, 0.2) 52%,
    transparent 78%
  );
  content: "";
  transform: translateX(-110%);
  animation: dashboard-skeleton-shimmer 1.35s ease-in-out infinite;
}

.dashboard-skeleton-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 1px;
}

.dashboard-skeleton-metrics > i {
  border-radius: 0;
  background:
    linear-gradient(var(--skeleton-line), var(--skeleton-line)) 11px 18% / 42% 8px no-repeat,
    linear-gradient(var(--skeleton-strong), var(--skeleton-strong)) 11px 51% / 62% 17px no-repeat,
    linear-gradient(var(--skeleton-line), var(--skeleton-line)) 11px 80% / 52% 7px no-repeat,
    rgba(42, 59, 80, 0.24);
}

.dashboard-skeleton-list {
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

.dashboard-skeleton-list > i {
  background:
    linear-gradient(var(--skeleton-strong), var(--skeleton-strong)) 8px 30% / 24% 9px no-repeat,
    linear-gradient(var(--skeleton-line), var(--skeleton-line)) 8px 70% / 42% 7px no-repeat,
    linear-gradient(var(--skeleton-line), var(--skeleton-line)) calc(100% - 76px) 50% / 66px 9px no-repeat,
    rgba(42, 59, 80, 0.22);
}

.dashboard-skeleton-list > i:nth-child(2n) {
  background:
    linear-gradient(var(--skeleton-strong), var(--skeleton-strong)) 8px 30% / 31% 9px no-repeat,
    linear-gradient(var(--skeleton-line), var(--skeleton-line)) 8px 70% / 36% 7px no-repeat,
    linear-gradient(var(--skeleton-line), var(--skeleton-line)) calc(100% - 64px) 50% / 54px 9px no-repeat,
    rgba(42, 59, 80, 0.22);
}

.dashboard-skeleton-map {
  grid-template-columns: minmax(0, 3fr) minmax(86px, 1fr);
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 7px 12px;
  padding: 8px;
  border-radius: 8px;
  background:
    linear-gradient(rgba(100, 126, 158, 0.12), rgba(100, 126, 158, 0.12))
      calc(75% + 12px) 0 / 1px 100% no-repeat;
}

.dashboard-skeleton-map > i:first-child {
  grid-row: 1 / -1;
  border: 1px solid rgba(91, 116, 148, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(rgba(8, 17, 31, 0.68), rgba(8, 17, 31, 0.68)),
    url("china-map-3d.svg") center / min(78%, 760px) auto no-repeat,
    rgba(42, 59, 80, 0.2);
}

.dashboard-skeleton-map > i:not(:first-child) {
  border: 1px solid rgba(91, 116, 148, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(var(--skeleton-strong), var(--skeleton-strong)) 12px 27% / 32% 8px no-repeat,
    linear-gradient(var(--skeleton-line), var(--skeleton-line)) 12px 53% / 58% 7px no-repeat,
    linear-gradient(var(--skeleton-line), var(--skeleton-line)) calc(100% - 70px) 53% / 54px 9px no-repeat,
    linear-gradient(rgba(74, 96, 123, 0.26), rgba(74, 96, 123, 0.26)) 12px 78% / calc(100% - 24px) 3px no-repeat,
    rgba(42, 59, 80, 0.2);
}

.dashboard-skeleton-chart {
  grid-template-columns: repeat(12, minmax(3px, 1fr));
  gap: clamp(3px, 0.38vw, 8px);
  align-items: end;
  padding: 12px 8px 8px;
  border-radius: 7px;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(108, 133, 163, 0.13) 0 1px,
      transparent 1px 25%
    );
}

.dashboard-skeleton-chart > i {
  height: 42%;
  border-radius: 4px 4px 2px 2px;
}

.dashboard-skeleton-chart > i:nth-child(3n + 1) { height: 62%; }
.dashboard-skeleton-chart > i:nth-child(3n + 2) { height: 78%; }
.dashboard-skeleton-chart > i:nth-child(4n) { height: 54%; }
.dashboard-skeleton-chart > i:nth-child(5n) { height: 88%; }

.dashboard-skeleton-flow {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  padding: 8px 4px;
}

.dashboard-skeleton-flow > i {
  height: 72%;
  background:
    linear-gradient(var(--skeleton-line), var(--skeleton-line)) 18% 15% / 64% 8px no-repeat,
    linear-gradient(var(--skeleton-strong), var(--skeleton-strong)) 18% 34% / 72% 12px no-repeat,
    linear-gradient(rgba(83, 107, 136, 0.34), rgba(83, 107, 136, 0.34)) 50% 100% / 48% 52% no-repeat;
}

.dashboard-skeleton-flow > i:nth-child(2n) { height: 84%; }
.dashboard-skeleton-flow > i:nth-child(3n) { height: 62%; }

.dashboard-skeleton-realtime {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: minmax(34px, 0.72fr) repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.dashboard-skeleton-realtime > i:nth-child(n + 6) {
  grid-column: 1 / -1;
  background:
    linear-gradient(var(--skeleton-strong), var(--skeleton-strong)) 10px 50% / 26% 9px no-repeat,
    linear-gradient(var(--skeleton-line), var(--skeleton-line)) 52% 50% / 18% 8px no-repeat,
    linear-gradient(var(--skeleton-line), var(--skeleton-line)) calc(100% - 70px) 50% / 60px 8px no-repeat,
    rgba(42, 59, 80, 0.22);
}

.dashboard-skeleton-composition {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1.15fr) repeat(2, minmax(0, 0.72fr));
  gap: 6px;
}

.dashboard-skeleton-composition > i:first-child {
  grid-column: 1 / -1;
  border-radius: 9px;
}

.dashboard-skeleton-quality {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 6px 8px;
}

.dashboard-skeleton-quality > i {
  background:
    linear-gradient(var(--skeleton-line), var(--skeleton-line)) 8px 28% / 40% 7px no-repeat,
    linear-gradient(var(--skeleton-strong), var(--skeleton-strong)) 8px 62% / 68% 12px no-repeat,
    rgba(42, 59, 80, 0.22);
}

@keyframes dashboard-skeleton-shimmer {
  to { transform: translateX(110%); }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-skeleton > i::after {
    animation: none;
    opacity: 0.32;
    transform: none;
  }
}
