:root {
  color-scheme: dark;
  --bg-0: #020811;
  --bg-1: #061423;
  --bg-2: #081d30;
  --panel: rgba(5, 24, 40, 0.94);
  --panel-strong: #071e31;
  --line: rgba(66, 192, 235, 0.24);
  --line-strong: rgba(69, 218, 255, 0.58);
  --cyan: #43d9ff;
  --blue: #4d91ff;
  --green: #53dfb5;
  --orange: #ffad67;
  --pink: #ff6f91;
  --violet: #a58cff;
  --text: #eefaff;
  --muted: #84a9bb;
  --quiet: #5f8193;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 0;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 38%, rgba(23, 123, 173, 0.16), transparent 38%),
    var(--bg-0);
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.login-gate {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: clamp(24px, 5vw, 80px);
  background:
    linear-gradient(120deg, rgba(3, 12, 23, 0.96), rgba(4, 34, 56, 0.88)),
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(66, 211, 255, 0.035) 80px);
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1.15fr) minmax(350px, 0.75fr);
  gap: clamp(42px, 8vw, 140px);
  align-items: center;
  width: min(1180px, 100%);
}

.login-brand {
  min-width: 0;
}

.login-brand-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: #02111d;
  font-size: 20px;
  font-weight: 900;
  border-radius: 16px 4px 16px 4px;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  box-shadow: 0 0 44px rgba(67, 217, 255, 0.25);
}

.login-eyebrow {
  margin: 30px 0 10px;
  color: var(--cyan);
  font-size: 12px;
  letter-spacing: 0.24em;
}

.login-brand h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.08;
  letter-spacing: 0.02em;
}

.login-intro {
  max-width: 560px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.login-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.login-capabilities li {
  padding: 8px 12px;
  color: #bdefff;
  font-size: 12px;
  border: 1px solid rgba(67, 217, 255, 0.24);
  background: rgba(5, 28, 45, 0.78);
}

.login-card {
  min-width: 0;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid rgba(77, 181, 225, 0.34);
  background: rgba(5, 22, 37, 0.94);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
}

.login-card-heading p,
.login-card-heading h2 {
  margin: 0;
}

.login-card-heading p {
  color: var(--cyan);
  font-size: 10px;
  letter-spacing: 0.24em;
}

.login-card-heading h2 {
  margin-top: 8px;
  font-size: 24px;
}

.login-card-heading span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.login-form label {
  display: block;
  margin: 22px 0 8px;
  color: #b9d7e5;
  font-size: 13px;
}

.login-form input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  color: var(--text);
  border: 1px solid rgba(80, 179, 218, 0.28);
  border-radius: 4px;
  background: #071a2b;
}

.login-form input::placeholder {
  color: #587587;
}

.login-form > button {
  width: 100%;
  height: 46px;
  margin-top: 8px;
  color: #03121d;
  font-weight: 800;
  border: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--cyan), #62e2c0);
}

.login-error {
  min-height: 20px;
  margin: 9px 0 0;
  color: #ff8d95;
  font-size: 12px;
}

.screen-shell {
  width: 100vw;
  height: 100dvh;
  min-width: 0;
  overflow: auto;
  background:
    radial-gradient(circle at 50% 42%, rgba(26, 130, 179, 0.13), transparent 43%),
    linear-gradient(180deg, #030b15, #01070c);
}

.screen-canvas {
  display: grid;
  grid-template-rows: clamp(58px, 7.1dvh, 78px) clamp(92px, 11.2dvh, 122px) minmax(0, 1fr);
  gap: clamp(8px, 1dvh, 12px);
  width: 100vw;
  height: 100dvh;
  min-width: 1180px;
  min-height: 720px;
  padding: clamp(8px, 1vw, 18px);
  overflow: hidden;
  background: radial-gradient(circle at 50% 46%, rgba(22, 111, 151, 0.08), transparent 48%);
}

.command-header {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(410px, auto) minmax(330px, 1fr);
  gap: 18px;
  align-items: center;
  min-width: 0;
  padding: 0 clamp(10px, 1vw, 18px);
  border: 1px solid var(--line);
  border-top-color: rgba(73, 218, 255, 0.52);
  background: linear-gradient(90deg, rgba(5, 29, 48, 0.96), rgba(8, 43, 68, 0.82), rgba(5, 29, 48, 0.96));
  box-shadow: inset 0 -1px 0 rgba(61, 196, 238, 0.12);
}

.command-status {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.status-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}

.command-status > div {
  min-width: 0;
}

.command-status b,
.command-status span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-status b {
  color: #c8f2ff;
  font-size: clamp(11px, 0.72vw, 14px);
}

.command-status span {
  margin-top: 4px;
  color: var(--muted);
  font-size: clamp(9px, 0.62vw, 12px);
}

.command-status span.error {
  color: #ffb06f;
}

.command-title {
  display: grid;
  grid-template-columns: minmax(30px, 1fr) auto minmax(30px, 1fr);
  gap: 16px;
  align-items: center;
  min-width: 0;
  text-align: center;
}

.command-title > span {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan));
}

.command-title > span:last-child {
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.command-title p,
.command-title h1 {
  margin: 0;
  white-space: nowrap;
}

.command-title p {
  color: #72dfff;
  font-size: clamp(8px, 0.55vw, 11px);
  letter-spacing: 0.25em;
}

.command-title h1 {
  margin-top: 3px;
  font-size: clamp(20px, 1.65vw, 34px);
  letter-spacing: 0.12em;
  text-shadow: 0 0 20px rgba(69, 216, 255, 0.28);
}

.screen-controls {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.screen-controls button,
.geo-actions button,
.geo-actions select {
  height: 32px;
  padding: 0 clamp(8px, 0.65vw, 13px);
  color: #bce9f7;
  font-size: clamp(10px, 0.62vw, 12px);
  white-space: nowrap;
  border: 1px solid rgba(67, 193, 235, 0.32);
  border-radius: 3px;
  background: rgba(6, 31, 50, 0.94);
}

.period-switch {
  display: flex;
}

.period-switch button {
  border-radius: 0;
}

.period-switch button + button {
  margin-left: -1px;
}

.period-switch button:first-child {
  border-radius: 3px 0 0 3px;
}

.period-switch button:last-child {
  border-radius: 0 3px 3px 0;
}

.screen-controls button:hover,
.screen-controls button.active,
.geo-actions button:hover {
  color: #02121e;
  border-color: var(--cyan);
  background: var(--cyan);
}

.screen-controls button:disabled {
  cursor: wait;
  opacity: 0.45;
}

.metric-deck {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(7px, 0.7vw, 12px);
  min-width: 0;
}

.metric-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: clamp(10px, 1vw, 17px);
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  background: linear-gradient(135deg, rgba(8, 32, 51, 0.98), rgba(5, 23, 38, 0.96));
}

.metric-card::after {
  position: absolute;
  right: -35px;
  bottom: -52px;
  width: 100px;
  height: 100px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 50%;
  content: "";
}

.accent-cyan { --accent: var(--cyan); }
.accent-violet { --accent: var(--violet); }
.accent-green { --accent: var(--green); }
.accent-orange { --accent: var(--orange); }
.accent-pink { --accent: var(--pink); }
.accent-blue { --accent: var(--blue); }

.metric-card > span,
.metric-card p {
  display: block;
  max-width: calc(100% - 12px);
  color: var(--muted);
  font-size: clamp(9px, 0.68vw, 13px);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.metric-card > div {
  display: flex;
  gap: 7px;
  align-items: baseline;
  min-width: 0;
  margin-top: clamp(5px, 0.55dvh, 9px);
}

.metric-card strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: clamp(20px, 1.6vw, 34px);
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-card small {
  flex: 0 0 auto;
  color: var(--quiet);
  font-size: clamp(8px, 0.56vw, 11px);
}

.metric-card p {
  margin: clamp(5px, 0.6dvh, 9px) 0 0;
}

.operations-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.88fr) minmax(520px, 1.55fr) minmax(280px, 0.98fr);
  gap: clamp(8px, 0.75vw, 13px);
  min-width: 0;
  min-height: 0;
}

.operations-column {
  display: grid;
  gap: clamp(8px, 0.75dvh, 11px);
  min-width: 0;
  min-height: 0;
}

.operations-left {
  grid-template-rows: minmax(150px, 0.78fr) minmax(150px, 0.82fr) minmax(180px, 1.16fr);
}

.operations-center {
  grid-template-rows: minmax(390px, 1fr) minmax(170px, 0.38fr);
}

.operations-right {
  grid-template-rows: minmax(190px, 0.95fr) minmax(180px, 0.82fr) minmax(160px, 0.85fr);
}

.monitor-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(7, 29, 47, 0.98), rgba(4, 19, 32, 0.96));
  box-shadow: inset 0 1px 0 rgba(96, 218, 255, 0.045);
}

.monitor-panel::before,
.monitor-panel::after {
  position: absolute;
  z-index: 2;
  width: 28px;
  height: 12px;
  pointer-events: none;
  content: "";
}

.monitor-panel::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--cyan);
  border-left: 2px solid var(--cyan);
}

.monitor-panel::after {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid rgba(67, 217, 255, 0.48);
  border-bottom: 2px solid rgba(67, 217, 255, 0.48);
}

.panel-heading {
  display: flex;
  flex: 0 0 auto;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  min-height: clamp(36px, 4.2dvh, 46px);
  padding: 0 clamp(10px, 0.85vw, 16px);
  border-bottom: 1px solid rgba(66, 192, 235, 0.18);
  background: linear-gradient(90deg, rgba(14, 60, 91, 0.52), transparent);
}

.panel-heading > div,
.panel-heading > div > div {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.panel-heading > div > span {
  display: grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #03121e;
  font-size: 9px;
  font-weight: 900;
  background: var(--cyan);
}

.panel-heading h2,
.panel-heading p {
  margin: 0;
}

.panel-heading h2 {
  overflow: hidden;
  font-size: clamp(12px, 0.82vw, 16px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-heading p,
.panel-heading > small {
  color: #5f99b3;
  font-size: clamp(7px, 0.5vw, 10px);
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.conversion-bars {
  display: grid;
  gap: clamp(7px, 0.85dvh, 12px);
  min-height: 0;
  padding: clamp(10px, 1.15dvh, 16px) clamp(10px, 0.9vw, 16px);
  overflow: auto;
}

.conversion-row {
  display: grid;
  grid-template-columns: minmax(58px, 0.68fr) minmax(70px, 1.5fr) minmax(42px, auto);
  gap: 9px;
  align-items: center;
  min-width: 0;
}

.conversion-row > span {
  overflow: hidden;
  color: #bddbe7;
  font-size: clamp(9px, 0.65vw, 12px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversion-track,
.quality-track,
.ranking-track {
  height: 7px;
  overflow: hidden;
  background: #0c3048;
}

.conversion-track i,
.quality-track i,
.ranking-track i {
  display: block;
  width: var(--value);
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 45%, transparent);
}

.conversion-row strong {
  overflow-wrap: anywhere;
  color: #effbff;
  font-size: clamp(10px, 0.7vw, 13px);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.hourly-chart {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: clamp(1px, 0.15vw, 3px);
  align-items: end;
  min-height: 0;
  height: 100%;
  padding: clamp(12px, 1.35dvh, 18px) clamp(9px, 0.8vw, 14px) 10px;
}

.hourly-column {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: end;
  min-width: 0;
  height: 100%;
}

.hourly-column > i {
  display: block;
  width: min(16px, 78%);
  min-height: 3px;
  height: var(--height);
  margin: auto;
  background: linear-gradient(180deg, var(--cyan), rgba(54, 136, 208, 0.34));
  box-shadow: 0 0 10px rgba(67, 217, 255, 0.18);
}

.hourly-column > span {
  overflow: hidden;
  color: var(--quiet);
  font-size: clamp(7px, 0.5vw, 9px);
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table {
  min-height: 0;
  overflow: auto;
}

.data-table-row {
  display: grid;
  grid-template-columns: 30px minmax(70px, 1fr) minmax(72px, 0.9fr) minmax(64px, auto);
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: clamp(8px, 0.85dvh, 11px) clamp(10px, 0.9vw, 16px);
  color: #b8d8e6;
  font-size: clamp(9px, 0.62vw, 12px);
  border-bottom: 1px solid rgba(69, 176, 216, 0.1);
}

.data-table-row[data-action] {
  cursor: pointer;
}

.data-table-row[data-action]:hover,
.data-table-row[data-action]:focus-visible {
  color: #f0fbff;
  background: rgba(38, 143, 184, 0.15);
}

.data-table-row > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.data-table-row > span {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.data-table-row b {
  color: var(--cyan);
  font-size: 10px;
}

.data-table-row strong {
  color: var(--green);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.empty-state {
  display: grid;
  min-height: 80px;
  place-items: center;
  padding: 16px;
  color: var(--quiet);
  font-size: 11px;
  text-align: center;
}

.map-panel {
  overflow: visible;
}

.map-heading {
  z-index: 4;
}

.map-heading > div > div {
  display: block;
}

.geo-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.geo-actions label {
  color: var(--muted);
  font-size: clamp(9px, 0.6vw, 11px);
  white-space: nowrap;
}

.geo-actions select,
.geo-actions button {
  max-width: 126px;
  height: 28px;
}

.geo-drilldown {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 8px clamp(8px, 0.7vw, 13px) 9px;
  background: radial-gradient(circle at 50% 48%, rgba(18, 126, 170, 0.18), transparent 52%);
}

.geo-breadcrumb {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  align-items: center;
  min-height: 22px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 10px;
}

.geo-breadcrumb button {
  padding: 0;
  color: var(--cyan);
  border: 0;
  background: transparent;
}

.geo-breadcrumb span::before {
  margin-right: 6px;
  color: var(--quiet);
  content: "/";
}

.geo-layout {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}

.geo-drilldown[data-level="province"] .geo-layout,
.geo-drilldown[data-level="city"] .geo-layout {
  grid-template-columns: minmax(0, 1.32fr) minmax(220px, 0.68fr);
  gap: 12px;
}

.geo-map-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
}

.geo-map-mount {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.geo-map-mount svg {
  display: block;
  width: 100%;
  height: 100%;
}

.geo-map-mount [data-province],
.geo-map-mount [data-geo-city],
.geo-map-mount [data-geo-district] {
  cursor: pointer;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 140ms ease, filter 140ms ease, transform 140ms ease;
}

.geo-map-mount [data-province]:hover,
.geo-map-mount [data-province]:focus,
.geo-map-mount [data-geo-city]:hover,
.geo-map-mount [data-geo-city]:focus,
.geo-map-mount [data-geo-district]:hover,
.geo-map-mount [data-geo-district]:focus,
.geo-map-mount .geo-selected {
  opacity: 1 !important;
  filter: drop-shadow(0 0 7px rgba(67, 217, 255, 0.96));
}

.geo-map-mount .geo-muted {
  opacity: 0.08 !important;
  pointer-events: none;
}

.geo-map-caption {
  position: absolute;
  bottom: 3px;
  left: 50%;
  max-width: calc(100% - 18px);
  margin: 0;
  padding: 4px 9px;
  overflow: hidden;
  color: #86aec0;
  font-size: clamp(8px, 0.54vw, 10px);
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(67, 217, 255, 0.2);
  background: rgba(3, 17, 28, 0.9);
  transform: translateX(-50%);
}

.geo-detail {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding-right: 3px;
}

.geo-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.geo-summary article {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(67, 217, 255, 0.16);
  background: rgba(9, 40, 62, 0.88);
}

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

.geo-summary span {
  color: var(--muted);
  font-size: 9px;
}

.geo-summary strong {
  margin-top: 3px;
  color: var(--text);
  font-size: clamp(11px, 0.82vw, 15px);
  font-variant-numeric: tabular-nums;
}

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

.geo-city-list > strong,
.geo-user-list > strong {
  color: #c7ebf7;
  font-size: 11px;
}

.geo-city-list button,
.geo-user-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-width: 0;
  min-height: 32px;
  padding: 6px 8px;
  color: #abd0df;
  text-align: left;
  border: 1px solid rgba(67, 217, 255, 0.14);
  background: rgba(7, 30, 48, 0.92);
}

.geo-city-list button:hover,
.geo-city-list button.active,
.geo-user-list button:hover {
  color: #02121d;
  border-color: var(--cyan);
  background: var(--cyan);
}

.geo-city-list button > *,
.geo-user-list button > * {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-city-list small,
.geo-user-list small {
  font-size: 9px;
}

.geo-empty {
  margin: 0;
  padding: 12px 8px;
  color: var(--quiet);
  font-size: 10px;
  text-align: center;
  border: 1px dashed rgba(67, 217, 255, 0.16);
}

.center-bottom {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 0.75vw, 13px);
  min-width: 0;
  min-height: 0;
}

.ranking-list {
  display: grid;
  gap: 7px;
  min-height: 0;
  padding: clamp(9px, 1dvh, 14px) clamp(10px, 0.85vw, 15px);
  overflow: auto;
}

.ranking-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) minmax(48px, auto);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.ranking-row > b {
  color: var(--cyan);
  font-size: 9px;
}

.ranking-content {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ranking-label {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ranking-label span,
.ranking-label small {
  overflow-wrap: anywhere;
  white-space: normal;
}

.ranking-label span {
  color: #c2e2ee;
  font-size: clamp(9px, 0.62vw, 11px);
}

.ranking-label small {
  color: var(--quiet);
  font-size: 8px;
}

.ranking-row > strong {
  overflow-wrap: anywhere;
  color: #ebfaff;
  font-size: clamp(9px, 0.63vw, 12px);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.bridge-chart {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(5px, 0.55vw, 10px);
  align-items: stretch;
  min-height: 0;
  padding: clamp(10px, 1.15dvh, 16px) clamp(9px, 0.75vw, 14px);
}

.bridge-column {
  display: grid;
  grid-template-rows: minmax(50px, 1fr) auto auto;
  gap: 5px;
  min-width: 0;
  text-align: center;
}

.bridge-bar-stage {
  display: flex;
  min-height: 0;
  align-items: flex-end;
  justify-content: center;
  border-bottom: 1px solid rgba(98, 191, 225, 0.23);
  background: linear-gradient(180deg, transparent, rgba(42, 131, 164, 0.06));
}

.bridge-bar {
  width: min(30px, 62%);
  height: var(--height);
  min-height: 3px;
  background: var(--cyan);
}

.bridge-column.cost .bridge-bar { background: var(--orange); }
.bridge-column.fee .bridge-bar { background: var(--violet); }
.bridge-column.profit .bridge-bar { background: var(--green); }
.bridge-column.pending .bridge-bar { background: var(--quiet); }

.bridge-column strong {
  min-width: 0;
  overflow: hidden;
  color: #effbff;
  font-size: clamp(8px, 0.58vw, 11px);
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bridge-column > span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: clamp(7px, 0.52vw, 10px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.points-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  min-height: 0;
  padding: clamp(9px, 1dvh, 14px);
  overflow: auto;
}

.points-item {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(67, 217, 255, 0.13);
  background: rgba(9, 38, 58, 0.76);
}

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

.points-item span {
  color: var(--muted);
  font-size: clamp(8px, 0.55vw, 10px);
}

.points-item strong {
  margin-top: 4px;
  color: #eafaff;
  font-size: clamp(13px, 0.95vw, 18px);
  font-variant-numeric: tabular-nums;
}

.points-item small {
  margin-top: 3px;
  color: var(--quiet);
  font-size: 8px;
}

.quality-grid {
  display: grid;
  gap: clamp(8px, 0.9dvh, 12px);
  min-height: 0;
  padding: clamp(10px, 1.15dvh, 16px) clamp(10px, 0.85vw, 15px);
  overflow: auto;
}

.quality-item > div:first-child {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
  margin-bottom: 6px;
}

.quality-item span,
.quality-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quality-item span {
  color: #b8d8e6;
  font-size: clamp(9px, 0.62vw, 11px);
}

.quality-item strong {
  color: #effbff;
  font-size: clamp(9px, 0.62vw, 11px);
  font-variant-numeric: tabular-nums;
}

.loading-mask {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  color: #bce9f7;
  background: rgba(2, 10, 18, 0.72);
  backdrop-filter: blur(2px);
}

.loading-mask span {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(67, 217, 255, 0.18);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: monitor-spin 0.8s linear infinite;
}

.loading-mask p {
  margin: 13px 0 0;
  font-size: 12px;
}

@keyframes monitor-spin {
  to { transform: rotate(1turn); }
}

.economics-dialog {
  width: min(1260px, calc(100vw - 40px));
  max-height: calc(100dvh - 40px);
  padding: 0;
  color: var(--text);
  border: 1px solid var(--line-strong);
  background: #061523;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.72);
}

.economics-dialog::backdrop {
  background: rgba(0, 5, 10, 0.82);
}

.economics-dialog > section {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 42px);
  min-width: 0;
}

.economics-dialog header {
  display: flex;
  flex: 0 0 auto;
  gap: 18px;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, #0a2d47, #071a2c);
}

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

.economics-dialog header p {
  color: var(--cyan);
  font-size: 9px;
  letter-spacing: 0.2em;
}

.economics-dialog header h2 {
  margin-top: 5px;
  font-size: 20px;
}

.economics-dialog header span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.economics-dialog header button {
  padding: 7px 12px;
  color: #c7ebf7;
  border: 1px solid var(--line-strong);
  background: #082238;
}

.economics-notice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 10px 20px;
  color: #d9b56c;
  font-size: 11px;
  border-bottom: 1px solid rgba(255, 184, 88, 0.18);
  background: rgba(105, 70, 21, 0.13);
}

.economics-summary {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 20px;
}

.economics-summary article {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  background: #082137;
}

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

.economics-summary span {
  color: var(--muted);
  font-size: 9px;
}

.economics-summary strong {
  margin-top: 4px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.economics-table-wrap {
  min-height: 0;
  overflow: auto;
  padding: 0 20px 12px;
}

.economics-table-wrap table {
  width: 100%;
  min-width: 1060px;
  border-collapse: collapse;
  table-layout: fixed;
}

.economics-table-wrap th,
.economics-table-wrap td {
  padding: 9px 8px;
  vertical-align: top;
  text-align: left;
  border-bottom: 1px solid rgba(70, 176, 218, 0.14);
}

.economics-table-wrap th {
  position: sticky;
  z-index: 1;
  top: 0;
  color: #8ec7dc;
  font-size: 10px;
  background: #082238;
}

.economics-table-wrap td {
  overflow-wrap: anywhere;
  color: #cae4ed;
  font-size: 10px;
}

.economics-table-wrap td span,
.economics-table-wrap td small {
  display: block;
}

.economics-table-wrap td small {
  margin-top: 3px;
  color: var(--quiet);
  font-size: 8px;
}

.economics-table-wrap .pending-value {
  color: #eabf69;
}

.economics-dialog footer {
  flex: 0 0 auto;
  padding: 10px 20px;
  color: var(--muted);
  font-size: 10px;
  border-top: 1px solid var(--line);
}

@media (max-width: 1480px) {
  .screen-canvas {
    grid-template-rows: 58px 92px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }

  .command-header {
    grid-template-columns: minmax(220px, 0.9fr) minmax(360px, auto) minmax(300px, 1fr);
    gap: 10px;
  }

  .operations-grid,
  .center-bottom {
    gap: 8px;
  }

  .panel-heading > small,
  .command-title p {
    display: none;
  }

  .metric-card {
    padding: 10px;
  }

  .points-summary {
    gap: 5px;
    padding: 7px;
  }

  .points-item {
    padding: 6px 7px;
  }

  .operations-grid {
    grid-template-columns: minmax(230px, 0.85fr) minmax(500px, 1.5fr) minmax(250px, 0.92fr);
  }
}

@media (max-width: 1179px) {
  body {
    overflow: auto;
  }

  .screen-canvas {
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 100dvh;
    overflow: visible;
  }

  .command-header {
    grid-template-columns: 1fr auto;
  }

  .command-status {
    display: none;
  }

  .command-title {
    grid-template-columns: auto;
    text-align: left;
  }

  .command-title > span {
    display: none;
  }

  .metric-deck {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .operations-grid {
    grid-template-columns: minmax(280px, 0.8fr) minmax(520px, 1.4fr);
    grid-template-rows: auto auto;
  }

  .operations-left,
  .operations-center,
  .operations-right {
    min-height: 700px;
  }

  .operations-right {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: minmax(260px, auto);
    min-height: 280px;
  }
}

@media (max-width: 820px) {
  .login-layout {
    grid-template-columns: 1fr;
  }

  .login-brand {
    display: none;
  }

  .command-header {
    grid-template-columns: 1fr;
    height: auto;
    padding: 8px;
  }

  .command-title {
    text-align: center;
  }

  .screen-controls {
    justify-content: center;
  }

  .metric-deck {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .operations-grid {
    display: block;
  }

  .operations-column,
  .operations-left,
  .operations-center,
  .operations-right {
    display: grid;
    min-height: 0;
    margin-bottom: 10px;
  }

  .operations-left,
  .operations-right {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, minmax(240px, auto));
  }

  .operations-center {
    grid-template-rows: minmax(500px, 1fr) auto;
  }

  .center-bottom {
    grid-template-columns: 1fr;
  }

  .geo-drilldown[data-level="province"] .geo-layout,
  .geo-drilldown[data-level="city"] .geo-layout {
    grid-template-columns: 1fr;
  }

  .geo-detail {
    max-height: 280px;
  }

  .economics-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 2560px) {
  .screen-canvas {
    padding: 18px;
  }

  .operations-grid,
  .operations-column,
  .center-bottom {
    gap: 14px;
  }

  .data-table-row,
  .conversion-row,
  .ranking-row {
    font-size: 13px;
  }
}
