:root {
  color-scheme: dark;
  --bg: #111413;
  --bg-2: #171816;
  --panel: rgba(27, 30, 27, 0.9);
  --panel-strong: rgba(34, 38, 34, 0.96);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f3f7f4;
  --muted: #9ea9a2;
  --muted-2: #77847d;
  --green: #22c67a;
  --green-2: #0f8d65;
  --cyan: #31b8d4;
  --amber: #f3aa32;
  --coral: #ef6a52;
  --violet: #8d7af7;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(135deg, #101313 0%, #141913 36%, #1d1813 69%, #111413 100%);
  overflow-x: hidden;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.screen-shell {
  width: min(1920px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px;
}

.topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 23, 20, 0.84);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 280px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  position: relative;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.24);
  flex: 0 0 auto;
}

.brand-mark span {
  position: absolute;
  width: 10px;
  height: 28px;
  border: 3px solid #fff;
  border-top: 0;
  border-bottom: 0;
}

.brand-mark span:first-child {
  transform: rotate(-35deg) translateX(-5px);
}

.brand-mark span:last-child {
  transform: rotate(35deg) translateX(5px);
}

.brand h1,
.panel-heading h2,
.section-title h3,
.requirement-grid h3 {
  margin: 0;
  font-weight: 700;
}

.brand h1 {
  font-size: 1.36rem;
  line-height: 1.1;
}

.brand p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.control-strip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.segmented {
  height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.segmented button {
  min-width: 68px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
}

.segmented button.active {
  color: #06120d;
  background: var(--green);
  font-weight: 700;
}

.select-field {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.select-field select {
  min-width: 112px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.select-field option {
  color: #111413;
}

.tool-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green);
  background: rgba(255, 255, 255, 0.04);
}

.tool-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-button.spin svg {
  animation: spin 0.62s ease;
}

.time-block {
  min-width: 142px;
  height: 42px;
  display: grid;
  align-content: center;
  padding: 0 12px;
  border-left: 1px solid var(--line);
}

.time-block span {
  font-size: 1.04rem;
  font-weight: 700;
}

.time-block strong {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 500;
}

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

.kpi-card {
  min-height: 102px;
  padding: 14px 16px;
  border: 1px solid rgba(34, 198, 122, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(34, 198, 122, 0.16), transparent 46%),
    rgba(23, 25, 22, 0.9);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.kpi-card::after {
  content: "";
  position: absolute;
  inset: auto 16px 0 16px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--green);
}

.kpi-card.accent-cyan {
  border-color: rgba(49, 184, 212, 0.28);
  background:
    linear-gradient(135deg, rgba(49, 184, 212, 0.16), transparent 46%),
    rgba(23, 25, 22, 0.9);
}

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

.kpi-card.accent-amber {
  border-color: rgba(243, 170, 50, 0.28);
  background:
    linear-gradient(135deg, rgba(243, 170, 50, 0.16), transparent 46%),
    rgba(23, 25, 22, 0.9);
}

.kpi-card.accent-amber::after {
  background: var(--amber);
}

.kpi-card.accent-coral {
  border-color: rgba(239, 106, 82, 0.28);
  background:
    linear-gradient(135deg, rgba(239, 106, 82, 0.16), transparent 46%),
    rgba(23, 25, 22, 0.9);
}

.kpi-card.accent-coral::after {
  background: var(--coral);
}

.kpi-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

.kpi-card div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.kpi-card strong {
  font-family: "DIN Alternate", "Bahnschrift", "Segoe UI", sans-serif;
  font-size: 2.05rem;
  line-height: 1;
}

.kpi-card span {
  color: var(--muted);
  font-size: 0.88rem;
}

.kpi-card small {
  display: block;
  margin-top: 9px;
  color: var(--green);
  font-size: 0.78rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(430px, 1.24fr) minmax(320px, 0.95fr);
  grid-template-rows: minmax(416px, 1.05fr) minmax(188px, 0.58fr);
  gap: 12px;
  align-items: stretch;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.media-panel,
.business-panel,
.command-panel,
.governance-panel {
  padding: 14px 16px;
}

.media-panel {
  grid-row: 1 / 3;
}

.business-panel {
  grid-column: 3;
  grid-row: 1 / 3;
}

.command-panel {
  grid-column: 2;
  grid-row: 1;
}

.governance-panel {
  grid-column: 2;
  grid-row: 2;
}

.panel-heading {
  min-height: 42px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--green);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.panel-heading h2 {
  font-size: 1.18rem;
  line-height: 1.2;
}

.status-chip {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid rgba(34, 198, 122, 0.3);
  border-radius: 999px;
  color: var(--green);
  background: rgba(34, 198, 122, 0.1);
  font-size: 0.76rem;
}

.status-chip.amber {
  border-color: rgba(243, 170, 50, 0.3);
  color: var(--amber);
  background: rgba(243, 170, 50, 0.1);
}

.status-chip.cyan {
  border-color: rgba(49, 184, 212, 0.3);
  color: var(--cyan);
  background: rgba(49, 184, 212, 0.1);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.metric-row div {
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.metric-row span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.metric-row strong {
  display: block;
  margin-top: 7px;
  font-family: "DIN Alternate", "Bahnschrift", "Segoe UI", sans-serif;
  font-size: 1.28rem;
}

.metric-row.business strong {
  color: var(--cyan);
}

.chart-block {
  margin-top: 10px;
}

.chart-block.compact {
  margin-top: 12px;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-title h3 {
  font-size: 0.98rem;
}

.section-title span {
  color: var(--muted-2);
  font-size: 0.75rem;
}

.channel-bars {
  display: grid;
  gap: 8px;
}

.channel-row {
  display: grid;
  grid-template-columns: 74px 1fr 62px;
  align-items: center;
  gap: 10px;
  min-height: 31px;
}

.channel-name {
  color: var(--text);
  font-size: 0.82rem;
  white-space: nowrap;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.bar-track span {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--cyan));
}

.channel-value {
  color: var(--muted);
  font-family: "DIN Alternate", "Bahnschrift", "Segoe UI", sans-serif;
  font-size: 0.9rem;
  text-align: right;
}

.funnel {
  display: grid;
  gap: 6px;
}

.funnel-step {
  min-height: 30px;
  display: grid;
  grid-template-columns: 66px 1fr 56px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.funnel-bar {
  height: 24px;
  min-width: 88px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(243, 170, 50, 0.34), rgba(34, 198, 122, 0.44)) left / var(--width) 100% no-repeat,
    rgba(255, 255, 255, 0.045);
}

.table-panel {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.table-head,
.table-row {
  display: grid;
  grid-template-columns: 0.8fr 0.9fr 0.9fr 0.55fr;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.table-head {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}

.table-row {
  border-top: 1px solid var(--line);
}

.table-row strong {
  color: var(--green);
  font-weight: 700;
}

.flow-lane {
  display: grid;
  grid-template-columns: 78px 1fr 78px 1fr 78px 1fr 78px;
  align-items: center;
  gap: 10px;
  min-height: 80px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.flow-node {
  min-height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.flow-node span {
  color: var(--muted);
  font-size: 0.75rem;
}

.flow-node strong {
  font-family: "DIN Alternate", "Bahnschrift", "Segoe UI", sans-serif;
  font-size: 1.28rem;
}

.flow-node.active {
  border-color: rgba(34, 198, 122, 0.42);
  background: rgba(34, 198, 122, 0.12);
}

.flow-rail {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.flow-rail span {
  display: block;
  width: var(--rail);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--amber));
}

.split-area {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  gap: 14px;
  margin-top: 12px;
  align-items: center;
}

.radar-wrap {
  display: grid;
  place-items: center;
  gap: 8px;
}

.radar {
  width: 168px;
  aspect-ratio: 1;
  position: relative;
}

.ring,
.axis,
.radar-fill,
.radar-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.ring {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.ring-one {
  width: 42%;
  height: 42%;
}

.ring-two {
  width: 68%;
  height: 68%;
}

.ring-three {
  width: 94%;
  height: 94%;
}

.axis {
  width: 1px;
  height: 94%;
  background: rgba(255, 255, 255, 0.08);
  transform-origin: center;
}

.axis-a {
  transform: translate(-50%, -50%) rotate(0deg);
}

.axis-b {
  transform: translate(-50%, -50%) rotate(60deg);
}

.axis-c {
  transform: translate(-50%, -50%) rotate(120deg);
}

.radar-fill {
  width: 76%;
  height: 76%;
  clip-path: polygon(50% 6%, 90% 35%, 76% 86%, 28% 78%, 14% 32%);
  background: linear-gradient(135deg, rgba(34, 198, 122, 0.42), rgba(49, 184, 212, 0.24));
  border: 1px solid rgba(34, 198, 122, 0.56);
}

.radar-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 0 16px rgba(243, 170, 50, 0.8);
}

.dot-a {
  left: 50%;
  top: 8%;
}

.dot-b {
  left: 86%;
  top: 36%;
}

.dot-c {
  left: 73%;
  top: 82%;
}

.dot-d {
  left: 31%;
  top: 76%;
}

.dot-e {
  left: 17%;
  top: 34%;
}

.radar-labels {
  width: 100%;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.73rem;
}

.insight-list {
  display: grid;
  gap: 8px;
}

.insight {
  min-height: 52px;
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.insight::before {
  content: "";
  width: 8px;
  height: 36px;
  border-radius: 999px;
  background: var(--green);
}

.insight.warn::before {
  background: var(--amber);
}

.insight.risk::before {
  background: var(--coral);
}

.insight strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.84rem;
}

.insight span {
  color: var(--muted);
  font-size: 0.73rem;
}

.insight b {
  color: var(--green);
  font-family: "DIN Alternate", "Bahnschrift", "Segoe UI", sans-serif;
  font-size: 1rem;
}

.data-source-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.data-source-strip span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.76rem;
}

.rank-list {
  display: grid;
  gap: 7px;
}

.rank-item {
  display: grid;
  grid-template-columns: 28px 72px 1fr 50px;
  align-items: center;
  gap: 9px;
  min-height: 38px;
}

.rank-no {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #06120d;
  background: var(--cyan);
  font-weight: 700;
  font-size: 0.76rem;
}

.rank-name {
  min-width: 0;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-track {
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.rank-track span {
  display: block;
  width: var(--score);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
}

.rank-value {
  color: var(--muted);
  font-family: "DIN Alternate", "Bahnschrift", "Segoe UI", sans-serif;
  text-align: right;
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.health-cell {
  aspect-ratio: 1;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  background: rgba(34, 198, 122, var(--heat));
  position: relative;
}

.health-cell[data-level="warn"] {
  background: rgba(243, 170, 50, var(--heat));
}

.health-cell[data-level="risk"] {
  background: rgba(239, 106, 82, var(--heat));
}

.alert-board {
  margin-top: 12px;
}

.alert-list {
  display: grid;
  gap: 8px;
}

.alert-item {
  min-height: 50px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.alert-level {
  width: 46px;
  padding: 5px 0;
  border-radius: 999px;
  text-align: center;
  color: #101313;
  background: var(--amber);
  font-size: 0.72rem;
  font-weight: 700;
}

.alert-level.high {
  background: var(--coral);
}

.alert-item strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.82rem;
}

.alert-item span {
  color: var(--muted);
  font-size: 0.73rem;
}

.alert-item b {
  color: var(--text);
  font-family: "DIN Alternate", "Bahnschrift", "Segoe UI", sans-serif;
  font-size: 0.95rem;
}

.governance-panel {
  background:
    linear-gradient(135deg, rgba(141, 122, 247, 0.11), transparent 42%),
    var(--panel);
}

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

.requirement-grid article {
  min-height: 104px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.requirement-grid h3 {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 0.96rem;
}

.requirement-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

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

@media (max-width: 1220px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .control-strip {
    width: 100%;
    justify-content: flex-start;
  }

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

  .media-panel,
  .business-panel,
  .command-panel,
  .governance-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .command-panel,
  .governance-panel {
    grid-column: 1 / 3;
  }
}

@media (max-width: 820px) {
  .screen-shell {
    padding: 12px;
  }

  .brand {
    min-width: 0;
  }

  .brand h1 {
    font-size: 1.2rem;
  }

  .kpi-band,
  .dashboard-grid,
  .requirement-grid,
  .split-area {
    grid-template-columns: 1fr;
  }

  .command-panel,
  .governance-panel {
    grid-column: auto;
  }

  .flow-lane {
    grid-template-columns: 1fr;
  }

  .flow-rail {
    height: 26px;
    width: 4px;
    justify-self: center;
  }

  .flow-rail span {
    width: 100%;
    height: var(--rail);
  }

  .table-head,
  .table-row {
    grid-template-columns: 0.8fr 0.9fr 0.9fr 0.55fr;
    font-size: 0.72rem;
  }
}
