/* [hidden] 守卫：防止作者样式 display 覆盖 hidden 属性（与后台同源修复） */
[hidden] { display: none !important; }
/* 沐和数据 智能匹配工作台 — 应用层样式（引用 tokens.css 变量，禁止硬编码色值） */
* { box-sizing: border-box; }
body { margin: 0; background: var(--c-canvas); color: var(--c-text-1); font: 450 14px/1.6 var(--font-sans); }
.num, input.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
b { font-weight: 600; }

/* ---- 顶栏 ---- */
.topbar { height: var(--topbar-h); display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; background: rgba(18,22,27,.85); backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--c-border-subtle); position: sticky; top: 0; z-index: var(--z-topbar); }
.brand { display: flex; align-items: center; gap: 8px; }
.brand__logo { width: 26px; height: 26px; object-fit: contain; border-radius: 6px;
  margin-right: 8px; vertical-align: -7px; flex: none; }
.brand__mark { color: var(--c-brand); font-size: 18px; }
.brand__name { font-weight: 650; letter-spacing: -.01em; }
.brand__tag { font-size: 11px; color: var(--c-text-3); margin-left: 4px; }
.role-switch { display: flex; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-button); padding: 3px; gap: 3px; }
.role-btn { height: 30px; padding: 0 14px; border: 0; border-radius: 6px; background: transparent;
  color: var(--c-text-2); font: 550 13px var(--font-sans); cursor: pointer; transition: all var(--dur) var(--ease); }
.role-btn:hover { color: var(--c-text-1); }
.role-btn.is-active { background: var(--c-primary-100); color: var(--c-primary-400); }

/* ---- 布局 ---- */
.layout { display: grid; grid-template-columns: 320px 1fr; gap: 20px; max-width: var(--container-max);
  margin: 0 auto; padding: 20px 24px 60px; align-items: start; }
@media (max-width: 980px) { .layout { grid-template-columns: 1fr; } }
.panel { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--topbar-h) + 20px);
  max-height: calc(100vh - var(--topbar-h) - 40px); overflow-y: auto; padding: 2px 6px 2px 2px; margin: -2px -6px -2px -2px;
  scrollbar-width: thin; scrollbar-color: var(--c-border, #232A33) transparent; }
.panel::-webkit-scrollbar { width: 6px; }
.panel::-webkit-scrollbar-thumb { background: var(--c-border, #232A33); border-radius: 3px; }
@media (max-width: 980px) { .panel { position: static; } }

/* ---- 卡片 ---- */
.card { background: var(--c-surface); border: 1px solid var(--c-border-subtle); border-radius: var(--r-card);
  padding: 16px; box-shadow: var(--sh-xs); }
.card-h { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; margin-bottom: 12px; }
.card-h strong { font-size: 15px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.card-h .select { flex: 1 1 160px; min-width: 0; }
.card--high { border-color: rgba(245,165,36,.42);
  background: linear-gradient(180deg, var(--c-brand-wash) 0%, var(--c-surface) 60%);
  box-shadow: var(--sh-ember); }

/* ---- 表单 ---- */
.select, .input { width: 100%; height: 34px; padding: 0 10px; border-radius: var(--r-button);
  background: var(--c-canvas); border: 1px solid var(--c-border); color: var(--c-text-1);
  font: 450 13px var(--font-sans); }
.select:focus, .input:focus { outline: none; border-color: var(--c-primary-500); box-shadow: var(--sh-focus); }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 12px; color: var(--c-text-2); margin-bottom: 6px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 12px 0; }
.kv > span { font-size: 12px; color: var(--c-text-2); align-self: center; }

/* ---- 滑块 ---- */
.slider { margin-bottom: 14px; }
.slider__head { display: flex; justify-content: space-between; align-items: baseline; }
.slider__name { font-size: 12px; color: var(--c-text-2); }
.slider__name sub { font-size: .72em; color: var(--c-text-3); }
.slider__val { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 13px; }
.slider__track { position: relative; height: 4px; background: var(--c-border-subtle); border-radius: 2px; margin: 10px 0 2px; }
.slider__fill { position: absolute; top: 0; bottom: 0; background: var(--c-primary-500); border-radius: 2px; }
.slider input[type="range"] { position: absolute; inset: -8px 0; width: 100%; appearance: none; background: none; pointer-events: none; margin: 0; }
.slider input[type="range"]::-webkit-slider-thumb { appearance: none; pointer-events: auto; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; border: 2px solid var(--c-primary-500); box-shadow: 0 1px 4px rgba(0,0,0,.5);
  cursor: pointer; transition: transform var(--dur) var(--ease); }
.slider input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }

/* ---- 提示 ---- */
.note { font-size: 12px; color: var(--c-text-3); margin-top: 8px; line-height: 1.55; }
.note--info { background: var(--c-primary-100); border-left: 3px solid var(--c-primary-500);
  border-radius: 4px; padding: 8px 10px; margin: 0 0 12px; color: var(--c-text-2); }
.note--warn { background: var(--c-warning-bg); border-left: 3px solid var(--c-warning); border-radius: 4px; padding: 8px 10px; color: var(--c-text-2); }

/* ---- 内容区 ---- */
.content-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.content-h h1 { font-size: 20px; font-weight: 650; letter-spacing: -.015em; margin: 0; }
.sort-rule { font-size: 12px; color: var(--c-text-3); }
.summary { font-size: 13px; color: var(--c-text-2); margin-bottom: 14px; }
.summary b { color: var(--c-text-1); }

/* ---- 匹配列表 ---- */
.mlist { display: flex; flex-direction: column; gap: 12px; }
.mitem { background: var(--c-surface); border: 1px solid var(--c-border-subtle); border-radius: var(--r-card);
  padding: 14px 16px; cursor: pointer; transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.mitem:hover { background: var(--c-surface-elevated); border-color: var(--c-border); box-shadow: var(--sh-md); }
.mitem.is-best { border-color: rgba(245,165,36,.42);
  background: linear-gradient(180deg, var(--c-brand-wash) 0%, var(--c-surface) 60%); box-shadow: var(--sh-ember); }
.mitem.is-blocked { opacity: .55; cursor: default; }
.mi-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mi-region { font-weight: 600; color: var(--c-text-1); }
.mi-mid { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 10px; }
.mi-kv { display: flex; flex-direction: column; gap: 2px; }
.mi-kv .k { font-size: 11px; color: var(--c-text-3); }
.mi-kv .v { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 16px; font-weight: 700; }
.mi-kv .v small { font-size: 11px; font-weight: 500; color: var(--c-text-3); margin-left: 3px; }
.mi-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.ring { position: relative; display: inline-grid; place-items: center; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring__t { position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 700; }
.attrib { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.chip { font-size: 11px; padding: 2px 8px; border-radius: var(--r-badge); background: var(--c-surface-elevated);
  border: 1px solid var(--c-border-subtle); color: var(--c-text-2); }
.chip b { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.reason { margin-top: 10px; font-size: 12px; color: var(--c-danger); }
.blocked { margin-top: 16px; }
.blocked__summary { font-size: 12px; color: var(--c-text-3); cursor: pointer; user-select: none; }
.blocked__list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

/* ---- 抽屉 ---- */
.drawer-mask { position: fixed; inset: 0; background: rgba(5,6,8,.72); backdrop-filter: blur(8px); z-index: var(--z-drawer); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 480px; max-width: 94vw; overflow: auto;
  background: var(--c-surface-overlay); border-left: 1px solid var(--c-border); z-index: calc(var(--z-drawer) + 1);
  box-shadow: var(--sh-modal); animation: drawer-in var(--dur-slow) var(--ease); }
@keyframes drawer-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px;
  border-bottom: 1px solid var(--c-border-subtle); position: sticky; top: 0; background: var(--c-surface-overlay); }
.drawer__body { padding: 20px; }
.sec { margin-bottom: 22px; }
.sec > h3 { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--c-text-3); margin: 0 0 10px; }
.route { font-size: 13px; color: var(--c-text-2); line-height: 1.9; }
.route .arrow { color: var(--c-primary-400); margin: 0 6px; }
.wf { display: flex; flex-direction: column; gap: 6px; }
.wf__row { display: grid; grid-template-columns: 110px 1fr 90px; align-items: center; gap: 10px; font-size: 12px; color: var(--c-text-2); }
.wf__bar { height: 18px; border-radius: 3px; min-width: 2px; }
.wf__row .amt { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; color: var(--c-text-1); }
.risk { display: flex; flex-direction: column; gap: 6px; }
.risk__item { font-size: 12px; color: var(--c-text-2); background: var(--c-warning-bg); border-left: 3px solid var(--c-warning);
  border-radius: 4px; padding: 6px 10px; }
.risk__item--ok { background: var(--c-success-bg); border-left-color: var(--c-success); }
.footnote { max-width: var(--container-max); margin: 0 auto; padding: 0 24px 40px; font-size: 11px; color: var(--c-text-3); }
.btn { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: var(--r-button);
  font: 550 13px var(--font-sans); cursor: pointer; border: 1px solid transparent; transition: all var(--dur) var(--ease); }
.btn--ghost { background: transparent; color: var(--c-text-2); border-color: transparent; }
.btn--ghost:hover { color: var(--c-text-1); background: rgba(255,255,255,.05); }
.btn--sm { height: 26px; padding: 0 10px; font-size: 12px; }
.btn--primary { background: var(--c-brand); color: var(--c-canvas); box-shadow: var(--sh-xs), 0 4px 16px var(--c-brand-glow); }
.spec { font-size: 12px; color: var(--c-text-2); line-height: 1.9; border-top: 1px solid var(--c-border-subtle); padding-top: 10px; }
.spec .num { color: var(--c-text-1); }

/* ---- 企业档案页（附录 H.5） ---- */
.p-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.p-kpi { background: var(--c-surface); border: 1px solid var(--c-border-subtle); border-radius: var(--r-card); padding: 10px 12px; }
.p-kpi .k { display: block; font-size: 11px; color: var(--c-text-3); }
.p-kpi .v { display: block; font-size: 20px; font-weight: 700; margin-top: 2px; }
.p-kpi .v small { font-size: 10px; font-weight: 500; color: var(--c-text-3); margin-left: 4px; }
.p-chart { background: var(--c-surface-sunken); border: 1px solid var(--c-border-subtle); border-radius: var(--r-card); padding: 8px 6px 2px; }
.p-dist { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--c-border-subtle); }
.p-dist:last-child { border-bottom: 0; }
.p-dist__name { font-size: 12px; color: var(--c-text-2); }
.p-dist__track { position: relative; height: 8px; background: var(--c-canvas); border-radius: 4px; }
.p-dist__band { position: absolute; top: 0; bottom: 0; background: var(--c-primary-200); border-radius: 4px; }
.p-dist__now { position: absolute; top: -3px; width: 3px; height: 14px; background: var(--c-primary-400); border-radius: 2px; }
.p-dist__lo, .p-dist__hi { position: absolute; top: 12px; font-size: 10px; color: var(--c-text-3); }
.p-dist__lo { left: 0; } .p-dist__hi { right: 0; }
.p-ev { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--c-border-subtle); font-size: 12px; }
.p-ev:last-child { border-bottom: 0; }
.p-ev__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; transform: rotate(45deg); align-self: center; }
.p-ev__date { color: var(--c-text-3); flex: none; }
.p-ev__name { color: var(--c-text-2); }
.p-ev__impact { margin-left: auto; flex: none; }

/* ---- 模块导航（G.5 一级入口） ---- */
.module-nav { display: flex; gap: 6px; }
.module-btn { height: 32px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--c-border);
  background: transparent; color: var(--c-text-2); font-size: 13px; cursor: pointer; transition: all var(--dur-fast, 120ms); }
.module-btn:hover { color: var(--c-text-1); border-color: var(--c-border-strong); }
.module-btn.is-active { background: var(--c-primary-100, #16233A); color: #5C9BFA; border-color: transparent; }

/* ---- 价格预判（G.1 五段） ---- */
#forecastView { max-width: 1280px; margin: 0 auto; padding: 16px 20px 8px; display: grid; gap: 12px; }
.fc-grid { display: grid; grid-template-columns: 320px 1fr; gap: 12px; }
.fc-level { font-size: 11px; padding: 2px 8px; border-radius: 8px; background: rgba(52, 211, 153, .12); color: #34D399; }
.fc-now__p { font: 700 40px/1.1 var(--font-num, Consolas); color: var(--c-text-1, #E8ECEF); margin-top: 10px; }
.fc-now__p small { font-size: 14px; font-weight: 500; color: var(--c-text-3, #6B7684); margin-left: 6px; }
.fc-now__c { font-size: 14px; font-weight: 650; margin-top: 4px; }
.fc-now__m { font-size: 11px; color: var(--c-text-3, #6B7684); margin-top: 8px; }
.pos { color: #34D399; } .neg { color: #F87171; }
.fc-verdict__row { display: flex; align-items: center; gap: 20px; margin-top: 12px; }
.fc-dir { font: 650 22px/1.2 var(--font-sans); }
.fc-dir.up { color: #34D399; } .fc-dir.down { color: #F87171; }
.fc-range { font: 700 26px/1.3 var(--font-num, Consolas); color: var(--c-text-1, #E8ECEF); }
.fc-range small { font-size: 12px; font-weight: 500; color: var(--c-text-3, #6B7684); }
.fc-note { font-size: 11px; color: var(--c-text-3, #6B7684); margin-top: 4px; }
.fc-tabs { margin-left: auto; display: flex; gap: 4px; }
.fc-tabs button { height: 26px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--c-border, #232A33);
  background: transparent; color: var(--c-text-2, #8A93A0); font-size: 12px; cursor: pointer; }
.fc-tabs button.is-on { background: #16233A; color: #5C9BFA; border-color: transparent; }
.fc-conf { display: grid; justify-items: center; gap: 4px; font-size: 11px; color: var(--c-text-3, #6B7684); margin-left: auto; text-align: center; }
.fc-warn { margin-top: 12px; padding: 8px 12px; border-radius: 8px; background: rgba(245, 165, 36, .1);
  border-left: 3px solid #F5A524; font-size: 12px; color: #F5C46B; }
.fc-attr__row { display: grid; grid-template-columns: 120px 1fr 56px; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--c-border-subtle, #181D24); position: relative; }
.fc-attr__row:last-child { border-bottom: 0; }
.fc-attr__name { font-size: 13px; color: var(--c-text-2, #B7BEC7); }
.fc-attr__name small { display: block; font-size: 10px; color: var(--c-text-3, #6B7684); }
.fc-attr__bar { height: 14px; background: var(--c-surface-sunken, #10141A); border-radius: 4px; overflow: hidden; }
.fc-attr__bar i { display: block; height: 100%; border-radius: 4px; }
.fc-attr__bar i.pos { background: #34D399; }
.fc-attr__bar i.neg { background: #F87171; }
.fc-attr__v { font: 650 13px var(--font-num, Consolas); text-align: right; }
.fc-attr__note { grid-column: 2 / 4; font-size: 11px; color: var(--c-text-3, #6B7684); margin-top: -4px; padding-bottom: 4px; }
.fc-test__row { display: grid; grid-template-columns: 90px 56px 110px 110px 70px; gap: 8px; padding: 6px 0;
  border-bottom: 1px solid var(--c-border-subtle, #181D24); font-size: 12px; align-items: center; }
.fc-test__row:last-child { border-bottom: 0; }
.fc-test__d { color: var(--c-text-3, #6B7684); }
.num { font-family: var(--font-num, Consolas); }
.fc-test__h { font-weight: 650; text-align: right; }
.fc-disclaim { font-size: 11px; color: var(--c-text-3, #6B7684); padding: 2px 4px 10px; }
@media (max-width: 900px) { .fc-grid { grid-template-columns: 1fr; } }

/* ---- 数据大屏（G.3：比常规界面更暗 · KPI 48px · 禁装饰动效） ---- */
#dashboardView { min-height: 100vh; background: #08090B; padding: 14px 18px 10px; display: grid; gap: 10px; }
.db-head { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #232A33; padding-bottom: 10px; }
.db-head b { font-size: 16px; color: #E8ECEF; }
.db-head__tag { font-size: 11px; color: #6B7684; }
.db-head h1 { margin-left: auto; font-size: 24px; font-weight: 650; color: #E8ECEF; letter-spacing: .02em; }
.db-clock { font: 600 20px Consolas, monospace; color: #8A93A0; }
.db-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.db-kpi { background: #12161B; border: 1px solid #232A33; border-radius: 12px; padding: 14px 16px; }
.db-kpi__k { display: block; font-size: 13px; color: #6B7684; }
.db-kpi__v { display: block; font: 700 48px/1.15 Consolas, monospace; color: #E8ECEF; font-variant-numeric: tabular-nums; }
.db-kpi__v small { font-size: 20px; font-weight: 500; color: #8A93A0; margin-left: 4px; }
.db-kpi__c { display: block; font-size: 13px; font-weight: 600; }
.pos { color: #34D399; } .neg { color: #F87171; }
.db-main { display: grid; grid-template-columns: repeat(12, 1fr); gap: 10px; }
.db-card { grid-column: span 4; background: #12161B; border: 1px solid #232A33; border-radius: 12px; padding: 12px 14px; min-width: 0; }
.db-card:nth-child(4) { grid-column: span 8; }
.db-card__h { font-size: 13px; color: #8A93A0; margin-bottom: 6px; }
.db-foot { display: flex; align-items: center; gap: 8px; border-top: 1px solid #232A33; padding-top: 10px; }
.db-tab { height: 32px; padding: 0 16px; border-radius: 8px; border: 1px solid #232A33; background: transparent;
  color: #8A93A0; font-size: 13px; cursor: pointer; }
.db-tab.is-on { background: #16233A; color: #5C9BFA; border-color: transparent; }
.db-progress { flex: none; width: 120px; height: 3px; background: #1D242C; border-radius: 2px; overflow: hidden; }
.db-progress i { display: block; height: 100%; width: 0; background: #F5A524; transition: width .4s linear; }
.db-foot__note { font-size: 11px; color: #6B7684; margin-left: auto; }
.db-lg { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #B7BEC7; }
.db-lg i { width: 10px; height: 10px; border-radius: 3px; }
@media (max-width: 1100px) { .db-kpis { grid-template-columns: repeat(3, 1fr); } .db-main { grid-template-columns: 1fr; } .db-card, .db-card:nth-child(4) { grid-column: auto; } }

.db-delay { font-size: 12px; color: #8A93A0; background: #12161B; border: 1px solid #232A33; border-radius: 6px; padding: 6px 12px; }
.db-delay.is-warn { color: #F5C46B; background: rgba(245, 165, 36, .08); border-color: rgba(245, 165, 36, .35); }

/* ---- AI 数据伴侣（H.6：琥珀悬浮全站唯一例外） ---- */
.cp-fab, #cpFab { position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 56px; height: 56px;
  border-radius: 50%; border: 0; background: #F5A524; color: #0A0C0F; font: 700 15px/1 sans-serif;
  cursor: pointer; box-shadow: 0 0 0 6px rgba(245, 165, 36, .14), 0 12px 32px rgba(0, 0, 0, .5); }
#cpDrawer { position: fixed; top: 0; right: -430px; bottom: 0; width: 420px; max-width: 94vw; z-index: var(--z-drawer);
  background: #1E242C; box-shadow: 0 24px 64px rgba(0, 0, 0, .68); display: flex; flex-direction: column;
  transition: right .2s cubic-bezier(0.16, 1, 0.3, 1); }
#cpDrawer.is-open { right: 0; }
.cp-head { display: flex; flex-direction: column; padding: 14px 18px 12px; border-bottom: 1px solid #232A33; position: relative; }
.cp-head b { font-size: 15px; color: #E8ECEF; }
.cp-head small { font-size: 11px; color: #6B7684; margin-top: 2px; }
.cp-head button { position: absolute; right: 14px; top: 12px; width: 28px; height: 28px; border-radius: 6px;
  border: 1px solid #232A33; background: none; color: #8A93A0; font-size: 15px; cursor: pointer; }
.cp-msgs { flex: 1; overflow: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.cp-msg--u { align-self: flex-end; max-width: 82%; background: #16233A; color: #E8ECEF; border-radius: 12px 12px 3px 12px; padding: 9px 12px; font-size: 13px; }
.cp-msg--a { align-self: stretch; color: #C9D1DA; font-size: 13px; line-height: 1.65; }
.cp-msg__text strong, .cp-msg__text b { color: #E8ECEF; }
.cp-table { width: 100%; border-collapse: collapse; margin: 8px 0; background: #12161B; border: 1px solid #232A33; border-radius: 8px; overflow: hidden; }
.cp-table td { padding: 6px 9px; font-size: 12px; border-bottom: 1px solid #181D24; font-family: Consolas, monospace; color: #C9D1DA; }
.cp-table tr:last-child td { border-bottom: 0; }
.cp-msg__meta { margin-top: 6px; }
.cp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cp-chip { display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 9px; border-radius: 10px; font-size: 11px; cursor: pointer; }
.cp-chip--cite { background: rgba(46, 124, 246, .12); color: #6EA8FE; cursor: default; }
.cp-chip--ask { background: transparent; border: 1px solid #2E3743; color: #8A93A0; }
.cp-chip--ask:hover { color: #E8ECEF; border-color: #3D4855; }
.cp-input { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid #232A33; }
.cp-input input { flex: 1; height: 36px; border-radius: 9px; border: 1px solid #232A33; background: #12161B; color: #E8ECEF; padding: 0 12px; font-size: 13px; }
.cp-input input:focus { outline: none; border-color: #2E7CF6; }
.cp-input button { width: 64px; border-radius: 9px; border: 0; background: #F5A524; color: #0A0C0F; font-weight: 650; cursor: pointer; }
.cp-thinking { color: #6B7684; font-size: 12px; font-style: italic; }

/* ===== 矿企档案页（mine-profile.js，H.11） ===== */
.drawer--mine { width: 640px; max-width: 96vw; }
.lbadge { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 9px;
  border: 1px solid var(--c-border-subtle); font-size: 10px; font-weight: 600; white-space: nowrap; }
.lbadge-wrap { margin-left: 6px; }
.mtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--c-border-subtle); margin: 4px 0 16px; }
.mtab { appearance: none; border: 0; background: none; color: var(--c-text-3); font-size: 13px; font-weight: 600;
  padding: 8px 12px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.mtab:hover { color: var(--c-text-1); }
.mtab.is-active { color: var(--c-primary-400); border-bottom-color: var(--c-primary-400); }
.idgrid { display: grid; grid-template-columns: 1fr; border: 1px solid var(--c-border-subtle); border-radius: var(--r-card); overflow: hidden; margin-bottom: 10px; }
.idgrid__row { display: grid; grid-template-columns: 128px 1fr; gap: 10px; padding: 7px 12px;
  border-bottom: 1px solid var(--c-border-subtle); font-size: 12px; align-items: baseline; }
.idgrid__row:last-child { border-bottom: 0; }
.idgrid__row:nth-child(odd) { background: color-mix(in srgb, var(--c-surface) 55%, transparent); }
.idgrid__row .k { color: var(--c-text-3); flex: none; }
.idgrid__row .v { color: var(--c-text-1); word-break: break-all; }
.adj-row { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--c-border-subtle); font-size: 12px; }
.adj-row:last-of-type { border-bottom: 0; }
.adj-price { font-family: var(--font-mono); color: var(--c-text-1); min-width: 58px; }
.adj-delta { font-family: var(--font-mono); min-width: 44px; text-align: right; }
.adj-reason { color: var(--c-text-2); }
.adj-src { grid-column: 1 / -1; font-size: 10px; color: var(--c-text-3); padding-left: 20px; }
.p-ev { flex-wrap: wrap; row-gap: 2px; }
.srclist { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }

/* ===== 会员条（planbar，J 章）：顶栏下方第二行，防撑破 ===== */
.planbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 5px 24px; border-bottom: 1px solid var(--c-border-subtle);
  background: rgba(18,22,27,.6); font-size: 11px; position: sticky;
  top: var(--topbar-h); z-index: calc(var(--z-topbar) - 1); }
.planbar .cm-badge, .planbar .chip { white-space: nowrap; }
.planbar .chip b { font-variant-numeric: tabular-nums; }
.brand__name, .brand__tag, .role-btn, .module-btn { white-space: nowrap; }
@media (max-width: 1100px) { .brand__tag { display: none; } }

/* ============ 布局严谨性补强（2026-09-14） ============ */
/* 网格子项防撑破：长名称/长数字不得把栅格挤爆 */
.layout > *, .fc-grid > *, .db-kpis > * { min-width: 0; }
/* 中等宽度：左栏让位给结果区 */
@media (max-width: 1180px) { .layout { grid-template-columns: 280px 1fr; } }
/* 顶栏窄屏：品牌与操作允许换行 */
@media (max-width: 760px) {
  .top__in { flex-wrap: wrap; height: auto; padding: 6px 0; row-gap: 2px; }
  .top__nav { gap: 12px; }
}
/* 数据表统一最小可读宽度：窄屏交给容器横向滚动 */
.mlist, .db-wrap, .fc-wrap { min-width: 0; }


/* ============ 供应商匹配卡片（v55 紧凑重构） ============ */
.mitem { padding: 10px 66px 10px 14px; position: relative; }
.mi-ring { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.mi-chain .mi-seg { font-style: normal; color: var(--c-text-3); font-size: 11px; white-space: nowrap; }
/* 可点击矿名：一键弹出坑口价曲线（价格中心） */
.mi-name--link { cursor: pointer; text-decoration: underline dotted var(--c-border-strong); text-underline-offset: 3px; }
.mi-name--link:hover { color: var(--c-primary-400, #6EA8FF); text-decoration-color: currentColor; }
.mi-profit b { font-size: 17px; }
.mi-profit { color: var(--c-success); }
/* 中式行情配色：利润正=红、负=绿 */
.mi-profit.pos, .mi-foot .pos { color: var(--c-danger, #E5484D); }
.mi-profit.neg, .mi-foot .neg { color: var(--c-success, #4ADE80); }
.mi-head { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; min-width: 0; }
.mi-head .mi-name { font-size: 14px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.mi-head .cm-badge { flex: none; }
.mi-head .chip { flex: none; }
.mi-profit { margin-left: auto; flex: none; display: flex; align-items: baseline; gap: 2px;
  color: var(--c-success); font-size: 12px; }
.mi-profit b { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.mi-chain { margin-top: 6px; font-size: 12px; color: var(--c-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-chain .mi-segs { color: var(--c-text-3); }
.mi-foot { display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; overflow: hidden; white-space: nowrap; margin-top: 7px; padding-top: 7px;
  border-top: 1px dashed var(--c-border-subtle); font-size: 12px; color: var(--c-text-2); }
.mi-foot > span { flex: none; }
.mi-foot > span:last-child { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.mi-foot b { color: var(--c-text-1); font-variant-numeric: tabular-nums; }


/* ============ 价格预判 · 数据支撑（v30） ============ */
.fc-sup { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; padding: 8px 10px;
  background: color-mix(in srgb, var(--c-surface, #12161B) 60%, transparent); border: 1px dashed var(--c-border-subtle); border-radius: 8px; }
.fc-sup__row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--c-text-2); white-space: nowrap; overflow: hidden; }
.fc-sup__row span:first-child { color: var(--c-text-3); flex: 0 0 auto; }
.fc-sup__row b { color: var(--c-text-1); font-variant-numeric: tabular-nums; margin-left: auto; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; }
.src-badge { flex: none; font-size: 9.5px; font-weight: 700; padding: 0 5px; border-radius: 4px; border: 1px solid; line-height: 15px; letter-spacing: .04em; }
.fc-sup__read { font-size: 11px; color: var(--c-text-3); line-height: 1.55; margin-top: 4px; padding-top: 6px; border-top: 1px dashed var(--c-border-subtle); }
.fc-attr__row { display: grid; }


/* ============ 价格预判 · 紧凑两列维度卡（v31） ============ */
.fc-attr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fc-attr > .card-h, .fc-attr > .fc-disclaim { grid-column: 1 / -1; }
.fc-attr__row { display: block; border: 1px solid var(--c-border-subtle, #181D24); border-radius: 10px; padding: 10px 12px; border-bottom: 1px solid var(--c-border-subtle, #181D24); }
.fc-attr__head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.fc-attr__head .fc-attr__name { font-size: 13.5px; font-weight: 650; color: var(--c-text-1, #E8ECEF); }
.fc-attr__head .fc-attr__name small { display: inline; margin-left: 4px; }
.fc-attr__dir { margin-left: auto; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 6px; }
.fc-attr__dir.pos { color: #F87171; background: rgba(248,113,113,.1); }
.fc-attr__dir.neg { color: #34D399; background: rgba(52,211,153,.1); }
.fc-attr__head .fc-attr__v { font-size: 15px; }
.fc-attr__bar { display: block; height: 3px; margin: 4px 0 7px; border-radius: 2px; background: rgba(255,255,255,.05); }
.fc-attr__bar i { border-radius: 2px; }
.fc-attr__note { grid-column: auto; padding-bottom: 0; margin-top: 0; }
.fc-sup { margin-top: 8px; gap: 2px; padding: 6px 8px; }
.fc-sup__row { font-size: 11px; }
.fc-sup__read { margin-top: 4px; padding-top: 4px; }
@media (max-width: 1100px) { .fc-attr { grid-template-columns: 1fr; } }


/* ============ 数据大屏 · 卡片饱满化（v34，静态视觉/G.3 禁动效不冲突） ============ */
#dashboardView { background: radial-gradient(1100px 380px at 50% -60px, rgba(46, 124, 246, .08), transparent 70%), #08090B; }
.db-kpi { position: relative; overflow: hidden; padding: 16px 18px 12px; }
.db-kpi::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent, #34D399), transparent 70%); }
.db-kpi::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px 90px at 18% 0%, rgba(92, 155, 250, .07), transparent 65%); }
.db-kpi.is-up { --accent: #34D399; }
.db-kpi.is-down { --accent: #F87171; }
.db-kpi__c small { font-size: 11px; font-weight: 400; color: #6B7684; margin-left: 6px; }
.db-main { align-items: stretch; }
.db-card { position: relative; overflow: hidden; display: flex; flex-direction: column; }
.db-card::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 2px;
  background: linear-gradient(180deg, #2E7CF6, rgba(46, 124, 246, 0)); }
.db-card__h { padding-left: 11px; font-weight: 600; }
.db-card__h::after { content: ''; }
.db-card svg { flex: 1; min-height: 0; }


/* ============ 大屏 KPI 单行化（v35：数字/文字尽量不分行） ============ */
.db-kpi__k { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-kpi__v { white-space: nowrap; font-size: clamp(26px, 2.9vw, 42px); letter-spacing: -.02em; }
.db-kpi__v small { font-size: clamp(13px, 1.1vw, 17px); }
.db-kpi__c { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-card__h { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============ 产区地图（v94 合成坐标消费端） ============ */
.map-wrap { display: flex; flex-direction: column; gap: 10px; padding: 4px 2px; max-width: 1100px; margin: 0 auto; }
.map-loading { padding: 40px; text-align: center; color: var(--c-text-3, #8A93A0); }
.map-badge { background: rgba(245,165,36,0.12); border: 1px solid rgba(245,165,36,0.45); color: #F5C77A;
  border-radius: 8px; padding: 9px 14px; font-size: 13px; font-weight: 600; letter-spacing: .2px; }
.map-toolbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.map-toolbar .select { min-width: 190px; }
.map-legend { display: flex; gap: 18px; font-size: 12.5px; color: var(--c-text-2, #B7BEC7); }
.map-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.map-stat { margin-left: auto; font-size: 12.5px; color: var(--c-text-3, #8A93A0); }
.map-stat b { color: var(--c-text-1, #E8ECEF); }
.map-canvas { position: relative; border: 1px solid var(--c-border-subtle, #232c39); border-radius: 12px; overflow: hidden;
  background: #0E1620; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.map-canvas svg { display: block; }
.map-dot { cursor: pointer; transition: r .12s ease, fill-opacity .12s ease; }
.map-dot:hover { fill-opacity: 1; stroke-opacity: .9; stroke-width: 2; r: 5; }
.map-popup { position: absolute; z-index: 5; width: 220px; background: rgba(20,27,37,.96); border: 1px solid var(--c-border-subtle, #2A3442);
  border-radius: 10px; padding: 11px 13px; font-size: 13px; color: var(--c-text-1, #E8ECEF); box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.map-popup__h { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.map-popup__r { color: var(--c-text-2, #B7BEC7); line-height: 1.5; }
.map-popup__geo { color: #F5C77A; }
.map-popup__note { margin-top: 6px; font-size: 11px; color: var(--c-text-3, #8A93A0); }
.map-foot { font-size: 11.5px; color: var(--c-text-3, #8A93A0); line-height: 1.5; }
