:root {
  --bg: #070b13;
  --panel: #0f1a2c;
  --text: #e8eef9;
  --muted: #8291a9;
  --muted-2: #5c6b82;
  --line: rgba(148, 163, 184, 0.11);
  --line-strong: rgba(148, 163, 184, 0.2);
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --violet: #a78bfa;
  --green: #2dd4bf;
  --amber: #fbbf24;
  --rose: #fb7185;
  --font: "MiSans", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --num: "Bahnschrift", "DIN Alternate", "Segoe UI", "Microsoft YaHei", sans-serif;
  --radius: 15px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family: var(--font);
  background:
    radial-gradient(1000px 560px at 14% -8%, rgba(34, 211, 238, 0.11), transparent 62%),
    radial-gradient(900px 520px at 96% -4%, rgba(124, 58, 237, 0.12), transparent 62%),
    radial-gradient(700px 700px at 50% 110%, rgba(37, 99, 235, 0.06), transparent 70%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 62%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 62%);
}

::selection {
  color: #041019;
  background: rgba(34, 211, 238, 0.8);
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: #070b13;
}

::-webkit-scrollbar-thumb {
  background: #1b2a42;
  border: 2px solid #070b13;
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: #2a3d5c;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app {
  position: relative;
  z-index: 1;
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.09);
  background: rgba(7, 11, 19, 0.78);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 38px;
  width: 100%;
  max-width: 1600px;
  height: 68px;
  margin: 0 auto;
  padding: 0 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: none;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #7dd3fc;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.18), rgba(59, 130, 246, 0.07));
  box-shadow:
    0 0 24px rgba(34, 211, 238, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.brand-mark::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 7px #22d3ee;
}

.brand-mark .icon {
  width: 23px;
  height: 23px;
  stroke-width: 1.6;
}

.brand-text strong {
  display: block;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.brand-text strong em {
  color: #a9bad0;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.brand-text small {
  display: block;
  margin-top: 3px;
  color: #55657e;
  font-family: var(--num);
  font-size: 8.5px;
  letter-spacing: 0.19em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
}

.main-nav a {
  position: relative;
  padding: 8px 13px;
  border-radius: 9px;
  color: #8494ab;
  font-size: 12.5px;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.main-nav a:hover {
  color: #dbe7f7;
  background: rgba(148, 163, 184, 0.06);
}

.main-nav a.active {
  color: #dff8ff;
  background: rgba(34, 211, 238, 0.08);
}

.main-nav a.active::after {
  content: "";
  position: absolute;
  right: 13px;
  bottom: 2px;
  left: 13px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, #22d3ee, transparent);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-left: auto;
}

.live-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  color: #7f91aa;
  font-size: 10px;
  border: 1px solid rgba(148, 163, 184, 0.11);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.04);
  white-space: nowrap;
}

.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2dd4bf;
  box-shadow: 0 0 8px rgba(45, 212, 191, 0.9);
  animation: pulse 2.2s ease-in-out infinite;
}

.top-clock {
  min-width: 62px;
  color: #6f8098;
  font-family: var(--num);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.icon-btn {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #7b8da5;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.icon-btn:hover {
  color: #d9f6ff;
  border-color: rgba(34, 211, 238, 0.14);
  background: rgba(34, 211, 238, 0.06);
}

.icon-btn .icon {
  width: 16px;
  height: 16px;
}

.icon-btn.spinning .icon {
  animation: spin 0.75s linear infinite;
}

.avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #ecfeff;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 50%;
  background: linear-gradient(145deg, #0e7490, #1e40af);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.05);
}

/* ---------- page frame ---------- */
.page {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 30px 28px 38px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 13px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #5fbacf;
  font-family: var(--num);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.eyebrow span {
  width: 16px;
  height: 1px;
  background: linear-gradient(90deg, #22d3ee, transparent);
}

.page-title h1 {
  margin-top: 8px;
  color: transparent;
  font-size: 31px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.015em;
  background: linear-gradient(180deg, #f5f9ff 12%, #b8c6d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.page-title p {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 7px;
  color: #7d8da4;
  font-size: 12.5px;
}

.sample-tag {
  padding: 3px 7px;
  color: #fbbf24;
  font-size: 9.5px;
  letter-spacing: 0.04em;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 5px;
  background: rgba(251, 191, 36, 0.07);
  cursor: help;
}

/* ---------- filters ---------- */
.filterbar {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
  padding: 5px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 13px;
  background: rgba(14, 22, 38, 0.62);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(10px);
}

.segmented {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
  background: rgba(5, 9, 16, 0.55);
}

.segmented button {
  padding: 7px 10px;
  color: #7b8ca4;
  font-family: inherit;
  font-size: 11px;
  white-space: nowrap;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.segmented button:hover {
  color: #d7e4f5;
}

.segmented button.active {
  color: #eaf6ff;
  background: #1a2b45;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.filter-divider {
  width: 1px;
  height: 20px;
  margin: 0 3px;
  background: rgba(148, 163, 184, 0.12);
}

.select-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 4px 0 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.select-wrap:hover {
  background: rgba(148, 163, 184, 0.05);
}

.select-wrap > .icon:first-child {
  width: 14px;
  height: 14px;
  color: #6c7e96;
}

.select-wrap select {
  max-width: 120px;
  padding: 8px 23px 8px 2px;
  color: #c4d2e5;
  font-family: inherit;
  font-size: 11.5px;
  white-space: nowrap;
  border: 0;
  outline: none;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
}

.select-wrap select option {
  color: #dbe7f7;
  background: #101a2c;
}

.select-wrap .chevron {
  position: absolute;
  right: 4px;
  width: 14px;
  height: 14px;
  color: #66788f;
  pointer-events: none;
}

.reset-btn {
  padding: 8px 9px;
  color: #7889a1;
  font-family: inherit;
  font-size: 11.5px;
  white-space: nowrap;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.reset-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.export-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  color: #fff;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, #0e7490, #2563eb);
  box-shadow:
    0 6px 20px rgba(14, 116, 144, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.export-btn .icon {
  width: 14px;
  height: 14px;
}

.export-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.35);
}

.export-btn:active {
  transform: translateY(0);
}

/* ---------- meta ---------- */
.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 2px 16px;
  color: #5f7088;
  font-size: 10.5px;
}

.meta-row b {
  color: #a3b5cc;
  font-family: var(--num);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.meta-row i {
  display: inline-block;
  width: 1px;
  height: 10px;
  margin: 0 9px;
  vertical-align: -1px;
  background: rgba(148, 163, 184, 0.18);
}

.meta-prev b {
  color: #71839b;
}

/* ---------- kpi ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 15px;
}

.kpi-card {
  position: relative;
  min-height: 152px;
  padding: 17px 18px 50px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(19, 31, 52, 0.92), rgba(10, 17, 29, 0.96));
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.kpi-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.9;
  background: radial-gradient(220px 120px at 100% 0%, var(--glow), transparent 70%);
}

.kpi-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 18px;
  left: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glow), transparent);
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kpi-label {
  color: #8fa1ba;
  font-size: 12px;
  letter-spacing: 0.01em;
}

.kpi-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--accent);
  border: 1px solid var(--glow);
  border-radius: 9px;
  background: var(--glow);
}

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

.kpi-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 12px;
  color: #f1f6ff;
  font-family: var(--num);
  font-size: 30px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.02em;
}

.kpi-value .unit {
  color: #70839b;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
}

.kpi-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  color: #5f7088;
  font-size: 10.5px;
}

.delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2.5px 6px;
  font-family: var(--num);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 5px;
}

.delta.good {
  color: #34d399;
  background: rgba(52, 211, 153, 0.09);
}

.delta.bad {
  color: #fb7185;
  background: rgba(251, 113, 133, 0.09);
}

.delta.neutral {
  color: #7dd3fc;
  background: rgba(125, 211, 252, 0.08);
}

.kpi-spark {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 48px;
  opacity: 0.9;
  pointer-events: none;
}

.kpi-spark .line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kpi-spark .area {
  stroke: none;
}

/* ---------- cards / grid ---------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.span-4 {
  grid-column: span 4;
}

.span-8 {
  grid-column: span 8;
}

.span-12 {
  grid-column: span 12;
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(17, 28, 47, 0.9), rgba(9, 15, 27, 0.96));
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 20px;
  left: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(186, 230, 253, 0.18), transparent);
  pointer-events: none;
}

.card:hover {
  border-color: rgba(148, 163, 184, 0.18);
}

.card[id] {
  scroll-margin-top: 88px;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 19px 0;
}

.card-head h2 {
  color: #e6eefb;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.card-head p {
  margin-top: 4px;
  color: #63748b;
  font-size: 10.5px;
  letter-spacing: 0.01em;
}

.head-chip {
  padding: 3px 7px;
  color: #7d90a9;
  font-family: var(--num);
  font-size: 9.5px;
  white-space: nowrap;
  letter-spacing: 0.04em;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.05);
}

.text-btn {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px 0;
  color: #617389;
  font-family: inherit;
  font-size: 10.5px;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s;
}

.text-btn .icon {
  width: 12px;
  height: 12px;
}

.text-btn:hover {
  color: #7dd3fc;
}

.trend-card {
  min-height: 358px;
}

.status-card {
  min-height: 358px;
}

.cat-card,
.channel-card,
.issue-card {
  min-height: 296px;
}

.table-card,
.quality-card {
  min-height: 390px;
}

/* ---------- trend ---------- */
.mini-tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(148, 163, 184, 0.09);
  border-radius: 8px;
  background: rgba(5, 9, 16, 0.55);
}

.mini-tabs button {
  padding: 5px 10px;
  color: #71829a;
  font-family: inherit;
  font-size: 10.5px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.mini-tabs button:hover {
  color: #cfe2f5;
}

.mini-tabs button.active {
  color: #e7f8ff;
  background: #1a2b45;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.trend-body {
  padding: 7px 14px 11px 8px;
}

.legend {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 24px;
  padding: 6px 10px 0 14px;
  color: #8192a9;
  font-size: 10.5px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 8px var(--c);
}

.chart-wrap {
  position: relative;
  height: 266px;
}

.chart {
  width: 100%;
  height: 100%;
}

.chart svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.axis-text {
  fill: #5c6d85;
  font-family: var(--num);
  font-size: 9.5px;
  letter-spacing: 0.02em;
}

.grid-line {
  stroke: rgba(148, 163, 184, 0.085);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.axis-line {
  stroke: rgba(148, 163, 184, 0.13);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.trend-line {
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: drawLine 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.08s forwards;
}

.trend-line.secondary {
  stroke-width: 1.7;
}

.trend-area {
  opacity: 0;
  animation: fadeIn 0.65s ease 0.35s forwards;
}

.hover-line {
  stroke: rgba(148, 163, 184, 0.28);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  pointer-events: none;
}

.hover-dot {
  stroke: #09111f;
  stroke-width: 2.5;
  pointer-events: none;
}

.chart-tip {
  position: absolute;
  z-index: 6;
  min-width: 148px;
  padding: 10px 12px;
  pointer-events: none;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  background: rgba(7, 13, 24, 0.96);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42);
  transform: translate(-50%, 0);
  backdrop-filter: blur(12px);
  transition: opacity 0.12s;
}

.chart-tip[hidden] {
  display: none;
}

.tip-date {
  margin-bottom: 7px;
  color: #8193aa;
  font-family: var(--num);
  font-size: 9.5px;
  letter-spacing: 0.04em;
}

.tip-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  color: #8fa1b8;
  font-size: 10.5px;
  white-space: nowrap;
}

.tip-row i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 6px var(--c);
}

.tip-row b {
  margin-left: auto;
  color: #eff6ff;
  font-family: var(--num);
  font-size: 11px;
  font-weight: 500;
}

/* ---------- donut ---------- */
.status-body {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 290px;
  padding: 16px 18px 20px;
}

.donut-wrap {
  position: relative;
  width: 178px;
  height: 178px;
  flex: none;
}

.donut-wrap svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-seg {
  fill: none;
  stroke-width: 21;
  cursor: default;
  transition: stroke-dasharray 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), stroke-opacity 0.2s;
}

.donut-seg:hover {
  stroke-opacity: 0.78;
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.donut-center strong {
  color: #f2f8ff;
  font-family: var(--num);
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}

.donut-center span {
  margin-top: 6px;
  color: #687b94;
  font-size: 9.5px;
  letter-spacing: 0.06em;
}

.status-legend {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.legend-row {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
}

.legend-row i {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--c);
  box-shadow: 0 0 8px var(--c);
}

.legend-row .name {
  overflow: hidden;
  color: #8b9db5;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.legend-row b {
  color: #d5e2f3;
  font-family: var(--num);
  font-size: 11px;
  font-weight: 500;
}

.legend-row em {
  min-width: 33px;
  color: #5d6f87;
  font-family: var(--num);
  font-size: 9.5px;
  font-style: normal;
  text-align: right;
}

/* ---------- category ---------- */
.cat-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 13px;
  padding: 17px 19px 18px;
}

.rank-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 11.5px;
}

.rank-label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #b9c7da;
}

.rank-idx {
  color: #4f6078;
  font-family: var(--num);
  font-size: 9px;
}

.rank-value {
  color: #e5edf9;
  font-family: var(--num);
  font-size: 12px;
  font-weight: 500;
}

.rank-value em {
  margin-left: 5px;
  color: #65778f;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 400;
}

.bar-track {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.09);
}

.bar-fill {
  width: var(--w);
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--c), var(--c2, var(--c)));
  box-shadow: 0 0 12px var(--glow);
  animation: barGrow 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

/* ---------- channel ---------- */
.channel-body {
  min-height: 228px;
  padding: 14px 16px 17px;
}

.channel-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4px;
  height: 194px;
}

.channel {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
  min-width: 0;
}

.channel-val {
  color: #c2d0e2;
  font-family: var(--num);
  font-size: 10.5px;
}

.ch-track {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 106px;
}

.ch-fill {
  position: relative;
  width: min(30px, 72%);
  height: var(--h);
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--c2, var(--c)), var(--c));
  box-shadow: 0 0 16px var(--glow);
  animation: riseBar 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.ch-fill::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.45);
}

.ch-name {
  color: #8193aa;
  font-size: 9.5px;
  white-space: nowrap;
}

.ch-pct {
  color: #52647c;
  font-family: var(--num);
  font-size: 8.5px;
}

/* ---------- issues ---------- */
.issue-body {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 15px 19px 16px;
}

.issue-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 9px;
}

.issue-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: var(--c);
  border: 1px solid var(--glow);
  border-radius: 7px;
  background: var(--glow);
}

.issue-icon .icon {
  width: 13px;
  height: 13px;
}

.issue-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  font-size: 10.5px;
}

.issue-name {
  color: #aebed2;
}

.issue-count {
  color: #65778f;
  font-family: var(--num);
  font-size: 10px;
}

.issue-bar {
  height: 4px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.08);
}

.issue-bar i {
  display: block;
  width: var(--w);
  height: 100%;
  border-radius: 99px;
  background: var(--c);
  opacity: 0.85;
  animation: barGrow 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.issue-pct {
  color: #8fa1b8;
  font-family: var(--num);
  font-size: 10px;
  text-align: right;
}

/* ---------- table ---------- */
.table-card .card-head {
  padding-bottom: 9px;
}

.live-label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #5eead4;
  font-family: var(--num);
  font-size: 8.5px;
  letter-spacing: 0.12em;
}

.live-label i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2dd4bf;
  box-shadow: 0 0 8px #2dd4bf;
  animation: pulse 1.8s ease-in-out infinite;
}

.table-wrap {
  overflow-x: auto;
  padding: 0 7px 8px;
}

table {
  width: 100%;
  min-width: 710px;
  border-collapse: collapse;
  font-size: 11px;
}

thead th {
  padding: 9px 10px;
  color: #566880;
  font-size: 9.5px;
  font-weight: 500;
  white-space: nowrap;
  text-align: left;
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(148, 163, 184, 0.09);
}

tbody td {
  height: 42px;
  padding: 10px;
  color: #a9b9cd;
  white-space: nowrap;
  border-bottom: 1px solid rgba(148, 163, 184, 0.055);
}

tbody tr {
  transition: background 0.18s;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: rgba(34, 211, 238, 0.035);
}

.ticket-id {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8fa6c0;
  font-family: var(--num);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.prio {
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: #64748b;
}

.prio.high {
  background: #fb7185;
  box-shadow: 0 0 7px rgba(251, 113, 133, 0.7);
}

.prio.medium {
  background: #fbbf24;
}

.prio.low {
  background: #475569;
}

.cat-pill {
  padding: 2.5px 6px;
  color: #9fb0c6;
  font-size: 9.5px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.07);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  color: var(--c);
  font-size: 9.5px;
  border: 1px solid var(--bd);
  border-radius: 999px;
  background: var(--bgc);
}

.status-pill i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}

.owner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.owner::before {
  content: "";
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(34, 211, 238, 0.2), rgba(59, 130, 246, 0.18)),
    #152238;
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.ticket-time {
  color: #66788f;
  font-family: var(--num);
  font-size: 9.5px;
}

.empty-state {
  padding: 46px 20px !important;
  color: #64748b !important;
  text-align: center !important;
}

/* ---------- quality ---------- */
.quality-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 9px 19px 17px;
}

.ring-wrap {
  position: relative;
  width: 146px;
  height: 146px;
  margin: 1px 0 7px;
}

.ring-wrap svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: rgba(148, 163, 184, 0.09);
  stroke-width: 9;
}

.ring-fill {
  fill: none;
  stroke: url(#ringGrad);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 0 396;
  filter: drop-shadow(0 0 6px rgba(45, 212, 191, 0.35));
  transition: stroke-dasharray 1s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ring-center strong {
  color: #f0fdfa;
  font-family: var(--num);
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}

.ring-center span {
  margin-top: 5px;
  color: #6c7e96;
  font-size: 9px;
  letter-spacing: 0.04em;
}

.quality-stats {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 100%;
  margin-top: 2px;
}

.q-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  font-size: 10.5px;
}

.q-row .lbl {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8395ad;
}

.q-row .lbl::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--c);
}

.q-row b {
  color: #d7e4f4;
  font-family: var(--num);
  font-size: 10.5px;
  font-weight: 500;
}

.q-bar {
  grid-column: 1 / -1;
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.08);
}

.q-bar i {
  display: block;
  width: var(--w);
  height: 100%;
  border-radius: 99px;
  background: var(--c);
  opacity: 0.8;
}

.risk-box {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin-top: 11px;
  padding: 9px 11px;
  border: 1px solid rgba(251, 113, 133, 0.15);
  border-radius: 9px;
  background: rgba(251, 113, 133, 0.06);
}

.risk-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: #fb7185;
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.1);
  animation: pulse 2s ease-in-out infinite;
}

.risk-text strong {
  display: block;
  color: #fda4af;
  font-size: 10.5px;
  font-weight: 600;
}

.risk-text small {
  display: block;
  margin-top: 2px;
  color: #7d6a78;
  font-size: 9px;
}

.risk-badge {
  margin-left: auto;
  padding: 2px 5px;
  color: #fb7185;
  font-family: var(--num);
  font-size: 9px;
  border: 1px solid rgba(251, 113, 133, 0.2);
  border-radius: 4px;
}

.risk-box.ok {
  border-color: rgba(45, 212, 191, 0.14);
  background: rgba(45, 212, 191, 0.055);
}

.risk-box.ok .risk-dot {
  background: #2dd4bf;
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.1);
  animation: none;
}

.risk-box.ok .risk-text strong {
  color: #5eead4;
}

.risk-box.ok .risk-text small {
  color: #5f7d7e;
}

.risk-box.ok .risk-badge {
  color: #2dd4bf;
  border-color: rgba(45, 212, 191, 0.18);
}

/* ---------- footer / toast ---------- */
.page-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding: 16px 2px 0;
  color: #4f6078;
  font-size: 9.5px;
  line-height: 1.6;
  border-top: 1px solid rgba(148, 163, 184, 0.07);
}

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  z-index: 100;
  padding: 10px 16px;
  color: #dff8ff;
  font-size: 11.5px;
  pointer-events: none;
  opacity: 0;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 10px;
  background: rgba(15, 27, 45, 0.96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  transform: translate(-50%, 20px);
  transition: opacity 0.25s, transform 0.25s;
  backdrop-filter: blur(10px);
}

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

/* ---------- motion ---------- */
.kpi-card,
.card {
  animation: fadeUp 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.kpi-card:nth-child(2) {
  animation-delay: 0.04s;
}

.kpi-card:nth-child(3) {
  animation-delay: 0.08s;
}

.kpi-card:nth-child(4) {
  animation-delay: 0.12s;
}

.kpi-card:nth-child(5) {
  animation-delay: 0.16s;
}

.dashboard-grid .card:nth-child(1) {
  animation-delay: 0.14s;
}

.dashboard-grid .card:nth-child(2) {
  animation-delay: 0.18s;
}

.dashboard-grid .card:nth-child(3) {
  animation-delay: 0.22s;
}

.dashboard-grid .card:nth-child(4) {
  animation-delay: 0.26s;
}

.dashboard-grid .card:nth-child(5) {
  animation-delay: 0.3s;
}

.dashboard-grid .card:nth-child(6) {
  animation-delay: 0.34s;
}

.dashboard-grid .card:nth-child(7) {
  animation-delay: 0.38s;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes barGrow {
  from {
    width: 0;
  }
}

@keyframes riseBar {
  from {
    height: 0;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.82);
  }
}

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

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .topbar-inner {
    gap: 24px;
    padding: 0 22px;
  }

  .page {
    padding: 26px 22px 34px;
  }

  .status-body {
    gap: 7px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .donut-wrap {
    width: 162px;
    height: 162px;
  }

  .legend-row {
    gap: 5px;
  }
}

@media (max-width: 1080px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .span-4,
  .span-8 {
    grid-column: span 12;
  }

  .status-body {
    justify-content: center;
    gap: 28px;
  }

  .donut-wrap {
    width: 180px;
    height: 180px;
  }

  .status-legend {
    flex: 0 1 260px;
  }

  .table-card,
  .quality-card {
    min-height: 0;
  }

  .quality-body {
    flex-direction: row;
    gap: 20px;
    align-items: center;
  }

  .quality-stats {
    flex: 1;
    margin-top: 0;
  }

  .risk-box {
    max-width: 340px;
  }
}

@media (max-width: 860px) {
  .topbar-inner {
    height: 62px;
  }

  .main-nav {
    display: none;
  }

  .live-pill {
    display: none;
  }

  .page-head {
    align-items: flex-start;
  }

  .filterbar {
    width: 100%;
  }

  .page-title h1 {
    font-size: 27px;
  }

  .quality-body {
    flex-wrap: wrap;
    justify-content: center;
  }

  .quality-stats {
    flex-basis: 100%;
  }

  .risk-box {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .topbar-inner {
    padding: 0 15px;
    gap: 12px;
  }

  .brand-text small {
    display: none;
  }

  .top-clock,
  .avatar {
    display: none;
  }

  .page {
    padding: 20px 14px 28px;
  }

  .page-title h1 {
    font-size: 25px;
  }

  .page-title p {
    align-items: flex-start;
    flex-wrap: wrap;
    font-size: 11.5px;
  }

  .filterbar {
    gap: 2px;
    padding: 4px;
  }

  .filter-divider {
    display: none;
  }

  .segmented {
    flex: 1 1 100%;
    margin-bottom: 2px;
  }

  .segmented button {
    flex: 1;
  }

  .select-wrap {
    flex: 1;
  }

  .select-wrap select {
    width: 100%;
    max-width: none;
  }

  .export-btn {
    flex: 1 1 100%;
    justify-content: center;
  }

  .meta-row {
    margin-bottom: 13px;
    line-height: 1.7;
  }

  .meta-prev {
    display: none;
  }

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

  .kpi-card {
    min-height: 142px;
    padding: 15px 15px 47px;
  }

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

  .kpi-grid .kpi-card:last-child {
    grid-column: span 2;
  }

  .dashboard-grid {
    gap: 10px;
  }

  .status-body {
    flex-direction: column;
    gap: 12px;
    padding-top: 12px;
  }

  .donut-wrap {
    width: 172px;
    height: 172px;
  }

  .status-legend {
    width: 100%;
    flex: none;
  }

  .channel-body {
    min-height: 218px;
  }

  .quality-body {
    flex-direction: column;
  }

  .quality-stats {
    flex-basis: auto;
  }

  .page-foot {
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 720px) {
  table {
    min-width: 330px;
  }

  thead th,
  tbody td {
    padding-right: 8px;
    padding-left: 8px;
  }

}

@media (max-width: 340px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .kpi-grid .kpi-card:last-child {
    grid-column: auto;
  }

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

  .channel-body {
    padding-right: 9px;
    padding-left: 9px;
  }

  .ch-name {
    font-size: 8.5px;
  }
}

/* ============================================================
   发货与售后 · 新增视图
   ============================================================ */
.view {
  display: none;
}

.view.is-active {
  display: block;
  animation: viewIn 0.38s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.main-nav .nav-tab {
  position: relative;
  padding: 8px 13px;
  color: #8494ab;
  font-family: inherit;
  font-size: 12.5px;
  white-space: nowrap;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.main-nav .nav-tab:hover {
  color: #dbe7f7;
  background: rgba(148, 163, 184, 0.06);
}

.main-nav .nav-tab.active {
  color: #dff8ff;
  background: rgba(34, 211, 238, 0.08);
}

.main-nav .nav-tab.active::after {
  content: "";
  position: absolute;
  right: 13px;
  bottom: 2px;
  left: 13px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, #22d3ee, transparent);
}

.ghost-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  color: #a9bacf;
  font-family: inherit;
  font-size: 11.5px;
  white-space: nowrap;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 9px;
  background: rgba(148, 163, 184, 0.05);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.ghost-btn .icon {
  width: 14px;
  height: 14px;
}

.ghost-btn:hover {
  color: #e8f6ff;
  border-color: rgba(34, 211, 238, 0.25);
  background: rgba(34, 211, 238, 0.07);
}

.upload-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  color: #fff;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, #0e7490, #2563eb);
  box-shadow:
    0 6px 20px rgba(14, 116, 144, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.upload-btn .icon {
  width: 14px;
  height: 14px;
}

.upload-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.35);
}

.upload-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sample-tag.synced {
  color: #5eead4;
  border-color: rgba(45, 212, 191, 0.24);
  background: rgba(45, 212, 191, 0.07);
}

.live-pill.demo .live-dot {
  background: #fbbf24;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.75);
}

.live-pill.synced .live-dot {
  background: #2dd4bf;
  box-shadow: 0 0 8px rgba(45, 212, 191, 0.9);
}

/* ---------- 发货图表 ---------- */
.ship-chart-card {
  min-height: 392px;
}

.ship-chart-body {
  padding: 5px 14px 10px 8px;
}

.ship-chart-body .legend {
  padding-left: 14px;
}

.ship-chart-wrap {
  height: 300px;
}

.ship-chart-wrap .chart-tip {
  min-width: 176px;
}

.ship-bar {
  transition: opacity 0.18s;
}

.ship-bar:hover {
  opacity: 1;
}

.ship-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 24px;
  padding: 6px 10px 0 14px;
  color: #8192a9;
  font-size: 10.5px;
}

/* ---------- 品种售后排名 ---------- */
.product-rank-card {
  min-height: 392px;
}

.product-rank-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 17px 19px 18px;
}

.product-rank-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.product-rank-head {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
}

.product-rank-name {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
  color: #c2d0e2;
  font-size: 11.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.product-rank-name i {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 2px;
  background: var(--c);
  box-shadow: 0 0 7px var(--c);
}

.product-rank-ratio {
  color: #f1f7ff;
  font-family: var(--num);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.product-rank-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #61748b;
  font-family: var(--num);
  font-size: 9.5px;
}

.product-rank-meta b {
  color: #9fb2c8;
  font-weight: 500;
}

.product-rank-meta span {
  white-space: nowrap;
}

.product-rank-row .bar-track {
  height: 5px;
}

/* ---------- 表格 ---------- */
.product-table {
  min-width: 620px !important;
}

.daily-table {
  min-width: 680px !important;
}

.product-table th,
.product-table td,
.daily-table th,
.daily-table td {
  padding-right: 12px;
  padding-left: 12px;
}

.product-name-cell {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #c4d3e5;
}

.product-name-cell i {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 2px;
  background: var(--c);
  box-shadow: 0 0 7px var(--c);
}

.numeric {
  color: #d8e5f4;
  font-family: var(--num);
  font-size: 11px;
  letter-spacing: 0.01em;
}

.numeric.muted {
  color: #8ea2b9;
  font-size: 10.5px;
}

.ratio-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 108px;
}

.ratio-cell b {
  min-width: 38px;
  color: #e6f0fc;
  font-family: var(--num);
  font-size: 10.5px;
  font-weight: 500;
  text-align: right;
}

.ratio-cell .bar-track {
  width: 54px;
  height: 4px;
}

.ratio-cell .bar-fill {
  animation: none;
}

.table-wrap.scroll-y {
  max-height: 390px;
  overflow: auto;
}

.table-wrap.scroll-y thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #0e192a;
}

.daily-table-card {
  min-height: 500px;
}

/* ---------- 品种发货量环形图 ---------- */
.donut-card {
  min-height: 360px;
}

.donut-body {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 294px;
  padding: 14px 16px 18px;
}

.donut-body .donut-wrap {
  width: 154px;
  height: 154px;
}

.donut-body .status-legend {
  gap: 10px;
}

.donut-body .legend-row {
  gap: 6px;
}

/* ---------- 上传弹窗 ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 7, 14, 0.74);
  backdrop-filter: blur(10px);
}

.modal-backdrop[hidden] {
  display: none;
}

.upload-modal {
  width: min(540px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background:
    radial-gradient(420px 200px at 100% 0%, rgba(34, 211, 238, 0.1), transparent 65%),
    linear-gradient(165deg, #111d31, #0a1220);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.upload-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.upload-modal-head h2 {
  color: #eef6ff;
  font-size: 17px;
  font-weight: 650;
}

.upload-modal-head p {
  margin-top: 5px;
  color: #6f8199;
  font-size: 10.5px;
}

.modal-close {
  display: grid;
  width: 30px;
  height: 30px;
  flex: none;
  place-items: center;
  color: #7c8fa7;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.04);
  cursor: pointer;
}

.modal-close:hover {
  color: #fff;
  background: rgba(148, 163, 184, 0.1);
}

.modal-close .icon {
  width: 14px;
  height: 14px;
}

.upload-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 28px 18px;
  color: #8193aa;
  font-family: inherit;
  text-align: center;
  border: 1px dashed rgba(34, 211, 238, 0.28);
  border-radius: 13px;
  background: rgba(34, 211, 238, 0.035);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.upload-drop:hover,
.upload-drop.dragover {
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(34, 211, 238, 0.075);
}

.upload-drop-icon {
  display: grid;
  width: 40px;
  height: 40px;
  margin-bottom: 11px;
  place-items: center;
  color: #67e8f9;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.09);
}

.upload-drop-icon .icon {
  width: 19px;
  height: 19px;
}

.upload-drop strong {
  color: #d8e6f6;
  font-size: 12.5px;
  font-weight: 500;
}

.upload-drop > span:last-of-type {
  margin-top: 6px;
  color: #5f7189;
  font-size: 9.5px;
}

.upload-file {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 11px;
  background: rgba(148, 163, 184, 0.04);
}

.upload-file[hidden] {
  display: none;
}

.upload-file-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: none;
  place-items: center;
  color: #7dd3fc;
  border-radius: 9px;
  background: rgba(34, 211, 238, 0.08);
}

.upload-file-icon .icon {
  width: 16px;
  height: 16px;
}

.upload-file > div {
  min-width: 0;
  flex: 1;
}

.upload-file strong {
  display: block;
  overflow: hidden;
  color: #dbe8f7;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.upload-file span {
  display: block;
  margin-top: 3px;
  color: #65778f;
  font-family: var(--num);
  font-size: 9.5px;
}

.upload-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 11px;
  color: #6f8299;
  font-size: 9.5px;
  line-height: 1.55;
  border: 1px solid rgba(148, 163, 184, 0.09);
  border-radius: 9px;
  background: rgba(148, 163, 184, 0.035);
}

.upload-note .icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  flex: none;
  color: #5eead4;
}

.upload-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.upload-status {
  margin-top: 13px;
  padding: 10px 12px;
  color: #a9bacf;
  font-size: 10.5px;
  line-height: 1.55;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 9px;
  background: rgba(148, 163, 184, 0.04);
}

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

.upload-status.ok {
  color: #5eead4;
  border-color: rgba(45, 212, 191, 0.18);
  background: rgba(45, 212, 191, 0.06);
}

.upload-status.error {
  color: #fda4af;
  border-color: rgba(251, 113, 133, 0.2);
  background: rgba(251, 113, 133, 0.06);
}

@media (max-width: 1080px) {
  .donut-body {
    justify-content: center;
    min-height: 250px;
  }

  .donut-body .donut-wrap {
    width: 170px;
    height: 170px;
  }

  .donut-body .status-legend {
    flex: 0 1 260px;
  }
}

@media (max-width: 860px) {
  .main-nav {
    display: flex;
  }

  .live-pill {
    display: none;
  }
}

@media (max-width: 720px) {
  .main-nav {
    gap: 1px;
  }

  .main-nav .nav-tab {
    padding: 7px 8px;
    font-size: 11px;
  }

  .main-nav .nav-tab.active::after {
    right: 8px;
    left: 8px;
  }

  .upload-btn,
  .ghost-btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .ship-chart-card,
  .product-rank-card {
    min-height: 0;
  }

  .ship-chart-wrap {
    height: 280px;
  }

  .donut-body {
    flex-direction: column;
    gap: 10px;
  }

  .donut-body .status-legend {
    width: 100%;
    flex: none;
  }

  .upload-actions {
    flex-direction: column-reverse;
  }

  .upload-actions .ghost-btn,
  .upload-actions .upload-btn {
    width: 100%;
  }

  .upload-modal {
    padding: 18px;
  }
}

/* 补充：表格内比例条 / 合计行 / 排名居中 */
.bar-fill {
  display: block;
}

.ratio-cell .bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--c), var(--c2, var(--c)));
  box-shadow: 0 0 8px var(--glow, transparent);
}

.total-row td {
  color: #dce9f8;
  font-weight: 500;
  background: rgba(34, 211, 238, 0.045);
  border-bottom: 1px solid rgba(34, 211, 238, 0.12) !important;
}

.product-rank-body {
  justify-content: center;
}

@media (max-width: 520px) {
  .brand-text strong {
    font-size: 12px;
  }

  .brand-text strong em {
    display: none;
  }

  .main-nav .nav-tab {
    padding: 7px 7px;
    font-size: 10.5px;
  }

  .filterbar .segmented {
    flex-basis: 100%;
  }

  .upload-btn,
  .ghost-btn,
  .reset-btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

.card-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-wrap.scroll-y.expanded {
  max-height: none;
  overflow: visible;
}

.table-wrap.scroll-y.expanded thead th {
  position: static;
}

.product-rank-ratio .unit-inline {
  margin-left: 1px;
  color: #72859d;
  font-size: 9px;
  font-weight: 400;
}

@media (max-width: 720px) {
  .filterbar .select-wrap {
    flex: 1 1 100%;
    max-width: none;
    padding: 0 8px;
    border: 1px solid rgba(148, 163, 184, 0.08);
    background: rgba(5, 9, 16, 0.35);
  }

  .filterbar .select-wrap select {
    width: 100%;
    max-width: none;
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .filterbar .reset-btn,
  .filterbar .ghost-btn,
  .filterbar .upload-btn {
    flex: 1 1 0;
    justify-content: center;
    padding-right: 8px;
    padding-left: 8px;
  }

  .product-table,
  .daily-table {
    min-width: 0 !important;
  }

  .product-table th,
  .product-table td,
  .daily-table th,
  .daily-table td {
    padding-right: 5px;
    padding-left: 5px;
    font-size: 9.5px;
  }

  .product-table .numeric,
  .daily-table .numeric {
    font-size: 9.5px;
  }

  .ratio-cell {
    min-width: 0;
    gap: 4px;
  }

  .ratio-cell b {
    min-width: 34px;
    font-size: 9.5px;
  }

  .ratio-cell .bar-track {
    width: 26px;
  }

  .product-name-cell {
    gap: 4px;
    font-size: 9.5px;
  }

  .product-name-cell i {
    width: 4px;
    height: 4px;
  }
}

/* ============================================================
   售后预警 / 规格下钻
   ============================================================ */
.risk-banner {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
  padding: 11px 15px;
  border: 1px solid rgba(45, 212, 191, 0.14);
  border-radius: 12px;
  background: rgba(45, 212, 191, 0.055);
}

.risk-banner.alert {
  border-color: rgba(251, 113, 133, 0.24);
  background: linear-gradient(90deg, rgba(251, 113, 133, 0.1), rgba(251, 113, 133, 0.035));
}

.risk-banner-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: none;
  place-items: center;
  color: #5eead4;
  border: 1px solid rgba(45, 212, 191, 0.18);
  border-radius: 8px;
  background: rgba(45, 212, 191, 0.08);
}

.risk-banner.alert .risk-banner-icon {
  color: #fb7185;
  border-color: rgba(251, 113, 133, 0.22);
  background: rgba(251, 113, 133, 0.1);
}

.risk-banner-icon .icon {
  width: 15px;
  height: 15px;
}

.risk-banner-text {
  min-width: 0;
  flex: 1;
}

.risk-banner-text strong {
  display: block;
  color: #a7f3d0;
  font-size: 11.5px;
  font-weight: 600;
}

.risk-banner.alert .risk-banner-text strong {
  color: #fda4af;
}

.risk-banner-text span {
  display: block;
  margin-top: 2px;
  color: #5f7d7e;
  font-size: 9.5px;
}

.risk-banner.alert .risk-banner-text span {
  color: #8f6c78;
}

.risk-banner-badge {
  flex: none;
  padding: 3px 7px;
  color: #5eead4;
  font-family: var(--num);
  font-size: 9px;
  border: 1px solid rgba(45, 212, 191, 0.18);
  border-radius: 5px;
  background: rgba(45, 212, 191, 0.05);
}

.risk-banner.alert .risk-banner-badge {
  color: #fb7185;
  border-color: rgba(251, 113, 133, 0.22);
  background: rgba(251, 113, 133, 0.06);
}

.alert-line {
  stroke: rgba(251, 113, 133, 0.7);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.alert-label {
  fill: #fb7185;
  font-family: var(--num);
  font-size: 8.5px;
  letter-spacing: 0.03em;
}

.ratio-value.alert {
  color: #fb7185 !important;
}

.alert-row td {
  background: rgba(251, 113, 133, 0.045);
}

.spec-as-card {
  padding-bottom: 8px;
}

.spec-select {
  gap: 5px;
  padding: 0 6px 0 9px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(5, 9, 16, 0.35);
}

.spec-select select {
  max-width: 130px;
}

.spec-as-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 19px 4px;
}

.spec-panel {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(148, 163, 184, 0.09);
  border-radius: 11px;
  background: rgba(148, 163, 184, 0.025);
}

.spec-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 13px;
}

.spec-panel-head h3 {
  color: #c5d3e5;
  font-size: 11px;
  font-weight: 500;
}

.spec-panel-head span {
  color: #52647c;
  font-size: 8.5px;
}

.spec-bar-row {
  margin-bottom: 13px;
}

.spec-bar-row:last-child {
  margin-bottom: 2px;
}

.spec-bar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  color: #aebed2;
  font-size: 10px;
}

.spec-bar-head b {
  color: #eaf3ff;
  font-family: var(--num);
  font-size: 11px;
  font-weight: 600;
}

.spec-bar-row.alert .spec-bar-head b {
  color: #fb7185;
}

.spec-bar-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.spec-bar-name i {
  width: 5px;
  height: 5px;
  border-radius: 2px;
  background: var(--c);
  box-shadow: 0 0 6px var(--c);
}

.spec-bar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  color: #5f7189;
  font-family: var(--num);
  font-size: 8.5px;
}

.spec-matrix {
  width: 100%;
  min-width: 0 !important;
  border-collapse: collapse;
  font-size: 9px;
}

.spec-matrix th {
  padding: 4px 5px;
  color: #5f7189;
  font-size: 8.5px;
  font-weight: 500;
  text-align: center;
}

.spec-matrix th:first-child {
  text-align: left;
}

.spec-matrix td {
  height: 32px;
  padding: 4px 5px;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.07);
}

.spec-matrix .matrix-size {
  color: #8295ad;
  font-size: 9px;
  text-align: left;
  white-space: nowrap;
}

.matrix-cell b {
  display: block;
  color: #dce9f8;
  font-family: var(--num);
  font-size: 10px;
  font-weight: 500;
}

.matrix-cell small {
  display: block;
  margin-top: 2px;
  color: #5f7189;
  font-family: var(--num);
  font-size: 8px;
}

.matrix-cell.alert {
  background: rgba(251, 113, 133, 0.08);
  border-radius: 5px;
}

.matrix-cell.alert b {
  color: #fb7185;
}

.matrix-cell.empty {
  color: #3f4f64;
}

.spec-table-wrap {
  max-height: 300px;
  margin-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.07);
}

.spec-table {
  min-width: 700px !important;
}

@media (max-width: 1080px) {
  .spec-as-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .risk-banner {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .risk-banner-badge {
    margin-left: 41px;
  }

  .spec-as-grid {
    padding: 13px 13px 2px;
  }

  .spec-select {
    max-width: 100%;
  }

  .spec-select select {
    max-width: 110px;
  }
}

/* 5% / 10% 双阈值 */
.alert-line.warn {
  stroke: rgba(251, 191, 36, 0.7);
}

.alert-line.critical {
  stroke: rgba(251, 113, 133, 0.8);
}

.alert-label.warn {
  fill: #fbbf24;
}

.alert-label.critical {
  fill: #fb7185;
}

.risk-banner.critical {
  border-color: rgba(251, 113, 133, 0.38);
  background: linear-gradient(90deg, rgba(251, 113, 133, 0.16), rgba(251, 113, 133, 0.05));
}

.risk-banner.critical .risk-banner-icon {
  color: #fb7185;
  border-color: rgba(251, 113, 133, 0.32);
  background: rgba(251, 113, 133, 0.14);
}

.risk-banner.critical .risk-banner-text strong {
  color: #fda4af;
}

.risk-banner.critical .risk-banner-text span {
  color: #9f6d79;
}

.risk-banner.critical .risk-banner-badge {
  color: #fb7185;
  border-color: rgba(251, 113, 133, 0.3);
  background: rgba(251, 113, 133, 0.09);
}

.ratio-value.warn {
  color: #fbbf24 !important;
}

.ratio-value.critical {
  color: #fb7185 !important;
}

.warn-row td {
  background: rgba(251, 191, 36, 0.045);
}

.critical-row td {
  background: rgba(251, 113, 133, 0.075);
}

.product-rank-ratio.warn {
  color: #fbbf24;
}

.product-rank-ratio.critical {
  color: #fb7185;
}

.spec-bar-row.warn .spec-bar-head b {
  color: #fbbf24;
}

.spec-bar-row.critical .spec-bar-head b {
  color: #fb7185;
}

.matrix-cell.warn {
  background: rgba(251, 191, 36, 0.09);
  border-radius: 5px;
}

.matrix-cell.warn b {
  color: #fbbf24;
}

.matrix-cell.critical {
  background: rgba(251, 113, 133, 0.12);
  border-radius: 5px;
}

.matrix-cell.critical b {
  color: #fb7185;
}

/* 移动端表格优先保留关键列 */
@media (max-width: 720px) {
  .ship-product-table th:nth-child(3),
  .ship-product-table td:nth-child(3),
  .ship-product-table th:nth-child(4),
  .ship-product-table td:nth-child(4),
  .as-product-table th:nth-child(2),
  .as-product-table td:nth-child(2),
  .as-product-table th:nth-child(4),
  .as-product-table td:nth-child(4),
  .ship-daily-table th:nth-child(3),
  .ship-daily-table td:nth-child(3),
  .ship-daily-table th:nth-child(4),
  .ship-daily-table td:nth-child(4),
  .as-daily-table th:nth-child(2),
  .as-daily-table td:nth-child(2),
  .as-daily-table th:nth-child(4),
  .as-daily-table td:nth-child(4),
  .spec-table th:nth-child(4),
  .spec-table td:nth-child(4),
  .spec-table th:nth-child(6),
  .spec-table td:nth-child(6) {
    display: none;
  }

  .spec-table {
    min-width: 0 !important;
  }

  .spec-table thead th {
    color: #7f91a9;
  }

  .spec-table-wrap {
    max-height: 340px;
  }
}

/* 各产品发货金额占比 · 横柱 */
.share-card {
  min-height: 392px;
}

.share-bars-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 11px;
  min-height: 330px;
  padding: 14px 19px 18px;
}

.share-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 2px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.share-total span {
  color: #6f8199;
  font-size: 9.5px;
}

.share-total b {
  color: #eef6ff;
  font-family: var(--num);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.share-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.share-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.share-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #b9c8db;
  font-size: 10.5px;
}

.share-name i {
  width: 5px;
  height: 5px;
  border-radius: 2px;
  background: var(--c);
  box-shadow: 0 0 6px var(--c);
}

.share-amount {
  color: #eaf3ff;
  font-family: var(--num);
  font-size: 11px;
  font-weight: 500;
}

.share-bar-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-track {
  display: block;
  flex: 1;
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.08);
}

.share-fill {
  display: block;
  width: var(--w);
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--c), var(--c2, var(--c)));
  box-shadow: 0 0 10px var(--c);
  animation: barGrow 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.share-pct {
  min-width: 34px;
  color: #8193aa;
  font-family: var(--num);
  font-size: 9.5px;
  font-style: normal;
  text-align: right;
}

@media (max-width: 720px) {
  .share-card,
  .share-bars-body {
    min-height: 0;
  }
}

/* 各尺寸发货条数 */
.size-summary-card {
  min-height: 190px;
}

.size-summary-body {
  padding: 14px 19px 18px;
}

.size-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 11px;
}

.size-summary-item {
  padding: 11px 12px 12px;
  border: 1px solid rgba(148, 163, 184, 0.09);
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.025);
}

.size-summary-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.size-summary-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #b9c8db;
  font-size: 10.5px;
}

.size-summary-name i {
  width: 5px;
  height: 5px;
  border-radius: 2px;
  background: var(--c);
  box-shadow: 0 0 6px var(--c);
}

.size-summary-share {
  color: #6f8199;
  font-family: var(--num);
  font-size: 9.5px;
}

.size-summary-value {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin: 8px 0 7px;
}

.size-summary-value b {
  color: #f0f7ff;
  font-family: var(--num);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.size-summary-value span {
  color: #667a92;
  font-size: 9.5px;
}

.size-summary-item .bar-track {
  height: 4px;
}

.size-summary-meta {
  margin-top: 7px;
  color: #5f7189;
  font-family: var(--num);
  font-size: 8.5px;
}

@media (max-width: 720px) {
  .size-summary-card {
    min-height: 0;
  }

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

/* 各尺寸 × 各产品矩阵 */
.size-select {
  max-width: 150px;
}

.size-matrix-scroll {
  overflow-x: auto;
}

.size-matrix {
  width: 100%;
  min-width: 560px !important;
  border-collapse: collapse;
  font-size: 10.5px;
}

.size-matrix th {
  padding: 7px 9px;
  color: #6f8199;
  font-size: 9px;
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid rgba(148, 163, 184, 0.09);
}

.size-matrix th:first-child {
  text-align: left;
}

.size-matrix td {
  padding: 9px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.055);
  white-space: nowrap;
}

.size-matrix tbody tr:hover {
  background: rgba(34, 211, 238, 0.03);
}

.size-matrix tbody tr:last-child td {
  border-bottom: 0;
}

.size-matrix-num {
  color: #cfdeee;
  font-family: var(--num);
  font-size: 10.5px;
  text-align: right;
}

.size-matrix-total {
  color: #f0f7ff;
  font-weight: 500;
}

@media (max-width: 720px) {
  .size-select {
    max-width: 120px;
  }

  .size-matrix {
    min-width: 520px !important;
  }
}

.size-summary-value em {
  margin-left: 4px;
  color: #f472b6;
  font-family: var(--num);
  font-size: 10px;
  font-style: normal;
}

.size-matrix-num b {
  display: block;
  color: #d3e1f0;
  font-family: var(--num);
  font-size: 10.5px;
  font-weight: 500;
}

.size-matrix-num small {
  display: block;
  margin-top: 2px;
  color: #6f8199;
  font-family: var(--num);
  font-size: 8px;
}

.size-matrix-total small {
  color: #f472b6;
}

/* 每斤条数设置 */
.weight-modal {
  width: min(540px, 100%);
}

.weight-note {
  margin-bottom: 12px;
  padding: 10px 11px;
  color: #7b8ea5;
  font-size: 9.5px;
  line-height: 1.55;
  border: 1px solid rgba(148, 163, 184, 0.09);
  border-radius: 9px;
  background: rgba(148, 163, 184, 0.035);
}

.weight-table-wrap {
  max-height: 48vh;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.09);
  border-radius: 10px;
}

.weight-table {
  width: 100%;
  min-width: 0 !important;
  border-collapse: collapse;
  font-size: 10.5px;
}

.weight-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 9px 11px;
  color: #6f8199;
  font-size: 9px;
  font-weight: 500;
  text-align: left;
  background: #0e192a;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.weight-table td {
  padding: 9px 11px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.055);
}

.weight-table tr:last-child td {
  border-bottom: 0;
}

.weight-size {
  color: #8fa2b9;
  font-family: var(--num);
}

.weight-input {
  width: 96px;
  padding: 6px 8px;
  color: #eaf4ff;
  font-family: var(--num);
  font-size: 11px;
  text-align: right;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 6px;
  outline: none;
  background: rgba(5, 9, 16, 0.45);
}

.weight-input:focus {
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.08);
}

@media (max-width: 720px) {
  .weight-input {
    width: 78px;
  }

  .weight-table th,
  .weight-table td {
    padding-right: 8px;
    padding-left: 8px;
  }
}

.size-summary-value em.unset {
  color: #64748b;
}

.size-matrix-note {
  margin-top: 9px;
  color: #5f7189;
  font-size: 8.5px;
  line-height: 1.5;
}

@media (min-width: 721px) and (max-width: 1400px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 各快递发货量占比 */
.courier-summary-card {
  min-height: 190px;
}

.courier-summary-body {
  padding: 14px 19px 18px;
}

.courier-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 11px;
}

.courier-summary-item {
  padding: 11px 12px 12px;
  border: 1px solid rgba(148, 163, 184, 0.09);
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.025);
}

.courier-summary-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.courier-summary-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #b9c8db;
  font-size: 10.5px;
}

.courier-summary-name i {
  width: 5px;
  height: 5px;
  border-radius: 2px;
  background: var(--c);
  box-shadow: 0 0 6px var(--c);
}

.courier-summary-share {
  color: #6f8199;
  font-family: var(--num);
  font-size: 9.5px;
}

.courier-summary-value {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin: 8px 0 7px;
}

.courier-summary-value b {
  color: #f0f7ff;
  font-family: var(--num);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.courier-summary-value span {
  color: #667a92;
  font-size: 9.5px;
}

.courier-summary-item .bar-track {
  height: 4px;
}

.courier-summary-meta {
  margin-top: 7px;
  color: #5f7189;
  font-family: var(--num);
  font-size: 8.5px;
}

@media (max-width: 720px) {
  .courier-summary-card {
    min-height: 0;
  }

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

.size-matrix-price {
  display: block;
  margin-top: 2px;
  color: #6f8199;
  font-family: var(--num);
  font-size: 8px;
}

.size-matrix-cost {
  color: #fbbf24;
  font-family: var(--num);
  font-size: 10.5px;
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}



/* 省份售后占比 */
.province-summary-card {
  min-height: 190px;
}

.province-summary-body {
  padding: 14px 19px 18px;
}

.province-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(172px, 1fr));
  gap: 11px;
}

.province-summary-item {
  padding: 11px 12px 12px;
  border: 1px solid rgba(148, 163, 184, 0.09);
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.025);
}

.province-summary-item.warn {
  border-color: rgba(251, 191, 36, 0.2);
  background: rgba(251, 191, 36, 0.035);
}

.province-summary-item.critical {
  border-color: rgba(251, 113, 133, 0.24);
  background: rgba(251, 113, 133, 0.045);
}

.province-summary-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.province-summary-name {
  color: #c4d2e4;
  font-size: 11px;
}

.province-summary-share {
  color: var(--c);
  font-family: var(--num);
  font-size: 9.5px;
}

.province-summary-value {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin: 8px 0 7px;
}

.province-summary-value b {
  color: var(--c);
  font-family: var(--num);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.province-summary-value span {
  color: #667a92;
  font-size: 9.5px;
}

.province-summary-item .bar-track {
  height: 4px;
}

.province-summary-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
  color: #a8bacf;
  font-family: var(--num);
  font-size: 12px;
  line-height: 1.55;
  white-space: normal;
}

.province-summary-meta b {
  color: #e4effb;
  font-weight: 600;
}

@media (max-width: 720px) {
  .province-summary-card {
    min-height: 0;
  }

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

/* 自定义时间筛选 */
.date-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: #6f8199;
  font-size: 9.5px;
}

.date-filter > span {
  white-space: nowrap;
}

.date-filter i {
  width: auto;
  height: auto;
  margin: 0;
  color: #4e6078;
  font-style: normal;
  background: none;
}

.date-filter input[type="date"] {
  width: 116px;
  padding: 5px 7px;
  color: #cfe0f2;
  font-family: var(--num);
  font-size: 10px;
  color-scheme: dark;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 6px;
  outline: none;
  background: rgba(5, 9, 16, 0.35);
}

.date-filter input[type="date"]:focus {
  border-color: rgba(34, 211, 238, 0.35);
}

.date-filter button {
  padding: 5px 9px;
  color: #22d3ee;
  font-size: 9.5px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 6px;
  background: rgba(34, 211, 238, 0.06);
  cursor: pointer;
}

.date-filter button:hover {
  background: rgba(34, 211, 238, 0.12);
}

@media (max-width: 720px) {
  .date-filter {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }

  .date-filter input[type="date"] {
    width: 110px;
  }
}

.bar-label {
  pointer-events: none;
}

.bar-label text {
  font-family: var(--num);
  font-weight: 600;
  paint-order: stroke;
  stroke: #07101d;
  stroke-width: 2.6px;
  stroke-linejoin: round;
}

.bar-label-amount {
  fill: #f3f8ff;
  font-size: 9.5px;
}

.bar-label-ratio {
  fill: #fb7185;
  font-size: 9px;
}

/* 实时销售 */
.kpi-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

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

.rt-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 7px;
  color: #7b8ca4;
  font-size: 10px;
  white-space: nowrap;
}

.rt-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748b;
}

.rt-live.live {
  color: #2dd4bf;
}

.rt-live.live i {
  background: #2dd4bf;
  box-shadow: 0 0 8px rgba(45, 212, 191, 0.65);
  animation: rtPulse 1.8s infinite;
}

.rt-live.error {
  color: #fb7185;
}

.rt-live.error i {
  background: #fb7185;
}

@keyframes rtPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.rt-chart-card .chart-box {
  height: 400px;
}

.rt-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 4px;
  color: #7b8ca4;
  font-size: 9.5px;
}

.rt-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rt-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.rt-legend i.bar.yesterday {
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid #34d399;
}

.rt-legend i.bar.today {
  background: #60a5fa;
}

.rt-legend i.line {
  width: 16px;
  height: 2px;
  border-radius: 2px;
}

.rt-legend i.line.yesterday {
  background: #34d399;
}

.rt-legend i.line.today {
  background: #3b82f6;
}

@media (max-width: 1400px) {
  .kpi-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .kpi-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rt-chart-card .chart-box {
    height: 270px;
  }
}

.rt-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 12px 15px;
  border: 1px solid rgba(251, 113, 133, 0.28);
  border-radius: 10px;
  background: rgba(251, 113, 133, 0.08);
  color: #fecdd3;
  font-size: 11px;
}

.rt-alert strong {
  margin-right: 8px;
  color: #fff1f2;
}

.rt-alert.warn {
  border-color: rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.07);
  color: #fde68a;
}

.rt-alert.warn strong {
  color: #fffbeb;
}

.rt-alert .ghost-btn {
  flex: none;
}

@media (max-width: 720px) {
  .rt-alert {
    align-items: flex-start;
    flex-direction: column;
  }
}

.nav-tab {
  position: relative;
}

.nav-tab.has-alert::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fb7185;
  box-shadow: 0 0 7px rgba(251, 113, 133, 0.8);
}

#rtKpiGrid .kpi-card {
  animation: none;
  opacity: 1;
}

.rt-alert[hidden] {
  display: none;
}

.rt-chart-card .chart-box {
  position: relative;
}

#rtHoverLine {
  stroke: rgba(226, 238, 252, 0.5);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  pointer-events: none;
}

.rt-tip {
  position: absolute;
  z-index: 5;
  display: none;
  width: 370px;
  padding: 12px 13px;
  pointer-events: none;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  background: #08111e;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.rt-tip:not([hidden]) {
  display: block;
}

.rt-tip-head {
  margin-bottom: 8px;
  color: #dce8f7;
  font-family: var(--num);
  font-size: 12px;
  font-weight: 600;
}

.rt-tip-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 2px 0;
  color: #8fa2b9;
  font-size: 10px;
}

.rt-tip-row i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.rt-tip-row i.y {
  background: #34d399;
}

.rt-tip-row i.t {
  background: #3b82f6;
}

.rt-tip-row i.line {
  height: 2px;
  border-radius: 2px;
}

.rt-tip-row b {
  color: #eef6ff;
  font-family: var(--num);
  font-size: 11px;
  font-weight: 500;
}

.rt-tip-products {
  margin: 8px 0 5px;
  padding-top: 7px;
  color: #6f8199;
  font-size: 8.5px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.rt-tip-table {
  width: 100%;
  min-width: 0 !important;
  border-collapse: collapse;
  font-size: 9px;
}

.rt-tip-table th {
  padding: 4px 0;
  color: #5f7189;
  font-weight: 400;
  text-align: right;
}

.rt-tip-table th:first-child {
  text-align: left;
}

.rt-tip-table td {
  padding: 4px 0;
  color: #9cafc4;
  font-family: var(--num);
  text-align: right;
  white-space: nowrap;
}

.rt-tip-table td:first-child {
  color: #c7d6e8;
  font-family: inherit;
  text-align: left;
}

.rt-tip-empty {
  color: #5f7189 !important;
  text-align: center !important;
}

.weather-frame-wrap {
  height: calc(100vh - 210px);
  min-height: 760px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  background: #0f1725;
}

.weather-frame-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 720px) {
  .weather-frame-wrap {
    height: calc(100vh - 190px);
    min-height: 620px;
  }
}

.tip-products {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.tip-products-head {
  margin-bottom: 4px;
  color: #7f92aa;
  font-size: 9px;
}

.tip-product-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  padding: 3px 0;
  font-size: 9.5px;
}

.tip-product-row span {
  overflow: hidden;
  color: #c9d8ea;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tip-product-row b {
  color: #fda4af;
  font-family: var(--num);
  font-size: 10px;
  font-weight: 500;
}

.tip-product-row em {
  grid-column: 1 / -1;
  color: #6f8199;
  font-family: var(--num);
  font-size: 8.5px;
  font-style: normal;
}

.tip-products-empty {
  padding: 3px 0;
  color: #6f8199;
  font-size: 9px;
}

.chart-tip:has(.tip-products) {
  min-width: 236px;
}

@media (max-width: 1400px) {
  .kpi-grid-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .kpi-grid-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1500px) {
  .kpi-grid-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .kpi-grid-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.rt-compare-card {
  min-height: 176px;
  padding-bottom: 18px;
}

.rt-compare-values {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.rt-compare-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.rt-compare-line span {
  width: 28px;
  flex: none;
  color: #71839a;
  font-size: 9px;
}

.rt-compare-line b {
  color: #edf6ff;
  font-family: var(--num);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.rt-compare-line.yesterday b {
  color: #a7b6c9;
  font-size: 15px;
  font-weight: 500;
}

.rt-compare-line em {
  color: #7f92aa;
  font-family: var(--num);
  font-size: 9px;
  font-style: normal;
}

.rt-compare-card .kpi-foot {
  margin-top: 9px;
}

.rt-chart-modes {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(12, 22, 38, 0.7);
}

.rt-chart-modes button {
  border: 0;
  border-radius: 5px;
  padding: 5px 9px;
  color: #7f92aa;
  background: transparent;
  font-size: 9px;
  cursor: pointer;
}

.rt-chart-modes button.active {
  color: #dff3ff;
  background: rgba(45, 212, 191, 0.14);
}

.rt-product-label {
  fill: #9fb0c6;
  font-size: 9.5px;
}

.rt-product-value {
  fill: #dcecff;
  font-family: var(--num);
  font-size: 9px;
}

@media (max-width: 1400px) {
  .kpi-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .kpi-grid-3 {
    grid-template-columns: 1fr;
  }
}

.rt-compare-card {
  padding-bottom: 52px;
}

.rt-compare-card .kpi-spark {
  opacity: 0.82;
}

.rt-compare-card .kpi-spark .line.yesterday {
  fill: none;
  stroke-width: 1.2;
}

.rt-compare-line em {
  color: #7f92aa;
}

.rt-product-kpis {
  margin-bottom: 15px;
}

.rt-product-kpis-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.rt-product-kpis-head strong {
  color: #dce9f8;
  font-size: 11px;
  font-weight: 600;
}

.rt-product-kpis-head span {
  color: #63768e;
  font-size: 9px;
}

.rt-product-kpis-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.rt-product-kpi {
  padding: 11px 13px 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(17, 30, 49, 0.92), rgba(9, 17, 29, 0.96));
}

.rt-pk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.rt-pk-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: #d6e4f3;
  font-size: 10.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rt-pk-name i {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 7px var(--c);
}

.rt-pk-delta {
  flex: none;
  font-size: 9px;
}

.rt-pk-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 6px;
  padding: 3px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.07);
}

.rt-pk-row span {
  color: #71849b;
  font-size: 9px;
}

.rt-pk-row b {
  color: #edf7ff;
  font-family: var(--num);
  font-size: 12px;
  font-weight: 500;
}

.rt-pk-row em {
  color: #879ab0;
  font-family: var(--num);
  font-size: 9px;
  font-style: normal;
}

@media (max-width: 1400px) {
  .rt-product-kpis-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .rt-product-kpis-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-compare {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 3px;
  color: #6f8299;
  font-size: 9px;
}

.kpi-compare b {
  color: #aebed1;
  font-family: var(--num);
  font-size: 10.5px;
  font-weight: 500;
}

.kpi-compare em {
  color: #6f8299;
  font-size: 8.5px;
  font-style: normal;
}

.rt-product-kpi {
  min-height: 190px;
  padding: 17px 18px 50px;
}

.rt-product-kpi .kpi-head {
  margin-bottom: 6px;
}

.rt-pk-metric-label {
  color: #7f92aa;
  font-size: 8.5px;
}

.rt-pk-value {
  margin-top: 1px;
  color: #edf7ff;
  font-family: var(--num);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.rt-pk-yesterday {
  margin-top: 2px;
  color: #71849b;
  font-size: 9px;
}

.rt-pk-yesterday b {
  color: #a9b9cc;
  font-family: var(--num);
  font-size: 10px;
  font-weight: 500;
}

.rt-pk-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 7px;
  color: #71849b;
  font-size: 8.5px;
}

.rt-pk-sub span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.rt-pk-sub b {
  color: #e3effc;
  font-family: var(--num);
  font-size: 10px;
  font-weight: 500;
}

.rt-pk-sub em {
  color: #7d90a7;
  font-family: var(--num);
  font-size: 8.5px;
  font-style: normal;
}

.rt-product-kpi .kpi-foot {
  margin-top: 8px;
}

.rt-product-kpi .rt-pk-name {
  font-size: 13px;
  font-weight: 600;
}

.rt-product-kpi .rt-pk-name i {
  width: 7px;
  height: 7px;
}

.refund-live-card {
  width: 255px;
  flex: none;
  padding: 10px 13px 9px;
  border: 1px solid rgba(251, 113, 133, 0.2);
  border-radius: 11px;
  background: linear-gradient(150deg, rgba(48, 22, 34, 0.72), rgba(12, 19, 32, 0.96));
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
}

.refund-live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #d8a0aa;
  font-size: 9px;
}

.refund-live-head span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.refund-live-head i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fb7185;
  box-shadow: 0 0 7px rgba(251, 113, 133, 0.8);
}

.refund-live-head em {
  color: #715b65;
  font-size: 8px;
  font-style: normal;
}

.refund-live-card > strong {
  display: block;
  margin: 4px 0 1px;
  color: #ffe4e6;
  font-family: var(--num);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.refund-live-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #8f7179;
  font-size: 8.5px;
}

.refund-live-foot b {
  color: #b9939c;
  font-family: var(--num);
  font-weight: 400;
}

@media (max-width: 720px) {
  .refund-live-card {
    width: 100%;
  }
}

.refund-live-card {
  width: 330px;
  padding: 14px 16px 12px;
  border-radius: 13px;
}

.refund-live-head {
  font-size: 10.5px;
}

.refund-live-head em {
  font-size: 9px;
}

.refund-live-card > strong {
  margin: 7px 0 2px;
  font-size: 34px;
}

.refund-live-foot {
  font-size: 10px;
}

@media (max-width: 720px) {
  .refund-live-card {
    width: 100%;
  }
}

.refund-live-note {
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid rgba(251, 113, 133, 0.12);
  color: #755b64;
  font-size: 8px;
  line-height: 1.4;
}



.as-refund-kpi {
  min-height: 169px;
  padding-bottom: 18px;
}

.as-refund-kpi .kpi-value {
  margin-top: 4px;
  font-size: 28px;
}

.as-refund-kpi .kpi-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  color: #8f7179;
  font-size: 9px;
}

.as-refund-kpi .as-refund-note {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(251, 113, 133, 0.12);
  color: #755b64;
  font-size: 8px;
  line-height: 1.4;
}

.rt-product-kpi .rt-pk-sub {
  gap: 5px 12px;
  color: #8fa2b9;
  font-size: 10px;
}

.rt-product-kpi .rt-pk-sub b {
  color: #f1f8ff;
  font-size: 12px;
}

.rt-product-kpi .rt-pk-sub em {
  color: #a4b5c8;
  font-size: 10px;
}

.rt-product-kpi .rt-pk-yesterday {
  font-size: 10px;
}

.rt-product-kpi .rt-pk-yesterday b {
  font-size: 11px;
}

#view-realtime {
  animation: none;
}

/* 图表提示与坐标文字整体放大 */
.rt-tip {
  width: 430px;
  padding: 15px 16px;
}

.rt-tip-head {
  margin-bottom: 10px;
  font-size: 14px;
}

.rt-tip-row {
  gap: 9px;
  padding: 3px 0;
  font-size: 12px;
}

.rt-tip-row b {
  font-size: 13px;
}

.rt-tip-products {
  margin: 10px 0 6px;
  padding-top: 8px;
  font-size: 10.5px;
}

.rt-tip-table {
  font-size: 11px;
}

.rt-tip-table th,
.rt-tip-table td {
  padding: 5px 0;
}

.tip-date {
  font-size: 11px;
}

.tip-row {
  margin-top: 6px;
  font-size: 11.5px;
}

.tip-row b {
  font-size: 12.5px;
}

.tip-products-head {
  margin-bottom: 6px;
  font-size: 10.5px;
}

.tip-product-row {
  padding: 4px 0;
  font-size: 11px;
}

.tip-product-row b {
  font-size: 11.5px;
}

.tip-product-row em {
  font-size: 10px;
}

.axis-text {
  font-size: 10.5px;
}

.rt-legend {
  gap: 20px;
  font-size: 10.5px;
}

.bar-label-amount {
  font-size: 10.5px;
}

.bar-label-ratio {
  font-size: 10px;
}

.rt-product-kpis-head strong {
  font-size: 12px;
}

.rt-product-kpis-head span {
  font-size: 10px;
}

.rt-pk-metric-label {
  font-size: 10px;
}

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

.kpi-compare b {
  font-size: 11.5px;
}

.refund-live-note {
  font-size: 9px;
}

/* 提示框再放大一档，提升可读性 */
.rt-tip {
  width: 500px;
  max-width: calc(100vw - 24px);
  padding: 17px 19px;
}

.rt-tip-head {
  margin-bottom: 11px;
  color: #eef7ff;
  font-size: 16px;
}

.rt-tip-row {
  gap: 10px;
  padding: 4px 0;
  color: #aebfd2;
  font-size: 13.5px;
}

.rt-tip-row b {
  color: #ffffff;
  font-size: 15px;
}

.rt-tip-products {
  margin: 12px 0 7px;
  padding-top: 9px;
  color: #91a5bb;
  font-size: 12px;
}

.rt-tip-table {
  font-size: 12.5px;
  line-height: 1.5;
}

.rt-tip-table th {
  padding: 6px 0;
  color: #91a5bb;
  font-size: 11px;
}

.rt-tip-table td {
  padding: 6px 0;
  color: #c8d8ea;
}

.rt-tip-table td:first-child {
  color: #f0f7ff;
}

.tip-date {
  font-size: 12px;
}

.tip-row {
  margin-top: 7px;
  color: #a8b8cb;
  font-size: 13px;
}

.tip-row b {
  color: #ffffff;
  font-size: 14px;
}

.tip-products-head {
  margin-bottom: 7px;
  font-size: 12px;
}

.tip-product-row {
  padding: 5px 0;
  font-size: 12.5px;
}

.tip-product-row b {
  font-size: 13px;
}

.tip-product-row em {
  font-size: 11.5px;
}

.axis-text {
  font-size: 12px;
}

.rt-legend {
  gap: 24px;
  font-size: 12px;
}

.bar-label-amount {
  font-size: 12px;
}

.bar-label-ratio {
  font-size: 11.5px;
}

.rt-product-kpi .rt-pk-sub {
  font-size: 11px;
}

.rt-product-kpi .rt-pk-sub b {
  font-size: 13.5px;
}

.rt-product-kpi .rt-pk-sub em {
  font-size: 11px;
}

.rt-product-kpi .rt-pk-yesterday {
  font-size: 11px;
}

.rt-product-kpi .rt-pk-yesterday b {
  font-size: 12px;
}

.kpi-compare {
  font-size: 10.5px;
}

.kpi-compare b {
  font-size: 12px;
}

.refund-live-note {
  font-size: 9.5px;
}

.rt-tip {
  position: fixed;
  z-index: 60;
}

@media (max-height: 950px) {
  #view-realtime .rt-chart-card .chart-box {
    height: 380px;
  }

  #view-realtime .page-head {
    margin-bottom: 8px;
  }

  #rtKpiGrid {
    margin-bottom: 10px;
  }

  .rt-product-kpis {
    margin-bottom: 10px;
  }
}

.rt-product-kpi .rt-pk-sub {
  font-size: 12px;
}

.rt-product-kpi .rt-pk-sub b {
  font-size: 14.5px;
}

.rt-product-kpi .rt-pk-sub em {
  font-size: 12px;
}

.rt-product-kpi .rt-pk-yesterday {
  font-size: 11.5px;
}

.rt-product-kpi .rt-pk-yesterday b {
  font-size: 12.5px;
}

.kpi-label {
  font-size: 13px;
}

.kpi-foot {
  font-size: 11px;
}

.card-head p {
  font-size: 11.5px;
}

.rt-product-kpi .rt-pk-name {
  font-size: 14px;
}

.rt-product-kpi .rt-pk-sub {
  font-size: 13px;
}

.rt-product-kpi .rt-pk-sub b {
  font-size: 15.5px;
}

.rt-product-kpi .rt-pk-sub em {
  font-size: 13px;
}

.rt-product-kpi .rt-pk-yesterday {
  font-size: 12.5px;
}

.rt-product-kpi .rt-pk-yesterday b {
  font-size: 13.5px;
}

.kpi-compare {
  font-size: 11px;
}

.kpi-compare b {
  font-size: 13px;
}

.rt-product-kpis-head strong {
  font-size: 13px;
}

.rt-product-kpis-head span {
  font-size: 11px;
}

.rt-pk-metric-label {
  font-size: 10.5px;
}

.rt-product-kpi .rt-pk-sub {
  font-size: 14px;
}

.rt-product-kpi .rt-pk-sub b {
  font-size: 16px;
}

.rt-product-kpi .rt-pk-sub em {
  font-size: 14px;
}

.rt-product-kpi .rt-pk-yesterday {
  font-size: 13px;
}

.rt-product-kpi .rt-pk-yesterday b {
  font-size: 14px;
}


.axis-text {
  fill: #9fb3c9;
  font-size: 12.5px;
}

.rt-legend {
  color: #b9cbe0;
  font-size: 12.5px;
}

.bar-label-amount {
  fill: #ffffff;
}

@media (max-height: 950px) {
  #view-realtime .rt-chart-card .chart-box {
    height: clamp(190px, calc(100vh - 700px), 330px);
  }
}

@media (max-height: 950px) {
  #rtKpiGrid .kpi-card {
    min-height: 145px;
    padding-bottom: 42px;
  }

  .rt-product-kpi {
    min-height: 180px;
    padding-bottom: 42px;
  }

  .rt-product-kpi .rt-pk-value {
    font-size: 24px;
  }

  .rt-product-kpi .rt-pk-sub {
    margin-top: 5px;
  }

  #view-realtime .rt-chart-card .chart-box {
    height: 330px;
  }
}

@media (max-height: 950px) {
  #view-realtime .rt-chart-card .chart-box {
    height: clamp(190px, calc(100vh - 700px), 330px) !important;
  }
}

/* 卡片更矮，柱形图更高 */
@media (max-height: 950px) {
  #rtKpiGrid .kpi-card {
    min-height: 138px;
    padding-bottom: 38px;
  }

  .rt-product-kpi {
    min-height: 158px;
    padding-bottom: 38px;
  }

  .rt-product-kpi .rt-pk-value {
    font-size: 23px;
  }

  .rt-product-kpi .rt-pk-sub {
    margin-top: 4px;
  }

  #view-realtime .rt-chart-card .chart-box {
    height: clamp(230px, calc(100vh - 600px), 380px) !important;
  }
}

/* 产品卡永远单行，按数量自动压缩 */
.rt-product-kpis-grid {
  grid-template-columns: repeat(var(--rt-cols, 4), minmax(0, 1fr));
  align-items: stretch;
}

.rt-product-kpi {
  container-type: inline-size;
  min-width: 0;
}

.rt-product-kpi .rt-pk-name {
  max-width: 100%;
  overflow: hidden;
  font-size: clamp(10px, 4.6cqw, 14px) !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rt-product-kpi .rt-pk-value {
  font-size: clamp(18px, 8.5cqw, 26px) !important;
}

.rt-product-kpi .kpi-label {
  font-size: clamp(9px, 4cqw, 13px) !important;
}

.rt-product-kpi .rt-pk-yesterday {
  font-size: clamp(9px, 4.2cqw, 13px) !important;
}

.rt-product-kpi .rt-pk-yesterday b {
  font-size: clamp(10px, 4.6cqw, 14px) !important;
}

.rt-product-kpi .rt-pk-sub {
  gap: 3px 9px;
  font-size: clamp(9px, 4.2cqw, 14px) !important;
}

.rt-product-kpi .rt-pk-sub b {
  font-size: clamp(10px, 5cqw, 16px) !important;
}

.rt-product-kpi .rt-pk-sub em {
  font-size: clamp(9px, 4.2cqw, 14px) !important;
}

.rt-product-kpi .kpi-foot {
  font-size: clamp(9px, 4cqw, 13px) !important;
}

#shipKpiGrid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

/* 发货 KPI 永远单行，按屏幕自动压缩 */
#shipKpiGrid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

#shipKpiGrid .kpi-card {
  container-type: inline-size;
  min-width: 0;
}

#shipKpiGrid .kpi-value {
  font-size: clamp(22px, 10cqw, 40px) !important;
  white-space: nowrap;
}

#shipKpiGrid .kpi-label {
  font-size: clamp(10px, 5cqw, 13px) !important;
}

#shipKpiGrid .kpi-compare {
  font-size: clamp(9px, 4.2cqw, 11px) !important;
}

.as-refund-kpi {
  min-height: 192px;
}

.as-refund-compare {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 4px;
  color: #8f7180;
  font-size: 10.5px;
}

.as-refund-compare b {
  color: #f4b8c4;
  font-family: var(--num);
  font-size: 12px;
  font-weight: 600;
}

.as-refund-compare em {
  color: #a98b98;
  font-style: normal;
  font-size: 10.5px;
}

.date-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  color: #8fa2b9;
  font-size: 11px;
}

.date-field input {
  border: 0;
  outline: 0;
  background: transparent;
  color: #dce9f8;
  font-family: var(--num);
  font-size: 12px;
}

.primary-btn {
  padding: 9px 16px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.12);
  color: #67e8f9;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.inv-input {
  width: 96px;
  padding: 5px 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 6px;
  outline: 0;
  background: rgba(8, 16, 28, 0.7);
  color: #e8f2ff;
  font-family: var(--num);
  font-size: 13px;
}

.inv-input:focus {
  border-color: rgba(34, 211, 238, 0.55);
}

.inv-negative {
  color: #f87171 !important;
  font-weight: 600;
}

.inv-low {
  color: #fbbf24 !important;
}

.span-6 {
  grid-column: span 6;
}

@media (max-width: 1100px) {
  .span-6 {
    grid-column: span 12;
  }
}

.inv-subtitle {
  margin: 12px 4px 6px;
  color: #8fa2b9;
  font-size: 12px;
  font-weight: 600;
}

.inv-ratio-text {
  max-width: 260px;
  color: #8fa2b9;
  font-size: 10.5px;
  line-height: 1.5;
}

.inv-group-row td {
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.inv-group-row strong {
  color: #dce9f8;
  font-size: 12px;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: rgba(4, 9, 17, 0.92);
  backdrop-filter: blur(12px);
}

.auth-gate[hidden] {
  display: none;
}

.auth-card {
  width: min(360px, calc(100vw - 32px));
  padding: 28px;
  border: 1px solid rgba(45, 212, 191, 0.18);
  border-radius: 16px;
  background: linear-gradient(160deg, #0c1a2b, #07111e);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.auth-mark {
  color: #2dd4bf;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.auth-card h2 {
  margin: 12px 0 4px;
  color: #eef7ff;
  font-size: 22px;
}

.auth-card p {
  margin-bottom: 18px;
  color: #7f93aa;
  font-size: 12px;
}

.auth-card label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: #9fb3c9;
  font-size: 11px;
}

.auth-card input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  outline: 0;
  background: rgba(4, 12, 22, 0.8);
  color: #eef7ff;
  font-size: 14px;
}

.auth-card input:focus {
  border-color: rgba(45, 212, 191, 0.6);
}

.auth-card button {
  width: 100%;
  margin-top: 6px;
  padding: 11px;
  border: 0;
  border-radius: 8px;
  background: #2dd4bf;
  color: #062018;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.auth-card button:disabled {
  opacity: 0.6;
}

.auth-error {
  margin-top: 10px;
  color: #fb7185;
  font-size: 11px;
}
