/* ===== 智蛋AI 看板样式：清新浅色 + 侧边栏 + 自适应 ===== */
:root {
  --bg: #f4f7f5;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e9e7;
  --primary: #16a34a;
  --primary-soft: #eaf8ef;
  --up: #e5484d;
  --down: #18a058;
  --radius: 16px;
  --shadow: 0 1px 3px rgba(16, 42, 27, .06), 0 8px 24px rgba(16, 42, 27, .05);
  --sb-w: 230px;
  --sb-w-collapsed: 68px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }

/* ===== 左侧侧边栏 ===== */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sb-w);
  background: #fff; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 60;
  transition: width .22s cubic-bezier(.2,.8,.3,1); overflow: hidden;
}
.sidebar.collapsed { width: var(--sb-w-collapsed); }
.sidebar.collapsed .sb-name,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .sb-bell-label,
.sidebar.collapsed .sb-login span { display: none; }
.sidebar.collapsed .sb-brand { justify-content: center; padding: 18px 0; }
.sidebar.collapsed .sb-bell,
.sidebar.collapsed .sb-login,
.sidebar.collapsed .sb-user { justify-content: center; padding-left: 0; padding-right: 0; gap: 0; }
.sidebar.collapsed .sb-bell { padding: 9px 0; }
.sidebar.collapsed .sb-login { padding: 9px 0; }
.sidebar.collapsed .sb-bell .dot { right: 10px; top: 4px; }

.sb-brand {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
  height: 64px; flex-shrink: 0;
}
.sb-logo { width: 28px; height: 28px; color: var(--primary); flex-shrink: 0; }
.sb-name { font-size: 19px; font-weight: 700; white-space: nowrap; display: flex; flex-direction: column; line-height: 1.15; }
.sb-sub { font-size: 11px; font-weight: 400; color: var(--muted); letter-spacing: 1px; }
.sb-collapse {
  position: fixed; left: calc(var(--sb-w) - 13px); top: 20px; z-index: 70;
  width: 26px; height: 44px; border: 1px solid var(--border); background: #fff;
  border-radius: 8px; cursor: pointer; color: var(--muted); display: flex;
  align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  transition: left .22s cubic-bezier(.2,.8,.3,1), color .15s, border-color .15s, background .15s;
}
.sidebar.collapsed .sb-collapse { left: calc(var(--sb-w-collapsed) - 13px); }
.sb-collapse:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.sb-collapse svg { width: 16px; height: 16px; transition: transform .22s; }
.sidebar.collapsed .sb-collapse svg { transform: rotate(180deg); }

.sb-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px; font-size: 14px; color: var(--text);
  cursor: pointer; transition: all .15s; white-space: nowrap; position: relative;
}
.nav-item svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--muted); transition: color .15s; }
.nav-item span { transition: opacity .18s; }
.nav-item:hover { background: var(--bg); }
.nav-item:hover svg { color: var(--primary); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-item.active svg { color: var(--primary); }
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 22px; background: var(--primary); border-radius: 0 4px 4px 0;
}
.nav-item.ext { color: var(--muted); }
.nav-item.ext:hover { color: var(--primary); }
.sb-divider { height: 1px; background: var(--border); margin: 8px 4px; }

.sb-foot { padding: 12px 12px 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.sb-bell {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: 10px; cursor: pointer; color: var(--muted); transition: all .15s;
  position: relative; white-space: nowrap;
}
.sb-bell:hover { background: var(--bg); color: var(--primary); }
.sb-bell svg { width: 18px; height: 18px; flex-shrink: 0; }
.sb-bell-label { font-size: 14px; transition: opacity .18s; }
.sb-bell .dot {
  position: absolute; top: 6px; right: 8px; min-width: 16px; height: 16px;
  border-radius: 999px; background: var(--up); color: #fff;
  font-size: 10px; font-weight: 600; display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.sb-login {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1.5px solid var(--primary); border-radius: 10px; background: #fff;
  color: var(--primary); font-size: 14px; cursor: pointer; white-space: nowrap; transition: all .15s;
}
.sb-login:hover { background: var(--primary); color: #fff; }
.sb-login svg { width: 18px; height: 18px; flex-shrink: 0; }
.sb-login span { transition: opacity .18s; }
.sb-user {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 12px; border-radius: 10px; background: var(--primary-soft);
  color: var(--primary); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.sb-user:hover { opacity: .85; }

/* 移动端遮罩 */
.sb-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .2s; }
.sb-overlay.show { opacity: 1; pointer-events: auto; }

/* 移动端顶部 */
.m-header { display: none; position: sticky; top: 0; z-index: 50; align-items: center; gap: 12px; padding: 0 16px; height: 56px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.m-burger { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text); }
.m-burger svg { width: 20px; height: 20px; }
.m-title { font-size: 16px; font-weight: 600; color: var(--text); }

/* ===== 主内容区 ===== */
.main {
  margin-left: var(--sb-w); padding: 24px 28px 48px; min-height: 100vh;
  transition: margin-left .22s cubic-bezier(.2,.8,.3,1);
  max-width: calc(100vw - var(--sb-w));
}
.sidebar.collapsed ~ .main { margin-left: var(--sb-w-collapsed); max-width: calc(100vw - var(--sb-w-collapsed)); }

.page-head { margin-bottom: 18px; }
.page-head h1 { font-size: 24px; font-weight: 700; }
.page-head .page-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }

.page-pane { max-width: 1360px; margin: 0 auto; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; margin-bottom: 16px;
}
.card h2 { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ===== KPI ===== */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.kpi { padding: 18px 22px; }
.kpi .label { font-size: 13px; color: var(--muted); }
.kpi .value { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 4px; }
.kpi .value small { font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.kpi .delta { font-size: 13px; margin-top: 4px; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--muted); }

/* ===== 地图 + 榜单 ===== */
.grid-map { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; align-items: start; }
#map { height: calc((100vh - 200px) * 0.667); min-height: 460px; }
.grid-map > .card:last-child { height: calc((100vh - 200px) * 0.667 + 100px); display: flex; flex-direction: column; }
.rank-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.rank-filter { display: flex; gap: 6px; flex: none; }
.rf-item { font-size: 12px; color: var(--muted); border: 1px solid var(--border); padding: 4px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: all .15s; }
.rf-item:hover { color: var(--primary); border-color: var(--primary); }
.rf-item.active { color: #fff; background: var(--primary); border-color: var(--primary); }
.rank-list { margin-top: 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; padding-right: 4px; }
.rank-list::-webkit-scrollbar { width: 6px; }
.rank-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.rank-list::-webkit-scrollbar-thumb:hover { background: var(--muted); }
.rank-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: 14px; }
.rank-item:hover { background: var(--bg); }
.rank-item .no { width: 22px; height: 22px; border-radius: 6px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); flex: none; }
.rank-item.top .no { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.rank-item .name { flex: 1; }
.rank-item .price { font-variant-numeric: tabular-nums; font-weight: 600; }
.rank-item .fav-star { cursor: pointer; color: #d1d5db; font-size: 15px; transition: transform .15s; }
.rank-item .fav-star.on { color: #f59e0b; }
.rank-item .fav-star:hover { transform: scale(1.2); }

/* ===== 走势图 ===== */
.trend-head { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; }
#trend { height: 360px; margin-top: 8px; }
.forecast-tip { margin-top: 8px; font-size: 13px; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 8px 12px; }
select { padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font-size: 14px; color: var(--text); outline: none; }
select:focus { border-color: var(--primary); }
.trend-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.trend-selects { display: flex; gap: 8px; flex: 1 1 auto; min-width: 200px; }
.trend-selects select { flex: 1; min-width: 0; }
.view-btn { padding: 6px 14px; border: 1.5px solid var(--border); border-radius: 20px; background: #fff; color: var(--muted); font-size: 12.5px; cursor: pointer; transition: all .15s; }
.view-btn:hover { color: var(--text); border-color: var(--primary); }
.view-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 500; }

/* ===== 供需与成本分析 ===== */
.supply-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
#extra-kpis { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
#extra-kpis .sk-item { flex: 1 1 calc(25% - 9px); min-width: 150px; }
.sk-item { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.sk-item .l { font-size: 12px; color: var(--muted); }
.sk-item .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.sk-item .v small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 3px; }
.sk-item .d { font-size: 12px; margin-top: 2px; }
.grid-supply { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
.grid-supply > div { height: 280px; }
@media (max-width: 768px) {
  .grid-supply { grid-template-columns: 1fr; }
  .grid-supply > div { border-bottom: 1px dashed var(--border); padding-bottom: 14px; margin-bottom: 14px; height: 240px; }
  .grid-supply > div:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
  .grid-supply + .grid-supply { border-top: 1px dashed var(--border); padding-top: 14px; margin-top: 0; }
}

/* ===== AI 日报 ===== */
.badge { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 500; }
.badge.mock { background: #fff7e6; color: #d48806; }
.report-body { margin-top: 14px; font-size: 15px; }
.report-body h2 {
  font-size: 16px; margin: 26px 0 12px; color: var(--primary); font-weight: 700;
  display: inline-block; padding: 6px 16px;
  background: var(--primary-soft); border: 1px solid var(--primary);
  border-radius: 8px;
}
.report-body h2:first-child { margin-top: 0; }
.report-body p { margin: 6px 0; }
.insights-head { display: flex; align-items: center; gap: 16px; margin-top: 18px; padding-top: 16px; border-top: 1.5px dashed var(--border); }
.insights-tabs { display: flex; gap: 8px; }
.insights-tabs span { padding: 5px 14px; cursor: pointer; border-radius: 16px; font-size: 12.5px; color: var(--muted); background: #f4f7f5; transition: all .15s; }
.insights-tabs span:hover { color: var(--text); }
.insights-tabs span.active { background: var(--primary); color: #fff; font-weight: 500; }
.insight-body { margin-top: 12px; }
.insight-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-bottom: 12px; }
.ins-item { padding: 12px 14px; background: #f8faf9; border-radius: 10px; border: 1px solid var(--border); }
.ins-item .il { font-size: 11.5px; color: var(--muted); }
.ins-item .iv { font-size: 15px; font-weight: 600; color: var(--text); margin-top: 3px; }
.insight-summary { padding: 12px 16px; background: var(--primary-soft); border-left: 3px solid var(--primary); border-radius: 0 10px 10px 0; font-size: 13.5px; color: var(--text); line-height: 1.7; }

/* ===== AI 问答 ===== */
.chat-box { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.chat-history { max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 12px; font-size: 14px; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.msg.ai { align-self: flex-start; background: var(--bg); border-bottom-left-radius: 4px; }
.chat-input { display: flex; gap: 10px; }
.chat-input input { flex: 1; padding: 11px 14px; border: 1px solid var(--border); border-radius: 12px; font-size: 14px; outline: none; }
.chat-input input:focus { border-color: var(--primary); }
button.send { padding: 0 22px; border: none; border-radius: 12px; cursor: pointer; background: var(--primary); color: #fff; font-size: 14px; font-weight: 500; }
button.send:disabled { opacity: .5; cursor: wait; }
.quick-q { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-q span { font-size: 13px; color: var(--muted); border: 1px solid var(--border); padding: 4px 12px; border-radius: 999px; cursor: pointer; }
.quick-q span:hover { color: var(--primary); border-color: var(--primary); }

/* ===== 资讯 ===== */
.news-list { display: flex; flex-direction: column; gap: 18px; margin-top: 14px; }
.news-cat { }
.news-cat-title {
  font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 10px;
  padding-left: 12px; position: relative;
}
.news-cat-title::before {
  content: ""; position: absolute; left: 0; top: 3px; bottom: 3px;
  width: 3px; background: var(--primary); border-radius: 2px;
}
.news-cat-count {
  font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px;
  background: var(--bg); padding: 2px 8px; border-radius: 999px;
}
.news-cat-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.news-item {
  border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
  cursor: pointer; transition: all .15s;
}
.news-item:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(22,163,74,.08); }
.news-item .t { font-size: 15px; font-weight: 600; line-height: 1.4; }
.news-item .meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.news-item .sum { margin-top: 8px; font-size: 13px; color: var(--primary); background: var(--primary-soft); border-radius: 8px; padding: 8px 10px; }
.news-item .sum::before { content: "AI 摘要 · "; font-weight: 600; }
.news-detail {
  margin-top: 8px; font-size: 13px; color: #374151; line-height: 1.6;
  max-height: 0; overflow: hidden; transition: max-height .25s, padding .25s;
  padding: 0 10px; background: #f9fafb; border-radius: 8px;
}
.news-item.expanded .news-detail {
  max-height: 200px; padding: 10px; margin-top: 10px;
}
.news-item.expanded { border-color: var(--primary); background: var(--primary-soft); }
.news-item .toggle-hint {
  font-size: 12px; color: var(--primary); margin-top: 6px; text-align: right;
}
.news-item.expanded .toggle-hint::before { content: "收起 ↑"; }
.news-item:not(.expanded) .toggle-hint::before { content: "展开详情 ↓"; }

/* ===== 电商价格对比 ===== */
.ecom-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.ecom-sub-info { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.ecom-sub-info b { color: var(--primary); }
.ecom-item { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.ecom-item.cheapest { border-color: var(--primary); background: var(--primary-soft); }
.pf-badge { flex: none; width: 64px; text-align: center; color: #fff; font-size: 12px; font-weight: 600; border-radius: 8px; padding: 5px 0; }
.ecom-main { flex: 1; min-width: 0; }
.ecom-main .t { font-size: 13px; font-weight: 600; }
.ecom-main .m { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ecom-main .etag { font-size: 11px; color: #d48806; background: #fff7e6; border-radius: 6px; padding: 1px 6px; margin-left: 6px; font-weight: 400; }
.ecom-price { text-align: right; flex: none; }
.ecom-price .p { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ecom-price .p small { font-size: 12px; color: var(--muted); font-weight: 400; }
.ecom-price .c { font-size: 12px; }

/* ===== 页脚 ===== */
.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 28px 0 6px; }

/* ===== 预警抽屉 ===== */
.drawer-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .35); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 90; }
.drawer-mask.show { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 380px; max-width: 92vw; background: #fff; box-shadow: -8px 0 32px rgba(15, 23, 42, .12); transform: translateX(100%); transition: transform .25s ease; z-index: 91; display: flex; flex-direction: column; }
.drawer.show { transform: translateX(0); }
.drawer .d-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.drawer .d-head h3 { font-size: 16px; }
.drawer .d-close { cursor: pointer; color: var(--muted); font-size: 20px; line-height: 1; border: none; background: none; }
.drawer .d-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.drawer h4 { font-size: 14px; margin: 14px 0 10px; color: var(--text); }
.drawer h4:first-child { margin-top: 0; }
.alert-form { display: flex; flex-direction: column; gap: 10px; }
.alert-form .row { display: flex; gap: 8px; }
.alert-form select, .alert-form input { padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; outline: none; background: #fff; flex: 1; min-width: 0; }
.alert-form select:focus, .alert-form input:focus { border-color: var(--primary); }
.alert-form button { padding: 10px; border: none; border-radius: 10px; cursor: pointer; background: var(--primary); color: #fff; font-size: 14px; font-weight: 500; }
.alert-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; font-size: 14px; }
.alert-item .desc { flex: 1; }
.alert-item .desc .note { font-size: 12px; color: var(--muted); }
.alert-item .del { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 13px; }
.alert-item .del:hover { color: var(--up); }
.alert-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 16px 0; }
.trigger-item { padding: 10px 12px; border-radius: 10px; margin-bottom: 8px; font-size: 13px; background: #fff7e6; border: 1px solid #ffe7ba; }
.trigger-item .t-time { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ===== Toast ===== */
.toast-wrap { position: fixed; top: 76px; right: 20px; z-index: 99; display: flex; flex-direction: column; gap: 10px; }
.toast { background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--up); border-radius: 12px; box-shadow: var(--shadow); padding: 12px 16px; font-size: 14px; max-width: 320px; opacity: 0; transform: translateX(30px); transition: opacity .25s ease, transform .25s ease; }
.toast.show { opacity: 1; transform: none; }
.toast .t-title { font-weight: 600; }
.toast .t-body { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ===== 用户菜单 ===== */
.user-menu { position: absolute; top: 60px; right: 20px; z-index: 95; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; min-width: 140px; }
.user-menu .um-item { padding: 10px 16px; font-size: 14px; cursor: pointer; }
.user-menu .um-item:hover { background: var(--bg); }

/* ===== 登录/注册弹窗 ===== */
.auth-mask { position: fixed; inset: 0; z-index: 98; background: linear-gradient(135deg, rgba(22, 163, 74, .22), rgba(15, 23, 42, .42)); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity .25s; }
.auth-mask.show { opacity: 1; pointer-events: auto; }
.auth-card { display: flex; width: 780px; max-width: 94vw; min-height: 500px; background: #fff; border-radius: 24px; overflow: hidden; box-shadow: 0 32px 90px rgba(15, 23, 42, .3); transform: translateY(18px) scale(.97); transition: transform .28s cubic-bezier(.2, .8, .3, 1.08); }
.auth-mask.show .auth-card { transform: none; }
.auth-brand { flex: 0 0 320px; position: relative; overflow: hidden; background: linear-gradient(160deg, #17a34b 0%, #15803d 55%, #14532d 100%); color: #fff; padding: 42px 34px; display: flex; flex-direction: column; }
.auth-brand::before { content: ""; position: absolute; width: 280px; height: 280px; border-radius: 50%; background: rgba(255, 255, 255, .09); top: -90px; right: -90px; }
.auth-brand::after { content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 255, 255, .07); bottom: -70px; left: -50px; }
.ab-logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; position: relative; }
.ab-logo svg { width: 30px; height: 30px; }
.ab-slogan { font-size: 27px; font-weight: 700; line-height: 1.55; margin-top: 40px; position: relative; letter-spacing: 1.5px; }
.ab-desc { font-size: 13px; opacity: .88; margin-top: 12px; position: relative; }
.ab-feats { list-style: none; margin-top: auto; padding-top: 30px; display: flex; flex-direction: column; gap: 13px; position: relative; }
.ab-feats li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; opacity: .95; }
.ab-feats li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fde68a; flex: none; }
.auth-main { flex: 1; padding: 40px 42px 32px; display: flex; flex-direction: column; min-width: 0; }
.am-title { font-size: 24px; font-weight: 700; }
.am-sub { font-size: 13px; color: var(--muted); margin-top: 6px; }
.auth-tabs { display: flex; gap: 22px; margin: 26px 0 22px; border-bottom: 1px solid var(--border); }
.auth-tabs span { padding-bottom: 10px; cursor: pointer; font-size: 15px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s; }
.auth-tabs span.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form input { padding: 13px 16px; border: 1.5px solid transparent; border-radius: 12px; font-size: 14.5px; outline: none; background: #f4f7f5; transition: all .18s; }
.auth-form input:hover { background: #eef3f0; }
.auth-form input:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(22, 163, 74, .12); }
.auth-captcha { display: flex; gap: 10px; align-items: center; }
.auth-captcha input { flex: 1; min-width: 0; letter-spacing: 2px; }
.auth-captcha img { width: 112px; height: 44px; border-radius: 10px; cursor: pointer; background: #eef2f7; flex: none; }
.btn-primary { padding: 13px; border: none; border-radius: 12px; cursor: pointer; background: linear-gradient(135deg, #1aae52, #15803d); color: #fff; font-size: 15.5px; font-weight: 600; letter-spacing: 3px; margin-top: 6px; box-shadow: 0 8px 20px rgba(22, 163, 74, .32); transition: all .18s; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(22, 163, 74, .4); }
.btn-primary:active { transform: none; }
.auth-err { color: var(--up); font-size: 13px; text-align: center; min-height: 18px; }

/* ===== B2B 供需大厅 ===== */
.b2b-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.b2b-stats { display: flex; gap: 18px; }
.bs-item { display: flex; flex-direction: column; align-items: center; padding: 8px 18px; background: var(--primary-soft); border-radius: 12px; min-width: 76px; }
.bs-item b { font-size: 22px; color: var(--primary); line-height: 1.1; }
.bs-item span { font-size: 12px; color: var(--muted); margin-top: 2px; }
.b2b-tabs { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; border-bottom: 2px solid var(--border); padding-bottom: 12px; }
.b2b-tabs span { padding: 8px 18px; cursor: pointer; border-radius: 10px 10px 0 0; font-size: 14.5px; color: var(--muted); transition: all .15s; }
.b2b-tabs span:hover { color: var(--text); background: #f4f7f5; }
.b2b-tabs span.active { color: var(--primary); font-weight: 600; background: var(--primary-soft); }
.b2b-publish-btn { margin-left: auto; padding: 8px 20px; border: none; border-radius: 10px; cursor: pointer; background: linear-gradient(135deg, #1aae52, #15803d); color: #fff; font-size: 14px; font-weight: 500; box-shadow: 0 4px 12px rgba(22,163,74,.28); transition: all .15s; }
.b2b-publish-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(22,163,74,.38); }
.b2b-filter { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.b2b-filter select, .b2b-search-btn { padding: 8px 14px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 13.5px; background: #fff; cursor: pointer; outline: none; transition: all .15s; }
.b2b-filter select:focus, .b2b-search-btn { border-color: var(--primary); }
.b2b-search-btn { background: var(--primary); color: #fff; border-color: var(--primary); }
.b2b-list { display: flex; flex-direction: column; gap: 12px; }
.b2b-item { display: flex; align-items: stretch; gap: 14px; padding: 16px; background: #fff; border: 1.5px solid var(--border); border-radius: 14px; transition: all .18s; }
.b2b-item:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(22,163,74,.1); transform: translateY(-1px); }
.bi-tag { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; color: #fff; flex-shrink: 0; }
.b2b-item.supply .bi-tag { background: linear-gradient(135deg, #1aae52, #15803d); }
.b2b-item.demand .bi-tag { background: linear-gradient(135deg, #f59e0b, #d97706); }
.bi-main { flex: 1; min-width: 0; }
.bi-title { font-size: 15.5px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.bi-meta { font-size: 13px; color: var(--muted); }
.bi-note { font-size: 12.5px; color: var(--muted); margin-top: 4px; padding: 6px 10px; background: #f8faf9; border-radius: 8px; }
.bi-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.bi-price { font-size: 20px; font-weight: 700; color: var(--primary); }
.b2b-item.demand .bi-price { color: #f59e0b; }
.bi-price small { font-size: 12px; font-weight: 400; color: var(--muted); }
.bi-contact { font-size: 12px; color: var(--muted); }
.bi-intent-btn { padding: 5px 12px; border: 1.5px solid var(--primary); border-radius: 8px; background: #fff; color: var(--primary); font-size: 12.5px; cursor: pointer; margin-top: 4px; transition: all .15s; }
.bi-intent-btn:hover { background: var(--primary); color: #fff; }
.b2b-empty { padding: 32px; text-align: center; color: var(--muted); font-size: 14px; background: #f8faf9; border-radius: 12px; }

.b2b-mask { position: fixed; inset: 0; z-index: 100; background: rgba(20, 40, 30, .55); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; }
.b2b-mask.show { display: flex; animation: fadeIn .18s; }
.b2b-form-card { width: 540px; max-width: 92vw; max-height: 92vh; overflow-y: auto; background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.24); animation: pop .22s cubic-bezier(.2,.9,.3,1.2); }
.bf-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1.5px solid var(--border); }
.bf-head h3 { font-size: 18px; font-weight: 600; }
.bf-close { width: 32px; height: 32px; border: none; background: #f4f7f5; border-radius: 8px; font-size: 20px; cursor: pointer; color: var(--muted); }
.bf-close:hover { background: #fee; color: var(--up); }
.bf-body { padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.bf-row { display: flex; gap: 10px; }
.bf-row input, .bf-row select { flex: 1; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 14px; outline: none; background: #f8faf9; transition: all .15s; }
.bf-row input:focus, .bf-row select:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(22,163,74,.1); }
.bf-body > input { padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 14px; outline: none; background: #f8faf9; }
.bf-body > input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(22,163,74,.1); }
.bf-submit { padding: 13px; border: none; border-radius: 12px; cursor: pointer; background: linear-gradient(135deg, #1aae52, #15803d); color: #fff; font-size: 15px; font-weight: 600; letter-spacing: 2px; box-shadow: 0 8px 20px rgba(22,163,74,.3); transition: all .15s; }
.bf-submit:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(22,163,74,.4); }
.bf-err { color: var(--up); font-size: 13px; text-align: center; min-height: 18px; }

/* ===== 产业热力地图 ===== */
.industry-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.industry-tabs span { padding: 6px 14px; cursor: pointer; border-radius: 20px; font-size: 13px; color: var(--muted); background: #f4f7f5; transition: all .15s; }
.industry-tabs span:hover { color: var(--text); }
.industry-tabs span.active { color: #fff; background: var(--primary); font-weight: 500; }
.grid-industry { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
#industry-chart { height: 360px; background: #f8faf9; border-radius: 12px; }
.industry-list { max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.ind-item { display: flex; gap: 10px; padding: 12px; background: #fff; border: 1.5px solid var(--border); border-radius: 12px; transition: all .15s; }
.ind-item:hover { border-color: var(--primary); transform: translateX(2px); }
.ind-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.ind-main { flex: 1; min-width: 0; }
.ind-title { font-size: 14px; font-weight: 600; }
.ind-type { font-size: 11px; padding: 2px 8px; border-radius: 8px; background: #f4f7f5; margin-left: 6px; font-weight: 400; }
.ind-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.ind-note { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* ===== 右下角 3D 智蛋 AI 助手 ===== */
.egg-assistant { position: fixed; right: 24px; bottom: 24px; z-index: 80; }

.egg-ball { position: relative; cursor: pointer; width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; }
.egg-ball:hover .egg-3d { transform: scale(1.08) rotate(-3deg); }
.egg-ball.active .egg-3d { animation: egg-pulse 1.5s ease-in-out infinite; }

.egg-3d {
  width: 64px; height: 64px;
  border-radius: 50% 50% 48% 48% / 42% 42% 58% 58%;
  background: radial-gradient(circle at 32% 28%, #ffffff 0%, #d4f7d8 18%, #4ade80 45%, #16a34a 75%, #14532d 100%);
  box-shadow:
    inset -6px -8px 14px rgba(0, 60, 20, .35),
    inset 4px 4px 10px rgba(255, 255, 255, .55),
    0 8px 20px rgba(22, 163, 74, .4),
    0 2px 6px rgba(0, 0, 0, .15);
  position: relative;
  animation: egg-breathe 3.5s ease-in-out infinite;
  transition: transform .25s ease;
}
.egg-3d.mini { width: 36px; height: 36px; animation: egg-breathe 3.5s ease-in-out infinite; }
.egg-3d.big { width: 88px; height: 88px; }

.egg-highlight {
  position: absolute; top: 14%; left: 22%;
  width: 28%; height: 22%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.95) 0%, rgba(255,255,255,.3) 60%, transparent 100%);
  filter: blur(2px); pointer-events: none;
}
.egg-3d.big .egg-highlight { width: 26%; height: 20%; }

.egg-face {
  position: absolute; bottom: 26%; left: 50%; transform: translateX(-50%);
  width: 70%; display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.egg-3d.big .egg-face { bottom: 22%; gap: 6px; }
.egg-eye {
  width: 8px; height: 10px; background: #1a3a1a; border-radius: 50%;
  position: relative;
}
.egg-3d.big .egg-eye { width: 11px; height: 13px; }
.egg-eye::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 3px; height: 3px; background: #fff; border-radius: 50%;
}
.egg-3d.big .egg-eye::after { width: 4px; height: 4px; }
.egg-eye.left, .egg-eye.right { display: inline-block; }
.egg-face { flex-direction: row; justify-content: center; gap: 14px; }
.egg-3d.big .egg-face { gap: 18px; }
.egg-mouth {
  position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
  width: 14px; height: 7px;
  border-bottom: 2.5px solid #1a3a1a; border-radius: 0 0 14px 14px;
}
.egg-3d.big .egg-mouth { width: 18px; height: 9px; border-bottom-width: 3px; }

.egg-shadow {
  position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  width: 54px; height: 8px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,.22) 0%, transparent 70%);
  animation: egg-shadow-pulse 3.5s ease-in-out infinite;
}

.egg-tip {
  position: absolute; right: 84px; top: 50%; transform: translateY(-50%);
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 7px 14px; font-size: 13px; color: var(--text); white-space: nowrap;
  box-shadow: var(--shadow); opacity: 0; transition: opacity .3s; pointer-events: none;
}
.egg-tip::after {
  content: ""; position: absolute; right: -6px; top: 50%; transform: translateY(-50%);
  border: 6px solid transparent; border-left-color: #fff;
}

@keyframes egg-breathe {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.04) rotate(1.5deg); }
}
@keyframes egg-shadow-pulse {
  0%, 100% { width: 54px; opacity: .8; }
  50% { width: 62px; opacity: .5; }
}
@keyframes egg-pulse {
  0%, 100% { transform: scale(1); box-shadow: inset -6px -8px 14px rgba(0,60,20,.35), inset 4px 4px 10px rgba(255,255,255,.55), 0 8px 20px rgba(22,163,74,.4); }
  50% { transform: scale(1.06); box-shadow: inset -6px -8px 14px rgba(0,60,20,.35), inset 4px 4px 10px rgba(255,255,255,.55), 0 12px 30px rgba(22,163,74,.6); }
}

/* 智蛋对话面板 */
.egg-panel {
  position: absolute; right: 0; bottom: 84px; width: 380px; max-width: 92vw;
  height: 520px; max-height: 72vh; background: #fff; border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25); display: flex; flex-direction: column;
  overflow: hidden; opacity: 0; transform: translateY(20px) scale(.95);
  pointer-events: none; transition: all .25s cubic-bezier(.2,.8,.3,1.1);
}
.egg-panel.show { opacity: 1; transform: none; pointer-events: auto; }

.ep-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff; flex-shrink: 0;
}
.ep-title { display: flex; align-items: center; gap: 12px; }
.ep-avatar { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; }
.ep-name { font-size: 16px; font-weight: 600; }
.ep-status { font-size: 12px; opacity: .9; display: flex; align-items: center; gap: 6px; }
.ep-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; animation: ep-blink 1.5s infinite; }
@keyframes ep-blink { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.ep-close { width: 28px; height: 28px; border: none; background: rgba(255,255,255,.2); border-radius: 8px; color: #fff; font-size: 20px; cursor: pointer; }
.ep-close:hover { background: rgba(255,255,255,.35); }

.ep-body {
  flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px;
  background: linear-gradient(180deg, #f8faf9 0%, #fff 100%);
}
.ep-body .msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: 14px; white-space: pre-wrap; line-height: 1.5; }
.ep-body .msg.user { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.ep-body .msg.ai { align-self: flex-start; background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }

.ep-welcome { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 16px 0 8px; }
.ep-welcome-egg { margin-bottom: 14px; }
.ep-welcome-title { font-size: 18px; font-weight: 700; color: var(--text); }
.ep-welcome-desc { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.6; max-width: 280px; }
.ep-quick { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.ep-quick span { font-size: 12.5px; color: var(--primary); border: 1px solid var(--primary); padding: 5px 12px; border-radius: 16px; cursor: pointer; transition: all .15s; }
.ep-quick span:hover { background: var(--primary); color: #fff; }

.ep-input { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); background: #fff; flex-shrink: 0; }
.ep-input input { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; font-size: 14px; outline: none; transition: all .15s; }
.ep-input input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22,163,74,.12); }
.ep-mic, .ep-send {
  border: none; border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.ep-mic { width: 40px; height: 40px; background: var(--bg); color: var(--muted); }
.ep-mic:hover { color: var(--primary); background: var(--primary-soft); }
.ep-mic.listening { background: var(--up); color: #fff; animation: ep-blink 1s infinite; }
.ep-mic svg { width: 18px; height: 18px; }
.ep-send { padding: 0 16px; background: var(--primary); color: #fff; font-size: 14px; font-weight: 500; }
.ep-send:disabled { opacity: .5; cursor: wait; }
.ep-send:hover { background: #15803d; }

/* ===== 自适应 ===== */
@media (max-width: 1024px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-map { grid-template-columns: 1fr; }
  #map { height: 400px; }
  .news-list { grid-template-columns: 1fr; }
  .news-cat-list { grid-template-columns: 1fr; }
  .supply-kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-supply { grid-template-columns: 1fr; }
  .grid-industry { grid-template-columns: 1fr; }
  #industry-chart { height: 280px; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); width: var(--sb-w); }
  .sidebar.show { transform: translateX(0); }
  .sidebar.collapsed { width: var(--sb-w); }
  .sidebar.collapsed .sb-name,
  .sidebar.collapsed .nav-item span,
  .sidebar.collapsed .sb-bell-label,
  .sidebar.collapsed .sb-login span { opacity: 1; pointer-events: auto; }
  .sb-collapse { display: none !important; }
  .m-header { display: flex; }
  .main { margin-left: 0 !important; padding: 16px 14px 80px; max-width: 100vw; }
  .kpi .value { font-size: 24px; }
  #map { height: 320px; }
  .page-head h1 { font-size: 20px; }
  .egg-assistant { right: 14px; bottom: 14px; }
  .egg-panel { width: 92vw; height: 70vh; }
  .user-menu { top: auto; bottom: 60px; right: 14px; }
  /* 登录/注册 H5 适配：隐藏品牌区、卡片自适应 */
  .auth-mask { padding: 12px; }
  .auth-card { width: 100%; max-width: 100vw; min-height: auto; max-height: 90vh; overflow-y: auto; border-radius: 16px; }
  .auth-brand { display: none; }
  .auth-main { padding: 28px 22px 22px; }
  .auth-form input { padding: 11px 14px; font-size: 14px; }
  .auth-tabs { margin: 18px 0 16px; gap: 16px; }
}
</content>
</invoke>