:root {
  --header-h: 56px;
  --bg: #060911;
  --sidebar: #0b101b;
  --panel: #111826;
  --panel2: #182235;
  --hover: rgba(56, 189, 248, 0.075);
  --line-sep: rgba(148, 163, 184, 0.065);
  --line: rgba(148, 163, 184, 0.085);
  --line-soft: rgba(148, 163, 184, 0.045);
  --line-ctrl: rgba(148, 163, 184, 0.13);
  --text: #e5ecf6;
  --muted: #8a9bb5;
  --accent: #38bdf8;
  --accent-bg: rgba(56, 189, 248, 0.12);
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;
  --pink: #c084fc;
  /* 统一正上方顶光立体材质系统（顶沿高光 + 底部多层接触投影 + 内凹槽） */
  --hdr-grad: linear-gradient(180deg, #131b2c 0%, #0b101b 100%);
  --stage-grad: radial-gradient(ellipse 85% 42% at 52% -8%, rgba(14, 165, 233, 0.085), transparent 68%),
                radial-gradient(ellipse 60% 50% at 90% 105%, rgba(56, 189, 248, 0.04), transparent 70%), #060911;
  --card-grad: linear-gradient(180deg, #162033 0%, #0e1523 100%);
  --card-grad-hover: linear-gradient(180deg, #1b2840 0%, #111a2c 100%);
  --card-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.085), inset 0 -1px 0 rgba(0, 0, 0, 0.45),
                 0 12px 28px -8px rgba(0, 0, 0, 0.75), 0 3px 8px rgba(0, 0, 0, 0.48);
  --card-shadow-hover: inset 0 1px 0 rgba(255, 255, 255, 0.14),
                       0 16px 32px -8px rgba(0, 0, 0, 0.82), 0 4px 12px rgba(14, 165, 233, 0.15);
  --well-bg: rgba(4, 7, 14, 0.72);
  --well-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.62), inset 0 0 0 1px rgba(0, 0, 0, 0.25),
                 0 1px 0 rgba(255, 255, 255, 0.045);
  --btn-grad: linear-gradient(180deg, #1f2d46 0%, #131c2d 100%);
  --btn-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.095), 0 2px 5px rgba(0, 0, 0, 0.46);
  --btn-pri-grad: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  --btn-pri-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), inset 0 -1px 0 rgba(0, 0, 0, 0.25),
                    0 4px 12px rgba(2, 132, 199, 0.42), 0 1px 3px rgba(0, 0, 0, 0.5);
  font-size: 13px;
}

* { box-sizing: border-box; }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.18); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.32); }
::-webkit-scrollbar-corner { background: transparent; }

html, body {
  height: 100%; margin: 0; background: var(--bg); color: var(--text);
  font-family: "Inter", "Microsoft YaHei", "Segoe UI", sans-serif; overflow: hidden;
}
code, pre, .mono { font-family: "Cascadia Mono", Consolas, monospace; }

/* ==================== 整体 App Shell（左右顶栏严格 56px 共线 + 弱化分割线 + 防溢出） ==================== */
.app-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); height: 100vh; width: 100vw; overflow: hidden; }

/* 左侧分组侧边栏（带右侧微景深投影） */
.sidebar {
  position: relative; z-index: 4;
  background: linear-gradient(180deg, #0e1422 0%, #090d16 100%);
  border-right: 1px solid var(--line-sep);
  box-shadow: 6px 0 22px -6px rgba(0, 0, 0, 0.65);
  display: flex; flex-direction: column; overflow-y: auto; user-select: none;
}
.brand-box {
  position: sticky; top: 0; z-index: 5;
  height: var(--header-h); min-height: var(--header-h); max-height: var(--header-h);
  padding: 0 16px;
  background: var(--hdr-grad);
  border-bottom: 1px solid var(--line-sep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 4px 12px rgba(0, 0, 0, 0.32);
  display: flex; flex-direction: column; justify-content: center; flex-shrink: 0;
}
.brand-box .b-row { display: flex; align-items: center; gap: 8px; line-height: 1.15; }
.brand-box .logo {
  width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(145deg, #38bdf8 0%, #0284c7 100%); color: #fff;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.42), 0 3px 9px rgba(14, 165, 233, 0.4);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
  font-weight: 800; display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; flex-shrink: 0;
}
.brand-box .title { font-weight: 700; font-size: 14px; color: #f8fafc; letter-spacing: 0.2px; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.brand-box .sub {
  color: var(--muted); font-size: 11px; margin-top: 3px; line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.nav-group { padding: 3.5px 8px 1px; }
.nav-group-title { font-size: 10.5px; font-weight: 600; color: #5f718a; letter-spacing: 0.5px; padding: 0 8px 2px; text-shadow: 0 1px 1px rgba(0,0,0,0.45); }
.nav-item {
  width: 100%; height: 25px; display: flex; align-items: center; justify-content: space-between; gap: 6px;
  background: transparent; border: 1px solid transparent; box-shadow: none; color: #c5d1e0;
  padding: 0 9px; border-radius: 6px; cursor: pointer; text-align: left;
  font-size: 12px; line-height: 1; margin-bottom: 1px; transition: all .14s;
}
.nav-item:hover {
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.09) 0%, rgba(148, 163, 184, 0.03) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); color: #fff;
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.2) 0%, rgba(14, 165, 233, 0.06) 100%);
  border-color: rgba(56, 189, 248, 0.22);
  box-shadow: inset 2.5px 0 0 #38bdf8, inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 4px 10px rgba(2, 132, 199, 0.18);
  color: #7dd3fc; font-weight: 600;
}
.nav-item .ni-left { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-badge {
  flex-shrink: 0; white-space: nowrap; line-height: 1.2;
  font-size: 10.5px; padding: 1px 5px; border-radius: 10px;
  background: rgba(4, 8, 15, 0.55); border: 1px solid rgba(148, 163, 184, 0.09);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45); color: #8fa0b8; font-family: Consolas, monospace;
}
.nav-item.active .nav-badge {
  background: rgba(56, 189, 248, 0.2); border-color: rgba(56, 189, 248, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14); color: #bae6fd;
}

.sidebar-foot {
  margin-top: auto; padding: 7px 12px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.38) 100%);
  border-top: 1px solid var(--line-sep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  font-size: 11px; color: var(--muted); line-height: 1.45;
}

/* 右侧主工作区（深邃环境顶光舞台） */
.main-stage { display: flex; flex-direction: column; height: 100vh; min-width: 0; overflow: hidden; background: var(--stage-grad); }

/* 顶部全域指令检索栏（与左侧 .brand-box 严格同高 56px、同渐变材质、同底边投影） */
.top-cmdbar {
  position: relative; z-index: 3;
  height: var(--header-h); min-height: var(--header-h); max-height: var(--header-h);
  padding: 0 16px;
  border-bottom: 1px solid var(--line-sep);
  background: var(--hdr-grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 4px 14px rgba(0, 0, 0, 0.38);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-shrink: 0;
}
.omnibox {
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 200px; max-width: 450px;
  background: var(--well-bg); border: 1px solid var(--line-ctrl);
  box-shadow: var(--well-shadow);
  border-radius: 8px; padding: 5px 11px; transition: all .15s;
}
.omnibox:focus-within {
  background: rgba(8, 13, 24, 0.92); border-color: rgba(56, 189, 248, 0.55);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.55), 0 0 0 3px rgba(56, 189, 248, 0.16);
}
.omnibox input { background: transparent; border: none; outline: none; color: var(--text); width: 100%; font-size: 12.4px; }
.kbd {
  font-size: 10.5px; padding: 1px 5px; border-radius: 4px;
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.14) 0%, rgba(148, 163, 184, 0.06) 100%);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 2px rgba(0, 0, 0, 0.4);
  color: #9fb0c7; font-family: Consolas, monospace; white-space: nowrap;
}
.top-right { display: flex; align-items: center; gap: 10px; font-size: 12px; flex-shrink: 0; white-space: nowrap; }
#dataset { width: 225px; max-width: 225px; }
.status-dot {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 12px; white-space: nowrap; flex-shrink: 0;
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.16) 0%, rgba(16, 185, 129, 0.07) 100%);
  border: 1px solid rgba(52, 211, 153, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 2px 8px rgba(16, 185, 129, 0.18);
  color: var(--ok); font-weight: 600;
}
.status-dot.err { background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, 0.24); color: var(--err); }

/* 内容滚动容器（紧凑贴边 + 单屏弹性撑满到底） */
.workspace-body {
  flex: 1; min-height: 0; min-width: 0; overflow-y: auto;
  padding: 7px 8px 7px; display: flex; flex-direction: column;
}
.view { display: none; min-width: 0; }
.view.active { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#view-tools.active, #view-upload.active, #view-collectors.active { display: block; flex: none; }

#ledger-grid-mount, #mat-grid-mount, #bom-grid-mount, #routing-grid-mount,
#eq-grid-mount, #qual-grid-mount, #pt-grid-mount, #eqt-grid-mount,
#sfa-grid-mount, #eval-grid, #shape-grid, #rv-grid {
  flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: column;
}

/* ==================== KPI 指标带（顶光立体仪表卡 + 宝石发光徽章） ==================== */
.kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 8px; flex-shrink: 0; }
.kpi-box {
  background: radial-gradient(125px circle at 22px 22px, color-mix(in srgb, var(--kc, #38bdf8) 15%, transparent), transparent 72%), var(--card-grad);
  border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--card-shadow);
  padding: 8px 12px; cursor: pointer; transition: background .16s, border-color .16s, box-shadow .16s, transform .14s;
}
.kpi-box:hover {
  background: radial-gradient(135px circle at 22px 22px, color-mix(in srgb, var(--kc, #38bdf8) 22%, transparent), transparent 75%), var(--card-grad-hover);
  border-color: color-mix(in srgb, var(--kc, #38bdf8) 38%, transparent);
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}
.kpi-box .kv-num, .kpi-box .num { font-size: 18.5px; font-weight: 700; color: #f8fafc; font-family: "Cascadia Mono", Consolas, sans-serif; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.kpi-box .kv-lbl, .kpi-box .lbl { font-size: 11.5px; color: var(--muted); margin-top: 2px; display: flex; justify-content: space-between; }

/* ==================== 企业级多维表格组件 (DataGrid · 立体台面与凹槽控件) ==================== */
.grid-card {
  flex: 1; min-height: 0; min-width: 0;
  background: var(--card-grad); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--card-shadow);
  overflow: hidden; display: flex; flex-direction: column;
}
#view-tools .grid-card, #view-collectors .grid-card, #view-upload .grid-card { flex: none; }
.grid-toolbar {
  flex-shrink: 0;
  padding: 6px 11px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.038) 0%, rgba(255, 255, 255, 0.008) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
  border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 7px; align-items: center; justify-content: space-between;
}
.gt-left, .gt-right { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.gt-title { font-weight: 700; font-size: 13.2px; color: #f1f5f9; margin-right: 4px; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55); }
.gt-search {
  background: var(--well-bg); color: var(--text); border: 1px solid var(--line-ctrl);
  box-shadow: var(--well-shadow);
  border-radius: 6px; padding: 4px 9px; height: 28px; width: 190px; font-size: 12.2px; outline: none; transition: all .14s;
}
.gt-search:focus { border-color: rgba(56, 189, 248, 0.55); box-shadow: inset 0 2px 4px rgba(0,0,0,0.55), 0 0 0 2.5px rgba(56, 189, 248, 0.18); }
select {
  background: var(--well-bg); color: var(--text); border: 1px solid var(--line-ctrl);
  box-shadow: var(--well-shadow);
  border-radius: 6px; padding: 2px 8px; height: 28px; font-size: 12.2px; outline: none; transition: all .14s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
select:focus { border-color: rgba(56, 189, 248, 0.55); box-shadow: inset 0 2px 4px rgba(0,0,0,0.55), 0 0 0 2.5px rgba(56, 189, 248, 0.18); }

/* 行高密度切换按钮组（内凹滑槽 + 凸起键帽） */
.density-group {
  display: inline-flex; align-items: center; gap: 2px;
  background: var(--well-bg); box-shadow: var(--well-shadow);
  padding: 2px; border-radius: 6px; border: 1px solid var(--line);
}
.den-btn {
  height: 22px; padding: 0 7px; border-radius: 4px; border: 1px solid transparent; box-shadow: none;
  background: transparent; color: #8fa0b8; font-size: 11.5px; line-height: 1; cursor: pointer;
}
.den-btn .ico { width: 12px; height: 12px; }
.den-btn:hover:not(.active) { color: #f1f5f9; background: rgba(255, 255, 255, 0.06); border-color: transparent; }
.den-btn.active {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.28) 0%, rgba(2, 132, 199, 0.18) 100%);
  border-color: rgba(56, 189, 248, 0.36);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 2px 5px rgba(0, 0, 0, 0.45);
  color: #bae6fd; font-weight: 600;
}

.facet-pills {
  flex-shrink: 0;
  display: flex; gap: 5px; flex-wrap: wrap; padding: 5px 11px;
  background: linear-gradient(180deg, rgba(3, 6, 12, 0.46) 0%, rgba(3, 6, 12, 0.24) 100%);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--line-soft);
}
.fpill {
  font-size: 11.5px; padding: 1.5px 9px; border-radius: 11px;
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.1) 0%, rgba(148, 163, 184, 0.04) 100%);
  border: 1px solid rgba(148, 163, 184, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.3);
  color: #cbd5e1; cursor: pointer; transition: all .12s; line-height: 1.35;
}
.fpill:hover { background: rgba(148, 163, 184, 0.16); color: #fff; transform: translateY(-0.5px); }
.fpill.active {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.26) 0%, rgba(2, 132, 199, 0.16) 100%);
  color: #bae6fd; border-color: rgba(56, 189, 248, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 7px rgba(2, 132, 199, 0.28);
  font-weight: 600;
}

.table-scroll { flex: 1; min-height: 0; overflow: auto; }
#view-tools .table-scroll, #view-collectors .table-scroll, #view-upload .table-scroll { flex: none; max-height: 350px; }
table.dgrid { width: 100%; border-collapse: collapse; font-size: 12.3px; }
table.dgrid th {
  position: sticky; top: 0; z-index: 2;
  background: linear-gradient(180deg, #1a263c 0%, #111929 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.065), 0 3px 8px rgba(0, 0, 0, 0.36);
  color: #9cb0cb; font-weight: 600; font-size: 12px;
  height: 33px; padding: 0 10px; border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  text-align: left; white-space: nowrap; cursor: pointer; user-select: none; vertical-align: middle;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}
table.dgrid th:hover { color: #f8fafc; background: linear-gradient(180deg, #21304b 0%, #152035 100%); }
table.dgrid th .sort-ic { font-size: 10px; margin-left: 4px; opacity: 0.55; }

/* 默认紧凑单行（34px 严格等高） */
table.dgrid td {
  height: 34px; max-height: 34px; padding: 0 10px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle; line-height: 1.25; color: #dbe4ef; white-space: nowrap;
}
table.dgrid td .cell-clip {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 22px;
}

/* 标准单行（40px 舒适等高） */
.grid-card[data-density="standard"] table.dgrid th { height: 36px; }
.grid-card[data-density="standard"] table.dgrid td { height: 40px; max-height: 40px; }
.grid-card[data-density="standard"] table.dgrid td .cell-clip { line-height: 24px; }

/* 双行限高（最多 2 行，杜绝 3~4 行无限撑高） */
.grid-card[data-density="wrap2"] table.dgrid td {
  height: auto; max-height: none; padding: 5px 10px; white-space: normal;
}
.grid-card[data-density="wrap2"] table.dgrid td .cell-clip {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  white-space: normal; overflow: hidden; line-height: 1.36; max-height: 2.72em; word-break: break-word;
}

/* 点击任意单行可临时展开/收起查看该行全文 */
table.dgrid tr.row-expanded td {
  height: auto !important; max-height: none !important; padding: 6px 10px !important;
  white-space: normal !important; background: rgba(56, 189, 248, 0.045) !important; vertical-align: top;
}
table.dgrid tr.row-expanded td .cell-clip {
  display: block !important; white-space: normal !important; overflow: visible !important;
  text-overflow: clip !important; max-height: none !important; -webkit-line-clamp: unset !important;
  line-height: 1.45 !important; word-break: break-word;
}

table.dgrid tr:nth-child(even) td { background: rgba(255, 255, 255, 0.012); }
table.dgrid tr:hover td { background: var(--hover); }
table.dgrid tr:hover td:first-child { box-shadow: inset 2.5px 0 0 var(--accent); }
.row-idx { color: #576a82; font-family: Consolas, monospace; width: 34px; text-align: right !important; }

/* 可点击穿透实体胶囊（微浮雕阳极铭牌质感） */
.code-link {
  display: inline-flex; align-items: center; gap: 3px;
  font-family: "Cascadia Mono", Consolas, monospace; font-size: 11.8px;
  height: 20px; line-height: 18px; padding: 0 6px; border-radius: 4px; vertical-align: middle;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.16) 0%, rgba(2, 132, 199, 0.07) 100%);
  border: 1px solid rgba(56, 189, 248, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 2px rgba(0, 0, 0, 0.32);
  color: #7dd3fc; cursor: pointer; transition: all .12s; white-space: nowrap;
}
.code-link:hover {
  background: var(--btn-pri-grad); color: #ffffff; border-color: rgba(125, 211, 252, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 2px 7px rgba(14, 165, 233, 0.4);
  font-weight: 600;
}

.src-pill {
  display: inline-flex; align-items: center; font-size: 11px;
  height: 20px; line-height: 18px; padding: 0 6px; border-radius: 4px; vertical-align: middle;
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.15) 0%, rgba(5, 150, 105, 0.07) 100%);
  border: 1px solid rgba(52, 211, 153, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 2px rgba(0, 0, 0, 0.3);
  color: #6ee7b7; cursor: pointer; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.src-pill:hover {
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.26) 0%, rgba(5, 150, 105, 0.14) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 2px 6px rgba(16, 185, 129, 0.28);
}

/* 状态徽章 */
.tag {
  display: inline-flex; align-items: center; height: 20px; line-height: 18px;
  padding: 0 7px; border-radius: 4px; font-size: 11.3px; vertical-align: middle;
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.12) 0%, rgba(148, 163, 184, 0.05) 100%);
  border: 1px solid rgba(148, 163, 184, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 1px 2px rgba(0, 0, 0, 0.26);
  white-space: nowrap;
}
.tag.ok { color: var(--ok); background: linear-gradient(180deg, rgba(52, 211, 153, 0.16) 0%, rgba(16, 185, 129, 0.07) 100%); border-color: rgba(52, 211, 153, 0.26); }
.tag.warn { color: var(--warn); background: linear-gradient(180deg, rgba(251, 191, 36, 0.16) 0%, rgba(217, 119, 6, 0.07) 100%); border-color: rgba(251, 191, 36, 0.26); }
.tag.err { color: var(--err); background: linear-gradient(180deg, rgba(248, 113, 113, 0.18) 0%, rgba(220, 38, 38, 0.08) 100%); border-color: rgba(248, 113, 113, 0.3); font-weight: 600; }
.tag.pink { color: var(--pink); background: linear-gradient(180deg, rgba(192, 132, 252, 0.17) 0%, rgba(147, 51, 234, 0.07) 100%); border-color: rgba(192, 132, 252, 0.26); }

/* 立体微浮雕按钮 */
button {
  background: var(--btn-grad); color: var(--text); border: 1px solid var(--line-ctrl);
  box-shadow: var(--btn-shadow);
  border-radius: 6px; padding: 4px 10px; font-size: 12.2px; cursor: pointer; transition: all .12s;
}
button:hover:not(:disabled) {
  background: linear-gradient(180deg, #273857 0%, #182338 100%);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 4px 10px rgba(0, 0, 0, 0.5);
  color: #fff;
}
button:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}
button.primary {
  background: var(--btn-pri-grad); color: #ffffff; border-color: rgba(125, 211, 252, 0.32);
  box-shadow: var(--btn-pri-shadow);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28); font-weight: 600;
}
button.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #56cbf9 0%, #0ea5e9 100%); color: #ffffff;
  border-color: rgba(186, 230, 253, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48), 0 6px 16px rgba(14, 165, 233, 0.48), 0 2px 4px rgba(0, 0, 0, 0.5);
}
button.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
button.ghost:hover:not(:disabled) {
  background: rgba(148, 163, 184, 0.1); color: #f1f5f9; border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.subbar {
  display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: nowrap; flex-shrink: 0;
  overflow-x: auto; scrollbar-width: none; align-items: center;
}
.subbar::-webkit-scrollbar { display: none; }
.subbar button {
  background: linear-gradient(180deg, #182236 0%, #101726 100%); border-color: var(--line);
  white-space: nowrap; flex-shrink: 0;
}
.subbar button.active {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.24) 0%, rgba(2, 132, 199, 0.12) 100%);
  border-color: rgba(56, 189, 248, 0.36);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 3px 9px rgba(2, 132, 199, 0.22);
  color: #bae6fd; font-weight: 600;
}

/* ==================== AI Copilot 现代对话与查重双栏 ==================== */
.copilot-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 9px; flex: 1; min-height: 0; }
.chat-panel { background: var(--card-grad); border: 1px solid var(--line); box-shadow: var(--card-shadow); border-radius: 10px; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.chat-feed { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }
.msg-user {
  align-self: flex-end;
  background: linear-gradient(180deg, #0ea5e9 0%, #0369a1 100%); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 4px 12px rgba(2, 132, 199, 0.35);
  padding: 8px 12px; border-radius: 10px 10px 2px 10px; max-width: 82%; line-height: 1.5;
}
.msg-ai {
  align-self: flex-start;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.042) 0%, rgba(255, 255, 255, 0.016) 100%);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 12px rgba(0, 0, 0, 0.36);
  padding: 10px 14px; border-radius: 10px 10px 10px 2px; max-width: 96%; line-height: 1.6; white-space: pre-wrap;
}
.chat-foot { padding: 10px 12px; border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(6, 10, 18, 0.35) 0%, rgba(4, 7, 14, 0.65) 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,0.035); }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chip {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.13) 0%, rgba(2, 132, 199, 0.06) 100%);
  border: 1px solid rgba(56, 189, 248, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 1px 3px rgba(0, 0, 0, 0.3);
  color: #bae6fd; border-radius: 14px; padding: 3px 10px; font-size: 11.8px; cursor: pointer; transition: all .12s;
}
.chip:hover { border-color: rgba(56, 189, 248, 0.5); background: rgba(56, 189, 248, 0.2); transform: translateY(-1px); }

/* ==================== 图谱画布 & CAD 空间 ==================== */
.split-graph { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 9px; flex: 1; min-height: 0; }
.graph-wrap { background: var(--card-grad); border: 1px solid var(--line); box-shadow: var(--card-shadow); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; overflow: hidden; position: relative; min-height: 0; }
.kg-stage {
  position: relative; flex: 1; min-height: 0; width: 100%;
  display: flex; flex-direction: column; border-radius: 9px; overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.2);
  box-shadow: inset 0 0 42px rgba(2, 132, 199, 0.12), inset 0 3px 12px rgba(0, 0, 0, 0.78);
  background: radial-gradient(ellipse 75% 70% at 50% 48%, #0d1a2f 0%, #060b16 62%, #03060c 100%);
}
#kg-canvas {
  width: 100%; height: 100%; flex: 1; min-height: 0; display: block;
  background: transparent; border: none; cursor: grab;
}
#kg-canvas:active { cursor: grabbing; }
.kg-hud-top {
  position: absolute; right: 12px; top: 10px; z-index: 5;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 7px; border-radius: 8px;
  background: rgba(6, 11, 22, 0.82); backdrop-filter: blur(8px);
  border: 1px solid rgba(56, 189, 248, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 6px 18px rgba(0, 0, 0, 0.55);
}
.kg-stat {
  font-family: "Cascadia Mono", Consolas, monospace; font-size: 10.8px;
  color: #7dd3fc; padding: 0 6px; letter-spacing: 0.3px; white-space: nowrap;
}
.kg-hud-btn {
  height: 23px; padding: 0 8px; font-size: 11px; border-radius: 5px;
  background: rgba(30, 45, 72, 0.65); border: 1px solid rgba(148, 163, 184, 0.18);
  color: #cbd5e1; box-shadow: none;
}
.kg-hud-btn:hover { border-color: rgba(56, 189, 248, 0.55); color: #fff; background: rgba(14, 165, 233, 0.25); }
.kg-hud-btn.active {
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.36) 0%, rgba(2, 132, 199, 0.2) 100%);
  border-color: rgba(56, 189, 248, 0.55); color: #bae6fd;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}
.graph-help { position: absolute; left: 12px; bottom: 10px; z-index: 4; background: rgba(6, 11, 22, 0.82); backdrop-filter: blur(6px); border: 1px solid rgba(56, 189, 248, 0.18); box-shadow: 0 4px 12px rgba(0,0,0,0.55); border-radius: 6px; padding: 4px 10px; font-size: 11.2px; color: #94a9c4; pointer-events: none; }
.legend { font-size: 11.5px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; box-shadow: 0 0 6px currentColor; }

.split { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 9px; height: calc(100vh - 108px); }
.panel { background: var(--card-grad); border: 1px solid var(--line); box-shadow: var(--card-shadow); border-radius: 10px; padding: 12px; overflow: auto; }
.panel h3 { margin: 0 0 8px; font-size: 13.5px; color: var(--accent); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.viewer { width: 100%; height: 400px; background: radial-gradient(#1b2536, #080c14); border: 1px solid var(--line); box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.6); border-radius: 8px; position: relative; }
.viewer .hint { position: absolute; left: 10px; bottom: 8px; color: var(--muted); font-size: 11.5px; pointer-events: none; }
.viewer .pick { position: absolute; right: 10px; top: 8px; background: rgba(11,15,23,.9); border: 1px solid var(--line); padding: 6px 10px; border-radius: 5px; }
.item { padding: 7px 9px; border-radius: 6px; cursor: pointer; border: 1px solid transparent; margin-bottom: 3px; }
.item:hover { background: var(--panel2); }
.item.sel { border-color: rgba(56, 189, 248, 0.25); background: var(--accent-bg); }
.item .n { font-weight: 600; word-break: break-all; }
.item .m { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.drawing-img { max-width: 100%; border: 1px solid var(--line); border-radius: 6px; background: #fff; }

/* 拖拽批量入库中心 */
.dropzone { border: 1.5px dashed rgba(148, 163, 184, 0.22); border-radius: 10px; background: rgba(255, 255, 255, 0.015); padding: 32px 20px; text-align: center; cursor: pointer; transition: all .15s; margin-bottom: 14px; }
.dropzone:hover, .dropzone.dragover { border-color: var(--accent); background: rgba(56, 189, 248, 0.06); }
.dropzone .dz-icon { font-size: 32px; margin-bottom: 8px; }
.dropzone .dz-title { font-size: 15px; font-weight: 700; color: #f1f5f9; }
.dropzone .dz-sub { color: var(--muted); font-size: 12.5px; margin-top: 6px; }

/* ==================== 右侧滑出式全实体 360° 穿透抽屉 ==================== */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(4, 8, 14, 0.55); backdrop-filter: blur(2px); z-index: 90; display: none; }
.drawer-backdrop.open { display: block; }
.drawer { position: fixed; top: 0; right: -500px; width: 480px; max-width: 92vw; height: 100vh; background: #101725; border-left: 1px solid var(--line); box-shadow: -16px 0 42px rgba(0,0,0,0.6); z-index: 100; display: flex; flex-direction: column; transition: right .2s cubic-bezier(0.16, 1, 0.3, 1); }
.drawer.open { right: 0; }
.drawer-head { height: var(--header-h); padding: 0 16px; border-bottom: 1px solid var(--line-sep); background: var(--sidebar); display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 14px 16px 28px; }
.kv { display: grid; grid-template-columns: 84px 1fr 84px 1fr; gap: 5px 10px; font-size: 12.5px; }
.kv .k { color: var(--muted); }
.ev-box { background: rgba(255, 255, 255, 0.025); border-left: 3px solid var(--ok); padding: 7px 10px; margin-top: 6px; font-size: 12px; color: #cbd5e1; border-radius: 0 6px 6px 0; }
.muted { color: var(--muted); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ==================== 自动采集与连接器配置中心样式 ==================== */
.col-headbar {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  background: var(--card-grad); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--card-shadow);
  padding: 8px 12px; margin-bottom: 8px;
}
.sched-pill {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.2px;
  padding: 3px 11px; border-radius: 99px; background: rgba(16, 185, 129, 0.11);
  border: 1px solid rgba(16, 185, 129, 0.24); color: #6ee7b7;
}
.sched-pill.paused {
  background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.28); color: #fcd34d;
}
.modal-mask {
  position: fixed; inset: 0; background: rgba(4, 8, 15, 0.72); backdrop-filter: blur(3px);
  z-index: 90; display: none; align-items: center; justify-content: center; padding: 18px;
}
.modal-mask.open { display: flex; }
.modal-card {
  width: min(880px, 96vw); max-height: 92vh; display: flex; flex-direction: column;
  background: #101725; border: 1px solid rgba(148, 163, 184, 0.14); border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65); overflow: hidden;
}
.modal-head {
  padding: 13px 18px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; background: #131c2c;
}
.modal-body { padding: 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 13px; }
.modal-foot {
  padding: 11px 18px; border-top: 1px solid var(--line); background: #131c2c;
  display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap;
}
.stype-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stype-card {
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); border-radius: 8px; padding: 9px 10px;
  cursor: pointer; transition: all 0.15s; text-align: left;
}
.stype-card:hover { border-color: rgba(56, 189, 248, 0.4); background: rgba(255, 255, 255, 0.035); }
.stype-card.active {
  border-color: rgba(56, 189, 248, 0.55); background: rgba(56, 189, 248, 0.1);
}
.stype-card .st-t { font-weight: 600; font-size: 12.5px; color: #f1f5f9; margin-bottom: 3px; }
.stype-card .st-d { font-size: 11px; color: var(--muted); line-height: 1.35; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.f-item { display: flex; flex-direction: column; gap: 4px; }
.f-item label { font-size: 11.5px; color: #9fb0c7; font-weight: 500; }
.f-item input, .f-item select, .f-item textarea {
  background: var(--well-bg); border: 1px solid var(--line-ctrl); box-shadow: var(--well-shadow); color: #e2e8f0;
  border-radius: 6px; padding: 6px 9px; font-size: 12.5px; font-family: inherit;
}
.f-item textarea { font-family: Consolas, monospace; min-height: 62px; resize: vertical; }
.param-box {
  background: rgba(4, 7, 14, 0.45); border: 1px solid var(--line); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4); border-radius: 8px; padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.act-btns { display: inline-flex; gap: 4px; flex-wrap: nowrap; align-items: center; white-space: nowrap; }
.act-btns button { height: 23px; padding: 0 7px; font-size: 11.3px; line-height: 1; }

/* ==================== 专业企业级分页按钮组 (Pro Pagination Bar · 立体键帽) ==================== */
.grid-pagination {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding: 6px 11px;
  background: linear-gradient(180deg, rgba(8, 12, 22, 0.42) 0%, rgba(4, 7, 14, 0.72) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  border-top: 1px solid var(--line); user-select: none;
}
.pg-info { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.pg-info b { color: #e2e8f0; font-family: "Cascadia Mono", Consolas, monospace; font-weight: 600; }
.pg-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pg-size-sel {
  height: 28px; padding: 0 8px; font-size: 12px; border-radius: 6px;
  background: var(--well-bg); box-shadow: var(--well-shadow); border: 1px solid var(--line-ctrl); color: #cbd5e1; cursor: pointer;
}
.pg-btn-group {
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--well-bg); box-shadow: var(--well-shadow);
  padding: 3px; border-radius: 7px; border: 1px solid var(--line);
}
.pg-btn {
  min-width: 30px; height: 26px; padding: 0 8px; border-radius: 5px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.015) 100%);
  border: 1px solid rgba(148, 163, 184, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 1px 3px rgba(0, 0, 0, 0.4);
  color: #cbd5e1;
  font-size: 12px; font-family: "Cascadia Mono", "Microsoft YaHei", sans-serif;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.12s ease; line-height: 1;
}
.pg-btn:hover:not(:disabled):not(.active) {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.2) 0%, rgba(14, 165, 233, 0.08) 100%);
  border-color: rgba(56, 189, 248, 0.36); color: #ffffff;
}
.pg-btn.active {
  background: var(--btn-pri-grad); border-color: rgba(125, 211, 252, 0.38);
  box-shadow: var(--btn-pri-shadow); color: #ffffff; font-weight: 700;
}
.pg-btn.pg-nav { padding: 0 9px; font-weight: 500; color: #94a3b8; }
.pg-btn.pg-ellipsis {
  background: transparent; border-color: transparent; box-shadow: none; color: #64748b; letter-spacing: 1px;
}
.pg-btn.pg-ellipsis:hover {
  background: rgba(255, 255, 255, 0.05); color: var(--accent);
}
.pg-btn:disabled {
  opacity: 0.32; cursor: not-allowed; background: transparent; border-color: transparent; box-shadow: none; color: #475569;
}
.pg-jumper {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted);
}
.pg-jump-inp {
  width: 48px; height: 28px; text-align: center; border-radius: 6px;
  background: var(--well-bg); box-shadow: var(--well-shadow); border: 1px solid var(--line-ctrl); color: #f1f5f9;
  font-size: 12px; font-family: "Cascadia Mono", Consolas, monospace; outline: none;
}
.pg-jump-inp:focus { border-color: rgba(56, 189, 248, 0.55); }
.pg-btn.pg-go { height: 28px; padding: 0 10px; background: var(--btn-grad); box-shadow: var(--btn-shadow); border-color: var(--line-ctrl); }

/* ==================== 全站统一矢量图标规范 (.ico) ==================== */
i[data-ic], .ico {
  width: 14px; height: 14px; flex-shrink: 0; display: inline-block;
  stroke: currentColor; fill: none; stroke-width: 1.85;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -2px;
}
button {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
}
.nav-item { justify-content: space-between; }
.nav-group-title { display: flex; align-items: center; gap: 5px; }
.nav-group-title .ico { width: 12px; height: 12px; opacity: 0.75; }
.gt-title, .panel h3, .modal-head strong, .drawer-head strong, .col-headbar strong, .stype-card .st-t, .sec-hdr {
  display: inline-flex; align-items: center; gap: 6px;
}
.gt-title .ico, .panel h3 .ico, .modal-head strong .ico, .drawer-head strong .ico, .col-headbar strong .ico, .sec-hdr .ico {
  width: 15px; height: 15px; color: var(--accent);
}
.stype-card .st-t .ico { width: 15px; height: 15px; color: var(--accent); }
.pg-btn .ico { width: 13px; height: 13px; }
.act-btns button .ico { width: 12.5px; height: 12.5px; }
.dropzone .dz-icon .ico { width: 34px; height: 34px; color: var(--accent); stroke-width: 1.6; }

/* ==================== KPI 统计数字卡片图标徽章布局（3D 宝石浮雕） ==================== */
.kpi-box {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; position: relative;
}
.kpi-box.active {
  background: radial-gradient(140px circle at 22px 22px, color-mix(in srgb, var(--kc, #38bdf8) 24%, transparent), transparent 76%), var(--card-grad-hover);
  border-color: color-mix(in srgb, var(--kc, #38bdf8) 48%, transparent);
  box-shadow: inset 0 1.5px 0 color-mix(in srgb, var(--kc, #38bdf8) 65%, #ffffff),
              0 12px 26px -6px color-mix(in srgb, var(--kc, #38bdf8) 22%, rgba(0, 0, 0, 0.78)),
              0 3px 8px rgba(0, 0, 0, 0.5);
}
.kpi-ic {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--kc, #38bdf8);
  background: linear-gradient(145deg, color-mix(in srgb, var(--kc, #38bdf8) 24%, #1e293b) 0%, color-mix(in srgb, var(--kc, #38bdf8) 8%, #0b101b) 100%);
  border: 1px solid color-mix(in srgb, var(--kc, #38bdf8) 30%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 10px color-mix(in srgb, var(--kc, #38bdf8) 24%, rgba(0, 0, 0, 0.45));
}
.kpi-ic .ico { width: 15.5px; height: 15.5px; stroke-width: 1.9; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.45)); }
.kpi-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.kpi-row1 { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.kpi-box .kv-num { line-height: 1.1; }
.kpi-box .kv-lbl {
  margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;
}

/* ==================== v3.0 · 登录 / 用户 ==================== */
.user-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 3px 10px 3px 4px; border-radius: 99px;
  background: var(--btn-grad); border: 1px solid var(--line-ctrl); box-shadow: var(--btn-shadow);
  cursor: pointer; transition: all .12s;
}
.user-chip:hover { border-color: rgba(56,189,248,0.45); transform: translateY(-0.5px); }
.uc-avatar {
  width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg,#38bdf8,#0284c7); color: #fff; font-weight: 700; font-size: 12px;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.4), 0 2px 7px rgba(14,165,233,0.4);
}
.uc-meta { display: flex; flex-direction: column; line-height: 1.15; }
.uc-meta b { font-size: 12px; color: #f1f5f9; font-weight: 600; }
.uc-meta small { font-size: 10.5px; color: var(--muted); }
.login-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.login-card {
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; cursor: pointer; background: rgba(255,255,255,0.02);
  transition: all .12s;
}
.login-card:hover { border-color: rgba(56,189,248,0.45); }
.login-card.active { border-color: var(--accent); background: rgba(56,189,248,0.1); }
.login-card .lc-n { font-weight: 600; font-size: 12.5px; color: #f1f5f9; }
.login-card .lc-r { font-size: 11px; color: var(--muted); margin-top: 3px; }
.acl-banner {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px; margin-bottom: 10px; border-radius: 8px; font-size: 12px;
  background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.22); color: #fcd34d;
}

/* ==================== v3.0 · Agent 问答 ==================== */
.copilot-layout { grid-template-columns: 1.25fr 1fr; }
.agent-side { display: flex; flex-direction: column; gap: 10px; overflow: hidden; min-height: 0; }
.agent-trace-panel { flex: 1.15; overflow: auto; min-height: 0; }
.agent-src-panel { flex: 1; overflow: auto; min-height: 0; }
.trace-list { display: flex; flex-direction: column; gap: 6px; }
.trace-step {
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.035) 0%, rgba(255,255,255,0.012) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 3px 8px rgba(0,0,0,0.32);
  border-left: 3px solid var(--accent);
}
.trace-step.done { border-left-color: var(--ok); }
.trace-step.warn { border-left-color: var(--warn); }
.trace-step.running { border-left-color: var(--accent); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .65; } }
.trace-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12.3px; font-weight: 600; color: #e2e8f0; }
.trace-head .ms { font-family: Consolas, monospace; font-size: 11px; color: var(--muted); font-weight: 400; }
.trace-body { font-size: 11.6px; color: #b6c3d6; margin-top: 4px; line-height: 1.55; word-break: break-all; }
.trace-body code { color: #7dd3fc; }
.trace-body pre { white-space: pre-wrap; background: rgba(0,0,0,0.25); padding: 6px 8px; border-radius: 6px; margin: 4px 0 0; font-size: 11px; }
.msg-ai .md-table { border-collapse: collapse; margin: 6px 0; font-size: 12px; white-space: normal; }
.msg-ai .md-table td, .msg-ai .md-table th { border: 1px solid var(--line); padding: 3px 7px; }
.msg-ai .md-table th { background: rgba(255,255,255,0.04); }
.cite {
  display: inline-block; padding: 0 5px; margin: 0 1px; border-radius: 4px; font-size: 11px; font-family: Consolas, monospace;
  background: rgba(56,189,248,0.14); border: 1px solid rgba(56,189,248,0.3); color: #7dd3fc; cursor: pointer; vertical-align: 1px;
}
.cite:hover { background: var(--accent); color: #04101c; }
.faith-bar { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--line-soft); font-size: 11.5px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.src-card { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; margin-bottom: 6px; cursor: pointer; transition: all .12s; }
.src-card:hover { border-color: rgba(56,189,248,0.4); background: rgba(56,189,248,0.04); }
.src-card .sc-h { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; font-weight: 600; }
.src-card .sc-t { font-size: 11.5px; color: #b6c3d6; margin-top: 3px; line-height: 1.5; max-height: 54px; overflow: hidden; }
.chan { display: inline-block; font-size: 10px; padding: 0 5px; border-radius: 3px; margin-right: 3px; background: rgba(148,163,184,0.1); color: #94a3b8; }
.chan.dense { color: #a78bfa; } .chan.sparse { color: #fbbf24; } .chan.entity { color: #34d399; } .chan.graph { color: #f472b6; }

/* ==================== v3.0 · 文档库 / 页面红框查看器 ==================== */
.docs-layout { display: grid; grid-template-columns: 295px minmax(0, 1fr); gap: 9px; flex: 1; min-height: 0; }
.docs-list-panel { overflow: auto; min-height: 0; }
.docs-main { display: flex; flex-direction: column; gap: 9px; min-height: 0; min-width: 0; }
.docs-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 9px; flex: 1; min-height: 0; }
.docs-split > .panel { overflow: auto; min-height: 0; }
.doc-item { padding: 8px 9px; border-radius: 7px; border: 1px solid transparent; cursor: pointer; margin-bottom: 4px; }
.doc-item:hover { background: rgba(255,255,255,0.03); }
.doc-item.sel { border-color: rgba(56,189,248,0.35); background: var(--accent-bg); }
.doc-item .di-t { font-size: 12.3px; font-weight: 600; color: #e2e8f0; line-height: 1.35; }
.doc-item .di-m { font-size: 11px; color: var(--muted); margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; }
.upload-btn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 6px; font-size: 12px; cursor: pointer;
  background: var(--btn-pri-grad); box-shadow: var(--btn-pri-shadow); color: #fff; font-weight: 600; }
.upload-btn .ico { width: 13px; height: 13px; }
.ch-tg { font-size: 12px; color: #cbd5e1; display: inline-flex; align-items: center; gap: 3px; cursor: pointer; }
.hit-card {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 7px; cursor: pointer; transition: all .12s;
  background: linear-gradient(180deg, rgba(255,255,255,0.032) 0%, rgba(255,255,255,0.01) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 3px 9px rgba(0,0,0,0.34);
}
.hit-card:hover, .hit-card.sel { border-color: rgba(56,189,248,0.45); background: rgba(56,189,248,0.045); }
.hit-card .hc-h { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12px; }
.hit-card .hc-t {
  font-size: 12px; color: #cbd5e1; margin-top: 5px; line-height: 1.48;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; white-space: pre-wrap;
}
.hit-card.sel .hc-t { display: block; -webkit-line-clamp: unset; overflow: visible; }
.score-bar { height: 4px; border-radius: 2px; background: rgba(148,163,184,0.12); margin-top: 6px; overflow: hidden; }
.score-bar i { display: block; height: 100%; background: linear-gradient(90deg,#0ea5e9,#34d399); }
.page-stage { position: relative; display: block; width: 100%; max-width: 100%; }
.page-stage img {
  display: block; width: 100%; max-width: 100%; border-radius: 5px; background: #fff;
  transition: opacity .22s ease;
}
.page-stage.is-loading img {
  opacity: 0 !important; position: absolute; inset: 0; width: 1px; height: 1px; pointer-events: none;
}
.page-stage.is-loading .bbox-hl { display: none !important; }

/* 灰色工业工程图 / 文档等待加载矢量配图骨架 */
.img-wait-card {
  position: relative; width: 100%; overflow: hidden; border-radius: 7px;
  background: linear-gradient(180deg, #1d2430 0%, #161c26 100%);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  aspect-ratio: var(--wait-ar, 842 / 595); min-height: 220px; max-height: 460px;
  user-select: none;
}
.img-wait-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 28%, rgba(203, 213, 225, 0.08) 50%, transparent 72%);
  background-size: 240% 100%;
  animation: skelShimmer 1.6s ease-in-out infinite;
}
.img-wait-svg { width: 88%; height: auto; max-height: 74%; opacity: 0.78; pointer-events: none; }
.img-wait-caption {
  margin-top: 8px; display: inline-flex; align-items: center; gap: 7px;
  padding: 3px 12px; border-radius: 99px; font-size: 11.4px; color: #9ca3af;
  background: rgba(15, 20, 29, 0.72); border: 1px solid rgba(148, 163, 184, 0.22);
  position: relative; z-index: 2;
}
.img-wait-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #9ca3af;
  animation: pulse 1.2s ease-in-out infinite;
}
.img-wait-card.is-err::after { animation: none; opacity: 0; }
.img-wait-card.is-err .img-wait-caption { color: #cbd5e1; border-color: rgba(148, 163, 184, 0.35); }
.img-wait-retry {
  margin-top: 8px; height: 26px; padding: 0 12px; font-size: 11.5px; position: relative; z-index: 2;
}
.diff-stage .img-wait-card { max-height: 410px; }
.sec-wm-preview .img-wait-card { min-height: 215px; max-height: 294px; }
.bbox-hl {
  position: absolute; border: 2px solid #ef4444; background: rgba(239,68,68,0.12); border-radius: 2px;
  box-shadow: 0 0 0 2px rgba(239,68,68,0.25); pointer-events: none; animation: hlpulse 1.6s ease-in-out 2;
}
@keyframes hlpulse { 0%,100% { box-shadow: 0 0 0 2px rgba(239,68,68,0.25); } 50% { box-shadow: 0 0 0 6px rgba(239,68,68,0.15); } }
.pv-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.pv-nav { display: flex; gap: 4px; align-items: center; }
.xl-table { border-collapse: collapse; font-size: 11.5px; width: 100%; }
.xl-table th, .xl-table td { border: 1px solid var(--line); padding: 4px 6px; text-align: left; white-space: nowrap; }
.xl-table th { background: rgba(255,255,255,0.04); color: #94a3b8; }
.xl-table tr.tgt td { background: rgba(239,68,68,0.16); outline: 1px solid rgba(239,68,68,0.6); color: #fff; }
.drawer.wide { width: 760px; right: -800px; }
.drawer.wide.open { right: 0; }

/* ==================== v3.0 · 决策工具 / 形状 / 复核 / 评测 ==================== */
.tool-form { grid-template-columns: repeat(6, 1fr); }
.sc-hero { display: grid; grid-template-columns: 260px 1fr; gap: 12px; margin-bottom: 10px; }
.sc-big { font-size: 30px; font-weight: 800; color: #34d399; font-family: "Cascadia Mono", Consolas, monospace; }
.wf-row { display: grid; grid-template-columns: 170px 1fr 90px; gap: 8px; align-items: center; font-size: 12px; margin-bottom: 5px; }
.wf-bar { height: 14px; border-radius: 3px; background: rgba(148,163,184,0.08); position: relative; overflow: hidden; }
.wf-bar i { position: absolute; top: 0; bottom: 0; background: linear-gradient(90deg,#0ea5e9,#38bdf8); border-radius: 3px; }
.wf-row .v { text-align: right; font-family: Consolas, monospace; }
.impact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.impact-card { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; background: var(--card-grad); box-shadow: var(--card-shadow); border-top: 3px solid var(--ok); }
.impact-card.sev-高 { border-top-color: var(--err); }
.impact-card.sev-中 { border-top-color: var(--warn); }
.impact-card h4 { margin: 0 0 6px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; }
.impact-card ul { margin: 0; padding-left: 16px; font-size: 11.6px; color: #cbd5e1; line-height: 1.55; }
.impact-card .acts { margin-top: 6px; font-size: 11.5px; color: #7dd3fc; }
.shape-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 9px; flex: 1; min-height: 0; }
#shape-ref { min-height: 0; overflow: auto; }
.d2-chart { display: flex; align-items: flex-end; gap: 1px; height: 70px; margin-top: 6px; }
.d2-chart i { flex: 1; background: linear-gradient(180deg,#38bdf8,#0369a1); border-radius: 1px 1px 0 0; min-height: 1px; }
.review-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 9px; flex: 1; min-height: 0; }
#rv-detail { min-height: 0; overflow: auto; }
.eval-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; flex-shrink: 0; }
.eval-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--card-grad); box-shadow: var(--card-shadow); }
.eval-card.best { border-color: rgba(52,211,153,0.5); box-shadow: inset 0 1.5px 0 rgba(110,231,183,0.55), 0 12px 28px -6px rgba(16,185,129,0.22), 0 3px 8px rgba(0,0,0,0.5); }
.eval-card h4 { margin: 0 0 8px; font-size: 12.8px; display: flex; justify-content: space-between; }
.metric-row { display: grid; grid-template-columns: 70px 1fr 48px; gap: 6px; align-items: center; font-size: 11.5px; margin-bottom: 5px; }
.metric-row .mbar { height: 8px; border-radius: 4px; background: rgba(148,163,184,0.1); overflow: hidden; }
.metric-row .mbar i { display: block; height: 100%; background: linear-gradient(90deg,#0ea5e9,#34d399); }
.metric-row b { text-align: right; font-family: Consolas, monospace; color: #e2e8f0; }

/* ==================== v3.1 · 分阶段渐进加载骨架屏与实时加载胶囊 ==================== */
@keyframes skelShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skel-bar, .skel-pill, .skel-num {
  display: inline-block; vertical-align: middle; border-radius: 4px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.07) 20%, rgba(56, 189, 248, 0.16) 50%, rgba(148, 163, 184, 0.07) 80%);
  background-size: 220% 100%;
  animation: skelShimmer 1.35s ease-in-out infinite;
}
.skel-bar { height: 12px; }
.skel-pill { height: 18px; border-radius: 5px; }
.skel-num { width: 46px; height: 19px; border-radius: 5px; }
table.dgrid tr.skel-row td { pointer-events: none; }

.stage-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11.3px; font-weight: 500;
  color: #7dd3fc; background: rgba(14, 165, 233, 0.12); border: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); white-space: nowrap;
}
.stage-pill::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8; animation: pulse 1s ease-in-out infinite;
}

/* ==================== v4.0 · 切片精修 / 视觉检索 / 黄金QA / 全局图谱社区 / 开放生态 ==================== */
.chan.pinned { color: #38bdf8; border: 1px solid rgba(56,189,248,0.28); }
.chan.golden { color: #fde047; border: 1px solid rgba(250,204,21,0.35); }
.doc-item.superseded { opacity: 0.72; border-left: 2px solid var(--err); }
.chunk-editor {
  margin-top: 8px; padding: 9px 10px; border-radius: 8px;
  background: rgba(6, 10, 19, 0.82); border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: var(--well-shadow);
}
.chunk-editor textarea, .chunk-editor input {
  width: 100%; font-size: 12px; margin-top: 3px;
}
.fb-drawer {
  margin-top: 8px; padding: 8px 10px; border-radius: 8px;
  background: rgba(6, 10, 19, 0.85); border: 1px solid rgba(251, 191, 36, 0.35);
}
.fb-drawer textarea { width: 100%; font-size: 12px; margin: 4px 0 6px; }
.vis-gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 9px;
  flex: 1; min-height: 0; overflow: auto; align-content: start;
}
.vis-card {
  border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px;
  background: var(--card-grad); box-shadow: var(--card-shadow);
  display: flex; flex-direction: column; gap: 6px; cursor: pointer; transition: all .14s;
}
.vis-card:hover { border-color: rgba(56, 189, 248, 0.48); transform: translateY(-1px); }
.vis-thumb {
  height: 148px; border-radius: 6px; overflow: hidden; background: #070b13;
  border: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: center;
}
.vis-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; }
.comm-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 9px;
}
.comm-card {
  border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px;
  background: var(--card-grad); box-shadow: var(--card-shadow);
  border-top: 3px solid var(--accent);
}
.comm-card h4 { margin: 0 0 6px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.eco-code {
  background: #060a12; border: 1px solid var(--line-ctrl); box-shadow: var(--well-shadow);
  border-radius: 7px; padding: 9px 11px; margin: 0; font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 11.5px; color: #bae6fd; white-space: pre-wrap; word-break: break-all; overflow: auto;
}
.bot-sim-card {
  border: 1px solid rgba(56, 189, 248, 0.38); border-radius: 10px; overflow: hidden;
  background: linear-gradient(180deg, #10192b 0%, #0b111e 100%); box-shadow: var(--card-shadow);
}
.bot-sim-head {
  padding: 9px 12px; background: linear-gradient(90deg, #0284c7 0%, #0369a1 100%);
  color: #fff; font-weight: 700; font-size: 13px; display: flex; justify-content: space-between; align-items: center;
}
.bot-sim-body { padding: 12px 14px; font-size: 12.5px; line-height: 1.65; color: #e2e8f0; white-space: pre-wrap; }

/* ==================== v4.1 · 全局 3D 立体推拉把手（无级拖拽调宽 + 一键收起/拉开 + 双击复位） ==================== */
body.is-resizing, body.is-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

/* 左侧固定宽 + 右侧自适应 */
[data-split-mode="left"] {
  --eff-gutter: clamp(8px, 0.65vw, 12px);
  display: grid;
  grid-template-columns: var(--split-w, 230px) var(--eff-gutter) minmax(0, 1fr) !important;
  gap: 0 !important;
}
[data-split-mode="left"].app-shell {
  grid-template-columns: var(--split-w, 230px) 0px minmax(0, 1fr) !important;
}
[data-split-mode="left"][data-collapsed="1"] {
  grid-template-columns: 0px max(var(--eff-gutter), 10px) minmax(0, 1fr) !important;
}
[data-split-mode="left"].app-shell[data-collapsed="1"] {
  grid-template-columns: 0px 0px minmax(0, 1fr) !important;
}
[data-split-mode="left"][data-collapsed="1"] > :first-child {
  min-width: 0 !important; width: 0 !important;
  padding-left: 0 !important; padding-right: 0 !important;
  border-width: 0 !important; margin: 0 !important;
  opacity: 0; overflow: hidden !important; pointer-events: none;
}

/* 左侧自适应 + 右侧固定宽（如图谱 360° 档案栏、Agent 轨迹栏、PDF 红框栏） */
[data-split-mode="right"] {
  --eff-gutter: clamp(8px, 0.65vw, 12px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--eff-gutter) var(--split-w, 390px) !important;
  gap: 0 !important;
}
[data-split-mode="right"][data-collapsed="1"] {
  grid-template-columns: minmax(0, 1fr) clamp(10px, 0.8vw, 14px) 0px !important;
}
[data-split-mode="right"][data-collapsed="1"] > :last-child {
  min-width: 0 !important; width: 0 !important;
  padding-left: 0 !important; padding-right: 0 !important;
  border-width: 0 !important; margin: 0 !important;
  opacity: 0; overflow: hidden !important; pointer-events: none;
}

/* 推拉导轨槽 */
.split-gutter {
  position: relative; z-index: 14;
  display: flex; align-items: center; justify-content: center;
  cursor: col-resize; user-select: none; touch-action: none;
}
.split-gutter::before {
  content: ""; position: absolute; top: 8px; bottom: 8px; left: 50%;
  width: 2px; transform: translateX(-50%); border-radius: 2px;
  background: rgba(148, 163, 184, 0.13);
  transition: background .15s, box-shadow .15s, width .15s;
}
.split-gutter:hover::before, .split-gutter.dragging::before {
  width: 2.5px; background: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.72);
}

/* 全局主侧边栏跨界导轨（保持顶部标题栏无缝共线，随屏幕尺寸等比例缩放） */
.split-gutter.is-shell {
  width: clamp(8px, 0.65vw, 12px);
  margin-left: calc(clamp(8px, 0.65vw, 12px) * -0.5);
  z-index: 30; overflow: visible;
}
.split-gutter.is-shell::before { top: var(--header-h); bottom: 0; background: transparent; }
.split-gutter.is-shell:hover::before, .split-gutter.is-shell.dragging::before {
  background: #38bdf8; box-shadow: 0 0 12px rgba(56, 189, 248, 0.72);
}
.app-shell[data-collapsed="1"] > .split-gutter.is-shell {
  margin-left: 0; width: clamp(9px, 0.72vw, 12px);
}

/* 3D 金属微浮雕推拉把手胶囊 (.sh-pill — 随视口宽高双轴等比例精细缩放) */
.sh-pill {
  position: relative; z-index: 2;
  width: clamp(9px, 0.72vw, 13px);
  height: clamp(32px, 4.8vh, 52px);
  padding: 0;
  border-radius: clamp(4.5px, 0.36vw, 6.5px);
  background: linear-gradient(90deg, #21314d 0%, #121b2c 100%);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.16),
              inset -1px -1px 0 rgba(0, 0, 0, 0.45),
              0 3px 10px rgba(0, 0, 0, 0.6);
  color: #9cb2ce;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(1.5px, 0.26vh, 3px);
  cursor: pointer; transition: transform .13s, background .13s, border-color .13s, color .13s, box-shadow .13s;
}
.sh-pill .sh-arr {
  font-size: clamp(8.5px, 1.08vh, 11px); font-weight: 800; line-height: 1; font-family: Consolas, monospace;
}
.sh-pill .sh-dots {
  display: flex; flex-direction: column; gap: clamp(1.5px, 0.22vh, 2.5px); opacity: 0.75;
}
.sh-pill .sh-dots i {
  display: block;
  width: clamp(2px, 0.22vh, 3px);
  height: clamp(2px, 0.22vh, 3px);
  border-radius: 50%;
  background: currentColor; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}
.split-gutter:hover .sh-pill {
  border-color: rgba(56, 189, 248, 0.55); color: #e0f2fe;
}
.sh-pill:hover, .split-gutter.dragging .sh-pill {
  background: var(--btn-pri-grad);
  border-color: #bae6fd; color: #ffffff;
  transform: scale(1.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 0 12px rgba(56, 189, 248, 0.55);
}

/* 收起态贴边醒目拉手 */
[data-collapsed="1"] > .split-gutter > .sh-pill {
  border-color: rgba(56, 189, 248, 0.55);
  color: #7dd3fc;
  background: linear-gradient(180deg, #172842 0%, #0f1b2e 100%);
}
.app-shell[data-collapsed="1"] > .split-gutter.is-shell > .sh-pill {
  transform: translateX(clamp(4px, 0.34vw, 6px));
  border-radius: 0 clamp(5px, 0.42vw, 8px) clamp(5px, 0.42vw, 8px) 0;
  width: clamp(10px, 0.78vw, 14px);
}
.app-shell[data-collapsed="1"] > .split-gutter.is-shell > .sh-pill:hover {
  transform: translateX(clamp(4px, 0.34vw, 6px)) scale(1.08);
}
.sh-pill.pulse-hint {
  animation: shPulse 1.1s ease-in-out 2;
}
@keyframes shPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.6); }
  50% { box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.2); }
}

/* ==================== v4.6 · PDF/CAD 套图转 BOM & 双TAB工作台样式 ==================== */
.upload-btn.cad-upload-btn {
  background: linear-gradient(180deg, #0ea5e9 0%, #0369a1 100%);
  border: 1px solid rgba(125, 211, 252, 0.52);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36), 0 3px 10px rgba(3, 105, 161, 0.42);
}
.upload-btn.cad-upload-btn:hover {
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  transform: translateY(-1px);
}
.upload-btn.ghost-up {
  height: 25px; padding: 0 9px; font-size: 11.3px;
  background: rgba(15, 25, 42, 0.78);
  border: 1px dashed rgba(56, 189, 248, 0.48);
  color: #7dd3fc;
  box-shadow: none;
}
.upload-btn.ghost-up:hover {
  background: rgba(56, 189, 248, 0.14);
  border-style: solid;
}

/* 作业包整体包裹框：强化『左套图 + 右总表 = 同一套总成 BOM』的视觉分组 */
.pbom-pkg-shell {
  display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 7px;
  padding: 7px 8px 8px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(13, 22, 37, 0.72) 0%, rgba(8, 13, 24, 0.78) 100%);
  border: 1px solid rgba(56, 189, 248, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 6px 18px rgba(0, 0, 0, 0.35);
}
.pbom-pkg-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 5px 10px; border-radius: 7px; flex-shrink: 0;
  background: rgba(6, 11, 21, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

/* 左侧套图图档目录卡片条 */
.pbom-sheet-strip {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 3px; flex-shrink: 0;
}
.sheet-card {
  min-width: 142px; max-width: 195px; padding: 5px 8px; border-radius: 7px; cursor: pointer;
  background: linear-gradient(180deg, rgba(20, 31, 50, 0.85) 0%, rgba(11, 18, 30, 0.9) 100%);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color .14s, background .14s, transform .14s;
  flex-shrink: 0;
}
.sheet-card:hover {
  border-color: rgba(56, 189, 248, 0.45);
  transform: translateY(-1px);
}
.sheet-card.active {
  background: linear-gradient(180deg, rgba(14, 116, 144, 0.36) 0%, rgba(15, 28, 48, 0.95) 100%);
  border-color: #38bdf8;
  box-shadow: inset 0 1px 0 rgba(186, 230, 253, 0.25), 0 0 10px rgba(56, 189, 248, 0.22);
}
.sheet-card.has-conflict {
  border-color: rgba(251, 191, 36, 0.55);
}
.sheet-card .sc-top {
  display: flex; justify-content: space-between; align-items: center; gap: 4px; font-size: 10.6px; margin-bottom: 2px;
}
.sheet-card .sc-dwg {
  font-family: Consolas, monospace; font-size: 11.4px; font-weight: 700; color: #e2e8f0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sheet-card .sc-sub {
  font-size: 10.5px; color: #8da2c0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.pbom-layout {
  display: grid; grid-template-columns: 445px minmax(0, 1fr); gap: 9px;
  flex: 1; min-height: 0;
}
.pbom-hdr-grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px;
  padding: 7px 10px; border-radius: 8px;
  background: rgba(4, 8, 16, 0.55); border: 1px solid var(--line);
}
.pbom-hdr-grid .f-item label { font-size: 10.8px; }
.pbom-hdr-grid .f-item input { height: 26px; padding: 2px 7px; font-size: 12px; }

/* 列表管理模式高密度企业台账表 (34px 标准行高 + tabular-nums) */
table.pbom-list-table {
  width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums;
}
table.pbom-list-table th {
  position: sticky; top: 0; z-index: 2; height: 32px; padding: 0 5px;
  background: linear-gradient(180deg, #1b2840 0%, #11192a 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18); color: #9cb0cb; text-align: left; white-space: nowrap;
}
table.pbom-list-table td {
  height: 34px; padding: 2px 5px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; white-space: nowrap;
}
table.pbom-list-table tbody tr:hover td {
  background: rgba(56, 189, 248, 0.07);
}
table.pbom-list-table tbody tr.active-job td {
  background: rgba(56, 189, 248, 0.11);
}

.btn-plm {
  height: 29px; padding: 0 12px; font-weight: 600; color: #ffffff;
  background: linear-gradient(180deg, #8b5cf6 0%, #6d28d9 100%);
  border: 1px solid rgba(196, 181, 253, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 12px rgba(109, 40, 217, 0.42);
}
.btn-plm:hover:not(:disabled) {
  background: linear-gradient(180deg, #a78bfa 0%, #7c3aed 100%);
  transform: translateY(-1px);
}
.btn-erp {
  height: 29px; padding: 0 12px; font-weight: 600; color: #ffffff;
  background: linear-gradient(180deg, #10b981 0%, #047857 100%);
  border: 1px solid rgba(110, 231, 183, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 4px 12px rgba(5, 150, 105, 0.44);
}
.btn-erp:hover:not(:disabled) {
  background: linear-gradient(180deg, #34d399 0%, #059669 100%);
  transform: translateY(-1px);
}

table.pbom-table { width: 100%; border-collapse: collapse; font-size: 11.8px; }
table.pbom-table th {
  position: sticky; top: 0; z-index: 2; height: 30px; padding: 0 6px;
  background: linear-gradient(180deg, #1a263c 0%, #111929 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16); color: #9cb0cb; text-align: left; white-space: nowrap;
}
table.pbom-table td {
  height: 33px; padding: 2px 4px; border-bottom: 1px solid var(--line-soft); vertical-align: middle;
}
table.pbom-table tr.sel td { background: rgba(56, 189, 248, 0.1); }
table.pbom-table tr.warn-row td { background: rgba(251, 191, 36, 0.07); }
table.pbom-table input, table.pbom-table select {
  width: 100%; height: 25px; padding: 0 5px; font-size: 11.8px; border-radius: 4px;
  background: rgba(6, 10, 19, 0.68); border: 1px solid rgba(148, 163, 184, 0.16); color: #e5ecf6;
}
table.pbom-table input[type="number"] { text-align: right; font-variant-numeric: tabular-nums; padding: 0 4px; }
table.pbom-table input[type="number"]::-webkit-inner-spin-button,
table.pbom-table input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
table.pbom-table input:focus, table.pbom-table select:focus {
  outline: none; border-color: var(--accent); background: rgba(8, 15, 28, 0.95);
}

/* ==================== v4.7 · 全站单行自适应工具栏 & 主流屏幕尺寸响应式体系 ==================== */
.upload-btn, button, .pg-btn, .btn-plm, .btn-erp { white-space: nowrap; flex-shrink: 0; }

/* 通用单行工具条布局（左弹性截断 + 右动作永不折行） */
.bar-single {
  display: flex !important; flex-wrap: nowrap !important; align-items: center;
  justify-content: space-between; gap: 8px; min-width: 0;
}
.bar-left { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; overflow: hidden; }
.bar-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; flex-wrap: nowrap; }
.bar-desc { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.bar-chips { display: inline-flex; align-items: center; gap: 5px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.bar-chips::-webkit-scrollbar { display: none; }
.bar-chips .chip { white-space: nowrap; flex-shrink: 0; }

/* PDF/CAD 转 BOM 工作台：严格单行按钮栏与作业包头 */
.pbom-subbar { justify-content: space-between; gap: 10px; }
.pbom-actionbar {
  display: flex; flex-wrap: nowrap !important; align-items: center; justify-content: space-between;
  gap: 8px; padding: 6px 10px !important; overflow-x: auto; scrollbar-width: none;
}
.pbom-actionbar::-webkit-scrollbar { display: none; }
.pbom-act-left {
  display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; flex-wrap: nowrap;
}
.pbom-act-right {
  display: flex; align-items: center; gap: 5px; flex-shrink: 0; flex-wrap: nowrap; margin-left: auto;
}
.pbom-sel-sample {
  flex: 1 1 140px; width: 0; min-width: 108px; max-width: 245px; height: 27px; font-size: 11.6px;
}
.pbom-sel-job {
  flex: 0.9 1 125px; width: 0; min-width: 98px; max-width: 215px; height: 27px; font-size: 11.6px;
}
.pbom-pkg-bar {
  flex-wrap: nowrap !important; gap: 8px;
}
.pbom-pkg-left {
  display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; overflow: hidden;
}
.pbom-pkg-note {
  font-size: 11.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.pbom-pane-head {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: nowrap;
  gap: 6px; flex-shrink: 0; min-width: 0;
}

/* 列表模式工具栏单行自适应 */
.pbl-actionbar {
  display: flex; flex-wrap: nowrap !important; align-items: center; justify-content: space-between;
  gap: 8px; padding: 6px 10px !important; overflow-x: auto; scrollbar-width: none;
}
.pbl-actionbar::-webkit-scrollbar { display: none; }
.pbl-act-left { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; }
.pbl-act-right { display: flex; align-items: center; gap: 5px; flex-shrink: 0; flex-wrap: nowrap; }
.pbl-search { flex: 0 1 220px; min-width: 115px; width: auto !important; }
.pbl-facets { display: inline-flex; gap: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.pbl-facets::-webkit-scrollbar { display: none; }
.pbl-facets .pg-btn { min-width: auto; padding: 0 7px; height: 25px; font-size: 11.3px; }

/* 3D/2D 详情页顶部单行按钮栏 */
.cad-detail-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  flex-wrap: nowrap; margin-bottom: 8px; min-width: 0; overflow-x: auto; scrollbar-width: none;
}
.cad-detail-head::-webkit-scrollbar { display: none; }
.cad-detail-left { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: nowrap; }
.cad-detail-left h3 { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 310px; }
.cad-detail-right { display: flex; align-items: center; gap: 5px; flex-shrink: 0; flex-wrap: nowrap; }

/* ---------- 断点 1：主流 1536×864 / 1600×900 / 1080p@125% DPI (≤1680px) ---------- */
@media (max-width: 1680px) {
  :root { --header-h: 50px; }
  .hide-xl, .lbl-xl { display: none !important; }
  .top-cmdbar { padding: 0 12px; gap: 10px; }
  .omnibox { max-width: 380px; }
  .btn-plm, .btn-erp { padding: 0 10px; height: 28px; font-size: 11.8px; }
  .pbom-actionbar { gap: 6px; }
  .pbom-sel-sample { max-width: 210px; }
  .pbom-sel-job { max-width: 185px; }
  .sheet-card { min-width: 128px; max-width: 174px; padding: 4px 7px; }
  .kpi-box { padding: 7px 10px; gap: 8px; }
  .kpi-box .kv-num, .kpi-box .num { font-size: 17px; }
  .grid-toolbar { padding: 5px 9px; gap: 6px; }
}

/* ---------- 断点 2：主流 14寸笔记本 1440×900 / 1366×768 / 1280×800 / 1080p@150% DPI (≤1440px) ---------- */
@media (max-width: 1440px) {
  :root { --header-h: 46px; font-size: 12.5px; }
  .hide-lg, .lbl-lg { display: none !important; }
  .brand-box { padding: 0 11px; }
  .brand-box .title { font-size: 13px; }
  .brand-box .sub { font-size: 10px; }
  .nav-item { padding: 0 7px; }
  .sidebar-foot { padding: 5px 8px; font-size: 10px; }

  .top-cmdbar { padding: 0 10px; gap: 8px; }
  .omnibox { min-width: 150px; max-width: 310px; padding: 4px 8px; }
  .omnibox input { font-size: 11.8px; }
  .top-right { gap: 7px; font-size: 11.4px; }
  #dataset { width: 176px; max-width: 176px; height: 26px; font-size: 11.4px; }
  .status-dot { padding: 2px 8px; font-size: 11px; }
  .user-chip { padding: 2px 8px 2px 3px; gap: 6px; }
  .uc-avatar { width: 23px; height: 23px; font-size: 11px; }
  .uc-meta b { font-size: 11.4px; }
  .uc-meta small { font-size: 9.8px; }

  .workspace-body { padding: 5px 6px; }
  .panel { padding: 9px 10px; border-radius: 8px; }
  .panel h3 { font-size: 12.6px; margin-bottom: 6px; }
  .subbar { gap: 4px; margin-bottom: 5px; }
  .subbar button { padding: 3px 8px; font-size: 11.5px; height: 26px; }
  button, .upload-btn { padding: 3px 8px; font-size: 11.5px; }
  .btn-plm, .btn-erp { height: 27px; padding: 0 9px; font-size: 11.4px; }

  .pbom-actionbar { padding: 5px 8px !important; gap: 5px; }
  .pbom-act-left, .pbom-act-right { gap: 4px; }
  .pbom-sel-sample { flex: 1 1 115px; min-width: 96px; max-width: 175px; height: 26px; font-size: 11.2px; }
  .pbom-sel-job { flex: 0.85 1 100px; min-width: 88px; max-width: 150px; height: 26px; font-size: 11.2px; }
  .pbom-pkg-shell { padding: 5px 6px 6px; gap: 5px; }
  .pbom-pkg-bar { padding: 4px 8px; }
  .pbom-hdr-grid { gap: 5px; padding: 6px 8px; }
  .pbom-hdr-grid .f-item label { font-size: 10.2px; }
  .pbom-hdr-grid .f-item input { height: 24px; padding: 1px 5px; font-size: 11.4px; }
  .sheet-card { min-width: 118px; max-width: 158px; padding: 4px 6px; }
  .sheet-card .sc-dwg { font-size: 10.8px; }
  .sheet-card .sc-sub { font-size: 9.8px; }
  table.pbom-table { font-size: 11.2px; }
  table.pbom-table th { height: 27px; padding: 0 4px; font-size: 11px; }
  table.pbom-table td { height: 30px; padding: 1.5px 3px; }
  table.pbom-table input, table.pbom-table select { height: 23px; font-size: 11.2px; padding: 0 4px; }

  .kpi-strip { gap: 6px; margin-bottom: 6px; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); }
  .kpi-box { padding: 6px 9px; gap: 7px; }
  .kpi-ic { width: 28px; height: 28px; }
  .kpi-box .kv-num, .kpi-box .num { font-size: 16px; }
  .kpi-box .kv-lbl, .kpi-box .lbl { font-size: 10.6px; }

  .grid-toolbar { padding: 5px 8px; gap: 5px; }
  .gt-title { font-size: 12.2px; }
  .gt-search { width: 145px; height: 26px; font-size: 11.4px; }
  .grid-pagination { padding: 5px 8px; gap: 6px; }
  .pg-btn { min-width: 26px; height: 24px; padding: 0 6px; font-size: 11.2px; }

  .tool-form { grid-template-columns: repeat(3, 1fr); }
  .sc-hero { grid-template-columns: 220px 1fr; }
  .split { height: calc(100vh - 96px); }
  .viewer { height: 320px; }
  .cad-detail-left h3 { max-width: 220px; }
}

/* ---------- 断点 3：紧凑笔记本 1280×720 / 分屏窗口 (≤1280px) ---------- */
@media (max-width: 1280px) {
  .hide-md, .pbom-pkg-note { display: none !important; }
  .pbom-sel-sample { max-width: 148px; }
  .pbom-sel-job { max-width: 128px; }
  .pbl-search { flex: 0 1 150px; min-width: 100px; }
  .eval-cards { grid-template-columns: repeat(2, 1fr); }
  .impact-grid { grid-template-columns: repeat(2, 1fr); }
  .stype-grid { grid-template-columns: repeat(2, 1fr); }
  .omnibox .kbd { display: none; }
  .kg-hud-top { padding: 3px 5px; gap: 3px; }
  .kg-stat { display: none; }
}

/* ---------- 断点 4：半屏窗口 / 1180px 以下 ---------- */
@media (max-width: 1180px) {
  .pbom-hdr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .uc-meta small { display: none; }
  #dataset { width: 142px; max-width: 142px; }
  .grid-toolbar { flex-wrap: wrap; }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .login-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 断点 5：平板横屏 / 极窄分屏 (≤1024px) — 分栏自动竖向堆叠不压扁 ---------- */
@media (max-width: 1024px) {
  .workspace-body { overflow-y: auto; }
  .view.active { flex: none; }
  [data-split-mode][data-stack="1"] {
    display: flex !important; flex-direction: column !important; gap: 8px !important;
    height: auto !important;
  }
  [data-split-mode][data-stack="1"] > .split-gutter { display: none !important; }
  [data-split-mode][data-stack="1"] > * { width: 100% !important; min-height: 260px; }
  .grid2, .docs-split, .form-grid-2 { grid-template-columns: 1fr !important; }
  .sc-hero { grid-template-columns: 1fr; }
  .pbom-actionbar, .pbl-actionbar { overflow-x: auto; }
  .pbom-hdr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .drawer, .drawer.wide { width: min(560px, 95vw); }
}

/* ==================== v4.7.2 · 左侧菜单树按屏幕高度 (100vh) 等比例自适应缩放 ==================== */
.nav-group {
  padding: clamp(1px, 0.34vh, 3.5px) 7px clamp(0.5px, 0.12vh, 1.5px);
}
.nav-group-title {
  font-size: clamp(9.4px, 1.18vh, 10.6px);
  line-height: 1.2;
  padding: 0 7px clamp(0.5px, 0.2vh, 2px);
  cursor: pointer;
  justify-content: flex-start;
  transition: color .12s;
}
.nav-group-title:hover { color: #94a9c4; }
.nav-group-title::after {
  content: "▾"; margin-left: auto; font-size: 9px; opacity: 0.35; transition: transform .15s, opacity .15s;
}
.nav-group-title:hover::after { opacity: 0.85; }
.nav-group.collapsed .nav-group-title::after { transform: rotate(-90deg); opacity: 0.75; }
.nav-group.collapsed .nav-item { display: none; }

.nav-item {
  height: clamp(18.5px, calc((100vh - 176px) / 23.2), 26px);
  font-size: clamp(10.8px, 1.38vh, 12px);
  margin-bottom: clamp(0px, 0.12vh, 1.5px);
}
.nav-item .ni-left { gap: clamp(4px, 0.65vh, 7px); }
.nav-item .ni-left .ico {
  width: clamp(11.5px, 1.48vh, 14px);
  height: clamp(11.5px, 1.48vh, 14px);
}
.nav-badge {
  font-size: clamp(9.2px, 1.15vh, 10.5px);
  padding: 0 clamp(3.5px, 0.45vh, 5px);
  line-height: 1.25;
}
.sidebar-foot > div {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 矮屏笔记本 (1536×735 / 1440×800 / 1366×768 / 1280×720) 菜单与底栏等比例紧缩，一屏完整展示全部 6 组 22 项 */
@media (max-height: 860px) {
  .sidebar-foot {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1px 6px;
    padding: 4px 8px; font-size: 9.6px; line-height: 1.25;
  }
}
@media (max-height: 780px) {
  :root { --header-h: 44px; }
  .brand-box .logo { width: 20px; height: 20px; font-size: 11.5px; }
  .brand-box .title { font-size: 13px; }
  .brand-box .sub { font-size: 9.8px; margin-top: 1.5px; }
}
@media (max-height: 700px) {
  :root { --header-h: 40px; }
  .brand-box .sub { display: none; }
  .nav-group { padding: 1px 6px 0; }
  .nav-group-title { padding: 0 6px 0.5px; }
  .sidebar-foot { padding: 3px 7px; font-size: 9.2px; line-height: 1.2; }
}

/* ==================== v5.0 · 六大跃升工业 AI 模块精工样式 ==================== */
.btn-rfq {
  height: 28px; padding: 0 11px; font-weight: 600; color: #ffffff;
  background: linear-gradient(180deg, #f59e0b 0%, #b45309 100%);
  border: 1px solid rgba(253, 224, 71, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 4px 12px rgba(180, 83, 9, 0.38);
}
.btn-rfq:hover:not(:disabled) {
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
  transform: translateY(-1px);
}

/* ① 套图核价与自动报价书 (RFQ) */
.rfq-tiers-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; flex-shrink: 0;
}
.rfq-tier-card {
  background: linear-gradient(180deg, rgba(16, 26, 46, 0.92), rgba(9, 15, 28, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.16); border-radius: 10px;
  padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, transform .15s;
}
.rfq-tier-card.featured {
  border-color: rgba(56, 189, 248, 0.58);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.2), 0 8px 20px rgba(2, 132, 199, 0.14);
}
.rfq-tier-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.rfq-tier-price {
  font-size: 21px; font-weight: 700; color: #f8fafc; font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: 6px;
}
.rfq-tier-price small { font-size: 11px; color: var(--muted); font-weight: 400; }
.rfq-tier-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; font-size: 11.4px; color: #cbd5e1;
  font-variant-numeric: tabular-nums; border-top: 1px solid var(--line-soft); padding-top: 6px;
}
.rfq-mix-bar {
  height: 11px; border-radius: 99px; overflow: hidden; display: flex; background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--line); margin: 6px 0 4px;
}
.rfq-mix-bar > i { display: block; height: 100%; transition: width .3s ease; }

/* ② 红蓝双版工程图比对 (Drawing Diff) */
.diff-legend { display: inline-flex; align-items: center; gap: 10px; font-size: 11.3px; color: #cbd5e1; white-space: nowrap; }
.diff-legend span { display: inline-flex; align-items: center; gap: 4px; }
.diff-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.diff-stage {
  background: #060b14; border: 1px solid var(--line); border-radius: 8px; padding: 8px;
  min-height: 290px; max-height: 450px; overflow: auto; display: flex; justify-content: center; align-items: flex-start; gap: 10px;
}
.diff-stage img {
  max-width: 100%; max-height: 430px; object-fit: contain; border-radius: 6px;
  background: #ffffff; border: 1px solid rgba(148, 163, 184, 0.25);
}
.diff-stage.split-mode { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
.diff-stage.split-mode .diff-col { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.diff-stage.split-mode .diff-col span { font-size: 11.4px; color: #94a3b8; font-weight: 600; }

/* ③ 五师联合会审室 (Multi-Agent Joint Review) */
.mr-hero-banner {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 11px 14px; border-radius: 10px;
  background: linear-gradient(90deg, rgba(15, 28, 52, 0.95), rgba(11, 20, 38, 0.92));
  border: 1px solid rgba(56, 189, 248, 0.35);
}
.mr-hero-banner.veto { border-color: rgba(244, 63, 94, 0.6); background: linear-gradient(90deg, rgba(60, 14, 28, 0.85), rgba(15, 23, 42, 0.95)); }
.mr-hero-banner.cond { border-color: rgba(251, 191, 36, 0.52); background: linear-gradient(90deg, rgba(50, 36, 10, 0.82), rgba(15, 23, 42, 0.95)); }
.mr-hero-banner.pass { border-color: rgba(52, 211, 153, 0.55); background: linear-gradient(90deg, rgba(8, 45, 34, 0.82), rgba(15, 23, 42, 0.95)); }

.mr-experts-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px;
}
.mr-card {
  background: linear-gradient(180deg, rgba(16, 25, 43, 0.92), rgba(9, 15, 27, 0.96));
  border: 1px solid var(--line); border-top: 3px solid var(--ec, #38bdf8); border-radius: 9px;
  padding: 10px; display: flex; flex-direction: column; gap: 7px; min-width: 0;
}
.mr-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.mr-card-title { font-size: 13px; font-weight: 600; color: #f1f5f9; }
.mr-card-dept { font-size: 10.8px; color: var(--muted); }
.mr-score-row { display: flex; align-items: center; gap: 6px; font-size: 11.4px; font-variant-numeric: tabular-nums; }
.mr-score-bar { flex: 1; height: 6px; border-radius: 99px; background: rgba(148, 163, 184, 0.16); overflow: hidden; }
.mr-score-bar > i { display: block; height: 100%; border-radius: 99px; }
.mr-findings { font-size: 11.6px; color: #cbd5e1; line-height: 1.5; margin: 0; padding-left: 14px; }
.mr-findings li { margin-bottom: 3px; }
.mr-redline {
  background: rgba(244, 63, 94, 0.12); border: 1px solid rgba(244, 63, 94, 0.35);
  border-radius: 6px; padding: 5px 7px; font-size: 11.2px; color: #fda4af; line-height: 1.45;
}
.mr-cites { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; padding-top: 4px; border-top: 1px solid var(--line-soft); }

/* ④ 主动知识哨兵 (Sentinel) */
.sent-layout { display: grid; grid-template-columns: 380px 1fr; gap: 8px; flex: 1; min-height: 280px; }
.sent-rule-card {
  background: rgba(12, 20, 36, 0.85); border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 10px; display: flex; flex-direction: column; gap: 5px;
}
.sent-alert-card {
  background: rgba(13, 22, 39, 0.88); border: 1px solid var(--line); border-left: 3px solid #f43f5e;
  border-radius: 8px; padding: 9px 11px; display: flex; flex-direction: column; gap: 5px;
}
.sent-alert-card.resolved { border-left-color: #10b981; opacity: 0.72; }

/* ⑤ 防泄密水印与外协沙箱 (Security Sandbox) */
.sec-tenants-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.sec-tenant-card {
  background: rgba(11, 19, 34, 0.85); border: 1px solid var(--line); border-radius: 7px;
  padding: 7px 9px; font-size: 11.5px; cursor: pointer; transition: border-color .15s;
}
.sec-tenant-card.active { border-color: var(--accent); background: rgba(14, 165, 233, 0.12); }
.sec-wm-preview {
  flex: 1; min-height: 220px; max-height: 310px; overflow: auto; background: #060b14;
  border: 1px solid var(--line); border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 6px;
}
.sec-wm-preview img { max-width: 100%; max-height: 294px; object-fit: contain; border-radius: 4px; background: #fff; }

/* ⑥ 自进化飞轮 (Flywheel SVG Chart) */
.fw-legend { display: inline-flex; gap: 12px; font-size: 11.5px; color: #cbd5e1; }
.fw-legend span { display: inline-flex; align-items: center; gap: 5px; }
.fw-legend i { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }

@media (max-width: 1520px) {
  .mr-experts-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sent-layout { grid-template-columns: 320px 1fr; }
}
@media (max-width: 1180px) {
  .mr-experts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rfq-tiers-grid { grid-template-columns: 1fr; }
  .sent-layout { grid-template-columns: 1fr; }
}
