:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --nav-bg: #0b132b;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --gold: #d97706;
  --gold-bg: #fef3c7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --high: #ea580c;
  --high-bg: #ffedd5;
  --med: #b45309;
  --med-bg: #fef3c7;
  --ok: #059669;
  --ok-bg: #ecfdf5;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.55;
}
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
code { background: #f1f5f9; padding: 2px 6px; border-radius: 5px; font-size: 12px; color: #0f172a; }

/* Navbar */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg); color: #fff;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
}
.nav-inner {
  max-width: 1240px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.brand-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, #f59e0b);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.7);
}
.brand-title { font-size: 17px; font-weight: 700; letter-spacing: 0.3px; }
.brand-sub { font-size: 11px; color: #94a3b8; }

.nav-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.nav-tab {
  background: transparent; border: none; color: #cbd5e1;
  padding: 7px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer;
}
.nav-tab:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-tab.active { background: rgba(37, 99, 235, 0.35); color: #fff; font-weight: 600; }

.nav-user { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.role-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.role-free { background: rgba(148, 163, 184, 0.22); color: #e2e8f0; }
.role-vip { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
.role-admin { background: linear-gradient(135deg, #8b5cf6, #6366f1); color: #fff; }

/* Main container */
.main-wrap { max-width: 1240px; margin: 22px auto 60px auto; padding: 0 20px; }

/* Toast（统一显示在屏幕正上方置顶，覆盖弹窗之上，避免漏看） */
.toast {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  background: #0f172a;
  color: #fff;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.34);
  max-width: min(520px, calc(100vw - 32px));
  text-align: center;
  line-height: 1.5;
}
.toast.err { background: #b91c1c; }
.toast.ok { background: #065f46; }

/* Panels & KPIs */
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.compact-panel { padding: 14px 20px; }
.section-title { margin: 0 0 12px 0; font-size: 16.5px; font-weight: 700; }
.panel-head-inline { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.panel-head-inline h3 { margin: 0; font-size: 14.5px; }

.view-quick-bar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  background: var(--surface); border: 1px solid #cbd5e1;
  border-radius: var(--radius); padding: 9px 14px; margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.view-quick-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.view-quick-curr { font-size: 13.5px; font-weight: 700; color: var(--text); }

.contact-grid {
  display: grid; grid-template-columns: minmax(320px, 1.05fr) minmax(300px, 1fr);
  gap: 18px; align-items: start;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.msg-list { display: flex; flex-direction: column; gap: 12px; }
.msg-card {
  border: 1px solid var(--border); border-radius: 10px; padding: 13px 15px;
  background: #f8fafc;
}
.msg-card.unread { border-color: #fcd34d; background: #fffbeb; }
.msg-head {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px; margin-bottom: 6px; font-size: 12.5px;
}
.msg-body { font-size: 13.5px; color: var(--text); white-space: pre-wrap; line-height: 1.55; }
.msg-reply-box {
  margin-top: 10px; padding: 10px 12px; border-radius: 8px;
  background: #eff6ff; border-left: 3px solid var(--primary);
  font-size: 13px; color: #1e3a8a; white-space: pre-wrap;
}
.msg-admin-reply-row {
  display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap;
}
.msg-admin-reply-row .input { flex: 1; min-width: 220px; }

.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px; margin-bottom: 16px;
}
.kpi-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 15px 18px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
}
.kpi-card.active-filter {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.16);
}
.kpi-card.highlight {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-color: #fde68a;
}
.kpi-kicker { font-size: 12.5px; font-weight: 600; color: #475569; }
.kpi-card.highlight .kpi-kicker { color: #92400e; }
.kpi-val { font-size: 25px; font-weight: 800; color: var(--text); line-height: 1.2; display: flex; align-items: baseline; gap: 6px; }
.kpi-unit { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi-card.highlight .kpi-val { color: #b45309; }
.kpi-card.highlight .kpi-unit { color: #92400e; }
.kpi-lbl { font-size: 12px; color: var(--muted); margin-top: 2px; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.kpi-btn-group { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kpi-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600;
  border: 1px solid #bfdbfe; background: #eff6ff; color: var(--primary);
  cursor: pointer; white-space: nowrap; transition: all 0.14s ease;
}
.kpi-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.kpi-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.kpi-btn.kpi-btn-rising {
  border-color: #ddd6fe; background: #f5f3ff; color: #6d28d9;
}
.kpi-btn.kpi-btn-rising:hover,
.kpi-btn.kpi-btn-rising.active {
  background: #7c3aed; color: #fff; border-color: #7c3aed;
}
.kpi-card.highlight .kpi-btn {
  border-color: #fcd34d; background: #fff; color: #b45309;
}
.kpi-card.highlight .kpi-btn:hover {
  background: #d97706; color: #fff; border-color: #d97706;
}
.pill-rising {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  color: #6d28d9; border: 1px solid #c4b5fd; font-weight: 700;
}
.rising-box {
  background: linear-gradient(135deg, #faf5ff 0%, #f5f3ff 100%);
  border: 1px solid #ddd6fe; border-radius: 10px; padding: 14px 16px; margin-bottom: 14px;
}
.rising-box h4 { color: #5b21b6; }
.rising-box .cat-bar-fill { background: linear-gradient(90deg, #7c3aed, #a855f7); }
.pill-plat { background: #0f172a; color: #f8fafc; font-weight: 600; }
.pill-plat-TikTok { background: #111827; color: #f9fafb; }
.pill-plat-Instagram { background: #fdf2f8; color: #be185d; border: 1px solid #fbcfe8; }
.pill-plat-YouTube { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.pill-plat-Facebook { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.pill-plat-Amazon { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.prod-metrics-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  margin-top: 8px; padding: 7px 8px; border-radius: 8px;
  background: #f8fafc; border: 1px solid #e2e8f0; font-size: 11.5px;
}
.prod-metric-cell { display: flex; flex-direction: column; gap: 1px; }
.prod-metric-cell .m-k { color: var(--muted); font-size: 10.5px; }
.prod-metric-cell .m-v { color: var(--text); font-weight: 700; font-size: 12.5px; }
.drawer-metrics-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px;
}
@media (max-width: 600px) { .drawer-metrics-grid { grid-template-columns: repeat(2, 1fr); } }
.drawer-metric-card {
  background: #f8fafc; border: 1px solid var(--border); border-radius: 9px; padding: 9px 10px;
}
.drawer-metric-card .dm-k { font-size: 11px; color: var(--muted); }
.drawer-metric-card .dm-v { font-size: 16px; font-weight: 800; color: var(--text); margin-top: 2px; }

.cat-bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 18px; }
.cat-bar-item { cursor: pointer; }
.cat-bar-top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 4px; }
.cat-bar-track { height: 7px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.cat-bar-fill { height: 100%; background: linear-gradient(90deg, #2563eb, #38bdf8); border-radius: 999px; }

/* Gate Banner for Free users */
.gate-banner {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #f8fafc; border-radius: var(--radius); padding: 18px 22px; margin-bottom: 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border: 1px solid #334155;
}
.gate-banner h4 { margin: 0 0 4px 0; font-size: 15.5px; color: #fbbf24; }
.gate-banner p { margin: 0; font-size: 13px; color: #cbd5e1; }

/* Toolbar */
.toolbar-panel { padding: 16px 20px; }
.toolbar-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search-input { flex: 1 1 240px; }
.input, .select, .textarea {
  padding: 9px 12px; border: 1px solid #cbd5e1; border-radius: 8px;
  font-size: 13.5px; background: #fff; color: var(--text); outline: none;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.textarea { width: 100%; margin-top: 10px; font-family: ui-monospace, Consolas, monospace; }

.toggle-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px;
  border: 1px solid #cbd5e1; border-radius: 8px; background: #f8fafc;
  font-size: 13px; cursor: pointer; user-select: none;
}
.toolbar-actions {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid #f1f5f9;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
}
.action-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* Buttons */
.btn {
  border: none; border-radius: 8px; padding: 9px 16px;
  font-size: 13.5px; font-weight: 600; cursor: pointer; transition: 0.15s;
}
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-xs { padding: 5px 9px; font-size: 12px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-gold { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
.btn-gold:hover { filter: brightness(0.95); }
.btn-dark { background: #1e293b; color: #fff; }
.btn-outline { background: #fff; color: var(--text); border: 1px solid #cbd5e1; }
.btn-outline:hover { background: #f8fafc; border-color: #94a3b8; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: #f1f5f9; color: var(--text); }

/* Intel Cards */
.intel-list { display: flex; flex-direction: column; gap: 12px; }
.intel-card {
  background: var(--surface); border: 1px solid var(--border); border-left: 5px solid #94a3b8;
  border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow);
  cursor: pointer; transition: transform 0.12s, box-shadow 0.12s;
}
.intel-card:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08); }
.intel-card.CRITICAL { border-left-color: var(--danger); }
.intel-card.HIGH { border-left-color: var(--high); }
.intel-card.MEDIUM { border-left-color: var(--med); }
.intel-card.LOW { border-left-color: #64748b; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; align-items: center; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.pill-CRITICAL { background: var(--danger-bg); color: var(--danger); }
.pill-HIGH { background: var(--high-bg); color: var(--high); }
.pill-MEDIUM { background: var(--med-bg); color: var(--med); }
.pill-LOW { background: #f1f5f9; color: #475569; }
.pill-src { background: #e0e7ff; color: #3730a3; }
.pill-cat { background: var(--ok-bg); color: #065f46; }
.pill-cb { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.pill-gold { background: var(--gold-bg); color: #92400e; }
.pill-ai { background: #f3e8ff; color: #6b21a8; }

.intel-title { font-size: 16px; font-weight: 700; margin: 0 0 6px 0; color: var(--text); }
.intel-summary { font-size: 13.5px; color: #334155; margin: 0 0 10px 0; }
.intel-foot {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 12px; color: var(--muted); padding-top: 8px; border-top: 1px dashed #e2e8f0;
}
.lock-tag { color: #b45309; font-weight: 600; }

/* Pagination */
.pagination-bar {
  margin-top: 18px; display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap;
}
.free-limit-card {
  width: 100%; background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius);
  padding: 18px 22px; text-align: center;
}

/* Pricing */
.hero-card {
  background: linear-gradient(135deg, #0b132b 0%, #1e3a8a 100%);
  color: #fff; border-radius: 14px; padding: 28px 30px; margin-bottom: 18px;
}
.hero-card h2 { margin: 10px 0 8px 0; font-size: 22px; }
.hero-card p { margin: 0; color: #cbd5e1; font-size: 14px; max-width: 760px; }

.table-wrap { overflow-x: auto; }
.compare-table, .data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.compare-table th, .compare-table td, .data-table th, .data-table td {
  padding: 11px 12px; border-bottom: 1px solid #f1f5f9; text-align: left;
}
.compare-table th, .data-table th { background: #f8fafc; font-weight: 700; color: #334155; }
.compare-table .vip-col { background: #fffbeb; }

.redeem-panel {
  display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
  border: 1px solid #fde68a; background: #fffdf5;
}
.redeem-form { display: flex; gap: 10px; flex: 1 1 320px; max-width: 440px; }
.redeem-form .input { flex: 1; }

.plans-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px; margin-bottom: 20px;
}
.plan-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 22px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--shadow);
}
.plan-card.featured { border: 2px solid #f59e0b; box-shadow: 0 8px 24px rgba(245, 158, 11, 0.14); }
.plan-price { font-size: 30px; font-weight: 800; margin: 10px 0; color: var(--text); }
.plan-price span { font-size: 13px; font-weight: 400; color: var(--muted); }
.plan-features { padding-left: 18px; font-size: 13.5px; color: #334155; margin: 10px 0 18px 0; }
.plan-features li { margin-bottom: 6px; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; color: #334155; }
.check-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.check-item {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px;
  border: 1px solid var(--border); border-radius: 8px; background: #f8fafc; font-size: 13px; cursor: pointer;
}

/* Admin */
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .admin-grid { grid-template-columns: 1fr; } }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }

/* Drawer & Modal */
.backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.55); z-index: 100; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 95vw);
  background: #fff; z-index: 110; display: flex; flex-direction: column;
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.25);
}
.drawer-head, .modal-head {
  padding: 16px 22px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.drawer-head h3 { margin: 0; font-size: 16px; }
.drawer-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.icon-btn {
  background: #f1f5f9; border: none; width: 32px; height: 32px; border-radius: 8px;
  font-size: 15px; cursor: pointer;
}
.detail-section { margin-bottom: 16px; }
.detail-section h4 { margin: 0 0 6px 0; font-size: 14px; color: #1e3a8a; }
.detail-box { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; }
.opp-box { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 12px 14px; font-size: 13.5px; color: #166534; }
.locked-blur-box {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px dashed #d97706; border-radius: 12px; padding: 20px; text-align: center; margin-top: 14px;
}

.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(440px, 92vw); background: #fff; border-radius: 14px;
  z-index: 120; box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35); overflow: hidden;
}
.auth-switch { display: flex; gap: 6px; }
.auth-tab {
  background: transparent; border: none; padding: 6px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.auth-tab.active { background: #eff6ff; color: var(--primary); }
.modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.demo-box { margin-top: 4px; padding-top: 14px; border-top: 1px dashed var(--border); }
.demo-title { font-size: 12px; color: var(--muted); margin-bottom: 8px; text-align: center; }
.demo-btns { display: flex; flex-direction: column; gap: 6px; }

/* 外贸爆品网格卡片 */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
}
.prod-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); cursor: pointer;
  display: flex; flex-direction: column; transition: transform 0.14s, box-shadow 0.14s;
}
.prod-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1); }
.prod-thumb {
  height: 165px; background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.prod-thumb img { width: 100%; height: 100%; object-fit: cover; }
.prod-thumb-placeholder { font-size: 13px; color: #64748b; padding: 14px; text-align: center; font-weight: 600; }
.hot-badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(15, 23, 42, 0.85); color: #fbbf24;
  padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
}
.price-badge {
  position: absolute; top: 10px; right: 10px;
  background: #059669; color: #fff;
  padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800;
}
.price-badge.locked { background: #b45309; }
.prod-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; }
.prod-title { margin: 0; font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.4; }
.prod-desc { margin: 0; font-size: 12.5px; color: #475569; }
.prod-foot {
  padding-top: 8px; border-top: 1px dashed #e2e8f0;
  display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted);
}

/* 快捷芯片与汇率条 */
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip-btn {
  background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 999px;
  padding: 4px 11px; font-size: 12px; color: #334155; cursor: pointer;
}
.chip-btn:hover { background: #e0e7ff; border-color: #818cf8; color: #1e3a8a; }

.fx-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; }
.fx-tile {
  background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
}
.fx-tile .cur { font-size: 12px; color: var(--muted); font-weight: 600; }
.fx-tile .rate { font-size: 18px; font-weight: 800; color: #1e3a8a; }

/* 报价计算器布局 */
.calc-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 18px; align-items: start; }
@media (max-width: 880px) { .calc-layout { grid-template-columns: 1fr; } }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.metric-box { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.metric-box.profit-pos { background: #ecfdf5; border-color: #a7f3d0; }
.metric-box.profit-neg { background: #fef2f2; border-color: #fecaca; }
.metric-box .mv { font-size: 20px; font-weight: 800; }
.metric-box .mk { font-size: 12px; color: var(--muted); }

/* 抽屉内实拍图与关联合规预警 */
.img-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.img-strip img { height: 110px; max-width: 180px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.rel-alert-row {
  padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 8px; background: #fff; cursor: pointer;
}
.rel-alert-row:hover { border-color: var(--primary); background: #f8fafc; }
.comtrade-bar-row { margin-bottom: 10px; }
.comtrade-bar-row.is-china strong { color: #b45309; }
.comtrade-bar-row.is-china .cat-bar-fill { background: linear-gradient(90deg, #f59e0b, #dc2626); }

/* 10国切换条 */
.country-strip { display: flex; flex-wrap: wrap; gap: 7px; }
.country-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px; border-radius: 999px; border: 1px solid #cbd5e1;
  background: #f8fafc; color: #334155; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.country-pill:hover { border-color: var(--primary); background: #eff6ff; color: #1e3a8a; }
.country-pill.active { background: #1e3a8a; border-color: #1e3a8a; color: #fff; }
.country-pill .cnt {
  background: rgba(15, 23, 42, 0.1); padding: 1px 6px; border-radius: 999px; font-size: 11px;
}
.country-pill.active .cnt { background: rgba(255, 255, 255, 0.22); color: #fff; }

/* AI 跨模块联合分析高亮框 */
.joint-panel {
  background: linear-gradient(135deg, #f8faff 0%, #eef2ff 100%);
  border: 1px solid #c7d2fe; border-radius: 12px; padding: 14px 16px; margin-bottom: 16px;
}
.joint-panel h4 { margin: 0 0 10px 0; color: #312e81; font-size: 14.5px; }
.joint-item { background: #fff; border: 1px solid #e0e7ff; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; font-size: 13px; }
.joint-item:last-child { margin-bottom: 0; }
.joint-item strong { display: block; margin-bottom: 3px; color: #1e3a8a; }

/* 神经网络潜力分徽章与归因面板 */
.nn-pill-S { background: linear-gradient(135deg, #dc2626, #f59e0b); color: #fff; }
.nn-pill-A { background: #dbeafe; color: #1e40af; }
.nn-pill-B { background: #f1f5f9; color: #475569; }
.nn-box {
  background: linear-gradient(135deg, #f0fdf4 0%, #eff6ff 100%);
  border: 1px solid #bfdbfe; border-radius: 12px; padding: 14px 16px; margin-bottom: 16px;
}
.nn-box h4 { margin: 0 0 8px 0; color: #1e3a8a; font-size: 14.5px; }
.nn-factor-row { margin-bottom: 8px; }
.btn-alipay { background: #1677ff; color: #fff; border: 1px solid #1677ff; }
.btn-alipay:hover { background: #0958d9; border-color: #0958d9; }
.plan-pay-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 12px; }
.pay-qr-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 16px; border: 1px dashed #cbd5e1; border-radius: 12px; background: #f8fafc; margin: 10px 0;
}
.pay-qr-img { width: 210px; height: 210px; object-fit: contain; border-radius: 8px; background: #fff; padding: 6px; border: 1px solid var(--border); }
.audit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.audit-item { border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; background: #f8fafc; font-size: 12.5px; }
.audit-item.pass { border-color: #bbf7d0; background: #f0fdf4; }
.audit-item.warn { border-color: #fde68a; background: #fffbeb; }
.audit-item.danger { border-color: #fecaca; background: #fef2f2; }
.site-footer {
  margin-top: 32px; border-top: 1px solid var(--border); background: var(--surface);
  padding: 18px 20px; color: var(--muted); font-size: 12px;
}
.footer-inner { max-width: 1320px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; }
.legal-link { color: var(--primary); text-decoration: none; font-weight: 600; }
.legal-link:hover { text-decoration: underline; }
.footer-note { line-height: 1.65; color: #64748b; }
