/* ============================================
   PopaSkin TH 数据看板 — 蓝色科技风
   基于 B端设计规范 v1.0.0
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

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

:root {
  --primary: #3574d4;
  --primary-light: #4a9af5;
  --primary-dark: #2a5fb8;
  --primary-bg: rgba(58,130,220,0.06);
  --primary-border: rgba(58,130,220,0.15);
  --bg: #f4f7fc;
  --card-bg: rgba(255,255,255,0.6);
  --card-bg-hover: rgba(255,255,255,0.82);
  --text: #1a2332;
  --text-secondary: rgba(60,75,100,0.6);
  --border: rgba(200,215,235,0.5);
  --success: #2ecc71;
  --warning: #f0a030;
  --danger: #e74c3c;
}

body {
  font-family: 'Noto Sans SC','PingFang SC','Microsoft YaHei',sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
}

/* 氛围光晕 */
body::before {
  content: '';
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 10% 20%, rgba(60,130,220,0.08), transparent 50%),
    radial-gradient(ellipse at 90% 80%, rgba(80,160,240,0.06), transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(100,180,255,0.04), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ---- 顶栏 ---- */
.nav-bar {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(180deg, var(--bg) 60%, transparent);
  padding: 14px 36px;
}
.nav-content { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.nav-left { display: flex; align-items: center; gap: 12px; }
.nav-left .logo-flag { flex-shrink: 0; box-shadow: 0 1px 4px rgba(0,0,0,0.12); border-radius: 4px; }
.nav-left h1 { font-size: 22px; font-weight: 600; color: var(--text); letter-spacing: -0.3px; }
.update-time { font-size: 12px; color: var(--text-secondary); }
.api-notice { font-size: 11px; color: var(--warning); background: rgba(240,160,48,0.08); padding: 3px 10px; border-radius: 6px; }
.nav-right { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; }
.nav-menu { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav-link {
  color: var(--primary-dark);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--primary-border);
  background: var(--primary-bg);
  padding: 5px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
.nav-link:hover { background: rgba(58,130,220,0.12); }
.nav-link.is-active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 5px 18px rgba(53,116,212,0.18);
}
.nav-link-muted { color: rgba(60,75,100,0.62); }
.store-select {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #d0d7de;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  margin-right: 4px;
}
.store-select:hover { border-color: var(--primary); }
.store-select:focus { outline: 2px solid var(--primary-light); outline-offset: 2px; }
.site-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.site-chip {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 118px;
  border: 1px solid #d0d7de;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 7px 10px 7px 26px;
  text-decoration: none;
  line-height: 1.2;
  box-shadow: 0 1px 4px rgba(15,35,45,0.03);
}
.site-chip::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2ecc71;
  transform: translateY(-50%);
  box-shadow: 0 0 0 4px rgba(46,204,113,0.1);
}
.site-chip-platform {
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-chip strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}
.site-chip:hover {
  border-color: rgba(29,92,99,0.24);
  background: #eef6f5;
}
.site-chip.is-active {
  border-color: rgba(29,92,99,0.42);
  background: #eef8f6;
  box-shadow: inset 3px 0 0 #1d5c63;
}
.site-chip.is-active strong {
  color: #17484d;
}

/* ---- 主内容 ---- */
.dashboard { max-width: 1400px; margin: 0 auto; padding: 0 36px 80px; position: relative; z-index: 1; }

/* ---- 区块 ---- */
.section { margin-bottom: 28px; animation: fadeUp 0.6s ease-out both; }
.section:nth-child(2) { animation-delay: 0.05s; }
.section:nth-child(3) { animation-delay: 0.1s; }
.section:nth-child(4) { animation-delay: 0.15s; }
.section:nth-child(5) { animation-delay: 0.2s; }
.section:nth-child(6) { animation-delay: 0.25s; }
.section:nth-child(7) { animation-delay: 0.3s; }

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

.section-title {
  font-size: 16px; font-weight: 600; margin-bottom: 14px; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.section-title::before {
  content: ''; display: inline-block; width: 4px; height: 18px;
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
  border-radius: 2px; flex-shrink: 0;
}

/* ---- 卡片网格 ---- */
.card-grid { display: grid; gap: 20px; }
.card-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ---- 数据卡片 ---- */
.data-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 22px 20px;
  border: 1px solid var(--border);
  transition: all 0.35s ease;
  cursor: default;
}
.data-card:hover {
  background: var(--card-bg-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.06);
}
.data-card .card-label {
  font-size: 12px; font-weight: 500; color: var(--text-secondary);
  margin-bottom: 6px; display: flex; align-items: center; gap: 5px;
}
.data-card .card-icon { display: inline-flex; color: var(--primary); flex-shrink: 0; }
.data-card .card-value { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 6px; color: var(--text); }
.data-card .card-sub { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.data-card .card-compare { display: flex; align-items: center; gap: 5px; font-size: 12px; flex-wrap: wrap; }
.compare-label { color: var(--text-secondary); font-size: 11px; }
.prev-val { color: var(--text-secondary); font-size: 11px; margin-left: auto; }

.change-tag { display: inline-block; padding: 3px 8px; border-radius: 6px; font-weight: 500; font-size: 12px; }
.change-up { background: rgba(46,204,113,0.08); color: var(--success); }
.change-down { background: rgba(231,76,60,0.08); color: var(--danger); }
.change-flat { background: rgba(60,75,100,0.06); color: var(--text-secondary); }

/* ---- 渠道分析 ---- */
.channel-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }

.channel-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.channel-table thead { background: rgba(240,245,252,0.5); }
.channel-table th {
  padding: 12px 10px; text-align: center; font-weight: 700; font-size: 14px;
  color: var(--text); letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
  vertical-align: middle; width: 20%;
}
.channel-table th:first-child { width: 20%; }
.channel-table td {
  padding: 12px 10px; text-align: center; font-size: 13px;
  border-bottom: 1px solid rgba(200,215,235,0.3);
  font-variant-numeric: tabular-nums; white-space: nowrap;
  vertical-align: middle;
}
.channel-table td:first-child { font-weight: 700; color: var(--text); }
.channel-table tr:hover { background: rgba(58,130,220,0.03); }
.channel-table .highlight { font-weight: 700; color: var(--text); }

/* ---- 图表 ---- */
.chart-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.chart-card {
  background: var(--card-bg); backdrop-filter: blur(20px);
  border-radius: 18px; padding: 24px; border: 1px solid var(--border);
}
.chart-card h3 { font-size: 14px; font-weight: 600; margin-bottom: 14px; color: var(--text); }
.chart-card canvas { max-height: 320px; }
.chart-card .mobile-chart-img { display: none; }

/* ---- 达人表格 ---- */
.creator-table-wrap {
  background: var(--card-bg); backdrop-filter: blur(20px);
  border-radius: 18px; border: 1px solid var(--border); overflow-x: auto;
}
.creator-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.creator-table thead { background: rgba(240,245,252,0.5); }
.creator-table th {
  padding: 12px 10px; text-align: center; font-weight: 700; font-size: 14px;
  color: var(--text); letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
  vertical-align: middle;
}
.creator-table td {
  padding: 12px 10px; text-align: center; vertical-align: middle;
  border-bottom: 1px solid rgba(200,215,235,0.3);
  font-variant-numeric: tabular-nums;
}
.creator-table tbody tr:hover { background: rgba(58,130,220,0.03); }
.creator-table td.rank-cell { font-weight: 700; font-size: 14px; }
.rank-gold { color: #D4A017; }
.rank-silver { color: #8E8E93; }
.rank-bronze { color: #B87333; }
.gmv-bar { height: 4px; border-radius: 2px; background: var(--primary); display: inline-block; vertical-align: middle; margin-right: 6px; }
.spark-cell { display: inline-flex; align-items: center; gap: 6px; }
.spark-num { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---- 底栏 ---- */
.footer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: rgba(244,247,252,0.8); backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  padding: 8px 36px; display: flex; align-items: center; justify-content: center;
  gap: 12px; font-size: 11px; color: var(--text-secondary);
}

.empty-state { text-align: center; padding: 40px; color: var(--text-secondary); font-size: 14px; }

/* ---- Popaskin Copilot shell ---- */
.copilot-page {
  padding-bottom: 96px;
}
.copilot-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 8px 0 20px;
  padding: 22px 0 18px;
  border-bottom: 1px solid rgba(200,215,235,0.42);
}
.copilot-hero h2,
.copilot-empty h2 {
  margin-top: 4px;
  font-size: 28px;
  line-height: 1.15;
}
.copilot-hero p,
.copilot-empty p {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 13px;
}
.copilot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.copilot-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(255,255,255,0.66);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(18px);
}
.copilot-card span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}
.copilot-card h3 {
  font-size: 18px;
  line-height: 1.25;
}
.copilot-card p {
  color: var(--text-secondary);
  font-size: 13px;
}
.copilot-card b {
  margin-top: auto;
  color: var(--text);
  font-size: 13px;
}
.copilot-empty {
  min-height: 420px;
  display: grid;
  place-content: center;
  text-align: center;
  background: rgba(255,255,255,0.58);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 48px 20px;
  backdrop-filter: blur(18px);
}
.inventory-realtime-page {
  max-width: 1360px;
}
.inventory-realtime-hero {
  align-items: center;
}
.inventory-realtime-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.inventory-shop-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(200,215,235,0.62);
  border-radius: 8px;
  background: rgba(255,255,255,0.72);
}
.inventory-shop-tab {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  padding: 7px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.inventory-shop-tab.is-active {
  background: #246fd4;
  color: #fff;
  box-shadow: 0 5px 14px rgba(36,111,212,0.18);
}
.inventory-realtime-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.inventory-realtime-kpi {
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  backdrop-filter: blur(18px);
}
.inventory-realtime-kpi span {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}
.inventory-realtime-kpi b {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}
.inventory-realtime-card {
  min-height: 0;
}
.inventory-realtime-note {
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
}
.inventory-source-note {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}
.inventory-realtime-table {
  min-width: 920px;
}
.inventory-realtime-table th:first-child,
.inventory-realtime-table td:first-child {
  width: 32%;
}
.inventory-realtime-table strong {
  color: var(--text);
  font-weight: 800;
}

/* ---- TikTok Viral Lab ---- */
.viral-page-v2 {
  max-width: 1480px;
  padding-bottom: 96px;
}
.viral-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 8px 0 18px;
  padding: 18px 0 14px;
  border-bottom: 1px solid rgba(200,215,235,0.42);
}
.viral-kicker {
  color: #0f8f7d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.viral-topbar h2 {
  margin-top: 4px;
  font-size: 28px;
  line-height: 1.15;
  color: var(--text);
}
.viral-topbar p {
  margin-top: 6px;
  max-width: 720px;
  color: var(--text-secondary);
  font-size: 13px;
}
.viral-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.radar-sync-status {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.35;
  max-width: 260px;
}
.viral-select {
  min-height: 38px;
  border: 1px solid rgba(200,215,235,0.72);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}
.viral-tabs {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 16px;
  padding: 4px;
  border: 1px solid rgba(200,215,235,0.62);
  border-radius: 8px;
  background: rgba(255,255,255,0.72);
}
.viral-tab {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  padding: 7px 11px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.viral-tab.is-active {
  background: #246fd4;
  color: #fff;
  box-shadow: 0 5px 14px rgba(36,111,212,0.18);
}
.small-button,
.primary-button {
  min-height: 38px;
  border: 1px solid var(--primary-border);
  background: var(--primary-bg);
  color: var(--primary-dark);
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.primary-button {
  background: #246fd4;
  color: #fff;
  border-color: #246fd4;
}
.small-button:hover,
.primary-button:hover { filter: brightness(0.98); }
.viral-panel-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.viral-tool-note {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}
.viral-workspace {
  display: grid;
  grid-template-columns: minmax(430px, 0.92fr) minmax(560px, 1.08fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
}
.viral-left-rail {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.viral-panel,
.viral-detail-shell {
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(200,215,235,0.58);
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(43,74,115,0.07);
  min-width: 0;
}
.viral-panel {
  padding: 14px;
}
.viral-panel[hidden] {
  display: none;
}
.viral-panel-head,
.viral-detail-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.viral-panel-head h3,
.viral-detail-titlebar h3 {
  font-size: 15px;
  line-height: 1.2;
  color: var(--text);
}
.viral-panel-head p,
.viral-note {
  color: var(--text-secondary);
  font-size: 12px;
}
.viral-count {
  min-width: 30px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15,143,125,0.1);
  color: #0b7568;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}
.viral-list {
  display: grid;
  gap: 8px;
  max-height: 430px;
  overflow-y: auto;
  padding-right: 2px;
  min-width: 0;
}
.viral-list-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid rgba(200,215,235,0.45);
  border-radius: 8px;
  background: rgba(255,255,255,0.74);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.viral-list-item:hover {
  border-color: rgba(36,111,212,0.35);
  background: #fff;
}
.viral-list-item.is-active {
  border-color: rgba(15,143,125,0.55);
  background: rgba(15,143,125,0.055);
}
.viral-rank {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(35,48,70,0.07);
  color: #26384f;
  font-size: 13px;
  font-weight: 800;
}
.viral-list-main {
  min-width: 0;
}
.viral-title {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.42;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-decoration: none;
}
.viral-title-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.viral-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
  color: var(--text-secondary);
  font-size: 11px;
}
.viral-meta-row span {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.viral-effect {
  margin-top: 5px;
  color: #52647a;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.viral-list-side {
  display: flex;
  justify-content: flex-end;
}
.score-pill,
.source-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}
.score-high { background: rgba(36,172,102,0.12); color: #158447; }
.score-mid { background: rgba(240,160,48,0.13); color: #9b6300; }
.score-low { background: rgba(60,75,100,0.08); color: var(--text-secondary); }
.source-own { background: rgba(15,143,125,0.1); color: #0b7568; }
.source-competitor { background: rgba(209,84,64,0.1); color: #b33b2a; }
.source-industry { background: rgba(53,116,212,0.1); color: var(--primary-dark); }
.source-manual { background: rgba(60,75,100,0.08); color: var(--text-secondary); }
.viral-submit-panel {
  padding-bottom: 16px;
}
.viral-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.viral-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}
.viral-form input,
.viral-form select,
.viral-form textarea {
  width: 100%;
  border: 1px solid rgba(200,215,235,0.72);
  background: rgba(255,255,255,0.86);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 10px;
  font: inherit;
  font-size: 13px;
}
.viral-form input:focus,
.viral-form select:focus,
.viral-form textarea:focus {
  outline: none;
  border-color: rgba(36,111,212,0.6);
  box-shadow: 0 0 0 3px rgba(36,111,212,0.1);
}
.viral-form textarea { resize: vertical; min-height: 76px; }
.viral-form-wide { grid-column: 1 / -1; }
.viral-upload-divider {
  height: 1px;
  margin: 16px 0;
  background: rgba(200,215,235,0.6);
}
.viral-model-note {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid rgba(15,143,125,0.16);
  border-radius: 8px;
  background: rgba(15,143,125,0.06);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}
.form-result {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 13px;
}
.viral-detail-shell {
  padding: 14px;
}
.viral-detail-sticky {
  position: sticky;
  top: 86px;
}
.viral-detail {
  padding: 6px 4px 4px;
  min-width: 0;
}
.viral-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(200,215,235,0.45);
}
.viral-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 12px;
}
.viral-detail-head h3 {
  max-width: 760px;
  color: var(--text);
  font-size: 20px;
  line-height: 1.38;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.viral-detail-head p {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}
.viral-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.viral-action-link {
  display: inline-flex;
  align-items: center;
}
.evidence-line {
  margin-top: 8px;
}
.evidence-status {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 4px 8px;
  border: 1px solid rgba(200,215,235,0.66);
  background: rgba(255,255,255,0.72);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}
.evidence-queued,
.evidence-running {
  color: #8a5a05;
  background: rgba(240,160,48,0.1);
  border-color: rgba(240,160,48,0.28);
}
.evidence-done {
  color: #146c43;
  background: rgba(46,204,113,0.1);
  border-color: rgba(46,204,113,0.28);
}
.evidence-failed {
  color: #9b2f24;
  background: rgba(231,76,60,0.1);
  border-color: rgba(231,76,60,0.28);
}
.viral-score-grid {
  display: grid;
  grid-template-columns: repeat(2, 60px);
  gap: 8px;
}
.viral-score-grid div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 11px;
}
.viral-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}
.viral-kpi-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.viral-metric {
  padding: 10px 12px;
  border: 1px solid rgba(200,215,235,0.48);
  border-radius: 8px;
  background: rgba(248,250,253,0.78);
}
.viral-metric span {
  display: block;
  color: var(--text-secondary);
  font-size: 11px;
}
.viral-metric b {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.28;
}
.viral-two-col,
.viral-output-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.viral-block,
.viral-output {
  padding: 13px 0;
  border-top: 1px solid rgba(200,215,235,0.45);
}
.viral-block.primary {
  border-top: none;
  padding-top: 0;
}
.viral-block h4,
.viral-output h4 {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 14px;
}
.viral-analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.viral-analysis-card,
.viral-dimension-card {
  border: 1px solid rgba(200,215,235,0.52);
  border-radius: 8px;
  background: rgba(248,250,253,0.78);
  padding: 11px;
}
.viral-analysis-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.viral-analysis-card h5 {
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
}
.viral-analysis-card p,
.viral-dimension-card p {
  color: #4e5f73;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.viral-analysis-card .insight-list li {
  font-size: 12px;
  margin: 5px 0;
}
.viral-dimension-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.viral-scene-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.viral-scene-card {
  min-height: 132px;
  padding: 10px;
  border: 1px solid rgba(200,215,235,0.52);
  border-radius: 8px;
  background: rgba(248,250,253,0.78);
}
.viral-scene-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}
.viral-scene-card-head span {
  color: #0b7568;
  font-size: 11px;
  font-weight: 800;
}
.viral-scene-card b {
  display: block;
  color: var(--text);
  font-size: 13px;
  margin-bottom: 6px;
}
.viral-scene-card p,
.viral-scene-card small {
  display: block;
  color: #4e5f73;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.viral-scene-card small {
  margin-top: 6px;
  color: var(--text-secondary);
}
.viral-dimension-card span {
  display: inline-flex;
  margin-bottom: 6px;
  color: #0b7568;
  font-size: 11px;
  font-weight: 800;
}
.viral-dimension-card b {
  display: block;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}
.insight-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.insight-list li {
  position: relative;
  padding-left: 14px;
  margin: 7px 0;
  color: #4e5f73;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.insight-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #0f8f7d;
}
.viral-output-grid {
  margin: 4px 0 10px;
}
.viral-output-grid > div {
  padding: 10px 0;
  border-top: 1px solid rgba(200,215,235,0.35);
}
.viral-output-grid b,
.viral-brief b,
.viral-risk-line b {
  display: block;
  color: var(--text);
  font-size: 13px;
  margin-bottom: 4px;
}
.viral-brief {
  padding: 10px 0;
  border-top: 1px solid rgba(200,215,235,0.35);
}
.viral-brief p,
.viral-link {
  color: #4e5f73;
  font-size: 13px;
  line-height: 1.55;
  margin: 4px 0 8px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.viral-risk-line {
  padding: 10px 0 2px;
  border-top: 1px solid rgba(200,215,235,0.35);
}
.radar-source-panel {
  padding: 0;
  overflow: hidden;
}
.radar-details summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 22px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}
.radar-details summary::-webkit-details-marker {
  display: none;
}
.radar-details summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(35,48,70,0.07);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 900;
}
.radar-details[open] summary::after {
  content: "-";
}
.radar-details summary span {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.radar-details summary b {
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
}
.radar-details summary small {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.35;
}
.radar-list {
  max-height: 290px;
  padding: 0 14px 14px;
}
.radar-url-line {
  margin-top: 6px;
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.radar-detail-shell .viral-metric b {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.radar-output-table {
  display: grid;
  border: 1px solid rgba(200,215,235,0.52);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(248,250,253,0.78);
}
.radar-output-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid rgba(200,215,235,0.45);
}
.radar-output-row:first-child {
  border-top: 0;
}
.radar-output-row b {
  color: var(--text);
  font-size: 13px;
}
.radar-output-row p {
  color: #4e5f73;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.viral-strategy-output {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.viral-strategy-card {
  border: 1px solid rgba(36,111,212,0.20);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(238,247,255,0.88), rgba(255,255,255,0.96));
  padding: 13px;
}
.viral-strategy-card h4 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 15px;
}
.viral-strategy-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
}
.viral-mini-table {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
  font-size: 12px;
}
.viral-mini-table th,
.viral-mini-table td {
  border-bottom: 1px solid rgba(200,215,235,0.45);
  padding: 8px;
  text-align: left;
  vertical-align: top;
}
.viral-mini-table th {
  color: var(--text);
  background: rgba(240,245,252,0.55);
}
.viral-link a { color: var(--primary-dark); font-weight: 700; }
.empty-state.compact {
  padding: 18px;
  border: 1px dashed rgba(200,215,235,0.7);
  border-radius: 8px;
}
.viral-modal[hidden] {
  display: none;
}
.viral-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 26px;
}
.viral-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(16,27,43,0.42);
  cursor: pointer;
}
.viral-modal-panel {
  position: relative;
  width: min(1040px, 100%);
  max-height: min(780px, calc(100vh - 52px));
  overflow: auto;
  border: 1px solid rgba(200,215,235,0.72);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(18,39,66,0.22);
  padding: 18px;
}
.viral-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.viral-modal-head h3 {
  color: var(--text);
  font-size: 20px;
  line-height: 1.25;
}
.viral-modal-note {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 14px;
}
.storyboard-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.storyboard-card {
  position: relative;
  display: grid;
  gap: 9px;
  border: 1px solid rgba(200,215,235,0.58);
  border-radius: 8px;
  background: rgba(248,250,253,0.72);
  padding: 14px 12px 12px;
}
.storyboard-card-index {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(15,143,125,0.1);
  color: #0b7568;
  font-size: 12px;
  font-weight: 800;
}
.storyboard-card label {
  display: grid;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}
.storyboard-card input,
.storyboard-card textarea {
  width: 100%;
  border: 1px solid rgba(200,215,235,0.72);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 8px 9px;
  font: inherit;
  font-size: 13px;
}
.storyboard-card textarea {
  resize: vertical;
}
.viral-modal-open {
  overflow: hidden;
}

.industry-radar-page {
  max-width: 1280px;
}

.industry-radar-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding: 22px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(58,130,220,0.12), rgba(35,163,111,0.08));
}

.industry-radar-hero h2 {
  margin: 6px 0;
  color: var(--text);
  font-size: 28px;
}

.industry-radar-hero p {
  margin: 0;
  color: var(--text-secondary);
}

.industry-radar-status {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.industry-radar-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(120px, 0.8fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  background: var(--card-bg);
}

.industry-radar-filters label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.industry-radar-filters input,
.industry-radar-filters select {
  min-height: 40px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  font-size: 14px;
}

.industry-radar-filters input:focus,
.industry-radar-filters select:focus {
  outline: 2px solid rgba(58,130,220,0.22);
  border-color: var(--primary);
}

.industry-radar-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 13px;
}

.industry-radar-feed {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.industry-radar-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  background: var(--card-bg);
}

.industry-radar-card.is-official {
  border-left-color: #d12f2f;
}

.industry-radar-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.industry-radar-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.industry-radar-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.industry-radar-card h3 a:hover {
  color: var(--primary-dark);
}

.industry-radar-card p {
  margin: 10px 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.industry-radar-meta,
.industry-radar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.industry-radar-meta {
  color: var(--text-secondary);
  font-size: 12px;
}

.radar-tag,
.trust-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.trust-official {
  border-color: rgba(209,47,47,0.28);
  color: #b42323;
  background: rgba(209,47,47,0.08);
}

.trust-trusted {
  color: var(--primary-dark);
  background: rgba(58,130,220,0.10);
}

.memory-review-page {
  max-width: 1280px;
}

.memory-review-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding: 22px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(58,130,220,0.11), rgba(46,204,113,0.08));
}

.memory-review-hero h2 {
  margin: 6px 0;
  color: var(--text);
  font-size: 28px;
}

.memory-review-hero p {
  margin: 0;
  color: var(--text-secondary);
}

.memory-review-token {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 320px;
}

.memory-review-token input {
  flex: 1;
  min-height: 36px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  font-size: 13px;
}

.memory-review-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) repeat(3, auto) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  background: var(--card-bg);
}

.memory-review-filters label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.memory-review-filters select {
  min-height: 40px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  font-size: 14px;
}

.memory-review-check {
  flex-direction: row !important;
  gap: 8px !important;
  align-items: center;
  min-height: 40px;
}

.memory-review-check input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.memory-review-token input:focus,
.memory-review-filters select:focus {
  outline: 2px solid rgba(58,130,220,0.22);
  border-color: var(--primary);
}

.memory-review-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 13px;
}

.memory-bulk-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.small-button.danger {
  border-color: rgba(196,63,63,0.28);
  color: #b42323;
  background: rgba(231,76,60,0.08);
}

.memory-review-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  background: var(--card-bg);
}

.memory-review-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 980px;
}

.memory-review-table th,
.memory-review-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(200,215,235,0.42);
  text-align: left;
  vertical-align: top;
}

.memory-review-table th {
  color: var(--text);
  background: rgba(240,245,252,0.62);
  font-size: 12px;
  text-transform: uppercase;
}

.memory-review-table tr:hover {
  background: rgba(58,130,220,0.04);
}

.memory-slug-button {
  border: 0;
  background: transparent;
  color: var(--primary-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: left;
  padding: 0;
}

.memory-slug-button:hover {
  color: var(--primary);
}

.memory-row-meta {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 11px;
}

.memory-status {
  display: inline-flex;
  min-width: 78px;
  justify-content: center;
  padding: 3px 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.memory-status-active {
  color: #1c8a4e;
  background: rgba(46,204,113,0.10);
  border-color: rgba(46,204,113,0.24);
}

.memory-status-candidate {
  color: var(--primary-dark);
  background: rgba(58,130,220,0.10);
  border-color: rgba(58,130,220,0.24);
}

.memory-status-stale {
  color: #b88317;
  background: rgba(240,160,48,0.10);
  border-color: rgba(240,160,48,0.24);
}

.memory-status-rejected,
.memory-status-superseded {
  color: #c43f3f;
  background: rgba(231,76,60,0.08);
  border-color: rgba(231,76,60,0.22);
}

.memory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.memory-actions button {
  min-width: 72px;
  min-height: 32px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--primary-dark);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.memory-actions button:hover:not(:disabled) {
  border-color: var(--primary);
  background: rgba(58,130,220,0.08);
}

.memory-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.memory-empty-cell {
  text-align: center !important;
  color: var(--text-secondary);
  padding: 36px !important;
}

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

.memory-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.memory-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(10,20,35,0.42);
  cursor: pointer;
}

.memory-modal-panel {
  position: relative;
  width: min(1120px, 96vw);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 24px 70px rgba(20,40,70,0.22);
  padding: 18px;
}

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

.memory-modal-head h3,
.memory-audit-section h4,
.memory-detail-card h4,
.memory-detail-grid h4 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 14px;
}

.memory-detail-stack {
  display: grid;
  gap: 12px;
}

.memory-detail-card {
  border: 1px solid var(--border);
  background: #f8fafc;
  padding: 12px;
}

.memory-detail-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.65;
}

.memory-evidence-list {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 13px;
}

.memory-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.memory-detail-actions button {
  min-height: 36px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--primary-dark);
  padding: 0 12px;
  cursor: pointer;
  font-weight: 700;
}

.memory-detail-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.memory-tech-details {
  border: 1px solid var(--border);
  background: #fff;
  padding: 10px;
}

.memory-tech-details summary {
  cursor: pointer;
  color: var(--primary-dark);
  font-weight: 700;
}

.memory-detail-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.2fr);
  gap: 12px;
  margin-top: 12px;
}

.memory-detail-grid pre {
  min-height: 300px;
  max-height: 52vh;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--text);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.memory-audit-section {
  margin-top: 14px;
}

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

.memory-audit-item,
.memory-audit-empty {
  border: 1px solid var(--border);
  background: #f8fafc;
  padding: 10px;
  color: var(--text-secondary);
  font-size: 12px;
}

.memory-audit-item {
  display: grid;
  grid-template-columns: 120px 130px 140px 100px 1fr;
  gap: 8px;
  align-items: start;
}

.memory-audit-item strong {
  color: var(--text);
}

.memory-audit-item p {
  margin: 0;
  color: var(--text);
}

/* ---- 响应式 ---- */
@media (max-width: 1100px) {
  .card-grid.cols-5 { grid-template-columns: repeat(3, 1fr); }
  .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .chart-grid { grid-template-columns: 1fr; }
  .channel-grid { grid-template-columns: 1fr; }
  .copilot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-realtime-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .viral-workspace { grid-template-columns: 1fr; }
  .viral-detail-sticky { position: static; }
  .industry-radar-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .memory-review-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .memory-detail-grid { grid-template-columns: 1fr; }
  .memory-audit-item { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  /* 顶栏不固定，避免遮盖内容 */
  .nav-bar { position: relative; padding: 12px 16px; }
  .nav-content { flex-wrap: wrap; gap: 6px; }
  .nav-left h1 { font-size: 16px; }
  .nav-right { width: 100%; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
  .nav-menu { width: 100%; justify-content: flex-start; gap: 4px; }
  .nav-link { font-size: 12px; padding: 4px 8px; }
  .api-notice { font-size: 10px; padding: 2px 8px; }
  .update-time { font-size: 10px; }

  .dashboard { padding: 0 12px 40px; }
  .section-title { font-size: 14px; }
  .industry-radar-hero,
  .industry-radar-card-head,
  .industry-radar-summary {
    flex-direction: column;
  }
  .industry-radar-status {
    text-align: left;
  }
  .industry-radar-filters {
    grid-template-columns: 1fr;
  }
  .memory-review-hero,
  .memory-review-summary {
    flex-direction: column;
    align-items: stretch;
  }
  .memory-bulk-actions { justify-content: flex-start; }
  .memory-review-token {
    width: 100%;
    min-width: 0;
  }
  .memory-review-filters {
    grid-template-columns: 1fr;
  }
  .memory-modal {
    padding: 12px;
    align-items: flex-start;
  }
  .memory-modal-panel {
    width: 100%;
    max-height: 92vh;
  }

  /* 卡片 2 列 */
  .card-grid.cols-5, .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .data-card { padding: 14px 12px; }
  .data-card .card-value { font-size: 18px; }
  .data-card .card-sub { font-size: 11px; }
  .data-card .card-compare { font-size: 10px; }
  .prev-val { font-size: 9px; }

  /* 表格横向滚动，不挤压 */
  .channel-grid { grid-template-columns: 1fr; }
  .chart-card { padding: 14px; overflow-x: auto; }
  .channel-table { min-width: 500px; font-size: 12px; }
  .channel-table th, .channel-table td { padding: 8px 8px; }

  /* 图表统一高度 */
  .chart-grid { grid-template-columns: 1fr; gap: 12px; }
  .chart-card h3 { font-size: 13px; }

  /* 手机端直接渲染 canvas；截图接口为空时也不会出现空白图表 */
  .chart-card canvas { display: block !important; width: 100% !important; }
  .chart-card .mobile-chart-img { display: block !important; width: 100%; border-radius: 8px; }

  /* 达人表格横向滚动 */
  .creator-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .creator-table { min-width: 700px; font-size: 12px; }
  .creator-table th, .creator-table td { padding: 8px 10px; white-space: nowrap; }

  /* 底栏 */
  .footer { font-size: 10px; padding: 6px 12px; }

  .copilot-hero {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }
  .copilot-grid { grid-template-columns: 1fr; }
  .copilot-card { min-height: 0; }
  .inventory-realtime-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .inventory-shop-tabs { width: 100%; }
  .inventory-shop-tab { flex: 1; }
  .inventory-realtime-summary { grid-template-columns: 1fr; }
  .inventory-realtime-kpi b { font-size: 20px; }

  .viral-topbar,
  .viral-detail-head {
    align-items: stretch;
    display: flex;
    flex-direction: column;
  }
  .viral-panel-head,
  .viral-detail-titlebar {
    align-items: flex-start;
  }
  .viral-page-v2 { padding-bottom: 72px; }
  .viral-topbar h2 { font-size: 22px; }
  .viral-workspace { gap: 12px; overflow-x: hidden; }
  .viral-panel,
  .viral-detail-shell { padding: 12px; }
  .radar-source-panel { padding: 0; }
  .viral-list { max-height: none; }
  .viral-list-item {
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: start;
    max-width: 100%;
    overflow: hidden;
  }
  .viral-title { word-break: break-all; }
  .viral-list-side {
    grid-column: 2;
    justify-content: flex-start;
    margin-top: 2px;
  }
  .viral-form,
  .viral-kpi-grid,
  .viral-two-col,
  .viral-output-grid,
  .viral-analysis-grid,
  .viral-scene-grid,
  .viral-dimension-grid,
  .storyboard-card-grid {
    grid-template-columns: 1fr;
  }
  .viral-score-grid { grid-template-columns: repeat(4, 56px); }
  .viral-mini-table { min-width: 620px; }
  .viral-output { overflow-x: auto; }
  .viral-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .viral-tab { padding: 7px 6px; }
  .radar-output-row { grid-template-columns: 1fr; gap: 5px; }
  .viral-modal { padding: 12px; align-items: start; }
  .viral-modal-panel {
    max-height: calc(100vh - 24px);
    padding: 14px;
  }
  .viral-modal-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 480px) {
  .card-grid.cols-5, .card-grid.cols-4 { grid-template-columns: 1fr; }
  .data-card .card-value { font-size: 20px; }
}

/* ---- Time range picker (v4) ---- */
.range-picker {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 4px 4px 10px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: all 0.2s ease;
}
.range-picker:hover { background: var(--card-bg-hover); border-color: rgba(58,130,220,0.35); }
.range-picker-label {
  font-size: 11px; font-weight: 500; color: var(--text-secondary);
  letter-spacing: 0.2px;
}
.range-select {
  font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 10px 30px 10px 12px;
  min-height: 44px;
  border: none; border-radius: 6px;
  background: rgba(58,130,220,0.08);
  color: var(--primary);
  cursor: pointer; outline: none;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3e%3cpath d='M2 4l3 3 3-3' stroke='%233574d4' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: all 0.2s ease;
}
.range-select:hover { background-color: rgba(58,130,220,0.14); }
.range-select:focus { box-shadow: 0 0 0 2px rgba(58,130,220,0.18); }
.range-select option { color: var(--text); background: #fff; font-weight: 500; }

@media (max-width: 768px) {
  .range-picker { padding: 4px 6px 4px 10px; }
  .range-picker-label { font-size: 11px; }
  .range-select { font-size: 13px; padding: 10px 28px 10px 10px; min-height: 44px; }
}

/* ============ UX polish v2 ============ */

/* ---- Top loading bar ---- */
.loading-bar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--primary) 30%, var(--primary-light) 50%, var(--primary) 70%, transparent 100%);
  background-size: 40% 100%;
  background-repeat: no-repeat;
  background-position: -40% 0;
  opacity: 0;
  z-index: 9999;
  transition: opacity 0.25s;
  pointer-events: none;
}
.loading-bar.active {
  opacity: 1;
  animation: loading-slide 1.1s linear infinite;
}
@keyframes loading-slide {
  0%   { background-position: -40% 0; }
  100% { background-position: 140% 0; }
}

/* ---- Tooltip (hover to reveal) ---- */
[data-tooltip] {
  position: relative;
  cursor: help;
}
[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
  opacity: 1;
  pointer-events: none;
}
[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(26, 35, 50, 0.96);
  color: #fff;
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.2px;
  white-space: pre;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transition: opacity 0.18s ease 0.1s;
  z-index: 1000;
}
[data-tooltip]::after {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: rgba(26, 35, 50, 0.96);
  opacity: 0;
  transition: opacity 0.18s ease 0.1s;
}

/* Dotted underline cue for tooltip targets inside cards */
.prev-val[data-tooltip] {
  border-bottom: 1px dotted rgba(60, 75, 100, 0.35);
  padding-bottom: 1px;
}

/* ---- Incomplete previous-period warning ---- */
.section-title .coverage-note {
  font-size: 11px;
  font-weight: 400;
  color: var(--warning);
  background: rgba(240, 160, 48, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 6px;
  cursor: help;
}

/* ---- Info icon next to section titles (for full period tooltip) ---- */
.section-title .info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: rgba(60, 75, 100, 0.15);
  color: rgba(60, 75, 100, 0.7);
  font-size: 10px;
  font-weight: 700;
  margin-left: 4px;
  cursor: help;
  transition: all 0.2s;
}
.section-title .info-icon:hover {
  background: var(--primary);
  color: #fff;
}

/* ---- Freshness badge in header ---- */
.freshness-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.25);
  color: var(--success);
  padding: 4px 10px 4px 8px;
  border-radius: 8px;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.1px;
  cursor: help;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.freshness-badge:hover { background: rgba(46, 204, 113, 0.14); }

.freshness-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.5);
  animation: pulse-fresh 2.2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-fresh {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.45); }
  50%      { box-shadow: 0 0 0 5px rgba(46, 204, 113, 0);   }
}

/* Warning state: data is > 2 days behind (unusual) */
.freshness-badge.stale {
  background: rgba(240, 160, 48, 0.1);
  border-color: rgba(240, 160, 48, 0.3);
  color: var(--warning);
}
.freshness-badge.stale .freshness-dot {
  background: var(--warning);
  animation: pulse-stale 2.2s ease-in-out infinite;
}
@keyframes pulse-stale {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240, 160, 48, 0.45); }
  50%      { box-shadow: 0 0 0 5px rgba(240, 160, 48, 0);   }
}

/* Error state: no data / API failure */
.freshness-badge.error {
  background: rgba(231, 76, 60, 0.1);
  border-color: rgba(231, 76, 60, 0.3);
  color: var(--danger);
}
.freshness-badge.error .freshness-dot {
  background: var(--danger);
  animation: none;
}

@media (max-width: 768px) {
  .freshness-badge { font-size: 10px; padding: 3px 8px 3px 6px; gap: 4px; }
  .freshness-dot { width: 6px; height: 6px; }
}

/* ============ Hero section: Today + Yesterday ============ */
.hero-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  align-items: stretch;
}

/* ---- Today real-time card (left) ---- */
.hero-today {
  background: linear-gradient(135deg, #3574d4 0%, #4a9af5 100%);
  border-radius: 20px;
  padding: 24px 22px 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(53, 116, 212, 0.22);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 190px;
}
.hero-today::before {
  content: '';
  position: absolute; top: -40%; right: -20%;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.25), transparent 65%);
  pointer-events: none;
}
.hero-today::after {
  content: '';
  position: absolute; bottom: -50%; left: -20%;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.12), transparent 65%);
  pointer-events: none;
}

.hero-today-header {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; opacity: 0.92;
  letter-spacing: 0.3px;
  position: relative; z-index: 1;
}
.hero-today-label { font-weight: 600; }
.hero-today-date { opacity: 0.75; font-size: 11px; margin-left: auto; }
.hero-health-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  background: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.92);
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-health-badge.is-degraded {
  background: rgba(255, 189, 89, 0.24);
  color: #fff8e8;
}
.hero-health-badge.is-stale {
  background: rgba(255, 255, 255, 0.88);
  color: var(--danger);
}

.live-dot {
  display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  background: #52f598;
  box-shadow: 0 0 0 0 rgba(82, 245, 152, 0.5);
  animation: pulse-live 1.8s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-live {
  0%, 100% { box-shadow: 0 0 0 0 rgba(82, 245, 152, 0.6); }
  50%      { box-shadow: 0 0 0 7px rgba(82, 245, 152, 0); }
}

.hero-today-gmv {
  margin-top: 10px;
  position: relative; z-index: 1;
}
.hero-today-gmv-value {
  display: block;
  font-size: 34px; font-weight: 700;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.hero-today-gmv-sub {
  display: block;
  font-size: 11px; opacity: 0.78;
  margin-top: 3px; letter-spacing: 0.3px;
}

.hero-today-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.45fr) minmax(58px, 0.8fr) minmax(58px, 0.8fr);
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.15);
  position: relative; z-index: 1;
}
.hero-today-stat {
  display: flex; flex-direction: column; gap: 2px;
}
.hero-today-stat-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.hero-today-stat-orders {
  display: grid;
  grid-template-columns: auto minmax(88px, 1fr);
  column-gap: 12px;
  align-items: start;
}
.hero-today-stat-value {
  font-size: 17px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}
.hero-today-stat-label {
  font-size: 10px; opacity: 0.7;
  letter-spacing: 0.4px;
}
.hero-today-stat-sub {
  font-size: 10px;
  line-height: 1.25;
  opacity: 0.58;
  white-space: nowrap;
  align-self: start;
  padding-top: 4px;
}

.hero-today-footer {
  font-size: 10px; opacity: 0.75;
  margin-top: 12px;
  display: flex; align-items: center; gap: 6px;
  position: relative; z-index: 1;
}
.hero-today-sep { opacity: 0.4; }

/* Subtle "refresh" flash when data updates */
.hero-today.just-updated .hero-today-gmv-value {
  animation: flash-update 0.6s ease-out;
}
@keyframes flash-update {
  0%   { text-shadow: 0 0 0 rgba(255,255,255,0); }
  50%  { text-shadow: 0 0 20px rgba(255,255,255,0.6); }
  100% { text-shadow: 0 0 0 rgba(255,255,255,0); }
}

/* ---- Yesterday block (right) ---- */
.hero-yesterday .section-title { margin-bottom: 12px; }
.hero-yesterday .card-grid.cols-5 {
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.hero-yesterday .data-card {
  padding: 18px 16px;
}
.hero-yesterday .data-card .card-value {
  font-size: 20px;
}

/* ---- Range section (dedicated row) ---- */
.range-section {
  margin-bottom: 20px !important;
}
.range-section-inner {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 20px;
  backdrop-filter: blur(20px);
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap;
}
.range-section-date {
  font-size: 13px; font-weight: 600; color: var(--text);
  font-variant-numeric: tabular-nums;
  display: inline-flex; align-items: center; gap: 6px;
}
.range-section-date .info-icon { margin-left: 2px; }
.range-section-hint {
  font-size: 11px; color: var(--text-secondary);
  letter-spacing: 0.2px;
  margin-left: auto;
}

/* ---- Quick Wins 2026-04-23: tabular-nums on all numeric columns ---- */
.data-card .card-value,
.card-sub,
.hero-today-stat-value,
.creator-table td,
.channel-table td,
.channel-table th {
  font-variant-numeric: tabular-nums;
}

/* ---- Quick Wins 2026-04-23: open-market state for today card ---- */
.hero-today-gmv-value.is-pending {
  font-size: 34px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0;
}
.hero-today-gmv-value.is-error {
  color: var(--danger);
  letter-spacing: 0;
}

/* ---- Mobile responsive ---- */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-today { min-height: 160px; }
  .hero-yesterday .card-grid.cols-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .hero-grid { gap: 14px; }
  .hero-today { padding: 18px 16px 16px; border-radius: 16px; }
  .hero-today-gmv-value { font-size: 28px; }
  .hero-today-stat-value { font-size: 15px; }
  .range-section-inner { padding: 10px 14px; gap: 10px; }
  .range-section-hint { display: none; }
  .hero-yesterday .card-grid.cols-5 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .hero-yesterday .data-card { padding: 12px 10px; }
  .hero-yesterday .data-card .card-value { font-size: 17px; }
}
@media (max-width: 480px) {
  .hero-today-row { grid-template-columns: minmax(135px, 1.4fr) minmax(50px, 0.8fr) minmax(50px, 0.8fr); }
  .hero-today-stat-orders {
    grid-template-columns: auto minmax(78px, 1fr);
    column-gap: 8px;
  }
  .hero-yesterday .card-grid.cols-5 { grid-template-columns: 1fr; }
}

/* ============================================================
   GMV Max 广告面板 (2026-04-23)
   ============================================================ */
.gmv-max-section {
  background: linear-gradient(135deg, rgba(58,130,220,0.04), rgba(82,245,152,0.03));
  border: 1px solid rgba(58,130,220,0.2);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 24px;
}
.gmv-max-section .section-title {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.gmv-max-badge {
  background: linear-gradient(135deg, #3574d4, #52f598);
  color: white; font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 6px;
  letter-spacing: 0.3px;
}
.gmv-max-delay {
  font-size: 11px; color: var(--text-secondary); font-weight: 400;
  margin-left: auto;
}
.ads-card {
  border-left: 3px solid #3574d4;
}
.ads-card .card-value.good { color: #2ecc71; }
.ads-card .card-value.bad { color: #e74c3c; }

/* 双列切分网格 */
.ads-split-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-top: 16px;
}
.ads-split-card { padding: 16px; }
.ads-split-card h3 {
  font-size: 14px; font-weight: 600;
  margin: 0 0 12px 0; color: var(--text);
}
.ads-mini-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px; font-variant-numeric: tabular-nums;
}
.ads-mini-table th {
  text-align: left; padding: 8px 6px;
  border-bottom: 1px solid var(--border);
  font-weight: 600; color: var(--text-secondary); font-size: 11px;
}
.ads-mini-table td {
  padding: 10px 6px; border-bottom: 1px solid rgba(0,0,0,0.04);
}

/* Top campaigns 表 */
.ads-top-card { margin-top: 16px; padding: 16px; }
.ads-top-card h3 {
  font-size: 14px; font-weight: 600;
  margin: 0 0 12px 0; color: var(--text);
}
.ads-top-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px; font-variant-numeric: tabular-nums;
}
.ads-top-table th {
  text-align: left; padding: 8px 8px;
  border-bottom: 1px solid var(--border);
  font-weight: 600; color: var(--text-secondary); font-size: 11px;
}
.ads-top-table td {
  padding: 10px 8px; border-bottom: 1px solid rgba(0,0,0,0.04);
}
.ads-top-table .campaign-name {
  max-width: 280px; font-size: 12px; color: var(--text);
}

/* 类型徽章 */
.ads-type-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 600;
}
.ads-type-badge.product {
  background: rgba(53,116,212,0.12); color: #3574d4;
}
.ads-type-badge.live {
  background: rgba(46,204,113,0.12); color: #2ecc71;
}

/* ROAS 色彩 */
.roas-good { color: #2ecc71; font-weight: 600; }
.roas-mid { color: #f39c12; font-weight: 600; }
.roas-bad { color: #e74c3c; font-weight: 600; }

/* 状态圆点 */
.status-dot {
  display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; margin-right: 4px; vertical-align: middle;
}
.status-dot.status-enable { background: #2ecc71; box-shadow: 0 0 4px rgba(46,204,113,0.5); }
.status-dot.status-disable { background: #95a5a6; }

/* 告警条 */
.ads-alerts {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 12px; margin-bottom: 8px;
}
.ads-alert {
  padding: 10px 14px; border-radius: 8px;
  font-size: 13px; line-height: 1.4;
  border-left: 3px solid;
}
.ads-alert-warn {
  background: rgba(243,156,18,0.08);
  border-left-color: #f39c12;
  color: #a86212;
}
.ads-alert-ok {
  background: rgba(46,204,113,0.08);
  border-left-color: #2ecc71;
  color: #1d7741;
}

/* Mobile */
@media (max-width: 768px) {
  .ads-split-grid { grid-template-columns: 1fr; }
  .gmv-max-section { padding: 14px; }
  .ads-top-table { font-size: 11px; }
  .ads-top-table .campaign-name { max-width: 140px; }
  .gmv-max-delay { width: 100%; margin-left: 0; margin-top: 4px; }
}

/* 占比小字（ads mini-table 的花费/GMV 单元格副标） */
.ads-mini-table .share-pct {
  display: inline-block; margin-left: 6px;
  font-size: 10px; font-weight: 500;
  color: var(--text-secondary);
  background: rgba(60,75,100,0.08);
  padding: 1px 5px; border-radius: 3px;
  vertical-align: 1px;
}

/* ============================================================
   Phase 1 facts tabs
   ============================================================ */
.phase1-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--primary-border);
  border-radius: 8px;
  background: rgba(255,255,255,0.68);
}
.phase1-tab {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--primary-dark);
  padding: 5px 9px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.phase1-tab:hover {
  background: rgba(58,130,220,0.1);
}
.phase1-tab.is-active {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 4px 14px rgba(53,116,212,0.18);
}
.phase1-section {
  scroll-margin-top: 88px;
}
.phase1-grid.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.phase1-card-wide {
  grid-column: 1 / -1;
}
.phase1-card {
  min-width: 0;
  background: rgba(255,255,255,0.74);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 22px rgba(43,74,115,0.05);
}
.phase1-card .section-title {
  margin-bottom: 12px;
}
.phase1-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.phase1-card-head .section-title {
  margin-bottom: 0;
}
.phase1-select {
  max-width: min(460px, 100%);
  border: 1px solid rgba(200,215,235,0.72);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
}
.phase1-table-wrap,
.phase1-matrix-wrap {
  width: 100%;
  overflow-x: auto;
}
.phase1-table,
.phase1-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.phase1-table th,
.phase1-table td,
.phase1-matrix th,
.phase1-matrix td {
  border-bottom: 1px solid rgba(200,215,235,0.45);
  padding: 9px 8px;
  text-align: left;
  vertical-align: middle;
}
.phase1-table th,
.phase1-matrix th {
  color: var(--text-secondary);
  font-weight: 700;
  background: rgba(240,245,252,0.55);
  white-space: nowrap;
}
.phase1-table td,
.phase1-matrix td {
  color: var(--text);
}
.phase1-table tbody tr:hover,
.phase1-matrix tbody tr:hover {
  background: rgba(58,130,220,0.035);
}
.phase1-table.compact th,
.phase1-table.compact td {
  padding: 7px 7px;
}
.inventory-status {
  display: inline-flex;
  align-items: center;
  min-width: 68px;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  border: 1px solid rgba(148,163,184,0.35);
  color: #475569;
  background: #f8fafc;
}
.inventory-status.urgent {
  color: #b42318;
  border-color: rgba(248,113,113,0.38);
  background: #fff1f2;
}
.inventory-status.inv-critical {
  color: #d93025;
  border-color: rgba(217,48,37,0.38);
  background: #fff1f2;
}
.inventory-status.warning {
  color: #9a5b00;
  border-color: rgba(245,158,11,0.38);
  background: #fff7ed;
}
.inventory-status.inv-warning {
  color: #9a5b00;
  border-color: rgba(249,171,0,0.42);
  background: #fff8df;
}
.inventory-status.low {
  color: #9a3412;
  border-color: rgba(251,146,60,0.42);
  background: #fff7ed;
}
.inventory-status.inv-elevated {
  color: #b45309;
  border-color: rgba(230,126,34,0.42);
  background: #fff4e5;
}
.inventory-status.ok {
  color: #047857;
  border-color: rgba(16,185,129,0.32);
  background: #ecfdf5;
}
.inventory-status.inv-safe {
  color: #1e8e3e;
  border-color: rgba(30,142,62,0.32);
  background: #ecfdf3;
}
.inventory-status.inv-unknown {
  color: #64748b;
  border-color: rgba(148,163,184,0.35);
  background: #f8fafc;
}
.phase-empty-cell {
  text-align: center !important;
  color: var(--text-secondary) !important;
  padding: 26px 10px !important;
}
.phase1-matrix {
  min-width: 960px;
  table-layout: fixed;
}
.phase1-matrix th:first-child {
  width: 190px;
  position: sticky;
  left: 0;
  z-index: 2;
}
.phase1-matrix tbody th {
  background: rgba(248,250,253,0.96);
  color: var(--text);
  overflow-wrap: anywhere;
}
.phase1-matrix tbody th span {
  display: block;
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
}
.phase1-matrix td {
  text-align: center;
  color: #24364f;
  white-space: nowrap;
}
.phase1-matrix td.is-strong {
  color: #fff;
  font-weight: 800;
}
.phase-ad-table th {
  white-space: nowrap;
}
.phase-ad-row > td {
  padding: 0;
}
.phase-ad-detail {
  border-bottom: 1px solid rgba(200,215,235,0.4);
}
.phase-ad-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(90px, 0.22fr));
  gap: 10px;
  align-items: center;
  padding: 12px 10px;
  cursor: pointer;
}
.phase-ad-summary span {
  color: var(--text);
  font-weight: 700;
}
.phase-ad-summary small {
  display: block;
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
}
.phase-ad-summary b {
  color: var(--text);
  font-size: 12px;
}
.phase-ad-expanded {
  display: grid;
  gap: 12px;
  padding: 0 10px 14px 28px;
}
.phase-ad-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.phase-ad-metrics.compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.phase-ad-metrics div {
  min-width: 0;
  border: 1px solid rgba(200,215,235,0.48);
  border-radius: 8px;
  background: rgba(248,250,253,0.78);
  padding: 9px 10px;
}
.phase-ad-metrics span,
.phase-progress-row span {
  display: block;
  color: var(--text-secondary);
  font-size: 11px;
}
.phase-ad-metrics b,
.phase-progress-row b {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.phase-ad-block h4 {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 13px;
}
.phase-progress-row {
  display: grid;
  grid-template-columns: 40px minmax(120px, 1fr) 80px;
  gap: 8px;
  align-items: center;
  margin: 7px 0;
}
.phase-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(60,75,100,0.08);
  overflow: hidden;
}
.phase-progress i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3574d4, #52b788);
}
.phase1-audience-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.phase1-audience-card {
  min-width: 0;
  border: 1px solid rgba(200,215,235,0.48);
  border-radius: 8px;
  background: rgba(248,250,253,0.72);
  padding: 12px;
}
.phase1-audience-card h3 {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}
.phase1-hint {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted, #6b7c93);
  vertical-align: middle;
}
.phase1-affiliate-status {
  padding: 24px 16px;
}
.phase1-affiliate-placeholder {
  text-align: center;
  padding: 32px 16px;
  border: 1px dashed rgba(200,215,235,0.6);
  border-radius: 8px;
  background: rgba(248,250,253,0.4);
}
.phase1-affiliate-status-line {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.phase1-affiliate-status-msg {
  font-size: 13px;
  color: var(--muted, #6b7c93);
  margin: 4px 0;
}

/* === Phase 1 整体美化 (2026-05-08 老板 UI 反馈) === */
.phase1-section-head {
  margin-bottom: 16px;
}
.phase1-section-head .section-title {
  margin-bottom: 4px;
}
.phase1-section-desc {
  font-size: 13px;
  color: var(--muted, #6b7c93);
  margin: 0 0 4px 0;
}
.phase1-card-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px 0;
}
.phase1-card-sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted, #6b7c93);
}

/* 视频 × 商品 矩阵美化 */
.phase1-matrix-wrap {
  margin-top: 4px;
}
.phase1-matrix-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted, #6b7c93);
  padding: 8px 12px;
  background: rgba(248,250,253,0.8);
  border-radius: 6px;
  margin-bottom: 10px;
}
.phase1-matrix-meta b {
  color: var(--text);
  font-weight: 700;
}
.phase1-matrix-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}
.phase1-matrix-legend i {
  display: inline-block;
  width: 18px;
  height: 12px;
  border-radius: 3px;
  margin-right: 2px;
}
.phase1-matrix-scroll {
  max-height: 540px;
  overflow: auto;
  border: 1px solid rgba(200,215,235,0.5);
  border-radius: 8px;
}
.phase1-matrix {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 12px;
}
.phase1-matrix th, .phase1-matrix td {
  padding: 6px 8px;
  text-align: center;
  border-right: 1px solid rgba(225,232,242,0.6);
  border-bottom: 1px solid rgba(225,232,242,0.6);
}
.phase1-matrix thead th {
  position: sticky;
  top: 0;
  background: #f5f7fa;
  z-index: 2;
  font-weight: 600;
  color: var(--text);
}
.phase1-matrix-corner {
  background: #ebeff5 !important;
  font-weight: 700;
}
.phase1-matrix .phase1-matrix-row-head {
  position: sticky;
  left: 0;
  background: #f5f7fa;
  z-index: 1;
  text-align: left;
  padding: 8px 12px;
  border-right: 2px solid #d8dde6;
}
.phase1-matrix-col-idx, .phase1-matrix-row-idx {
  display: inline-block;
  background: #2660b8;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  margin-right: 4px;
}
.phase1-matrix-col-name, .phase1-matrix-row-vid {
  font-weight: 600;
}
.phase1-matrix th small, .phase1-matrix-row-head small {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--muted, #6b7c93);
  margin-top: 2px;
}
.phase1-matrix td.is-strong {
  color: white;
  font-weight: 700;
}
.phase1-matrix td.is-empty {
  color: rgba(120, 130, 145, 0.4);
}
.phase1-matrix td b {
  font-weight: 600;
}

/* 广告漏斗卡片美化 */
.phase1-funnel-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.phase-ad-card {
  border: 1px solid rgba(200,215,235,0.6);
  border-radius: 10px;
  background: white;
  transition: all 0.18s ease;
}
.phase-ad-card[open] {
  border-color: rgba(38,96,184,0.5);
  box-shadow: 0 4px 16px rgba(38,96,184,0.08);
}
.phase-ad-card-head {
  display: grid;
  grid-template-columns: 36px 1fr auto 24px;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
}
.phase-ad-card-head::-webkit-details-marker { display: none; }
.phase-ad-rank {
  font-size: 14px;
  font-weight: 800;
  color: #2660b8;
  background: rgba(38,96,184,0.08);
  border-radius: 6px;
  padding: 4px 6px;
  text-align: center;
}
.phase-ad-name strong {
  display: block;
  font-size: 14px;
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.phase-ad-name small {
  font-size: 11px;
  color: var(--muted, #6b7c93);
}
.phase-ad-kpi {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.phase-kpi {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 56px;
}
.phase-kpi label {
  font-size: 10px;
  color: var(--muted, #6b7c93);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.phase-kpi b {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-top: 2px;
}
.badge-good { color: #1c8a4e !important; }
.badge-bad  { color: #c43f3f !important; }
.badge-meh  { color: #b88317 !important; }
.phase-ad-toggle {
  font-size: 16px;
  color: var(--muted, #6b7c93);
  transition: transform 0.18s;
}
.phase-ad-card[open] .phase-ad-toggle { transform: rotate(180deg); }
.phase-ad-expanded {
  padding: 4px 16px 16px;
  border-top: 1px solid rgba(225,232,242,0.6);
  display: grid;
  gap: 16px;
}
.phase-ad-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.phase-ad-block h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin: 6px 0 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.phase-ad-block h4 small {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted, #6b7c93);
}
.phase-progress-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.phase-progress-row {
  display: grid;
  grid-template-columns: 32px 1fr 56px 64px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.phase-progress-label {
  font-weight: 700;
  color: var(--text);
  text-align: right;
}
.phase-progress {
  height: 12px;
  background: rgba(225,232,242,0.7);
  border-radius: 6px;
  overflow: hidden;
}
.phase-progress i {
  display: block;
  height: 100%;
  border-radius: 6px;
  transition: width 0.3s ease;
}
.phase-progress-rate {
  font-weight: 700;
  color: var(--text);
  font-size: 12px;
}
.phase-progress-num {
  font-size: 11px;
  color: var(--muted, #6b7c93);
  text-align: right;
}
.phase-ad-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}
.phase-ad-metrics.compact {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.phase-metric-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 10px;
  background: rgba(248,250,253,0.7);
  border-radius: 6px;
  font-size: 12px;
}
.phase-metric-label {
  color: var(--muted, #6b7c93);
}
.phase-metric-value {
  font-weight: 700;
  color: var(--text);
}

/* 人群效率卡片美化 */
.phase1-audience-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  padding: 6px 8px 4px;
  border-bottom: 2px solid rgba(38,96,184,0.18);
  margin-bottom: 6px;
}
.phase1-audience-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 14px;
  background: #2660b8;
  border-radius: 2px;
}
.phase1-audience-table th {
  font-size: 11px;
  color: var(--muted, #6b7c93);
  font-weight: 600;
}
.phase1-audience-table td {
  font-size: 12px;
}
.phase1-dim-value {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(38,96,184,0.08);
  border-radius: 4px;
  font-weight: 600;
  color: var(--text);
  font-size: 11px;
}
.marketing-freshness {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(148,163,184,0.36);
  border-radius: 7px;
  background: #fff;
  color: var(--text-secondary);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.marketing-freshness::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #94a3b8;
}
.marketing-freshness.is-fresh {
  color: #047857;
  background: #ecfdf5;
  border-color: rgba(16,185,129,0.32);
}
.marketing-freshness.is-fresh::before {
  background: #10b981;
}
.marketing-freshness.is-warning {
  color: #9a5b00;
  background: #fff7ed;
  border-color: rgba(245,158,11,0.38);
}
.marketing-freshness.is-warning::before {
  background: #f59e0b;
}
.marketing-freshness.is-stale {
  color: #b42318;
  background: #fff1f2;
  border-color: rgba(248,113,113,0.38);
}
.marketing-freshness.is-stale::before {
  background: #ef4444;
}
.marketing-data-gap,
.asset-card.data-gap {
  border: 1px solid rgba(219, 119, 6, 0.28);
  background: rgba(255, 247, 237, 0.92);
  color: #7c2d12;
}
.marketing-data-gap {
  grid-column: 1 / -1;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
}
.asset-card.data-gap {
  cursor: default;
  align-items: flex-start;
}
.asset-card.data-gap small {
  color: rgba(124, 45, 18, 0.72);
}
.asset-bridge-health {
  grid-column: 1 / -1;
  min-height: 0;
  gap: 10px;
}
.asset-bridge-health.is-ready {
  border-color: rgba(16, 185, 129, 0.32);
  background: rgba(236, 253, 245, 0.92);
  color: #064e3b;
}
.asset-bridge-health strong {
  min-height: 0;
  padding-right: 110px;
}
.asset-bridge-status {
  position: absolute;
  top: 10px;
  right: 12px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
}
.asset-bridge-health .asset-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.marketing-delta {
  font-weight: 800;
}
.marketing-delta.up {
  color: #047857;
}
.marketing-delta.down {
  color: #b42318;
}
.gmv-truth-table td:first-child b,
.gmv-truth-table td:first-child small,
.gmv-truth-table td:last-child small {
  display: block;
}
.gmv-truth-table td:first-child small,
.gmv-truth-table td:last-child small {
  color: var(--text-secondary);
  font-size: 11px;
  margin-top: 3px;
}
.gmv-truth-verdict {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  border: 1px solid rgba(148,163,184,0.34);
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.gmv-truth-verdict.scale {
  color: #047857;
  background: #ecfdf5;
  border-color: rgba(16,185,129,0.32);
}
.gmv-truth-verdict.caution {
  color: #9a5b00;
  background: #fff7ed;
  border-color: rgba(245,158,11,0.38);
}
.gmv-truth-verdict.pause {
  color: #b42318;
  background: #fff1f2;
  border-color: rgba(248,113,113,0.38);
}
.gmv-truth-verdict.anomaly {
  color: #475569;
  background: #f8fafc;
  border-color: rgba(100,116,139,0.30);
}
.gmv-truth-verdict.bad {
  color: #111827;
  background: #e5e7eb;
  border-color: rgba(17,24,39,0.25);
}
.gmv-truth-detail-row td {
  padding-top: 0;
}
.gmv-truth-detail {
  color: var(--text-secondary);
  font-size: 12px;
}
.gmv-truth-detail summary {
  cursor: pointer;
  font-weight: 700;
}
.gmv-truth-detail div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 8px 0 2px;
}
.asset-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.asset-filter,
.sku-priority-filter {
  min-height: 30px;
  border: 1px solid rgba(148,163,184,0.36);
  border-radius: 7px;
  background: #fff;
  color: var(--text-secondary);
  padding: 5px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.asset-filter.is-active,
.sku-priority-filter.is-active {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}
.asset-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.asset-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 252px;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  border: 1px solid rgba(200,215,235,0.62);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 12px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(43,74,115,0.04);
}
.asset-card:hover {
  border-color: rgba(38,96,184,0.42);
  box-shadow: 0 10px 22px rgba(43,74,115,0.08);
}
.asset-card strong {
  display: block;
  padding-right: 78px;
  font-size: 13px;
  line-height: 1.35;
  min-height: 36px;
  overflow-wrap: anywhere;
}
.asset-card small {
  display: block;
  color: var(--text-secondary);
  font-size: 11px;
  overflow-wrap: anywhere;
}
.asset-card p {
  min-height: 38px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}
.asset-card-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 66px;
  border: 1px solid rgba(148,163,184,0.34);
  border-radius: 7px;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}
.asset-card-tag.boost {
  color: #047857;
  background: #ecfdf5;
  border-color: rgba(16,185,129,0.32);
}
.asset-card-tag.remake {
  color: #075985;
  background: #e0f2fe;
  border-color: rgba(14,165,233,0.32);
}
.asset-card-tag.authorize {
  color: #6d28d9;
  background: #f5f3ff;
  border-color: rgba(139,92,246,0.30);
}
.asset-card-tag.watch {
  color: #9a5b00;
  background: #fff7ed;
  border-color: rgba(245,158,11,0.38);
}
.asset-card-tag.retire {
  color: #b42318;
  background: #fff1f2;
  border-color: rgba(248,113,113,0.38);
}
.asset-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.asset-metrics span {
  min-width: 0;
  border: 1px solid rgba(225,232,242,0.72);
  border-radius: 7px;
  background: rgba(248,250,253,0.72);
  padding: 7px 8px;
}
.asset-metrics label {
  display: block;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
}
.asset-metrics b {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.asset-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.asset-card-foot span {
  max-width: 100%;
  border-radius: 6px;
  background: rgba(38,96,184,0.07);
  color: var(--text-secondary);
  padding: 3px 6px;
  font-size: 11px;
  font-weight: 700;
}
.sku-filter-notice {
  min-height: 128px;
  justify-content: center;
  cursor: default;
}
.asset-filter-clear,
.sku-priority-asset-link {
  width: fit-content;
  border: 1px solid rgba(38,96,184,0.26);
  border-radius: 7px;
  background: rgba(38,96,184,0.08);
  color: var(--primary);
  padding: 5px 9px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.sku-priority-table td:first-child b,
.sku-priority-table td:first-child small {
  display: block;
  max-width: 260px;
  overflow-wrap: anywhere;
}
.sku-priority-table td:first-child small {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 11px;
}
.sku-priority-row {
  cursor: pointer;
}
.sku-priority-status {
  display: inline-flex;
  align-items: center;
  min-width: 68px;
  justify-content: center;
  border: 1px solid rgba(148,163,184,0.34);
  border-radius: 7px;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 900;
}
.sku-priority-status.scale {
  color: #047857;
  background: #ecfdf5;
  border-color: rgba(16,185,129,0.32);
}
.sku-priority-status.test {
  color: #9a5b00;
  background: #fff7ed;
  border-color: rgba(245,158,11,0.38);
}
.sku-priority-status.protect {
  color: #c2410c;
  background: #fff7ed;
  border-color: rgba(251,146,60,0.38);
}
.sku-priority-status.fix {
  color: #b42318;
  background: #fff1f2;
  border-color: rgba(248,113,113,0.38);
}
.sku-priority-status.stop {
  color: #111827;
  background: #f3f4f6;
  border-color: rgba(75,85,99,0.26);
}
.sku-priority-detail-row td {
  background: rgba(248,250,253,0.86);
}
.sku-priority-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  padding: 8px 0;
}
.sku-priority-detail span {
  border-radius: 6px;
  background: #fff;
  color: var(--text-secondary);
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 700;
}
.cogs-freshness-warning {
  color: #b42318 !important;
  background: #fff1f2 !important;
}
.asset-modal[hidden] {
  display: none;
}
.asset-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
}
.asset-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,0.38);
}
.asset-modal-panel {
  position: relative;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  margin: 32px auto;
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 24px 70px rgba(15,23,42,0.24);
}
.asset-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(148,163,184,0.34);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.asset-modal-panel h3 {
  margin: 0 40px 12px 0;
  color: var(--text);
  font-size: 16px;
}
.asset-modal-summary {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 13px;
}
.asset-modal-summary strong {
  color: var(--text);
  font-size: 14px;
}
.asset-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.asset-modal-grid section {
  min-width: 0;
  border: 1px solid rgba(225,232,242,0.9);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}
.asset-modal-grid h4 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 13px;
}
.asset-modal-grid dl {
  display: grid;
  gap: 8px;
  margin: 0;
}
.asset-modal-grid dl div {
  display: grid;
  grid-template-columns: minmax(72px, 0.42fr) minmax(0, 1fr);
  gap: 10px;
}
.asset-modal-grid dt {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}
.asset-modal-grid dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.asset-modal-grid ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}
.asset-modal-content pre {
  max-height: 520px;
  overflow: auto;
  border: 1px solid rgba(225,232,242,0.9);
  border-radius: 8px;
  background: #f8fafc;
  color: #1f2937;
  padding: 12px;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 1100px) {
  .phase1-grid.two-col,
  .phase1-audience-grid {
    grid-template-columns: 1fr;
  }
  .asset-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .asset-modal-grid {
    grid-template-columns: 1fr;
  }
  .asset-bridge-health .asset-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .phase-ad-metrics,
  .phase-ad-metrics.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 768px) {
  .phase1-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .phase1-tab {
    min-height: 34px;
    padding: 6px 8px;
  }
  .phase1-card {
    padding: 12px;
  }
  .phase1-card-head {
    align-items: stretch;
    flex-direction: column;
  }
  .asset-card-grid {
    grid-template-columns: 1fr;
  }
  .asset-bridge-health strong {
    padding-right: 0;
  }
  .asset-bridge-status {
    position: static;
    align-self: flex-start;
  }
  .asset-bridge-health .asset-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .phase1-select {
    max-width: 100%;
  }
  .phase-ad-summary {
    grid-template-columns: 1fr 1fr;
  }
  .phase-ad-expanded {
    padding-left: 10px;
  }
  .phase-ad-metrics,
  .phase-ad-metrics.compact {
    grid-template-columns: 1fr;
  }
  .phase-progress-row {
    grid-template-columns: 34px minmax(100px, 1fr) 64px;
  }
}

/* ============================================================
   Dashboard command redesign (2026-05-08)
   ============================================================ */
:root {
  --primary: #1d5c63;
  --primary-light: #2b8991;
  --primary-dark: #17484d;
  --primary-bg: rgba(29,92,99,0.07);
  --primary-border: rgba(29,92,99,0.18);
  --bg: #f5f7f7;
  --card-bg: #ffffff;
  --card-bg-hover: #ffffff;
  --text: #17202a;
  --text-secondary: #657386;
  --border: #dbe3ea;
  --success: #23895d;
  --warning: #b76e18;
  --danger: #c54a3f;
}

* {
  letter-spacing: 0 !important;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    linear-gradient(180deg, #eef4f4 0, #f7f9f9 210px, #f5f7f7 100%);
  letter-spacing: 0;
  overflow-x: hidden;
}

body::before,
.hero-today::before,
.hero-today::after {
  display: none;
}

.nav-bar {
  padding: 10px 28px;
  background: rgba(248,250,250,0.92);
  border-bottom: 1px solid rgba(219,227,234,0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-content {
  align-items: center;
  gap: 18px;
}

.nav-left h1 {
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

.nav-right {
  gap: 8px;
}

.store-select,
.range-select,
.phase1-select {
  border-radius: 7px;
  border-color: var(--border);
  box-shadow: none;
}

.nav-link {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border-radius: 7px;
  background: #fff;
  color: #29465a;
  border-color: var(--border);
  box-shadow: none;
}

.nav-link:hover {
  background: #eef6f5;
  border-color: rgba(29,92,99,0.24);
}

.nav-link.is-active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: none;
}

.freshness-badge {
  border-radius: 7px;
  background: rgba(35,137,93,0.09);
  border-color: rgba(35,137,93,0.22);
  color: var(--success);
}

.update-time {
  color: #758296;
}

.dashboard {
  padding: 14px 36px 80px;
}

.page-jump-nav {
  position: sticky;
  top: 61px;
  z-index: 85;
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 0 12px;
  margin-bottom: 2px;
  background: linear-gradient(180deg, rgba(245,247,247,0.96), rgba(245,247,247,0.86));
  overflow-x: auto;
  scrollbar-width: none;
}

.page-jump-nav::-webkit-scrollbar {
  display: none;
}

.page-jump-nav a {
  flex: 0 0 auto;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: #405064;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}

.page-jump-nav a:hover {
  color: var(--primary-dark);
  border-color: rgba(29,92,99,0.24);
  background: #eef6f5;
}

.section {
  margin-bottom: 24px;
  scroll-margin-top: 110px;
}

.command-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 20px;
  margin: 0 0 18px;
  padding: 10px 0 16px;
  border-bottom: 1px solid rgba(219,227,234,0.88);
}

.command-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.command-summary h2 {
  color: var(--text);
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: 0;
}

.command-summary p {
  margin-top: 5px;
  color: var(--text-secondary);
  font-size: 13px;
}

.command-summary-pills {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.summary-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(219,227,234,0.95);
  border-radius: 7px;
  background: #fff;
  color: #314154;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.summary-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--success);
}

.summary-pill.is-warning::before {
  background: var(--warning);
}

.summary-pill.is-muted {
  color: var(--text-secondary);
}

.summary-pill.is-muted::before {
  background: #9aa6b5;
}

.exchange-pill {
  border-color: rgba(29,92,99,0.2);
  background: rgba(255,255,255,0.92);
}

.exchange-pill::before {
  background: #c98223;
}

.hero-grid {
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: 16px;
}

.hero-today {
  min-height: 180px;
  border-radius: 8px;
  background: #17484d;
  box-shadow: none;
  padding: 20px 18px 18px;
}

.hero-today-gmv-value,
.hero-today-gmv-value.is-pending {
  font-size: 32px;
  letter-spacing: 0;
}

.hero-today-row {
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
}

.data-card,
.chart-card,
.creator-table-wrap,
.phase1-card,
.viral-panel,
.viral-detail-shell {
  border-radius: 8px;
  background: #fff;
  border-color: var(--border);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.data-card {
  padding: 16px 14px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.data-card:hover {
  transform: translateY(-1px);
  box-shadow: none;
  border-color: rgba(29,92,99,0.28);
}

.data-card .card-value {
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0;
}

.hero-yesterday .card-grid.cols-5 {
  gap: 10px;
}

.hero-yesterday .data-card {
  padding: 14px 12px;
}

.hero-yesterday .data-card .card-value {
  font-size: 18px;
}

.section-title {
  margin-bottom: 12px;
  color: #1d2a36;
  letter-spacing: 0;
}

.section-title::before {
  background: #1d5c63;
}

.range-section {
  margin-bottom: 18px !important;
}

.range-section-inner {
  border-radius: 8px;
  background: #fff;
  padding: 10px 14px;
  backdrop-filter: none;
}

.gmv-max-section {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.gmv-max-badge {
  border-radius: 6px;
  background: #17484d;
}

.ads-alert {
  border-radius: 7px;
}

.ads-split-grid {
  gap: 12px;
}

.ads-top-card,
.ads-split-card {
  overflow-x: auto;
}

.ads-top-table {
  min-width: 900px;
}

.ads-mini-table {
  min-width: 460px;
}

.chart-grid {
  gap: 14px;
}

.chart-card {
  padding: 18px;
}

.chart-card h3 {
  color: #263545;
}

.creator-table,
.channel-table,
.ads-mini-table,
.ads-top-table,
.phase1-table {
  background: #fff;
}

.creator-table thead,
.channel-table thead,
.ads-mini-table th,
.ads-top-table th,
.phase1-table th,
.phase1-matrix th {
  background: #f3f6f7;
}

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

.phase1-section-desc {
  color: var(--text-secondary);
}

.phase1-tabs {
  flex: 0 0 auto;
  border-color: var(--border);
  background: #fff;
  border-radius: 8px;
}

.phase1-tab {
  color: #385061;
  border-radius: 6px;
}

.phase1-tab.is-active {
  background: var(--primary);
  box-shadow: none;
}

.phase1-card-title {
  letter-spacing: 0;
}

.footer {
  background: rgba(248,250,250,0.9);
  border-top-color: var(--border);
  backdrop-filter: blur(12px);
}

@media (max-width: 1100px) {
  .nav-content {
    align-items: flex-start;
  }

  .nav-right {
    flex: 1;
  }

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

  .command-summary {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .command-summary-pills {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .nav-bar {
    padding: 10px 16px;
  }

  .nav-content {
    gap: 8px;
  }

  .nav-left h1 {
    font-size: 16px;
  }

  .nav-right {
    gap: 6px;
    justify-content: flex-start;
  }

  .store-select {
    order: 1;
  }

  .site-switcher {
    order: 1;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .site-chip {
    min-width: 0;
  }

  .nav-menu {
    order: 4;
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-menu::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    flex: 0 0 auto;
    justify-content: center;
    min-height: 32px;
    padding: 5px 9px;
  }

  .freshness-badge {
    order: 2;
    max-width: 100%;
  }

  .update-time {
    order: 3;
    width: 100%;
  }

  .dashboard {
    padding: 8px 12px 54px;
  }

  .page-jump-nav {
    top: 0;
    padding: 8px 0 10px;
    margin: 0 -12px 4px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .command-summary {
    gap: 12px;
    padding: 6px 0 12px;
    margin-bottom: 14px;
  }

  .command-summary h2 {
    font-size: 22px;
  }

  .command-summary-pills {
    width: 100%;
    gap: 6px;
  }

  .summary-pill {
    width: 100%;
    min-height: 32px;
    white-space: normal;
  }

  .hero-grid {
    gap: 12px;
  }

  .hero-today {
    min-height: 150px;
    padding: 16px 14px 14px;
  }

  .hero-today-gmv-value,
  .hero-today-gmv-value.is-pending {
    font-size: 27px;
  }

  .hero-yesterday .card-grid.cols-5,
  .card-grid.cols-5,
  .card-grid.cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .data-card,
  .hero-yesterday .data-card {
    padding: 12px 10px;
  }

  .data-card .card-label {
    font-size: 11px;
  }

  .data-card .card-value,
  .hero-yesterday .data-card .card-value {
    font-size: 17px;
  }

  .data-card .card-compare {
    gap: 4px;
  }

  .prev-val {
    margin-left: 0;
  }

  .range-section-inner {
    padding: 9px 10px;
  }

  .ads-top-table {
    min-width: 760px;
  }

  .phase1-section-head {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .card-grid.cols-5,
  .card-grid.cols-4,
  .hero-yesterday .card-grid.cols-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-today-row {
    grid-template-columns: minmax(135px, 1.4fr) minmax(50px, 0.8fr) minmax(50px, 0.8fr);
  }

  .hero-today-stat-orders {
    grid-template-columns: auto minmax(78px, 1fr);
    column-gap: 8px;
  }

  .change-tag {
    padding: 2px 6px;
  }
}

/* ============================================================
   Inventory-first homepage refresh (2026-05-15)
   ============================================================ */
.page-jump-nav a.jump-inventory {
  color: #b45309;
  border-color: rgba(245,158,11,0.36);
  background: #fff7ed;
}

.summary-pill.is-danger {
  color: #b42318;
  border-color: rgba(248,113,113,0.38);
  background: #fff1f2;
}

.summary-pill.is-danger::before {
  background: var(--danger);
}

.inventory-pill::before {
  background: #f59e0b;
}

.hero-grid {
  grid-template-columns: minmax(280px, 0.9fr) minmax(230px, 0.62fr) minmax(380px, 1.08fr);
}

.organic-daily-card,
.home-action-card {
  min-height: 180px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.organic-daily-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.organic-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.organic-card-head b {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.organic-card-value {
  color: var(--primary-dark);
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.organic-daily-card.is-empty .organic-card-value {
  color: var(--text-secondary);
  font-size: 20px;
}

.organic-card-sub {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}

.organic-progress-track {
  position: relative;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(29,92,99,0.1);
}

.organic-progress-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--success));
  transition: width 0.3s ease;
}

.organic-daily-card.is-target-met .organic-progress-fill {
  background: linear-gradient(90deg, var(--success), #2fae78);
}

.organic-card-inputs {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.35;
}

.home-action-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.home-action-head .section-title {
  margin-bottom: 0;
}

.home-action-head a,
.inventory-home-link {
  color: var(--primary-dark);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

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

.home-action-empty {
  min-height: 112px;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  font-size: 13px;
}

.home-action-item {
  display: grid;
  grid-template-columns: 22px minmax(84px, 0.85fr) minmax(160px, 1.6fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 36px;
  border: 1px solid rgba(219,227,234,0.9);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  text-decoration: none;
}

.home-action-item:hover {
  border-color: rgba(29,92,99,0.24);
  background: #f8fbfb;
}

.home-action-icon {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: #ecfdf5;
  border: 1px solid rgba(16,185,129,0.28);
}

.home-action-item.medium .home-action-icon {
  background: #fff7ed;
  border-color: rgba(245,158,11,0.38);
}

.home-action-item.high .home-action-icon {
  background: #fff1f2;
  border-color: rgba(248,113,113,0.42);
}

.home-action-item strong {
  font-size: 13px;
  min-width: 0;
}

.home-action-item em {
  color: var(--text-secondary);
  font-style: normal;
  font-size: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.home-action-item b {
  min-width: 54px;
  max-width: 92px;
  border-radius: 6px;
  background: #f3f6f7;
  color: #405064;
  padding: 3px 7px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  white-space: normal;
  overflow-wrap: anywhere;
}

.home-action-item.high b {
  color: #b42318;
  background: #fff1f2;
}

.home-action-item.medium b {
  color: #9a5b00;
  background: #fff7ed;
}

.home-kpi-section .card-grid.cols-5 {
  gap: 10px;
}

.home-kpi-section .data-card {
  padding: 14px 12px;
}

.home-kpi-section .data-card .card-value {
  font-size: 18px;
}

.inventory-home-section {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(245,158,11,0.28);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

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

.inventory-home-head .section-title {
  margin-bottom: 4px;
}

.inventory-home-head p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.inventory-home-grid {
  display: block;
}

.inventory-home-main {
  min-width: 0;
}

.inventory-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.inventory-summary-card {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #f8fafc;
  padding: 10px;
}

.inventory-summary-card span {
  display: block;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 800;
}

.inventory-summary-card b {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.inventory-summary-card.good b { color: var(--success); }
.inventory-summary-card.warning b { color: #f59e0b; }
.inventory-summary-card.danger b { color: #ef4444; }

.inventory-risk-bar {
  margin-bottom: 10px;
}

.inventory-risk-track {
  display: flex;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f6;
}

.inventory-risk-track i.safe,
.inventory-risk-legend i.safe { background: #10b981; }
.inventory-risk-track i.watch,
.inventory-risk-legend i.watch { background: #f59e0b; }
.inventory-risk-track i.risk,
.inventory-risk-legend i.risk { background: #ef4444; }
.inventory-risk-track i.unknown,
.inventory-risk-legend i.unknown { background: #94a3b8; }

.inventory-risk-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
}

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

.inventory-risk-legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.inventory-table-wrap {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(219,227,234,0.86);
  border-radius: 8px;
}

.inventory-home-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.inventory-home-table th,
.inventory-home-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(219,227,234,0.74);
  text-align: left;
  white-space: nowrap;
}

.inventory-home-table th {
  color: var(--text-secondary);
  background: #f3f6f7;
  font-weight: 800;
}

.inventory-home-table tbody tr:last-child td {
  border-bottom: 0;
}

.inventory-home-table strong {
  display: block;
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-days {
  font-weight: 900;
}

.inventory-days.inv-critical,
.inventory-days.inv-elevated {
  color: #dc2626;
}

.inventory-days.inv-warning {
  color: #b45309;
}

.inventory-days.inv-safe {
  color: #047857;
}

.inventory-ad-state,
.inventory-action-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border: 1px solid rgba(148,163,184,0.35);
  border-radius: 6px;
  background: #f8fafc;
  color: #64748b;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.inventory-ad-state.active {
  color: #b45309;
  background: #fff7ed;
  border-color: rgba(245,158,11,0.38);
}

.inventory-action-pill.stop {
  color: #b42318;
  background: #fff1f2;
  border-color: rgba(248,113,113,0.42);
}

.inventory-action-pill.replenish {
  color: #c2410c;
  background: #fff7ed;
  border-color: rgba(251,146,60,0.42);
}

.inventory-action-pill.protect {
  color: #075985;
  background: #e0f2fe;
  border-color: rgba(14,165,233,0.32);
}

.inventory-action-pill.scale {
  color: #047857;
  background: #ecfdf5;
  border-color: rgba(16,185,129,0.32);
}

.inventory-action-pill.check {
  color: #475569;
  background: #f8fafc;
}

.inventory-focus-card {
  display: grid;
  grid-template-columns: 72px minmax(180px, 1fr) minmax(260px, 1.8fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(219,227,234,0.95);
  border-radius: 8px;
  background: #f8fafc;
  margin: 0 0 10px;
  padding: 9px 12px;
}

.inventory-focus-card.inv-critical {
  border-color: rgba(248,113,113,0.48);
  background: #fff7f5;
}

.inventory-focus-card span {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 900;
}

.inventory-focus-card strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-focus-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.4;
}

.inventory-focus-card .inventory-action-pill {
  justify-self: end;
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 1100px) {
  .inventory-focus-card {
    grid-template-columns: 70px minmax(160px, 1fr) minmax(220px, 1.4fr) auto;
  }
}

@media (max-width: 900px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .nav-bar,
  .dashboard {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .nav-content {
    width: 100%;
    min-width: 0;
    align-items: stretch;
    flex-direction: column;
  }

  .nav-left,
  .nav-right,
  .nav-menu,
  .page-jump-nav {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .nav-right {
    flex: 0 0 auto;
  }

  .store-select {
    flex: 0 0 170px;
    max-width: 170px;
  }

  .site-switcher {
    width: 100%;
  }

  .freshness-badge,
  .update-time,
  .nav-menu {
    flex: 1 0 100%;
  }

  .freshness-badge {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .nav-menu {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .nav-link {
    flex: 0 1 auto;
  }

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

  .home-kpi-section .card-grid.cols-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-summary-grid {
    grid-template-columns: 1fr;
  }

  .inventory-focus-card {
    grid-template-columns: 70px minmax(0, 1fr) auto;
  }

  .inventory-focus-card p {
    grid-column: 2 / -1;
  }

  .home-action-item {
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
  }

  .home-action-item b,
  .home-action-item em {
    grid-column: 2;
    justify-self: start;
  }

  .home-action-item b {
    max-width: none;
  }
}

@media (max-width: 768px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .nav-bar,
  .dashboard {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .nav-content {
    width: 100%;
    min-width: 0;
    align-items: stretch;
    flex-direction: column;
  }

  .nav-left {
    width: 100%;
  }

  .nav-right,
  .nav-menu,
  .page-jump-nav {
    min-width: 0;
    max-width: 100%;
  }

  .nav-right {
    width: 100%;
    flex: 0 0 auto;
  }

  .store-select {
    flex: 0 0 170px;
    max-width: 170px;
  }

  .site-switcher {
    width: 100%;
  }

  .freshness-badge {
    flex: 1 0 100%;
    width: 100%;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .update-time,
  .nav-menu {
    flex: 1 0 100%;
    width: 100%;
  }

  .hero-today,
  .organic-daily-card,
  .home-action-card,
  .inventory-home-section,
  .home-kpi-section,
  .range-section,
  .gmv-max-section {
    max-width: 100%;
  }

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

  .home-action-card {
    padding: 12px;
  }

  .home-action-item {
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    gap: 7px;
    padding: 8px;
  }

  .home-action-item b,
  .home-action-item em {
    grid-column: 2;
    justify-self: start;
  }

  .home-action-item b {
    max-width: none;
  }

  .home-action-item strong,
  .home-action-item em,
  .home-action-item b {
    font-size: 11px;
  }

  .home-kpi-section .card-grid.cols-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-summary-grid {
    grid-template-columns: 1fr;
  }

  .inventory-home-section {
    padding: 12px;
  }

  .inventory-home-head {
    align-items: stretch;
    flex-direction: column;
  }

  .inventory-home-table {
    min-width: 660px;
  }

  .inventory-focus-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .inventory-focus-card p {
    grid-column: auto;
  }

  .inventory-focus-card .inventory-action-pill {
    justify-self: start;
  }

  .footer {
    display: none;
  }

  .dashboard {
    padding-bottom: 80px;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 120;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid var(--border);
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 7px 8px 9px;
  }

  .mobile-bottom-nav a {
    position: relative;
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    color: #405064;
    text-decoration: none;
    font-size: 12px;
    font-weight: 900;
  }

  .mobile-bottom-nav a.is-active {
    color: #fff;
    background: var(--primary);
  }

  .mobile-bottom-nav a.has-alert::after {
    content: "";
    position: absolute;
    top: 7px;
    right: calc(50% - 24px);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
  }
}

@media (max-width: 480px) {
  .home-action-item {
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
  }

  .home-action-item b,
  .home-action-item em {
    grid-column: 2;
    justify-self: start;
  }

  .home-action-item b {
    max-width: none;
  }

  .inventory-summary-card b {
    font-size: 21px;
  }
}

/* ============================================================
   Command-center shell from approved UI direction (2026-05-15)
   ============================================================ */
.side-nav {
  display: none;
}

.ops-side-stack,
.ops-signals-section {
  min-width: 0;
}

.ops-card-kicker {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 900;
}

.ops-mini-card,
.ops-signal-card {
  min-width: 0;
  border: 1px solid rgba(219,227,234,0.95);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.ops-mini-card strong,
.ops-signal-card strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.ops-mini-card p,
.ops-signal-card p {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.ops-mini-card a,
.ops-signal-card a {
  display: inline-flex;
  margin-top: 10px;
  color: var(--primary-dark);
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
}

.ops-mini-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  border-top: 1px solid rgba(219,227,234,0.72);
  padding-top: 9px;
  color: var(--text-secondary);
  font-size: 12px;
}

.ops-mini-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-mini-row b,
.sku-inventory-tight {
  color: #dc2626 !important;
}

.ops-sku-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.ops-sku-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px 58px;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 12px;
}

.ops-sku-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-sku-item b,
.ops-sku-item em {
  border-radius: 6px;
  background: #f3f6f7;
  color: #405064;
  padding: 3px 6px;
  text-align: center;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.ops-sku-item b.scale { color: #047857; background: #ecfdf5; }
.ops-sku-item b.test { color: #9a5b00; background: #fff7ed; }
.ops-sku-item b.protect { color: #c2410c; background: #fff7ed; }
.ops-sku-item b.fix { color: #b42318; background: #fff1f2; }
.ops-sku-item b.stop { color: #111827; background: #f3f4f6; }

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

.home-subpage-guide {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, auto);
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(219,227,234,0.95);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.home-subpage-guide .section-title {
  margin-bottom: 6px;
}

.home-subpage-guide-copy p {
  max-width: 720px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

.home-subpage-guide-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(68px, 1fr));
  gap: 8px;
}

.home-subpage-guide-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #f8fafc;
  color: var(--primary-dark);
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
}

.home-subpage-guide-links a:hover {
  border-color: rgba(29,92,99,0.28);
  background: #eef6f5;
}

.shopline-entry-section {
  border: 1px solid rgba(192,205,210,0.95);
  border-radius: 8px;
  background: #f7fbfa;
  padding: 16px;
}

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

.shopline-entry-head p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.shopline-entry-kicker {
  display: block;
  margin-bottom: 4px;
  color: #1d5c63;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.shopline-entry-link {
  flex-shrink: 0;
  border: 1px solid rgba(29,92,99,0.2);
  border-radius: 6px;
  background: #fff;
  color: #1d5c63;
  padding: 8px 10px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
}

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

.shopline-realtime-section {
  border: 1px solid rgba(192,205,210,0.95);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
}

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

.shopline-realtime-head p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.shopline-realtime-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1fr 1fr;
  gap: 12px;
}

.shopline-realtime-card {
  display: grid;
  grid-template-rows: auto minmax(38px, auto) auto;
  gap: 6px;
  min-width: 0;
  min-height: 124px;
  border: 1px solid rgba(219,227,234,0.95);
  border-radius: 8px;
  background: #f8fafb;
  padding: 14px;
}

.shopline-realtime-card.is-primary {
  border-color: rgba(29,92,99,0.34);
  background: #f5fbfa;
  box-shadow: inset 4px 0 0 #1d5c63;
}

.shopline-realtime-card span {
  color: #526173;
  font-size: 12px;
  font-weight: 900;
}

.shopline-realtime-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 28px;
  line-height: 1.16;
}

.shopline-realtime-card small {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.35;
}

.shopline-site-card {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 7px;
  min-height: 142px;
  border: 1px solid rgba(214,225,229,0.96);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 14px;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(15,35,45,0.05);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.shopline-site-card:hover {
  transform: translateY(-1px);
  border-color: rgba(29,92,99,0.32);
  box-shadow: 0 10px 24px rgba(15,35,45,0.08);
}

.shopline-site-card.is-active {
  border-color: rgba(29,92,99,0.55);
  box-shadow: inset 4px 0 0 #1d5c63, 0 8px 22px rgba(15,35,45,0.07);
}

.shopline-site-card.is-warning {
  border-color: rgba(240,160,48,0.36);
}

.shopline-site-card.is-loading {
  color: var(--text-secondary);
}

.shopline-site-region {
  color: #567;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.shopline-site-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  line-height: 1.2;
}

.shopline-site-card em {
  width: fit-content;
  border: 1px solid rgba(46,204,113,0.22);
  border-radius: 6px;
  background: rgba(46,204,113,0.08);
  color: #047857;
  padding: 4px 7px;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}

.shopline-site-card.is-warning em {
  border-color: rgba(240,160,48,0.3);
  background: rgba(240,160,48,0.1);
  color: #9a5b00;
}

.shopline-entry-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 5px;
}

.shopline-entry-stats span {
  min-width: 0;
  border: 1px solid rgba(219,227,234,0.9);
  border-radius: 6px;
  background: #f8fafb;
  padding: 8px 7px;
  color: var(--text-secondary);
  font-size: 11px;
}

.shopline-entry-stats b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 13px;
}

.shopline-site-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 11px;
}

.shopline-section {
  border: 1px solid rgba(219,227,234,0.95);
  border-radius: 8px;
  background: rgba(255,255,255,0.78);
  padding: 16px;
}

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

.shopline-head p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.shopline-status {
  flex-shrink: 0;
  border: 1px solid rgba(46,204,113,0.24);
  background: rgba(46,204,113,0.08);
  color: #047857;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

.shopline-status.is-warning {
  border-color: rgba(240,160,48,0.3);
  background: rgba(240,160,48,0.1);
  color: #9a5b00;
}

.shopline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 14px;
  margin-top: 14px;
}

.shopline-mini-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.shopline-mini-table th,
.shopline-mini-table td {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(219,227,234,0.8);
  text-align: left;
  vertical-align: top;
}

.shopline-mini-table th {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 900;
}

.shopline-mini-table td:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shopline-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 12px;
}

.shopline-pill-list span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 1px solid rgba(219,227,234,0.9);
  border-radius: 6px;
  background: #fff;
  padding: 7px 9px;
}

.shopline-pill-list b {
  color: var(--text);
}

.shopline-limits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.shopline-limits span {
  border: 1px solid rgba(240,160,48,0.22);
  background: rgba(240,160,48,0.08);
  color: #8a5700;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 700;
}

.shopline-page .shopline-entry-section,
.shopline-page .shopline-realtime-section,
.shopline-page .shopline-section {
  margin-top: 0;
}

.shopline-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.shopline-panel {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid rgba(219,227,234,0.95);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 8px 20px rgba(15,35,45,0.04);
}

.shopline-panel h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
}

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

.shopline-panel-head p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.shopline-panel-wide {
  grid-column: 1 / -1;
}

.shopline-business-section {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

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

.shopline-inventory-watch {
  margin-top: 14px;
}

.shopline-audience-section,
.shopline-sync-section {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

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

.shopline-sync-status {
  display: inline-flex;
  border: 1px solid rgba(46,204,113,0.22);
  border-radius: 6px;
  background: rgba(46,204,113,0.08);
  color: #047857;
  padding: 3px 6px;
  font-size: 11px;
  font-weight: 900;
}

.shopline-sync-status.is-warning {
  border-color: rgba(240,160,48,0.3);
  background: rgba(240,160,48,0.1);
  color: #9a5b00;
}

@media (max-width: 900px) {
  .shopline-entry-head,
  .shopline-realtime-head {
    flex-direction: column;
    align-items: stretch;
  }
  .shopline-entry-link {
    text-align: center;
  }
  .shopline-realtime-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .shopline-entry-grid {
    grid-template-columns: 1fr;
  }
  .shopline-detail-grid,
  .shopline-audience-grid,
  .shopline-product-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .shopline-site-card {
    min-height: 0;
  }
  .shopline-entry-stats {
    grid-template-columns: 1fr;
  }
  .shopline-realtime-grid {
    grid-template-columns: 1fr;
  }
  .shopline-realtime-card {
    min-height: 0;
  }
}

.phase1-matrix-row-head em {
  display: block;
  margin-top: 2px;
  color: var(--primary-dark);
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
}

.sku-priority-table td:nth-child(5) small {
  display: block;
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 800;
}

@media (min-width: 1180px) {
  body.shell-ready .side-nav,
  body[data-page="dashboard"] .side-nav {
    position: fixed;
    inset: 12px auto 12px 12px;
    z-index: 150;
    display: flex;
    width: 64px;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 8px;
    background: linear-gradient(180deg, #17484d 0%, #07505a 50%, #063f49 100%);
    color: #fff;
    box-shadow: 0 16px 36px rgba(6,63,73,0.18);
    transition: width 0.18s ease, box-shadow 0.18s ease;
  }

  body.shell-ready .side-nav:hover,
  body.shell-ready .side-nav:focus-within {
    width: 230px;
    box-shadow: 0 18px 42px rgba(6,63,73,0.24);
  }

  body.shell-ready .side-brand,
  body[data-page="dashboard"] .side-brand {
    position: relative;
    min-height: 60px;
    padding: 20px 18px 18px;
    overflow: hidden;
    white-space: nowrap;
    font-size: 17px;
    font-weight: 900;
    transition: color 0.16s ease, opacity 0.16s ease;
  }

  body.shell-ready .side-brand::before {
    content: 'P';
    position: absolute;
    left: 17px;
    top: 16px;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid rgba(255,255,255,0.24);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    transition: opacity 0.16s ease;
  }

  body.shell-ready .side-nav:hover .side-brand::before,
  body.shell-ready .side-nav:focus-within .side-brand::before {
    opacity: 0;
  }

  body.shell-ready .side-nav:not(:hover):not(:focus-within) .side-brand {
    color: transparent;
  }

  body.shell-ready .side-nav-menu,
  body[data-page="dashboard"] .side-nav-menu {
    display: grid;
    gap: 6px;
    padding: 0 10px;
  }

  body.shell-ready .side-nav-divider,
  body[data-page="dashboard"] .side-nav-divider {
    margin-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 12px 12px 4px;
    color: rgba(255,255,255,0.54);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.05em;
    white-space: nowrap;
  }

  body.shell-ready .side-nav-divider:first-child,
  body[data-page="dashboard"] .side-nav-divider:first-child {
    margin-top: 0;
    border-top: 0;
  }

  body.shell-ready .side-nav:not(:hover):not(:focus-within) .side-nav-divider {
    color: transparent;
  }

  body.shell-ready .side-nav-link,
  body[data-page="dashboard"] .side-nav-link {
    position: relative;
    display: grid;
    grid-template-columns: 24px minmax(150px, 1fr) auto;
    align-items: center;
    column-gap: 10px;
    min-height: 46px;
    border-radius: 8px;
    color: rgba(255,255,255,0.88);
    padding: 0 12px;
    overflow: hidden;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    transition: background 0.16s ease, color 0.16s ease;
  }

  body.shell-ready .side-nav:not(:hover):not(:focus-within) .side-nav-link {
    color: transparent;
  }

  body.shell-ready .side-nav-link span,
  body[data-page="dashboard"] .side-nav-link span {
    color: rgba(255,255,255,0.76);
    font-size: 17px;
    text-align: center;
  }

  body.shell-ready .side-nav:not(:hover):not(:focus-within) .side-nav-link span {
    color: rgba(255,255,255,0.78);
  }

  body.shell-ready .side-nav:not(:hover):not(:focus-within) .side-nav-link b {
    opacity: 0;
  }

  body.shell-ready .side-nav-link:hover,
  body.shell-ready .side-nav-link.is-active,
  body[data-page="dashboard"] .side-nav-link:hover,
  body[data-page="dashboard"] .side-nav-link.is-active {
    background: rgba(255,255,255,0.11);
    color: #fff;
  }

  body.shell-ready .side-nav-link b,
  body[data-page="dashboard"] .side-nav-link b {
    min-width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    transition: opacity 0.16s ease;
  }

  body.shell-ready .side-nav-status,
  body[data-page="dashboard"] .side-nav-status {
    margin-top: auto;
    padding: 16px 18px 18px;
    color: rgba(255,255,255,0.75);
    font-size: 12px;
    font-weight: 800;
    min-width: 190px;
    transition: opacity 0.16s ease;
  }

  body.shell-ready .side-nav:not(:hover):not(:focus-within) .side-nav-status {
    opacity: 0;
  }

  body.shell-ready .side-nav-status strong,
  body[data-page="dashboard"] .side-nav-status strong {
    color: #9ff6c8;
  }

  body.shell-ready .side-nav-status.is-degraded strong,
  body[data-page="dashboard"] .side-nav-status.is-degraded strong {
    color: #ffd38b;
  }

  body.shell-ready .side-nav-status.is-stale strong,
  body[data-page="dashboard"] .side-nav-status.is-stale strong {
    color: #ffb4b4;
  }

  body.shell-ready .nav-bar,
  body[data-page="dashboard"] .nav-bar {
    padding-left: 92px;
  }

  body.shell-ready .nav-content,
  body[data-page="dashboard"] .nav-content {
    max-width: none;
  }

  body[data-page="dashboard"] .nav-left {
    display: none;
  }

  body.shell-ready .nav-menu,
  body[data-page="dashboard"] .nav-menu {
    display: none;
  }

  body.shell-ready:not([data-page="phase1"]) .store-select {
    display: none;
  }

  body.shell-ready .dashboard,
  body[data-page="dashboard"] .dashboard {
    max-width: none;
    margin-left: 76px;
    padding: 14px 24px 80px;
  }

  body.shell-ready .footer {
    margin-left: 76px;
  }

  body.shell-ready .page-jump-nav,
  body[data-page="dashboard"] .page-jump-nav {
    top: 58px;
  }

  .inventory-home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 12px;
  }

  .ops-side-stack {
    display: grid;
    align-content: start;
    gap: 12px;
  }
}

@media (max-width: 900px) {
  .ops-signals-section {
    grid-template-columns: 1fr;
  }

  .home-subpage-guide {
    grid-template-columns: 1fr;
  }

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

  .shopline-head {
    flex-direction: column;
  }

  .ops-mini-card,
  .ops-signal-card {
    padding: 12px;
  }

  .mobile-bottom-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  .mobile-bottom-nav a {
    font-size: 11px;
  }
}

/* Final compaction pass: match approved command-center information density */
@media (min-width: 1180px) {
  .page-jump-nav {
    display: none;
  }

  .command-summary {
    margin-top: 0;
    padding: 14px 0 10px;
    border-bottom: 1px solid rgba(219,227,234,0.88);
  }

  .command-summary h2 {
    font-size: 23px;
  }

  .hero-section {
    margin-top: 14px;
  }

  .hero-grid {
    grid-template-columns: minmax(420px, 0.9fr) minmax(520px, 1.1fr);
    gap: 12px;
  }

  .hero-today {
    min-height: 150px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    padding: 16px;
  }

  .hero-today-header {
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
  }

  .hero-today-date {
    color: var(--text-secondary);
    opacity: 1;
  }

  .hero-health-badge {
    background: #e9fbf3;
    color: #047857;
  }

  .hero-today-gmv {
    margin-top: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(219,227,234,0.88);
  }

  .hero-today-gmv::before {
    content: "GMV";
    display: block;
    margin-bottom: 4px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 800;
  }

  .hero-today-gmv-value,
  .hero-today-gmv-value.is-pending {
    color: var(--text);
    font-size: 24px;
    line-height: 1.05;
  }

  .hero-today-gmv-sub {
    color: var(--success);
    opacity: 1;
  }

  .hero-today-row {
    margin-top: 10px;
    padding-top: 0;
    border-top: 0;
  }

  .hero-today-stat {
    gap: 4px;
    border-left: 1px solid rgba(219,227,234,0.88);
    padding-left: 14px;
  }

  .hero-today-stat-orders {
    column-gap: 14px;
  }

  .hero-today-stat:first-child {
    border-left: 0;
    padding-left: 0;
  }

  .hero-today-stat-value {
    color: var(--text);
    font-size: 20px;
  }

  .hero-today-stat-label {
    color: var(--text-secondary);
    opacity: 1;
  }

  .hero-today-stat-sub {
    color: var(--muted);
    opacity: 1;
    font-size: 13px;
  }

  .hero-today-footer {
    margin-top: 10px;
    color: var(--text-secondary);
    opacity: 1;
  }

  .home-action-card {
    min-height: 150px;
    padding: 14px;
  }

  .home-action-item {
    min-height: 32px;
    padding: 7px 9px;
  }

  .inventory-home-section {
    margin-top: 14px;
  }
}

@media (max-width: 900px) {
  .page-jump-nav {
    gap: 7px;
    padding-bottom: 4px;
  }

  .hero-today {
    min-height: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    padding: 14px;
  }

  .hero-today-header {
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
  }

  .hero-today-date {
    color: var(--text-secondary);
    opacity: 1;
  }

  .hero-health-badge {
    background: #e9fbf3;
    color: #047857;
  }

  .hero-today-gmv {
    margin-top: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(219,227,234,0.88);
  }

  .hero-today-gmv-value,
  .hero-today-gmv-value.is-pending {
    font-size: 25px;
    color: var(--text);
  }

  .hero-today-gmv-sub {
    color: var(--success);
    opacity: 1;
  }

  .hero-today-row {
    margin-top: 10px;
    padding-top: 0;
    border-top: 0;
  }

  .hero-today-stat-value {
    color: var(--text);
  }

  .hero-today-stat-label,
  .hero-today-footer {
    color: var(--text-secondary);
    opacity: 1;
  }
}

@media (min-width: 1180px) {
  .hero-grid {
    grid-template-columns: minmax(360px, 0.9fr) minmax(240px, 0.62fr) minmax(360px, 1fr);
    gap: 12px;
  }

  .organic-daily-card {
    min-height: 150px;
    padding: 14px;
  }

  .organic-card-value {
    font-size: 28px;
  }
}

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

  .organic-daily-card {
    min-height: 0;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .organic-card-sub {
    flex-direction: column;
    gap: 4px;
  }
}

body[data-page="phase1"] .phase1-page {
  padding-bottom: 92px;
}

body[data-page="phase1"] .dashboard {
  max-width: 1360px;
}

body[data-page="phase1"] .phase1-page-summary {
  margin-top: 12px;
}

@media (min-width: 1180px) {
  body[data-page="phase1"]:not(.shell-ready) .nav-bar {
    padding-left: 0;
  }

  body[data-page="phase1"]:not(.shell-ready) .nav-left {
    display: flex;
  }

  body[data-page="phase1"]:not(.shell-ready) .nav-menu {
    display: flex;
  }

  body[data-page="phase1"]:not(.shell-ready) .dashboard {
    max-width: 1360px;
    margin-left: auto;
    margin-right: auto;
    padding: 18px 24px 90px;
  }
}
