﻿/* 濡ュΕ閫?路 瀹㈡埛360掳鐢诲儚涓撶敤鏍峰紡 */
:root {
  --brand: #2563eb;
  --brand-hover: #1d4ed8;
  --brand-light: #eff6ff;
  --brand-border: #bfdbfe;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #334155;
  --text-dim: #64748b;
  --line-border: #e2e8f0;
  --line-faint: #f1f5f9;
  --green: #10b981;
  --green-bg: #ecfdf5;
  --green-border: #a7f3d0;
  --yellow: #f59e0b;
  --yellow-bg: #fffbeb;
  --yellow-border: #fde68a;
  --red: #ef4444;
  --red-bg: #fef2f2;
  --red-border: #fecaca;
  --purple: #8b5cf6;
  --purple-bg: #f5f3ff;
  --purple-border: #ddd6fe;
  --indigo: #4f46e5;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* 椤堕儴瀵艰埅鏉?*/
.top-header {
  height: 60px;
  background: #ffffff;
  border-bottom: 1px solid var(--line-border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.header-left { display: flex; align-items: center; gap: 16px; }
.brand-title { font-size: 16px; font-weight: 700; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
.brand-badge { font-size: 11px; font-weight: 600; background: var(--brand-light); color: var(--brand); padding: 2px 8px; border-radius: 4px; border: 1px solid var(--brand-border); }
.header-links { display: flex; align-items: center; gap: 8px; }
.nav-btn { font-size: 13px; padding: 6px 14px; border-radius: 6px; text-decoration: none; color: var(--text-muted); border: 1px solid var(--line-border); background: #ffffff; transition: all 0.15s ease; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.nav-btn:hover { background: var(--line-faint); color: var(--brand); border-color: var(--brand-border); }
.nav-btn.primary { background: var(--brand); color: #ffffff; border-color: var(--brand); }
.nav-btn.primary:hover { background: var(--brand-hover); }

/* 蹇嵎鍒囨崲閫夋嫨鏍?*/
.switcher-bar { background: #ffffff; border-bottom: 1px solid var(--line-border); padding: 10px 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.switcher-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.switcher-label { font-size: 12px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.pill-btn { font-size: 12px; padding: 5px 12px; border-radius: 20px; border: 1px solid var(--line-border); background: var(--bg-main); color: var(--text-muted); cursor: pointer; font-weight: 500; transition: all 0.15s ease; }
.pill-btn:hover { background: var(--brand-light); border-color: var(--brand); color: var(--brand); }
.pill-btn.active { background: var(--brand); border-color: var(--brand); color: #ffffff; font-weight: 600; box-shadow: 0 2px 4px rgba(37,99,235,0.2); }
.client-select { font-size: 13px; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--line-border); background: #ffffff; color: var(--text-main); outline: none; min-width: 260px; cursor: pointer; }
.client-select:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(37,99,235,0.15); }

.search-box-wrap { position: relative; width: 280px; }
.search-input { width: 100%; font-size: 13px; padding: 6px 12px 6px 32px; border-radius: 6px; border: 1px solid var(--line-border); outline: none; background: #ffffff; color: var(--text-main); }
.search-input:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(37,99,235,0.15); }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-dim); pointer-events: none; }
.search-results-dropdown { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: #ffffff; border: 1px solid var(--line-border); border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); max-height: 320px; overflow-y: auto; z-index: 100; display: none; }
.search-item { padding: 8px 12px; font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-faint); }
.search-item:hover { background: var(--brand-light); }

/* 涓诲鍣?*/
.main-container { flex: 1; padding: 24px; max-width: 1440px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 24px; }



/* 鍗＄墖瀹瑰櫒 */
.card { background: var(--bg-card); border: 1px solid var(--line-border); border-radius: 10px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.03); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line-faint); }
.card-title { font-size: 15px; font-weight: 700; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
.card-subtitle { font-size: 12px; color: var(--text-dim); font-weight: normal; }

/* 鏈烘瀯绠＄悊浜哄熀纭€妗ｆ鍗＄墖 (Level 1) */
.identity-hero { background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%); border: 1px solid var(--line-border); border-radius: 12px; padding: 24px; box-shadow: 0 2px 6px rgba(0,0,0,0.04); }
.id-top-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.manager-name { font-size: 22px; font-weight: 800; color: var(--text-main); letter-spacing: -0.3px; display: flex; align-items: center; gap: 12px; }
.meta-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.tag { font-size: 12px; padding: 3px 10px; border-radius: 6px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.tag-blue { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.tag-purple { background: #f3e8ff; color: #6b21a8; border: 1px solid #e9d5ff; }
.tag-amber { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.tag-gray { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.tag-green { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.tag-red { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* 4D KPI 缃戞牸 */
.kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
@media (max-width: 1024px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.kpi-card { background: #ffffff; border: 1px solid var(--line-border); border-radius: 8px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.kpi-card::before { content: ""; position: absolute; top: 0; left: 0; bottom: 0; width: 4px; background: var(--brand); }
.kpi-card.green::before { background: var(--green); }
.kpi-card.yellow::before { background: var(--yellow); }
.kpi-card.red::before { background: var(--red); }
.kpi-card.purple::before { background: var(--purple); }
.kpi-label { font-size: 12px; color: var(--text-dim); font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.kpi-value { font-size: 24px; font-weight: 800; color: var(--text-main); display: flex; align-items: baseline; gap: 4px; }
.kpi-unit { font-size: 13px; font-weight: 500; color: var(--text-dim); }
.kpi-sub { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }

/* 涓熀鍗忓畼鏂瑰妗堟。妗堟ā鍧楅珮绾ф牱寮?*/
.amac-console-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
}
@media (max-width: 1024px) {
  .amac-console-layout {
    grid-template-columns: 1fr;
  }
}
.amac-col-cert {
  background: #f8fafc;
  border: 1px solid var(--line-border);
  border-radius: 8px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}
.amac-col-funnel {
  background: #ffffff;
  border: 1px solid var(--line-border);
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}
.amac-cert-header { display: flex; align-items: center; justify-content: space-between; }
.amac-cert-label { font-size: 11px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.amac-cert-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.amac-cert-badge.green { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.amac-cert-badge.red { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.amac-cert-details { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.amac-cert-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-faint); }
.amac-cert-row:last-child { border-bottom: none; }
.amac-cert-k { color: var(--text-dim); font-size: 12px; }
.amac-cert-v { font-weight: 600; color: var(--text-main); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.amac-prompt-item { background: #ffffff; border: 1px solid #fed7aa; border-left: 3px solid #f97316; border-radius: 6px; padding: 8px 12px; font-size: 12px; line-height: 1.5; color: #9a3412; }

.amac-funnel-top { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.amac-funnel-metric { background: #f8fafc; border: 1px solid var(--line-border); border-radius: 6px; padding: 10px 14px; text-align: center; }
.amac-funnel-title { font-size: 11px; color: var(--text-dim); font-weight: 600; margin-bottom: 4px; }
.amac-funnel-val { font-size: 20px; font-weight: 800; color: var(--text-main); }
.amac-funnel-unit { font-size: 12px; font-weight: normal; color: var(--text-dim); margin-left: 2px; }

.amac-sankey-wrap { display: flex; flex-direction: column; gap: 8px; }
.amac-sankey-labels { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; }
.amac-sankey-bar { height: 14px; border-radius: 7px; background: #e2e8f0; overflow: hidden; display: flex; }
.sankey-seg-sys { background: #2563eb; transition: width 0.4s ease; }
.sankey-seg-diff { background: #f59e0b; transition: width 0.4s ease; }
.sankey-seg-cleared { background: #cbd5e1; transition: width 0.4s ease; }

.amac-breakdown-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; font-size: 12px; }
@media (max-width: 768px) { .amac-breakdown-chips { grid-template-columns: 1fr; } }
.amac-chip { background: #ffffff; border: 1px solid var(--line-border); border-radius: 6px; padding: 8px 12px; display: flex; align-items: center; gap: 8px; }
.amac-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-sys { background: #2563eb; }
.dot-diff { background: #f59e0b; }
.dot-cleared { background: #94a3b8; }

/* 寮傚父褰掑洜涓庡缃缓璁?Banner */
.diagnosis-banner { background: #ffffff; border: 1px solid var(--line-border); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.02); }
.diag-title-row { display: flex; align-items: center; justify-content: space-between; }
.diag-title { font-size: 15px; font-weight: 700; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
.diag-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .diag-grid { grid-template-columns: 1fr; } }
.diag-card { border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 1.5; }
.diag-card.blue { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; }
.diag-card.amber { background: #fffbeb; border: 1px solid #fde68a; color: #78350f; }
.diag-card.red { background: #fef2f2; border: 1px solid #fecaca; color: #7f1d1d; }
.diag-card.green { background: #ecfdf5; border: 1px solid #a7f3d0; color: #064e3b; }
.diag-head { font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: space-between; }
.action-bar { background: #f8fafc; border: 1px solid var(--line-border); border-left: 4px solid var(--brand); border-radius: 6px; padding: 12px 16px; font-size: 13px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.action-text { color: var(--text-main); line-height: 1.5; }
.action-text strong { color: var(--brand); }

/* =========================================================================
   绗簩灞傦細鏃椾笅浜у搧鐭╅樀涓庝骇鍝佷俊鎭?(Level 2: Products Matrix)
   ========================================================================= */
.prod-stat-banner {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  background: #f8fafc;
  border: 1px solid var(--line-border);
  border-radius: 8px;
  padding: 12px 18px;
  margin-top: 6px;
  margin-bottom: 14px;
}
@media (max-width: 1024px) {
  .prod-stat-banner { grid-template-columns: repeat(3, 1fr); }
}
.prod-stat-item { display: flex; flex-direction: column; gap: 4px; }
.prod-stat-label { font-size: 11px; color: var(--text-dim); }
.prod-stat-val { font-size: 18px; font-weight: 700; color: var(--text-main); }

.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.filter-input { font-size: 12px; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--line-border); outline: none; background: #ffffff; }
.filter-input:focus { border-color: var(--brand); }

.table-responsive { width: 100%; overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
table.data-table th { background: var(--line-faint); color: var(--text-dim); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line-border); white-space: nowrap; }
table.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-faint); color: var(--text-muted); white-space: nowrap; }
table.data-table tr:hover td { background: #f8fafc; }

.product-row-clickable { cursor: pointer; transition: background 0.15s ease; }
.product-row-clickable:hover { background: #f8fafc; }
.product-row-clickable.expanded { background: #eff6ff !important; }

.drilldown-btn-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--brand-border);
  background: #ffffff;
  color: var(--brand);
  font-weight: 600;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.drilldown-btn-toggle:hover {
  background: var(--brand-light);
}
.product-row-clickable.expanded .drilldown-btn-toggle {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}

/* =========================================================================
   浜у搧鏄庣粏鍗＄墖 (Product Detail Card)
   ========================================================================= */
.product-drilldown-row td {
  padding: 0 !important;
  background: #f8fafc;
  border-bottom: 2px solid #93c5fd;
}
.product-drilldown-card {
  padding: 18px 24px;
  border-left: 5px solid var(--brand);
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

/* 浜у搧灞炴€фí鏉?*/
.drilldown-lineage-ribbon {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--line-border);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  flex-wrap: wrap;
}
.lineage-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.lineage-step.product-step { color: var(--text-main); font-size: 14px; }

/* 涓夊ぇ鏍稿績鏄庣粏鍒?(Manager, Distributor, Custodian) */
.p-drilldown-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  gap: 16px;
}
@media (max-width: 1024px) {
  .p-drilldown-grid { grid-template-columns: 1fr; }
}

.p-drilldown-col {
  background: #ffffff;
  border: 1px solid var(--line-border);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.p-drilldown-col.col-manager { border-top: 3px solid #2563eb; }
.p-drilldown-col.col-distributor { border-top: 3px solid #8b5cf6; }
.p-drilldown-col.col-custodian { border-top: 3px solid #059669; }

.p-col-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-faint);
}
.p-col-body {
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 浠ｉ攢娓犻亾璁㈠崟鏄庣粏鍒楄〃 */
.agent-orders-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
}
.agent-order-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid var(--line-border);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 11px;
}
.agent-name-text {
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 190px;
}
.agent-order-count {
  font-weight: 700;
  color: var(--purple);
  white-space: nowrap;
}

.p-drilldown-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-border);
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 8px;
}

/* =========================================================================
   绗洓灞傦細杈呭姪缁忚惀褰掑洜涓庣敓鎬佽仛鍚?(Level 4: Supporting Macro Analytics)
   ========================================================================= */
.billing-section { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 20px; }
@media (max-width: 1024px) { .billing-section { grid-template-columns: 1fr; } }
.chart-box { width: 100%; height: 260px; position: relative; }
.chart-legend { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-color { width: 12px; height: 12px; border-radius: 3px; }

.proof-summary-box { background: #f1f5f9; border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.proof-metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.proof-metric-cell { background: #ffffff; border: 1px solid var(--line-border); border-radius: 6px; padding: 10px; text-align: center; }
.proof-metric-title { font-size: 11px; color: var(--text-dim); margin-bottom: 4px; }
.proof-metric-val { font-size: 16px; font-weight: 700; color: var(--text-main); }
.proof-conclusion { background: #ffffff; border-left: 3px solid var(--brand); padding: 10px 14px; border-radius: 4px; font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.two-col-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .two-col-grid { grid-template-columns: 1fr; } }

.channel-list { display: flex; flex-direction: column; gap: 10px; }
.channel-item { background: #f8fafc; border: 1px solid var(--line-border); border-radius: 6px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; }
.channel-name { font-weight: 600; font-size: 13px; color: var(--text-main); }
.channel-meta { font-size: 12px; color: var(--text-dim); display: flex; align-items: center; gap: 12px; }

.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; line-height: 1.2; }
.badge-green { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.badge-yellow { background: var(--yellow-bg); color: #d97706; border: 1px solid var(--yellow-border); }
.badge-red { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }
.badge-blue { background: var(--brand-light); color: var(--brand); border: 1px solid var(--brand-border); }
.badge-gray { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }

/* 鎷熺湡鍏夊鎸囩ず鐏?(缁跨伅銆侀粍鐏€佺孩鐏? */
.lamp-indicator {
  display: inline-block;
  border-radius: 50%;
  position: relative;
  vertical-align: middle;
  flex-shrink: 0;
  box-sizing: border-box;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.lamp-indicator:hover { transform: scale(1.15); }
.lamp-indicator-lg { width: 20px; height: 20px; }
.lamp-indicator-md { width: 14px; height: 14px; }
.lamp-indicator-sm { width: 10px; height: 10px; }

.lamp-indicator.lamp-green {
  background: radial-gradient(circle at 35% 35%, #86efac 0%, #22c55e 55%, #15803d 100%);
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1.5px #16a34a, 0 0 8px rgba(34, 197, 94, 0.6);
}
.lamp-indicator.lamp-yellow {
  background: radial-gradient(circle at 35% 35%, #fef08a 0%, #eab308 55%, #a16207 100%);
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1.5px #d97706, 0 0 8px rgba(234, 179, 8, 0.6);
}
.lamp-indicator.lamp-red {
  background: radial-gradient(circle at 35% 35%, #fca5a5 0%, #ef4444 55%, #b91c1c 100%);
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1.5px #dc2626, 0 0 8px rgba(239, 68, 68, 0.6);
}
.lamp-indicator::after {
  content: "";
  position: absolute;
  top: 15%;
  left: 20%;
  width: 32%;
  height: 32%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  pointer-events: none;
}

.loading-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,0.7); backdrop-filter: blur(2px); display: none; align-items: center; justify-content: center; z-index: 200; font-size: 14px; font-weight: 600; color: var(--brand); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--brand-light); border-top-color: var(--brand); border-radius: 50%; animation: spin 0.8s linear infinite; margin-right: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }


/* ==========================================
   妯″潡鍒嗘瀵艰埅 Tab 鏍峰紡 (鍥涚淮楂樺唴鑱氬竷灞€)
   ========================================== */
.module-nav-bar {
  display: flex;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--line-border);
  border-radius: 8px;
  padding: 6px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  position: sticky;
  top: 60px;
  z-index: 40;
}
.module-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.module-tab-btn:hover {
  color: var(--brand);
  background: var(--brand-light);
}
.module-tab-btn.active {
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
}
.module-section {
  scroll-margin-top: 130px;
  margin-bottom: 22px;
}

/* 4列 Hero KPI 网格 (去除冗余综合分卡片) */
.hero-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 18px;
}
@media (max-width: 1024px) {
  .hero-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .hero-kpi-grid { grid-template-columns: 1fr; }
}

/* 统一托管商机底册样式增强 */
.badge-orange { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.badge-purple { background: var(--purple-bg); color: var(--purple); border: 1px solid var(--purple-border); }

