/* ============================================================
   科技企业资质申报工作台 — 样式
   ============================================================ */

:root {
  --brand: #1e4fd8;
  --brand-dark: #163a9e;
  --brand-soft: #eef3ff;
  --brand-line: #d6e0f5;
  --ok: #0a9e5c;
  --ok-soft: #e8f7ef;
  --warn: #e08b00;
  --warn-soft: #fff5e6;
  --danger: #d92b2b;
  --danger-soft: #fdecec;
  --ink: #1a2233;
  --ink-2: #44506b;
  --ink-3: #6b7a99;
  --ink-4: #93a0ba;
  --bg: #f4f7fc;
  --card: #ffffff;
  --line: #e4eaf5;
  --shadow: 0 1px 2px rgba(26, 34, 51, .05), 0 6px 20px rgba(26, 34, 51, .06);
  --radius: 12px;
  --mono: "JetBrains Mono", Consolas, Menlo, monospace;
}

html[data-theme="dark"] {
  --brand: #5b8cff;
  --brand-dark: #3f6fe8;
  --brand-soft: #16203a;
  --brand-line: #24304e;
  --ok: #35d18a;
  --ok-soft: #102a20;
  --warn: #f0b429;
  --warn-soft: #2b2210;
  --danger: #ff6b6b;
  --danger-soft: #2e1515;
  --ink: #e8edf7;
  --ink-2: #c2ccdf;
  --ink-3: #93a0ba;
  --ink-4: #6b7a99;
  --bg: #0f1420;
  --card: #171e2e;
  --line: #26314a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 布局 ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px;
  flex: 0 0 232px;
  background: var(--card);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.logo { display: flex; align-items: center; gap: 10px; padding: 0 6px 18px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 9px; flex: 0 0 36px;
  background: linear-gradient(135deg, #1e4fd8, #5b8cff);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 15px; letter-spacing: -.5px;
}
.logo-txt b { display: block; font-size: 14px; line-height: 1.3; }
.logo-txt span { font-size: 11px; color: var(--ink-3); }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 8px; cursor: pointer;
  color: var(--ink-2); font-size: 13.5px; user-select: none;
  border: none; background: none; width: 100%; text-align: left; font-family: inherit;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--brand-soft); color: var(--brand); }
.nav-item.active { background: var(--brand); color: #fff; font-weight: 600; }
.nav-item .ico { font-size: 15px; width: 18px; text-align: center; }
.nav-sep { font-size: 11px; color: var(--ink-4); padding: 14px 11px 6px; letter-spacing: .5px; }

.side-foot { margin-top: 18px; padding: 12px 11px; border-top: 1px solid var(--line); font-size: 11px; color: var(--ink-4); line-height: 1.6; }

.main { flex: 1; min-width: 0; padding: 26px 30px 60px; max-width: 1500px; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 21px; margin: 0 0 5px; letter-spacing: -.3px; }
.page-head p { margin: 0; color: var(--ink-3); font-size: 13px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 通用控件 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 15px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink-2); cursor: pointer;
  font-size: 13px; font-family: inherit; font-weight: 500;
  transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-ghost { border-color: transparent; background: transparent; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.card > h2 { font-size: 15.5px; margin: 0 0 4px; }
.card > .sub { color: var(--ink-3); font-size: 12.5px; margin: 0 0 14px; }

.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

/* ---------- 统计卡 ---------- */
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 17px; box-shadow: var(--shadow); }
.stat .n { font-size: 24px; font-weight: 800; letter-spacing: -.5px; line-height: 1.2; }
.stat .l { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.stat .x { font-size: 11.5px; color: var(--ink-4); margin-top: 6px; }
.c-brand { color: var(--brand); }
.c-ok { color: var(--ok); }
.c-warn { color: var(--warn); }
.c-danger { color: var(--danger); }

/* ---------- 徽标 ---------- */
.tag { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11.5px; font-weight: 600; line-height: 1.7; white-space: nowrap; }
.t-brand { background: var(--brand-soft); color: var(--brand); }
.t-ok { background: var(--ok-soft); color: var(--ok); }
.t-warn { background: var(--warn-soft); color: var(--warn); }
.t-danger { background: var(--danger-soft); color: var(--danger); }
.t-mute { background: var(--bg); color: var(--ink-3); border: 1px solid var(--line); }

/* ---------- 表格 ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { background: var(--brand-soft); color: var(--brand); text-align: left; padding: 8px 10px; border: 1px solid var(--brand-line); font-weight: 600; font-size: 12.5px; }
.tbl td { padding: 8px 10px; border: 1px solid var(--line); vertical-align: top; }
.tbl tr:hover td { background: var(--bg); }
.tbl .num { text-align: right; font-family: var(--mono); font-size: 12.5px; }
.tbl-wrap { overflow-x: auto; }

/* ---------- 评分条 ---------- */
.bar { height: 7px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 5px; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: var(--brand); transition: width .4s ease; }
.bar.ok > i { background: var(--ok); }
.bar.warn > i { background: var(--warn); }
.bar.danger > i { background: var(--danger); }

/* ---------- 表单 ---------- */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; font-weight: 500; }
.field .hint { font-size: 11.5px; color: var(--ink-4); margin-top: 3px; }
input[type=text], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--card); color: var(--ink);
  font-size: 13px; font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30, 79, 216, .1); }
.fgrid { display: grid; gap: 10px 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.chk { display: flex; align-items: center; gap: 7px; font-size: 13px; padding: 5px 0; cursor: pointer; color: var(--ink-2); }
.chk input { width: auto; margin: 0; }

/* ---------- 资质卡 ---------- */
.qcard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); cursor: pointer;
  transition: transform .16s, border-color .16s, box-shadow .16s;
  display: flex; flex-direction: column; gap: 8px;
}
.qcard:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 4px 10px rgba(30, 79, 216, .1), 0 10px 28px rgba(30, 79, 216, .1); }
.qcard .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qcard h3 { margin: 0; font-size: 15.5px; }
.qcard .desc { font-size: 12.5px; color: var(--ink-3); line-height: 1.6; flex: 1; }
.qcard .kv { font-size: 12px; color: var(--ink-2); display: flex; gap: 6px; }
.qcard .kv b { color: var(--ink-3); font-weight: 500; flex: 0 0 auto; }

/* ---------- 抽屉 ---------- */
.drawer-mask { position: fixed; inset: 0; background: rgba(12, 18, 30, .45); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .22s; }
.drawer-mask.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 94vw);
  background: var(--card); z-index: 91; box-shadow: -8px 0 40px rgba(0, 0, 0, .18);
  transform: translateX(100%); transition: transform .26s cubic-bezier(.4, 0, .2, 1);
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.drawer-head h2 { margin: 0 0 4px; font-size: 18px; }
.drawer-body { padding: 18px 22px 40px; overflow-y: auto; flex: 1; }
.drawer-body h4 { font-size: 13.5px; margin: 20px 0 8px; color: var(--brand); border-left: 3px solid var(--brand); padding-left: 8px; }
.drawer-body h4:first-child { margin-top: 0; }
.drawer-body ul { margin: 6px 0; padding-left: 20px; }
.drawer-body li { margin-bottom: 5px; font-size: 13px; color: var(--ink-2); }
.x-close { background: none; border: none; font-size: 22px; color: var(--ink-3); cursor: pointer; line-height: 1; padding: 0 4px; }
.x-close:hover { color: var(--danger); }
.meta-line { font-size: 12.5px; color: var(--ink-3); margin-bottom: 3px; }
.meta-line b { color: var(--ink-2); font-weight: 600; }

/* ---------- 提示条 ---------- */
.note { border-radius: 9px; padding: 11px 14px; font-size: 12.5px; line-height: 1.65; margin: 10px 0; border: 1px solid; }
.note-brand { background: var(--brand-soft); border-color: var(--brand-line); color: var(--ink-2); }
.note-warn { background: var(--warn-soft); border-color: var(--warn); color: var(--ink-2); }
.note-danger { background: var(--danger-soft); border-color: var(--danger); color: var(--ink-2); }
.note-ok { background: var(--ok-soft); border-color: var(--ok); color: var(--ink-2); }
.note b { color: var(--ink); }

/* ---------- 时间轴 ---------- */
.tl { position: relative; padding-left: 22px; }
.tl::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 16px; }
.tl-item::before { content: ''; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); border: 2px solid var(--card); box-shadow: 0 0 0 2px var(--brand-line); }
.tl-item .m { font-size: 12px; color: var(--brand); font-weight: 700; }
.tl-item .d { font-size: 12.5px; color: var(--ink-2); }
.tl-item ul { margin: 4px 0 0; padding-left: 18px; }
.tl-item li { font-size: 12.5px; color: var(--ink-3); }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 46px 20px; color: var(--ink-3); }
.empty .big { font-size: 34px; margin-bottom: 10px; opacity: .5; }
.empty p { margin: 6px 0; font-size: 13px; }

/* ---------- 对比表 ---------- */
.cmp td:first-child { font-weight: 600; color: var(--ink); background: var(--bg); }
.cmp .risk-h { color: var(--danger); font-weight: 700; }
.cmp .risk-m { color: var(--warn); font-weight: 700; }

/* ---------- 公式块 ---------- */
.formula { font-family: var(--mono); background: var(--bg); border: 1px dashed var(--brand-line); border-radius: 8px; padding: 11px 14px; font-size: 12.5px; color: var(--brand); overflow-x: auto; line-height: 1.7; }

/* ---------- 材料导出中心 ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  border-radius: 999px; padding: 6px 13px; font-size: 12.5px; font-family: inherit;
}
.chip span { font-size: 11px; color: var(--ink-3); background: var(--bg); border-radius: 999px; padding: 1px 7px; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.chip.on span { background: rgba(255, 255, 255, .22); color: #fff; }

.mat-tool {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 14px; position: sticky; top: 0; z-index: 6; box-shadow: var(--shadow);
}
.mat-group-title { display: flex; align-items: center; gap: 8px; margin: 22px 0 10px; font-size: 14px; font-weight: 700; color: var(--ink); }
.mat-group-title .ico {
  width: 22px; height: 22px; border-radius: 6px; background: var(--brand-soft); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px;
}
.mat-card {
  display: flex; gap: 12px; align-items: flex-start; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; margin-bottom: 10px;
}
.mat-card.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.mat-card input[type=checkbox] { margin-top: 3px; width: 15px; height: 15px; accent-color: var(--brand); flex: none; }
.mat-body { flex: 1; min-width: 0; }
.mat-body h3 { font-size: 14px; margin: 0 0 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mat-purpose { font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }
.mat-kv { font-size: 12px; color: var(--ink-3); margin-top: 7px; display: flex; gap: 16px; flex-wrap: wrap; }
.mat-kv b { color: var(--ink-2); font-weight: 600; }
.mat-tips { margin: 6px 0 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--ink-2); }
.mat-tips li { position: relative; padding-left: 14px; margin-bottom: 5px; line-height: 1.65; }
.mat-tips li::before { content: '·'; position: absolute; left: 2px; top: -1px; color: var(--brand); font-weight: 700; font-size: 16px; }
details.mat-det summary { cursor: pointer; font-size: 12px; color: var(--brand); margin-top: 9px; user-select: none; }
.mat-acts { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex: none; }
@media (max-width: 720px) {
  .mat-card { flex-direction: column; }
  .mat-acts { flex-direction: row; align-items: center; }
  .mat-tool { position: static; }
}

/* ---------- 企业计划书 ---------- */
.card .sub { color: var(--ink-3); font-size: 12.5px; }

.plan-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 14px 0; }
.plan-stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.plan-stat .n { font-size: 24px; font-weight: 700; color: var(--brand); line-height: 1.25; }
.plan-stat .n span { font-size: 14px; color: var(--ink-4); font-weight: 400; }
.plan-stat .l { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

.plan-export {
  position: sticky; top: 0; z-index: 6; display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 16px; margin: 16px 0; box-shadow: var(--shadow);
}

.plan-sec { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin: 14px 0; box-shadow: var(--shadow); overflow: hidden; }
.plan-sec > summary {
  list-style: none; cursor: pointer; padding: 14px 18px; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); background: var(--brand-soft);
  color: var(--ink);
}
.plan-sec > summary::-webkit-details-marker { display: none; }
.plan-sec > summary::after { content: '▾'; margin-left: auto; color: var(--ink-3); font-size: 13px; transition: transform .2s; }
.plan-sec[open] > summary::after { transform: rotate(180deg); }
.plan-sec .ps-no {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px;
  background: var(--brand); color: #fff; border-radius: 6px; font-size: 12px; padding: 0 6px;
}
.plan-sec .ps-tip { font-size: 12px; font-weight: 400; color: var(--ink-3); margin-left: auto; padding-right: 22px; }
.plan-sec .ps-body { padding: 14px 18px 18px; }
.plan-sec h3 { font-size: 13.5px; margin: 16px 0 8px; color: var(--brand-dark); }

.plan-qual { border: 1px solid var(--line); border-radius: 10px; margin: 10px 0; overflow: hidden; }
.plan-qual > summary { list-style: none; cursor: pointer; padding: 11px 14px; display: flex; align-items: center; gap: 10px; background: var(--bg); font-size: 13.5px; }
.plan-qual > summary::-webkit-details-marker { display: none; }
.plan-qual[open] > summary { border-bottom: 1px solid var(--line); }
.plan-qual .tbl { margin: 0; }
.plan-qual .tbl-wrap { padding: 0 12px 12px; }

.row-fail { background: var(--danger-soft); }

.plan-opts { display: grid; gap: 10px; }
.plan-opt {
  display: flex; gap: 11px; align-items: flex-start; padding: 12px 14px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); transition: all .15s;
}
.plan-opt:hover { border-color: var(--brand-line); }
.plan-opt.on { border-color: var(--brand); background: var(--brand-soft); }
.plan-opt > input { margin-top: 3px; width: auto; flex: none; }
.plan-opt .po-name { font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.plan-opt .po-ico { color: var(--brand); font-size: 15px; }
.plan-opt .po-desc { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }
.plan-opt .po-value { font-size: 12px; color: var(--ink-3); margin-top: 5px; padding-left: 8px; border-left: 2px solid var(--brand-line); }
.plan-opt .po-value b { color: var(--brand-dark); }

.plan-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 12px; margin: 10px 0; }
.plan-tier { border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; background: var(--bg); }
.plan-tier.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand) inset; }
.plan-tier .pt-head { display: flex; align-items: center; gap: 8px; font-size: 13.5px; flex-wrap: wrap; }
.plan-tier .pt-amt { font-size: 22px; font-weight: 700; color: var(--brand); margin: 7px 0 9px; }
.plan-tier .pt-list { margin: 0; padding-left: 17px; font-size: 12px; color: var(--ink-2); }
.plan-tier .pt-list li { margin: 3px 0; }
.plan-tier .pt-list b { color: var(--ink); }
.plan-tier .pt-note { font-size: 11.5px; color: var(--ink-3); margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--line); }

@media (max-width: 860px) {
  .plan-export { position: static; }
  .plan-sec .ps-tip { display: none; }
}

/* ============================================================
   企业档案 · 资料自动带出 + 财报上传
   ============================================================ */

/* 整行字段（注册地址、经营范围等长文本） */
.fgrid .field.wide { grid-column: 1 / -1; }

/* ---------- 自动带出工具条 ---------- */
.fi-bar {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, var(--brand-soft), var(--card));
  border: 1px solid var(--brand-line); border-radius: 10px;
  padding: 11px 14px; margin: 4px 0 12px;
}
.fi-bar-l { display: flex; flex-direction: column; gap: 3px; min-width: 220px; }
.fi-bar-l b { font-size: 13px; color: var(--brand); }
.fi-bar-l span { font-size: 11.5px; color: var(--ink-3); line-height: 1.5; }
.fi-bar-b { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- 面板 ---------- */
.fi-panel {
  border: 1px solid var(--brand-line); border-radius: 10px;
  background: var(--card); padding: 13px 15px; margin: 0 0 14px;
}
.fi-panel-h { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.fi-panel-h b { font-size: 13px; color: var(--ink); }
.fi-panel-h span { font-size: 11.5px; color: var(--ink-3); line-height: 1.6; }
.fi-panel-f { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 11px; }
.fi-tip { font-size: 11.5px; color: var(--ink-4); }
.fi-ta {
  width: 100%; font-family: var(--mono); font-size: 12.5px; line-height: 1.65;
  resize: vertical;
}
.fi-panel input[type=text] { font-family: var(--mono); font-size: 12.5px; }

/* ---------- 财报上传投放区 ---------- */
.up-drop {
  border: 2px dashed var(--brand-line); border-radius: 12px;
  background: var(--brand-soft); padding: 26px 20px; text-align: center;
  cursor: pointer; transition: border-color .16s, background .16s, transform .16s;
}
.up-drop:hover, .up-drop.over {
  border-color: var(--brand); background: var(--card);
  box-shadow: 0 4px 14px rgba(30, 79, 216, .1);
}
.up-drop.over { transform: scale(1.005); }
.up-drop .up-ico { font-size: 28px; color: var(--brand); line-height: 1; margin-bottom: 8px; }
.up-drop .up-t { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.up-drop .up-d { font-size: 11.5px; color: var(--ink-3); line-height: 1.7; margin-top: 7px; }
.up-drop .up-link { color: var(--brand); text-decoration: underline; }

/* ---------- 识别结果小标题与折叠区 ---------- */
.fr-h {
  font-size: 13px; color: var(--brand);
  margin: 18px 0 8px; padding-bottom: 5px;
  border-bottom: 1px solid var(--brand-line);
}
.fr-h:first-child { margin-top: 6px; }
.fr-det { margin-top: 14px; }
.fr-det > summary {
  cursor: pointer; font-size: 12.5px; color: var(--ink-3);
  padding: 6px 0; user-select: none;
}
.fr-det > summary:hover { color: var(--brand); }
.fr-det[open] > summary { color: var(--brand); }

/* 附件表内下拉框紧凑化 */
.tbl select { padding: 4px 7px; font-size: 12px; }

/* 小字着色（信用代码校验等） */
.hint.c-ok { color: var(--ok); }
.hint.c-danger { color: var(--danger); font-weight: 500; }

/* ---------- 打印 ---------- */
@media print {
  .sidebar, .head-actions, .nav { display: none !important; }
  .main { padding: 0; max-width: none; }
  .card { box-shadow: none; page-break-inside: avoid; }
}

/* ---------- 移动端 ---------- */
@media (max-width: 860px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; flex: none; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--line); padding: 12px; }
  .nav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .nav-item { white-space: nowrap; padding: 8px 12px; }
  .nav-sep, .side-foot { display: none; }
  .logo { padding-bottom: 12px; margin-bottom: 8px; }
  .main { padding: 16px 14px 50px; }
  .page-head h1 { font-size: 18px; }
  .tbl { font-size: 12px; }
  .tbl th, .tbl td { padding: 6px 7px; }
}


/* ---------------- 云端登录墙 ---------------- */
#authGate { position:fixed; inset:0; z-index:300; display:none; align-items:center; justify-content:center; background:var(--bg); }
.auth-card { width:min(430px,92vw); max-height:92vh; overflow:auto; background:var(--card); border:1px solid var(--line); border-radius:14px; padding:26px 24px; box-shadow:var(--shadow); }
.auth-logo { width:44px; height:44px; border-radius:10px; background:var(--brand); color:#fff; font-weight:600; display:flex; align-items:center; justify-content:center; font-size:20px; margin-bottom:12px; }
.auth-card h2 { font-size:17px; margin:0 0 4px; }
.auth-sub { font-size:12.5px; color:var(--ink-3); margin:0 0 14px; line-height:1.6; }
.auth-tabs { display:flex; gap:6px; margin-bottom:14px; }
.auth-tabs button { flex:1; padding:7px 4px; font-size:12.5px; border:1px solid var(--line); background:transparent; border-radius:8px; cursor:pointer; color:var(--ink-2); }
.auth-tabs button.on { background:var(--brand); color:#fff; border-color:var(--brand); }
.auth-body .field { margin-bottom:10px; }
.auth-body .field label { display:block; font-size:12px; color:var(--ink-3); margin-bottom:4px; }
.auth-body .field input { width:100%; box-sizing:border-box; padding:9px 11px; border:1px solid var(--line); border-radius:8px; font-size:13.5px; background:var(--card); color:var(--ink); }
.auth-msg { min-height:18px; font-size:12.5px; margin-top:8px; color:var(--ink-3); }
.auth-msg.err { color:var(--danger); }
.auth-msg.ok { color:var(--ok); }

/* 混合上传（整包导入） */
.mix-drop { border-style: dashed; }
.mix-drop.over { border-color: var(--brand); background: rgba(0, 0, 0, .03); }
.mix-drop .up-d { max-width: 720px; margin: 6px auto 0; }
.mix-flash { animation: mixFlash 1.8s ease; }
@keyframes mixFlash {
  0%   { box-shadow: 0 0 0 0 rgba(0, 0, 0, .22); }
  30%  { box-shadow: 0 0 0 8px rgba(0, 0, 0, .06); }
  100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

/* ============================================================
   视觉升级 2026-10-22
   ------------------------------------------------------------
   目标：统一层次与节奏，修掉字符图标缺字，登录页重做为品牌双栏
   全部为追加覆盖，不改动上方既有规则
   ============================================================ */

:root {
  --radius: 14px;
  --radius-sm: 10px;
  --bg: #f5f7fb;
  --card: #ffffff;
  --line: #e6eaf3;
  --line-soft: #eff2f8;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .05);
  --shadow-md: 0 2px 4px rgba(16, 24, 40, .03), 0 12px 28px -10px rgba(16, 24, 40, .12);
  --shadow-lg: 0 20px 60px -24px rgba(16, 24, 40, .32);
  --shadow: var(--shadow-sm);
}

html[data-theme="dark"] {
  --line-soft: #1f2841;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 12px 30px -12px rgba(0, 0, 0, .5);
  --shadow-lg: 0 24px 70px -20px rgba(0, 0, 0, .7);
}

body { font-feature-settings: "tnum" 0; }
::selection { background: rgba(30, 79, 216, .16); }

/* 细滚动条 */
* { scrollbar-width: thin; scrollbar-color: #c9d3e6 transparent; }
html[data-theme="dark"] * { scrollbar-color: #33405e transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d3dced; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b9c6de; background-clip: content-box; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #2c3852; background-clip: content-box; }

/* ---------- 侧栏 ---------- */
.sidebar {
  width: 236px; flex: 0 0 236px;
  padding: 18px 12px 22px;
  background: var(--card);
  display: flex; flex-direction: column;
}
.logo { padding: 0 8px 16px; margin-bottom: 12px; }
.logo-mark { box-shadow: 0 6px 14px -6px rgba(30, 79, 216, .7); }
.logo-txt b { letter-spacing: -.2px; }

.nav { gap: 1px; }
.nav-item {
  position: relative;
  padding: 8px 10px;
  border-radius: 9px;
  gap: 9px;
  font-size: 13px;
  letter-spacing: .01em;
  transition: background .16s, color .16s, transform .12s;
}
.nav-item .ico { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.nav-item .ico .ni { width: 17px; height: 17px; display: block; }
.nav-item .lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item:hover { background: var(--brand-soft); color: var(--brand); }
.nav-item.active {
  background: linear-gradient(180deg, #2456e0, var(--brand));
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(30, 79, 216, .9);
}
.nav-item.active::before {
  content: ''; position: absolute; left: -12px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 16px; border-radius: 0 3px 3px 0;
  background: var(--brand);
}
.nav-item:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

.nav-sep {
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--ink-4);
  padding: 15px 10px 5px;
  font-weight: 600;
  opacity: .85;
}
.nav-sep:first-child { display: none; }

.side-foot {
  margin-top: auto;
  padding: 14px 8px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 11px;
  color: var(--ink-4);
  line-height: 1.65;
}
.side-foot div { margin-bottom: 5px; }
.side-foot #cloudStat { font-weight: 500; }

/* ---------- 主区 ---------- */
.main { padding: 24px 32px 72px; }
.page-head { margin-bottom: 22px; align-items: center; }
.page-head h1 { font-size: 22px; font-weight: 700; letter-spacing: -.4px; }
.page-head p { font-size: 12.5px; color: var(--ink-3); }
.head-actions .btn { box-shadow: var(--shadow-sm); }

/* ---------- 通用控件 ---------- */
.btn { border-radius: 9px; font-weight: 500; }
.btn-primary { box-shadow: 0 6px 14px -8px rgba(30, 79, 216, .8); }
.btn-primary:active { transform: translateY(.5px); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.card {
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s, border-color .18s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card > h2 { font-size: 15.5px; font-weight: 700; letter-spacing: -.2px; }

/* 统计卡：加一条品牌色进度条位置，数字用等宽数字 */
.stat { border-radius: var(--radius); padding: 14px 16px 15px; box-shadow: var(--shadow-sm); }
.stat .n { font-size: 25px; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 12px; }
.stat .x { font-size: 11.5px; }

.plan-stat .n, .tbl .num, .tl-item .m { font-variant-numeric: tabular-nums; }

/* ---------- 表格 ---------- */
.tbl { font-size: 12.5px; border-collapse: separate; border-spacing: 0; }
.tbl th {
  background: var(--bg);
  color: var(--ink-2);
  border: none;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 9px 11px;
  white-space: nowrap;
}
.tbl td {
  border: none;
  border-bottom: 1px solid var(--line-soft);
  padding: 10px 11px;
  line-height: 1.6;
}
.tbl tbody tr:hover td { background: var(--brand-soft); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl-wrap { border-radius: var(--radius-sm); }

/* ---------- 徽标与提示 ---------- */
.tag { font-weight: 600; letter-spacing: .01em; }
.note { border-radius: var(--radius-sm); }
.formula { border-radius: var(--radius-sm); }

/* ============================================================
   登录墙 · 品牌双栏
   ============================================================ */
#authGate {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(900px 520px at 12% 0%, rgba(30, 79, 216, .12), transparent 62%),
    radial-gradient(760px 480px at 100% 100%, rgba(30, 79, 216, .08), transparent 60%),
    var(--bg);
}
html[data-theme="dark"] #authGate {
  background:
    radial-gradient(900px 520px at 12% 0%, rgba(91, 140, 255, .14), transparent 62%),
    radial-gradient(760px 480px at 100% 100%, rgba(91, 140, 255, .08), transparent 60%),
    var(--bg);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(370px, 430px);
  width: min(1060px, 96vw);
  min-height: 560px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* 左：品牌区 */
.auth-hero {
  position: relative;
  padding: 40px 40px 32px;
  color: #fff;
  background: linear-gradient(152deg, #0f1e46 0%, #17369c 48%, #2f63ea 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.auth-hero::after {
  content: '';
  position: absolute; right: -90px; bottom: -120px;
  width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 68%);
  pointer-events: none;
}
.auth-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at 20% 10%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 20% 10%, #000 0%, transparent 72%);
  pointer-events: none;
}
.ah-top { display: flex; align-items: center; gap: 11px; position: relative; }
.ah-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .28);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
  backdrop-filter: blur(4px);
}
.ah-brand b { display: block; font-size: 14px; letter-spacing: .04em; }
.ah-brand span { font-size: 11px; color: rgba(255, 255, 255, .66); letter-spacing: .04em; }

.auth-hero h1 {
  position: relative;
  margin: 38px 0 14px;
  font-size: 30px;
  line-height: 1.32;
  letter-spacing: -.6px;
  font-weight: 700;
}
.ah-lede {
  position: relative;
  margin: 0 0 26px;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255, 255, 255, .76);
  max-width: 34em;
}
.ah-list { position: relative; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 15px; }
.ah-list li { display: flex; gap: 12px; align-items: flex-start; }
.ah-list i {
  flex: none;
  width: 21px; height: 21px; border-radius: 7px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  font-style: normal; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.ah-list b { display: block; font-size: 13px; font-weight: 600; letter-spacing: .01em; }
.ah-list span { display: block; font-size: 11.5px; color: rgba(255, 255, 255, .62); line-height: 1.65; margin-top: 3px; }

.ah-foot {
  position: relative;
  margin-top: auto; padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 11px; color: rgba(255, 255, 255, .52);
}

/* 右：表单区 */
.auth-panel {
  display: flex; flex-direction: column; justify-content: center;
  padding: 40px 38px 22px;
  background: var(--card);
}
.auth-panel .auth-card {
  width: auto; max-height: none; overflow: visible;
  background: transparent; border: none; box-shadow: none;
  padding: 0; border-radius: 0;
}
.auth-copyright {
  margin-top: 26px; text-align: center;
  font-size: 11px; color: var(--ink-4); letter-spacing: .02em;
}

.auth-logo {
  width: 42px; height: 42px; border-radius: 11px;
  background: linear-gradient(135deg, #2456e0, #4b7bf5);
  box-shadow: 0 8px 18px -8px rgba(30, 79, 216, .8);
  font-size: 18px; margin-bottom: 14px;
}
.auth-card h2 { font-size: 19px; font-weight: 700; letter-spacing: -.3px; line-height: 1.4; }
.auth-sub { font-size: 12.5px; line-height: 1.7; color: var(--ink-3); margin-bottom: 18px; }

.auth-tabs {
  display: flex; gap: 3px; margin-bottom: 16px;
  padding: 3px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line-soft);
}
.auth-tabs button {
  flex: 1; padding: 7px 6px; font-size: 12px;
  border: none; border-radius: 8px;
  background: transparent; color: var(--ink-3);
  cursor: pointer; font-family: inherit;
  transition: background .16s, color .16s, box-shadow .16s;
  white-space: nowrap;
}
.auth-tabs button:hover { color: var(--ink); }
.auth-tabs button.on {
  background: var(--card); color: var(--brand); font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.auth-body .field { margin-bottom: 13px; }
.auth-body .field label { font-size: 12px; color: var(--ink-2); font-weight: 500; margin-bottom: 6px; }
.auth-body .field input {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 9px;
  font-size: 13.5px; background: var(--card); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.auth-body .field input:hover { border-color: #d3dcf0; }
.auth-body .field input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(30, 79, 216, .12);
}
.auth-body .btn { padding: 10px 15px; border-radius: 9px; font-size: 13.5px; }
.auth-body .btn-primary { font-weight: 600; }
.auth-body .btn:disabled { opacity: .62; cursor: not-allowed; transform: none; }
.auth-msg { min-height: 20px; font-size: 12.5px; margin-top: 10px; line-height: 1.6; }
.auth-msg:not(:empty) { padding: 8px 11px; border-radius: 8px; background: var(--bg); }

@media (max-width: 940px) {
  .auth-shell { grid-template-columns: 1fr; min-height: 0; width: min(460px, 96vw); }
  .auth-hero { display: none; }
  .auth-panel { padding: 30px 26px 18px; }
}

/* ---------- 移动端补齐（须覆盖上方固定宽度，故重写整块） ---------- */
@media (max-width: 860px) {
  .app { flex-direction: column; }
  .sidebar {
    width: 100%; flex: none; height: auto;
    position: static; border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 10px 12px 8px;
    display: block;
  }
  .logo { padding: 0 2px 10px; margin-bottom: 8px; }
  .nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 6px; }
  .nav-item { padding: 7px 12px; white-space: nowrap; flex: none; width: auto; }
  .nav-item.active::before { display: none; }
  .nav-item .lbl { white-space: nowrap; }
  .nav-sep, .side-foot { display: none; }
  .main { padding: 16px 14px 56px; }
  .page-head { gap: 10px; }
  .card { padding: 15px 15px; }
  .stat { padding: 13px 14px; }
  .tbl th, .tbl td { padding: 8px 9px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat .n { font-size: 21px; }
  .plan-stat .n { font-size: 21px; }
}

/* 登录页：桌面端隐藏右侧重复的品牌标记（左侧已有） */
@media (min-width: 941px) {
  .auth-panel .auth-logo { display: none; }
}

/* ============================================================
   业务总览（公开首页）
   ------------------------------------------------------------
   用途：对外展示业务范畴，适合投屏与打印。
   版式：大字号、宽留白、按梯度分层，避免做成数据看板。
   ============================================================ */

.home { max-width: 1180px; margin: 0 auto; }
.btn-lg { padding: 11px 22px; font-size: 14px; border-radius: 10px; }

/* ---------- 首屏 ---------- */
.home-hero {
  background:
    radial-gradient(760px 380px at 8% -10%, rgba(30, 79, 216, .10), transparent 62%),
    linear-gradient(180deg, var(--card), var(--card));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 40px 40px 30px;
  box-shadow: var(--shadow-md);
  margin-bottom: 26px;
}
.hh-eyebrow {
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand); font-weight: 600; margin-bottom: 14px;
}
.home-hero h1 {
  margin: 0 0 16px;
  font-size: 33px; line-height: 1.34; letter-spacing: -.8px; font-weight: 700;
  color: var(--ink);
}
.home-hero h1 em {
  font-style: normal; color: var(--brand);
  display: inline-block; margin-top: 4px;
}
.hh-lede {
  margin: 0 0 22px; font-size: 14px; line-height: 1.9;
  color: var(--ink-2); max-width: 46em;
}
.hh-lede b { color: var(--ink); font-weight: 600; }
.hh-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.hh-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px; margin-top: 30px; padding-top: 24px;
  border-top: 1px dashed var(--line);
}
.hs-item { padding-right: 8px; }
.hs-n {
  font-size: 30px; font-weight: 800; letter-spacing: -1px; line-height: 1.1;
  color: var(--brand); font-variant-numeric: tabular-nums;
}
.hs-n i { font-style: normal; font-size: 14px; font-weight: 600; margin-left: 3px; }
.hs-l { font-size: 13px; font-weight: 600; color: var(--ink); margin-top: 5px; }
.hs-x { font-size: 11.5px; color: var(--ink-4); line-height: 1.6; margin-top: 3px; }

/* ---------- 区块 ---------- */
.home-sec { margin-bottom: 30px; }
.sec-head { margin-bottom: 14px; }
.sec-head h2 {
  margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.2px;
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.sec-head h2 span {
  font-size: 12.5px; font-weight: 400; color: var(--ink-3); letter-spacing: 0;
}

/* ---------- 梯度分层 ---------- */
.tiers { display: flex; flex-direction: column; gap: 16px; }
.tier {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px 18px;
  box-shadow: var(--shadow-sm);
}
.tier-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.tier-badge {
  flex: none; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  padding: 5px 12px; border-radius: 999px; white-space: nowrap;
}
.tier-txt { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tier-txt b { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.tier-txt span { font-size: 11.5px; color: var(--ink-4); }

.tier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.q-tile {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 15px; background: var(--bg);
  border-left: 3px solid var(--brand);
  transition: box-shadow .16s, transform .16s;
}
.q-tile:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.qt-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qt-head h4 { margin: 0; font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.qt-abbr {
  font-size: 11px; font-weight: 600; color: var(--brand);
  background: var(--brand-soft); border-radius: 5px; padding: 1px 6px;
}
.qt-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 7px 0 9px; }
.qt-lv { font-size: 11px; color: var(--ink-3); background: var(--card); border: 1px solid var(--line); border-radius: 5px; padding: 1px 7px; }
.qt-dept { font-size: 11px; color: var(--ink-4); }
.qt-line { font-size: 12px; color: var(--ink-2); line-height: 1.7; margin-top: 5px; }
.qt-line b { color: var(--ink-3); font-weight: 600; margin-right: 6px; }

/* 梯度配色 */
.tone-blue   { }
.tone-indigo { }
.tone-teal   { }
.tone-amber  { }
.tone-slate  { }
.tier-badge.tone-blue   { background: #eaf1ff; color: #1e4fd8; }
.tier-badge.tone-indigo { background: #ecebff; color: #4f46e5; }
.tier-badge.tone-teal   { background: #e3f7f3; color: #0d9488; }
.tier-badge.tone-amber  { background: #fdf3e3; color: #b45309; }
.tier-badge.tone-slate  { background: #eef1f6; color: #64748b; }
.q-tile.tone-indigo { border-left-color: #4f46e5; }
.q-tile.tone-teal   { border-left-color: #0d9488; }
.q-tile.tone-amber  { border-left-color: #d97706; }
.q-tile.tone-slate  { border-left-color: #94a3b8; }

/* ---------- 能力 ---------- */
.cap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.cap {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 17px; box-shadow: var(--shadow-sm);
}
.cap-ico {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center; margin-bottom: 10px;
}
.cap-ico svg { width: 17px; height: 17px; }
.cap b { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.cap p { margin: 0; font-size: 12.5px; line-height: 1.75; color: var(--ink-3); }

/* ---------- 流程 ---------- */
.flow {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
}
.flow-step { padding: 16px 15px; border-right: 1px solid var(--line-soft); position: relative; }
.flow-step:last-child { border-right: none; }
.fs-no {
  font-size: 11px; font-weight: 800; letter-spacing: .08em;
  color: var(--brand); margin-bottom: 7px;
}
.flow-step b { display: block; font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.flow-step p { margin: 0; font-size: 11.5px; line-height: 1.7; color: var(--ink-3); }

/* ---------- 合作方式 ---------- */
.coop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.coop {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.coop-gov { border-top: 3px solid #1e4fd8; }
.coop-biz { border-top: 3px solid #0d9488; }
.coop-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.coop-head b { font-size: 15px; font-weight: 700; color: var(--ink); }
.coop-head span { font-size: 12px; color: var(--ink-3); }
.coop ul { margin: 0; padding-left: 0; list-style: none; }
.coop li {
  position: relative; padding-left: 18px; margin-bottom: 9px;
  font-size: 12.5px; line-height: 1.75; color: var(--ink-2);
}
.coop li::before {
  content: ''; position: absolute; left: 2px; top: 9px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
}
.coop-biz li::before { background: #0d9488; }

/* ---------- 政策依据 ---------- */
.basis-list {
  margin: 0; padding: 16px 20px 16px 34px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  font-size: 12px; line-height: 1.9; color: var(--ink-2);
}
.basis-list li { margin-bottom: 4px; }

/* ---------- 联系 ---------- */
.home-contact {
  display: flex; justify-content: space-between; align-items: center;
  gap: 18px; flex-wrap: wrap;
  background: linear-gradient(135deg, #12224d, #1e4fd8);
  color: #fff; border-radius: 16px; padding: 24px 28px;
}
.hc-l b { font-size: 15px; font-weight: 700; display: block; margin-bottom: 5px; }
.hc-l p { margin: 0; font-size: 12.5px; color: rgba(255, 255, 255, .78); }
.hc-r { display: flex; gap: 22px; flex-wrap: wrap; }
.hc-r span { font-size: 13px; color: #fff; display: flex; flex-direction: column; gap: 2px; }
.hc-r i { font-style: normal; font-size: 11px; color: rgba(255, 255, 255, .6); letter-spacing: .06em; }

/* ---------- 深色适配 ---------- */
html[data-theme="dark"] .tier-badge.tone-blue   { background: #16233f; color: #7da4ff; }
html[data-theme="dark"] .tier-badge.tone-indigo { background: #1e1d3d; color: #a5a1ff; }
html[data-theme="dark"] .tier-badge.tone-teal   { background: #102a26; color: #4fd1bd; }
html[data-theme="dark"] .tier-badge.tone-amber  { background: #2b2210; color: #f0b429; }
html[data-theme="dark"] .tier-badge.tone-slate  { background: #1c2431; color: #9aa8bd; }
html[data-theme="dark"] .home-hero {
  background:
    radial-gradient(760px 380px at 8% -10%, rgba(91, 140, 255, .12), transparent 62%),
    var(--card);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .flow-step:nth-child(3n) { border-right: none; }
  .flow-step:nth-child(-n+3) { border-bottom: 1px solid var(--line-soft); }
}
@media (max-width: 860px) {
  .home-hero { padding: 26px 20px 22px; border-radius: 14px; }
  .home-hero h1 { font-size: 24px; letter-spacing: -.4px; }
  .hh-lede { font-size: 13px; }
  .hh-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .hs-n { font-size: 24px; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-step:nth-child(2n) { border-right: none; }
  .flow-step { border-bottom: 1px solid var(--line-soft); }
  .home-contact { padding: 20px; }
  .sec-head h2 { font-size: 15.5px; }
}

/* ---------- 打印（会谈时直接给纸质版 / PDF） ---------- */
@media print {
  .sidebar, .head-actions, .hh-actions, .home-contact .hc-r { display: none !important; }
  .main { padding: 0 !important; max-width: none !important; }
  .home-hero, .tier, .cap, .flow, .coop, .basis-list {
    box-shadow: none !important; break-inside: avoid;
  }
  .home-sec { break-inside: avoid; }
  .home-contact { background: #fff !important; color: #000 !important; border: 1px solid #ccc; }
  .home-contact .hc-l b, .home-contact .hc-l p { color: #000 !important; }
  .home-hero { padding: 0 0 18px; border: none; }
  body { font-size: 12px; }
}

/* 联系区：主体全称 */
.hc-l .hc-legal {
  font-size: 12.5px;
  color: rgba(255, 255, 255, .88);
  margin: 0 0 6px 0;
  letter-spacing: .02em;
}

/* ============================================================
   品牌 LOGO 接入（替换原"远"字标记）
   ============================================================ */
.logo-mark {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  width: 38px; height: 38px; flex: 0 0 38px;
  padding: 0; overflow: visible;
}
.logo-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.logo-txt b {
  font-size: 13px;
  letter-spacing: -.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-logo {
  background: transparent;
  box-shadow: none;
  width: 46px; height: 46px; border-radius: 0;
  padding: 0; margin-bottom: 14px;
}
.auth-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }

.ah-mark {
  background: rgba(255, 255, 255, .92);
  border: none;
  padding: 6px;
  width: 40px; height: 40px;
  box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .5);
}
.ah-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }

@media (max-width: 860px) {
  .logo-txt b { font-size: 13px; }
}

/* ============================================================
   客户管理
   ============================================================ */
.bg-brand { background: var(--brand); }
.bg-warn { background: var(--warn); }
.bg-ok { background: var(--ok); }
.bg-danger { background: var(--danger); }
.bg-mute { background: #a8b3c7; }

/* 阶段漏斗 */
.crm-funnel {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.crm-fn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  border: 1px solid var(--line); background: var(--card);
  border-radius: 10px; padding: 10px 11px; cursor: pointer;
  font-family: inherit; text-align: left;
  transition: border-color .15s, box-shadow .15s, background .15s;
  position: relative; overflow: hidden;
}
.crm-fn::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--line);
}
.crm-fn.bg-brand::before { background: var(--brand); }
.crm-fn.bg-warn::before { background: var(--warn); }
.crm-fn.bg-ok::before { background: var(--ok); }
.crm-fn.bg-danger::before { background: var(--danger); }
.crm-fn.bg-mute::before { background: #a8b3c7; }
.crm-fn b { font-size: 20px; font-weight: 800; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.crm-fn span { font-size: 11.5px; color: var(--ink-3); }
.crm-fn:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.crm-fn.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand) inset; }
.crm-fn.on span { color: var(--brand); font-weight: 600; }

/* 工具条 */
.crm-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crm-tools input[type=text] {
  flex: 1; min-width: 220px; padding: 7px 11px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); color: var(--ink);
}
.crm-tools input[type=text]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30,79,216,.1); }
.crm-count { font-size: 12px; color: var(--ink-4); margin-left: auto; }

/* 表格 */
.crm-tbl th { white-space: nowrap; }
.crm-row { cursor: pointer; }
.crm-row:hover td { background: var(--brand-soft); }
.crm-name { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.crm-sub { font-size: 11.5px; color: var(--ink-4); margin-top: 2px; }
.crm-dash { color: var(--ink-4); }
.crm-next {
  max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12.5px; color: var(--ink-2);
}
.crm-bar {
  height: 6px; border-radius: 4px; background: var(--line-soft); overflow: hidden;
}
.crm-bar > i { display: block; height: 100%; border-radius: 4px; transition: width .3s; }
.crm-pct { font-size: 11px; color: var(--ink-4); margin-top: 3px; font-variant-numeric: tabular-nums; }
.crm-over { color: var(--danger); font-weight: 600; }
.crm-over-t {
  display: inline-block; margin-left: 5px; font-size: 10.5px; font-weight: 600;
  color: #fff; background: var(--danger); border-radius: 4px; padding: 0 4px;
}
.crm-act { white-space: nowrap; }
.crm-act .btn { margin-right: 4px; }

/* 详情抽屉 */
.crm-dsec { margin-bottom: 20px; }
.crm-dsec:first-child { margin-top: 0; }
.crm-dsec h4 {
  font-size: 12.5px; font-weight: 700; color: var(--ink);
  margin: 0 0 10px 0; padding-bottom: 6px;
  border-bottom: 1px solid var(--line-soft);
}
.crm-stages { display: flex; flex-wrap: wrap; gap: 6px; }
.crm-sc {
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  border-radius: 999px; padding: 5px 13px; font-size: 12.5px;
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.crm-sc:hover { border-color: var(--brand); color: var(--brand); }
.crm-sc.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.crm-dfoot {
  display: flex; gap: 8px; align-items: center;
  padding-top: 14px; border-top: 1px solid var(--line-soft);
}

/* 轻提示 */
.crm-toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 12px);
  background: #1f2937; color: #fff; font-size: 13px;
  padding: 10px 18px; border-radius: 10px; z-index: 400;
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, .5);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  max-width: 82vw; line-height: 1.6;
}
.crm-toast.on { opacity: 1; transform: translate(-50%, 0); }
html[data-theme="dark"] .crm-toast { background: #e8edf7; color: #10151f; }

@media (max-width: 1080px) {
  .crm-funnel { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .crm-funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crm-next { max-width: 120px; }
  .crm-tools input[type=text] { min-width: 0; width: 100%; }
  .crm-count { margin-left: 0; }
}
