:root {
  color-scheme: dark;
  --bg: #03070d;
  --surface: rgba(5, 20, 35, .9);
  --surface-2: rgba(7, 29, 52, .94);
  --surface-3: rgba(3, 13, 25, .96);
  --line: rgba(54, 170, 255, .24);
  --line-strong: rgba(38, 198, 255, .74);
  --text: #eef8ff;
  --soft: #9fbad1;
  --muted: #7192ad;
  --blue: #2d8bff;
  --cyan: #20d7ff;
  --green: #4ce28d;
  --yellow: #ffbc4a;
  --orange: #ff8e34;
  --red: #ff4b5c;
  --purple: #b161ff;
  --shadow: 0 0 34px rgba(0, 174, 255, .15);
  --inner: inset 0 0 28px rgba(35, 196, 255, .06);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 1280px;
  font-size: 14px;
  background:
    radial-gradient(circle at 50% -12%, rgba(0, 147, 255, .22), transparent 32%),
    radial-gradient(circle at 12% 32%, rgba(43, 104, 255, .13), transparent 26%),
    linear-gradient(180deg, #02060b 0%, #061222 46%, #02070e 100%);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

button {
  font-family: inherit;
}

.app-shell {
  min-height: 100vh;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 50px;
  display: grid;
  grid-template-columns: 178px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(62, 180, 255, .16);
  background: rgba(3, 9, 17, .88);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .26);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--cyan);
  font-weight: 900;
  box-shadow: inset 0 0 14px rgba(32, 215, 255, .18), 0 0 18px rgba(32, 215, 255, .13);
}

.brand strong {
  font-size: 15px;
  letter-spacing: 0;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.nav-tabs button,
.nav-tools button,
.period-tabs button,
.panel-title button,
.filter-pills button,
.order-tools button,
.drawer-close,
.section-head > button {
  border: 1px solid rgba(68, 170, 255, .2);
  border-radius: 7px;
  color: #aac8df;
  background: rgba(8, 25, 45, .74);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.nav-tabs button {
  height: 34px;
  padding: 0 18px;
  font-weight: 800;
}

.nav-tabs button.active,
.nav-tabs button:hover,
.period-tabs button.active,
.filter-pills button.active,
.order-tools button.active,
.panel-title button:hover,
.nav-tools button:hover,
.section-head > button:hover {
  color: #fff;
  border-color: rgba(47, 202, 255, .72);
  background: linear-gradient(180deg, rgba(0, 116, 220, .85), rgba(4, 45, 91, .82));
  box-shadow: 0 0 18px rgba(0, 174, 255, .22);
}

.nav-tabs button:active,
.nav-tools button:active,
.panel-title button:active,
.section-head > button:active {
  transform: translateY(1px);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-tools button {
  height: 30px;
  padding: 0 12px;
  font-weight: 800;
}

.live-badge {
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid rgba(76, 226, 141, .45);
  border-radius: 7px;
  color: var(--green);
  background: rgba(15, 65, 34, .35);
  font-weight: 900;
}

.live-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(76, 226, 141, .12), 0 0 16px rgba(76, 226, 141, .75);
  animation: livePulse 1.4s infinite;
}

main {
  padding: 16px 18px 40px;
}

.hero-screen {
  min-height: calc(100vh - 66px);
  display: grid;
  grid-template-rows: 62px 118px 42px 112px 132px minmax(560px, 1fr);
  gap: 10px;
}

.time-strip,
.title-row,
.rate-rule,
.market-card,
.kpi-card,
.panel,
.detail-section,
.table-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  background:
    linear-gradient(145deg, rgba(9, 32, 55, .9), rgba(3, 13, 24, .94)),
    linear-gradient(90deg, rgba(39, 184, 255, .05), transparent);
  box-shadow: var(--shadow), var(--inner);
}

.time-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  padding: 8px;
}

.time-card {
  position: relative;
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 0 12px;
  border: 1px solid rgba(72, 172, 255, .16);
  border-radius: 8px;
  background: rgba(1, 13, 26, .62);
  overflow: hidden;
}

.time-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(38, 202, 255, .08), transparent);
  transform: translateX(-100%);
  animation: panelScan 5s infinite;
}

.time-card b {
  color: #ccecff;
  font-size: 12px;
}

.time-card span {
  color: #fff;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.title-row {
  display: grid;
  grid-template-columns: 1fr 430px;
  align-items: center;
  gap: 20px;
  padding: 10px 22px;
  background:
    linear-gradient(90deg, transparent 0 4%, rgba(12, 38, 64, .94) 15% 85%, transparent),
    linear-gradient(180deg, rgba(8, 23, 40, .88), rgba(1, 10, 18, .94));
}

.eyebrow,
.panel-title span,
.section-head span {
  color: var(--cyan);
  font-size: 12px;
  letter-spacing: .06em;
  font-weight: 900;
}

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

.title-left h1 {
  margin: 4px 0 5px;
  color: #fff;
  font-size: clamp(30px, 1.9vw, 40px);
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 0 22px rgba(34, 201, 255, .35);
}

.title-left p {
  margin: 0;
  color: #aac6dc;
  font-size: 13px;
  font-weight: 800;
}

.period-box {
  justify-self: end;
  width: 430px;
  display: grid;
  gap: 6px;
}

.period-tabs {
  height: 34px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.period-tabs button {
  font-size: 14px;
  font-weight: 900;
}

.period-box small {
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.date-range-bar {
  min-width: 0;
  min-height: 28px;
  display: grid;
  grid-template-columns: auto 132px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 4px 7px;
  border: 1px solid rgba(68, 170, 255, .2);
  border-radius: 7px;
  background: rgba(4, 20, 36, .78);
}

.date-range-bar label {
  color: #aac8df;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.date-range-bar input {
  width: 132px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid rgba(68, 170, 255, .28);
  border-radius: 5px;
  outline: none;
  color: #eefaff;
  background: #06182a;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  color-scheme: dark;
}

.date-range-bar input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(32, 215, 255, .12);
}

.date-range-bar span {
  min-width: 0;
  overflow: hidden;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 900;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rate-rule {
  display: grid;
  grid-template-columns: 250px 200px 220px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 7px 14px;
}

.rate-rule div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border-right: 1px dashed rgba(97, 178, 230, .25);
  white-space: nowrap;
}

.rate-rule b {
  color: #fff;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.rate-rule span {
  color: var(--cyan);
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}

.rate-rule p {
  margin: 0;
  color: #98b6cc;
  font-size: 12px;
  line-height: 1.35;
}

.market-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  min-height: 112px;
}

.market-card {
  position: relative;
  min-width: 0;
  min-height: 112px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-content: space-between;
  gap: 12px 18px;
  padding: 14px 16px 13px;
  overflow: hidden;
  cursor: pointer;
}

.market-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: .64;
}

.market-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.market-heading {
  min-width: 0;
}

.market-heading > span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-card h3 {
  margin: 5px 0 0;
  color: #fff;
  font-size: 17px;
  line-height: 1.1;
}

.market-card strong {
  align-self: center;
  color: var(--cyan);
  font-size: clamp(20px, 1.35vw, 28px);
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 16px rgba(32, 215, 255, .22);
}

.market-kv {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.market-kv span {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid rgba(74, 171, 255, .13);
  border-radius: 6px;
  background: rgba(2, 12, 24, .46);
}

.market-kv b {
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.market-card:hover {
  border-color: rgba(32, 215, 255, .55);
  box-shadow: 0 0 22px rgba(32, 215, 255, .14), var(--inner);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
}

.kpi-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(30px, auto) auto 34px;
  gap: 5px;
  min-width: 0;
  min-height: 126px;
  padding: 10px 12px 8px;
  overflow: hidden;
  cursor: pointer;
}

.kpi-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: .72;
}

.kpi-card .rank {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  background: rgba(45, 139, 255, .28);
  border: 1px solid rgba(45, 139, 255, .55);
  font-size: 12px;
  font-weight: 900;
}

.kpi-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.kpi-card label {
  display: block;
  min-width: 0;
  margin-top: 0;
  color: #a9cbe2;
  font-size: 13px;
  line-height: 1.22;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.kpi-card strong {
  display: block;
  min-width: 0;
  margin-top: 0;
  color: #fff;
  font-size: clamp(22px, 1.34vw, 31px);
  line-height: 1;
  font-weight: 900;
  text-shadow: 0 0 16px rgba(50, 181, 255, .25);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-card small {
  display: block;
  min-width: 0;
  margin-top: 0;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-card.warning small,
.kpi-card.warning strong {
  color: var(--yellow);
}

.kpi-card.danger small,
.kpi-card.danger strong {
  color: var(--red);
}

.sparkline {
  position: static;
  width: 100%;
  height: 26px;
  opacity: .86;
}

.spark-button {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  color: #87dfff;
  background: transparent;
  cursor: zoom-in;
}

.spark-button span {
  justify-self: end;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.spark-button:hover span {
  color: var(--cyan);
}

.main-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: 29% 1fr 29%;
  align-items: start;
  gap: 10px;
}

.dashboard-column {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
}

.panel {
  min-width: 0;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
}

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

.panel-title.center {
  align-items: center;
  text-align: center;
}

.panel-title h2,
.section-head h2 {
  margin: 3px 0 0;
  color: #fff;
  font-size: 18px;
  letter-spacing: 0;
}

.panel-title button,
.section-head > button {
  min-height: 28px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
}

.platform-groups {
  display: grid;
  gap: 8px;
}

.platform-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(74, 171, 255, .25);
  border-radius: 8px;
  background: rgba(3, 17, 32, .7);
}

.platform-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

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

.flag {
  width: 22px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 3px;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  background: rgba(45, 139, 255, .28);
}

.group-name b {
  color: #fff;
  font-size: 14px;
}

.group-name small {
  color: var(--soft);
  font-size: 12px;
}

.platform-card .mini-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.store-dot {
  min-width: 0;
  height: 23px;
  border: 1px solid rgba(74, 171, 255, .24);
  border-radius: 6px;
  color: #bfe8ff;
  background: rgba(4, 25, 47, .9);
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.store-dot.online {
  border-color: rgba(76, 226, 141, .4);
  color: #d9fff0;
}

.group-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.group-metrics div,
.social-metric,
.warehouse-tile,
.ai-task,
.archive-item {
  border: 1px solid rgba(74, 171, 255, .16);
  border-radius: 7px;
  background: rgba(2, 12, 24, .48);
}

.group-metrics div {
  padding: 6px;
}

.group-metrics span,
.social-metric span,
.warehouse-tile span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.group-metrics strong,
.social-metric strong,
.warehouse-tile strong {
  display: block;
  margin-top: 3px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.flow-center {
  position: relative;
  min-height: 350px;
  display: grid;
  grid-template-rows: minmax(205px, 1fr) auto auto;
  gap: 10px;
  padding: 13px;
  border: 1px dashed rgba(32, 215, 255, .24);
  border-radius: 10px;
  overflow: hidden;
  background:
    linear-gradient(rgba(32, 215, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 215, 255, .045) 1px, transparent 1px),
    radial-gradient(circle at 50% 38%, rgba(32, 215, 255, .15), transparent 27%);
  background-size: 32px 32px, 32px 32px, auto;
}

.flow-center::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(105deg, transparent 34%, rgba(32, 215, 255, .08) 49%, transparent 64%);
  transform: translateX(-100%);
  animation: flowScan 5.2s linear infinite;
  pointer-events: none;
}

.flow-stage {
  position: relative;
  z-index: 1;
  min-height: 205px;
  display: grid;
  grid-template-columns: minmax(118px, 155px) minmax(160px, 1fr) minmax(118px, 155px);
  align-items: center;
  gap: 28px;
}

.flow-stage::before,
.flow-stage::after {
  content: "";
  position: absolute;
  top: 50%;
  z-index: -1;
  width: 37%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(32, 215, 255, .6), transparent);
  box-shadow: 0 0 12px rgba(32, 215, 255, .18);
}

.flow-stage::before { left: 13%; }
.flow-stage::after { right: 13%; }

.flow-core-zone {
  position: relative;
  min-height: 190px;
  display: grid;
  place-items: center;
}

.flow-orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(32, 215, 255, .22);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 26px rgba(32, 215, 255, .12);
}

.orbit-a {
  width: 178px;
  aspect-ratio: 1;
  border-style: dashed;
  animation: rotateFlow 13s linear infinite;
}

.orbit-b {
  width: 136px;
  aspect-ratio: 1;
  animation: breathe 3.4s ease-in-out infinite reverse;
}

.core-node {
  position: relative;
  z-index: 3;
  width: 150px;
  min-height: 96px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  text-align: center;
  border: 1px solid rgba(32, 215, 255, .74);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(10, 58, 104, .96), rgba(3, 19, 35, .98));
  box-shadow: 0 0 34px rgba(32, 215, 255, .32), inset 0 0 32px rgba(32, 215, 255, .13);
}

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

.core-node em i,
.flow-event > i,
.chart-title-row em i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: livePulse 1.4s infinite;
}

.core-node b {
  color: #fff;
  font-size: 22px;
}

.core-node small {
  color: #d9f7ff;
  font-size: 11px;
  font-weight: 900;
}

.flow-nodes {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 7px;
}

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

.flow-node {
  position: relative;
  min-width: 0;
  min-height: 31px;
  display: grid;
  place-items: center;
  padding: 4px 7px;
  border: 1px solid rgba(76, 176, 255, .35);
  border-radius: 6px;
  color: #d9f7ff;
  background: rgba(5, 25, 45, .92);
  font-family: inherit;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.15;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.flow-node:hover {
  border-color: rgba(32, 215, 255, .72);
  background: rgba(8, 49, 80, .96);
  transform: translateY(-1px);
}

.flow-node::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 29px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(32, 215, 255, .88), transparent);
}

.flow-nodes.left .flow-node::after { left: 100%; }
.flow-nodes.right .flow-node::after { right: 100%; }
.flow-nodes.bottom .flow-node::after { display: none; }

.flow-node::before {
  content: "";
  position: absolute;
  top: calc(50% - 2px);
  z-index: 2;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: flowDotRight 1.8s linear infinite;
  animation-delay: var(--flow-delay);
}

.flow-nodes.left .flow-node::before { left: calc(100% + 1px); }
.flow-nodes.right .flow-node::before {
  right: calc(100% + 1px);
  animation-name: flowDotLeft;
}
.flow-nodes.bottom .flow-node::before { display: none; }

.flow-activity {
  position: relative;
  z-index: 2;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-top: 1px solid rgba(74, 171, 255, .18);
  border-bottom: 1px solid rgba(74, 171, 255, .18);
  background: rgba(2, 15, 28, .76);
}

.flow-event {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}

.flow-event b {
  min-width: 0;
  overflow: hidden;
  color: #dff8ff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-activity dl {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 14px;
  margin: 0;
}

.flow-activity dl div {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.flow-activity dt {
  color: var(--muted);
  font-size: 10px;
}

.flow-activity dd {
  max-width: 118px;
  margin: 0;
  overflow: hidden;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-overview {
  display: grid;
  gap: 9px;
  align-content: space-between;
}

.social-row {
  display: grid;
  grid-template-columns: 40px 1.05fr repeat(5, 1fr) 70px;
  gap: 8px;
  align-items: center;
  min-height: 58px;
  padding: 7px 8px;
  border: 1px solid rgba(74, 171, 255, .21);
  border-radius: 8px;
  background: rgba(3, 17, 32, .7);
  cursor: pointer;
}

.social-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(145deg, #1d83ff, #064285);
}

.social-icon.ins { background: linear-gradient(145deg, #ff4cb3, #6c31ff); }
.social-icon.tk { background: linear-gradient(145deg, #11182f, #12c8dd); }
.social-icon.yt { background: linear-gradient(145deg, #ff443d, #9d1111); }
.social-icon.wa { background: linear-gradient(145deg, #20bf64, #08723d); }

.social-row h3 {
  margin: 0;
  color: #fff;
  font-size: 14px;
}

.social-row small {
  color: var(--muted);
  font-size: 11px;
}

.bar-stack {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  align-items: end;
  height: 30px;
}

.bar-stack i {
  display: block;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, var(--cyan), var(--blue));
}

.social-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  padding-top: 2px;
}

.social-summary div {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(74, 171, 255, .16);
  border-radius: 7px;
  background: rgba(2, 12, 24, .58);
}

.social-summary span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.social-summary b {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--cyan);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-orders {
  display: grid;
  gap: 6px;
  height: auto;
  overflow: hidden;
}

.order-row {
  display: grid;
  grid-template-columns: 62px 74px 1fr 96px 76px;
  gap: 7px;
  align-items: center;
  min-height: 30px;
  padding: 6px 7px;
  border: 1px solid rgba(74, 171, 255, .16);
  border-radius: 7px;
  background: rgba(2, 12, 24, .46);
  cursor: pointer;
  animation: rowIn .25s ease-out;
}

.order-row b,
.order-row strong {
  color: #fff;
  font-size: 12px;
}

.order-row span,
.order-row small {
  color: #b5cfe0;
  font-size: 11px;
}

.status {
  display: inline-grid;
  place-items: center;
  min-width: 58px;
  height: 21px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.status.paid { background: rgba(45, 139, 255, .85); }
.status.processed { background: rgba(122, 97, 255, .85); }
.status.packed { background: rgba(255, 142, 52, .88); color: #160b00; }
.status.shipped { background: rgba(32, 215, 255, .84); color: #00131a; }
.status.delivery { background: rgba(76, 226, 141, .84); color: #00190b; }
.status.done { background: rgba(38, 121, 75, .9); }

.peak-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

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

.pipe-step {
  position: relative;
  min-height: 64px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  border: 1px solid rgba(74, 171, 255, .24);
  border-radius: 8px;
  background: rgba(3, 17, 32, .74);
}

.pipe-step::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 50%;
  width: 8px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.pipe-step:last-child::after { display: none; }

.pipe-step b {
  color: #adc9dd;
  font-size: 12px;
}

.pipe-step strong {
  color: var(--cyan);
  font-size: 21px;
  line-height: 1;
}

.pipe-step.hot {
  border-color: rgba(76, 226, 141, .55);
  background: linear-gradient(180deg, rgba(13, 87, 49, .7), rgba(3, 18, 31, .94));
}

.line-health {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 110px 1fr 48px;
  align-items: center;
  gap: 12px;
  color: #aac8df;
  font-size: 13px;
  font-weight: 900;
}

.line-health div {
  height: 8px;
  border-radius: 999px;
  background: rgba(71, 100, 130, .7);
  overflow: hidden;
}

.line-health i {
  display: block;
  width: 94%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--cyan), var(--yellow));
}

.ai-live-strip {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(180px, 1.45fr) repeat(3, minmax(100px, 1fr));
  gap: 7px;
  margin-top: 9px;
}

.ai-live-strip span {
  min-width: 0;
  padding: 7px 8px;
  overflow: hidden;
  border: 1px solid rgba(74, 171, 255, .16);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(2, 12, 24, .58);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-live-strip span:first-child i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 9px var(--green);
  animation: livePulse 1.4s infinite;
}

.ai-live-strip b {
  color: #dff8ff;
}

.warehouse-overview {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 10px;
  align-content: start;
}

.warehouse-rings {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.ring {
  min-width: 0;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  background: conic-gradient(var(--cyan) 72%, rgba(61, 83, 111, .55) 0);
  position: relative;
  cursor: pointer;
}

.ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #061425;
  box-shadow: inset 0 0 18px rgba(32, 215, 255, .12);
}

.ring b,
.ring span {
  position: relative;
  z-index: 1;
}

.ring b {
  align-self: end;
  color: #aac8df;
  font-size: 11px;
}

.ring span {
  align-self: start;
  color: #fff;
  font-size: 19px;
  font-weight: 900;
}

.warehouse-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
}

.warehouse-flow-mini {
  display: grid;
  grid-template-columns: 1fr 14px 1fr 14px 1fr 14px 1fr 14px 1fr;
  align-items: center;
  gap: 4px;
}

.warehouse-flow-mini span {
  min-width: 0;
  padding: 7px 5px;
  border: 1px solid rgba(74, 171, 255, .16);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(2, 12, 24, .58);
  font-size: 9px;
  text-align: center;
}

.warehouse-flow-mini b {
  display: block;
  margin-top: 2px;
  color: #dff8ff;
  font-size: 11px;
}

.warehouse-flow-mini i {
  height: 1px;
  background: linear-gradient(90deg, rgba(32, 215, 255, .2), var(--cyan));
  box-shadow: 0 0 8px rgba(32, 215, 255, .25);
  animation: dataPulse 1.8s infinite;
}

.warehouse-tile {
  padding: 8px 7px;
}

.warehouse-tile.warn strong { color: var(--yellow); }
.warehouse-tile.danger strong { color: var(--red); }

.detail-section {
  margin-top: 18px;
  padding: 18px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.section-head p {
  margin: 7px 0 0;
  color: var(--soft);
  max-width: 920px;
  line-height: 1.55;
}

.filter-pills,
.order-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.filter-pills button,
.order-tools button {
  min-height: 30px;
  padding: 0 12px;
  font-weight: 900;
}

.store-matrix {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.store-card {
  min-height: 136px;
  padding: 11px;
  border: 1px solid rgba(74, 171, 255, .19);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(6, 25, 45, .88), rgba(2, 12, 23, .92));
  cursor: pointer;
}

.store-card:hover,
.social-row:hover,
.order-row:hover,
.warehouse-tile:hover,
.ring:hover {
  border-color: rgba(32, 215, 255, .56);
  box-shadow: 0 0 20px rgba(32, 215, 255, .12);
}

.store-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 9px;
}

.store-card h3 {
  margin: 0;
  color: #fff;
  font-size: 14px;
}

.store-card small {
  color: var(--muted);
  font-size: 11px;
}

.store-kv {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.store-kv div {
  padding: 7px;
  border-radius: 6px;
  background: rgba(2, 12, 23, .52);
}

.store-kv span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.store-kv b {
  display: block;
  margin-top: 3px;
  color: var(--cyan);
  font-size: 13px;
}

.table-card {
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 11px 10px;
  border-bottom: 1px solid rgba(74, 171, 255, .12);
  color: #bdd4e4;
  text-align: left;
  font-size: 13px;
}

.data-table th {
  color: #effaff;
  background: rgba(9, 32, 55, .9);
  font-size: 12px;
  letter-spacing: .03em;
}

.data-table tbody tr {
  cursor: pointer;
}

.data-table tbody tr:hover {
  background: rgba(32, 215, 255, .055);
}

.data-table button {
  height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(32, 215, 255, .28);
  border-radius: 6px;
  color: #d9f7ff;
  background: rgba(7, 30, 55, .9);
  cursor: pointer;
  font-weight: 900;
}

.ai-detail-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.ai-task {
  position: relative;
  padding: 14px;
  min-height: 130px;
  overflow: hidden;
}

.ai-task::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--green));
}

.ai-task h3,
.warehouse-card h3 {
  margin: 0;
  color: #fff;
  font-size: 16px;
}

.ai-task strong {
  display: block;
  margin: 14px 0 8px;
  color: var(--cyan);
  font-size: 36px;
}

.ai-task p {
  margin: 0;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.45;
}

.social-matrix {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.social-card-detail,
.warehouse-card {
  padding: 14px;
  border: 1px solid rgba(74, 171, 255, .19);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(6, 25, 45, .88), rgba(2, 12, 23, .92));
}

.social-card-detail h3 {
  margin: 0 0 10px;
  color: #fff;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  margin-top: 10px;
}

.account-grid button {
  height: 24px;
  border: 1px solid rgba(76, 226, 141, .24);
  border-radius: 5px;
  color: #cffff0;
  background: rgba(8, 41, 24, .42);
  font-size: 10px;
  cursor: pointer;
}

.warehouse-detail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.warehouse-flow {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-top: 4px;
}

.flow-step {
  position: relative;
  min-height: 72px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid rgba(74, 171, 255, .2);
  border-radius: 8px;
  background: rgba(3, 17, 32, .74);
  color: #d8f4ff;
  font-weight: 900;
}

.flow-step::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -10px;
  width: 10px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.flow-step:last-child::after { display: none; }

.archive-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.archive-item {
  padding: 14px;
}

.archive-item h3 {
  margin: 0 0 12px;
  color: #fff;
}

.archive-item dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}

.archive-item dt {
  color: var(--muted);
  font-size: 12px;
}

.archive-item dd {
  margin: 2px 0 0;
  color: var(--cyan);
  font-weight: 900;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, .48);
  backdrop-filter: blur(3px);
}

.detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 41;
  width: min(760px, 94vw);
  height: 100vh;
  padding: 18px;
  border-left: 1px solid rgba(32, 215, 255, .34);
  background: linear-gradient(180deg, rgba(5, 19, 34, .98), rgba(1, 7, 13, .98));
  box-shadow: -20px 0 46px rgba(0, 0, 0, .45);
  transform: translateX(102%);
  transition: transform .24s ease;
  overflow-y: auto;
}

.detail-drawer.open {
  transform: translateX(0);
}

.drawer-close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 1;
  min-height: 30px;
  padding: 0 12px;
  color: #fff;
}

.drawer-block {
  clear: both;
}

.drawer-block h2 {
  margin: 6px 0 6px;
  color: #fff;
  font-size: 24px;
}

.drawer-block p {
  margin: 0 0 14px;
  color: var(--soft);
  line-height: 1.55;
}

.drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  margin: 12px 0;
}

.drawer-kv {
  padding: 10px;
  border: 1px solid rgba(74, 171, 255, .18);
  border-radius: 8px;
  background: rgba(3, 17, 32, .7);
}

.drawer-kv span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.drawer-kv b {
  display: block;
  margin-top: 4px;
  color: var(--cyan);
  font-size: 17px;
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.mini-table th,
.mini-table td {
  padding: 8px 7px;
  border-bottom: 1px solid rgba(74, 171, 255, .13);
  color: #bed5e6;
  text-align: left;
  font-size: 12px;
}

.mini-table th {
  color: #fff;
}

.chart-drawer .large-chart {
  width: 100%;
  max-width: 100%;
  display: block;
  margin: 12px 0 14px;
  border: 1px solid rgba(74, 171, 255, .2);
  border-radius: 8px;
  background:
    linear-gradient(rgba(32, 215, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 215, 255, .035) 1px, transparent 1px),
    rgba(3, 17, 32, .68);
  background-size: 28px 28px, 28px 28px, auto;
  box-shadow: inset 0 0 24px rgba(32, 215, 255, .08);
}

.chart-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.chart-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-right: 72px;
}

.chart-title-row > div {
  min-width: 0;
}

.chart-title-row > div > span {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 900;
}

.chart-title-row em {
  flex: 0 0 auto;
  margin-top: 7px;
  color: var(--green);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.large-chart .grid line {
  stroke: rgba(159, 186, 209, .18);
  stroke-width: 1;
}

.large-chart .axis-value {
  fill: #86a6bd;
  font-size: 11px;
  font-weight: 700;
}

.large-chart .axis-title,
.large-chart .chart-legend text {
  fill: #bcd8e9;
  font-size: 11px;
  font-weight: 800;
}

.large-chart .point-value {
  fill: #eefaff;
  font-size: 10px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(2, 12, 24, .94);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.large-chart .tick {
  stroke: rgba(159, 186, 209, .35);
}

.large-chart .data-point {
  filter: drop-shadow(0 0 5px currentColor);
}

.large-chart .chart-bars rect {
  filter: drop-shadow(0 0 5px rgba(32, 215, 255, .16));
}

.chart-summary {
  grid-template-columns: repeat(4, 1fr);
}

.chart-data-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 7px;
}

.chart-data-head h3 {
  margin: 0;
  color: #fff;
  font-size: 15px;
}

.chart-data-head span {
  color: var(--muted);
  font-size: 11px;
}

.chart-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(74, 171, 255, .13);
  border-radius: 8px;
}

.chart-table {
  margin: 0;
}

.chart-table th,
.chart-table td {
  padding: 8px 10px;
  font-variant-numeric: tabular-nums;
}

.chart-privacy {
  margin-top: 11px !important;
  padding: 9px 10px;
  border-left: 2px solid rgba(32, 215, 255, .45);
  background: rgba(4, 22, 39, .55);
  font-size: 11px;
}

@keyframes livePulse {
  50% { transform: scale(.82); opacity: .7; }
}

@keyframes panelScan {
  55% { transform: translateX(120%); }
  100% { transform: translateX(120%); }
}

@keyframes rowIn {
  from { transform: translateY(-8px); opacity: .3; }
  to { transform: translateY(0); opacity: 1; }
}

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

@keyframes breathe {
  50% { opacity: .52; transform: translate(-50%, -50%) scale(1.06); }
}

@keyframes dataPulse {
  0% { opacity: .2; filter: blur(0); }
  50% { opacity: 1; filter: blur(.2px); }
  100% { opacity: .2; filter: blur(0); }
}

@keyframes flowScan {
  to { transform: translateX(100%); }
}

@keyframes flowDotRight {
  from { transform: translateX(0); opacity: .2; }
  35% { opacity: 1; }
  to { transform: translateX(27px); opacity: .15; }
}

@keyframes flowDotLeft {
  from { transform: translateX(0); opacity: .2; }
  35% { opacity: 1; }
  to { transform: translateX(-27px); opacity: .15; }
}

@media (max-width: 1500px) {
  body { min-width: 1180px; }
  .top-nav { grid-template-columns: 170px 1fr auto; }
  .nav-tabs button { padding: 0 12px; }
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
  .hero-screen { grid-template-rows: 62px 118px 42px 112px 258px minmax(560px, 1fr); }
  .flow-nodes.bottom { grid-template-columns: repeat(4, 1fr); }
  .flow-stage { grid-template-columns: minmax(104px, 140px) minmax(145px, 1fr) minmax(104px, 140px); gap: 18px; }
  .flow-activity { grid-template-columns: 1fr; }
  .flow-activity dl { grid-template-columns: repeat(3, 1fr); }
  .ai-live-strip,
  .social-summary { grid-template-columns: 1fr 1fr; }
  .social-row { grid-template-columns: 38px minmax(110px, 1fr) repeat(2, 1fr); }
  .store-matrix { grid-template-columns: repeat(4, 1fr); }
  .social-matrix,
  .ai-detail-grid { grid-template-columns: repeat(3, 1fr); }
}

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

  .top-nav {
    height: auto;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 9px;
    padding: 10px;
  }

  .brand {
    justify-content: flex-start;
  }

  .nav-tabs {
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .nav-tabs button {
    flex: 0 0 auto;
    height: 32px;
    padding: 0 12px;
  }

  .nav-tools {
    justify-content: space-between;
    flex-wrap: wrap;
  }

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

  .hero-screen {
    min-height: 0;
    grid-template-rows: none;
  }

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

  .time-card {
    min-height: 58px;
  }

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

  .title-left {
    text-align: left;
  }

  .title-left h1 {
    font-size: 26px;
    line-height: 1.12;
  }

  .period-box {
    width: 100%;
    justify-self: stretch;
  }

  .period-box small {
    text-align: left;
  }

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

  .rate-rule div {
    border-right: 0;
    border-bottom: 1px dashed rgba(97, 178, 230, .25);
    padding-bottom: 6px;
  }

  .market-summary,
  .kpi-grid,
  .main-grid,
  .store-matrix,
  .social-matrix,
  .ai-detail-grid,
  .warehouse-detail,
  .archive-list {
    grid-template-columns: 1fr;
  }

  .market-card {
    grid-template-columns: 1fr;
  }

  .market-card strong {
    justify-self: start;
  }

  .market-kv,
  .group-metrics,
  .warehouse-rings,
  .warehouse-stats,
  .drawer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .platform-panel,
  .command-panel,
  .social-panel,
  .order-panel,
  .ai-panel,
  .warehouse-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .panel,
  .detail-section {
    padding: 12px;
  }

  .flow-center {
    min-height: 470px;
    grid-template-rows: minmax(245px, auto) auto auto;
    padding: 10px;
  }

  .flow-stage {
    min-height: 245px;
    grid-template-columns: minmax(80px, 1fr) 112px minmax(80px, 1fr);
    gap: 12px;
  }

  .flow-core-zone { min-height: 190px; }
  .orbit-a { width: 145px; }
  .orbit-b { width: 108px; }

  .core-node {
    width: 112px;
    min-height: 82px;
  }

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

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

  .flow-node {
    min-height: 34px;
    font-size: 10px;
  }

  .flow-node::after,
  .flow-node::before {
    display: none;
  }

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

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

  .social-row {
    grid-template-columns: 38px minmax(110px, 1fr) repeat(2, 1fr);
  }

  .live-orders {
    height: auto;
  }

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

  .order-row > small {
    grid-column: 1 / 3;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .order-row > .status {
    grid-column: 3;
  }

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

  .ai-live-strip,
  .social-summary,
  .chart-summary {
    grid-template-columns: 1fr 1fr;
  }

  .pipe-step::after,
  .flow-step::after {
    display: none;
  }

  .line-health {
    grid-template-columns: 1fr;
  }

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

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

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

  .table-card {
    overflow-x: auto;
  }

  .data-table {
    min-width: 860px;
  }

  .section-head {
    display: grid;
  }

  .filter-pills,
  .order-tools {
    justify-content: flex-start;
  }

  .detail-drawer {
    width: 100vw;
  }

  .chart-title-row {
    display: grid;
    padding-right: 60px;
  }

  .chart-title-row em {
    margin-top: 0;
  }

  .chart-scroll .large-chart {
    min-width: 640px;
  }
}

@media (max-width: 460px) {
  .time-strip,
  .drawer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .social-row {
    grid-template-columns: 36px repeat(3, 1fr);
  }

  .social-row .social-icon {
    grid-row: 1 / span 3;
  }

  .social-row > div:nth-child(2),
  .social-row .bar-stack {
    grid-column: 2 / 5;
  }

  .kpi-card strong {
    white-space: normal;
  }

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

  .date-range-bar input {
    width: 100%;
  }

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

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

  .ai-live-strip,
  .social-summary,
  .chart-summary { grid-template-columns: 1fr; }
}
