:root {
  color-scheme: dark;
  --bg: #050b18;
  --bg-soft: #091224;
  --sidebar: #071021;
  --panel: rgba(15, 31, 55, 0.88);
  --panel-strong: #10233e;
  --panel-hover: #17304e;
  --border: rgba(133, 171, 220, 0.16);
  --border-strong: rgba(74, 212, 255, 0.34);
  --text: #f2f7ff;
  --muted: #8ea6c6;
  --subtle: #647c9e;
  --cyan: #3fd9ff;
  --blue: #448cff;
  --green: #30d6a0;
  --yellow: #ffc75a;
  --orange: #ff9168;
  --red: #ff627a;
  --purple: #9f8cff;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 246px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 78% -20%, rgba(43, 121, 255, 0.18), transparent 36%),
    radial-gradient(circle at 30% 100%, rgba(0, 194, 255, 0.06), transparent 30%),
    var(--bg);
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, #071329 0%, #060d1b 100%);
  border-right: 1px solid var(--border);
  transition: transform 0.25s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 76px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
}

.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #061222;
  font-size: 17px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), #5b8cff);
  border-radius: 11px;
  box-shadow: 0 0 24px rgba(63, 217, 255, 0.3);
}

.brand-copy strong { display: block; font-size: 15px; letter-spacing: 0.04em; }
.brand-copy span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }

.nav-list { padding: 16px 12px; overflow-y: auto; }
.nav-section-label {
  margin: 12px 12px 8px;
  color: #526b8d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}
.nav-item {
  width: 100%;
  height: 44px;
  margin: 3px 0;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.18s ease;
}
.nav-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(38, 159, 255, 0.2), rgba(63, 217, 255, 0.06));
  border-color: rgba(63, 217, 255, 0.17);
  box-shadow: inset 3px 0 0 var(--cyan);
}
.nav-icon { width: 20px; color: currentColor; font-size: 16px; text-align: center; }
.nav-badge {
  margin-left: auto;
  min-width: 21px;
  padding: 2px 6px;
  color: #fff;
  font-size: 10px;
  text-align: center;
  background: var(--red);
  border-radius: 999px;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 18px 20px;
  border-top: 1px solid var(--border);
}
.system-health { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.health-dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; box-shadow: 0 0 10px var(--green); }
.version { margin: 8px 0 0 16px; color: #465e7e; font-size: 10px; }

.main-shell { min-height: 100vh; margin-left: var(--sidebar-w); }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 76px;
  padding: 0 26px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(5, 13, 28, 0.84);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}
.menu-toggle { display: none; }
.breadcrumb { min-width: 190px; }
.breadcrumb strong { display: block; font-size: 16px; }
.breadcrumb span { display: block; margin-top: 5px; color: var(--subtle); font-size: 11px; }
.topbar-spacer { flex: 1; }
.global-filter { display: flex; gap: 8px; }
.select-control, .search-control {
  height: 38px;
  color: var(--text);
  background: #0b192d;
  border: 1px solid var(--border);
  border-radius: 9px;
}
.select-control { min-width: 126px; padding: 0 30px 0 12px; cursor: pointer; }
.select-control option { background: #0c192b; }
.search-wrap { position: relative; }
.search-control { width: 210px; padding: 0 38px 0 13px; }
.search-icon { position: absolute; top: 9px; right: 12px; color: var(--subtle); }
.icon-button {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #0b192d;
  border: 1px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
}
.icon-button:hover { color: var(--text); border-color: var(--border-strong); }
.notification-dot { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; background: var(--red); border: 1px solid #0b192d; border-radius: 50%; }
.user-profile { display: flex; align-items: center; gap: 9px; padding: 3px 5px; color: inherit; background: transparent; border: 0; border-radius: 9px; cursor: pointer; }
.user-profile:hover { background: rgba(255,255,255,0.04); }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: linear-gradient(135deg, #2f72dd, #38c9e9); border-radius: 10px; }
.user-meta strong { display: block; font-size: 12px; }
.user-meta span { display: block; margin-top: 3px; color: var(--subtle); font-size: 10px; }

.main-content { padding: 24px 26px 40px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.page-title h1 { margin: 0; font-size: 24px; letter-spacing: -0.02em; }
.page-title p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.page-actions { display: flex; gap: 9px; }
.btn {
  min-height: 38px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 700;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
  transition: 0.18s ease;
}
.btn-primary { color: #05111e; background: linear-gradient(135deg, var(--cyan), #4b8fff); border-color: transparent; }
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 8px 20px rgba(63, 217, 255, 0.15); }
.btn-secondary { color: var(--text); background: #0d1d33; }
.btn-secondary:hover { border-color: var(--border-strong); background: #112640; }
.btn-danger { color: #ffdbe1; background: rgba(255,98,122,0.12); border-color: rgba(255,98,122,0.25); }
.btn-sm { min-height: 30px; padding: 0 10px; font-size: 11px; }

.grid { display: grid; gap: 16px; }
.grid-kpi { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr); align-items: stretch; }
.grid-side { grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.5fr); }
.stack { display: grid; gap: 16px; }

.panel, .kpi-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(16, 35, 62, 0.9), rgba(9, 22, 40, 0.92));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel::before, .kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(63,217,255,0.35), transparent);
  opacity: 0.55;
}
.panel { padding: 18px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-title { margin: 0; font-size: 15px; }
.panel-subtitle { margin: 5px 0 0; color: var(--subtle); font-size: 11px; }
.panel-tools { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }

.kpi-card { min-height: 126px; padding: 18px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { color: var(--muted); font-size: 12px; }
.kpi-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--cyan); background: rgba(63,217,255,0.08); border-radius: 9px; }
.kpi-value { margin-top: 12px; font-family: "DIN Alternate", Inter, sans-serif; font-size: 27px; font-weight: 800; letter-spacing: -0.03em; }
.kpi-meta { margin-top: 8px; color: var(--subtle); font-size: 11px; }
.trend-up { color: var(--green); }
.trend-down { color: var(--red); }

.status-chip, .tag, .risk-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  border-radius: 999px;
}
.status-chip { padding: 4px 8px; font-size: 10px; font-weight: 700; }
.status-chip::before { content: ""; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.status-green { color: var(--green); background: rgba(48,214,160,0.1); }
.status-yellow { color: var(--yellow); background: rgba(255,199,90,0.1); }
.status-red { color: var(--red); background: rgba(255,98,122,0.1); }
.status-blue { color: var(--cyan); background: rgba(63,217,255,0.1); }
.status-gray { color: var(--muted); background: rgba(142,166,198,0.1); }
.tag { padding: 4px 8px; color: var(--muted); font-size: 10px; background: rgba(142,166,198,0.08); border: 1px solid var(--border); }
.source-badge { display: inline-flex; margin-left: 6px; padding: 2px 7px; color: var(--cyan); font-size: 9px; font-weight: 700; background: rgba(63,217,255,0.1); border: 1px solid rgba(63,217,255,0.25); border-radius: 999px; vertical-align: middle; }
.risk-chip { padding: 4px 8px; font-size: 10px; }
.risk-high { color: #ff8799; background: rgba(255,98,122,0.12); }
.risk-mid { color: #ffd27d; background: rgba(255,199,90,0.12); }
.risk-low { color: #70eac1; background: rgba(48,214,160,0.1); }

.progress { height: 6px; overflow: hidden; background: #071427; border-radius: 999px; }
.progress-bar { height: 100%; background: linear-gradient(90deg, #378cff, var(--cyan)); border-radius: inherit; }
.progress-bar.warning { background: linear-gradient(90deg, #ffab5b, var(--yellow)); }
.progress-bar.danger { background: linear-gradient(90deg, var(--red), #ff9b72); }
.progress-bar.success { background: linear-gradient(90deg, #24b788, var(--green)); }

.chart-area { min-height: 250px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 10px; }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 2px; }
.bar-chart { height: 230px; padding: 18px 8px 0; display: flex; align-items: flex-end; justify-content: space-around; gap: 10px; border-bottom: 1px solid var(--border); background: repeating-linear-gradient(to top, transparent 0, transparent 46px, rgba(126,158,200,0.08) 47px); }
.bar-group { height: 100%; flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 5px; position: relative; }
.bar { width: min(20px, 36%); min-height: 4px; border-radius: 5px 5px 0 0; transition: height 0.4s ease; }
.bar.plan { background: rgba(69, 139, 255, 0.42); }
.bar.actual { background: linear-gradient(180deg, var(--cyan), #3381ff); box-shadow: 0 -6px 18px rgba(63,217,255,0.11); }
.bar-label { position: absolute; bottom: -23px; color: var(--subtle); font-size: 10px; white-space: nowrap; }
.chart-foot { margin-top: 30px; }

.donut-wrap { display: flex; align-items: center; justify-content: space-around; gap: 22px; min-height: 228px; }
.donut { --value: 72; --color: var(--cyan); position: relative; width: 154px; height: 154px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--color) calc(var(--value) * 1%), #132843 0); }
.donut::after { content: ""; position: absolute; width: 112px; height: 112px; background: #0d1d33; border-radius: 50%; }
.donut-content { position: relative; z-index: 1; text-align: center; }
.donut-value { font-size: 25px; font-weight: 800; }
.donut-label { margin-top: 4px; color: var(--muted); font-size: 10px; }
.legend-list { display: grid; gap: 12px; min-width: 145px; }
.legend-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; font-size: 11px; }
.legend-row span:nth-child(2) { color: var(--muted); }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th { padding: 11px 12px; color: var(--subtle); font-size: 10px; font-weight: 700; text-align: left; white-space: nowrap; background: rgba(5,14,27,0.44); border-bottom: 1px solid var(--border); }
.data-table td { padding: 13px 12px; color: #dbe7f7; vertical-align: middle; border-bottom: 1px solid rgba(133,171,220,0.09); }
.data-table tbody tr { transition: background 0.15s ease; }
.data-table tbody tr:hover { background: rgba(63,217,255,0.035); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.table-primary { color: #fff; font-weight: 700; }
.table-secondary { margin-top: 4px; color: var(--subtle); font-size: 10px; }
.table-progress { min-width: 105px; }
.table-progress span { display: block; margin-bottom: 5px; font-size: 10px; }
.text-link { padding: 0; color: var(--cyan); background: transparent; border: 0; cursor: pointer; }
.text-link:hover { text-decoration: underline; }

.alert-list, .event-list, .ranking-list { display: grid; gap: 10px; }
.alert-item, .event-item, .ranking-item {
  padding: 12px;
  display: flex;
  gap: 11px;
  background: rgba(7, 20, 38, 0.6);
  border: 1px solid rgba(133,171,220,0.1);
  border-radius: 11px;
}
.alert-item { cursor: pointer; }
.alert-item:hover { border-color: var(--border-strong); background: rgba(17, 42, 68, 0.75); }
.alert-level { width: 4px; align-self: stretch; flex: 0 0 auto; border-radius: 999px; }
.alert-content { min-width: 0; flex: 1; }
.alert-title { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; }
.alert-title span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-desc { margin: 7px 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.alert-meta { display: flex; justify-content: space-between; color: var(--subtle); font-size: 9px; }

.map-panel { min-height: 380px; }
.map-canvas {
  position: relative;
  min-height: 305px;
  overflow: hidden;
  background:
    linear-gradient(rgba(31,100,151,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31,100,151,0.06) 1px, transparent 1px),
    radial-gradient(ellipse at center, rgba(19,98,152,0.2), rgba(5,18,35,0.42));
  background-size: 24px 24px, 24px 24px, auto;
  border: 1px solid rgba(63,217,255,0.1);
  border-radius: 12px;
}
.map-shape { position: absolute; inset: 9% 13%; opacity: 0.75; filter: drop-shadow(0 0 18px rgba(45,180,238,0.2)); }
.map-shape svg { width: 100%; height: 100%; }
.map-node { position: absolute; padding: 0; color: inherit; background: transparent; border: 0; transform: translate(-50%, -50%); cursor: pointer; }
.map-node-dot { width: 11px; height: 11px; background: var(--cyan); border: 2px solid #bff5ff; border-radius: 50%; box-shadow: 0 0 0 6px rgba(63,217,255,0.1), 0 0 17px var(--cyan); }
.map-node.warning .map-node-dot { background: var(--yellow); border-color: #fff1bf; box-shadow: 0 0 0 6px rgba(255,199,90,0.1), 0 0 17px var(--yellow); }
.map-node.danger .map-node-dot { background: var(--red); border-color: #ffd0d8; box-shadow: 0 0 0 6px rgba(255,98,122,0.1), 0 0 17px var(--red); }
.map-node-label { position: absolute; top: 15px; left: 50%; transform: translateX(-50%); padding: 4px 7px; color: #cfe9fb; font-size: 9px; white-space: nowrap; background: rgba(5,16,31,0.82); border: 1px solid var(--border); border-radius: 5px; }
.changsha-map-panel { min-height: 500px; }
.changsha-map { min-height: 345px; background-size: 28px 28px, 28px 28px, auto; }
.changsha-map .map-shape { inset: 6% 8% 8%; opacity: 0.92; }
.changsha-map .map-node { z-index: 3; }
.changsha-map .map-node:hover { z-index: 5; }
.changsha-map .map-node:hover .map-node-label { color: #fff; border-color: var(--border-strong); background: #081a30; }
.map-summary { color: var(--cyan); font-size: 11px; font-weight: 700; white-space: nowrap; }
.region-summary { margin-top: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.region-summary > div { min-width: 0; padding: 9px 10px; display: grid; gap: 4px; background: rgba(7,20,38,.58); border: 1px solid rgba(133,171,220,.11); border-radius: 8px; }
.region-summary strong { font-size: 10px; }
.region-summary span { overflow: hidden; color: var(--subtle); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-calibration { min-height: 0; align-self: stretch; display: flex; flex-direction: column; }
.dashboard-calibration .panel-header { margin-bottom: 12px; }
.dashboard-calibration .panel-title { font-size: 17px; letter-spacing: .01em; }
.dashboard-calibration .panel-subtitle { font-size: 12px; line-height: 1.5; }
.calibration-list { --dashboard-alert-slots: 3; min-height: 0; flex: 1 1 auto; display: grid; grid-template-rows: repeat(var(--dashboard-alert-slots), minmax(0, 1fr)); gap: 8px; perspective: 900px; }
.calibration-alert, .calibration-list > div {
  min-height: 0;
  padding: 6px 12px;
  display: grid;
  align-content: center;
  gap: 3px;
  color: inherit;
  text-align: left;
  background: linear-gradient(135deg, rgba(22,52,83,.72), rgba(7,20,38,.58));
  border: 1px solid var(--border);
  border-radius: 10px;
}
.calibration-alert {
  width: 100%;
  transform: rotateX(0deg);
  transform-origin: center;
  backface-visibility: hidden;
  cursor: pointer;
  transition: transform .26s ease, opacity .26s ease, border-color .2s ease, background .2s ease;
}
.calibration-alert.is-flipping-out { opacity: 0; transform: rotateX(88deg); }
.calibration-alert.is-flipping-in { opacity: 0; transform: rotateX(-88deg); }
.calibration-alert:hover { background: linear-gradient(135deg, rgba(27,64,101,.78), rgba(9,27,49,.68)); border-color: var(--border-strong); }
.calibration-alert-top { min-width: 0; display: flex; align-items: center; gap: 8px; }
.calibration-alert-domain { overflow: hidden; color: var(--muted) !important; font-size: 11px !important; font-weight: 600; letter-spacing: .04em; text-overflow: ellipsis; white-space: nowrap; }
.calibration-alert .risk-chip { padding: 3px 7px; flex: 0 0 auto; font-size: 9px; font-weight: 700; }
.calibration-alert .risk-high { color: #ff8799; }
.calibration-alert .risk-mid { color: #ffd27d; }
.calibration-alert .risk-low { color: #70eac1; }
.calibration-alert-title { overflow: hidden; color: #fff !important; font-size: 15px !important; font-weight: 800; line-height: 1.25; letter-spacing: .01em; text-overflow: ellipsis; white-space: nowrap; }
.calibration-alert-desc { display: -webkit-box; overflow: hidden; color: #a9bdd7 !important; font-size: 11px !important; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.calibration-alert-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--subtle) !important; font-size: 10px !important; line-height: 1.3; }
.calibration-alert-meta > span { overflow: hidden; color: inherit; font-size: inherit; text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  .calibration-alert { transition: border-color .2s ease, background .2s ease; }
  .calibration-alert.is-flipping-out, .calibration-alert.is-flipping-in { opacity: 1; transform: none; }
}
.dashboard-supervision-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dashboard-module { min-width: 0; padding: 16px; }
.dashboard-module .panel-header { margin-bottom: 10px; }
.dashboard-module-table { min-width: 590px; table-layout: fixed; }
.dashboard-module-table th, .dashboard-module-table td { padding: 9px 8px; }
.dashboard-module-table tbody tr { height: 61px; }
.dashboard-module-table th:first-child { width: 26%; }
.dashboard-module-table th:last-child { width: 72px; }
.dashboard-module-table .table-primary { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-risk-content { max-width: 260px; overflow: hidden; color: var(--muted) !important; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }

.project-table-wrap { width: 100%; }
.project-table { min-width: 1180px; table-layout: fixed; }
.project-col-name { width: 14%; }
.project-col-company { width: 11%; }
.project-col-invest { width: 8.5%; }
.project-col-paid { width: 10.5%; }
.project-col-progress { width: 12%; }
.project-col-risk { width: 27%; }
.project-col-status { width: 8%; }
.project-col-action { width: 9%; }
.project-table th, .project-table td { padding-left: 9px; padding-right: 9px; }
.project-table .number { white-space: nowrap; }
.project-name, .project-company { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-company { color: #dbe7f7; font-size: 11px; }
.project-risk-reason { min-width: 0; grid-template-columns: auto minmax(0, 1fr); gap: 6px; }
.project-risk-reason > span:last-child { display: -webkit-box; overflow: hidden; line-height: 1.42; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.map-tooltip { position: absolute; z-index: 4; min-width: 165px; padding: 10px; color: var(--muted); font-size: 10px; line-height: 1.7; background: #08172a; border: 1px solid var(--border-strong); border-radius: 8px; box-shadow: var(--shadow); pointer-events: none; transform: translate(10px, -100%); }

.timeline { position: relative; display: grid; gap: 0; }
.timeline::before { content: ""; position: absolute; left: 12px; top: 9px; bottom: 18px; width: 1px; background: var(--border); }
.timeline-item { position: relative; padding: 0 0 20px 34px; }
.timeline-dot { position: absolute; left: 7px; top: 4px; width: 11px; height: 11px; background: #153252; border: 2px solid var(--cyan); border-radius: 50%; }
.timeline-time { color: var(--cyan); font-size: 10px; }
.timeline-title { margin-top: 5px; font-size: 12px; font-weight: 700; }
.timeline-desc { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.5; }

.stepper { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.step { position: relative; padding: 12px; text-align: center; background: rgba(7,20,38,0.6); border: 1px solid var(--border); border-radius: 10px; }
.step:not(:last-child)::after { content: "›"; position: absolute; top: 50%; right: -8px; z-index: 2; color: var(--subtle); transform: translate(50%, -50%); }
.step-num { width: 23px; height: 23px; margin: 0 auto 8px; display: grid; place-items: center; color: var(--cyan); font-size: 10px; background: rgba(63,217,255,0.08); border-radius: 50%; }
.step.active { border-color: var(--border-strong); background: rgba(63,217,255,0.06); }
.step.done .step-num { color: #052019; background: var(--green); }
.step-label { font-size: 11px; }

.tabs { display: flex; gap: 5px; margin-bottom: 15px; padding-bottom: 1px; overflow-x: auto; border-bottom: 1px solid var(--border); }
.tab { padding: 9px 13px; color: var(--muted); white-space: nowrap; background: transparent; border: 0; border-bottom: 2px solid transparent; cursor: pointer; }
.tab.active { color: var(--cyan); border-bottom-color: var(--cyan); }

.filter-bar { margin-bottom: 16px; padding: 12px; display: flex; flex-wrap: wrap; gap: 9px; background: rgba(8,20,38,0.72); border: 1px solid var(--border); border-radius: 12px; }
.filter-bar .search-control { flex: 1; min-width: 190px; }

.entity-card { padding: 15px; background: rgba(7,20,38,0.55); border: 1px solid var(--border); border-radius: 12px; }
.entity-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.entity-name { font-size: 13px; font-weight: 700; }
.entity-code { margin-top: 5px; color: var(--subtle); font-size: 10px; }
.entity-grid { margin-top: 13px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.entity-stat { padding: 9px; background: rgba(5,14,28,0.6); border-radius: 8px; }
.entity-stat span { display: block; color: var(--subtle); font-size: 9px; }
.entity-stat strong { display: block; margin-top: 5px; font-size: 12px; }

.model-card { padding: 15px; background: rgba(7,20,38,0.6); border: 1px solid var(--border); border-radius: 12px; }
.model-card.enabled { border-color: rgba(63,217,255,0.25); }
.model-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.model-icon { width: 35px; height: 35px; display: grid; place-items: center; color: var(--cyan); background: rgba(63,217,255,0.08); border-radius: 9px; }
.model-name { margin-top: 12px; font-size: 13px; font-weight: 700; }
.model-desc { min-height: 34px; margin-top: 7px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.model-foot { margin-top: 13px; padding-top: 11px; display: flex; justify-content: space-between; color: var(--subtle); font-size: 9px; border-top: 1px solid var(--border); }
.switch { position: relative; width: 36px; height: 20px; background: #1a2c44; border: 0; border-radius: 999px; cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; background: #7890ac; border-radius: 50%; transition: 0.2s; }
.switch.on { background: rgba(63,217,255,0.28); }
.switch.on::after { left: 19px; background: var(--cyan); box-shadow: 0 0 8px rgba(63,217,255,0.6); }

.score { display: flex; align-items: center; gap: 10px; }
.score-bar { width: 90px; height: 5px; background: #0a1628; border-radius: 999px; }
.score-fill { height: 100%; background: var(--green); border-radius: inherit; }
.score-fill.mid { background: var(--yellow); }
.score-fill.low { background: var(--red); }

.ai-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; min-height: calc(100vh - 144px); }
.ai-sidebar, .chat-panel { background: linear-gradient(145deg, rgba(16,35,62,0.9), rgba(9,22,40,0.92)); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.ai-sidebar { padding: 16px; }
.prompt-list { display: grid; gap: 8px; margin-top: 14px; }
.prompt-card { padding: 11px; color: var(--muted); font-size: 10px; line-height: 1.5; text-align: left; background: rgba(5,14,27,0.55); border: 1px solid var(--border); border-radius: 9px; cursor: pointer; }
.prompt-card:hover { color: var(--text); border-color: var(--border-strong); }
.chat-panel { display: flex; flex-direction: column; overflow: hidden; }
.chat-header { padding: 16px 18px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--border); }
.ai-orb { width: 36px; height: 36px; display: grid; place-items: center; color: #061524; background: linear-gradient(135deg, var(--cyan), var(--purple)); border-radius: 11px; box-shadow: 0 0 22px rgba(63,217,255,0.2); }
.chat-messages { flex: 1; min-height: 370px; padding: 22px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.message { max-width: 82%; padding: 12px 14px; font-size: 12px; line-height: 1.7; border-radius: 12px; }
.message.user { align-self: flex-end; color: #fff; background: #1764a6; border-bottom-right-radius: 3px; }
.message.assistant { align-self: flex-start; color: #dbe9f8; background: #10243d; border: 1px solid var(--border); border-bottom-left-radius: 3px; }
.message strong { color: var(--cyan); }
.message-error { border-color: rgba(255,107,107,0.4) !important; color: #ff8b8b !important; }
.message-meta { margin-top: 8px; font-size: 10px; color: #6c86a3; }
.chat-loading { display: inline-flex; align-items: center; gap: 8px; }
.chat-input-wrap { padding: 15px; border-top: 1px solid var(--border); }
.chat-input { display: flex; gap: 9px; padding: 8px; background: #08172a; border: 1px solid var(--border); border-radius: 12px; }
.chat-input textarea { min-height: 42px; max-height: 110px; flex: 1; padding: 10px; resize: none; color: var(--text); background: transparent; border: 0; outline: 0; }
.chat-input button { align-self: flex-end; }
.message.assistant .md-table-wrap { max-width: 100%; margin: 10px 0; overflow-x: auto; border: 1px solid rgba(133,171,220,0.16); border-radius: 7px; }
.message.assistant .md-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 11px; }
.message.assistant .md-table th, .message.assistant .md-table td { padding: 6px 8px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.message.assistant .md-table th { background: #0a1d33; color: var(--cyan); font-weight: 700; white-space: nowrap; }
.message.assistant .md-table tr:nth-child(even) td { background: rgba(255,255,255,0.02); }
.message.assistant .md-table tbody tr:hover td { background: rgba(63,217,255,0.06); }
.message.assistant .md-h { margin: 8px 0 4px; font-size: 13px; color: var(--cyan); }
.message.assistant p { margin: 4px 0; }
.message.assistant ul, .message.assistant ol { margin: 4px 0; padding-left: 18px; }
.message.assistant li { margin: 2px 0; }
.message.assistant code { background: rgba(255,255,255,0.08); padding: 1px 4px; border-radius: 3px; font-size: 11px; }
.chat-task-card { margin-top: 10px; padding: 12px 14px; background: linear-gradient(135deg, rgba(63,217,255,0.08), rgba(124,77,255,0.08)); border: 1px solid var(--cyan); border-radius: 10px; }
.chat-task-card-title { font-size: 13px; font-weight: 600; color: var(--cyan); margin-bottom: 6px; }
.chat-task-card-desc { font-size: 11px; color: #9bb3d1; margin-bottom: 10px; line-height: 1.5; }

.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(1, 6, 14, 0.72); backdrop-filter: blur(6px); }
.modal { width: min(680px, 100%); max-height: min(760px, 92vh); overflow-y: auto; background: #0b1a2e; border: 1px solid var(--border-strong); border-radius: 17px; box-shadow: 0 30px 90px rgba(0,0,0,0.5); }
.modal-header { position: sticky; top: 0; z-index: 2; padding: 17px 19px; display: flex; align-items: center; justify-content: space-between; background: rgba(11,26,46,0.95); border-bottom: 1px solid var(--border); backdrop-filter: blur(12px); }
.modal-title { margin: 0; font-size: 16px; }
.modal-body { padding: 19px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.detail-item { padding: 11px; background: rgba(5,14,27,0.55); border-radius: 9px; }
.detail-item span { display: block; color: var(--subtle); font-size: 9px; }
.detail-item strong { display: block; margin-top: 6px; font-size: 12px; }
.modal-actions { padding: 15px 19px; display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--border); }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.form-field { display: grid; gap: 7px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { color: var(--muted); font-size: 10px; }
.form-input { width: 100%; min-height: 40px; padding: 9px 11px; color: var(--text); background: #071528; border: 1px solid var(--border); border-radius: 8px; }
.form-input:focus { border-color: var(--border-strong); }
.task-form-context { margin-bottom: 16px; padding: 13px 14px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 5px 10px; background: linear-gradient(135deg, rgba(63,217,255,.08), rgba(68,140,255,.05)); border: 1px solid rgba(63,217,255,.2); border-radius: 10px; }
.task-form-context span { color: var(--subtle); font-size: 10px; }
.task-form-context strong { overflow: hidden; color: var(--cyan); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.task-form-context small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; line-height: 1.5; }
.task-assignee-select { color: #fff; font-weight: 700; border-color: rgba(63,217,255,.28); }
textarea.form-input { min-height: 84px; resize: vertical; }

/* 本体工作台只负责语义建模与规则执行，复用全局面板但使用独立布局语义。 */
.ontology-status { margin: -6px 0 16px; padding: 10px 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; background: rgba(8, 24, 43, 0.72); border: 1px solid var(--border); border-radius: 11px; }
.ontology-workbench { overflow: visible; }
.ontology-tabs { position: sticky; top: 76px; z-index: 10; margin: -18px -18px 18px; padding: 7px 18px 0; background: rgba(11, 27, 48, 0.96); border-radius: 16px 16px 0 0; backdrop-filter: blur(14px); }
.ontology-kpis { margin-bottom: 0; }
.ontology-section-head { margin-bottom: 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.ontology-section-head h2 { margin: 0; font-size: 17px; }
.ontology-section-head p { max-width: 720px; margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.ontology-section-head > div:last-child { flex: 0 0 auto; }
.ontology-subsection { margin-top: 18px; padding: 16px; background: rgba(5, 16, 31, 0.56); border: 1px solid var(--border); border-radius: 13px; }
.ontology-subsection > h3 { margin: 0 0 13px; font-size: 13px; }
.ontology-control-panel { padding: 17px; display: grid; align-content: start; gap: 11px; background: rgba(6, 19, 36, 0.78); border: 1px solid var(--border); border-radius: 13px; }
.ontology-control-panel h3 { margin: 0; font-size: 13px; }
.ontology-control-panel label { display: grid; gap: 7px; color: var(--muted); font-size: 10px; }
.ontology-control-panel hr { width: 100%; margin: 4px 0; border: 0; border-top: 1px solid var(--border); }
.ontology-graph { min-height: 560px; }
.ontology-graph .graph-node.root { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(63, 217, 255, 0.08), 0 16px 36px rgba(0,0,0,0.35); }
.ontology-graph .graph-node span { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ontology-color { width: 9px; height: 9px; margin-right: 7px; display: inline-block; vertical-align: 1px; border-radius: 50%; box-shadow: 0 0 8px currentColor; }
.json-preview { max-width: 270px; max-height: 72px; padding: 7px; display: block; overflow: auto; color: #a9d5ec; font: 9px/1.5 Consolas, monospace; white-space: pre-wrap; background: rgba(3, 12, 24, 0.72); border: 1px solid rgba(133,171,220,0.1); border-radius: 7px; }
.code-input { min-height: 150px !important; font: 11px/1.6 Consolas, "Microsoft YaHei", monospace; tab-size: 2; }
.field-help { color: var(--subtle); font-size: 9px; line-height: 1.6; }
.danger-link { color: #ff8799; }
.card-actions { margin-top: 12px; padding-top: 10px; display: flex; flex-wrap: wrap; gap: 14px; border-top: 1px solid var(--border); }
.evidence-line { margin: 4px 0; display: grid; gap: 3px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.evidence-line code { width: fit-content; padding: 2px 5px; color: var(--cyan); background: rgba(63,217,255,0.07); border-radius: 4px; }
.table-reason { max-width: 300px; margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.risk-score { margin-top: 7px; color: var(--subtle); font-size: 9px; }
.risk-score strong { color: var(--text); font-size: 16px; }
.warning-evidence-table { min-width: 1100px; }
.warning-evidence-table td:nth-child(1), .warning-evidence-table td:nth-child(5) { min-width: 210px; }
.path-result { margin-top: 4px; padding: 10px; color: var(--muted); font-size: 10px; line-height: 1.6; background: rgba(48,214,160,0.06); border: 1px solid rgba(48,214,160,0.18); border-radius: 9px; }
.path-result strong { margin-right: 8px; color: var(--green); }
.path-result.not-found { background: rgba(255,98,122,0.06); border-color: rgba(255,98,122,0.18); }
.path-result.not-found strong { color: var(--red); }
.full-detail { grid-column: 1 / -1; }
.detail-item pre { max-height: 240px; margin: 8px 0 0; padding: 10px; overflow: auto; color: #bce4f7; font: 10px/1.6 Consolas, monospace; white-space: pre-wrap; background: #061326; border-radius: 7px; }
.detail-item p { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.audit-list { max-height: 520px; display: grid; gap: 8px; overflow: auto; }
.audit-item { padding: 10px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 10px; background: rgba(5,14,27,0.52); border: 1px solid rgba(133,171,220,0.1); border-radius: 9px; }
.audit-item strong { font-size: 11px; }
.audit-item p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; word-break: break-word; }
.audit-item time { color: var(--subtle); font-size: 9px; white-space: nowrap; }
.domain-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.domain-card { position: relative; min-height: 190px; padding: 20px; display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 15px; overflow: hidden; background: linear-gradient(145deg, rgba(16, 35, 62, 0.92), rgba(8, 21, 39, 0.96)); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.domain-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.domain-index { width: 42px; height: 42px; display: grid; place-items: center; color: var(--cyan); font: 700 14px Consolas, monospace; background: rgba(63,217,255,0.08); border: 1px solid rgba(63,217,255,0.16); border-radius: 11px; }
.domain-card h3 { margin: 2px 0 7px; font-size: 15px; }
.domain-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.domain-stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.domain-stats span { padding: 9px; color: var(--subtle); font-size: 9px; text-align: center; background: rgba(4,14,28,0.55); border-radius: 8px; }
.domain-stats strong { margin-right: 4px; color: var(--text); font-size: 15px; }
.domain-card > .btn { grid-column: 1 / -1; width: fit-content; justify-self: end; }
.ontology-object { width: 100%; align-items: center; color: inherit; text-align: left; cursor: pointer; }
.ontology-object:hover { border-color: var(--border-strong); }
.ontology-object > div { min-width: 0; flex: 1; }
.ontology-object strong { font-size: 11px; }
.ontology-object p { margin: 4px 0 0; color: var(--subtle); font-size: 9px; }

.toast-region { position: fixed; top: 88px; right: 22px; z-index: 100; display: grid; gap: 9px; pointer-events: none; }
.toast { min-width: 260px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; color: #eaf6ff; font-size: 11px; background: #10243d; border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--shadow); animation: toastIn 0.22s ease both; }
.toast.success { border-color: rgba(48,214,160,0.35); }
.toast.error { border-color: rgba(255,98,122,0.4); }
@keyframes toastIn { from { opacity: 0; transform: translateX(16px); } }

.empty-state { min-height: 220px; display: grid; place-items: center; text-align: center; color: var(--muted); }
.empty-state strong { display: block; margin-bottom: 7px; color: var(--text); }
.page-loading { min-height: 50vh; display: grid; place-items: center; align-content: center; gap: 13px; color: var(--muted); font-size: 12px; }
.loader { width: 28px; height: 28px; border: 2px solid rgba(63,217,255,0.15); border-top-color: var(--cyan); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
.number { font-variant-numeric: tabular-nums; }
.no-margin { margin: 0; }
.mt-16 { margin-top: 16px; }
.mobile-overlay { display: none; }

/* 登录页独立于工作台外壳，保持认证入口与业务页面职责分离。 */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(380px, 0.55fr);
  background: #040b17;
}
.login-visual {
  position: relative;
  min-height: 100vh;
  padding: 42px 6vw;
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 48%, rgba(45, 177, 255, 0.2), transparent 13%),
    radial-gradient(circle at 70% 48%, rgba(54, 83, 255, 0.13), transparent 35%),
    linear-gradient(135deg, #06152c, #05101f 60%, #071b30);
}
.login-grid {
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background-image: linear-gradient(rgba(61, 156, 214, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(61, 156, 214, 0.07) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, #000, transparent 90%);
}
.login-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 13px; }
.login-brand strong { display: block; font-size: 17px; letter-spacing: 0.06em; }
.login-brand span:not(.brand-mark) { display: block; margin-top: 5px; color: #5d789a; font-size: 9px; letter-spacing: 0.12em; }
.login-hero { position: relative; z-index: 2; width: min(650px, 66%); margin-top: 20vh; }
.eyebrow { color: var(--cyan); font-size: 12px; font-weight: 700; letter-spacing: 0.2em; }
.login-hero h1 { margin: 22px 0; font-size: clamp(34px, 4vw, 59px); line-height: 1.22; letter-spacing: -0.04em; }
.login-hero h1 em { color: transparent; font-style: normal; background: linear-gradient(90deg, #fff, var(--cyan)); background-clip: text; }
.login-hero p { max-width: 590px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.9; }
.login-metrics { margin-top: 42px; display: flex; gap: 48px; }
.login-metrics div { position: relative; }
.login-metrics div:not(:last-child)::after { content: ""; position: absolute; top: 4px; right: -25px; width: 1px; height: 34px; background: var(--border); }
.login-metrics strong { display: block; color: var(--cyan); font-size: 24px; }
.login-metrics span { display: block; margin-top: 5px; color: var(--subtle); font-size: 10px; }
.login-orbit { position: absolute; top: 48%; left: 75%; border: 1px solid rgba(63,217,255,0.16); border-radius: 50%; transform: translate(-50%, -50%); }
.orbit-one { width: 390px; height: 390px; animation: orbitPulse 4s ease-in-out infinite; }
.orbit-two { width: 270px; height: 270px; border-style: dashed; animation: orbitSpin 20s linear infinite; }
.login-core { position: absolute; top: 48%; left: 75%; width: 112px; height: 112px; display: grid; place-items: center; color: #071322; font-size: 27px; font-weight: 900; background: radial-gradient(circle at 35% 30%, #d8faff, var(--cyan) 35%, #4a80ff); border-radius: 50%; box-shadow: 0 0 0 18px rgba(63,217,255,0.04), 0 0 70px rgba(63,217,255,0.38); transform: translate(-50%, -50%); }
@keyframes orbitPulse { 50% { transform: translate(-50%, -50%) scale(1.06); opacity: 0.65; } }
@keyframes orbitSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.demo-watermark { position: absolute; left: 6vw; bottom: 32px; color: #405a7b; font-size: 10px; }
.login-form-side { position: relative; z-index: 3; display: grid; place-items: center; padding: 36px; background: rgba(7, 16, 31, 0.96); border-left: 1px solid var(--border); box-shadow: -28px 0 80px rgba(0,0,0,0.22); }
.login-form { width: min(360px, 100%); }
.login-form-title span { color: var(--cyan); font-size: 11px; font-weight: 700; letter-spacing: 0.18em; }
.login-form-title h2 { margin: 10px 0 7px; font-size: 28px; }
.login-form-title p { margin: 0 0 32px; color: var(--muted); font-size: 12px; }
.login-form > label { margin-bottom: 18px; display: grid; gap: 8px; color: var(--muted); font-size: 11px; }
.login-input { width: 100%; height: 46px; padding: 0 13px; color: var(--text); background: #09182b; border: 1px solid var(--border); border-radius: 9px; }
.login-input:focus { border-color: var(--border-strong); }
.login-options { margin: 2px 0 22px; display: flex; justify-content: space-between; color: var(--subtle); font-size: 10px; }
.login-options label { display: flex; align-items: center; gap: 6px; }
.login-submit { width: 100%; min-height: 46px; }
.login-tip { margin-top: 18px; padding: 11px; color: var(--subtle); font-size: 10px; text-align: center; background: rgba(63,217,255,0.04); border: 1px solid var(--border); border-radius: 8px; }

.fund-flow { min-height: 268px; display: grid; grid-template-columns: 1fr auto 1.1fr auto 1fr; align-items: center; gap: 12px; }
.flow-column { display: grid; gap: 10px; }
.flow-column > span { margin-bottom: 2px; color: var(--subtle); font-size: 9px; text-align: center; }
.flow-node { padding: 12px 10px; display: grid; gap: 5px; color: var(--muted); font-size: 10px; background: rgba(7,20,38,0.7); border: 1px solid var(--border); border-radius: 9px; }
.flow-node strong { color: var(--text); font-size: 12px; }
.flow-node.source { border-left: 2px solid var(--blue); }
.flow-node.center { min-height: 88px; align-content: center; color: var(--cyan); border-color: var(--border-strong); box-shadow: 0 0 30px rgba(63,217,255,0.06); }
.flow-node.target { border-right: 2px solid var(--green); }
.flow-node.warning { border-color: rgba(255,98,122,0.32); border-right-color: var(--red); }
.flow-lines { color: var(--cyan); line-height: 4; opacity: 0.6; }

.risk-with-reason { min-width: 190px; display: grid; gap: 7px; align-items: start; }
.risk-with-reason .risk-chip { justify-self: start; }
.risk-with-reason > span { color: var(--muted); font-size: 10px; line-height: 1.55; }
.risk-summary-list, .lineage-list, .evidence-list { display: grid; gap: 10px; }
.risk-summary-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.risk-summary-item { padding: 14px; background: rgba(7,20,38,.55); border: 1px solid var(--border); border-radius: 10px; }
.risk-summary-item > div { display: flex; align-items: center; gap: 9px; }
.risk-summary-item p { margin: 9px 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.lineage-row { padding: 12px; display: grid; grid-template-columns: repeat(4, minmax(135px, 1fr) auto) minmax(180px, 1.2fr); align-items: stretch; gap: 8px; background: rgba(7,20,38,.48); border: 1px solid var(--border); border-radius: 10px; }
.lineage-row.has-risk { border-color: rgba(255,199,90,.26); }
.lineage-row > i { align-self: center; color: var(--cyan); font-style: normal; opacity: .6; }
.lineage-node { min-width: 0; padding: 10px; display: grid; align-content: center; gap: 5px; color: var(--text); text-align: left; background: rgba(15,35,59,.7); border: 1px solid var(--border); border-radius: 8px; }
button.lineage-node { cursor: pointer; }
button.lineage-node:hover { border-color: var(--border-strong); }
.lineage-node span { color: var(--subtle); font-size: 9px; }
.lineage-node strong { overflow-wrap: anywhere; font-size: 10px; line-height: 1.4; }
.lineage-node small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.lineage-risk { padding: 9px; display: grid; align-content: center; gap: 6px; border-left: 1px solid var(--border); }
.lineage-risk > span:last-child { color: var(--muted); font-size: 9px; line-height: 1.5; }
.lineage-risk-action { padding: 9px; display: grid; align-content: center; justify-items: start; gap: 8px; border-left: 1px solid var(--border); }
.lineage-risk-action .text-link { font-size: 10px; }
.evidence-line { padding: 10px 12px; display: grid; grid-template-columns: minmax(130px,.55fr) minmax(0,1.45fr); gap: 12px; background: rgba(7,20,38,.45); border: 1px solid var(--border); border-radius: 8px; }
.evidence-line strong { color: var(--text); font-size: 10px; }
.evidence-line span { color: var(--muted); font-size: 10px; line-height: 1.55; }
.report-overview { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }

.graph-canvas { position: relative; min-height: 470px; overflow: hidden; background: radial-gradient(circle at center, rgba(25,101,150,0.18), transparent 55%), linear-gradient(rgba(55,122,163,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(55,122,163,0.05) 1px, transparent 1px); background-size: auto, 26px 26px, 26px 26px; border: 1px solid rgba(63,217,255,0.1); border-radius: 12px; }
.graph-canvas > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.graph-node { position: absolute; z-index: 2; min-width: 92px; padding: 9px; display: grid; justify-items: center; color: var(--text); font-size: 10px; background: rgba(7,20,38,0.9); border: 1px solid color-mix(in srgb, var(--node-color) 42%, transparent); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.25); transform: translate(-50%, -50%); cursor: pointer; }
.graph-node:hover { border-color: var(--node-color); transform: translate(-50%, -50%) scale(1.04); }
.graph-node i { width: 10px; height: 10px; margin-bottom: 6px; background: var(--node-color); border-radius: 50%; box-shadow: 0 0 12px var(--node-color); }
.graph-node small { margin-top: 4px; color: var(--subtle); font-size: 8px; }

@media (max-width: 1080px) {
  .login-page { grid-template-columns: 1fr 390px; }
  .login-hero { width: 72%; }
  .login-core, .login-orbit { left: 78%; }
}

@media (max-width: 760px) {
  .login-page { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-form-side { min-height: 100vh; border-left: 0; }
  .fund-flow { grid-template-columns: 1fr; }
  .flow-lines { line-height: 1; text-align: center; transform: rotate(90deg); }
  .risk-summary-list, .report-overview { grid-template-columns: 1fr; }
  .lineage-row { grid-template-columns: 1fr; }
  .lineage-row > i { text-align: center; transform: rotate(90deg); }
  .lineage-risk { border-left: 0; border-top: 1px solid var(--border); }
  .evidence-line { grid-template-columns: 1fr; }
  .graph-canvas { min-height: 390px; }
  .graph-node { min-width: 76px; padding: 7px; font-size: 9px; }
}

@media (max-width: 1260px) {
  .grid-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-main, .grid-side { grid-template-columns: 1fr; }
  .dashboard-calibration { min-height: 0; height: auto; }
  .calibration-alert { min-height: 96px; }
  .ontology-graph { min-height: 520px; }
  .domain-grid { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  :root { --sidebar-w: 236px; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-shell { margin-left: 0; }
  .menu-toggle { display: grid; }
  .mobile-overlay { position: fixed; inset: 0; z-index: 35; display: block; background: rgba(1,6,14,0.62); border: 0; }
  .global-filter .select-control:nth-child(2), .user-meta { display: none; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .dashboard-supervision-grid { grid-template-columns: 1fr; }
  .region-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .topbar { height: 66px; padding: 0 14px; gap: 9px; }
  .breadcrumb { min-width: 0; }
  .breadcrumb span { display: none; }
  .breadcrumb strong { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .global-filter, .search-wrap { display: none; }
  .main-content { padding: 18px 14px 30px; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .page-actions { width: 100%; overflow-x: auto; }
  .grid-kpi, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .dashboard-supervision-grid, .calibration-list, .region-summary { grid-template-columns: 1fr; }
  .changsha-map-panel { min-height: 0; }
  .changsha-map { min-height: 300px; }
  .map-node-label { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
  .kpi-card { min-height: 112px; }
  .panel { padding: 14px; }
  .donut-wrap { align-items: flex-start; flex-direction: column; }
  .stepper { grid-template-columns: 1fr; }
  .step:not(:last-child)::after { top: auto; right: 50%; bottom: -11px; transform: rotate(90deg); }
  .ai-layout { grid-template-columns: 1fr; }
  .ai-sidebar { display: none; }
  .message { max-width: 94%; }
  .detail-grid, .form-grid { grid-template-columns: 1fr; }
  .form-field.full, .full-detail { grid-column: auto; }
  .entity-grid { grid-template-columns: 1fr; }
  .ontology-status { align-items: flex-start; }
  .ontology-tabs { top: 66px; margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
  .ontology-section-head { flex-direction: column; }
  .ontology-section-head > div:last-child { width: 100%; display: flex; flex-wrap: wrap; gap: 7px; }
  .ontology-subsection { padding: 12px; }
  .ontology-graph { min-height: 430px; }
  .ontology-graph .graph-node { min-width: 68px; max-width: 92px; }
  .ontology-graph .graph-node span { max-width: 76px; }
  .domain-card { grid-template-columns: 1fr; }
  .domain-index { width: 36px; height: 36px; }
  .domain-stats, .domain-card > .btn { grid-column: auto; }
  .domain-stats { grid-template-columns: 1fr; }
  .domain-card > .btn { width: 100%; }
  .audit-item { grid-template-columns: auto 1fr; }
  .audit-item time { grid-column: 2; white-space: normal; }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions .btn { flex: 1 1 auto; }
  .toast-region { left: 14px; right: 14px; }
  .toast { min-width: 0; }
}