:root {
  --bg: #f2f5f4;
  --surface: #ffffff;
  --surface-subtle: #f7f9f8;
  --surface-raised: #fbfcfc;
  --sidebar: #15211f;
  --sidebar-muted: #8fa29e;
  --text: #18221f;
  --text-2: #52615d;
  --text-3: #7c8a86;
  --border: #dce4e1;
  --border-strong: #cbd6d2;
  --primary: #137a65;
  --primary-dark: #0e5f4e;
  --primary-soft: #e7f4f0;
  --blue: #2e6f9e;
  --blue-soft: #eaf2f8;
  --amber: #b06d18;
  --amber-soft: #fbf2e3;
  --red: #b8483e;
  --red-soft: #faecea;
  --violet: #6f5a91;
  --violet-soft: #f0edf5;
  --shadow-sm: 0 1px 2px rgb(18 34 30 / 7%);
  --shadow-md: 0 10px 28px rgb(15 31 27 / 14%);
  --radius: 6px;
  --sidebar-width: 224px;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; background: var(--bg); }
body { min-width: 320px; font-size: 14px; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { color: inherit; }
a { color: inherit; }
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar-width);
  display: flex; flex-direction: column; background: var(--sidebar); color: #eaf0ee;
  border-right: 1px solid #24322f;
}
.brand { min-height: 72px; padding: 15px 14px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #293532; }
.brand-mark { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; color: #fff; background: var(--primary); border-radius: 6px; }
.brand-mark svg { width: 21px; height: 21px; }
.brand-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.brand-copy strong { font-size: 15px; letter-spacing: 0; white-space: nowrap; }
.brand-copy span { color: var(--sidebar-muted); font-size: 11px; white-space: nowrap; }
.env-label { align-self: flex-start; margin-left: auto; padding: 2px 4px; border: 1px solid #5e746e; color: #adc0bb; font: 9px/1.1 Arial, sans-serif; border-radius: 3px; }
.nav-list { flex: 1; padding: 10px 8px; overflow-y: auto; }
.nav-group { margin: 12px 8px 6px; color: #738680; font-size: 10px; font-weight: 700; }
.nav-item { width: 100%; height: 38px; padding: 0 10px; margin: 2px 0; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: #b6c5c1; border-radius: 5px; cursor: pointer; text-align: left; transition: background .16s ease, color .16s ease; }
.nav-item svg { width: 17px; height: 17px; flex: 0 0 17px; }
.nav-item span { flex: 1; }
.nav-item .nav-badge { flex: 0 0 auto; min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; background: #33443f; color: #d5e0dd; font-size: 10px; border-radius: 9px; }
.nav-item:hover { background: #20302c; color: #fff; }
.nav-item.active { background: #28443d; color: #fff; box-shadow: inset 3px 0 0 #4cc0a2; }
.sidebar-footer { padding: 14px 16px 16px; border-top: 1px solid #293532; }
.security-state { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.status-dot { width: 7px; height: 7px; background: #4fc395; border-radius: 50%; box-shadow: 0 0 0 3px rgb(79 195 149 / 12%); }
.security-meta { margin-top: 5px; color: #758983; font-size: 10px; }
.main-shell { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { position: sticky; top: 0; z-index: 20; height: 64px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; background: rgb(255 255 255 / 94%); border-bottom: 1px solid var(--border); backdrop-filter: blur(8px); }
.topbar-left, .topbar-actions { display: flex; align-items: center; gap: 10px; }
.case-switcher { height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--border); background: var(--surface); border-radius: 5px; cursor: pointer; }
.case-switcher:hover { border-color: var(--border-strong); background: var(--surface-subtle); }
.case-switcher svg { width: 15px; color: var(--text-3); }
.case-prefix { color: var(--text-3); font-size: 11px; }
.case-switcher strong { font-size: 13px; }
.case-code { padding-left: 8px; color: var(--text-2); font-size: 11px; border-left: 1px solid var(--border); }
.global-search { width: 280px; height: 36px; padding: 0 9px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface-subtle); color: var(--text-3); border-radius: 5px; cursor: text; }
.global-search svg { width: 16px; }
.global-search span { flex: 1; text-align: left; font-size: 12px; }
kbd { padding: 2px 5px; background: #fff; border: 1px solid var(--border); border-radius: 3px; color: var(--text-3); font: 10px Arial; }
.icon-button { width: 36px; height: 36px; padding: 0; display: inline-grid; place-items: center; border: 1px solid var(--border); background: var(--surface); border-radius: 5px; cursor: pointer; }
.icon-button:hover { background: var(--surface-subtle); border-color: var(--border-strong); }
.icon-button svg { width: 17px; height: 17px; }
.notification-button { position: relative; }
.notification-button span { position: absolute; top: -4px; right: -3px; min-width: 16px; height: 16px; display: grid; place-items: center; background: var(--red); color: #fff; font-size: 9px; border-radius: 8px; border: 2px solid #fff; }
.user-chip { height: 40px; padding-left: 4px; display: flex; align-items: center; gap: 8px; }
.user-chip > div:nth-child(2) { display: flex; flex-direction: column; gap: 1px; }
.user-chip strong { font-size: 12px; }
.user-chip span { color: var(--text-3); font-size: 10px; }
.user-chip > svg { width: 14px; color: var(--text-3); }
.avatar { width: 30px; height: 30px; display: grid; place-items: center; background: #d8e7e2; color: var(--primary-dark); font-weight: 700; border-radius: 50%; }
.main-content { width: 100%; min-width: 0; max-width: 1600px; margin: 0 auto; padding: 22px 24px 38px; outline: none; }
.page-header { margin-bottom: 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.page-header h1 { margin: 0 0 5px; font-size: 22px; line-height: 1.3; font-weight: 700; letter-spacing: 0; }
.page-header p { margin: 0; color: var(--text-2); font-size: 13px; }
.role-view { margin-top: 7px; display: inline-flex; align-items: center; gap: 5px; color: var(--primary-dark); font-size: 10px; font-weight: 600; }
.role-view svg { width: 13px; height: 13px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.button { min-height: 36px; padding: 0 13px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 5px; font-weight: 600; font-size: 12px; cursor: pointer; white-space: nowrap; }
.button:hover { background: var(--surface-subtle); }
.button svg { width: 15px; height: 15px; }
.button.primary { border-color: var(--primary); background: var(--primary); color: #fff; }
.button.primary:hover { background: var(--primary-dark); }
.button.danger { border-color: #e7c5c2; color: var(--red); background: #fff; }
.button.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.button.small { min-height: 30px; padding: 0 9px; font-size: 11px; }
.button.icon-only { width: 34px; padding: 0; }
.grid { display: grid; gap: 14px; }
.grid > *, .card { min-width: 0; max-width: 100%; }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-grid { grid-template-columns: minmax(0, 1.6fr) minmax(310px, .75fr); align-items: start; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-header { min-height: 48px; padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); }
.card-header h2, .card-header h3 { margin: 0; font-size: 14px; line-height: 1.3; }
.card-header p { margin: 3px 0 0; color: var(--text-3); font-size: 11px; }
.card-body { padding: 15px; }
.card-body.flush { padding: 0; }
.stat-card { min-height: 108px; padding: 14px 15px; display: flex; flex-direction: column; justify-content: space-between; }
.stat-card-top { display: flex; justify-content: space-between; align-items: center; color: var(--text-2); font-size: 12px; }
.stat-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 5px; }
.stat-icon svg { width: 16px; }
.stat-card strong { font-size: 24px; line-height: 1; }
.stat-card small { color: var(--text-3); font-size: 10px; }
.stat-card small b { color: var(--primary); font-weight: 600; }
.tone-primary { background: var(--primary-soft); color: var(--primary); }
.tone-blue { background: var(--blue-soft); color: var(--blue); }
.tone-amber { background: var(--amber-soft); color: var(--amber); }
.tone-red { background: var(--red-soft); color: var(--red); }
.summary-banner { margin-bottom: 14px; padding: 14px 16px; display: grid; grid-template-columns: minmax(240px, 1.4fr) repeat(4, minmax(100px, .55fr)); gap: 16px; align-items: center; background: #1c2d29; color: #fff; border-radius: var(--radius); }
.summary-title { display: flex; align-items: center; gap: 12px; }
.summary-title-icon { width: 38px; height: 38px; display: grid; place-items: center; background: #2a443d; color: #6fd3b7; border-radius: 5px; }
.summary-title-icon svg { width: 20px; }
.summary-title strong { display: block; margin-bottom: 3px; font-size: 15px; }
.summary-title span { color: #a9bab5; font-size: 11px; }
.summary-metric { padding-left: 15px; border-left: 1px solid #3b4b47; }
.summary-metric strong { display: block; margin-bottom: 3px; font-size: 16px; }
.summary-metric span { color: #9fb1ac; font-size: 10px; }
.workflow { padding: 16px; display: grid; grid-template-columns: repeat(8, minmax(90px, 1fr)); gap: 0; overflow-x: auto; }
.workflow-step { min-width: 90px; position: relative; text-align: center; }
.workflow-step::after { content: ""; position: absolute; top: 14px; left: 58%; width: 84%; border-top: 1px solid var(--border-strong); }
.workflow-step:last-child::after { display: none; }
.workflow-node { position: relative; z-index: 1; width: 29px; height: 29px; margin: 0 auto 8px; display: grid; place-items: center; border: 1px solid var(--border-strong); background: #fff; color: var(--text-3); border-radius: 50%; font-size: 10px; font-weight: 700; }
.workflow-step.done .workflow-node { border-color: var(--primary); background: var(--primary); color: #fff; }
.workflow-step.active .workflow-node { border: 2px solid var(--primary); color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.workflow-step strong { display: block; font-size: 11px; }
.workflow-step span { display: block; margin-top: 3px; color: var(--text-3); font-size: 9px; white-space: nowrap; }
.split-panel { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr); min-height: 330px; }
.split-panel > * + * { border-left: 1px solid var(--border); }
.chart-wrap { min-height: 250px; padding: 10px 12px 5px; }
.chart-svg { width: 100%; height: 250px; display: block; overflow: visible; }
.chart-grid { stroke: #e6ece9; stroke-width: 1; }
.chart-axis { fill: var(--text-3); font-size: 10px; }
.chart-line { fill: none; stroke: var(--primary); stroke-width: 2.5; }
.chart-area { fill: #e4f3ee; }
.chart-point { fill: #fff; stroke: var(--primary); stroke-width: 2; }
.bar { fill: var(--blue); opacity: .85; }
.bar.alert { fill: var(--red); }
.legend { display: flex; gap: 14px; color: var(--text-2); font-size: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 8px; height: 8px; display: inline-block; border-radius: 2px; }
.list { margin: 0; padding: 0; list-style: none; }
.task-item { padding: 12px 14px; display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; border-bottom: 1px solid var(--border); cursor: pointer; }
.task-item:last-child { border-bottom: 0; }
.task-item:hover { background: var(--surface-subtle); }
.task-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 5px; }
.task-icon svg { width: 16px; }
.task-item strong { display: block; margin-bottom: 3px; font-size: 12px; }
.task-item p { margin: 0; color: var(--text-3); font-size: 10px; line-height: 1.45; }
.task-item time { color: var(--text-3); font-size: 10px; }
.tag, .status-badge { min-height: 21px; padding: 2px 7px; display: inline-flex; align-items: center; gap: 4px; border-radius: 4px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.tag svg { width: 11px; }
.tag.green, .status-badge.green { color: var(--primary-dark); background: var(--primary-soft); }
.tag.blue, .status-badge.blue { color: var(--blue); background: var(--blue-soft); }
.tag.amber, .status-badge.amber { color: #915912; background: var(--amber-soft); }
.tag.red, .status-badge.red { color: var(--red); background: var(--red-soft); }
.tag.gray, .status-badge.gray { color: var(--text-2); background: #edf1f0; }
.tag.violet { color: var(--violet); background: var(--violet-soft); }
.case-list { display: grid; gap: 10px; }
.case-row { min-height: 84px; padding: 13px 14px; display: grid; grid-template-columns: minmax(230px, 1.2fr) repeat(4, minmax(90px, .55fr)) 80px; gap: 12px; align-items: center; border: 1px solid var(--border); background: #fff; border-radius: var(--radius); cursor: pointer; }
.case-row:hover { border-color: #9fc2b9; box-shadow: 0 3px 12px rgb(19 122 101 / 8%); }
.case-main { display: flex; gap: 11px; align-items: center; }
.case-symbol { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 38px; background: #edf4f2; color: var(--primary); border-radius: 5px; }
.case-symbol svg { width: 19px; }
.case-main strong { display: block; margin-bottom: 4px; font-size: 13px; }
.case-main p { margin: 0; color: var(--text-3); font-size: 10px; }
.case-field span { display: block; color: var(--text-3); font-size: 9px; }
.case-field strong { display: block; margin-top: 5px; font-size: 11px; font-weight: 600; }
.progress { height: 5px; overflow: hidden; background: #e9efed; border-radius: 3px; }
.progress > span { height: 100%; display: block; background: var(--primary); border-radius: 3px; }
.filterbar { margin-bottom: 12px; padding: 10px; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.search-input { min-width: 220px; flex: 1; position: relative; }
.search-input svg { position: absolute; left: 10px; top: 10px; width: 15px; color: var(--text-3); pointer-events: none; }
.input, .select { width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--border-strong); background: #fff; color: var(--text); border-radius: 4px; outline: none; }
.search-input .input { padding-left: 32px; }
.input:focus, .select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.select { width: auto; min-width: 110px; cursor: pointer; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.data-table th { height: 38px; padding: 0 10px; background: #f6f8f7; color: var(--text-2); font-weight: 600; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { height: 46px; padding: 7px 10px; border-bottom: 1px solid #e8eeec; color: #2b3834; vertical-align: middle; white-space: nowrap; }
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:hover { background: #f8fbfa; }
.data-table tbody tr.selected { background: #edf7f4; }
.data-table .cell-main { display: block; font-weight: 600; color: var(--text); }
.data-table .cell-sub { display: block; margin-top: 2px; color: var(--text-3); font-size: 9px; }
.confidence { display: flex; align-items: center; gap: 6px; }
.confidence-track { width: 52px; height: 4px; background: #e7ecea; border-radius: 2px; overflow: hidden; }
.confidence-track i { display: block; height: 100%; background: var(--primary); }
.confidence.medium .confidence-track i { background: var(--amber); }
.confidence.low .confidence-track i { background: var(--red); }
.pagination { min-height: 48px; padding: 9px 12px; display: flex; justify-content: space-between; align-items: center; color: var(--text-3); font-size: 10px; }
.pagination-controls { display: flex; gap: 4px; }
.page-button { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--border); background: #fff; border-radius: 4px; cursor: pointer; }
.page-button.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.upload-zone { min-height: 144px; padding: 20px; display: grid; place-items: center; text-align: center; border: 1px dashed #9db8b1; background: #f6fbf9; border-radius: var(--radius); cursor: pointer; }
.upload-zone:hover { border-color: var(--primary); background: #f0f8f5; }
.upload-zone-icon { width: 40px; height: 40px; margin: 0 auto 8px; display: grid; place-items: center; background: #e4f2ee; color: var(--primary); border-radius: 6px; }
.upload-zone-icon svg { width: 20px; }
.upload-zone strong { display: block; margin-bottom: 5px; font-size: 13px; }
.upload-zone p { margin: 0; color: var(--text-3); font-size: 10px; }
.source-grid { display: grid; grid-template-columns: repeat(6, minmax(110px, 1fr)); gap: 9px; }
.source-tile { min-height: 78px; padding: 12px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--border); background: #fff; border-radius: var(--radius); cursor: pointer; }
.source-tile:hover { border-color: #9fc2b9; }
.source-tile > div { display: flex; justify-content: space-between; align-items: flex-start; }
.source-tile svg { width: 17px; color: var(--primary); }
.source-tile span { color: var(--text-3); font-size: 9px; }
.source-tile strong { font-size: 11px; }
.batch-item { padding: 12px 14px; display: grid; grid-template-columns: 34px minmax(170px, 1fr) 100px 80px 160px 90px; gap: 12px; align-items: center; border-bottom: 1px solid var(--border); }
.batch-item:last-child { border-bottom: 0; }
.batch-file { min-width: 0; }
.batch-file strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.batch-file span { display: block; margin-top: 3px; color: var(--text-3); font-size: 9px; }
.batch-icon { width: 30px; height: 30px; display: grid; place-items: center; background: #edf3f1; color: var(--text-2); border-radius: 4px; }
.batch-icon svg { width: 15px; }
.network-layout { min-height: 590px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.network-stage { min-width: 0; position: relative; overflow: hidden; background-color: #f8faf9; background-image: radial-gradient(#d6e0dd 1px, transparent 1px); background-size: 18px 18px; border-right: 1px solid var(--border); }
.network-toolbar { position: absolute; z-index: 2; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; gap: 8px; pointer-events: none; }
.network-toolbar > div { display: flex; gap: 6px; pointer-events: auto; }
.network-canvas { width: 100%; height: 590px; display: block; }
.edge { stroke: #93aaa4; stroke-width: 1.3; opacity: .75; }
.edge.strong { stroke: var(--primary); stroke-width: 2.8; opacity: .9; }
.edge.alert { stroke: var(--red); stroke-width: 2; stroke-dasharray: 5 4; opacity: .9; }
.edge-label { fill: #667671; font-size: 10px; paint-order: stroke; stroke: #f8faf9; stroke-width: 4px; stroke-linejoin: round; }
.graph-node { cursor: pointer; }
.graph-node circle { stroke: #fff; stroke-width: 3; filter: drop-shadow(0 2px 3px rgb(18 34 30 / 16%)); }
.graph-node:hover circle, .graph-node.active circle { stroke: #1f443b; stroke-width: 3; }
.graph-node text { fill: #283632; font-size: 11px; font-weight: 600; text-anchor: middle; paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.network-side { display: flex; flex-direction: column; background: #fff; }
.side-section { padding: 14px; border-bottom: 1px solid var(--border); }
.side-section h3 { margin: 0 0 10px; font-size: 12px; }
.kv-list { display: grid; gap: 9px; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; }
.kv span { color: var(--text-3); }
.kv strong { text-align: right; font-weight: 600; }
.alert-item { margin-top: 8px; padding: 10px; background: var(--red-soft); border-left: 3px solid var(--red); border-radius: 3px; }
.alert-item strong { display: block; margin-bottom: 4px; color: #8f352e; font-size: 11px; }
.alert-item p { margin: 0; color: #76534f; font-size: 9px; line-height: 1.55; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab { min-height: 42px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--text-2); font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--text); background: #fafcfc; }
.tab.active { border-bottom-color: var(--primary); color: var(--primary); }
.tab-panel { padding: 14px; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tool-card { min-height: 130px; padding: 14px; border: 1px solid var(--border); background: #fff; border-radius: var(--radius); cursor: pointer; }
.tool-card:hover { border-color: #9fc2b9; box-shadow: 0 4px 15px rgb(26 69 59 / 8%); }
.tool-card-head { display: flex; justify-content: space-between; align-items: flex-start; }
.tool-card-icon { width: 34px; height: 34px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); border-radius: 5px; }
.tool-card-icon svg { width: 17px; }
.tool-card h3 { margin: 12px 0 6px; font-size: 13px; }
.tool-card p { margin: 0; color: var(--text-3); font-size: 10px; line-height: 1.55; }
.analysis-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(330px, .7fr); gap: 14px; }
.sankey { width: 100%; height: 285px; display: block; }
.sankey-node { rx: 3; }
.sankey-link { fill: none; opacity: .32; }
.sankey-label { fill: #2e3c38; font-size: 10px; font-weight: 600; }
.evidence-chain { display: grid; gap: 10px; }
.chain-row { display: grid; grid-template-columns: 140px minmax(120px, 1fr) 28px minmax(120px, 1fr) 100px; gap: 10px; align-items: center; }
.chain-node { min-height: 62px; padding: 10px; border: 1px solid var(--border); background: #fff; border-radius: 5px; }
.chain-node strong { display: block; margin-bottom: 4px; font-size: 11px; }
.chain-node p { margin: 0; color: var(--text-3); font-size: 9px; line-height: 1.45; }
.chain-arrow { display: grid; place-items: center; color: var(--text-3); }
.chain-arrow svg { width: 16px; }
.score-ring { width: 82px; height: 82px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--primary) 0 82%, #e5ece9 82% 100%); }
.score-ring::before { content: ""; grid-area: 1 / 1; width: 62px; height: 62px; background: #fff; border-radius: 50%; }
.score-ring > div { grid-area: 1 / 1; position: relative; text-align: center; }
.score-ring strong { display: block; font-size: 18px; }
.score-ring span { color: var(--text-3); font-size: 8px; }
.keyword-cloud { display: flex; gap: 7px; flex-wrap: wrap; }
.keyword { padding: 5px 8px; background: #f0f4f3; border: 1px solid var(--border); border-radius: 4px; font-size: 10px; cursor: pointer; }
.keyword.hot { color: var(--red); background: var(--red-soft); border-color: #efcbc7; }
.result-stage { min-height: 470px; position: relative; overflow: hidden; background: #f8faf9; }
.flow-lane { padding: 34px 26px; display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: 22px; overflow-x: auto; }
.flow-node { min-width: 120px; min-height: 108px; position: relative; padding: 12px; border: 1px solid var(--border-strong); background: #fff; border-radius: 5px; }
.flow-node::after { content: ""; position: absolute; top: 50%; left: calc(100% + 1px); width: 22px; border-top: 2px solid #8ba39d; }
.flow-node:last-child::after { display: none; }
.flow-node-icon { width: 28px; height: 28px; margin-bottom: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); border-radius: 4px; }
.flow-node-icon svg { width: 15px; }
.flow-node strong { display: block; font-size: 11px; }
.flow-node p { margin: 5px 0 0; color: var(--text-3); font-size: 9px; line-height: 1.45; }
.flow-node .evidence-count { display: inline-block; margin-top: 8px; color: var(--blue); font-size: 9px; }
.timeline { padding: 30px 24px; }
.timeline-track { position: relative; height: 230px; border-top: 2px solid #aabbb6; margin-top: 100px; }
.timeline-event { position: absolute; top: -6px; width: 150px; transform: translateX(-50%); }
.timeline-event::before { content: ""; display: block; width: 10px; height: 10px; margin: 0 auto; background: var(--primary); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--primary); }
.timeline-card { margin-top: 13px; padding: 9px; background: #fff; border: 1px solid var(--border); border-radius: 4px; box-shadow: var(--shadow-sm); }
.timeline-event:nth-child(even) .timeline-card { transform: translateY(-110px); }
.timeline-card time { color: var(--primary); font-size: 9px; font-weight: 700; }
.timeline-card strong { display: block; margin-top: 4px; font-size: 10px; }
.timeline-card p { margin: 4px 0 0; color: var(--text-3); font-size: 8px; line-height: 1.4; }
.resource-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.resource-card { min-height: 152px; padding: 14px; border-top: 3px solid var(--primary); }
.resource-card:nth-child(2) { border-top-color: var(--blue); }
.resource-card:nth-child(3) { border-top-color: var(--amber); }
.resource-card:nth-child(4) { border-top-color: var(--violet); }
.resource-card h3 { margin: 10px 0 6px; font-size: 13px; }
.resource-card p { margin: 0; color: var(--text-3); font-size: 9px; line-height: 1.55; }
.resource-meta { margin-top: 15px; display: flex; justify-content: space-between; }
.resource-meta strong { font-size: 15px; }
.resource-meta span { color: var(--text-3); font-size: 9px; }
.governance-list { display: grid; gap: 9px; }
.governance-row { padding: 12px; display: grid; grid-template-columns: 34px 1fr 120px 50px; gap: 10px; align-items: center; border: 1px solid var(--border); border-radius: 5px; }
.governance-row > svg { width: 18px; color: var(--primary); }
.governance-row strong { display: block; font-size: 11px; }
.governance-row p { margin: 3px 0 0; color: var(--text-3); font-size: 9px; }
.toggle { width: 38px; height: 21px; padding: 2px; border: 0; background: #cbd5d2; border-radius: 11px; cursor: pointer; }
.toggle::after { content: ""; width: 17px; height: 17px; display: block; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgb(0 0 0 / 20%); transition: transform .15s ease; }
.toggle.on { background: var(--primary); }
.toggle.on::after { transform: translateX(17px); }
.drawer { position: fixed; z-index: 60; top: 0; right: 0; width: 430px; max-width: 92vw; height: 100vh; overflow-y: auto; background: #fff; box-shadow: -12px 0 36px rgb(18 34 30 / 18%); transform: translateX(105%); transition: transform .22s ease; }
.drawer.open { transform: translateX(0); }
.drawer:not(.open) { visibility: hidden; }
.drawer-header { position: sticky; top: 0; z-index: 1; min-height: 64px; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--border); }
.drawer-header strong { display: block; font-size: 14px; }
.drawer-header span { color: var(--text-3); font-size: 10px; }
.drawer-body { padding: 16px; }
.drawer-section { padding: 14px 0; border-bottom: 1px solid var(--border); }
.drawer-section:first-child { padding-top: 0; }
.drawer-section h3 { margin: 0 0 11px; font-size: 12px; }
.origin-preview { padding: 14px; background: #f4f1ea; border: 1px solid #e2daca; border-radius: 4px; color: #493f32; font: 11px/1.8 "Songti SC", SimSun, serif; }
.highlight { padding: 1px 2px; background: #f7d986; }
.overlay { position: fixed; z-index: 50; inset: 0; display: none; background: rgb(9 17 15 / 40%); }
.overlay.show { display: block; }
.modal-backdrop { position: fixed; z-index: 70; inset: 0; display: none; place-items: center; padding: 20px; background: rgb(9 17 15 / 50%); }
.modal-backdrop.show { display: grid; }
.modal { width: min(620px, 96vw); max-height: 88vh; overflow-y: auto; background: #fff; border-radius: 7px; box-shadow: var(--shadow-md); }
.modal-header { min-height: 58px; padding: 13px 16px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
.modal-header h2 { margin: 0; font-size: 15px; }
.modal-body { padding: 16px; }
.modal-footer { padding: 12px 16px; display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-subtle); border-top: 1px solid var(--border); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-field { display: grid; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 10px; font-weight: 600; color: var(--text-2); }
textarea.input { height: 76px; padding-top: 9px; resize: vertical; }
.command-palette { position: fixed; z-index: 90; top: 11vh; left: 50%; width: min(600px, calc(100vw - 30px)); display: none; transform: translateX(-50%); background: #fff; border: 1px solid var(--border); border-radius: 7px; box-shadow: 0 24px 70px rgb(9 17 15 / 28%); }
.command-palette.show { display: block; }
.command-input-wrap { padding: 12px; display: flex; align-items: center; gap: 9px; border-bottom: 1px solid var(--border); }
.command-input-wrap svg { width: 18px; color: var(--text-3); }
.command-input-wrap input { flex: 1; height: 35px; border: 0; outline: none; font-size: 13px; }
.command-results { max-height: 350px; overflow-y: auto; padding: 8px; }
.command-result { width: 100%; min-height: 48px; padding: 8px 10px; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; border-radius: 5px; cursor: pointer; text-align: left; }
.command-result:hover { background: var(--surface-subtle); }
.command-result svg { width: 17px; color: var(--primary); }
.command-result strong { display: block; font-size: 11px; }
.command-result span { color: var(--text-3); font-size: 9px; }
.toast-region { position: fixed; z-index: 100; right: 18px; bottom: 18px; display: grid; gap: 8px; pointer-events: none; }
.toast { min-width: 280px; max-width: 360px; padding: 11px 13px; display: flex; align-items: flex-start; gap: 9px; background: #1b2b27; color: #fff; border-radius: 5px; box-shadow: var(--shadow-md); animation: toast-in .2s ease; }
.toast svg { width: 16px; color: #61d1b2; }
.toast strong { display: block; font-size: 11px; }
.toast span { display: block; margin-top: 2px; color: #b4c4bf; font-size: 9px; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }
.empty-state { min-height: 260px; display: grid; place-items: center; text-align: center; color: var(--text-3); }
.empty-state svg { width: 34px; margin-bottom: 8px; }
.empty-state strong { display: block; margin-bottom: 4px; color: var(--text-2); }
.muted { color: var(--text-3); }
.text-primary { color: var(--primary); }
.text-red { color: var(--red); }
.text-amber { color: var(--amber); }
.mobile-only { display: none; }
.table-config { min-height: 42px; padding: 8px 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text-3); font-size: 10px; border-bottom: 1px solid var(--border); background: #fbfcfc; }
.table-config > span { margin-right: auto; }
.entity-tabs { display: grid; gap: 10px; }
.entity-section { padding: 10px; border: 1px solid var(--border); border-radius: 5px; background: #fbfcfc; }
.entity-section > div { display: flex; justify-content: space-between; align-items: center; font-size: 11px; }
.entity-section ul { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.entity-section li { min-height: 28px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-2); font-size: 10px; border-top: 1px solid #edf1ef; }
.icon-button.small { width: 25px; height: 25px; }
.icon-button.small svg { width: 13px; height: 13px; }
.timeline-list { display: grid; gap: 0; }
.timeline-line { min-height: 56px; position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 0 0 14px 2px; }
.timeline-line::before { content: ""; position: absolute; left: 7px; top: 14px; bottom: -2px; border-left: 1px solid var(--border-strong); }
.timeline-line:last-child::before { display: none; }
.timeline-dot { position: relative; z-index: 1; width: 12px; height: 12px; flex: 0 0 12px; margin-top: 2px; border: 3px solid var(--primary-soft); background: var(--primary); border-radius: 50%; }
.timeline-line strong { display: block; font-size: 11px; }
.timeline-line p { margin: 4px 0 0; color: var(--text-3); font-size: 10px; }
.mini-graph { min-height: 90px; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 15px; background: #f8faf9; border: 1px solid var(--border); border-radius: 5px; }
.mini-graph span { padding: 9px 11px; border: 1px solid var(--border-strong); background: #fff; border-radius: 5px; font-size: 10px; font-weight: 600; }
.mini-graph span svg { width: 14px; vertical-align: -3px; color: var(--primary); }
.mini-graph b { color: var(--text-3); }
.field-error { min-height: 11px; color: var(--red); font-size: 9px; }
.field-hint { margin: 10px 0 0; color: var(--text-3); font-size: 10px; }
.analysis-result { margin-top: 14px; padding: 15px; display: flex; align-items: center; gap: 14px; border: 1px solid #efd2cd; background: var(--red-soft); border-radius: 5px; }
.analysis-result strong { color: var(--red); font-size: 24px; }
.analysis-result p { margin: 0; color: var(--text-2); font-size: 10px; }
.result-item { padding: 13px; border: 1px solid var(--border); border-radius: 5px; background: #fff; }
.result-item + .result-item { margin-top: 8px; }
.result-item strong { display: block; font-size: 11px; }
.result-item span { display: block; margin: 4px 0 8px; color: var(--text-3); font-size: 10px; line-height: 1.5; }
.sankey-box { margin-top: 14px; padding: 12px; background: #f8faf9; border: 1px solid var(--border); border-radius: 5px; }
.sankey-box .flow-lane { padding: 12px 0; }
.governance-row .toggle { justify-self: end; }
@media (max-width: 860px) { .table-config > span { width: 100%; } .entity-section li { align-items: flex-start; padding: 5px 0; } .mini-graph { justify-content: flex-start; } }

@media (max-width: 1180px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid, .analysis-layout { grid-template-columns: 1fr; }
  .summary-banner { grid-template-columns: 1.4fr repeat(2, 1fr); }
  .summary-metric:nth-last-child(-n+2) { display: none; }
  .source-grid { grid-template-columns: repeat(3, 1fr); }
  .resource-cards { grid-template-columns: repeat(2, 1fr); }
  .case-row { grid-template-columns: minmax(220px, 1.3fr) repeat(3, minmax(90px, .6fr)) 70px; }
  .case-row .case-field:nth-of-type(4) { display: none; }
}

@media (max-width: 860px) {
  .mobile-only { display: inline-grid; }
  .sidebar { transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow-md); }
  .sidebar.open { transform: translateX(0); }
  .main-shell { margin-left: 0; }
  .global-search { width: 38px; padding: 0; justify-content: center; cursor: pointer; }
  .global-search span, .global-search kbd, .user-chip > div:nth-child(2), .user-chip > svg { display: none; }
  .topbar { padding: 0 12px; }
  .main-content { padding: 16px 14px 30px; }
  .case-prefix, .case-code { display: none; }
  .page-header { align-items: stretch; flex-direction: column; gap: 12px; }
  .page-actions { justify-content: flex-start; }
  .split-panel { grid-template-columns: 1fr; }
  .split-panel > * + * { border-left: 0; border-top: 1px solid var(--border); }
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .network-layout { grid-template-columns: 1fr; }
  .network-stage { border-right: 0; }
  .network-side { border-top: 1px solid var(--border); }
  .case-row { grid-template-columns: 1fr 90px; }
  .case-row .case-field { display: none; }
  .batch-item { grid-template-columns: 34px 1fr 90px; }
  .batch-item > :nth-child(3), .batch-item > :nth-child(4), .batch-item > :nth-child(5) { display: none; }
  .chain-row { grid-template-columns: 1fr 26px 1fr; }
  .chain-row > :first-child, .chain-row > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .grid.cols-4, .grid.cols-3, .grid.cols-2, .resource-cards { grid-template-columns: 1fr; }
  .summary-banner { grid-template-columns: 1fr 1fr; }
  .summary-title { grid-column: 1 / -1; }
  .summary-metric { padding-left: 0; border-left: 0; }
  .workflow { grid-template-columns: repeat(8, 95px); }
  .source-grid, .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .filterbar { align-items: stretch; flex-direction: column; }
  .select { width: 100%; }
  .page-header h1 { font-size: 19px; }
  .case-switcher { max-width: 200px; }
  .case-switcher strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .governance-row { grid-template-columns: 28px 1fr 44px; }
  .governance-row > .status-badge { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
