:root {
  color-scheme: dark;
  --bg: #06111f;
  --bg-deep: #030a13;
  --panel: rgba(8, 25, 43, 0.82);
  --panel-strong: rgba(8, 28, 49, 0.94);
  --panel-soft: rgba(13, 38, 62, 0.65);
  --line: rgba(106, 183, 235, 0.15);
  --line-strong: rgba(106, 202, 255, 0.3);
  --text: #edf7ff;
  --text-soft: #b7d1e4;
  --muted: #7294ac;
  --muted-strong: #96b5ca;
  --blue: #4c8dff;
  --cyan: #33d6ff;
  --green: #36e5a5;
  --orange: #ffb45e;
  --violet: #9f88ff;
  --danger: #ff6f89;
  --shadow: 0 20px 60px rgba(0, 4, 11, 0.34);
  --radius: 18px;
  --font: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg-deep);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -20%, rgba(25, 103, 178, 0.25), transparent 42%),
    linear-gradient(145deg, #061422 0%, #06101c 48%, #030911 100%);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(rgba(83, 156, 207, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(83, 156, 207, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 82%);
  mask-image: linear-gradient(to bottom, black, transparent 82%);
  pointer-events: none;
}

button,
input {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
}

.screen-atmosphere,
.glow {
  position: fixed;
  z-index: 0;
  pointer-events: none;
}

.screen-atmosphere {
  inset: 0;
  overflow: hidden;
}

.glow {
  border-radius: 50%;
  filter: blur(1px);
}

.glow-a {
  top: -340px;
  left: 18%;
  width: 720px;
  height: 560px;
  background: radial-gradient(circle, rgba(44, 112, 255, 0.19), transparent 68%);
}

.glow-b {
  top: 44%;
  right: -260px;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(38, 212, 240, 0.1), transparent 70%);
}

.glow-c {
  bottom: -260px;
  left: -180px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(96, 92, 255, 0.08), transparent 70%);
}

.screen-shell {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(100%, 2400px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 24px;
  flex-direction: column;
}

.screen-header {
  display: grid;
  min-height: 92px;
  padding: 17px 2px 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  grid-template-columns: minmax(225px, 1fr) minmax(380px, 1.25fr) minmax(350px, 1fr);
  gap: 24px;
}

.brand-lockup {
  display: inline-flex;
  width: max-content;
  color: var(--text);
  align-items: center;
  gap: 13px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 22px rgba(255, 54, 103, 0.16);
  place-items: center;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-copy b {
  display: block;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-copy b span {
  margin-left: 2px;
  color: var(--cyan);
}

.brand-copy small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.page-heading {
  min-width: 0;
  text-align: center;
}

.page-heading span {
  display: block;
  color: #5d88a5;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.28em;
}

.page-heading h1 {
  margin: 7px 0 0;
  color: #f4fbff;
  font-size: clamp(24px, 1.8vw, 32px);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-shadow: 0 0 28px rgba(64, 197, 255, 0.2);
}

.header-tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.live-status {
  display: flex;
  min-height: 34px;
  padding: 0 12px;
  align-items: center;
  border: 1px solid rgba(64, 215, 164, 0.18);
  border-radius: 9px;
  color: #9edbc8;
  background: rgba(31, 170, 128, 0.07);
  gap: 8px;
  white-space: nowrap;
}

.live-status i,
.healthy-badge i,
.online-count i,
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(54, 229, 165, 0.08), 0 0 12px rgba(54, 229, 165, 0.42);
}

.live-status span {
  font-size: 11px;
}

.live-status time {
  padding-left: 8px;
  border-left: 1px solid rgba(85, 204, 168, 0.15);
  color: #6fa991;
  font-size: 10px;
}

.screen-clock {
  min-width: 82px;
  color: #d6eaf8;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  text-align: center;
}

.icon-button {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #9fbfd3;
  background: rgba(10, 34, 56, 0.68);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.icon-button:hover {
  border-color: var(--line-strong);
  color: var(--cyan);
  background: rgba(21, 65, 98, 0.76);
}

.icon-button:focus-visible,
.region-button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.icon-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.icon-button::after {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  content: attr(data-tooltip);
  color: var(--text-soft);
  background: #0b2135;
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}

.icon-button:hover::after,
.icon-button:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.dashboard-main {
  display: flex;
  padding: 18px 0 12px;
  flex: 1;
  flex-direction: column;
  gap: 16px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.kpi-card,
.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(12, 37, 60, 0.9), rgba(6, 22, 38, 0.82));
  box-shadow: var(--shadow);
}

.kpi-card::before,
.panel::before {
  position: absolute;
  z-index: 0;
  content: "";
  pointer-events: none;
}

.kpi-card::before {
  top: 0;
  left: 20px;
  width: 72px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.kpi-card {
  --accent: var(--blue);
  min-height: 130px;
  padding: 19px 20px 18px;
  border-radius: 16px;
}

.kpi-card.accent-cyan {
  --accent: var(--cyan);
}

.kpi-card.accent-green {
  --accent: var(--green);
}

.kpi-card.accent-orange {
  --accent: var(--orange);
}

.kpi-card::after {
  position: absolute;
  top: -54px;
  right: -36px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  content: "";
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 16%, transparent), transparent 68%);
  pointer-events: none;
}

.kpi-top,
.kpi-value,
.kpi-foot {
  position: relative;
  z-index: 1;
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #91afc4;
  font-size: 12px;
}

.kpi-icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-radius: 9px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.kpi-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.kpi-value {
  display: flex;
  margin: 12px 0 6px;
  align-items: baseline;
  color: #f3fbff;
  font-family: "Bahnschrift", "DIN Alternate", var(--font);
  font-size: clamp(28px, 2.2vw, 39px);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
}

.kpi-value small {
  margin-left: 7px;
  color: #6f94ac;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
}

.kpi-money {
  font-size: clamp(24px, 1.9vw, 34px);
}

.kpi-money > small {
  margin-right: 5px;
  margin-left: 0;
  color: var(--orange);
  font-family: "Bahnschrift", sans-serif;
  font-size: 17px;
}

.kpi-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #668ba2;
  font-size: 10px;
}

.kpi-foot b {
  color: #a4c4d6;
  font-weight: 500;
}

.kpi-foot em {
  padding: 3px 7px;
  border-radius: 5px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.kpi-foot .is-up {
  color: var(--green);
  background: rgba(54, 229, 165, 0.08);
}

.kpi-spark {
  position: absolute;
  right: 20px;
  bottom: 17px;
  display: flex;
  width: 68px;
  height: 26px;
  align-items: flex-end;
  justify-content: space-between;
  opacity: 0.75;
}

.kpi-spark i {
  width: 6px;
  height: var(--h);
  border-radius: 2px 2px 0 0;
  background: linear-gradient(to top, rgba(76, 141, 255, 0.16), var(--blue));
}

.kpi-spark-line i {
  background: linear-gradient(to top, rgba(54, 229, 165, 0.16), var(--green));
}

.kpi-meter {
  position: absolute;
  right: 20px;
  bottom: 18px;
  width: 86px;
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(120, 181, 218, 0.12);
}

.kpi-meter i {
  display: block;
  width: var(--progress, 94.4%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(51, 214, 255, 0.25), var(--cyan));
}

.kpi-meter.is-orange i {
  background: linear-gradient(90deg, rgba(255, 180, 94, 0.22), var(--orange));
}

.dashboard-layout {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-columns: minmax(0, 2.25fr) minmax(340px, 0.9fr);
  gap: 16px;
}

.left-stack,
.right-stack {
  display: grid;
  min-width: 0;
  min-height: 0;
  gap: 16px;
}

.left-stack {
  grid-template-rows: minmax(0, 1.45fr) minmax(0, 0.75fr);
}

.right-stack {
  grid-template-rows: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.panel {
  border-radius: var(--radius);
}

.panel::before {
  top: 0;
  left: 18px;
  width: 52px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(72, 205, 255, 0.75), transparent);
}

.panel-heading {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 58px;
  padding: 17px 19px 12px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-kicker {
  display: block;
  margin-bottom: 5px;
  color: #507b98;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.panel-heading h2 {
  margin: 0;
  color: #eaf7ff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.panel-heading-meta {
  display: flex;
  align-items: center;
  color: #7496ab;
  font-size: 10px;
  gap: 12px;
}

.panel-heading-meta span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.panel-heading-meta strong {
  padding: 5px 8px;
  border: 1px solid rgba(51, 214, 255, 0.14);
  border-radius: 6px;
  color: var(--cyan);
  background: rgba(51, 214, 255, 0.06);
  font-size: 10px;
  font-weight: 500;
}

.status-dot {
  display: block;
  width: 5px;
  height: 5px;
  box-shadow: 0 0 0 3px rgba(54, 229, 165, 0.06);
}

.map-panel {
  display: flex;
  flex-direction: column;
}

.map-body {
  display: grid;
  min-height: 0;
  padding: 0 19px 16px;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) 218px;
  gap: 17px;
}

.map-stage {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(78, 151, 199, 0.1);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 48%, rgba(31, 113, 172, 0.1), transparent 45%),
    rgba(3, 15, 26, 0.34);
  flex-direction: column;
}

.map-summary {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  display: flex;
  padding: 10px 12px;
  align-items: stretch;
  border: 1px solid rgba(72, 161, 211, 0.1);
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(4, 19, 33, 0.88), rgba(4, 19, 33, 0.56));
  box-shadow: 0 12px 30px rgba(0, 7, 16, 0.14);
  backdrop-filter: blur(8px);
  gap: 0;
}

.map-summary > div {
  min-width: 0;
  padding: 0 14px;
  border-right: 1px solid rgba(92, 164, 206, 0.12);
}

.map-summary > div:first-child {
  padding-left: 0;
}

.map-summary > div:last-child {
  border-right: 0;
}

.map-summary span {
  display: block;
  margin-bottom: 4px;
  color: #60869e;
  font-size: 10px;
  white-space: nowrap;
}

.map-summary strong {
  color: #dff5ff;
  font-family: "Bahnschrift", var(--font);
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.map-canvas {
  position: relative;
  min-height: 250px;
  flex: 1;
}

.recent-conversations {
  position: absolute;
  z-index: 4;
  top: 50%;
  right: 18px;
  width: clamp(270px, 19vw, 352px);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: translateY(-50%);
}

.recent-conversations::before {
  position: absolute;
  z-index: 0;
  inset: -18px -20px;
  border-radius: 50%;
  content: "";
  background: radial-gradient(ellipse at 65% 50%, rgba(4, 20, 35, 0.58), rgba(4, 20, 35, 0.14) 48%, transparent 72%);
  filter: blur(7px);
  pointer-events: none;
}

.recent-conversations-head {
  position: relative;
  z-index: 1;
  display: flex;
  height: 25px;
  padding: 0 6px;
  align-items: center;
  justify-content: space-between;
  border: 0;
  background: transparent;
}

.recent-conversations-head span {
  display: flex;
  align-items: center;
  color: #b8d9e9;
  font-size: 11px;
  font-weight: 500;
  gap: 7px;
}

.recent-conversations-head span i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(54, 229, 165, 0.65);
  animation: liveConversationPulse 2.4s ease-in-out infinite;
}

.recent-conversations-head small {
  color: #4f7c94;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 5px rgba(2, 9, 17, 0.9);
}

.conversation-window {
  position: relative;
  z-index: 1;
  height: 102px;
  overflow: hidden;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 12%, black 86%, transparent);
  mask-image: linear-gradient(to bottom, transparent, black 12%, black 86%, transparent);
}

.conversation-window::-webkit-scrollbar {
  display: none;
}

.conversation-track {
  animation: conversationScroll 22s linear infinite;
  will-change: transform;
}

.recent-conversations:hover .conversation-track,
.recent-conversations:focus-within .conversation-track {
  animation-play-state: paused;
}

.conversation-group {
  padding: 3px 0;
}

.conversation-line {
  display: grid;
  min-height: 44px;
  padding: 7px 6px;
  align-items: center;
  border: 0;
  background: transparent;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  text-shadow: 0 1px 5px rgba(2, 12, 22, 0.95);
  transition: background 0.18s ease;
}

.conversation-line:hover {
  background: linear-gradient(90deg, transparent, rgba(28, 94, 132, 0.16));
}

.conversation-avatar {
  display: none;
}

.conversation-copy {
  min-width: 0;
}

.conversation-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
}

.conversation-main b {
  flex: 0 0 auto;
  color: #b9d6e6;
  font-size: 10px;
  font-weight: 500;
}

.conversation-main i {
  color: #44cceb;
  font-size: 10px;
  font-style: normal;
  filter: drop-shadow(0 0 4px rgba(51, 214, 255, 0.45));
}

.conversation-main span {
  overflow: hidden;
  color: #7fa3b8;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-meta {
  display: flex;
  margin-top: 4px;
  align-items: center;
  color: #496e84;
  font-size: 9px;
  gap: 6px;
}

.conversation-meta em {
  margin-left: auto;
  padding: 2px 5px;
  border-radius: 4px;
  color: #6fb9a0;
  background: transparent;
  font-style: normal;
}

@keyframes conversationScroll {
  to {
    transform: translateY(-50%);
  }
}

@keyframes liveConversationPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.45;
    transform: scale(0.72);
  }
}

#chinaMap {
  width: 100%;
  height: 100%;
}

.map-province {
  stroke: rgba(105, 190, 235, 0.36);
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
  transition: fill 0.18s ease, stroke 0.18s ease, filter 0.18s ease;
}

.map-province:hover,
.map-province.is-active {
  stroke: #7ce8ff;
  stroke-width: 1.3;
  filter: drop-shadow(0 0 5px rgba(51, 214, 255, 0.55));
}

.map-label {
  fill: rgba(220, 242, 255, 0.78);
  font-family: var(--font);
  font-size: 9px;
  pointer-events: none;
  text-anchor: middle;
  text-shadow: 0 1px 4px #03101c;
}

.map-hub-ring {
  fill: none;
  stroke: rgba(51, 214, 255, 0.3);
  stroke-width: 0.8;
  pointer-events: none;
}

.map-hub {
  fill: var(--cyan);
  stroke: #d7fbff;
  stroke-width: 0.7;
  pointer-events: none;
}

.map-tooltip,
.chart-tooltip {
  position: absolute;
  z-index: 6;
  min-width: 124px;
  padding: 9px 10px;
  border: 1px solid rgba(99, 199, 243, 0.24);
  border-radius: 8px;
  color: var(--text-soft);
  background: rgba(5, 20, 34, 0.96);
  box-shadow: 0 12px 26px rgba(0, 6, 15, 0.34);
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.map-tooltip.is-visible,
.chart-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.map-tooltip b,
.chart-tooltip b {
  display: block;
  margin-bottom: 4px;
  color: #f1fbff;
  font-size: 11px;
  font-weight: 500;
}

.map-tooltip span,
.chart-tooltip span {
  display: flex;
  margin-top: 3px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #7fa2b8;
}

.map-tooltip em,
.chart-tooltip em {
  color: var(--cyan);
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.map-status {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: 0;
  color: #6d9bb6;
  font-size: 11px;
  transform: translate(-50%, -50%);
}

.map-status[hidden] {
  display: none;
}

.map-legend {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  padding: 18px 13px 10px;
  align-items: center;
  color: #52798f;
  background: linear-gradient(to top, rgba(3, 15, 26, 0.9), rgba(3, 15, 26, 0));
  font-size: 8px;
  gap: 8px;
}

.legend-scale {
  display: flex;
  gap: 3px;
}

.legend-scale i {
  width: 18px;
  height: 4px;
  border-radius: 1px;
  background: rgba(52, 155, 222, 0.22);
}

.legend-scale i:nth-child(2) {
  background: rgba(52, 155, 222, 0.38);
}

.legend-scale i:nth-child(3) {
  background: rgba(52, 180, 234, 0.56);
}

.legend-scale i:nth-child(4) {
  background: rgba(51, 205, 245, 0.74);
}

.legend-scale i:nth-child(5) {
  background: rgba(78, 228, 255, 0.92);
}

.map-legend em {
  margin-left: auto;
  color: #43667c;
  font-style: normal;
}

.region-ranking {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid rgba(78, 151, 199, 0.1);
  border-radius: 12px;
  background: rgba(4, 18, 31, 0.26);
}

.ranking-title {
  display: flex;
  padding: 0 3px 10px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(98, 172, 215, 0.1);
}

.ranking-title span {
  color: #bdd7e7;
  font-size: 12px;
  font-weight: 500;
}

.ranking-title small {
  color: #4f758b;
  font-size: 9px;
}

.region-list {
  display: flex;
  padding-top: 6px;
  flex-direction: column;
}

.region-button {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 35px;
  padding: 6px 3px;
  align-items: center;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  grid-template-columns: 19px minmax(52px, 0.7fr) minmax(54px, 1fr) auto;
  gap: 8px;
}

.region-button::before {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 19px;
  height: 1px;
  content: "";
  background: rgba(78, 151, 199, 0.075);
}

.region-button:last-child::before {
  display: none;
}

.region-rank {
  color: #567d94;
  font-family: "Bahnschrift", var(--font);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.region-button:nth-child(-n + 3) .region-rank {
  color: var(--cyan);
}

.region-name {
  overflow: hidden;
  color: #a9c6d7;
  font-size: 11px;
  text-overflow: ellipsis;
  transition: color 0.16s ease;
  white-space: nowrap;
}

.region-bar {
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(78, 151, 199, 0.1);
}

.region-bar i {
  display: block;
  width: var(--bar);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(43, 147, 211, 0.24), rgba(51, 214, 255, 0.9));
}

.region-count {
  color: #7397ac;
  font-family: "Bahnschrift", var(--font);
  font-size: 11px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.region-button:hover .region-name,
.region-button.is-active .region-name {
  color: #e4f7ff;
}

.region-button.is-active .region-name {
  text-shadow: 0 0 14px rgba(51, 214, 255, 0.45);
}

.lower-grid {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-columns: minmax(0, 1.55fr) minmax(285px, 0.9fr);
  gap: 16px;
}

.trend-panel,
.sales-panel,
.ai-panel,
.stores-panel {
  min-height: 0;
}

.trend-panel {
  display: flex;
  flex-direction: column;
}

.chart-legend {
  display: flex;
  padding-top: 3px;
  align-items: center;
  color: #6e93aa;
  font-size: 9px;
  gap: 13px;
}

.chart-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.chart-legend i {
  width: 12px;
  height: 2px;
  border-radius: 2px;
}

.legend-total {
  background: var(--cyan);
  box-shadow: 0 0 7px rgba(51, 214, 255, 0.5);
}

.legend-ai {
  background: var(--green);
}

.trend-chart-wrap {
  position: relative;
  min-height: 0;
  padding: 0 10px 10px;
  flex: 1;
}

#conversationTrend {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-grid {
  stroke: rgba(89, 161, 204, 0.11);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.chart-axis-label {
  fill: #557e96;
  font-family: var(--font);
  font-size: 9px;
}

.chart-hit {
  fill: transparent;
  pointer-events: all;
}

.chart-point {
  fill: #061829;
  stroke-width: 1.5;
  pointer-events: none;
}

.chart-direct-label {
  font-family: "Bahnschrift", var(--font);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.chart-tooltip {
  min-width: 136px;
}

.chart-tooltip span i {
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
}

.sales-panel {
  display: flex;
  flex-direction: column;
}

.panel-total {
  color: var(--orange);
  font-family: "Bahnschrift", var(--font);
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.platform-sales {
  display: flex;
  padding: 1px 19px 14px;
  flex: 1;
  flex-direction: column;
  justify-content: space-evenly;
}

.platform-row {
  display: grid;
  min-height: 31px;
  align-items: center;
  grid-template-columns: 20px minmax(48px, 72px) minmax(52px, 1fr) auto;
  gap: 8px;
}

.platform-logo {
  display: grid;
  width: 20px;
  height: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  place-items: center;
}

.platform-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.platform-name {
  overflow: hidden;
  color: #9fbccd;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-track {
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(95, 168, 213, 0.1);
}

.platform-track i {
  display: block;
  width: var(--bar);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(76, 141, 255, 0.3), var(--bar-color, var(--cyan)));
}

.platform-amount {
  min-width: 56px;
  color: #759bb1;
  font-family: "Bahnschrift", var(--font);
  font-size: 10px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.healthy-badge {
  display: flex;
  padding: 5px 8px;
  align-items: center;
  border: 1px solid rgba(54, 229, 165, 0.14);
  border-radius: 6px;
  color: #7fc8ad;
  background: rgba(54, 229, 165, 0.06);
  font-size: 8px;
  gap: 7px;
}

.healthy-badge i {
  width: 5px;
  height: 5px;
  box-shadow: none;
}

.ai-body {
  display: grid;
  min-height: 0;
  padding: 1px 19px 12px;
  align-items: center;
  grid-template-columns: minmax(130px, 0.9fr) minmax(130px, 1.1fr);
  gap: 12px;
}

.gauge {
  position: relative;
  display: grid;
  width: clamp(122px, 10vw, 154px);
  aspect-ratio: 1;
  margin: auto;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #081b2e 57%, transparent 58%),
    conic-gradient(from 210deg, var(--cyan) 0deg, var(--green) calc(var(--value) * 3deg), rgba(80, 153, 194, 0.11) calc(var(--value) * 3deg), rgba(80, 153, 194, 0.11) 300deg, transparent 300deg);
  box-shadow: inset 0 0 34px rgba(51, 214, 255, 0.05), 0 0 24px rgba(51, 214, 255, 0.05);
}

.gauge::before {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(87, 180, 222, 0.09);
  border-radius: 50%;
  content: "";
}

.gauge-inner {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.gauge-inner strong {
  color: #effcff;
  font-family: "Bahnschrift", var(--font);
  font-size: clamp(27px, 2.2vw, 37px);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.gauge-inner strong small {
  margin-left: 2px;
  color: var(--cyan);
  font-size: 13px;
}

.gauge-inner span {
  margin-top: 3px;
  color: #668da4;
  font-size: 10px;
}

.ai-stats {
  display: flex;
  flex-direction: column;
}

.ai-stats div {
  display: flex;
  min-height: 44px;
  padding: 8px 3px 8px 14px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(94, 164, 205, 0.09);
}

.ai-stats div:last-child {
  border-bottom: 0;
}

.ai-stats span {
  color: #6e92a8;
  font-size: 10px;
}

.ai-stats strong {
  color: #dff7ff;
  font-family: "Bahnschrift", var(--font);
  font-size: 16px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.ai-stats small {
  margin-left: 2px;
  color: #5f8399;
  font-family: var(--font);
  font-size: 9px;
  font-weight: 400;
}

.ai-footnote {
  display: flex;
  min-height: 34px;
  margin: 0 19px 15px;
  padding: 0 10px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(54, 229, 165, 0.1);
  border-radius: 7px;
  color: #7fa991;
  background: rgba(54, 229, 165, 0.035);
  font-size: 9px;
  gap: 10px;
}

.ai-footnote span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ai-footnote i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
}

.ai-footnote em {
  color: #507e69;
  font-style: normal;
  white-space: nowrap;
}

.stores-panel {
  display: flex;
  flex-direction: column;
}

.online-count {
  display: flex;
  padding-top: 3px;
  align-items: center;
  color: #62879d;
  font-size: 9px;
  gap: 6px;
}

.online-count i {
  width: 5px;
  height: 5px;
  box-shadow: none;
}

.online-count strong {
  color: var(--green);
  font-family: "Bahnschrift", var(--font);
  font-size: 10px;
  font-weight: 500;
}

.store-column-labels {
  display: grid;
  margin: 0 19px;
  padding: 7px 5px;
  border-bottom: 1px solid rgba(92, 164, 206, 0.1);
  color: #4f748a;
  font-size: 9px;
  grid-template-columns: minmax(0, 1fr) 67px 58px;
  gap: 10px;
}

.store-column-labels span:nth-child(n + 2) {
  text-align: right;
}

.store-list {
  display: flex;
  min-height: 0;
  padding: 2px 19px;
  flex: 1;
  flex-direction: column;
  justify-content: space-evenly;
}

.store-row {
  display: grid;
  min-height: 47px;
  padding: 7px 5px;
  align-items: center;
  border-bottom: 1px solid rgba(92, 164, 206, 0.07);
  grid-template-columns: minmax(0, 1fr) 67px 58px;
  gap: 10px;
}

.store-row:last-child {
  border-bottom: 0;
}

.store-name {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.store-logo {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  place-items: center;
}

.store-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.store-name-copy {
  min-width: 0;
}

.store-name-copy b {
  display: block;
  overflow: hidden;
  color: #b8d3e2;
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-name-copy small {
  display: block;
  margin-top: 3px;
  color: #52778d;
  font-size: 9px;
}

.store-conversations {
  color: #b5d2e1;
  font-family: "Bahnschrift", var(--font);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.store-conversations small {
  display: block;
  margin-top: 2px;
  color: #4e7388;
  font-family: var(--font);
  font-size: 7px;
}

.store-status {
  display: inline-flex;
  justify-self: end;
  padding: 4px 7px;
  align-items: center;
  border-radius: 5px;
  font-size: 9px;
  gap: 5px;
}

.store-status i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

.store-status.is-online {
  color: #71b99e;
  background: rgba(54, 229, 165, 0.065);
}

.store-status.is-online i {
  background: var(--green);
}

.store-status.is-busy {
  color: #d4a868;
  background: rgba(255, 180, 94, 0.065);
}

.store-status.is-busy i {
  background: var(--orange);
}

.panel-footer-note {
  display: flex;
  min-height: 32px;
  margin: 0 19px 14px;
  padding: 0 10px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(92, 164, 206, 0.1);
  color: #4f7287;
  font-size: 9px;
}

.panel-footer-note b {
  color: #7697aa;
  font-weight: 400;
}

.screen-footer {
  display: flex;
  min-height: 36px;
  padding: 8px 2px 12px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(93, 166, 210, 0.08);
  color: #41657a;
  gap: 18px;
}

.screen-footer p {
  margin: 0;
  font-size: 9px;
}

.screen-footer span {
  margin: 0 5px;
  color: #37576a;
}

.toast {
  position: fixed;
  z-index: 50;
  bottom: 28px;
  left: 50%;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: #c9e9f7;
  background: rgba(6, 25, 42, 0.95);
  box-shadow: 0 16px 40px rgba(0, 3, 9, 0.4);
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.is-refreshing .icon-button#refreshButton svg {
  animation: refreshSpin 0.55s ease;
}

@keyframes refreshSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 1500px) and (min-height: 920px) {
  .screen-shell {
    padding: 0 30px;
  }

  .screen-header {
    min-height: 100px;
  }

  .dashboard-main {
    padding-top: 20px;
    gap: 18px;
  }

  .kpi-grid,
  .dashboard-layout {
    gap: 18px;
  }

  .left-stack,
  .right-stack,
  .lower-grid {
    gap: 18px;
  }

  .kpi-card {
    min-height: 145px;
    padding: 22px 24px;
  }

  .panel-heading {
    min-height: 66px;
    padding: 20px 22px 13px;
  }

  .map-body {
    padding: 0 22px 20px;
  }

  .region-button {
    min-height: 40px;
  }

  .store-row {
    min-height: 54px;
  }
}

@media (min-width: 1101px) and (min-height: 900px) {
  body {
    overflow: hidden;
  }

  .screen-shell {
    height: 100vh;
    min-height: 0;
  }

  .dashboard-main {
    min-height: 0;
  }
}

@media (max-height: 860px) and (min-width: 1101px) {
  .screen-header {
    min-height: 78px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .dashboard-main {
    padding-top: 14px;
    padding-bottom: 8px;
    gap: 13px;
  }

  .kpi-grid,
  .dashboard-layout,
  .left-stack,
  .right-stack,
  .lower-grid {
    gap: 13px;
  }

  .kpi-card {
    min-height: 116px;
    padding: 15px 18px;
  }

  .kpi-value {
    margin-top: 8px;
  }

  .left-stack {
    grid-template-rows: minmax(0, 1.4fr) minmax(0, 0.78fr);
  }

  .right-stack {
    grid-template-rows: minmax(0, 0.78fr) minmax(0, 1.22fr);
  }

  .panel-heading {
    min-height: 52px;
    padding-top: 13px;
  }

  .panel-kicker {
    margin-bottom: 3px;
  }

  .map-body {
    padding-bottom: 12px;
  }

  .map-summary {
    top: 9px;
    left: 9px;
    padding: 8px 10px;
  }

  .region-button {
    min-height: 31px;
  }

  .ai-footnote {
    min-height: 29px;
    margin-bottom: 11px;
  }

  .store-row {
    min-height: 40px;
  }

  .store-logo {
    width: 24px;
    height: 24px;
  }

  .screen-footer {
    min-height: 30px;
    padding-bottom: 7px;
  }
}

@media (min-width: 1101px) and (max-height: 960px) {
  .screen-header {
    min-height: 82px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .dashboard-main {
    padding-top: 14px;
    padding-bottom: 8px;
    gap: 13px;
  }

  .kpi-grid,
  .dashboard-layout,
  .left-stack,
  .right-stack,
  .lower-grid {
    gap: 13px;
  }

  .kpi-card {
    min-height: 118px;
    padding: 14px 18px;
  }

  .kpi-value {
    margin-top: 8px;
    margin-bottom: 5px;
  }

  .kpi-spark,
  .kpi-meter {
    bottom: 14px;
  }

  .panel-heading {
    min-height: 50px;
    padding-top: 12px;
    padding-bottom: 9px;
  }

  .panel-kicker {
    margin-bottom: 3px;
  }

  .map-body {
    padding-bottom: 11px;
    gap: 13px;
  }

  .map-summary {
    top: 9px;
    left: 9px;
    padding: 8px 10px;
  }

  .region-button {
    min-height: 29px;
  }

  .platform-sales {
    padding-bottom: 9px;
  }

  .platform-row {
    min-height: 26px;
  }

  .ai-body {
    padding-bottom: 8px;
  }

  .ai-stats div {
    min-height: 39px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .ai-footnote {
    min-height: 28px;
    margin-bottom: 10px;
  }

  .store-row {
    min-height: 38px;
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .store-logo {
    width: 24px;
    height: 24px;
  }

  .panel-footer-note {
    min-height: 28px;
    margin-bottom: 9px;
  }

  .screen-footer {
    min-height: 30px;
    padding-bottom: 7px;
  }
}

@media (max-width: 1250px) {
  .screen-header {
    grid-template-columns: minmax(210px, 0.8fr) minmax(320px, 1fr) auto;
  }

  .live-status time {
    display: none;
  }

  .dashboard-layout {
    grid-template-columns: minmax(0, 2fr) minmax(318px, 0.92fr);
  }

  .map-body {
    grid-template-columns: minmax(0, 1fr) 198px;
  }

  .kpi-card {
    padding-right: 15px;
    padding-left: 15px;
  }

  .kpi-spark,
  .kpi-meter {
    right: 15px;
  }

  .lower-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(265px, 0.9fr);
  }
}

@media (max-width: 1100px) {
  .screen-shell {
    padding: 0 18px;
  }

  .screen-header {
    grid-template-columns: minmax(195px, 0.75fr) minmax(280px, 1fr) auto;
  }

  .page-heading span {
    letter-spacing: 0.16em;
  }

  .live-status {
    display: none;
  }

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

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .left-stack {
    grid-template-rows: 440px 290px;
  }

  .right-stack {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    grid-template-rows: 345px;
  }
}

@media (max-width: 760px) {
  body::before {
    background-size: 34px 34px;
  }

  .screen-shell {
    min-height: 100svh;
    padding: 0 13px;
  }

  .screen-header {
    min-height: 0;
    padding: 14px 1px 13px;
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .brand-copy b {
    font-size: 17px;
  }

  .brand-copy small {
    display: none;
  }

  .page-heading {
    display: none;
  }

  .screen-clock {
    min-width: 0;
    font-size: 12px;
  }

  .icon-button {
    width: 34px;
    height: 34px;
  }

  .dashboard-main {
    padding-top: 13px;
    gap: 12px;
  }

  .kpi-grid {
    gap: 10px;
  }

  .kpi-card {
    min-height: 119px;
    padding: 14px;
    border-radius: 13px;
  }

  .kpi-top {
    font-size: 10px;
  }

  .kpi-icon {
    width: 27px;
    height: 27px;
  }

  .kpi-icon svg {
    width: 14px;
    height: 14px;
  }

  .kpi-value {
    margin: 11px 0 7px;
    font-size: clamp(22px, 6.2vw, 30px);
  }

  .kpi-money {
    font-size: clamp(17px, 4.7vw, 23px);
  }

  .kpi-money > small {
    font-size: 13px;
  }

  .kpi-foot {
    display: block;
    font-size: 8px;
  }

  .kpi-foot em {
    display: inline-block;
    margin-top: 5px;
  }

  .kpi-spark,
  .kpi-meter {
    display: none;
  }

  .dashboard-layout {
    display: flex;
    gap: 12px;
    flex-direction: column;
  }

  .left-stack,
  .right-stack {
    display: flex;
    gap: 12px;
    flex-direction: column;
  }

  .map-panel {
    min-height: 640px;
  }

  .panel-heading {
    min-height: 56px;
    padding: 15px 14px 11px;
  }

  .panel-heading h2 {
    font-size: 14px;
  }

  .panel-heading-meta span {
    display: none;
  }

  .map-body {
    display: flex;
    padding: 0 12px 12px;
    flex-direction: column;
    gap: 10px;
  }

  .map-stage {
    min-height: 370px;
  }

  .map-summary {
    position: relative;
    top: auto;
    left: auto;
    padding: 10px 10px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .recent-conversations {
    position: relative;
    top: auto;
    right: auto;
    width: auto;
    margin: 0 10px;
    transform: none;
  }

  .conversation-window {
    height: 108px;
  }

  .map-summary > div {
    padding: 0 10px;
  }

  .map-summary span {
    font-size: 8px;
  }

  .map-summary strong {
    font-size: 13px;
  }

  .map-legend em {
    display: none;
  }

  .map-legend {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    padding: 8px 13px 10px;
    background: transparent;
    flex-wrap: wrap;
  }

  .region-ranking {
    min-height: 218px;
  }

  .region-button {
    min-height: 33px;
  }

  .lower-grid {
    display: flex;
    gap: 12px;
    flex-direction: column;
  }

  .trend-panel {
    min-height: 290px;
  }

  .sales-panel {
    min-height: 260px;
  }

  .right-stack .ai-panel {
    min-height: 315px;
  }

  .right-stack .stores-panel {
    min-height: 390px;
  }

  .ai-body {
    padding-bottom: 16px;
  }

  .gauge {
    width: 128px;
  }

  .ai-footnote {
    display: block;
    padding: 8px 10px;
  }

  .ai-footnote span,
  .ai-footnote em {
    display: block;
  }

  .ai-footnote em {
    margin-top: 5px;
  }

  .panel-total {
    font-size: 12px;
  }

  .screen-footer {
    display: block;
    padding: 10px 1px 16px;
  }

  .screen-footer p {
    line-height: 1.65;
  }

  .screen-footer p + p {
    margin-top: 5px;
  }
}

@media (max-width: 430px) {
  .screen-clock {
    display: none;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .kpi-card {
    min-height: 106px;
  }

  .kpi-value {
    font-size: 30px;
  }

  .kpi-money {
    font-size: 25px;
  }

  .kpi-foot {
    display: flex;
  }

  .kpi-foot em {
    margin-top: 0;
  }

  .map-panel {
    min-height: 625px;
  }

  .map-stage {
    min-height: 350px;
  }

  .map-summary > div {
    padding: 0 7px;
  }

  .map-summary > div:nth-child(2) {
    display: none;
  }

  .map-legend {
    font-size: 7px;
  }

  .legend-scale i {
    width: 13px;
  }

  .ai-body {
    grid-template-columns: 1fr;
  }

  .ai-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ai-stats div {
    padding: 8px;
    border-right: 1px solid rgba(94, 164, 205, 0.09);
    border-bottom: 0;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
  }

  .ai-stats div:last-child {
    border-right: 0;
  }

  .right-stack .ai-panel {
    min-height: 415px;
  }

  .store-column-labels,
  .store-row {
    grid-template-columns: minmax(0, 1fr) 54px 48px;
    gap: 7px;
  }

  .store-status {
    padding-right: 5px;
    padding-left: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .conversation-track {
    animation: conversationScroll 30s linear infinite !important;
  }

  .conversation-window {
    overflow: hidden;
  }
}
