:root {
  --v5-bg: #03080d;
  --v5-panel: rgba(6, 20, 30, .96);
  --v5-panel-2: rgba(8, 27, 39, .92);
  --v5-border: rgba(75, 157, 196, .24);
  --v5-border-hot: rgba(34, 211, 238, .56);
  --v5-cyan: #22d3ee;
  --v5-blue: #3b82f6;
  --v5-green: #35d07f;
  --v5-amber: #f6b94a;
  --v5-red: #ff5c6c;
  --v5-text: #eff9ff;
  --v5-soft: #9db8c8;
  --v5-muted: #66879a;
}

html {
  background: var(--v5-bg);
}

body {
  min-width: 1180px;
  background:
    linear-gradient(rgba(54, 139, 181, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(54, 139, 181, .02) 1px, transparent 1px),
    linear-gradient(180deg, #02070b 0%, #06111a 44%, #03080d 100%);
  background-size: 42px 42px, 42px 42px, auto;
  color: var(--v5-text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(34, 211, 238, .025) 8.1%, transparent 8.2% 91.8%, rgba(34, 211, 238, .025) 91.9%, transparent 92%),
    linear-gradient(180deg, rgba(255, 255, 255, .018), transparent 18%);
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--v5-cyan);
  outline-offset: 2px;
}

.top-nav {
  height: 46px;
  grid-template-columns: 156px minmax(620px, 1fr) auto;
  gap: 8px;
  padding: 0 12px;
  border-bottom-color: rgba(76, 159, 200, .22);
  background: rgba(2, 8, 13, .96);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .34);
}

.brand {
  gap: 9px;
}

.brand-mark {
  width: 25px;
  height: 25px;
  border-radius: 5px;
  border-color: rgba(34, 211, 238, .52);
  background: #061722;
  font-size: 12px;
  box-shadow: inset 0 0 10px rgba(34, 211, 238, .12);
}

.brand strong {
  font-size: 13px;
}

.nav-tabs {
  height: 100%;
  gap: 0;
}

.nav-tabs button {
  position: relative;
  height: 100%;
  padding: 0 15px;
  border: 0;
  border-radius: 0;
  color: #93adbc;
  background: transparent;
  font-size: 12px;
}

.nav-tabs button::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 0;
  left: 16px;
  height: 2px;
  background: transparent;
}

.nav-tabs button.active,
.nav-tabs button:hover {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(180deg, rgba(34, 211, 238, .02), rgba(34, 211, 238, .09));
  box-shadow: none;
}

.nav-tabs button.active::after {
  background: var(--v5-cyan);
  box-shadow: 0 0 12px var(--v5-cyan);
}

.nav-tools {
  gap: 6px;
}

.live-badge,
.system-health {
  height: 25px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid rgba(53, 208, 127, .34);
  border-radius: 5px;
  color: var(--v5-green);
  background: rgba(9, 45, 28, .42);
  font-size: 10px;
  font-weight: 900;
}

.system-health {
  border-color: rgba(87, 148, 177, .18);
  color: #9bc7b0;
  background: rgba(9, 27, 30, .62);
}

.system-health i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--v5-green);
  box-shadow: 0 0 8px var(--v5-green);
}

.nav-tools button {
  height: 27px;
  padding: 0 9px;
  border-radius: 5px;
  color: #a5becd;
  background: rgba(5, 18, 28, .72);
  font-size: 10px;
}

.nav-tools .alert-button {
  position: relative;
  width: 29px;
  padding: 0;
  border-color: rgba(255, 92, 108, .32);
  color: var(--v5-red);
}

.alert-button b {
  position: absolute;
  top: -7px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  padding: 0 3px;
  border-radius: 8px;
  color: #fff;
  background: #d93549;
  font-size: 9px;
}

main {
  padding: 10px 12px 36px;
}

.hero-screen {
  min-height: auto;
  grid-template-rows: 54px 100px 38px 96px 104px auto auto;
  gap: 8px;
}

.time-strip,
.title-row,
.rate-rule,
.market-card,
.kpi-card,
.panel,
.detail-section,
.table-card {
  border-color: var(--v5-border);
  border-radius: 6px;
  background:
    linear-gradient(145deg, rgba(9, 29, 42, .94), rgba(3, 13, 20, .97)),
    linear-gradient(90deg, rgba(34, 211, 238, .03), transparent);
  box-shadow: inset 0 1px rgba(255, 255, 255, .018), 0 12px 26px rgba(0, 0, 0, .13);
}

.time-strip {
  gap: 0;
  padding: 4px;
  overflow: hidden;
}

.time-card {
  min-height: 44px;
  gap: 2px;
  padding: 0 10px;
  border: 0;
  border-right: 1px solid rgba(76, 159, 200, .14);
  border-radius: 0;
  background: transparent;
}

.time-card:last-child {
  border-right: 0;
}

.time-card b {
  color: #88a8ba;
  font-size: 10px;
}

.time-card span {
  font-size: 12px;
  letter-spacing: 0;
}

.title-row {
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 16px;
  padding: 9px 18px;
  background:
    linear-gradient(90deg, rgba(3, 12, 18, .98), rgba(8, 31, 45, .96) 35% 68%, rgba(3, 12, 18, .98)),
    linear-gradient(180deg, rgba(34, 211, 238, .03), transparent);
}

.title-row::before {
  content: "";
  position: absolute;
  pointer-events: none;
}

.title-left h1 {
  margin: 4px 0;
  font-size: clamp(27px, 2vw, 39px);
  line-height: 1.05;
  text-shadow: 0 0 18px rgba(34, 211, 238, .18);
}

.title-left p {
  color: #8ba8ba;
  font-size: 11px;
}

.eyebrow,
.panel-title span,
.section-head span {
  color: var(--v5-cyan);
  font-size: 9px;
  letter-spacing: .08em;
}

.period-box {
  width: 390px;
  gap: 4px;
}

.period-tabs {
  height: 28px;
  gap: 4px;
}

.period-tabs button {
  border-radius: 4px;
  font-size: 11px;
}

.date-range-bar {
  min-height: 26px;
  grid-template-columns: auto 128px minmax(0, 1fr);
  gap: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(2, 13, 20, .72);
}

.date-range-bar input {
  width: 128px;
  height: 22px;
  border-radius: 3px;
}

.period-box small {
  font-size: 9px;
}

.rate-rule {
  grid-template-columns: 220px 190px 210px minmax(0, 1fr);
  gap: 9px;
  padding: 5px 12px;
}

.rate-rule b,
.rate-rule p {
  font-size: 10px;
}

.rate-rule span {
  font-size: 11px;
}

.market-summary {
  min-height: 96px;
  gap: 8px;
}

.market-card {
  min-height: 96px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 12px;
  padding: 10px 12px 9px;
}

.market-card::before,
.kpi-card::before,
.panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  width: 64px;
  height: 1px;
  background: linear-gradient(90deg, var(--v5-cyan), transparent);
  opacity: .72;
  pointer-events: none;
}

.market-card span {
  font-size: 9px;
}

.market-card h3 {
  margin-top: 3px;
  font-size: 15px;
}

.market-native {
  display: block;
  max-width: 280px;
  margin-top: 5px;
  overflow: hidden;
  color: #8fb5c9 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-card strong {
  font-size: clamp(19px, 1.25vw, 26px);
}

.market-kv {
  gap: 5px;
}

.market-kv span {
  padding: 4px 6px;
  border-radius: 4px;
}

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

.kpi-card {
  min-height: 104px;
  grid-template-rows: auto 25px 14px 25px;
  gap: 3px;
  padding: 7px 8px 5px;
}

.kpi-card .rank {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: rgba(59, 130, 246, .22);
  font-size: 9px;
}

.kpi-head {
  gap: 5px;
}

.kpi-card label {
  font-size: 10px;
  line-height: 1.12;
}

.kpi-card strong {
  align-self: center;
  font-size: clamp(16px, 1.18vw, 24px);
}

.kpi-card small {
  font-size: 9px;
}

.spark-button {
  grid-template-columns: minmax(0, 1fr) auto;
}

.sparkline {
  height: 22px;
}

.spark-button span {
  font-size: 8px;
}

.main-grid {
  grid-template-columns: minmax(0, 30.5fr) minmax(430px, 39fr) minmax(0, 30.5fr);
  gap: 8px;
}

.dashboard-column {
  gap: 8px;
}

.panel {
  position: relative;
  padding: 9px;
}

.panel-title {
  align-items: center;
  margin-bottom: 7px;
}

.panel-title h2,
.section-head h2 {
  margin-top: 2px;
  font-size: 14px;
}

.panel-title button,
.section-head > button {
  min-height: 23px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 9px;
}

.platform-groups {
  gap: 5px;
}

.platform-card {
  gap: 5px;
  padding: 7px;
  border-radius: 5px;
  border-color: rgba(75, 157, 196, .19);
  background: rgba(2, 13, 21, .7);
}

.platform-card:hover,
.social-row:hover,
.order-row:hover {
  border-color: rgba(34, 211, 238, .46);
  background: rgba(7, 30, 42, .82);
}

.group-name {
  gap: 6px;
}

.group-name b {
  font-size: 11px;
}

.group-name small {
  font-size: 8px;
}

.flag {
  width: 18px;
  height: 13px;
  font-size: 8px;
}

.group-metrics {
  gap: 4px;
}

.group-metrics div {
  padding: 5px;
  border-radius: 4px;
}

.group-metrics span {
  font-size: 8px;
}

.group-metrics strong {
  margin-top: 2px;
  font-size: 10px;
}

.store-dot {
  min-height: 20px;
  border-radius: 4px;
  font-size: 8px;
}

.flow-center {
  min-height: 336px;
  grid-template-rows: minmax(218px, 1fr) auto auto;
  gap: 7px;
  padding: 8px;
  border-style: solid;
  border-radius: 5px;
  background:
    linear-gradient(rgba(34, 211, 238, .042) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, .034) 1px, transparent 1px),
    linear-gradient(180deg, rgba(4, 19, 29, .78), rgba(2, 11, 18, .92));
  background-size: 24px 24px, 24px 24px, auto;
}

.flow-center::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: linear-gradient(transparent, rgba(34, 211, 238, .2), transparent);
  box-shadow: 0 0 18px rgba(34, 211, 238, .18);
  pointer-events: none;
}

.flow-stage {
  min-height: 218px;
  grid-template-columns: minmax(112px, 145px) minmax(156px, 1fr) minmax(112px, 145px);
  gap: 14px;
}

.flow-core-zone {
  min-height: 210px;
}

.orbit-a {
  width: 186px;
  border-color: rgba(34, 211, 238, .32);
}

.orbit-b {
  width: 150px;
  border-color: rgba(59, 130, 246, .34);
}

.flow-core-zone::before,
.flow-core-zone::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(34, 211, 238, .13);
  transform: translate(-50%, -50%) rotate(45deg);
  animation: rotateCoreFrame 12s linear infinite;
}

.flow-core-zone::before {
  width: 168px;
  height: 168px;
}

.flow-core-zone::after {
  width: 128px;
  height: 128px;
  animation-direction: reverse;
  animation-duration: 9s;
}

.core-node {
  width: 164px;
  min-height: 142px;
  gap: 4px;
  padding: 12px 10px 10px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(8, 57, 80, .98), rgba(3, 21, 31, .98));
  box-shadow: 0 0 30px rgba(34, 211, 238, .24), inset 0 0 26px rgba(34, 211, 238, .08);
  clip-path: polygon(18% 0, 82% 0, 100% 18%, 100% 82%, 82% 100%, 18% 100%, 0 82%, 0 18%);
}

.core-node b {
  font-size: 18px;
}

.core-node small {
  font-size: 9px;
}

.core-metrics {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin-top: 4px;
}

.core-metrics span {
  min-width: 0;
  padding-top: 4px;
  border-top: 1px solid rgba(34, 211, 238, .18);
  color: #6f95a8;
  font-size: 7px;
  text-align: center;
}

.core-metrics strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--v5-cyan);
  font-size: 9px;
  text-overflow: ellipsis;
}

.flow-nodes {
  gap: 5px;
}

.flow-node {
  min-height: 33px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
  justify-items: stretch;
  padding: 4px 6px;
  border-radius: 4px;
  border-color: rgba(75, 157, 196, .3);
  background: rgba(4, 20, 30, .94);
  font-size: 8px;
  text-align: left;
}

.flow-node span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-node i {
  color: #6e9bb0;
  font-size: 8px;
  font-style: normal;
}

.flow-node.is-live {
  border-color: rgba(53, 208, 127, .7);
  color: #fff;
  background: linear-gradient(90deg, rgba(53, 208, 127, .18), rgba(5, 29, 38, .96));
  box-shadow: 0 0 14px rgba(53, 208, 127, .12);
}

.flow-node.is-live i {
  color: var(--v5-green);
}

.flow-nodes.bottom {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.flow-nodes.bottom .flow-node {
  min-height: 30px;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 1px;
  text-align: center;
}

.flow-activity {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  padding: 6px 7px;
  border-color: rgba(75, 157, 196, .14);
  background: rgba(1, 10, 16, .82);
}

.flow-event,
.flow-activity dt {
  font-size: 8px;
}

.flow-activity dl {
  gap: 7px;
}

.flow-activity dd {
  font-size: 9px;
}

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

.pipe-step {
  min-height: 48px;
  gap: 3px;
  border-radius: 4px;
}

.pipe-step b {
  font-size: 8px;
  text-align: center;
}

.pipe-step strong {
  font-size: 15px;
}

.pipe-step.hot {
  border-color: rgba(53, 208, 127, .62);
  background: linear-gradient(180deg, rgba(22, 94, 58, .54), rgba(3, 18, 25, .94));
  box-shadow: inset 0 0 18px rgba(53, 208, 127, .08);
}

.line-health {
  grid-template-columns: 90px 1fr 38px;
  gap: 8px;
  margin-top: 7px;
  font-size: 9px;
}

.line-health div {
  height: 5px;
}

.ai-live-strip {
  grid-template-columns: minmax(150px, 1.4fr) repeat(3, 1fr);
  gap: 4px;
  margin-top: 6px;
}

.ai-live-strip span {
  padding: 5px 6px;
  border-radius: 4px;
  font-size: 8px;
}

.social-overview {
  gap: 5px;
}

.social-row {
  min-height: 66px;
  grid-template-columns: 31px repeat(5, minmax(0, 1fr));
  grid-template-rows: 27px 25px;
  gap: 3px 5px;
  padding: 5px 6px;
  border-radius: 5px;
  background: rgba(2, 13, 21, .72);
}

.social-icon {
  width: 27px;
  height: 27px;
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
  font-size: 9px;
}

.social-row > div:nth-child(2) {
  grid-column: 2 / 5;
  grid-row: 1;
  align-self: center;
}

.social-row h3 {
  font-size: 10px;
}

.social-row small {
  font-size: 7px;
}

.social-row .social-metric {
  align-self: stretch;
  padding: 3px 4px;
  border: 0;
  border-right: 1px solid rgba(75, 157, 196, .12);
  border-radius: 0;
  background: transparent;
}

.social-row > .social-metric:nth-child(3) { grid-column: 2; grid-row: 2; }
.social-row > .social-metric:nth-child(4) { grid-column: 3; grid-row: 2; }
.social-row > .social-metric:nth-child(5) { grid-column: 4; grid-row: 2; }
.social-row > .social-metric:nth-child(6) { grid-column: 5; grid-row: 2; }
.social-row > .social-metric:nth-child(7) { grid-column: 6; grid-row: 2; border-right: 0; }

.social-metric span {
  font-size: 6px;
}

.social-metric strong {
  margin-top: 1px;
  font-size: 8px;
}

.social-row .bar-stack {
  grid-column: 5 / 7;
  grid-row: 1;
  height: 22px;
}

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

.social-summary div {
  padding: 5px;
  border-radius: 4px;
}

.social-summary span {
  font-size: 7px;
}

.social-summary b {
  font-size: 9px;
}

.warehouse-overview {
  gap: 7px;
}

.warehouse-rings {
  gap: 6px;
}

.ring::before {
  inset: 7px;
  background: #06131c;
}

.ring b {
  font-size: 8px;
}

.ring span {
  font-size: 14px;
}

.warehouse-flow-mini {
  gap: 2px;
}

.warehouse-flow-mini span {
  padding: 5px 3px;
  border-radius: 4px;
  font-size: 7px;
}

.warehouse-flow-mini b {
  font-size: 9px;
}

.warehouse-stats {
  gap: 4px;
}

.warehouse-tile {
  padding: 5px 4px;
}

.warehouse-tile span {
  font-size: 7px;
}

.warehouse-tile strong {
  font-size: 10px;
}

.live-orders {
  gap: 4px;
}

.order-row {
  min-height: 26px;
  grid-template-columns: 49px 58px minmax(64px, 1fr) minmax(96px, 1.25fr) 54px;
  gap: 4px;
  padding: 4px 5px;
  border-radius: 4px;
}

.order-row b,
.order-row strong {
  font-size: 8px;
}

.order-row span,
.order-row small {
  min-width: 0;
  overflow: hidden;
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status {
  min-width: 48px;
  height: 18px;
  border-radius: 4px;
  font-size: 7px;
}

.order-row:first-child {
  border-color: rgba(53, 208, 127, .52);
  box-shadow: inset 3px 0 var(--v5-green), 0 0 12px rgba(53, 208, 127, .08);
}

.peak-note {
  margin-top: 6px;
  font-size: 8px;
}

.overview-trends {
  min-height: 168px;
  padding: 9px 10px 10px;
}

.trend-panel-title {
  margin-bottom: 5px;
}

.trend-panel-title p {
  margin: 0;
  color: var(--v5-muted);
  font-size: 9px;
}

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

.overview-trend-card {
  position: relative;
  min-width: 0;
  min-height: 116px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 76px;
  gap: 0 8px;
  padding: 7px 8px 5px;
  overflow: hidden;
  border: 1px solid rgba(75, 157, 196, .19);
  border-radius: 5px;
  color: var(--v5-text);
  background: rgba(2, 13, 21, .7);
  cursor: pointer;
  text-align: left;
}

.overview-trend-card:hover {
  border-color: rgba(34, 211, 238, .5);
  background: rgba(6, 27, 39, .88);
}

.overview-trend-card > span b,
.overview-trend-card > span small {
  display: block;
}

.overview-trend-card > span b {
  font-size: 10px;
}

.overview-trend-card > span small {
  margin-top: 2px;
  color: var(--v5-muted);
  font-size: 7px;
}

.overview-trend-card > strong {
  color: var(--v5-cyan);
  font-size: 14px;
}

.overview-trend-card.green > strong { color: var(--v5-green); }
.overview-trend-card.amber > strong { color: var(--v5-amber); }

.overview-trend-card svg {
  grid-column: 1 / -1;
  width: 100%;
  height: 76px;
}

.overview-trend-card svg text {
  fill: #66879a;
  font: 6px "Segoe UI", sans-serif;
}

.overview-trend-card .mini-axis {
  stroke: rgba(124, 174, 198, .32);
}

.overview-trend-card .mini-grid {
  stroke: rgba(124, 174, 198, .1);
  stroke-dasharray: 2 3;
}

.overview-trend-card polyline {
  stroke-dasharray: 260;
  animation: drawTrend 2.1s ease both;
}

.overview-trend-card > i {
  position: absolute;
  right: 8px;
  bottom: 7px;
  color: #6e9bb0;
  font-size: 7px;
  font-style: normal;
}

.detail-section {
  border-radius: 6px;
}

@keyframes rotateCoreFrame {
  to { transform: translate(-50%, -50%) rotate(405deg); }
}

@keyframes drawTrend {
  from { stroke-dashoffset: 260; opacity: .28; }
  to { stroke-dashoffset: 0; opacity: 1; }
}

@media (min-width: 1501px) {
  .hero-screen {
    grid-template-rows: 54px 100px 38px 96px 104px auto auto;
  }

  .main-grid {
    grid-template-columns: minmax(0, 31fr) minmax(540px, 38fr) minmax(0, 31fr);
  }

  .social-row {
    min-height: 62px;
  }
}

@media (max-width: 1320px) {
  .top-nav {
    grid-template-columns: 148px minmax(560px, 1fr) auto;
  }

  .nav-tabs button {
    padding: 0 10px;
  }

  .system-health {
    display: none;
  }

  .main-grid {
    grid-template-columns: 29.5fr minmax(430px, 41fr) 29.5fr;
  }

  .flow-stage {
    grid-template-columns: minmax(102px, 128px) minmax(150px, 1fr) minmax(102px, 128px);
    gap: 10px;
  }
}

@media (max-width: 760px) {
  html,
  body {
    min-width: 0;
  }

  body {
    background-size: 28px 28px, 28px 28px, auto;
  }

  .top-nav {
    position: relative;
    height: auto;
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 8px;
  }

  .nav-tabs {
    height: 34px;
  }

  .nav-tabs button {
    height: 34px;
    padding: 0 11px;
  }

  .nav-tools button span,
  .system-health {
    display: none;
  }

  main {
    padding: 8px 8px 28px;
  }

  .hero-screen {
    grid-template-rows: none;
    gap: 7px;
  }

  .time-strip {
    grid-template-columns: 1fr 1fr;
  }

  .time-card {
    min-height: 48px;
    border-right: 0;
    border-bottom: 1px solid rgba(76, 159, 200, .12);
  }

  .title-row {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .title-left h1 {
    font-size: 24px;
  }

  .period-box {
    width: 100%;
  }

  .rate-rule {
    grid-template-columns: 1fr;
  }

  .market-summary,
  .main-grid {
    grid-template-columns: 1fr;
  }

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

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

  .main-grid {
    grid-template-rows: none;
  }

  .flow-stage {
    grid-template-columns: minmax(76px, 1fr) 118px minmax(76px, 1fr);
    gap: 7px;
  }

  .flow-core-zone {
    min-height: 196px;
  }

  .orbit-a { width: 138px; }
  .orbit-b { width: 106px; }

  .flow-core-zone::before { width: 126px; height: 126px; }
  .flow-core-zone::after { width: 94px; height: 94px; }

  .core-node {
    width: 116px;
    min-height: 118px;
    padding: 9px 6px;
  }

  .core-node b {
    font-size: 14px;
  }

  .core-metrics {
    grid-template-columns: 1fr;
  }

  .core-metrics span:nth-child(2),
  .core-metrics span:nth-child(3) {
    display: none;
  }

  .flow-node {
    min-height: 34px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 1px;
    text-align: center;
  }

  .flow-node span {
    white-space: normal;
  }

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

  .flow-nodes.bottom {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .social-row {
    grid-template-columns: 31px repeat(5, minmax(0, 1fr));
  }

  .warehouse-rings,
  .warehouse-stats {
    grid-template-columns: 1fr 1fr;
  }

  .overview-trend-grid {
    grid-template-columns: 1fr;
  }

  .overview-trend-card {
    min-height: 126px;
  }

  .order-row {
    grid-template-columns: 48px minmax(0, 1fr) auto;
  }
}

@media (min-width: 761px) {
  #stores .section-head {
    display: grid;
    grid-template-columns: minmax(430px, 1fr) auto;
    align-items: start;
  }

  #storeFilters {
    max-width: calc(100vw - 560px);
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: thin;
  }

  #storeFilters button {
    flex: 0 0 auto;
  }
}

@media (max-width: 760px) {
  #storeFilters {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
  }

  #storeFilters button {
    flex: 0 0 auto;
  }
}

@media (max-width: 420px) {
  .market-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .market-kv {
    grid-template-columns: repeat(3, 1fr);
  }

  .title-left h1 {
    font-size: 22px;
  }

  .date-range-bar {
    grid-template-columns: auto 1fr;
  }

  .date-range-bar span {
    grid-column: 1 / -1;
  }
}

/* V6 compact command-center proportions based on the latest visual reference. */
.hero-screen {
  grid-template-rows: 52px 90px 34px 82px 100px auto auto;
}

.time-card span {
  font-size: 11px;
}

.title-row {
  grid-template-columns: minmax(0, 1fr) 520px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.title-left h1 {
  font-size: clamp(25px, 1.85vw, 36px);
}

.title-left p {
  font-size: 10px;
}

.period-box {
  width: 520px;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: center;
}

.period-tabs {
  grid-column: 1;
  grid-row: 1;
}

.date-range-bar {
  grid-column: 2;
  grid-row: 1;
}

.period-box small {
  grid-column: 1 / -1;
}

.market-summary {
  min-height: 82px;
}

.market-card {
  min-height: 82px;
  padding: 8px 11px 7px;
  border-color: rgba(246, 185, 74, .26);
}

.market-card h3 {
  font-size: 14px;
}

.market-card strong {
  font-size: clamp(18px, 1.2vw, 24px);
}

.market-native {
  margin-top: 3px;
  font-size: 8px !important;
}

.market-kv span {
  padding-top: 2px;
  padding-bottom: 2px;
}

.kpi-card {
  min-height: 100px;
  grid-template-rows: auto 23px 13px 23px;
}

.main-grid {
  grid-template-columns: minmax(0, 29fr) minmax(520px, 39fr) minmax(0, 32fr);
}

.platform-groups {
  gap: 4px;
}

.platform-card.platform-row {
  min-height: 38px;
  display: grid;
  grid-template-columns: minmax(135px, 1.3fr) 84px minmax(0, 3fr) 31px;
  align-items: center;
  gap: 4px;
  padding: 3px 5px;
}

.platform-row .group-name {
  min-width: 0;
}

.platform-row .group-name > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.platform-row .group-name b {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-row .group-name small {
  color: var(--v5-cyan);
  font-size: 8px;
  white-space: nowrap;
}

.store-chip-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  overflow: hidden;
}

.store-chip-line span {
  min-width: 0;
  padding: 2px 4px;
  overflow: hidden;
  border: 1px solid rgba(75, 157, 196, .22);
  border-radius: 3px;
  color: #a5c3d3;
  background: rgba(3, 15, 22, .72);
  font-size: 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-chip-line i {
  color: var(--v5-muted);
  font-size: 7px;
  font-style: normal;
}

.platform-inline-metrics {
  min-width: 0;
  display: grid;
  grid-template-columns: 1.18fr .68fr .68fr .85fr .5fr;
  gap: 3px;
}

.platform-inline-metrics span {
  min-width: 0;
  padding-left: 5px;
  overflow: hidden;
  border-left: 1px solid rgba(75, 157, 196, .13);
  color: #63869a;
  font-size: 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-inline-metrics strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #dff7ff;
  font-size: 8px;
  text-overflow: ellipsis;
}

.platform-inline-metrics .metric-warn {
  color: var(--v5-amber);
}

.platform-row .store-dot {
  width: 31px;
  min-height: 18px;
  padding: 0;
}

.order-panel .panel-title,
.platform-panel .panel-title,
.social-panel .panel-title,
.warehouse-panel .panel-title,
.command-panel .panel-title,
.ai-panel .panel-title {
  min-height: 28px;
}

.order-row {
  min-height: 19px;
  padding-top: 2px;
  padding-bottom: 2px;
}

.live-orders {
  gap: 2px;
}

.order-panel .status {
  height: 15px;
}

.order-panel .peak-note {
  margin-top: 3px;
  font-size: 7px;
}

.flow-center {
  min-height: 268px;
  grid-template-rows: 172px 31px 31px;
  gap: 5px;
  padding: 6px;
}

.flow-stage {
  min-height: 172px;
  grid-template-columns: minmax(125px, 158px) minmax(205px, 1fr) minmax(125px, 158px);
  gap: 18px;
}

.flow-core-zone {
  min-height: 168px;
}

.flow-orbit,
.flow-core-zone::before,
.flow-core-zone::after {
  display: none;
}

.core-node {
  width: min(100%, 224px);
  min-height: 154px;
  display: block;
  padding: 7px 11px;
  border-radius: 5px;
  clip-path: none;
  text-align: left;
  background: linear-gradient(180deg, rgba(8, 31, 43, .99), rgba(2, 14, 21, .99));
  box-shadow: 0 0 24px rgba(34, 211, 238, .15), inset 0 0 22px rgba(34, 211, 238, .05);
}

.core-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(75, 157, 196, .18);
}

.core-title > span {
  color: var(--v5-cyan);
  font-size: 8px;
  font-weight: 900;
}

.core-title em {
  color: var(--v5-green);
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
}

.core-status-list {
  display: grid;
  gap: 1px;
  padding: 4px 0 3px;
}

.core-status-list span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-height: 18px;
  color: #7d9cac;
  font-size: 8px;
}

.core-status-list strong {
  color: var(--v5-cyan);
  font-size: 12px;
}

.core-status-list .healthy {
  color: var(--v5-green);
}

.core-node > small {
  display: block;
  padding-top: 4px;
  overflow: hidden;
  border-top: 1px solid rgba(75, 157, 196, .13);
  color: #6e8f9f;
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-node {
  min-height: 28px;
}

.flow-activity {
  min-height: 31px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.flow-nodes.bottom .flow-node {
  min-height: 31px;
}

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

.pipe-step {
  min-height: 61px;
  padding: 4px 2px;
}

.pipe-step b {
  font-size: 7px;
}

.pipe-step strong {
  font-size: 14px;
}

.ai-live-strip {
  grid-template-columns: repeat(4, 1fr);
}

.warehouse-rings {
  gap: 5px;
}

.ring {
  width: 102px;
  max-width: 100%;
  justify-self: center;
  min-height: 0;
  padding: 12px;
  align-content: center;
  justify-items: center;
  gap: 1px;
}

.ring::before {
  inset: 8px;
}

.ring b,
.ring strong,
.ring small,
.ring em {
  position: relative;
  z-index: 1;
  max-width: 78%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ring b {
  color: #8daaba;
  font-size: 7px;
}

.ring strong {
  color: #fff;
  font-size: 14px;
}

.ring small,
.ring em {
  color: #6d8b9a;
  font-size: 5px;
  font-style: normal;
}

.warehouse-flow-extended {
  grid-template-columns: 1fr 8px 1fr 8px 1fr 8px 1fr 8px 1fr 8px 1fr 8px 1fr;
  gap: 2px;
}

.warehouse-flow-extended span,
.warehouse-tile {
  padding-top: 3px;
  padding-bottom: 3px;
}

.warehouse-overview {
  gap: 4px;
}

.warehouse-flow-extended .danger b {
  color: var(--v5-red);
}

.warehouse-flow-extended .warn b {
  color: var(--v5-amber);
}

.overview-trends {
  min-height: 176px;
}

.overview-intel-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(360px, 1fr);
  gap: 10px;
}

.trend-zone,
.ops-alert-zone {
  min-width: 0;
}

.ops-alert-zone {
  padding-left: 10px;
  border-left: 1px solid rgba(75, 157, 196, .16);
}

.ops-alert-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.ops-alert-item {
  min-width: 0;
  min-height: 54px;
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 2px 7px;
  padding: 6px 7px;
  border: 1px solid rgba(75, 157, 196, .18);
  border-radius: 4px;
  color: var(--v5-text);
  background: rgba(2, 13, 21, .72);
  cursor: pointer;
  text-align: left;
}

.ops-alert-item > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--v5-cyan);
  box-shadow: 0 0 8px var(--v5-cyan);
}

.ops-alert-item.warning > i {
  background: var(--v5-amber);
  box-shadow: 0 0 8px var(--v5-amber);
}

.ops-alert-item.critical > i {
  background: var(--v5-red);
  box-shadow: 0 0 8px var(--v5-red);
}

.ops-alert-item span {
  min-width: 0;
}

.ops-alert-item b,
.ops-alert-item small {
  display: block;
}

.ops-alert-item b {
  font-size: 9px;
}

.ops-alert-item small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--v5-muted);
  font-size: 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-alert-item > strong {
  color: var(--v5-cyan);
  font-size: 14px;
}

.ops-alert-item.warning > strong { color: var(--v5-amber); }
.ops-alert-item.critical > strong { color: var(--v5-red); }

.ops-alert-item > em {
  grid-column: 2 / 4;
  color: #5f8294;
  font-size: 6px;
  font-style: normal;
  text-align: right;
}

@media (min-width: 1501px) {
  .social-row {
    height: 32px;
    min-height: 32px;
    grid-template-columns: 28px minmax(88px, 1.1fr) repeat(5, minmax(45px, .66fr)) 84px;
    grid-template-rows: 1fr;
    gap: 4px;
    padding: 2px 5px;
  }

  .social-icon {
    width: 23px;
    height: 23px;
    grid-column: 1;
    grid-row: 1;
  }

  .social-row > div:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }

  .social-row > .social-metric:nth-child(3),
  .social-row > .social-metric:nth-child(4),
  .social-row > .social-metric:nth-child(5),
  .social-row > .social-metric:nth-child(6),
  .social-row > .social-metric:nth-child(7) {
    grid-row: 1;
  }

  .social-row > .social-metric:nth-child(3) { grid-column: 3; }
  .social-row > .social-metric:nth-child(4) { grid-column: 4; }
  .social-row > .social-metric:nth-child(5) { grid-column: 5; }
  .social-row > .social-metric:nth-child(6) { grid-column: 6; }
  .social-row > .social-metric:nth-child(7) { grid-column: 7; }

  .social-row .bar-stack {
    grid-column: 8;
    grid-row: 1;
    height: 23px;
  }

  .social-summary {
    height: 30px;
    margin-top: 2px;
  }

  .social-summary div {
    padding-top: 3px;
    padding-bottom: 3px;
  }

  .social-overview {
    gap: 3px;
  }
}

@media (max-width: 1500px) and (min-width: 761px) {
  .title-row {
    grid-template-columns: minmax(0, 1fr) 390px;
  }

  .period-box {
    width: 390px;
    grid-template-columns: 1fr;
  }

  .period-tabs,
  .date-range-bar,
  .period-box small {
    grid-column: 1;
    grid-row: auto;
  }

  .main-grid {
    grid-template-columns: 29fr minmax(430px, 42fr) 29fr;
  }

  .platform-card.platform-row {
    grid-template-columns: minmax(0, 1fr) 90px 34px;
    min-height: 64px;
  }

  .platform-inline-metrics {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .pipeline {
    grid-template-columns: repeat(5, 1fr);
  }

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

  .ops-alert-zone {
    padding-top: 8px;
    padding-left: 0;
    border-top: 1px solid rgba(75, 157, 196, .16);
    border-left: 0;
  }
}

@media (max-width: 760px) {
  .hero-screen {
    grid-template-rows: none;
  }

  .title-row,
  .period-box {
    grid-template-columns: 1fr;
  }

  .period-box {
    width: 100%;
  }

  .hero-screen,
  .title-row,
  .market-summary,
  .kpi-grid,
  .main-grid,
  .dashboard-column,
  .overview-trends,
  .overview-intel-layout,
  .trend-zone,
  .ops-alert-zone,
  .overview-trend-grid,
  .ops-alert-list {
    width: 100%;
    min-width: 0;
  }

  .market-summary,
  .main-grid,
  .overview-intel-layout,
  .overview-trend-grid,
  .ops-alert-list {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .period-tabs,
  .date-range-bar,
  .period-box small {
    grid-column: 1;
    grid-row: auto;
  }

  .platform-card.platform-row {
    grid-template-columns: minmax(0, 1fr) 84px 34px;
    min-height: 76px;
  }

  .platform-inline-metrics {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .flow-stage {
    grid-template-columns: minmax(72px, 1fr) 128px minmax(72px, 1fr);
    gap: 5px;
  }

  .flow-center {
    min-height: 390px;
    grid-template-rows: 172px auto auto;
  }

  .core-node {
    width: 128px;
    min-height: 154px;
    padding: 6px;
  }

  .core-title > span {
    font-size: 6px;
  }

  .core-title em {
    display: none;
  }

  .core-status-list span {
    font-size: 6px;
  }

  .core-status-list strong {
    font-size: 9px;
  }

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

  .warehouse-flow-extended {
    grid-template-columns: repeat(7, 1fr);
  }

  .warehouse-flow-extended > i {
    display: none;
  }

  .overview-intel-layout,
  .ops-alert-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .ops-alert-zone {
    padding-top: 8px;
    padding-left: 0;
    border-top: 1px solid rgba(75, 157, 196, .16);
    border-left: 0;
  }
}
