@import url("./assistant-answer.css?v=20261023-emphasis");

:root {
  --paper: #eef3f7;
  --paper-2: #e5edf3;
  --paper-3: #dbe5ee;
  --ink: #1a2332;
  --muted: rgba(26, 35, 50, 0.55);
  --faint: rgba(26, 35, 50, 0.05);

  --card: #ffffff;
  --card-2: rgba(255, 255, 255, 0.82);
  --surface-glass: rgba(255, 255, 255, 0.72);
  --stroke: rgba(30, 60, 90, 0.09);
  --stroke-strong: rgba(30, 60, 90, 0.15);

  --navy: #0f2942;
  --navy-2: #183553;
  --navy-3: #254768;
  --accent: #2670b8;
  --accent-2: #1b5a9e;
  --accent-light: rgba(38, 112, 184, 0.08);
  --accent-glow: rgba(38, 112, 184, 0.18);
  --teal: #1b789f;
  --teal-2: #145c7d;
  --orange: #cc8a15;
  --red: #c53030;
  --green: #0a7b3e;

  --shadow: 0 4px 24px rgba(15, 41, 66, 0.07), 0 1px 3px rgba(15, 41, 66, 0.04);
  --shadow-2: 0 2px 12px rgba(15, 41, 66, 0.05), 0 1px 2px rgba(15, 41, 66, 0.03);
  --shadow-lg: 0 8px 32px rgba(15, 41, 66, 0.10), 0 2px 6px rgba(15, 41, 66, 0.04);
  --shadow-xl: 0 20px 56px rgba(15, 41, 66, 0.12), 0 4px 12px rgba(15, 41, 66, 0.05);
  --shadow-glow: 0 0 24px rgba(38, 112, 184, 0.10);

  --radius: 14px;
  --radius-2: 10px;
  --radius-sm: 7px;

  --font-sans: "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC", "PingFang SC",
    "Microsoft YaHei UI", system-ui, sans-serif;
  --font-serif: "Source Han Serif SC", "Noto Serif SC", "STSong", "Songti SC", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

/* Global scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(15, 41, 66, 0.14);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 41, 66, 0.24);
}

::selection {
  background: rgba(38, 112, 184, 0.16);
  color: var(--ink);
}

html,
body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  background-color: #f0f4f8;
  background-image:
    radial-gradient(ellipse at 0% 0%, rgba(38, 112, 184, 0.10), transparent 40%),
    radial-gradient(ellipse at 100% 0%, rgba(27, 120, 159, 0.08), transparent 36%),
    radial-gradient(ellipse at 60% 100%, rgba(38, 112, 184, 0.05), transparent 50%);
  background-attachment: fixed;
  font-size: 14px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  font-feature-settings: "cv01", "cv02", "cv03", "cv04";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

.ui-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: currentColor;
  flex: 0 0 auto;
}

.ui-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ui-icon svg .fill {
  fill: currentColor;
  stroke: none;
}

.app-shell {
  --shell-side-offset: 220px;
  --shell-main-pad-x: 24px;
  --geo-panel-width: 244px;
  --geo-stats-width: 172px;
  --geo-floating-gap: 18px;
  min-height: 100%;
  display: grid;
  grid-template-columns: 220px 1fr;
  background: #eef4fa;
}

.app-shell.side-collapsed {
  --shell-side-offset: 0px;
}

.side {
  position: sticky;
  padding: 0;
  top: 0;
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  height: 100vh;
  background: #2B5485;
  color: #fff;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-right: none;
  box-shadow: 2px 0 8px rgba(43, 84, 133, 0.18);
  z-index: 10;
}

.side::before,
.side::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.side::before {
  display: none;
}

.side::after {
  display: none;
}

.brand {
  position: relative;
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
}

.brand-title {
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  line-height: 1.35;
  color: #ffffff;
}

.brand-sub {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
  letter-spacing: 0.03em;
}

.nav {
  padding: 10px 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 9px 12px;
  border-radius: 6px;
  border: none;
  color: rgba(255, 255, 255, 0.80);
  transition: all 160ms ease;
  gap: 10px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.nav a .nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 14px;
  flex-shrink: 0;
  transition: background 150ms ease;
}

.nav a.active .nav-icon {
  background: rgba(255, 255, 255, 0.25);
}

.nav a .nav-icon .ui-icon,
.nav-icon-glyph {
  width: 16px;
  height: 16px;
  opacity: 0.9;
}

.nav a .nav-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav a.active {
  background: #33669E;
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0;
}

.nav .badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.72);
}

.main {
  padding: 20px 24px 36px;
  background: transparent;
  min-height: 100vh;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0 0 20px 0;
  padding: 0 18px;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  border-radius: 10px;
  border: none;
  background: #2B5485;
  color: #fff;
  box-shadow: 0 1px 4px rgba(43, 84, 133, 0.18);
  flex-shrink: 0;
  box-sizing: border-box;
}

.topbar-left {
  display: flex;
  gap: 10px;
  align-items: center;
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 400;
  color: #fff;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.topbar-brand .ui-icon {
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.9);
}

.topbar-brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
}

.topbar-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.topbar-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease;
  white-space: nowrap;
}
.topbar-action-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.30);
  color: #fff;
}
.topbar-action-btn .link-icon {
  width: 14px;
  height: 14px;
  opacity: 0.8;
}

.topbar-user {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  padding: 0 4px;
  white-space: nowrap;
}
.topbar-user .link-icon {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

.topbar-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  flex: none;
}

.tenant-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.tenant-switcher select {
  max-width: 110px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
}

.tenant-switcher option {
  color: #172033;
}

.pill {
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.pill.with-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pill-icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

/* Pill overrides inside dark topbar */
.topbar .pill {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
}
.topbar .pill-icon {
  color: #7ecbff;
}

.search {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 30px;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: min(260px, 28vw);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(38, 112, 184, 0.08);
}

.search input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  font-size: 13px;
  color: rgba(255,255,255,0.92);
}
.search input::placeholder { color: rgba(255,255,255,0.5); }

.btn {
  appearance: none;
  border: 1px solid rgba(20, 57, 88, 0.10);
  background: rgba(255, 255, 255, 0.90);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  cursor: pointer;
  transition: all 200ms var(--ease-out);
  box-shadow: 0 1px 2px rgba(15, 41, 66, 0.06), 0 1px 0 rgba(255, 255, 255, 0.5) inset;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  font-family: var(--font-sans);
  backdrop-filter: blur(8px);
}

.btn.with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-icon {
  width: 14px;
  height: 14px;
}

.btn:hover {
  background: #ffffff;
  border-color: rgba(30, 60, 90, 0.16);
  box-shadow: 0 4px 16px rgba(15, 41, 66, 0.08);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(15, 41, 66, 0.08);
}

.btn:focus-visible,
.kp-back-link:focus-visible,
.decision-back-link:focus-visible,
.geo-top-right .geo-link:focus-visible,
.geo-link.as-btn:focus-visible,
.chain-link-btn:focus-visible,
.pm-home-back:focus-visible,
.pm-back:focus-visible,
.decision-mode-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(38, 112, 184, 0.14),
    0 6px 18px rgba(15, 41, 66, 0.08);
  border-color: rgba(38, 112, 184, 0.28);
}

.btn.primary {
  background: linear-gradient(135deg, #2e7cc4, var(--accent-2));
  border-color: var(--accent-2);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(38, 112, 184, 0.25), 0 1px 0 rgba(255, 255, 255, 0.15) inset;
}

.btn.primary:hover {
  background: linear-gradient(135deg, #2470b5, #185494);
  box-shadow: 0 4px 16px rgba(38, 112, 184, 0.30);
}

.btn.danger {
  background: linear-gradient(135deg, #d43939, #b82828);
  border-color: var(--red);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(197, 48, 48, 0.20);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.card {
  grid-column: span 12;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px) saturate(1.2);
  border: 1px solid rgba(20, 57, 88, 0.07);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  transition: box-shadow 320ms var(--ease-out), border-color 320ms var(--ease-out), transform 320ms var(--ease-out);
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, #5cc8ff, var(--accent));
  border-radius: var(--radius) 0 0 var(--radius);
  pointer-events: none;
  opacity: 0;
  transition: opacity 320ms var(--ease-out);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(38, 112, 184, 0.12);
  transform: translateY(-1px);
}

.card:hover::before {
  opacity: 1;
}

.card .hd {
  padding: 16px 20px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(30, 60, 90, 0.06);
  background: linear-gradient(180deg, rgba(247, 250, 253, 0.5), transparent);
}

.card .title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.card .meta {
  color: var(--muted);
  font-size: 12px;
}

.card .bd {
  padding: 16px 20px 20px;
  position: relative;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}

.kpi {
  grid-column: span 3;
  border-radius: var(--radius-2);
  padding: 18px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(30, 60, 90, 0.07);
  box-shadow: var(--shadow-2);
  transition: box-shadow 280ms var(--ease-out), transform 280ms var(--ease-out);
}

.kpi:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.kpi .label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.kpi .value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 28px;
  margin-top: 8px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
}

.kpi .hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.kpi .delta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(30, 60, 90, 0.08);
  background: var(--paper);
}

.delta.up {
  border-color: rgba(10, 123, 62, 0.20);
  background: rgba(10, 123, 62, 0.08);
  color: rgba(10, 123, 62, 0.95);
}

.delta.down {
  border-color: rgba(180, 35, 24, 0.22);
  background: rgba(180, 35, 24, 0.08);
  color: rgba(180, 35, 24, 0.95);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: var(--radius-2);
  border: 1px solid var(--stroke);
  background: #ffffff;
}

.table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 10px;
  border-bottom: 2px solid rgba(30, 60, 90, 0.08);
  background: linear-gradient(180deg, #f5f8fb, #eef2f7);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.table tbody td {
  padding: 8px 10px;
  font-size: 13px;
  border-bottom: 1px solid rgba(30, 60, 90, 0.06);
  vertical-align: middle;
  line-height: 1.45;
}

.table td.muted[colspan],
.pm-table td.muted[colspan] {
  padding: 20px 18px;
  text-align: center;
  color: rgba(78, 104, 126, 0.78);
  background: linear-gradient(180deg, rgba(247, 250, 253, 0.92), rgba(241, 246, 250, 0.88));
}

.table tbody tr:nth-child(even) td {
  background: rgba(240, 244, 248, 0.5);
}

.table tbody tr:hover td {
  background: rgba(38, 112, 184, 0.05);
}

.table tbody tr {
  transition: background 150ms var(--ease-out);
}

.table tbody tr {
  transition: background 150ms var(--ease-out);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(30, 60, 90, 0.08);
  background: rgba(238, 243, 247, 0.8);
  color: var(--muted);
  margin-right: 6px;
  margin-bottom: 6px;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.tag.teal {
  border-color: rgba(27, 120, 159, 0.2);
  background: rgba(27, 120, 159, 0.08);
  color: rgba(27, 120, 159, 0.95);
}

.tag.orange {
  border-color: rgba(204, 138, 21, 0.2);
  background: rgba(204, 138, 21, 0.08);
  color: rgba(160, 98, 7, 0.95);
}

.tag.red {
  border-color: rgba(197, 48, 48, 0.2);
  background: rgba(197, 48, 48, 0.06);
  color: rgba(197, 48, 48, 0.95);
}

.tag.green {
  border-color: rgba(10, 123, 62, 0.2);
  background: rgba(10, 123, 62, 0.06);
  color: rgba(10, 123, 62, 0.95);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(16, 33, 44, 0.72);
}

.hero {
  max-width: 980px;
  margin: 0 auto;
  padding: 64px 24px 44px;
}

.hero h1 {
  font-family: var(--font-sans);
  font-size: 38px;
  line-height: 1.18;
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--navy);
  background: linear-gradient(135deg, var(--navy), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 56ch;
  line-height: 1.75;
  letter-spacing: 0.01em;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.role {
  grid-column: span 4;
  border-radius: 18px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(30, 60, 90, 0.08);
  box-shadow: var(--shadow);
  transition: all 320ms var(--ease-out);
  position: relative;
  overflow: hidden;
}

.role:hover {
  box-shadow: var(--shadow-xl);
  border-color: rgba(38, 112, 184, 0.18);
  transform: translateY(-4px);
}

.role.gov {
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--accent), #5cc8ff) 1;
  border-image-slice: 1 1 0 1;
}

.role.enterprise {
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--green), #47e0a0) 1;
  border-image-slice: 1 1 0 1;
}

.role.bank {
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--orange), #f5c842) 1;
  border-image-slice: 1 1 0 1;
}

.role::after {
  display: none;
}

.role h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.role ul {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.role .actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.role-select {
  width: 100%;
  margin-top: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: #ffffff;
  color: var(--ink);
  padding: 9px 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}

.role-select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(38, 112, 184, 0.08);
}

.sys-home {
  display: grid;
  gap: 18px;
}

.sys-home > section {
  animation: surfaceReveal 420ms var(--ease-out) both;
}

.sys-home > section:nth-child(2) {
  animation-delay: 50ms;
}

.sys-home > section:nth-child(3) {
  animation-delay: 100ms;
}

.sys-home > section:nth-child(4) {
  animation-delay: 150ms;
}

.sys-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) 380px;
  gap: 0;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(14, 41, 69, 0.14);
  background:
    linear-gradient(135deg, rgba(10, 35, 58, 0.98), rgba(22, 65, 108, 0.96) 50%, rgba(30, 100, 155, 0.90));
  box-shadow: 0 16px 48px rgba(10, 30, 52, 0.18), 0 2px 6px rgba(10, 30, 52, 0.08);
}

.sys-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.16;
}

.sys-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -40px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 70%);
  animation: haloDrift 12s ease-in-out infinite;
}

.sys-hero-main {
  position: relative;
  z-index: 1;
  padding: 34px 36px 36px;
}

.sys-hero-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(240, 248, 255, 0.9);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.sys-hero-badge.with-icon {
  gap: 8px;
}

.badge-icon {
  width: 14px;
  height: 14px;
  color: rgba(240, 248, 255, 0.92);
}

.sys-hero h1 {
  margin: 18px 0 0;
  font-size: 34px;
  line-height: 1.22;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
}

.sys-hero-main p {
  margin: 14px 0 0;
  max-width: 760px;
  color: rgba(231, 241, 251, 0.84);
  font-size: 14px;
  line-height: 1.85;
}

.sys-hero-actions {
  margin-top: 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.sys-hero-actions .btn {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
}

.sys-hero-actions .btn:not(.primary) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.sys-hero-actions .btn:not(.primary):hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}

.sys-hero-tags {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sys-hero-tag {
  border-radius: 999px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(239, 247, 255, 0.84);
  font-size: 12px;
}

.sys-hero-side {
  position: relative;
  z-index: 1;
  margin: 20px;
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.06));
  backdrop-filter: blur(10px);
}

.sys-side-kicker {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(201, 225, 245, 0.78);
}

.sys-hero-side h2 {
  margin: 10px 0 0;
  font-size: 18px;
  line-height: 1.6;
  color: #ffffff;
  font-weight: 700;
}

.sys-hero-stats {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sys-hero-stat {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(9, 27, 44, 0.2);
  padding: 12px 14px;
  min-height: 76px;
  display: grid;
  align-content: start;
  gap: 4px;
}

.sys-hero-stat span {
  display: block;
  font-size: 11px;
  color: rgba(214, 230, 245, 0.7);
}

.sys-hero-stat b {
  display: block;
  margin-top: 4px;
  font-size: 22px;
  font-family: var(--font-mono);
  color: #ffffff;
}

.sys-side-notes {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.sys-side-note {
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sys-side-note strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: rgba(244, 249, 255, 0.9);
}

.sys-side-note span {
  display: block;
  color: rgba(219, 232, 244, 0.76);
  font-size: 12px;
  line-height: 1.7;
  text-wrap: pretty;
}

.sys-overview-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.sys-stat-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(20, 57, 88, 0.07);
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(10px);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
  min-height: 146px;
  display: grid;
  align-content: start;
}

.sys-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.sys-stat-card::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 0;
  width: 34px;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: rgba(38, 112, 184, 0.3);
}

.sys-stat-card.accent {
  background: linear-gradient(180deg, rgba(38, 112, 184, 0.1), rgba(255, 255, 255, 0.96));
  border-color: rgba(38, 112, 184, 0.18);
}

.sys-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sys-stat-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.55;
}

.sys-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(38, 112, 184, 0.12);
  background: linear-gradient(180deg, rgba(38, 112, 184, 0.12), rgba(38, 112, 184, 0.04));
  flex: 0 0 auto;
}

.sys-stat-icon-glyph {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.sys-stat-value {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.sys-stat-value b {
  font-size: 34px;
  line-height: 1;
  font-family: var(--font-mono);
  color: var(--navy);
}

.sys-stat-value i {
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  transform: translateY(-4px);
}

.sys-stat-card p {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  min-height: 40px;
}

.sys-position-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.sys-position-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 18px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 253, 0.95));
  box-shadow: var(--shadow);
  padding: 18px;
}

.sys-position-card::after,
.sys-stat-card::after,
.sys-feature-card::after,
.sys-module-card::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -34px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(38, 112, 184, 0.16) 0%, rgba(92, 200, 255, 0.06) 38%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.sys-position-card > *,
.sys-stat-card > *,
.sys-feature-card > *,
.sys-module-card > * {
  position: relative;
  z-index: 1;
}

.sys-position-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.sys-position-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(38, 112, 184, 0.12);
  background: linear-gradient(180deg, rgba(38, 112, 184, 0.14), rgba(38, 112, 184, 0.04));
  flex: 0 0 auto;
}

.sys-position-icon-glyph {
  width: 17px;
  height: 17px;
  color: var(--accent);
}

.sys-position-head h3 {
  margin: 0;
  font-size: 17px;
  color: var(--navy);
}

.sys-position-head p {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
}

.sys-position-list {
  margin: 14px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: rgba(26, 35, 50, 0.82);
  font-size: 12px;
  line-height: 1.7;
}

.sys-scene-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.sys-scene-card {
  border-radius: 18px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 252, 0.96));
  box-shadow: var(--shadow-2);
  padding: 18px;
}

.sys-scene-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.sys-scene-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(38, 112, 184, 0.12);
  background: linear-gradient(180deg, rgba(38, 112, 184, 0.12), rgba(38, 112, 184, 0.04));
  flex: 0 0 auto;
}

.sys-scene-icon-glyph {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.sys-scene-card h3 {
  margin: 0;
  font-size: 17px;
  color: var(--navy);
}

.sys-scene-meta {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.sys-scene-card p {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

.sys-scene-output {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  color: rgba(22, 57, 84, 0.88);
}

.sys-section-panel,
.sys-brief-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 18px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(247, 251, 254, 0.94));
  box-shadow: var(--shadow);
}

.sys-section-panel::after,
.sys-brief-card::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -38px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(92, 200, 255, 0.2) 0%, rgba(92, 200, 255, 0.08) 38%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.sys-section-panel > *,
.sys-brief-card > * {
  position: relative;
  z-index: 1;
}

.sys-section-panel {
  padding: 22px;
}

.sys-section-head,
.sys-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.sys-section-kicker,
.sys-panel-kicker {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.12em;
}

.sys-section-head h2,
.sys-panel-head h3 {
  margin: 6px 0 0;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.sys-section-head h2 {
  font-size: 24px;
  font-weight: 800;
}

.sys-panel-head h3 {
  font-size: 20px;
  font-weight: 700;
}

.sys-section-head p,
.sys-panel-head p {
  margin: 0;
  max-width: 54ch;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  text-wrap: pretty;
}

.sys-entry-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.sys-feature-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.sys-feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(24, 87, 146, 0.12);
  background:
    radial-gradient(circle at top right, rgba(92, 200, 255, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(243, 249, 255, 0.94));
  box-shadow: var(--shadow-2);
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), border-color 220ms var(--ease-out);
}

.sys-feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(38, 112, 184, 0.22);
  box-shadow: var(--shadow-xl);
}

.sys-feature-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.sys-feature-title-group h3 {
  margin: 8px 0 0;
  font-size: 22px;
  line-height: 1.35;
  color: var(--navy);
  text-wrap: balance;
}

.sys-feature-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(38, 112, 184, 0.08);
  color: var(--accent);
  border: 1px solid rgba(38, 112, 184, 0.12);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.sys-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(38, 112, 184, 0.12);
  background: linear-gradient(180deg, rgba(38, 112, 184, 0.14), rgba(38, 112, 184, 0.06));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  flex: 0 0 auto;
}

.sys-feature-icon-glyph {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.sys-feature-card p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.72;
  text-wrap: pretty;
}

.sys-feature-meta {
  margin-top: 12px;
  display: grid;
  gap: 6px;
}

.sys-feature-meta-line {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: rgba(22, 57, 84, 0.78);
  line-height: 1.6;
}

.sys-feature-metric {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 16px;
}

.sys-feature-metric b {
  font-size: 24px;
  line-height: 1;
  color: var(--navy);
  letter-spacing: -0.03em;
}

.sys-feature-metric span {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.sys-feature-tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sys-feature-tag {
  border-radius: 999px;
  border: 1px solid rgba(16, 33, 44, 0.1);
  background: rgba(16, 33, 44, 0.04);
  color: rgba(16, 33, 44, 0.76);
  padding: 4px 9px;
  font-size: 11px;
}

.sys-feature-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(38, 112, 184, 0.14);
  background: rgba(38, 112, 184, 0.08);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.sys-module-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 328px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: transform 280ms var(--ease-out), box-shadow 280ms var(--ease-out), border-color 280ms var(--ease-out);
  box-shadow: var(--shadow-2);
}

.sys-module-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #2e7cc4, #5cc8ff);
}

.sys-module-card.draft::before {
  background: linear-gradient(90deg, rgba(204, 138, 21, 0.82), rgba(233, 191, 108, 0.38));
}

.sys-module-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.sys-module-card.live {
  border-color: rgba(38, 112, 184, 0.16);
}

.sys-module-card.draft {
  border-color: rgba(204, 138, 21, 0.16);
  background: linear-gradient(180deg, #fffefb, #fbf8f2);
}

.sys-module-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.sys-module-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.sys-module-head > div {
  min-width: 0;
}

.sys-module-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  flex: 0 0 auto;
  border: 1px solid rgba(38, 112, 184, 0.12);
  background: linear-gradient(180deg, rgba(38, 112, 184, 0.14), rgba(38, 112, 184, 0.06));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

.sys-module-icon-glyph {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.sys-module-card.draft .sys-module-icon {
  border-color: rgba(204, 138, 21, 0.16);
  background: linear-gradient(180deg, rgba(204, 138, 21, 0.16), rgba(204, 138, 21, 0.06));
}

.sys-module-card.draft .sys-module-icon-glyph {
  color: rgba(160, 98, 7, 0.96);
}

.sys-module-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 28px;
  border-radius: 999px;
  background: rgba(38, 112, 184, 0.08);
  color: var(--accent);
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.sys-module-card.draft .sys-module-code {
  background: rgba(204, 138, 21, 0.1);
  color: rgba(160, 98, 7, 0.98);
}

.sys-module-title {
  margin: 12px 0 0;
  font-size: 20px;
  line-height: 1.4;
  color: var(--navy);
  font-weight: 700;
}

.sys-module-status {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(30, 60, 90, 0.12);
}

.sys-module-status.up {
  color: rgba(10, 123, 62, 0.92);
  border-color: rgba(10, 123, 62, 0.22);
  background: rgba(10, 123, 62, 0.08);
}

.sys-module-status.plan {
  color: rgba(160, 98, 7, 0.96);
  border-color: rgba(204, 138, 21, 0.24);
  background: rgba(204, 138, 21, 0.1);
}

.sys-module-desc {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.85;
  color: var(--muted);
}

.sys-module-tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sys-module-tag {
  border-radius: 999px;
  border: 1px solid rgba(16, 33, 44, 0.1);
  background: rgba(16, 33, 44, 0.04);
  color: rgba(16, 33, 44, 0.76);
  padding: 4px 9px;
  font-size: 11px;
}

.sys-module-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 8px;
}

.sys-module-list li {
  position: relative;
  padding-left: 14px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(26, 35, 50, 0.82);
}

.sys-module-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.sys-module-card.draft .sys-module-list li::before {
  background: var(--orange);
}

.sys-module-foot {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid rgba(30, 60, 90, 0.08);
}

.sys-module-note {
  font-size: 12px;
  color: var(--muted);
}

.sys-module-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sys-home-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 14px;
}

.sys-brief-card {
  padding: 20px;
}

.sys-quick-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sys-quick-tile {
  position: relative;
  display: block;
  border-radius: 16px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(244, 248, 251, 0.94));
  padding: 16px;
  transition: transform 180ms var(--ease-out), border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
  box-shadow: var(--shadow-2);
}

.sys-quick-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(38, 112, 184, 0.22);
  box-shadow: var(--shadow);
}

.sys-quick-tile strong {
  display: block;
  font-size: 15px;
  color: var(--navy);
}

.sys-quick-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sys-quick-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 11px;
  border: 1px solid rgba(38, 112, 184, 0.12);
  background: linear-gradient(180deg, rgba(38, 112, 184, 0.12), rgba(38, 112, 184, 0.04));
  flex: 0 0 auto;
}

.sys-quick-icon-glyph {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

.sys-quick-tile p {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  text-wrap: pretty;
}

.sys-quick-tile span {
  display: inline-block;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.sys-roadmap {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 14px;
}

.sys-roadmap li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: flex-start;
}

.sys-roadmap-phase {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 999px;
  background: rgba(38, 112, 184, 0.08);
  color: var(--accent);
  border: 1px solid rgba(38, 112, 184, 0.14);
  font-size: 12px;
  font-weight: 700;
}

.sys-roadmap-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sys-roadmap-title strong {
  color: var(--navy);
  font-size: 15px;
}

.sys-roadmap-title em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}

.sys-roadmap p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.invest-link-grid {
  grid-template-columns: 1fr;
}

.sys-invest-suggestion-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
}

.sys-invest-suggestion-list li {
  color: rgba(22, 57, 84, 0.88);
  font-size: 13px;
  line-height: 1.8;
}

.sys-invest-weak-summary {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(20, 57, 88, 0.08);
}

.sys-invest-weak-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.sys-invest-weak-head h3 {
  margin: 6px 0 0;
  font-size: 18px;
  color: var(--navy);
}

.sys-invest-weak-note {
  margin: 6px 0 0;
  color: rgba(22, 57, 84, 0.72);
  font-size: 12px;
  line-height: 1.7;
}

.sys-invest-weak-list {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.sys-invest-weak-item {
  padding: 14px 14px 12px;
  border-radius: 14px;
  border: 1px solid rgba(24, 87, 146, 0.1);
  background: linear-gradient(180deg, rgba(247, 251, 255, 0.98), rgba(240, 247, 253, 0.96));
}

.sys-invest-weak-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sys-invest-weak-row strong {
  color: var(--navy);
  font-size: 14px;
}

.sys-invest-weak-link {
  flex: 0 0 auto;
}

.sys-invest-weak-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(38, 112, 184, 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  font-family: var(--font-mono);
}

.sys-invest-weak-item p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.sys-invest-weak-hint {
  display: block;
  margin-top: 8px;
  color: rgba(22, 57, 84, 0.84);
  font-size: 12px;
  line-height: 1.7;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(8px);
  padding: 12px 22px;
  border-radius: var(--radius-2);
  background: var(--navy);
  color: #ffffff;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 999;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.toast .toast-icon {
  font-size: 15px;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.toast-success {
  background: var(--green);
}

.toast.toast-warn {
  background: var(--orange);
}

.toast.toast-error {
  background: var(--red);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 41, 66, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(2px);
  z-index: 100;
}

.modal-backdrop.show {
  display: flex;
}

.modal {
  width: min(860px, 92vw);
  max-height: min(86vh, 920px);
  overflow: auto;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(15, 41, 66, 0.18);
  animation: modalIn 280ms var(--ease-out) both;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal .hd {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--stroke);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.modal .hd h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.modal .bd {
  padding: 14px 18px 18px;
}

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 12px;
  color: rgba(16, 33, 44, 0.74);
}

.field input,
.field select,
.field textarea {
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  padding: 10px 12px;
  background: #ffffff;
  outline: none;
  font-family: var(--font-sans);
  font-size: 13px;
  transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(38, 112, 184, 0.08);
}

.field textarea {
  resize: vertical;
  min-height: 92px;
}

.field.span2 {
  grid-column: span 2;
}

.row-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}

/* Mobile sidebar toggle */
.side-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 50;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-2);
  border: none;
  background: var(--navy);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: background 150ms ease;
}

.side-toggle:hover {
  background: var(--navy-2);
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  z-index: 999;
  transition: width 80ms ease;
  border-radius: 0 1px 1px 0;
}

@media (max-width: 980px) {
  .side-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* 窄屏侧栏默认收起，汉堡按钮切换 side-open 展开为浮层（2026-08-26，原默认展开盖住主内容） */
  .app-shell {
    --shell-side-offset: 0px;
    grid-template-columns: 1fr;
  }

  .app-shell .side {
    display: none;
  }

  .app-shell.side-open .side {
    display: block;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1200;
    box-shadow: 4px 0 18px rgba(15, 39, 66, 0.35);
  }
}

.fade-in {
  animation: fadeInUp 400ms var(--ease-out) both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.998);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes surfaceReveal {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes panelRevealLeft {
  from {
    opacity: 0;
    transform: translateX(-16px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes panelRevealRight {
  from {
    opacity: 0;
    transform: translateX(16px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toolbarSettle {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes haloDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.56;
  }
  50% {
    transform: translate3d(-10px, 12px, 0) scale(1.06);
    opacity: 0.78;
  }
}

.card {
  animation: fadeInScale 380ms var(--ease-out) both;
}

.card:nth-child(2) { animation-delay: 60ms; }
.card:nth-child(3) { animation-delay: 120ms; }
.card:nth-child(4) { animation-delay: 180ms; }
.card:nth-child(5) { animation-delay: 240ms; }

.btn:active,
.geo-tab:active,
.sys-quick-tile:active,
.chain-map-head .op:active,
.ai-chip:active,
.chain-ind-btn:active {
  transform: translateY(1px) scale(0.992);
}

@media (max-width: 980px) {
  .app-shell {
    --shell-side-offset: 0px;
    --shell-main-pad-x: 16px;
    grid-template-columns: 1fr;
  }

  .side {
    position: static;
    height: auto;
    padding: 0;
    flex-direction: row;
    overflow-x: auto;
  }

  .main {
    padding: 16px 16px 26px;
  }

  .search {
    width: min(400px, 64vw);
  }

  .kpi {
    grid-column: span 6;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .role {
    grid-column: span 12;
  }

  .sys-hero {
    grid-template-columns: 1fr;
  }

  .sys-hero-side {
    margin: 0 20px 20px;
  }

  .sys-overview-strip,
  .sys-feature-grid,
  .sys-entry-grid,
  .sys-position-strip,
  .sys-scene-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sys-home-lower {
    grid-template-columns: 1fr;
  }

  .sys-section-head,
  .sys-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .sys-hero-main {
    padding: 28px 22px;
  }

  .sys-hero h1 {
    font-size: 28px;
  }

  .sys-hero-side {
    margin: 0 12px 12px;
    padding: 18px;
  }

  .sys-overview-strip,
  .sys-feature-grid,
  .sys-entry-grid,
  .sys-position-strip,
  .sys-scene-grid,
  .sys-home-lower,
  .sys-quick-grid,
  .sys-hero-stats {
    grid-template-columns: 1fr;
  }

  .sys-hero-actions,
  .sys-hero-tags,
  .sys-module-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .sys-section-panel,
  .sys-brief-card {
    padding: 18px;
  }

  .sys-roadmap li {
    grid-template-columns: 1fr;
  }
}

/* GIS-first geo scene style */
.geo-loading-splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 18px;
  color: var(--muted);
  font-size: 15px;
  background: var(--paper);
}
.geo-loading-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--paper-3);
  border-top-color: var(--acc);
  border-radius: 50%;
  animation: geo-spin .8s linear infinite;
}
@keyframes geo-spin { to { transform: rotate(360deg); } }

.geo-root {
  min-height: 100vh;
  color: rgba(30, 55, 80, 0.94);
  background:
    radial-gradient(circle at top left, rgba(200, 225, 248, 0.6), transparent 40%),
    radial-gradient(circle at bottom right, rgba(180, 210, 240, 0.5), transparent 45%),
    linear-gradient(180deg, #eaf2fa 0%, #e0ecf6 52%, #edf4fb 100%);
}

.geo-root.geo-left-collapsed {
  --geo-panel-width: 46px;
}

.geo-root.geo-right-collapsed {
  --geo-stats-width: 46px;
}

.geo-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  margin: 0 0 20px 0;
  border: none;
  border-radius: 10px;
  background: #2B5485;
  color: #fff;
  box-shadow: 0 1px 4px rgba(43, 84, 133, 0.18);
  box-sizing: border-box;
}

.app-shell .geo-topbar {
  margin: 0;
}

.geo-top-left {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.geo-brand {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #ffffff;
  white-space: nowrap;
}

.geo-brand.with-icon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.9);
}

.geo-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.geo-tab {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(200, 220, 240, 0.88);
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 180ms var(--ease-out);
  box-shadow: none;
}

.geo-tab:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.geo-tab.active {
  border-color: rgba(80, 180, 255, 0.5);
  background: linear-gradient(135deg, rgba(30, 130, 230, 0.85), rgba(50, 160, 255, 0.7));
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(30, 130, 230, 0.3);
  font-weight: 600;
  text-shadow: none;
}

.geo-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.geo-link {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.geo-link:hover {
  color: #fff;
}

.geo-link.with-icon {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.link-icon {
  width: 14px;
  height: 14px;
  opacity: 0.8;
}

.geo-link.as-btn {
  cursor: pointer;
}

.geo-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(260px, 28vw);
  min-height: 30px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 8px 3px 10px;
  box-shadow: none;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.geo-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(38, 112, 184, 0.08);
}

.geo-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  color: rgba(255, 255, 255, 0.92);
  background: transparent;
  font-size: 13px;
}

.geo-search input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.geo-search-btn {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.geo-search-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.4);
}

.geo-top-right .btn {
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(200, 220, 240, 0.9);
  box-shadow: none;
  font-weight: 500;
  transition: all 160ms ease;
}

.geo-top-right .btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.geo-layout {
  position: relative;
  min-height: calc(100vh - 72px);
  display: block;
  padding: 40px 0 0;
}

.ai-page {
  background:
    radial-gradient(circle at top left, rgba(38, 112, 184, 0.08), rgba(255, 255, 255, 0) 28%),
    linear-gradient(180deg, rgba(15, 41, 66, 0.02), rgba(15, 41, 66, 0)),
    var(--paper);
}

.ai-shell {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.ai-topbar .ai-top-context {
  color: rgba(231, 242, 252, 0.72);
  font-size: 12px;
  white-space: nowrap;
}

.ai-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 360px;
  gap: 16px;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(14, 41, 69, 0.16);
  background:
    linear-gradient(135deg, rgba(12, 40, 66, 0.98), rgba(25, 73, 118, 0.96) 56%, rgba(34, 105, 162, 0.9)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
  box-shadow: 0 18px 42px rgba(15, 41, 66, 0.14);
}

.ai-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.22;
}

.ai-hero::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -60px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 70%);
  animation: haloDrift 11s ease-in-out infinite;
}

.ai-hero-main,
.ai-hero-side {
  position: relative;
  z-index: 1;
}

.ai-hero-main {
  padding: 32px 34px 34px;
}

.ai-hero-main h1 {
  margin: 14px 0 0;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
}

.ai-hero-main p {
  margin: 14px 0 0;
  max-width: 760px;
  color: rgba(231, 241, 251, 0.84);
  font-size: 14px;
  line-height: 1.85;
}

.ai-hero-stats {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ai-hero-stat-card {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 28, 45, 0.22);
  padding: 14px 16px;
  backdrop-filter: blur(8px);
}

.ai-hero-stat-card span {
  display: block;
  font-size: 11px;
  color: rgba(214, 230, 245, 0.72);
}

.ai-hero-stat-card b {
  display: block;
  margin-top: 6px;
  font-size: 20px;
  line-height: 1.3;
  color: #ffffff;
  font-weight: 700;
}

.ai-hero-stat-card p {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(218, 232, 244, 0.72);
}

.ai-hero-side {
  padding: 20px 20px 20px 0;
  display: flex;
  align-items: stretch;
}

.ai-hero-panel {
  width: 100%;
  margin: 12px 0 12px auto;
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.07));
  backdrop-filter: blur(12px);
}

.ai-hero-panel h2 {
  margin: 10px 0 0;
  font-size: 20px;
  line-height: 1.5;
  font-weight: 700;
  color: #ffffff;
}

.ai-hero-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.ai-hero-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.ai-hero-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.ai-hero-list span {
  font-size: 12px;
  color: rgba(214, 230, 245, 0.7);
}

.ai-hero-list b {
  text-align: right;
  font-size: 13px;
  color: #ffffff;
  font-weight: 700;
}

.ai-hero-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-hero-actions .btn {
  min-height: 38px;
  border-radius: 999px;
  padding: 0 16px;
}

.ai-hero-actions .btn:not(.primary) {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.ai-hero-actions .btn:not(.primary):hover {
  background: rgba(255, 255, 255, 0.14);
}

.ai-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
}

.ai-hero {
  animation: surfaceReveal 440ms var(--ease-out) both;
}

.ai-side {
  display: grid;
  gap: 12px;
  align-content: start;
}

.ai-side-card,
.ai-main {
  border-radius: 20px;
  border: 1px solid rgba(20, 57, 88, 0.1);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px);
  transition: box-shadow 220ms var(--ease-out), border-color 220ms var(--ease-out), transform 220ms var(--ease-out);
}

.ai-side-card {
  padding: 18px;
  animation: panelRevealLeft 360ms var(--ease-out) both;
}

.ai-side-card:nth-child(2) {
  animation-delay: 50ms;
}

.ai-side-card:nth-child(3) {
  animation-delay: 100ms;
}

.ai-main {
  animation: panelRevealRight 420ms var(--ease-out) 80ms both;
}

.ai-side-card:hover,
.ai-main:hover {
  border-color: rgba(38, 112, 184, 0.14);
  box-shadow: var(--shadow-xl);
}

.ai-side-card.hero {
  background:
    radial-gradient(circle at top right, rgba(38, 112, 184, 0.14), rgba(255, 255, 255, 0) 48%),
    linear-gradient(180deg, #ffffff, #f7fbff);
}

.ai-side-kicker {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.12em;
}

.ai-side-card h2,
.ai-chat-head h2,
.ai-side-head h3,
.ai-board-head h3 {
  margin: 8px 0 0;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.ai-side-card h2 {
  font-size: 22px;
  line-height: 1.45;
}

.ai-side-card p,
.ai-side-head p,
.ai-board-head p,
.ai-compose-foot span,
.ai-msg-time {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.ai-context-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ai-context-item {
  border-radius: 14px;
  border: 1px solid rgba(38, 112, 184, 0.1);
  background: linear-gradient(180deg, rgba(38, 112, 184, 0.06), rgba(255, 255, 255, 0.96));
  padding: 12px;
}

.ai-context-item span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.ai-context-item b {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  color: var(--ink);
}

.ai-side-head {
  display: grid;
  gap: 4px;
}

.ai-chip-list {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-chip {
  appearance: none;
  border: 1px solid rgba(38, 112, 184, 0.14);
  background: rgba(38, 112, 184, 0.05);
  color: var(--accent-2);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 180ms var(--ease-out);
}

.ai-chip:hover {
  background: rgba(38, 112, 184, 0.1);
  border-color: rgba(38, 112, 184, 0.22);
}

.ai-side-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: rgba(26, 35, 50, 0.82);
  font-size: 13px;
  line-height: 1.8;
}

.ai-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 860px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 253, 0.94));
}

.ai-chat-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(15, 41, 66, 0.02), rgba(15, 41, 66, 0));
}

.ai-chat-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-head-meta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-head-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(20, 57, 88, 0.1);
  background: rgba(15, 41, 66, 0.04);
  color: rgba(20, 57, 88, 0.72);
  font-size: 12px;
  font-weight: 600;
}

.ai-head-pill.accent {
  border-color: rgba(38, 112, 184, 0.18);
  background: rgba(38, 112, 184, 0.08);
  color: var(--accent-2);
}

.ai-main-body {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.ai-strip-grid {
  padding: 18px 20px 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ai-strip-card {
  border-radius: 16px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background: linear-gradient(180deg, #ffffff, #f7fafc);
  padding: 14px 15px;
  box-shadow: 0 6px 18px rgba(15, 41, 66, 0.04);
}

.ai-strip-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(38, 112, 184, 0.08);
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 700;
}

.ai-strip-card h3 {
  margin: 10px 0 0;
  color: var(--navy);
  font-size: 18px;
  line-height: 1.45;
}

.ai-strip-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.ai-mode-board {
  padding: 18px 20px 16px;
}

.ai-board-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.ai-mode-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ai-mode-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 188px;
  border-radius: 18px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background:
    radial-gradient(circle at top right, rgba(38, 112, 184, 0.08), rgba(255, 255, 255, 0) 46%),
    linear-gradient(180deg, #ffffff, #f8fbfd);
  padding: 16px;
  box-shadow: 0 6px 18px rgba(15, 41, 66, 0.04);
}

.ai-mode-top {
  display: grid;
  gap: 8px;
}

.ai-mode-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  width: max-content;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(38, 112, 184, 0.14);
  background: rgba(38, 112, 184, 0.05);
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 700;
}

.ai-mode-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: 18px;
  line-height: 1.45;
}

.ai-mode-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.ai-mode-card .ai-chip {
  margin-top: auto;
  width: max-content;
}

.ai-chat-window {
  margin: 0 20px 0;
  overflow: auto;
  padding: 18px 18px 22px;
  display: grid;
  gap: 14px;
  min-height: 340px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  border-radius: 18px;
  background:
    radial-gradient(circle at top, rgba(38, 112, 184, 0.04), rgba(255, 255, 255, 0) 30%),
    #fbfdff;
}

.ai-msg {
  max-width: min(860px, 88%);
  border-radius: 18px;
  padding: 14px 16px;
  border: 1px solid var(--stroke);
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(15, 41, 66, 0.05);
}

.ai-msg.user {
  margin-left: auto;
  border-color: rgba(38, 112, 184, 0.18);
  background: linear-gradient(180deg, rgba(38, 112, 184, 0.08), rgba(255, 255, 255, 0.96));
}

.ai-msg.assistant {
  margin-right: auto;
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
}

.ai-msg-role {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
}

.ai-msg-body {
  margin-top: 8px;
  color: rgba(26, 35, 50, 0.86);
  font-size: 13px;
  line-height: 1.86;
  overflow-x: auto;
}

.ai-msg-body p {
  margin: 0 0 8px;
}

.ai-msg-body p:last-child {
  margin-bottom: 0;
}

/* Markdown headings inside chat bubbles */
.ai-msg-body h1 { font-size: 17px; font-weight: 800; color: var(--navy); margin: 16px 0 8px; line-height: 1.4; }
.ai-msg-body h2 { font-size: 15px; font-weight: 700; color: var(--navy); margin: 14px 0 6px; line-height: 1.4; border-bottom: 1px solid rgba(38,112,184,0.15); padding-bottom: 4px; }
.ai-msg-body h3 { font-size: 13.5px; font-weight: 700; color: #2670b8; margin: 12px 0 5px; line-height: 1.4; }
.ai-msg-body h4, .ai-msg-body h5 { font-size: 13px; font-weight: 600; color: #3a5a7a; margin: 10px 0 4px; }
.ai-msg-body hr { border: none; border-top: 1px solid rgba(30,60,90,0.10); margin: 12px 0; }

/* Markdown tables inside chat bubbles - fixes the column-squish bug */
.ai-msg-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 12.5px;
  background: #ffffff;
  border: 1px solid rgba(30, 60, 90, 0.10);
  border-radius: 6px;
  overflow: hidden;
  table-layout: auto;
  word-break: break-word;
}

.ai-msg-body table th {
  background: rgba(38, 112, 184, 0.07);
  color: #0f2942;
  font-weight: 600;
  padding: 8px 12px;
  text-align: left;
  border-bottom: 2px solid rgba(38, 112, 184, 0.25);
  white-space: nowrap;
}

.ai-msg-body table td {
  padding: 7px 12px;
  border-bottom: 1px solid rgba(30, 60, 90, 0.08);
  vertical-align: top;
  white-space: normal;
  min-width: 60px;
}

.ai-msg-body table tr:last-child td { border-bottom: none; }
.ai-msg-body table tr:nth-child(even) td { background: rgba(238, 243, 248, 0.5); }
.ai-msg-body table tr:hover td { background: rgba(38, 112, 184, 0.04); }

/* Markdown code blocks */
.ai-msg-body code {
  background: rgba(38, 112, 184, 0.08);
  color: #c0392b;
  padding: 1px 5px;
  border-radius: 3px;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 11.5px;
}

.ai-msg-body pre {
  background: #f4f7fa;
  border: 1px solid rgba(30,60,90,0.10);
  border-radius: 6px;
  padding: 12px 14px;
  overflow-x: auto;
  margin: 8px 0;
}

.ai-msg-body pre code {
  background: none;
  color: #2c3e50;
  padding: 0;
  font-size: 12px;
}

/* Markdown lists */
.ai-msg-body ul, .ai-msg-body ol {
  margin: 4px 0 8px;
  padding-left: 20px;
}

.ai-msg-body li { margin: 3px 0; }

.ai-rich-head {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 0.01em;
}

.ai-rich-list {
  margin: 0;
  padding-left: 18px;
}

.ai-rich-list li {
  margin: 0 0 6px;
}

.ai-msg-time {
  margin-top: 10px;
}

.ai-compose {
  border-top: 1px solid var(--stroke);
  padding: 16px 20px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), #ffffff);
}

.ai-compose-input {
  width: 100%;
  min-height: 108px;
  resize: vertical;
  border-radius: 14px;
  border: 1px solid rgba(30, 60, 90, 0.12);
  background: #fbfdff;
  padding: 14px 16px;
  outline: none;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink);
  transition: border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.ai-compose-input:focus {
  border-color: rgba(38, 112, 184, 0.42);
  box-shadow: 0 0 0 4px rgba(38, 112, 184, 0.08);
}

.ai-compose-foot {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 1180px) {
  .ai-hero {
    grid-template-columns: minmax(0, 1.45fr) 320px;
  }

  .ai-hero-stats,
  .ai-strip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-layout {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .ai-mode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .ai-shell {
    padding: 14px;
  }

  .ai-hero {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .ai-hero-side {
    padding: 0 18px 18px;
  }

  .ai-hero-panel {
    margin: 0;
  }

  .ai-layout {
    grid-template-columns: 1fr;
  }

  .ai-main {
    min-height: auto;
  }

  .ai-main-body {
    grid-template-rows: auto auto auto;
  }

  .ai-chat-window {
    min-height: 320px;
  }
}

@media (max-width: 640px) {
  .ai-shell {
    padding: 12px;
  }

  .ai-hero-main {
    padding: 24px 20px 22px;
  }

  .ai-hero-main h1 {
    font-size: 28px;
  }

  .ai-hero-stats,
  .ai-strip-grid,
  .ai-mode-grid {
    grid-template-columns: 1fr;
  }

  .ai-topbar .geo-top-left,
  .ai-topbar .geo-top-right {
    gap: 8px;
  }

  .ai-topbar .ai-top-context {
    display: none;
  }

  .ai-context-grid {
    grid-template-columns: 1fr;
  }

  .ai-board-head,
  .ai-chat-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .ai-msg {
    max-width: 100%;
  }

  .ai-compose-foot {
    flex-direction: column;
    align-items: flex-start;
  }
}

.geo-panel {
  position: fixed;
  left: 10px;
  top: 82px;
  width: 244px;
  max-height: calc(100vh - 92px);
  z-index: 15;
  border: 1px solid rgba(0, 80, 160, 0.1);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(1.3);
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 40, 100, 0.1), 0 0 1px rgba(0, 80, 160, 0.12) inset;
  transition: width 220ms var(--ease-out), max-height 220ms var(--ease-out), box-shadow 220ms var(--ease-out), border-color 220ms var(--ease-out);
  animation: panelSlideIn 320ms var(--ease-out) both;
}

.app-shell .geo-panel {
  left: calc(var(--shell-side-offset) + var(--shell-main-pad-x));
  top: 84px;
  width: var(--geo-panel-width);
}

@keyframes panelSlideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

.geo-panel-scroll {
  max-height: calc(100vh - 90px);
  overflow: auto;
  padding: 42px 6px 6px;
}

.geo-panel-toggle {
  position: absolute;
  top: 7px;
  z-index: 3;
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(24, 83, 145, 0.16);
  border-radius: 8px;
  background: rgba(246, 250, 255, 0.96);
  color: #315f90;
  box-shadow: 0 2px 8px rgba(31, 73, 125, 0.08);
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.geo-panel-toggle:hover,
.geo-panel-toggle:focus-visible {
  border-color: rgba(31, 101, 175, 0.34);
  outline: none;
  background: #fff;
  color: #174f8b;
}

.geo-panel-toggle span {
  font-size: 23px;
  line-height: 1;
  transform: translateY(-1px);
}

.geo-panel-toggle-left {
  right: 7px;
}

.geo-left-collapsed .geo-panel {
  max-height: 46px;
  border-radius: 12px;
}

.geo-left-collapsed .geo-panel-scroll {
  display: none;
}

.geo-panel-scroll::-webkit-scrollbar {
  width: 5px;
}

.geo-panel-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(0, 90, 180, 0.2);
}

.geo-section {
  border-radius: 10px;
  border: 1px solid rgba(0, 80, 160, 0.1);
  background: rgba(235, 245, 255, 0.55);
  padding: 8px;
  margin-bottom: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: border-color 180ms ease;
}

.geo-section:hover {
  border-color: rgba(0, 100, 200, 0.18);
}

.geo-section-collapsible {
  padding: 0;
  overflow: hidden;
}

.geo-section-summary {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 160ms ease;
}

.geo-section-summary:hover {
  background: rgba(0, 90, 180, 0.04);
}

.geo-section-summary::-webkit-details-marker {
  display: none;
}

.geo-section-summary-title {
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
  color: rgba(15, 55, 100, 0.9);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.geo-section-summary-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  color: rgba(40, 80, 130, 0.6);
}

.geo-section-summary-arrow {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid rgba(0, 90, 180, 0.5);
  border-bottom: 1.5px solid rgba(0, 90, 180, 0.5);
  transform: rotate(45deg) translateY(-1px);
  transition: transform 180ms var(--ease-out);
}

.geo-section-collapsible[open] .geo-section-summary-arrow {
  transform: rotate(225deg) translateY(-1px);
}

.geo-section-body {
  padding: 0 8px 8px;
  border-top: 1px solid rgba(0, 80, 160, 0.08);
}

.geo-section-body > .geo-row:first-child,
.geo-section-body > .geo-sub-block:first-child,
.geo-section-body > .geo-section:first-child {
  margin-top: 8px;
}

.geo-tool-group {
  margin-top: 10px;
  padding-top: 2px;
  border-top: 1px dashed rgba(0, 80, 160, 0.15);
}

.geo-tool-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
  margin: 0 0 6px;
}

.geo-tool-group-head span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(47, 116, 170, 0.94);
}

.geo-section.geo-section-tool {
  background: rgba(235, 245, 255, 0.55);
  border-color: rgba(0, 80, 160, 0.1);
}

.geo-tool-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.geo-section-tool h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  color: rgba(15, 55, 100, 0.9);
}

.geo-tool-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(0, 100, 200, 0.2);
  background: rgba(0, 100, 200, 0.08);
  color: rgba(0, 80, 170, 0.85);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.geo-section h3 {
  margin: 0 0 7px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(15, 55, 100, 0.85);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.geo-sub-title {
  margin-top: 6px;
  font-size: 11px;
  color: rgba(40, 80, 130, 0.7);
}

.geo-sub-title-nested {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px dashed rgba(0, 80, 160, 0.12);
  color: rgba(30, 70, 120, 0.75);
}

.geo-sub-block {
  margin-top: 8px;
  padding: 8px 8px 6px;
  border-radius: 12px;
  border: 1px solid rgba(0, 80, 160, 0.08);
  background: rgba(230, 242, 255, 0.45);
}

.geo-sub-block:first-of-type {
  margin-top: 0;
}

.geo-empty-note {
  font-size: 11px;
  line-height: 1.5;
  color: rgba(40, 80, 130, 0.55);
}

.geo-inline-note {
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(40, 80, 130, 0.6);
}

.geo-inline-note-tight {
  margin-top: 6px;
  margin-bottom: 0;
}

.geo-filter-preview {
  margin-top: 8px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid rgba(0, 80, 160, 0.1);
  background: rgba(230, 242, 255, 0.45);
}

.geo-filter-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: rgba(15, 55, 100, 0.85);
}

.geo-filter-preview-head b {
  font-size: 11px;
  font-weight: 700;
}

.geo-filter-preview-head span {
  color: rgba(40, 80, 130, 0.55);
}

.geo-filter-preview-list {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.geo-result-chip {
  width: 100%;
  text-align: left;
  font: inherit;
  border: 1px solid rgba(0, 80, 160, 0.12);
  background: rgba(230, 242, 255, 0.5);
  color: rgba(20, 55, 95, 0.9);
  border-radius: 10px;
  padding: 5px 7px;
  cursor: pointer;
  transition: border-color 180ms var(--ease-out), transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.geo-result-chip:hover {
  border-color: rgba(0, 100, 200, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 60, 140, 0.1);
}

.geo-result-chip span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: rgba(40, 80, 130, 0.55);
}

.geo-tree {
  margin-top: 4px;
}

.geo-tree.geo-tree-compact {
  position: relative;
  margin-top: 2px;
  margin-left: 10px;
  padding-left: 14px;
}

.geo-tree.geo-tree-compact::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 4px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, rgba(38, 112, 184, 0.18), rgba(38, 112, 184, 0.04));
}

.geo-tree-root {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(20, 57, 88, 0.92);
}

.geo-tree-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(38, 112, 184, 0.92), rgba(38, 112, 184, 0.58));
  box-shadow: 0 0 0 4px rgba(38, 112, 184, 0.08);
  flex: 0 0 auto;
}

.geo-tree-root-text {
  letter-spacing: 0.01em;
}

.geo-tree-children {
  position: relative;
  margin: 2px 0 0 16px;
  padding-left: 16px;
}

.geo-tree-children::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 2px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, rgba(38, 112, 184, 0.22), rgba(38, 112, 184, 0.06));
}

.geo-tree-item {
  position: relative;
  min-height: 30px;
  margin-bottom: 4px;
  padding: 6px 10px 6px 0;
  border-radius: 10px;
  transition: background 180ms var(--ease-out), border-color 180ms var(--ease-out), color 180ms var(--ease-out);
}

.geo-tree-item::before {
  content: "";
  position: absolute;
  left: -13px;
  top: 15px;
  width: 12px;
  height: 1px;
  background: rgba(38, 112, 184, 0.18);
}

.geo-tree-item span {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
}

.geo-tree-item.active {
  background: rgba(62, 137, 191, 0.18);
}

.geo-tree-item.active span {
  color: rgba(233, 246, 255, 0.96);
  font-weight: 700;
}

.geo-tree-compact .geo-tree-item {
  min-height: 24px;
  margin-bottom: 2px;
  padding: 3px 6px 3px 0;
  border-radius: 8px;
}

.geo-tree-compact .geo-tree-item::before {
  left: -11px;
  top: 12px;
  width: 10px;
}

.geo-tree-compact .geo-check {
  gap: 6px;
  font-size: 12px;
}

.geo-check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: rgba(30, 70, 120, 0.78);
  margin-bottom: 7px;
  line-height: 1.35;
}

.geo-check input {
  accent-color: #4ea8ff;
}

.geo-check input[disabled] + span {
  opacity: 0.52;
}

.geo-check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 6px;
  margin-top: 6px;
}

.metric-overlay-grid {
  grid-template-columns: 1fr 1fr;
}

.metric-overlay-check {
  min-height: 28px;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid rgba(0, 90, 180, 0.12);
  background: rgba(235, 245, 255, 0.5);
}

.geo-mini-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}

.geo-mini-btn {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 80, 160, 0.12);
  background: rgba(230, 242, 255, 0.6);
  color: rgba(20, 65, 120, 0.85);
  font-size: 11px;
  padding: 4px 8px;
  cursor: pointer;
  font-weight: 500;
}

.geo-mini-btn:hover {
  border-color: rgba(0, 100, 200, 0.25);
  background: rgba(210, 232, 255, 0.85);
}

.geo-mini-note {
  font-size: 10px;
  line-height: 1.35;
  color: rgba(40, 80, 130, 0.55);
}

.geo-row {
  display: grid;
  gap: 3px;
  margin-bottom: 5px;
}

.geo-field-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(40, 80, 130, 0.6);
}

.geo-row select {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 80, 160, 0.12);
  background: rgba(255, 255, 255, 0.7);
  color: rgba(20, 55, 95, 0.9);
  padding: 6px 8px;
  font-size: 11px;
  transition: border-color 180ms var(--ease-out), background 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.geo-row select:hover {
  border-color: rgba(0, 100, 200, 0.25);
  background: rgba(240, 248, 255, 0.9);
}

.geo-row input[type="text"] {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 80, 160, 0.12);
  background: rgba(255, 255, 255, 0.7);
  color: rgba(20, 55, 95, 0.9);
  padding: 6px 8px;
  font-size: 11px;
  transition: border-color 180ms var(--ease-out), background 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.geo-row input[type="text"]::placeholder {
  color: rgba(40, 80, 130, 0.4);
}

.geo-row input[type="text"]:hover {
  border-color: rgba(0, 100, 200, 0.25);
  background: rgba(240, 248, 255, 0.9);
}

.geo-row select[disabled] {
  opacity: 0.52;
}

.geo-scope-value {
  width: 100%;
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid rgba(0, 80, 160, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(240, 247, 255, 0.82);
  color: rgba(20, 55, 95, 0.9);
  font-size: 11px;
  font-weight: 600;
}

.geo-range-row {
  display: grid;
  grid-template-columns: 52px 1fr 30px;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.geo-range-label {
  font-size: 10px;
  color: rgba(40, 80, 130, 0.65);
  white-space: nowrap;
}

.geo-range-row input[type="range"] {
  width: 100%;
  accent-color: #4ea8ff;
}

.geo-range-row input[type="range"][disabled] {
  opacity: 0.45;
}

.geo-range-row b {
  font-size: 10px;
  color: rgba(15, 55, 100, 0.8);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.geo-map-wrap {
  padding: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  transition: none;
  position: absolute;
  inset: 18px 0 0;
  z-index: 1;
}

.geo-panel:hover,
.geo-map-wrap:hover {
  border-color: rgba(0, 100, 200, 0.18);
  box-shadow: 0 4px 24px rgba(0, 40, 100, 0.12), 0 0 2px rgba(0, 80, 160, 0.1) inset;
}

.geo-data-board {
  display: none;
}

.geo-board-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.geo-board-head h3 {
  margin: 6px 0 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: rgba(23, 56, 77, 0.96);
}

.geo-board-head p {
  margin: 0;
  max-width: 620px;
  font-size: 12px;
  line-height: 1.8;
  color: rgba(90, 118, 137, 0.82);
}

.geo-board-kicker {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(102, 161, 205, 0.28);
  background: rgba(76, 145, 197, 0.1);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: rgba(39, 104, 151, 0.94);
}

.geo-board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.geo-board-card {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 14px 15px;
  border-radius: 18px;
  border: 1px solid rgba(181, 206, 226, 0.74);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 248, 252, 0.96));
  box-shadow: 0 10px 22px rgba(95, 125, 146, 0.08);
}

.geo-board-card.primary {
  background:
    linear-gradient(180deg, rgba(200, 230, 247, 0.98), rgba(243, 249, 253, 0.96));
  border-color: rgba(119, 174, 214, 0.48);
  box-shadow: 0 14px 30px rgba(92, 138, 170, 0.14);
}

.geo-board-card span {
  font-size: 11px;
  font-weight: 600;
  color: rgba(93, 122, 142, 0.82);
}

.geo-board-card b {
  display: block;
  font-size: 21px;
  line-height: 1.25;
  color: rgba(24, 58, 79, 0.98);
  letter-spacing: -0.03em;
}

.geo-board-card em {
  display: block;
  font-style: normal;
  font-size: 11px;
  line-height: 1.6;
  color: rgba(102, 127, 145, 0.8);
}

.geo-map-head {
  display: none;
}

.geo-map-head-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 14px;
  align-items: start;
}

.geo-map-title {
  font-size: 18px;
  font-weight: 800;
  color: rgba(23, 56, 77, 0.98);
  letter-spacing: -0.01em;
}

.geo-map-crumb {
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 12px;
  color: rgba(92, 120, 139, 0.78);
}

.geo-map-crumb a {
  color: rgba(46, 120, 176, 0.94);
  text-decoration: none;
}

.geo-map-crumb b {
  color: rgba(30, 65, 88, 0.98);
}

.geo-map-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.geo-head-stat {
  border-radius: 16px;
  border: 1px solid rgba(190, 213, 230, 0.9);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 248, 252, 0.96));
  padding: 12px 14px;
}

.geo-head-stat span {
  display: block;
  font-size: 11px;
  color: rgba(91, 121, 142, 0.76);
}

.geo-head-stat b {
  display: block;
  margin-top: 5px;
  font-size: 18px;
  line-height: 1.35;
  color: rgba(22, 57, 79, 0.98);
}

.geo-head-stat em {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-size: 11px;
  color: rgba(105, 130, 148, 0.78);
}

.geo-map-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.geo-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid rgba(189, 213, 230, 0.88);
  background: rgba(255, 255, 255, 0.92);
  color: rgba(74, 104, 124, 0.88);
  font-weight: 500;
  box-shadow: 0 1px 4px rgba(103, 131, 151, 0.06);
  white-space: nowrap;
}

.geo-pill.metric-pill {
  border-color: var(--metric-pill-border, rgba(59, 130, 246, 0.22));
  background: var(--metric-pill-bg, rgba(59, 130, 246, 0.1));
  color: var(--metric-pill-ink, rgba(28, 84, 165, 0.96));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.geo-insight-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 10px;
}

.geo-insight-card {
  border-radius: 18px;
  border: 1px solid rgba(188, 212, 229, 0.88);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 252, 0.96));
  box-shadow: 0 14px 30px rgba(95, 125, 146, 0.08);
  padding: 14px 15px;
}

.geo-insight-card.primary {
  background:
    linear-gradient(180deg, rgba(224, 241, 252, 0.98), rgba(246, 250, 252, 0.96));
  border-color: rgba(141, 186, 219, 0.6);
}

.geo-insight-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: rgba(49, 117, 171, 0.94);
  letter-spacing: 0.12em;
}

.geo-insight-title {
  margin: 8px 0 0;
  font-size: 20px;
  font-weight: 800;
  color: rgba(24, 58, 79, 0.98);
  letter-spacing: -0.02em;
}

.geo-insight-summary {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.68;
  color: rgba(78, 106, 126, 0.88);
}

.geo-insight-stats {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.geo-insight-stat {
  border-radius: 14px;
  border: 1px solid rgba(190, 214, 231, 0.82);
  background: rgba(245, 249, 252, 0.9);
  padding: 10px 12px;
}

.geo-insight-stat span {
  display: block;
  font-size: 11px;
  color: rgba(96, 124, 143, 0.76);
}

.geo-insight-stat b {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  color: rgba(24, 58, 79, 0.96);
}

.geo-insight-block {
  margin-top: 10px;
}

.geo-insight-block h4 {
  margin: 0;
  font-size: 13px;
  color: rgba(42, 74, 95, 0.92);
}

.geo-insight-list {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  color: rgba(82, 111, 130, 0.86);
  font-size: 11px;
  line-height: 1.55;
}

.geo-insight-list.action li::marker {
  color: var(--accent);
}

.geo-insight-list.source li::marker {
  color: rgba(156, 187, 210, 0.62);
}

.geo-caliber-note {
  margin-top: 14px;
  border-radius: 14px;
  border: 1px solid rgba(166, 201, 224, 0.64);
  background: rgba(229, 242, 250, 0.9);
  padding: 12px 14px;
}

.geo-caliber-note span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(47, 116, 170, 0.94);
}

.geo-caliber-note p {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.75;
  color: rgba(78, 106, 126, 0.88);
}

.geo-map-stage {
  position: relative;
  min-height: calc(100vh - 82px);
  contain: layout paint style;
  transform-origin: 50% 50%;
  border-radius: 0;
  border: none;
  background: #e8eef5;
  overflow: hidden;
  box-shadow: none;
  --geo-label-scale: 1;
  --geo-icon-scale: 1;
  --geo-entity-scale: 1;
  --geo-road-label-scale: 1;
  --geo-boundary-label-scale: 1;
  --geo-mesh-label-scale: 1;
  --geo-heat-label-scale: 1;
  --geo-poi-card-scale: 1;
  --geo-zoom-label-adjust: 1;
  --geo-zoom-icon-adjust: 1;
  --geo-zoom-entity-adjust: 1;
  --geo-zoom-road-adjust: 1;
  --geo-zoom-boundary-adjust: 1;
  --geo-zoom-mesh-adjust: 1;
  --geo-zoom-heat-adjust: 1;
  --geo-zoom-card-adjust: 1;
  --geo-screen-label-stabilize: 1;
  --geo-screen-icon-stabilize: 1;
  transition: none;
}

.geo-map-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 180, 255, 0.06), transparent 30%);
  z-index: 0;
}

.geo-map-stage.tiles-on::before {
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 140, 220, 0.04), transparent 30%);
}

.geo-map-wrap:hover .geo-map-stage {
  box-shadow: none;
}

.geo-map-stage.scene-entering {
  animation: geo-stage-enter 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.geo-preflight-highlight {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.geo-preflight-highlight-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.geo-preflight-ring {
  fill: none;
  stroke: rgba(0, 220, 255, 0.92);
  stroke-width: 0.72;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 3.8 2.6;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 12px rgba(0, 200, 255, 0.5));
  animation: geo-preflight-ring 0.42s cubic-bezier(0.2, 0.75, 0.2, 1) forwards;
}

.geo-scene-ghost {
  position: fixed;
  z-index: 140;
  overflow: hidden;
  pointer-events: none;
  opacity: 1;
  transform-origin: 50% 50%;
  will-change: opacity, transform;
  backface-visibility: hidden;
}

.geo-scene-ghost .geo-map-stage {
  min-height: 100%;
  height: 100%;
  animation: none !important;
}

.geo-scene-ghost.leaving {
  animation: geo-stage-leave 0.32s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes geo-stage-enter {
  0% {
    opacity: 0.78;
    transform: scale(1.006);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes geo-stage-leave {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.012);
  }
}

@keyframes geo-preflight-ring {
  0% {
    opacity: 0;
    stroke-width: 0.22;
    stroke-dashoffset: 11;
  }
  24% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    stroke-width: 0.82;
    stroke-dashoffset: 0;
  }
}

.geo-map-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  overscroll-behavior: contain;
}

.geo-map-viewport.dragging {
  cursor: grabbing;
}

.geo-map-canvas {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  will-change: transform;
  transition: none !important;
  z-index: 1;
  contain: layout style;
}

.geo-city-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* Terrain texture layer – simulates topographic relief inside the clipped city area */
.geo-terrain-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: none;
}

/* When real terrain tiles are on, hide CSS gradient terrain completely */
.geo-map-stage.tiles-on .geo-terrain-layer {
  opacity: 0.15;
}

.geo-map-stage.native-base .geo-terrain-layer {
  opacity: 0.1;
}

.geo-map-stage.is-moving .geo-terrain-layer {
  opacity: 0.15;
  transition: opacity .08s ease-out !important;
}

/* ── Satellite / terrain imagery layer (clipped to city boundary) ── */
.geo-terrain-tile-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  transform-origin: 0 0;
  pointer-events: none;
  /* Hidden on geo pages — only used by brainx-map via separate mechanism */
  display: none;
  opacity: 0.7;
  filter:
    brightness(0.42)
    contrast(1.3)
    grayscale(0.85)
    sepia(0.6)
    hue-rotate(175deg)
    saturate(1.2);
  mix-blend-mode: normal;
  will-change: transform;
  backface-visibility: hidden;
  contain: strict;
}
.geo-terrain-tile-layer img.geo-terrain-tile {
  position: absolute;
  display: block;
  image-rendering: auto;
  pointer-events: none;
  border: none;
  opacity: 0;
  transition: opacity .4s ease-out;
}
.geo-terrain-tile-layer img.geo-terrain-tile.cached {
  opacity: 1;
}
.geo-terrain-tile-layer img.geo-terrain-tile.loading {
  opacity: 0;
}
.geo-map-stage.is-moving .geo-terrain-tile-layer {
  opacity: 0.7;
  transition: opacity .1s ease-out;
}

.geo-icon-overlay {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
  --geo-overlay-counter-scale: 1;
  will-change: transform;
  backface-visibility: hidden;
  contain: layout style;
}

.geo-density-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  transform-origin: 0 0;
  opacity: 0.82;
  mix-blend-mode: multiply;
  will-change: transform, opacity;
  transition: opacity 180ms ease;
}

.geo-map-stage.is-moving .geo-density-canvas {
  opacity: 0.68;
  image-rendering: auto;
  transition: none;
}

.geo-icon-overlay > * {
  pointer-events: auto;
}

.geo-map-viewport.dragging .geo-map-canvas {
  transition: none;
}

.geo-online-tile-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: transparent;
  overflow: visible;
  transform-origin: 0 0;
  transition: filter 0.3s ease-out;
  will-change: transform;
  backface-visibility: hidden;
  contain: strict;
}

/* Subtle shimmer placeholder while tiles are loading */
.geo-online-tile-layer[data-enabled="1"]:empty {
  background:
    linear-gradient(110deg, transparent 30%, rgba(0,100,180,0.08) 50%, transparent 70%);
  background-size: 300% 100%;
  animation: geo-tile-shimmer 2s ease-in-out infinite;
}
@keyframes geo-tile-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -100% 0; }
}

.geo-native-map-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #e8eef5;
}

.geo-native-map-layer[data-enabled="0"] {
  display: none;
}

.geo-map-stage[data-native-map="1"] .geo-native-map-layer[data-enabled="1"] {
  pointer-events: none;
}

.geo-map-stage[data-native-map="1"] .geo-map-canvas {
  pointer-events: auto;
}

.geo-map-stage[data-native-map="1"] .geo-poi-wrap,
.geo-map-stage[data-native-map="1"] .geo-poi-dot,
.geo-map-stage[data-native-map="1"] .geo-poi-card,
.geo-map-stage[data-native-map="1"] .geo-entity-wrap,
.geo-map-stage[data-native-map="1"] .geo-entity-badge,
.geo-map-stage[data-native-map="1"] .geo-entity-card,
.geo-map-stage[data-native-map="1"] .geo-node-link,
.geo-map-stage[data-native-map="1"] .geo-boundary-shape,
.geo-map-stage[data-native-map="1"] .geo-park-drawer {
  pointer-events: auto;
}

.geo-map-stage[data-native-map="1"] .geo-node-link,
.geo-map-stage[data-native-map="1"] .geo-poi-wrap,
.geo-map-stage[data-native-map="1"] .geo-entity-wrap {
  will-change: auto;
}

.geo-native-map-host {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
  will-change: transform;
  image-rendering: auto;
}

.geo-native-map-host .amap-maps,
.geo-native-map-host .amap-layers,
.geo-native-map-host .amap-tiles {
  filter: none;
}

.geo-native-map-status {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 240px;
  max-width: min(460px, calc(100% - 32px));
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(8, 24, 44, 0.9);
  border: 1px solid rgba(0, 180, 255, 0.2);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  color: rgba(160, 210, 240, 0.92);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  backdrop-filter: blur(10px);
  z-index: 3;
}

.geo-native-map-status[data-tone="warn"] {
  color: rgba(240, 200, 80, 0.94);
  background: rgba(40, 30, 5, 0.92);
  border-color: rgba(200, 160, 40, 0.3);
}

.geo-native-map-status[data-tone="error"] {
  color: rgba(255, 120, 120, 0.94);
  background: rgba(40, 10, 10, 0.94);
  border-color: rgba(200, 80, 80, 0.28);
}

.geo-online-tile-layer[data-enabled="0"] {
  display: none;
}

.geo-online-tile {
  position: absolute;
  display: block;
  object-fit: fill;
  border: 0;
  user-select: none;
  -webkit-user-drag: none;
  opacity: 1;
  backface-visibility: hidden;
  image-rendering: auto;
  contain: layout style;
}

/* Tile fade-in: new tiles start transparent, cached tiles show instantly */
.geo-online-tile.loading {
  opacity: 0;
  transition: opacity .35s ease-out;
}
.geo-online-tile.cached {
  opacity: 1;
}
/* During motion skip transitions for performance */
.geo-map-stage.is-moving .geo-online-tile {
  transition: none !important;
}

.geo-online-tile.layer-1,
.geo-online-tile.layer-2 {
  opacity: 0.92;
  filter: none;
}
.geo-online-tile.layer-1.loading,
.geo-online-tile.layer-2.loading {
  opacity: 0;
}

.geo-grid-layer {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 180, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 180, 255, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  z-index: 1;
}

.geo-map-stage.tiles-on .geo-grid-layer {
  opacity: 0.08;
}

.geo-map-stage.native-base .geo-grid-layer {
  opacity: 0.04;
}

.geo-map-stage.tiles-on .geo-backdrop-svg {
  opacity: 0.1;
}

.geo-map-stage.native-base .geo-backdrop-svg {
  opacity: 0.08;
}

.geo-backdrop-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.geo-focus-dim-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  contain: strict;
}

.geo-focus-dim-svg path {
  fill: rgba(180, 200, 220, 0.25);
}

.geo-map-stage.tiles-on .geo-focus-dim-svg path {
  fill: rgba(180, 200, 220, 0.3);
}

.geo-focus-border {
  fill: none;
  stroke: rgba(0, 220, 255, 0.7);
  stroke-width: 0.1;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 5px rgba(0, 210, 255, 0.35)) drop-shadow(0 0 12px rgba(0, 180, 240, 0.15));
}

.geo-city-shape polygon {
  fill: rgba(0, 80, 160, 0.12);
  stroke: rgba(0, 210, 255, 0.45);
  stroke-width: 0.08;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 4px rgba(0, 200, 255, 0.2));
}

.geo-city-district polygon {
  fill: rgba(0, 60, 120, 0.08);
  stroke: rgba(0, 200, 255, 0.25);
  stroke-width: 0.06;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 2px rgba(0, 200, 255, 0.1));
}

.geo-city-district.subdued polygon {
  fill: rgba(0, 40, 80, 0.04);
  stroke: rgba(0, 180, 240, 0.1);
  opacity: 0.4;
  filter: saturate(0.88);
}

.geo-city-district.focus polygon {
  fill: rgba(0, 80, 160, 0.12);
  stroke: rgba(0, 210, 255, 0.4);
}

.geo-city-district.active polygon {
  fill: rgba(0, 90, 180, 0.2);
  stroke: rgba(0, 210, 255, 0.65);
  stroke-width: 0.1;
  filter: drop-shadow(0 0 8px rgba(0, 200, 255, 0.25)) saturate(1.1);
}

.geo-detail-base-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  contain: strict;
}

.geo-map-stage.tiles-on .geo-detail-base-svg {
  opacity: 0.1;
}

.geo-map-stage.tiles-on.lv-street .geo-detail-base-svg,
.geo-map-stage.tiles-on.lv-building .geo-detail-base-svg {
  opacity: 0.14;
  mix-blend-mode: normal;
}

.geo-map-stage.tiles-on.lv-street .geo-online-tile-layer,
.geo-map-stage.tiles-on.lv-building .geo-online-tile-layer {
  filter: none;
}

.geo-map-stage.tiles-on.lv-street .geo-backdrop-svg,
.geo-map-stage.tiles-on.lv-building .geo-backdrop-svg {
  opacity: 0.12;
}

.geo-map-stage.tiles-on.park-focus .geo-grid-layer {
  opacity: 0.08;
}

.geo-map-stage.tiles-on.park-focus .geo-backdrop-svg {
  opacity: 0.08;
}

.geo-map-stage.tiles-on.park-focus .geo-detail-base-svg {
  opacity: 0.14;
  mix-blend-mode: normal;
}

.geo-map-stage.tiles-on.park-focus .geo-online-tile-layer {
  filter: none;
}

.geo-map-stage.is-moving .geo-online-tile-layer {
  filter: none;
  transition: none;
}

.geo-map-stage.is-moving .geo-detail-base-svg {
  visibility: hidden !important;
}

.geo-map-stage.is-moving .geo-street-mesh-svg,
.geo-map-stage.is-moving .geo-backdrop-svg {
  opacity: 0.42;
}

.geo-map-stage.is-moving .geo-city-mask-outline {
  opacity: 0.62;
}

.geo-map-stage.is-moving .geo-boundary-shape polygon,
.geo-map-stage.is-moving .geo-park-skin-layer.geo-park-skin-svg .geo-park-skin polygon {
  filter: none !important;
  transition: none !important;
}

.geo-map-stage.is-moving .geo-boundary-shape text {
  opacity: 0.4;
  transition: opacity .1s ease-out !important;
}

.geo-map-stage.is-moving .geo-base-road-label-layer text,
.geo-map-stage.is-moving .geo-heat-label,
.geo-map-stage.is-moving .geo-entity-card,
.geo-map-stage.is-moving .geo-poi-card {
  opacity: 0 !important;
  transition: opacity .1s ease-out !important;
}

.geo-map-stage.is-moving .geo-heat-blob,
.geo-map-stage.is-moving .geo-poi-dot,
.geo-map-stage.is-moving .geo-entity-dot {
  box-shadow: none !important;
  filter: none !important;
}

.geo-map-stage.is-moving .geo-entity-wrap,
.geo-map-stage.is-moving .geo-poi-wrap,
.geo-map-stage.is-moving .geo-node-link {
  pointer-events: none;
  opacity: 0;
  transition: opacity .1s ease-out !important;
}

/* Suppress expensive compositing effects during pan/zoom motion */
/* Keep SVG layers visible but reduce fidelity for performance */
.geo-map-stage.is-moving .geo-detail-base-svg,
.geo-map-stage.is-moving .geo-street-mesh-svg,
.geo-map-stage.is-moving .geo-backdrop-svg {
  transition: opacity .08s ease-out !important;
  opacity: 0.55 !important;
}
.geo-map-stage.is-moving .geo-focus-dim-svg,
.geo-map-stage.is-moving .geo-boundary-svg {
  transition: opacity .08s ease-out !important;
  opacity: 0.4 !important;
}
.geo-map-stage.is-moving .geo-grid-layer {
  transition: opacity .08s ease-out !important;
  opacity: 0.25 !important;
}

.geo-map-stage.is-moving .geo-boundary-shape text,
.geo-map-stage.is-moving .geo-base-road-label-layer text {
  transition: none !important;
}

/* Smooth settle: elements transition back gracefully after motion ends */
.geo-map-stage.is-settling .geo-detail-base-svg,
.geo-map-stage.is-settling .geo-street-mesh-svg,
.geo-map-stage.is-settling .geo-backdrop-svg,
.geo-map-stage.is-settling .geo-focus-dim-svg,
.geo-map-stage.is-settling .geo-boundary-svg,
.geo-map-stage.is-settling .geo-grid-layer {
  transition: opacity .35s ease-out;
}
.geo-map-stage.is-settling .geo-boundary-shape text,
.geo-map-stage.is-settling .geo-base-road-label-layer text,
.geo-map-stage.is-settling .geo-heat-label,
.geo-map-stage.is-settling .geo-entity-card,
.geo-map-stage.is-settling .geo-poi-card {
  transition: opacity .3s ease-out .05s;
}
.geo-map-stage.is-settling .geo-entity-wrap,
.geo-map-stage.is-settling .geo-poi-wrap,
.geo-map-stage.is-settling .geo-node-link {
  transition: opacity .3s ease-out .05s;
}
.geo-map-stage.is-settling .geo-online-tile-layer {
  transition: filter .4s ease-out;
}

/* GPU acceleration hints for canvas and tile layer */
.geo-map-canvas {
  will-change: transform;
  backface-visibility: hidden;
}

.geo-map-stage[data-switching="1"] .geo-online-tile {
  filter: none;
}

.geo-map-stage[data-switching="1"] .geo-detail-base-svg {
  opacity: 0.16 !important;
  mix-blend-mode: normal !important;
  transition: opacity .25s ease-out;
}

.geo-map-stage[data-switching="1"] .geo-street-mesh-svg,
.geo-map-stage[data-switching="1"] .geo-backdrop-svg {
  opacity: 0.46;
  transition: opacity .25s ease-out;
}

.geo-map-stage[data-switching="1"] .geo-boundary-shape text,
.geo-map-stage[data-switching="1"] .geo-base-road-label-layer text {
  opacity: 0 !important;
  transition: opacity .15s ease-out;
}

.geo-city-mask-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
  overflow: visible;
}

.geo-city-mask-fill {
  fill: rgba(220, 230, 240, 0.6);
}

.geo-map-stage.tiles-on .geo-city-mask-fill {
  fill: rgba(220, 230, 240, 0.65);
}

.geo-city-mask-outline polygon {
  fill: none;
  stroke: rgba(0, 210, 255, 0.5);
  stroke-width: 0.1;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 4px rgba(0, 210, 255, 0.3)) drop-shadow(0 0 10px rgba(0, 180, 240, 0.15));
}

.geo-base-water-layer polyline {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.geo-base-water-layer polyline.t0 {
  stroke: rgba(0, 180, 255, 0.5);
  stroke-width: 0.66;
}

.geo-base-water-layer polyline.t1 {
  stroke: rgba(0, 160, 240, 0.4);
  stroke-width: 0.46;
}

.geo-base-water-layer polyline.t2,
.geo-base-water-layer polyline.t3 {
  stroke: rgba(0, 140, 220, 0.3);
  stroke-width: 0.3;
}

.geo-base-road-layer polyline {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  opacity: 0.98;
}

.geo-base-road-layer polyline.casing {
  opacity: 0.96;
}

.geo-base-road-layer polyline.core {
  opacity: 0.98;
}

.geo-base-road-layer polyline.casing.r0 {
  stroke: rgba(0, 140, 220, 0.2);
  stroke-width: 0.9;
}

.geo-base-road-layer polyline.core.r0 {
  stroke: rgba(0, 180, 255, 0.25);
  stroke-width: 0.54;
}

.geo-base-road-layer polyline.casing.r1 {
  stroke: rgba(0, 130, 210, 0.18);
  stroke-width: 0.72;
}

.geo-base-road-layer polyline.core.r1 {
  stroke: rgba(0, 160, 240, 0.22);
  stroke-width: 0.42;
}

.geo-base-road-layer polyline.casing.r2 {
  stroke: rgba(0, 120, 200, 0.14);
  stroke-width: 0.5;
}

.geo-base-road-layer polyline.core.r2 {
  stroke: rgba(0, 150, 230, 0.18);
  stroke-width: 0.26;
}

.geo-base-road-layer polyline.casing.r3 {
  stroke: rgba(0, 110, 190, 0.1);
  stroke-width: 0.36;
}

.geo-base-road-layer polyline.core.r3 {
  stroke: rgba(0, 140, 220, 0.15);
  stroke-width: 0.18;
}

.geo-base-road-layer polyline.casing.r4,
.geo-base-road-layer polyline.casing.r5,
.geo-base-road-layer polyline.casing.r6 {
  stroke: rgba(0, 100, 180, 0.08);
  stroke-width: 0.24;
}

.geo-base-road-layer polyline.core.r4,
.geo-base-road-layer polyline.core.r5,
.geo-base-road-layer polyline.core.r6 {
  stroke: rgba(0, 120, 200, 0.12);
  stroke-width: 0.12;
}

.geo-base-road-label-layer text {
  text-anchor: middle;
  dominant-baseline: middle;
  fill: rgba(120, 180, 220, 0.5);
  font-size: calc(1.15px * var(--geo-road-label-scale, 1) * var(--geo-zoom-road-adjust, 1));
  font-weight: 600;
  letter-spacing: 0.03px;
  paint-order: stroke;
  stroke: rgba(0, 20, 40, 0.5);
  stroke-width: 0.2;
  vector-effect: non-scaling-stroke;
  user-select: none;
  display: none;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(var(--geo-screen-label-stabilize, 1));
}

.geo-base-road-label-layer text.r0,
.geo-base-road-label-layer text.r1 {
  fill: rgba(140, 200, 240, 0.6);
  font-size: calc(1.22px * var(--geo-road-label-scale, 1) * var(--geo-zoom-road-adjust, 1));
}

.geo-detail-base-svg.lv-district .geo-base-road-layer polyline.r4,
.geo-detail-base-svg.lv-district .geo-base-road-layer polyline.r5,
.geo-detail-base-svg.lv-district .geo-base-road-layer polyline.r6,
.geo-detail-base-svg.lv-district .geo-base-road-label-layer text.r2,
.geo-detail-base-svg.lv-district .geo-base-road-label-layer text.r3,
.geo-detail-base-svg.lv-district .geo-base-road-label-layer text.r4 {
  display: none;
}

.geo-detail-base-svg.lv-street.sc-street .geo-base-road-layer polyline.r5,
.geo-detail-base-svg.lv-street.sc-street .geo-base-road-layer polyline.r6 {
  display: none;
}

.geo-street-mesh-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.geo-street-mesh polygon {
  fill: rgba(0, 60, 120, 0.04);
  stroke: rgba(0, 180, 240, 0.15);
  stroke-width: 0.1;
  vector-effect: non-scaling-stroke;
}

.geo-street-mesh.in-district polygon {
  fill: rgba(0, 60, 120, 0.08);
  stroke: rgba(0, 200, 255, 0.25);
  stroke-width: 0.12;
}

.geo-street-mesh.subdued polygon {
  fill: rgba(0, 40, 80, 0.02);
  stroke: rgba(0, 160, 220, 0.08);
  opacity: 0.32;
  filter: saturate(0.86);
}

.geo-street-mesh.active polygon {
  fill: rgba(0, 80, 180, 0.15);
  stroke: rgba(0, 210, 255, 0.55);
  stroke-width: 0.2;
  filter: drop-shadow(0 0 5px rgba(0, 200, 255, 0.18)) saturate(1.1);
}

.geo-street-mesh text {
  text-anchor: middle;
  dominant-baseline: middle;
  font-size: calc(1.12px * var(--geo-mesh-label-scale, 1) * var(--geo-zoom-mesh-adjust, 1));
  fill: rgba(140, 200, 240, 0.65);
  paint-order: stroke;
  stroke: rgba(0, 20, 40, 0.6);
  stroke-width: 0.2;
  pointer-events: none;
  opacity: 0;
  display: none;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(var(--geo-screen-label-stabilize, 1));
}

.geo-street-mesh.show-label text {
  opacity: 0.85;
}

.geo-street-mesh-svg.lv-district .geo-street-mesh text {
  opacity: 0;
}

.geo-street-mesh-svg.lv-street .geo-street-mesh polygon {
  stroke-width: 0.13;
}

.geo-street-mesh-svg.lv-building .geo-street-mesh polygon {
  stroke-width: 0.14;
}

.geo-map-stage.lv-building .geo-heat-blob {
  filter: blur(1.5px);
}

.geo-map-stage.lv-building .geo-heat-label {
  opacity: 0;
  transform: translateX(-50%) translateY(-2px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.geo-map-stage.lv-building .geo-node-link:hover .geo-heat-label,
.geo-map-stage.lv-building .geo-node-link:focus-visible .geo-heat-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.geo-map-stage.lv-building .geo-heat-label.compact {
  padding: calc(2px * var(--geo-heat-label-scale, 1) * var(--geo-zoom-heat-adjust, 1)) calc(6px * var(--geo-heat-label-scale, 1) * var(--geo-zoom-heat-adjust, 1));
}

.geo-map-stage.lv-building .geo-boundary-shape text {
  opacity: 0;
}

.geo-map-stage.lv-building .geo-boundary-shape:hover text,
.geo-map-stage.lv-building .geo-boundary-shape.active:hover text {
  opacity: 0.92;
}

.geo-map-stage.lv-building .geo-boundary-shape.building polygon {
  stroke-width: 0.44;
  fill-opacity: 0.24;
}

.geo-map-stage.tiles-on.lv-building .geo-boundary-shape.building polygon {
  fill-opacity: 0.16;
}

.geo-map-stage.tiles-on.lv-building .geo-boundary-shape.building.active polygon {
  fill-opacity: 0.26;
}

.geo-map-stage.lv-street[data-zoom-tier="high"] .geo-boundary-shape.park text,
.geo-map-stage.lv-building[data-zoom-tier="high"] .geo-boundary-shape.building text,
.geo-map-stage.lv-building[data-zoom-tier="high"] .geo-boundary-shape.park text {
  opacity: 0;
}

.geo-map-stage.lv-street[data-zoom-tier="high"] .geo-boundary-shape.park:hover text,
.geo-map-stage.lv-street[data-zoom-tier="high"] .geo-boundary-shape.park.active:hover text,
.geo-map-stage.lv-building[data-zoom-tier="high"] .geo-boundary-shape.building:hover text,
.geo-map-stage.lv-building[data-zoom-tier="high"] .geo-boundary-shape.building.active:hover text,
.geo-map-stage.lv-building[data-zoom-tier="high"] .geo-boundary-shape.park:hover text,
.geo-map-stage.lv-building[data-zoom-tier="high"] .geo-boundary-shape.park.active:hover text {
  opacity: 0.92;
}

.geo-map-stage.lv-building .geo-poi-dot.project {
  width: calc(22px * var(--geo-icon-scale, 1));
  height: calc(22px * var(--geo-icon-scale, 1));
  font-size: calc(9px * var(--geo-icon-scale, 1));
}

.geo-map-stage.lv-building .geo-poi-dot.carrier {
  width: calc(22px * var(--geo-icon-scale, 1));
  height: calc(22px * var(--geo-icon-scale, 1));
  font-size: calc(9px * var(--geo-icon-scale, 1));
}

.geo-park-skin-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.geo-park-skin {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 36% 46% 42% 40%;
  border: 1px solid rgba(36, 145, 181, 0.36);
  background:
    radial-gradient(circle at 40% 35%, rgba(143, 218, 234, 0.34), rgba(37, 131, 165, 0.08) 68%),
    repeating-linear-gradient(135deg, rgba(52, 136, 178, 0.18) 0, rgba(52, 136, 178, 0.18) 3px, rgba(52, 136, 178, 0.05) 3px, rgba(52, 136, 178, 0.05) 8px);
  filter: blur(0.2px);
  box-shadow: inset 0 0 16px rgba(69, 156, 185, 0.18);
  opacity: 0.62;
}

.geo-park-skin.active {
  border-color: rgba(72, 194, 169, 0.92);
  background:
    radial-gradient(circle at 45% 40%, rgba(126, 222, 186, 0.52), rgba(34, 158, 136, 0.12) 70%),
    repeating-linear-gradient(135deg, rgba(34, 158, 136, 0.28) 0, rgba(34, 158, 136, 0.28) 3px, rgba(34, 158, 136, 0.07) 3px, rgba(34, 158, 136, 0.07) 8px);
  box-shadow: 0 0 40px rgba(34, 158, 136, 0.34), inset 0 0 28px rgba(126, 222, 186, 0.28);
  opacity: 0.98;
}

.geo-park-skin.subdued {
  opacity: 0.24;
  filter: saturate(0.72) brightness(0.88);
}

.geo-park-skin.chain-hit {
  box-shadow: 0 0 22px rgba(217, 119, 6, 0.28), inset 0 0 20px rgba(217, 119, 6, 0.16);
}

.geo-park-skin-layer.geo-park-skin-svg .geo-park-skin polygon {
  fill: rgba(98, 196, 173, 0.16);
  stroke: rgba(76, 160, 186, 0.45);
  stroke-width: 0.14;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 5px rgba(34, 158, 136, 0.12));
}

.geo-park-skin-layer.geo-park-skin-svg .geo-park-skin.active polygon {
  fill: rgba(34, 158, 136, 0.44);
  stroke: rgba(33, 151, 129, 0.85);
  stroke-width: 0.22;
  filter: drop-shadow(0 0 10px rgba(34, 158, 136, 0.3));
}

.geo-park-skin-layer.geo-park-skin-svg .geo-park-skin.subdued polygon {
  fill: rgba(34, 158, 136, 0.05);
  stroke: rgba(35, 134, 165, 0.18);
  stroke-width: 0.18;
  opacity: 0.28;
  filter: saturate(0.7) brightness(0.9);
}

.geo-map-stage.tiles-on.park-focus .geo-park-skin-layer.geo-park-skin-svg .geo-park-skin polygon {
  fill: rgba(98, 196, 173, 0.05);
  stroke: rgba(76, 160, 186, 0.24);
  stroke-width: 0.18;
  filter: none;
}

.geo-map-stage.tiles-on.park-focus .geo-park-skin-layer.geo-park-skin-svg .geo-park-skin.active polygon {
  fill: rgba(34, 158, 136, 0.1);
  stroke: rgba(33, 151, 129, 0.66);
  stroke-width: 0.34;
  filter: drop-shadow(0 0 8px rgba(34, 158, 136, 0.16));
}

.geo-map-stage.tiles-on.park-focus .geo-park-skin-layer.geo-park-skin-svg .geo-park-skin.subdued polygon {
  fill: rgba(34, 158, 136, 0.02);
  stroke: rgba(35, 134, 165, 0.1);
  opacity: 0.18;
  filter: none;
}

.geo-park-skin-layer.geo-park-skin-svg .geo-park-skin.chain-hit polygon {
  stroke: rgba(217, 119, 6, 0.84);
  filter: drop-shadow(0 0 9px rgba(217, 119, 6, 0.3));
}

.geo-boundary-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  contain: strict;
}

.geo-boundary-shape {
  cursor: pointer;
}

/* Boundary hover tooltip */
.geo-boundary-tip {
  display: none;
  position: fixed;
  z-index: 10000;
  padding: 5px 12px;
  border-radius: 6px;
  background: rgba(24, 28, 40, 0.88);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.28);
  backdrop-filter: blur(6px);
}

.geo-boundary-shape polygon {
  fill: var(--area-fill, rgba(0, 80, 160, 0.1));
  stroke: var(--area-stroke, rgba(0, 200, 255, 0.4));
  stroke-width: 0.06;
  vector-effect: non-scaling-stroke;
  transition: fill 160ms ease, stroke 160ms ease, fill-opacity 160ms ease, opacity 160ms ease, filter 160ms ease;
}

.geo-boundary-shape text {
  text-anchor: middle;
  dominant-baseline: middle;
  font-size: calc(1.55px * var(--geo-boundary-label-scale, 1) * var(--geo-zoom-boundary-adjust, 1));
  fill: rgba(200, 230, 255, 0.9);
  paint-order: stroke;
  stroke: rgba(0, 20, 40, 0.6);
  stroke-width: 0.22;
  pointer-events: none;
  user-select: none;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(var(--geo-screen-label-stabilize, 1));
}

.geo-boundary-shape text.behavior-hover,
.geo-boundary-shape text.behavior-active {
  opacity: 0;
}

.geo-boundary-shape:hover text.behavior-hover,
.geo-boundary-shape.active:hover text.behavior-hover {
  opacity: 0.94;
}

.geo-boundary-shape.active text.behavior-active {
  opacity: 0.94;
}

.geo-boundary-shape.subdued polygon {
  opacity: 0.18;
  filter: saturate(0.82);
}

.geo-boundary-shape.subdued text {
  opacity: 0.18;
}

.geo-boundary-shape.district polygon {
  fill: var(--area-fill, rgba(0, 80, 160, 0.08));
  stroke: var(--area-stroke, rgba(0, 200, 255, 0.35));
}

.geo-boundary-shape.street polygon {
  fill: var(--area-fill, rgba(0, 80, 160, 0.14));
  stroke: var(--area-stroke, rgba(0, 200, 255, 0.4));
}

.geo-boundary-shape.park polygon {
  fill: var(--area-fill, rgba(220, 160, 30, 0.18));
  stroke: var(--area-stroke, rgba(210, 150, 20, 0.82));
}

.geo-boundary-shape.building polygon {
  fill: var(--area-fill, rgba(217, 119, 6, 0.14));
  stroke: var(--area-stroke, rgba(187, 101, 7, 0.76));
}

.geo-boundary-shape.active polygon {
  stroke: var(--area-stroke-active, rgba(0, 220, 255, 0.95));
  stroke-width: 0.12;
  fill: var(--area-fill-active, var(--area-fill, rgba(0, 100, 200, 0.2)));
  fill-opacity: 0.94;
  filter: saturate(1.14) brightness(1.03);
}

.geo-boundary-shape.active text {
  fill: rgba(220, 245, 255, 0.98);
  stroke: rgba(0, 20, 40, 0.7);
  stroke-width: 0.28;
  font-weight: 700;
}

.geo-boundary-shape.landing-focus polygon {
  transform-box: fill-box;
  transform-origin: center;
  animation: geo-boundary-landing 0.52s cubic-bezier(0.18, 0.78, 0.2, 1) both;
}

.geo-boundary-shape.landing-focus text,
.geo-boundary-shape.landing-focus text.behavior-hover,
.geo-boundary-shape.landing-focus text.behavior-active {
  opacity: 0.98;
  fill: rgba(220, 245, 255, 0.98);
  stroke: rgba(0, 20, 40, 0.7);
  stroke-width: 0.3;
  font-weight: 700;
}

.geo-boundary-shape.district.active polygon {
  fill-opacity: 0.98;
  stroke-width: 0.12;
  filter: drop-shadow(0 0 8px rgba(0, 200, 255, 0.2)) saturate(1.18);
}

.geo-boundary-shape.district.landing-focus polygon {
  stroke-width: 0.14;
  filter: drop-shadow(0 0 10px rgba(0, 200, 255, 0.25)) saturate(1.2);
}

.geo-boundary-shape.street.active polygon {
  fill-opacity: 0.96;
  stroke-width: 0.1;
  filter: drop-shadow(0 0 8px rgba(0, 190, 240, 0.2)) saturate(1.14);
}

.geo-boundary-shape.street.landing-focus polygon {
  stroke-width: 0.12;
  filter: drop-shadow(0 0 10px rgba(0, 190, 240, 0.25)) saturate(1.16);
}

.geo-boundary-shape.park.active polygon {
  fill-opacity: 0.98;
  stroke-width: 0.24;
  filter: drop-shadow(0 0 8px rgba(0, 180, 150, 0.15)) saturate(1.16);
}

.geo-boundary-shape.park.landing-focus polygon {
  stroke-width: 0.28;
  filter: drop-shadow(0 0 10px rgba(0, 180, 150, 0.18)) saturate(1.18);
}

.geo-map-stage.tiles-on .geo-boundary-shape.street polygon,
.geo-map-stage.tiles-on .geo-boundary-shape.park polygon,
.geo-map-stage.tiles-on .geo-boundary-shape.building polygon {
  fill-opacity: 0.08;
}

.geo-map-stage.tiles-on .geo-boundary-shape.street.active polygon,
.geo-map-stage.tiles-on .geo-boundary-shape.park.active polygon,
.geo-map-stage.tiles-on .geo-boundary-shape.building.active polygon {
  fill-opacity: 0.14;
}

.geo-map-stage.tiles-on.park-focus .geo-boundary-shape.park text {
  opacity: 0;
}

.geo-map-stage.tiles-on.park-focus .geo-boundary-shape.park:hover text,
.geo-map-stage.tiles-on.park-focus .geo-boundary-shape.park.active:hover text {
  opacity: 0.92;
}

.geo-map-stage.tiles-on.park-focus .geo-boundary-shape.park polygon,
.geo-map-stage.tiles-on.park-focus .geo-boundary-shape.street polygon {
  fill-opacity: 0.04;
}

.geo-map-stage.tiles-on.park-focus .geo-boundary-shape.park.active polygon {
  fill-opacity: 0.1;
  stroke-width: 0.2;
  filter: drop-shadow(0 0 6px rgba(0, 180, 150, 0.1)) saturate(1.08);
}

.geo-boundary-shape.chain-hit polygon {
  filter: drop-shadow(0 0 8px rgba(217, 119, 6, 0.34));
}

.geo-boundary-shape:hover polygon {
  stroke-width: 0.18;
  fill-opacity: 0.4;
}

@keyframes geo-boundary-landing {
  0% {
    fill-opacity: 0.48;
    transform: scale(0.988);
  }
  52% {
    fill-opacity: 1;
    transform: scale(1.016);
  }
  100% {
    fill-opacity: 0.96;
    transform: scale(1);
  }
}

.geo-node-link {
  position: absolute;
  transform: translate(-50%, -50%) scale(var(--geo-overlay-counter-scale, 1));
  transform-origin: center;
  text-decoration: none;
  z-index: 4;
  transition: transform 200ms ease, z-index 0ms;
}

.geo-node-link:hover {
  transform: translate(-50%, -50%) scale(calc(var(--geo-overlay-counter-scale, 1) * 1.08));
  z-index: 7;
}

.geo-heat-stack {
  position: relative;
  display: block;
  overflow: visible;
}

.geo-heat-blob {
  display: block;
  border-radius: 50%;
  background: radial-gradient(circle at center,
    var(--blob-core, rgba(176, 96, 88, 0.92)) 0%,
    var(--blob-mid, rgba(212, 152, 142, 0.55)) 38%,
    var(--blob-edge, rgba(242, 224, 219, 0.18)) 68%,
    transparent 100%);
  filter: blur(2px);
  box-shadow:
    inset 0 0 0 1.5px rgba(255,255,255,0.25),
    0 0 14px color-mix(in srgb, var(--blob-core) 42%, transparent),
    0 0 30px color-mix(in srgb, var(--blob-mid) 26%, transparent);
  pointer-events: none;
  mix-blend-mode: screen;
  transform: scale(var(--geo-zoom-heat-adjust, 1));
  transform-origin: center;
  transition: width 0.4s ease, height 0.4s ease, opacity 0.4s ease, transform 0.25s ease;
}

.geo-heat-ring {
  display: none;
}

.geo-heat-dot {
  display: none;
}

.geo-map-stage.park-focus .geo-heat-blob {
  filter: blur(1.5px);
}

.geo-heat-label {
  position: absolute;
  left: 50%;
  top: calc(50% + 8px * var(--geo-heat-label-scale, 1) * var(--geo-zoom-heat-adjust, 1));
  transform: translateX(-50%);
  font-size: calc(9px * var(--geo-heat-label-scale, 1) * var(--geo-zoom-heat-adjust, 1));
  color: rgba(200, 230, 255, 0.92);
  font-weight: 600;
  white-space: nowrap;
  border-radius: 999px;
  padding: calc(2px * var(--geo-heat-label-scale, 1) * var(--geo-zoom-heat-adjust, 1)) calc(8px * var(--geo-heat-label-scale, 1) * var(--geo-zoom-heat-adjust, 1));
  border: 1px solid rgba(0, 180, 255, 0.2);
  background: rgba(8, 24, 44, 0.85);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.geo-heat-val {
  font-style: normal;
  margin-left: 3px;
  opacity: 0.7;
  font-weight: 500;
  font-size: 0.9em;
}

.geo-entity-wrap {
  position: absolute;
  transform: translate(-50%, -100%) scale(var(--geo-overlay-counter-scale, 1));
  transform-origin: center bottom;
  z-index: 5;
}

.geo-entity-wrap:hover,
.geo-entity-wrap:focus-within {
  z-index: 8;
}

.geo-map-stage[data-zoom-tier="low"] .geo-layer-enterprise,
.geo-map-stage[data-zoom-tier="low"] .geo-layer-carrier,
.geo-map-stage[data-zoom-tier="low"] .geo-layer-project {
  display: none;
}

.geo-map-stage[data-zoom-tier="low"] .geo-layer-park,
.geo-map-stage[data-zoom-tier="low"] .geo-node-link {
  display: none;
}

.geo-map-stage[data-zoom-tier="mid"] .geo-layer-enterprise.tier-high,
.geo-map-stage[data-zoom-tier="mid"] .geo-layer-carrier,
.geo-map-stage[data-zoom-tier="mid"] .geo-layer-project {
  display: none;
}

.geo-map-stage[data-zoom-tier="low"] .geo-db-location.geo-lod-low {
  display: block;
}

.geo-map-stage[data-zoom-tier="mid"] .geo-db-location.geo-lod-high {
  display: none;
}

.geo-entity-wrap.geo-db-location {
  transform: translate(-50%, -50%) scale(var(--geo-overlay-counter-scale, 1));
  transform-origin: center;
}

.geo-db-location-dot {
  position: relative;
  display: grid;
  width: 22px;
  height: 22px;
  padding: 0;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--entity-color, #2563eb);
  box-shadow: 0 1px 4px rgba(15, 48, 82, 0.34);
  cursor: pointer;
  opacity: 0.82;
  transition: width 120ms ease, height 120ms ease, opacity 120ms ease, box-shadow 120ms ease;
}

.geo-db-location-dot:hover,
.geo-db-location-dot:focus-visible {
  width: 26px;
  height: 26px;
  outline: none;
  opacity: 1;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16), 0 2px 7px rgba(15, 48, 82, 0.38);
}

.geo-db-location-dot svg {
  width: 12px;
  height: 12px;
  color: #fff;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.geo-db-location.is-approximate .geo-db-location-dot {
  border-style: dashed;
  opacity: 0.58;
}

.geo-db-location .geo-entity-card {
  left: 12px;
  top: -12px;
  max-width: 300px;
  z-index: 2;
}

.geo-db-location .geo-entity-card em {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-location-detail-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e5edf6;
}

.geo-location-detail-dot {
  width: 14px;
  height: 14px;
  margin-top: 5px;
  flex: 0 0 auto;
  border: 3px solid #dbeafe;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 1px #93c5fd;
}

.geo-location-detail-head h3,
.geo-location-detail-head p {
  margin: 0;
}

.geo-location-detail-head h3 {
  color: #17355a;
  font-size: 17px;
  line-height: 1.45;
}

.geo-location-detail-head p {
  margin-top: 4px;
  color: #6d829a;
  font-size: 13px;
}

.geo-location-detail dl {
  margin: 14px 0 4px;
}

.geo-location-detail dl > div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #eef3f8;
}

.geo-location-detail dt {
  color: #7a8fa6;
  font-size: 13px;
}

.geo-location-detail dd {
  margin: 0;
  color: #294968;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.geo-location-cluster-summary {
  margin-bottom: 12px;
  color: #506b87;
  font-size: 13px;
}

.geo-location-cluster-list {
  display: grid;
  max-height: min(54vh, 480px);
  overflow: auto;
  border: 1px solid #dce7f2;
  border-radius: 6px;
}

.geo-location-cluster-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid #edf2f7;
  background: #fff;
  color: #234464;
  text-align: left;
  cursor: pointer;
}

.geo-location-cluster-item:last-child {
  border-bottom: 0;
}

.geo-location-cluster-item:hover,
.geo-location-cluster-item:focus-visible {
  outline: none;
  background: #f4f8fc;
}

.geo-location-cluster-item span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.geo-location-cluster-item b,
.geo-location-cluster-item em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-location-cluster-item b {
  font-size: 13px;
}

.geo-location-cluster-item em,
.geo-location-cluster-item small,
.geo-location-cluster-note {
  color: #7a8fa6;
  font-size: 12px;
  font-style: normal;
}

.geo-entity-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.geo-entity-dot {
  width: calc(20px * var(--geo-entity-scale, 1));
  height: calc(20px * var(--geo-entity-scale, 1));
  border-radius: calc(10px * var(--geo-entity-scale, 1)) calc(10px * var(--geo-entity-scale, 1)) calc(2px * var(--geo-entity-scale, 1)) calc(10px * var(--geo-entity-scale, 1));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--entity-color, #6889a0);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(0, 0, 0, 0.12) 100%);
  border: 2px solid #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.30), 0 0px 1px rgba(0, 0, 0, 0.18);
  flex: 0 0 auto;
  rotate: 45deg;
}

.geo-entity-dot > * {
  rotate: -45deg;
}

.geo-entity-glyph {
  display: block;
  font-size: calc(7.2px * var(--geo-entity-scale, 1));
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.25);
  transform: translateY(-0.2px);
  pointer-events: none;
}

.geo-entity-badge.t-core .geo-entity-dot {
  width: calc(23px * var(--geo-entity-scale, 1));
  height: calc(23px * var(--geo-entity-scale, 1));
  border-radius: calc(11.5px * var(--geo-entity-scale, 1)) calc(11.5px * var(--geo-entity-scale, 1)) calc(2px * var(--geo-entity-scale, 1)) calc(11.5px * var(--geo-entity-scale, 1));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.32), 0 0px 1px rgba(0, 0, 0, 0.20);
}

.geo-entity-badge.t-core .geo-entity-glyph {
  font-size: calc(7.5px * var(--geo-entity-scale, 1));
}

.geo-marker-svg {
  width: 64%;
  height: 64%;
  display: block;
  overflow: visible;
  fill: none;
  stroke: none;
  pointer-events: none;
}

.geo-heat-dot .geo-marker-svg {
  width: 60%;
  height: 60%;
}

.geo-entity-card {
  position: absolute;
  left: calc(5px * var(--geo-entity-scale, 1) * var(--geo-zoom-entity-adjust, 1));
  top: calc(-5px * var(--geo-entity-scale, 1) * var(--geo-zoom-entity-adjust, 1));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
  max-width: none;
  padding: 6px 8px 5px;
  border-radius: 5px;
  border: 1px solid rgba(0, 180, 255, 0.2);
  background: rgba(8, 24, 44, 0.9);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translate(3px, 1px);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}

.geo-entity-wrap:hover .geo-entity-card,
.geo-entity-wrap:focus-within .geo-entity-card {
  opacity: 1;
  transform: translate(0, 0);
}

.geo-entity-card b {
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.3;
  color: rgba(200, 230, 255, 0.95);
}

.geo-entity-card em {
  font-style: normal;
  font-size: 12px;
  line-height: 1.2;
  color: rgba(120, 180, 220, 0.7);
}

.geo-poi-dot {
  position: absolute;
  transform: translate(-50%, -100%);
  width: calc(22px * var(--geo-icon-scale, 1));
  height: calc(22px * var(--geo-icon-scale, 1));
  border-radius: calc(11px * var(--geo-icon-scale, 1)) calc(11px * var(--geo-icon-scale, 1)) calc(2px * var(--geo-icon-scale, 1)) calc(11px * var(--geo-icon-scale, 1));
  border: 2px solid #fff;
  font-size: calc(9px * var(--geo-icon-scale, 1));
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #5b82a0 0%, #4a6d88 100%);
  z-index: 6;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.30), 0 0px 1px rgba(0, 0, 0, 0.18);
  transform-origin: center center;
  rotate: 45deg;
}

.geo-poi-dot > * {
  rotate: -45deg;
}

.geo-poi-glyph {
  display: block;
  line-height: 1;
  font-size: inherit;
  font-weight: inherit;
  pointer-events: none;
}

.geo-poi-wrap {
  position: absolute;
  transform: translate(-50%, -100%) scale(var(--geo-overlay-counter-scale, 1));
  transform-origin: center bottom;
  z-index: 6;
}

.geo-poi-wrap:hover {
  z-index: 8;
}

.geo-poi-dot.project {
  border-radius: calc(11px * var(--geo-icon-scale, 1)) calc(11px * var(--geo-icon-scale, 1)) calc(2px * var(--geo-icon-scale, 1)) calc(11px * var(--geo-icon-scale, 1));
  background: linear-gradient(180deg, #b08c5e 0%, #967548 100%);
}

.geo-poi-dot.park {
  border-radius: calc(11px * var(--geo-icon-scale, 1)) calc(11px * var(--geo-icon-scale, 1)) calc(2px * var(--geo-icon-scale, 1)) calc(11px * var(--geo-icon-scale, 1));
  background: linear-gradient(180deg, #5e9e88 0%, #4d8572 100%);
  z-index: 7;
}

.geo-poi-dot.carrier {
  background: linear-gradient(180deg, #6b87a0 0%, #566f85 100%);
}

.geo-poi-wrap .geo-poi-dot {
  position: relative;
  transform: none;
  transform-origin: center center;
  rotate: 45deg;
}

.geo-poi-card {
  position: absolute;
  left: 6px;
  top: -5px;
  min-width: 140px;
  border-radius: 5px;
  border: 1px solid rgba(0, 180, 255, 0.2);
  background: rgba(8, 24, 44, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  padding: 6px 8px;
  opacity: 0;
  transform: translate(3px, 1px);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}

.geo-poi-wrap:hover .geo-poi-card {
  opacity: 1;
  transform: translate(0, 0);
  pointer-events: auto;
}

.geo-poi-card p {
  margin: 0 0 2px;
  font-size: 12px;
  line-height: 1.3;
  color: rgba(120, 180, 220, 0.8);
  white-space: nowrap;
}

.geo-poi-card p.name {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  color: rgba(200, 230, 255, 0.95);
}

.geo-poi-card.park {
  min-width: 160px;
  border-color: rgba(0, 200, 180, 0.25);
}

.geo-poi-wrap.park.active .geo-poi-dot.park {
  background: rgba(27, 167, 141, 0.98);
  border-color: rgba(198, 247, 231, 0.96);
  box-shadow: 0 0 0 4px rgba(34, 158, 136, 0.18), 0 0 20px rgba(34, 158, 136, 0.36);
}

.geo-poi-wrap.park.subdued {
  opacity: 0.36;
  filter: saturate(0.72);
}

.geo-poi-wrap.park.subdued .geo-poi-dot.park {
  background: rgba(34, 158, 136, 0.46);
  box-shadow: none;
}

.geo-map-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  gap: 6px;
  z-index: 12;
}

.geo-map-controls button {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(0, 180, 255, 0.2);
  background: rgba(8, 24, 44, 0.85);
  backdrop-filter: blur(12px);
  color: rgba(140, 210, 255, 0.9);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  font-size: 16px;
  font-weight: 600;
  transition: all 160ms ease;
}

.geo-map-controls button:hover {
  background: rgba(0, 60, 120, 0.85);
  border-color: rgba(0, 200, 255, 0.5);
  box-shadow: 0 4px 16px rgba(0, 150, 255, 0.2);
  transform: scale(1.05);
}
.geo-map-controls button:active {
  transform: scale(0.92);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  transition-duration: 60ms;
}

.geo-map-stage.park-focus .geo-map-controls button {
  width: 36px;
  height: 36px;
  font-size: 12px;
}

.geo-zoom-badge {
  position: absolute;
  right: 10px;
  top: 132px;
  font-size: 11px;
  color: rgba(140, 200, 240, 0.7);
  border-radius: 8px;
  border: 1px solid rgba(0, 180, 255, 0.15);
  padding: 4px 10px;
  background: rgba(8, 24, 44, 0.8);
  backdrop-filter: blur(12px);
  font-variant-numeric: tabular-nums;
  z-index: 12;
}

.geo-map-scale {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(140, 200, 240, 0.75);
  border-radius: 8px;
  border: 1px solid rgba(0, 180, 255, 0.15);
  padding: 4px 10px;
  background: rgba(8, 24, 44, 0.8);
  backdrop-filter: blur(12px);
  z-index: 12;
  font-variant-numeric: tabular-nums;
}

.geo-scale-bar {
  height: 4px;
  min-width: 20px;
  max-width: 160px;
  background: rgba(0, 180, 255, 0.6);
  border-radius: 2px;
  border-left: 2px solid rgba(0, 200, 255, 0.8);
  border-right: 2px solid rgba(0, 200, 255, 0.8);
  transition: width 260ms ease;
}

.geo-scale-label {
  white-space: nowrap;
}

.geo-park-drawer {
  position: absolute;
  width: min(280px, 32vw);
  border-radius: var(--radius);
  border: 1px solid rgba(0, 180, 255, 0.2);
  background: rgba(8, 24, 44, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 1px 4px rgba(0, 0, 0, 0.15);
  padding: 14px;
  z-index: 50;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  pointer-events: auto;
  animation: geo-park-popup-in 200ms ease forwards;
}

.geo-park-drawer-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border: none;
  background: rgba(0, 160, 240, 0.15);
  border-radius: 50%;
  font-size: 15px;
  line-height: 22px;
  text-align: center;
  color: rgba(160, 210, 240, 0.7);
  cursor: pointer;
  padding: 0;
  z-index: 2;
}
.geo-park-drawer-close:hover {
  background: rgba(0, 160, 240, 0.3);
  color: rgba(200, 230, 255, 0.95);
}

@keyframes geo-park-popup-in {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.geo-park-drawer .hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.geo-park-drawer .name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: rgba(200, 230, 255, 0.95);
  letter-spacing: 0;
}

.geo-park-drawer .tag {
  margin: 0;
  border-color: rgba(34, 158, 136, 0.28);
  background: rgba(34, 158, 136, 0.12);
  color: rgba(22, 111, 95, 0.95);
}

.geo-park-drawer .desc {
  margin: 8px 0 10px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(120, 180, 220, 0.75);
}

.geo-drawer-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.geo-drawer-kpis .k {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 180, 255, 0.15);
  background: rgba(0, 40, 80, 0.4);
  padding: 8px 10px;
}

.geo-drawer-kpis .k span {
  display: block;
  font-size: 11px;
  color: rgba(120, 180, 220, 0.7);
}

.geo-drawer-kpis .k b {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  color: rgba(200, 230, 255, 0.95);
}

.geo-compare {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 180, 255, 0.15);
}

.geo-compare-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: rgba(140, 200, 240, 0.8);
}

.geo-compare-empty {
  margin: 6px 0 0;
  font-size: 12px;
  color: rgba(120, 180, 220, 0.65);
}

.geo-compare-grid {
  margin-top: 7px;
  display: grid;
  gap: 6px;
}

.geo-compare-grid .r {
  display: grid;
  grid-template-columns: 72px 1fr 1fr auto;
  gap: 6px;
  align-items: center;
  border-radius: 8px;
  border: 1px solid rgba(0, 180, 255, 0.12);
  background: rgba(0, 40, 80, 0.35);
  padding: 6px 7px;
}

.geo-compare-grid .r span {
  font-size: 11px;
  color: rgba(120, 180, 220, 0.7);
}

.geo-compare-grid .r b {
  font-size: 12px;
  color: rgba(200, 230, 255, 0.92);
  font-weight: 700;
}

.geo-compare-grid .r em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
}

.geo-compare-grid .r em.up {
  color: rgba(10, 123, 62, 0.95);
}

.geo-compare-grid .r em.down {
  color: rgba(180, 35, 24, 0.95);
}

.geo-map-legend {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-radius: 10px;
  border: 1px solid rgba(0, 180, 255, 0.15);
  background: rgba(8, 24, 44, 0.85);
  backdrop-filter: blur(12px);
  padding: 6px 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 12;
}

.geo-heat-scale {
  display: inline-grid;
  grid-template-columns: auto 84px auto auto;
  align-items: center;
  gap: 5px;
  padding-right: 10px;
  border-right: 1px solid rgba(160, 210, 240, 0.18);
}

.geo-map-legend .geo-heat-scale span {
  font-size: 10px;
  color: rgba(185, 220, 242, 0.78);
}

.geo-map-legend .geo-heat-scale i {
  width: 84px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #3168ff 0%, #1cd7bf 32%, #5be068 50%, #ffd645 67%, #ff772a 84%, #dd2a2a 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.geo-heat-scale em {
  max-width: 140px;
  overflow: hidden;
  color: rgba(160, 210, 240, 0.72);
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: rgba(160, 210, 240, 0.8);
}

.geo-map-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 0 1px rgba(0, 100, 180, 0.3);
}

.geo-map-stage.park-focus .geo-map-legend {
  gap: 8px;
  padding: 5px 8px;
}

.geo-map-stage.park-focus .geo-map-legend span {
  font-size: 10px;
}

.geo-map-stage.park-focus .geo-map-legend i {
  width: 8px;
  height: 8px;
}

.geo-map-legend i.metric-ring {
  background: transparent;
  border: 1.6px solid var(--ring-color, rgba(59, 130, 246, 0.78));
  box-shadow: none;
}

.geo-map-legend i.metric-ring.m-output {
  border-style: dashed;
}

.geo-map-legend i.metric-ring.m-tax {
  border-width: 2px;
}

.geo-map-legend i.metric-ring.m-revenue {
  border-style: dotted;
}

.geo-map-legend i.l1 {
  background: #f97316;
}

.geo-map-legend i.heat-key {
  border: 0;
  background: linear-gradient(135deg, #3168ff, #5be068 48%, #ffd645 68%, #dd2a2a);
}

.geo-map-legend i.l2 {
  background: #60a5fa;
}

.geo-map-legend i.l2.lc-mfg {
  background: #3b82f6;
}

.geo-map-legend i.l2.lc-bio {
  background: #10b981;
}

.geo-map-legend i.l2.lc-biz {
  background: #f59e0b;
}

.geo-map-legend i.l2.lc-srv {
  background: #a855f7;
}

.geo-map-legend i.l3 {
  background: #f59e0b;
}

.geo-map-legend i.l4 {
  background: #14b8a6;
}

.geo-map-legend i.l5 {
  background: #06b6d4;
}

/* Layer toggle legend */
.geo-legend-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: rgba(100, 170, 220, 0.45);
  cursor: pointer;
  user-select: none;
  transition: color .18s, opacity .18s;
  text-decoration: line-through;
  text-decoration-color: rgba(100, 170, 220, 0.18);
}
.geo-legend-toggle.on {
  color: rgba(160, 210, 240, 0.85);
  text-decoration: none;
}
.geo-legend-toggle input[type="checkbox"] {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: rgba(0, 160, 240, 0.8);
  cursor: pointer;
}
.geo-legend-toggle i {
  opacity: 0.4;
  transition: opacity .18s;
}
.geo-legend-toggle.on i {
  opacity: 1;
}
.geo-map-stage.park-focus .geo-legend-toggle {
  font-size: 10px;
}
.geo-map-stage.park-focus .geo-legend-toggle i {
  width: 8px;
  height: 8px;
}

/* Layer visibility hide rules */
.geo-map-stage.hide-heat .geo-node-link,
.geo-map-stage.hide-heat .geo-heat-stack,
.geo-map-stage.hide-heat .geo-heat-ring,
.geo-map-stage.hide-heat .geo-heat-label,
.geo-map-stage.hide-heat .geo-density-canvas {
  display: none !important;
}
.geo-map-stage.hide-enterprise .geo-layer-enterprise {
  display: none !important;
}
.geo-map-stage.hide-ent_mfg .geo-ind-mfg {
  display: none !important;
}
.geo-map-stage.hide-ent_bio .geo-ind-bio {
  display: none !important;
}
.geo-map-stage.hide-ent_biz .geo-ind-biz {
  display: none !important;
}
.geo-map-stage.hide-ent_srv .geo-ind-srv {
  display: none !important;
}
.geo-map-stage.hide-project .geo-layer-project {
  display: none !important;
}
.geo-map-stage.hide-carrier .geo-layer-carrier {
  display: none !important;
}
.geo-map-stage.hide-park .geo-layer-park {
  display: none !important;
}

.geo-map-table {
  border-radius: 14px;
  border: 1px solid rgba(0, 90, 180, 0.1);
  background: rgba(255, 255, 255, 0.92);
  overflow: hidden;
  margin-top: 8px;
}

.geo-bottom-drawer {
  margin-top: 8px;
  border-radius: 14px;
  border: 1px solid rgba(0, 90, 180, 0.1);
  background: rgba(255, 255, 255, 0.92);
  overflow: hidden;
}

.geo-bottom-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 0;
  background: linear-gradient(180deg, rgba(247, 251, 255, 0.98), rgba(240, 247, 252, 0.95));
  cursor: pointer;
  text-align: left;
}

.geo-bottom-toggle-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.geo-bottom-toggle-main b {
  font-size: 12px;
  color: rgba(19, 56, 98, 0.92);
}

.geo-bottom-toggle-main em {
  font-style: normal;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(88, 115, 135, 0.84);
}

.geo-bottom-toggle-meta {
  flex: 0 0 auto;
  font-size: 11px;
  color: rgba(49, 117, 171, 0.92);
  font-weight: 600;
}

.geo-bottom-drawer.collapsed {
  box-shadow: 0 2px 10px rgba(0, 40, 100, 0.06);
}

.geo-bottom-drawer.expanded .geo-bottom-toggle {
  border-bottom: 1px solid rgba(0, 90, 180, 0.08);
}

.geo-map-table table {
  width: 100%;
  border-collapse: collapse;
}

.geo-map-table th {
  background: rgba(235, 245, 255, 0.6);
  color: rgba(15, 55, 100, 0.88);
  font-weight: 700;
}

.geo-map-table th,
.geo-map-table td {
  padding: 7px 9px;
  font-size: 11px;
  border-bottom: 1px solid rgba(0, 90, 180, 0.08);
  color: rgba(30, 70, 120, 0.78);
  text-align: left;
}

.geo-map-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.geo-map-table td.rank {
  text-align: center;
  color: rgba(15, 55, 100, 0.5);
  font-weight: 600;
  width: 32px;
}

.geo-map-table tr:nth-child(-n+3) td.rank {
  color: var(--accent, #1976d2);
}

.geo-map-table thead th {
  color: rgba(15, 55, 100, 0.85);
  background: rgba(230, 242, 255, 0.7);
}

.geo-link:focus-visible,
.geo-tab:focus-visible,
.btn:focus-visible,
.geo-mini-btn:focus-visible,
.geo-result-chip:focus-visible,
.geo-map-controls button:focus-visible,
.geo-poi-dot:focus-visible,
.geo-entity-badge:focus-visible,
.geo-row select:focus-visible,
.geo-row input[type="text"]:focus-visible,
.geo-check input:focus-visible,
.geo-search input:focus-visible,
.geo-map-viewport:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.geo-map-viewport:focus-visible {
  outline-offset: -2px;
}

/* Floating right stats panel */
.geo-float-stats {
  position: fixed;
  right: 10px;
  top: 82px;
  bottom: 10px;
  width: 172px;
  z-index: 14;
  overflow: hidden;
  padding: 4px;
  scrollbar-width: thin;
  transition: width 220ms var(--ease-out), height 220ms var(--ease-out);
  animation: statsSlideIn 360ms var(--ease-out) both;
}

.app-shell .geo-float-stats {
  right: var(--shell-main-pad-x);
  top: 84px;
  width: var(--geo-stats-width);
}

.geo-panel-toggle-right {
  right: 4px;
}

.geo-float-stats-list {
  display: flex;
  min-height: 0;
  max-height: 100%;
  flex-direction: column;
  gap: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-top: 40px;
  scrollbar-width: thin;
}

.geo-right-collapsed .geo-float-stats {
  bottom: auto;
  height: 46px;
  border: 1px solid rgba(0, 80, 160, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 18px rgba(0, 40, 100, 0.1);
}

.geo-right-collapsed .geo-float-stats-list {
  display: none;
}

@keyframes statsSlideIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

.geo-float-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(0, 80, 160, 0.1);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 2px 12px rgba(0, 40, 100, 0.08), 0 0 1px rgba(0, 80, 160, 0.08) inset;
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.geo-float-stat:hover {
  border-color: rgba(0, 100, 200, 0.2);
  box-shadow: 0 4px 20px rgba(0, 60, 140, 0.12);
  transform: translateY(-1px);
}

.geo-float-stat-icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0, 100, 200, 0.08), rgba(0, 140, 255, 0.04));
  border: 1px solid rgba(0, 100, 200, 0.1);
}

.geo-float-stat-glyph {
  width: 16px;
  height: 16px;
  color: rgba(28, 90, 152, 0.88);
}

.geo-float-stat-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(30, 70, 120, 0.55);
  text-transform: uppercase;
}

.geo-float-stat-value {
  display: block;
  margin-top: 1px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: rgba(15, 50, 90, 0.92);
}

/* Floating category filter bar */
.geo-cat-bar {
  position: fixed;
  top: 82px;
  left: 296px;
  right: 194px;
  z-index: 14;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 80, 160, 0.1);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 2px 12px rgba(0, 40, 100, 0.08);
  animation: catBarSlideIn 300ms var(--ease-out) both;
  overflow-x: auto;
  scrollbar-width: thin;
}

.app-shell .geo-cat-bar {
  top: 84px;
  left: calc(var(--shell-side-offset) + var(--shell-main-pad-x) + var(--geo-panel-width) + var(--geo-floating-gap));
  right: calc(var(--shell-main-pad-x) + var(--geo-stats-width) + var(--geo-floating-gap));
  transition: left 220ms var(--ease-out), right 220ms var(--ease-out), box-shadow 180ms ease;
}

@keyframes catBarSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.geo-cat-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.geo-cat-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(30, 70, 120, 0.55);
  text-transform: uppercase;
  margin-right: 2px;
}

.geo-cat-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 90, 180, 0.15);
  background: rgba(230, 242, 255, 0.6);
  color: rgba(30, 70, 120, 0.85);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 180ms ease;
}

.geo-cat-btn:hover {
  border-color: rgba(0, 110, 220, 0.3);
  background: rgba(210, 232, 255, 0.85);
  color: rgba(15, 55, 100, 0.95);
  box-shadow: 0 2px 8px rgba(0, 80, 180, 0.1);
}

.geo-cat-btn.active {
  background: linear-gradient(135deg, rgba(0, 110, 220, 0.85), rgba(0, 150, 255, 0.75));
  border-color: rgba(0, 120, 220, 0.4);
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(0, 110, 220, 0.3);
  text-shadow: none;
}

@media (max-width: 1220px) {
  .app-shell {
    --geo-panel-width: 236px;
    --geo-floating-gap: 12px;
  }

  .geo-layout {
    display: block;
  }

  .geo-insight-grid {
    grid-template-columns: 1fr;
  }

  .geo-map-head-main {
    grid-template-columns: 1fr;
  }

  .geo-board-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .geo-board-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .geo-map-meta {
    width: 100%;
  }

  .geo-panel {
    position: fixed;
    left: 8px;
    top: 82px;
    width: 236px;
    max-height: calc(100vh - 92px);
    border-bottom: none;
  }

  .app-shell .geo-panel {
    left: calc(var(--shell-side-offset) + 8px);
    top: 84px;
    width: var(--geo-panel-width);
  }

  .geo-panel-scroll {
    height: auto;
    max-height: calc(100vh - 96px);
  }

  .geo-map-stage {
    min-height: 440px;
  }

  .app-shell .geo-cat-bar {
    top: 84px;
    left: calc(var(--shell-side-offset) + 8px + var(--geo-panel-width) + var(--geo-floating-gap));
    right: calc(8px + var(--geo-stats-width) + var(--geo-floating-gap));
  }

  .geo-park-drawer {
    width: min(260px, calc(100vw - 40px));
  }

  .geo-topbar {
    top: 0;
    height: auto;
    padding: 10px 12px;
    flex-wrap: wrap;
  }

  .app-shell .geo-topbar {
    margin: 0;
  }

  .geo-top-left,
  .geo-top-right {
    width: 100%;
    flex-wrap: wrap;
  }

  .geo-search {
    width: 100%;
  }

  .geo-float-stats,
  .app-shell .geo-float-stats {
    position: fixed;
    right: 8px;
    top: auto;
    bottom: 8px;
    width: auto;
    max-width: calc(100% - 280px);
    max-height: none;
  }

  .geo-float-stats-list {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 0 40px;
  }

  .geo-panel-toggle-right {
    left: 4px;
    right: auto;
  }

  .geo-right-collapsed .geo-float-stats,
  .app-shell .geo-right-collapsed .geo-float-stats {
    right: 8px;
    bottom: 8px;
    width: 46px;
    max-width: 46px;
  }

  .geo-float-stat {
    min-width: 140px;
    flex: 0 0 auto;
  }

  .geo-cat-bar,
  .app-shell .geo-cat-bar {
    left: 8px;
    right: 8px;
    top: auto;
    bottom: 120px;
    border-radius: 10px;
  }
}

@media (max-width: 780px) {
  .geo-board-grid,
  .geo-map-overview,
  .geo-insight-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .geo-board-grid {
    grid-template-columns: 1fr;
  }

  .geo-data-board {
    padding: 14px;
  }

  .geo-board-card {
    min-height: 0;
  }

  .geo-tabs {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .geo-tab {
    white-space: nowrap;
  }

  .geo-panel-scroll {
    max-height: 44vh;
  }

  .geo-map-stage {
    min-height: 360px;
  }

  .geo-map-controls {
    right: 8px;
    top: 8px;
  }

  .geo-map-controls button {
    width: 38px;
    height: 38px;
  }

  .geo-zoom-badge {
    right: 8px;
    top: 95px;
  }

  .geo-map-legend {
    max-width: calc(100% - 20px);
    gap: 6px;
    padding: 5px 7px;
  }

  .geo-map-legend span {
    font-size: 10px;
  }

  .geo-float-stats {
    display: none;
  }

  .geo-cat-bar {
    left: 8px;
    right: 8px;
    top: auto;
    bottom: 8px;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 10px;
  }

  .geo-cat-btn {
    padding: 4px 10px;
    font-size: 11px;
  }
}

/* Chain Atlas scene */
.chain-root {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(38, 112, 184, 0.08), rgba(255, 255, 255, 0) 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)),
    var(--paper);
  display: grid;
  grid-template-rows: 48px 1fr;
}

.chain-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  margin: 0 0 20px 0;
  border: none;
  border-radius: 10px;
  background: #2B5485;
  color: #fff;
  box-shadow: 0 1px 4px rgba(43, 84, 133, 0.18);
  box-sizing: border-box;
}

.chain-brand {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.chain-brand.with-icon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.02em;
}

.chain-top-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.chain-search {
  width: min(260px, 28vw);
  min-height: 30px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 10px;
  box-shadow: none;
}

.chain-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  font-size: 13px;
  font-family: var(--font-sans);
}

.chain-search input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.chain-link-btn {
  cursor: pointer;
}

.chain-link-btn:hover {
  color: rgba(255, 255, 255, 0.98);
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

.chain-top-tools .sep,
.chain-map-head .sep {
  color: rgba(188, 225, 246, 0.74);
  font-size: 12px;
}

.chain-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 10px;
  padding: 10px;
  height: calc(100vh - 48px);
  overflow: hidden;
}

.chain-right,
.chain-center {
  border-radius: 22px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(246, 250, 253, 0.96));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: box-shadow 220ms var(--ease-out), border-color 220ms var(--ease-out), transform 220ms var(--ease-out);
}

.chain-center {
  animation: surfaceReveal 420ms var(--ease-out) 50ms both;
}

.chain-right {
  animation: panelRevealRight 420ms var(--ease-out) 90ms both;
}

.chain-center:hover,
.chain-right:hover {
  border-color: rgba(38, 112, 184, 0.14);
  box-shadow: var(--shadow-xl);
}

.chain-right {
  border-left: 1px solid rgba(20, 57, 88, 0.08);
}

/* ── merged selector section inside right panel ── */
.chain-selector {
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(214,232,248,0.35) 0%, rgba(255,255,255,0.92) 100%);
}
.chain-selector h3 {
  margin: 6px 0 6px;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: rgba(61, 92, 113, 0.86);
}
.chain-ind-list {
  max-height: 260px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.panel-title-icon {
  width: 15px;
  height: 15px;
  color: rgba(38, 112, 184, 0.86);
}

.chain-ind-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: left;
  margin-bottom: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 6px 8px;
  cursor: pointer;
  font-size: 12px;
  font-family: var(--font-sans);
  font-weight: 500;
  transition: all 180ms var(--ease-out);
}

.chain-ind-btn:hover {
  background: rgba(38, 112, 184, 0.06);
  border-color: rgba(38, 112, 184, 0.08);
}

.chain-ind-btn .idx {
  color: var(--muted);
  font-size: 12px;
}

.chain-ind-btn.active {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(38, 112, 184, 0.1), rgba(255, 255, 255, 0.92));
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(38, 112, 184, 0.08);
}

/* ── chain: district picker ── */
.chain-district-picker { margin-bottom: 14px; }
.chain-district-picker .chain-district-label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); padding: 6px 0; }
.chain-district-picker label { display: block; font-size: 11px; font-weight: 600; color: rgba(61, 92, 113, 0.86); letter-spacing: 0.5px; margin-bottom: 6px; }
.chain-district-picker select { width: 100%; padding: 7px 10px; border-radius: var(--radius-sm); border: 1px solid var(--stroke); background: var(--card); font-size: 13px; font-family: var(--font-sans); color: var(--ink); outline: none; transition: border-color 180ms; cursor: pointer; }
.chain-district-picker select:focus { border-color: var(--accent); }

/* ── chain: industry output badge ── */
.chain-ind-output { margin-left: auto; font-size: 11px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #4caf50, #388e3c); padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.chain-ind-btn.active .chain-ind-output { background: linear-gradient(135deg, #43a047, #2e7d32); }

/* ── chain: industry icon ── */
.chain-ind-icon { flex: 0 0 auto; font-size: 14px; line-height: 1; }

.chain-center {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  overflow: hidden;
}

.chain-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(20, 57, 88, 0.08);
  padding: 6px 14px;
  background:
    linear-gradient(180deg, rgba(38, 112, 184, 0.05), rgba(255, 255, 255, 0.88));
}

.chain-map-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.chain-map-head .title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.chain-map-head .title.with-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chain-map-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(38, 112, 184, 0.08);
  color: rgba(38, 84, 122, 0.92);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.chain-map-tag.weak {
  background: rgba(222, 126, 71, 0.12);
  color: rgba(153, 74, 35, 0.96);
}

.chain-map-head .sub {
  margin-top: 2px;
  font-size: 11px;
  color: rgba(86, 116, 137, 0.82);
}

.chain-map-head-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.chain-map-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(38, 112, 184, 0.08);
  color: rgba(38, 84, 122, 0.92);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.chain-map-pill.weak {
  background: rgba(222, 126, 71, 0.12);
  color: rgba(153, 74, 35, 0.96);
}

.chain-map-head .ops {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(71, 106, 130, 0.86);
  font-size: 12px;
}

.chain-map-head .op {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(20, 57, 88, 0.08);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  min-width: 30px;
  height: 30px;
  padding: 0 10px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 180ms var(--ease-out);
}

.chain-map-head .op.with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.op-icon {
  width: 13px;
  height: 13px;
}

.chain-map-head .op:hover {
  border-color: var(--accent);
  background: var(--paper);
}

.chain-map-head .op.export {
  padding: 0 12px;
}

.chain-map-head .op.layout-edit.active,
.chain-map-head .op.layout-save.dirty {
  border-color: rgba(38, 112, 184, 0.42);
  background: rgba(38, 112, 184, 0.12);
  color: #245f91;
  font-weight: 800;
}

.chain-map-head .op.layout-reset {
  color: rgba(112, 84, 76, 0.92);
}

.chain-map-head .tip {
  margin-left: 4px;
}

.chain-map-stage {
  position: relative;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
  background:
    linear-gradient(180deg, rgba(248, 251, 254, 0.96), rgba(237, 243, 248, 0.98)),
    repeating-linear-gradient(0deg, rgba(118, 149, 174, 0.05) 0, rgba(118, 149, 174, 0.05) 1px, transparent 1px, transparent 28px),
    repeating-linear-gradient(90deg, rgba(118, 149, 174, 0.05) 0, rgba(118, 149, 174, 0.05) 1px, transparent 1px, transparent 28px);
  transition: background-position 360ms var(--ease-out);
}

.chain-map-stage {
  cursor: grab;
}
.chain-map-stage.chain-pan-dragging {
  cursor: grabbing;
  user-select: none;
}
.chain-map-stage.chain-pan-dragging .chain-graph-canvas {
  transition: none;
}

.chain-graph-canvas {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 400px;
  padding: 3% 4%;
  box-sizing: border-box;
  transform-origin: 50% 50%;
  transition: transform 160ms ease;
}

.chain-edges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chain-edges path {
  fill: none;
  stroke-width: 0.25;
  stroke-linecap: round;
  opacity: 0.85;
}

.chain-edges path.edge-trunk {
  stroke-width: 0.34;
  opacity: 0.88;
}

.chain-edges path.edge-branch {
  stroke-width: 0.22;
  opacity: 0.68;
}

.chain-edges path.edge-leaf {
  stroke-width: 0.12;
  opacity: 0.28;
}

.chain-edges path.dim {
  opacity: 0.12;
}

.chain-edges path.tone-lilac {
  stroke: #7888b8;
}

.chain-edges path.tone-brown {
  stroke: #9888b8;
}

.chain-edges path.tone-yellow {
  stroke: #78c0b4;
}

.chain-edges path.tone-red {
  stroke: #9898c8;
}

.chain-edges path.tone-cyan {
  stroke: #e8b488;
}

.chain-edges path.tone-green {
  stroke: #68b890;
}

.chain-edges path.tone-orange {
  stroke: #e898a8;
}

/* Constrained force layout: organic branch clusters on a quiet graph field. */
.chain-force-mode .chain-map-stage {
  background-color: #f2f7fb;
  background-image:
    linear-gradient(rgba(80, 121, 153, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 121, 153, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
}

.chain-force-mode .chain-map-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(234, 243, 250, 0.12));
}

.chain-graph-canvas.force-layout {
  padding: 3.5%;
}

.chain-force-mode .chain-edges path {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chain-force-mode .chain-edges path.edge-trunk {
  stroke-width: 0.27;
  opacity: 0.78;
}

.chain-force-mode .chain-edges path.edge-branch {
  stroke-width: 0.17;
  opacity: 0.58;
}

.chain-force-mode .chain-node {
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow:
    0 0 0 1px rgba(48, 82, 108, 0.05),
    0 7px 18px rgba(35, 67, 91, 0.15);
}

.chain-force-mode .chain-node.kind-root {
  z-index: 9;
  border-width: 3px;
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 0 0 7px rgba(88, 172, 213, 0.14),
    0 14px 30px rgba(35, 91, 127, 0.24);
}

.chain-force-mode .chain-node.kind-root::before {
  content: "";
  position: absolute;
  inset: -11px;
  border-radius: 50%;
  border: 1px solid rgba(76, 155, 199, 0.22);
  pointer-events: none;
}

.chain-force-mode .chain-node.kind-stage {
  z-index: 7;
  border-width: 2px;
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.7),
    0 9px 20px rgba(35, 67, 91, 0.17);
}

.chain-force-mode .chain-node.kind-main {
  z-index: 5;
}

.chain-node-core-label {
  position: relative;
  z-index: 2;
  width: 88%;
  max-height: 3.15em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: #17344d;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
  word-break: break-all;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.78);
  pointer-events: none;
}

.chain-node.kind-root > .chain-node-core-label {
  width: 82%;
  font-size: 13px;
  line-height: 1.08;
}

.chain-node.kind-stage > .chain-node-core-label {
  -webkit-line-clamp: 2;
}

/* ── Label layer: rendered above all nodes ── */
.chain-label-layer {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

.chain-map-stage.popup-open .chain-label-layer {
  opacity: 0;
}

.chain-label {
  position: absolute;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: 600;
  color: rgba(46, 57, 62, 0.92);
  letter-spacing: 0;
  text-shadow: 0 0 4px #fff, 0 0 4px #fff, 0 0 6px #fff, 0 0 6px #fff;
}
.chain-label.kind-root {
  max-width: 220px;
  font-size: 15px;
  font-weight: 800;
}
.chain-label.kind-stage {
  max-width: 195px;
  font-size: 13px;
  font-weight: 700;
}
.chain-label.kind-main {
  max-width: 175px;
  font-size: 12px;
}
.chain-label.expanded-label,
.chain-label.required-category-label {
  padding: 1px 4px;
  border: 1px solid rgba(91, 129, 160, 0.16);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 6px rgba(49, 78, 101, 0.08);
  text-shadow: none;
}
.chain-label.kind-leaf,
.chain-label.kind-leaf-right {
  max-width: 145px;
  font-size: 10.5px;
  color: rgba(46, 57, 62, 0.8);
}
/* Label direction positioning */
.chain-label.lbl-bottom {
  transform: translate(-50%, 0);
}
.chain-label.lbl-top {
  transform: translate(-50%, -100%);
}
.chain-label.lbl-left {
  transform: translate(-100%, -50%);
}
.chain-label.lbl-right {
  transform: translate(0, -50%);
}
.chain-label.chain-node-target-label {
  padding: 2px 7px;
  border: 1px solid rgba(37, 99, 235, 0.48);
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.98);
  color: #1d4ed8;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
  text-shadow: none;
  z-index: 30;
}
.chain-label.dim {
  opacity: 0.22;
}

.chain-node {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  padding: 2px;
  line-height: 1.15;
  overflow: visible;
  aspect-ratio: 1;
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out), border-color 180ms var(--ease-out);
}

.chain-node.weak-medium {
  border-color: rgba(214, 145, 80, 0.5);
  box-shadow: 0 0 0 1px rgba(220, 165, 96, 0.12), 0 8px 16px rgba(42, 58, 69, 0.12);
}

.chain-node.weak-high {
  border-color: rgba(204, 126, 58, 0.72);
  box-shadow: 0 0 0 2px rgba(224, 160, 104, 0.2), 0 10px 18px rgba(50, 63, 74, 0.16);
}

.chain-node.weak-critical {
  border-color: rgba(193, 84, 84, 0.82);
  box-shadow: 0 0 0 2px rgba(210, 104, 104, 0.24), 0 12px 22px rgba(70, 58, 58, 0.18);
}

.chain-node-flag {
  position: absolute;
  top: -10px;
  right: -10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 16px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #da6f63, #c75454);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 12px rgba(164, 74, 74, 0.24);
}

.chain-node.kind-leaf-right .chain-node-flag {
  right: auto;
  left: -10px;
}

.chain-node:hover,
.chain-node.chain-hover-open {
  transform: translate(-50%, calc(-50% - 2px));
  box-shadow: 0 10px 20px rgba(30, 47, 60, 0.14);
  z-index: 40;
}

/* Match the force-layout kind selectors and rise above labels and toggle buttons. */
.chain-graph-canvas .chain-node:is(:hover, :focus-within, .chain-hover-open) {
  z-index: 90;
}

.chain-root.layout-editing .chain-node.layout-draggable {
  cursor: grab;
  outline: 1px dashed rgba(38, 112, 184, 0.34);
  outline-offset: 3px;
}

.chain-root.layout-editing .chain-node.layout-draggable.dragging {
  cursor: grabbing;
  z-index: 55;
  outline-color: rgba(38, 112, 184, 0.72);
  box-shadow: 0 12px 24px rgba(30, 55, 76, 0.22);
}

.chain-root.layout-editing .chain-edges,
.chain-root.layout-editing .chain-label-layer {
  transition: opacity 120ms ease;
}

.chain-root.layout-editing .chain-map-stage.layout-dragging .chain-edges,
.chain-root.layout-editing .chain-map-stage.layout-dragging .chain-label-layer {
  opacity: 0.35;
}

.chain-node-toggle {
  position: absolute;
  z-index: 68;
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(38, 112, 184, 0.32);
  background: rgba(255, 255, 255, 0.96);
  color: #286a9f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 5px 12px rgba(30, 55, 76, 0.16);
  transform: translate(-15%, -85%);
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.chain-node-toggle.side-left {
  transform: translate(-85%, -85%);
}

.chain-node-toggle.expanded {
  background: rgba(38, 112, 184, 0.92);
  border-color: rgba(38, 112, 184, 0.92);
  color: #fff;
}

.chain-node-toggle:hover,
.chain-node-toggle:focus-visible {
  border-color: rgba(38, 112, 184, 0.72);
  background: #fff;
  color: #174f7e;
  box-shadow: 0 8px 16px rgba(30, 55, 76, 0.2);
}

.chain-node-toggle.expanded:hover,
.chain-node-toggle.expanded:focus-visible {
  background: #1f5d8d;
  color: #fff;
}

/* ── chain node description popup ── */
.chain-node-hover-card {
  opacity: 0;
  visibility: hidden;
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  width: 240px;
  max-width: 280px;
  padding: 12px 14px 11px;
  border-radius: 10px;
  border: 1px solid rgba(93, 123, 146, 0.18);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 34px rgba(22, 37, 49, 0.16);
  white-space: normal;
  text-align: left;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  pointer-events: none;
  z-index: 100;
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}

.chain-node-hover-card::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 12px;
  height: 12px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid rgba(93, 123, 146, 0.18);
  border-left: 1px solid rgba(93, 123, 146, 0.18);
  rotate: 45deg;
}

.chain-node-hover-card.align-left {
  left: auto;
  right: 0;
  transform: translateX(0) translateY(4px);
}

.chain-node-hover-card.align-left::before {
  left: auto;
  right: 18px;
  transform: none;
}

.chain-node-hover-card.align-right {
  left: 0;
  transform: translateX(0) translateY(4px);
}

.chain-node-hover-card.align-right::before {
  left: 18px;
  transform: none;
}

.chain-node-hover-card.rise-up {
  top: auto;
  bottom: calc(100% + 10px);
}

/* Keep a continuous pointer path across the visual gap without changing card spacing. */
.chain-node-hover-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

.chain-node-hover-card.rise-up::after {
  top: auto;
  bottom: -12px;
}

.chain-node-hover-card.rise-up::before {
  top: auto;
  bottom: -7px;
  border-top: none;
  border-left: none;
  border-right: 1px solid rgba(93, 123, 146, 0.18);
  border-bottom: 1px solid rgba(93, 123, 146, 0.18);
}

.chain-node:is(:hover, :focus-within, .chain-hover-open) .chain-node-hover-card {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.chain-node:is(:hover, :focus-within, .chain-hover-open) .chain-node-hover-card.align-left,
.chain-node:is(:hover, :focus-within, .chain-hover-open) .chain-node-hover-card.align-right {
  transform: translateX(0) translateY(0);
}

.chain-node:is(:hover, :focus-within, .chain-hover-open) .chain-node-hover-card.rise-up {
  transform: translateX(-50%) translateY(0);
}

.chain-node:is(:hover, :focus-within, .chain-hover-open) .chain-node-hover-card.align-left.rise-up,
.chain-node:is(:hover, :focus-within, .chain-hover-open) .chain-node-hover-card.align-right.rise-up {
  transform: translateX(0) translateY(0);
}

.chain-node-hover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.chain-node-hover-head strong {
  font-size: 13px;
  font-weight: 700;
  color: #243746;
  line-height: 1.3;
}

.chain-node-hover-head span {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  color: #537086;
  background: rgba(51, 107, 155, 0.08);
  border-radius: 999px;
  padding: 2px 8px;
}

.chain-node-hover-summary {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: #425766;
}

.chain-node-hover-meta {
  display: grid;
  gap: 4px;
  margin-top: 9px;
}

.chain-node-hover-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px;
  overflow-wrap: anywhere;
}

.chain-node-hover-row > span:first-child {
  white-space: nowrap;
}

.chain-node-hover-meta span {
  font-size: 11px;
  color: #6b8090;
  line-height: 1.4;
}

.chain-node-hover-tip {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(101, 130, 150, 0.12);
  font-size: 10px;
  color: #7b8f9e;
  line-height: 1.45;
}

.chain-node-hover-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.chain-node-hover-link {
  pointer-events: auto;
  border: none;
  background: rgba(38, 112, 184, 0.1);
  color: #2f6289;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.chain-node-hover-link:hover {
  background: rgba(38, 112, 184, 0.16);
  color: #214a6a;
  transform: translateY(-1px);
}

.chain-node-hover-link:focus-visible {
  outline: 2px solid rgba(38, 112, 184, 0.28);
  outline-offset: 2px;
}

.chain-node > span {
  display: block;
  position: absolute;
  left: 50%;
  top: calc(100% + 4px);
  transform: translateX(-50%);
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
  max-width: none;
  font-size: 7.5px;
  font-weight: 600;
  color: rgba(46, 57, 62, 0.92);
  letter-spacing: 0.01em;
  pointer-events: none;
  z-index: 100;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 5px #fff, 0 0 5px #fff;
}

/* ── Label direction overrides ── */
.chain-node.lbl-top > span {
  top: auto;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
}
.chain-node.lbl-left > span {
  top: 50%;
  left: auto;
  right: calc(100% + 5px);
  transform: translateY(-50%);
}
.chain-node.lbl-right > span {
  top: 50%;
  left: calc(100% + 5px);
  transform: translateY(-50%);
}
.chain-node.lbl-bottom > span {
  /* default — already positioned below */
}

.chain-node.kind-root > span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.chain-node.kind-stage > span {
  font-size: 9px;
  font-weight: 700;
}

.chain-node.kind-main > span {
  font-size: 8px;
}

.chain-node.kind-leaf-right > span {
  font-size: 7px;
  color: rgba(46, 57, 62, 0.8);
}

.chain-node.kind-leaf > span {
  font-size: 7px;
  color: rgba(46, 57, 62, 0.8);
}

.chain-node.dim {
  opacity: 0.22;
}

.chain-node-detail {
  display: grid;
  gap: 14px;
}

.chain-node-detail-head {
  display: grid;
  gap: 6px;
}

.chain-node-detail-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #6f8799;
  text-transform: uppercase;
}

.chain-node-detail-head h4 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  color: #243746;
}

.chain-node-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.chain-node-detail-meta span {
  font-size: 12px;
  color: #6d8190;
}

.chain-node-detail-brief {
  border-radius: 12px;
  border: 1px solid rgba(88, 120, 146, 0.14);
  background: linear-gradient(135deg, rgba(250, 252, 255, 0.96), rgba(243, 247, 251, 0.98));
  padding: 13px 15px 14px;
}

.chain-node-detail-brief span {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6a8294;
}

.chain-node-detail-brief p {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: #415867;
}

.chain-node-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.chain-node-detail-card {
  border: 1px solid rgba(104, 128, 146, 0.14);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(247, 250, 253, 0.92), rgba(241, 246, 250, 0.96));
  padding: 14px 15px;
}

.chain-node-detail-card.primary {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(38, 112, 184, 0.08), rgba(67, 145, 199, 0.04));
}

.chain-node-detail-card.report {
  background: linear-gradient(135deg, rgba(15, 68, 112, 0.06), rgba(56, 118, 164, 0.03));
}

.chain-node-detail-card h5,
.chain-node-detail-rel h5 {
  margin: 0 0 8px;
  font-size: 13px;
  color: #304554;
}

.chain-node-detail-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #455a69;
}

.chain-node-detail-rel {
  border: 1px solid rgba(104, 128, 146, 0.14);
  border-radius: 12px;
  background: #fbfdff;
  padding: 14px 15px;
}

.chain-node-detail-rel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.chain-node-detail-rel-tools {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.chain-node-detail-rel-head span {
  font-size: 11px;
  font-weight: 700;
  color: #6f8697;
  background: rgba(60, 116, 159, 0.08);
  border-radius: 999px;
  padding: 3px 8px;
}

.chain-node-detail-more {
  flex: 0 0 auto;
}

.chain-node-detail-links {
  display: grid;
  gap: 8px;
}

.chain-node-detail-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: rgba(239, 245, 249, 0.86);
  transition: background 140ms ease, transform 140ms ease;
}

.chain-node-detail-link:hover {
  background: rgba(231, 240, 246, 0.96);
  transform: translateY(-1px);
}

.chain-node-detail-link b {
  font-size: 13px;
  color: #2a3f4e;
}

.chain-node-detail-link span {
  font-size: 11px;
  color: #6c8190;
  white-space: nowrap;
}

.chain-node-detail-empty {
  padding: 12px;
  border-radius: 10px;
  background: rgba(242, 246, 249, 0.92);
  font-size: 12px;
  color: #738795;
  line-height: 1.6;
}

.chain-db-leaf-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.chain-db-leaf-item {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(77, 105, 128, 0.12);
  background: rgba(248, 251, 253, 0.88);
}

a.chain-db-leaf-item {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

a.chain-db-leaf-item:hover {
  border-color: rgba(47, 108, 174, 0.34);
  background: #f3f8fd;
  box-shadow: 0 5px 14px rgba(36, 88, 139, 0.1);
  transform: translateY(-1px);
}

a.chain-db-leaf-item:focus-visible {
  outline: 2px solid #2f6cae;
  outline-offset: 2px;
}

a.chain-db-leaf-item {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

a.chain-db-leaf-item:hover {
  border-color: rgba(47, 108, 174, 0.34);
  background: #f3f8fd;
  box-shadow: 0 5px 14px rgba(36, 88, 139, 0.1);
  transform: translateY(-1px);
}

a.chain-db-leaf-item:focus-visible {
  outline: 2px solid #2f6cae;
  outline-offset: 2px;
}

.chain-db-leaf-item b {
  color: rgba(28, 43, 55, 0.92);
  font-size: 13px;
  line-height: 1.35;
}

.chain-db-leaf-item span,
.chain-db-leaf-item i {
  color: rgba(74, 90, 104, 0.72);
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

.chain-db-leaf-item .chain-db-leaf-path {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.chain-db-leaf-item .chain-db-leaf-score,
.chain-db-leaf-item .chain-db-leaf-action {
  color: #2f6cae;
  font-weight: 700;
}

.chain-db-leaf-item .chain-db-leaf-path {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.chain-db-leaf-item .chain-db-leaf-score {
  color: #2f6cae;
  font-weight: 700;
}

.chain-db-leaf-item .chain-db-leaf-action {
  color: #2f6cae;
  font-weight: 700;
}

.chain-db-leaf-more {
  color: rgba(70, 88, 103, 0.68);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .chain-node-hover-card {
    width: min(240px, calc(100vw - 40px));
    max-width: calc(100vw - 40px);
  }

  .chain-node-detail-grid {
    grid-template-columns: 1fr;
  }

  .chain-node-detail-link {
    display: grid;
    justify-content: stretch;
  }

  .chain-node-detail-link span {
    white-space: normal;
  }
}

/* chain node popup */
.chain-node-popup {
  position: absolute;
  z-index: 100;
  min-width: 240px;
  width: 420px;
  max-width: calc(100% - 24px);
  background: #fff;
  border: 1px solid #d4dbe2;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(30,47,60,0.18);
  font-size: 13px;
  overflow: hidden;
  transition: opacity 150ms ease;
}
.chain-node-popup.hidden { display: none; }
.chain-popup-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: #f5f7fa; font-weight: 700; font-size: 12px;
  color: #3a4a57; border-bottom: 1px solid #e6ecf0;
}
.chain-popup-head-main {
  display: grid;
  gap: 3px;
}
.chain-popup-head-title {
  font-size: 12px;
  font-weight: 700;
  color: #3a4a57;
}
.chain-popup-head-count {
  font-size: 11px;
  font-weight: 600;
  color: #6f8290;
}
.chain-popup-close {
  background: none; border: none; font-size: 16px; cursor: pointer; color: #8a99a6; line-height: 1;
}
.chain-popup-close:hover { color: #3a4a57; }
.chain-popup-empty { padding: 16px; text-align: center; color: #8a99a6; }

.chain-node-metrics {
  padding: 12px 14px;
  border-bottom: 1px solid #e9eef2;
  background: #fff;
}

.chain-node-metrics-head,
.chain-metric-sort-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chain-node-metrics-head h5,
.chain-metric-sort-head h5 {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: #304554;
}

.chain-node-metrics-head > span,
.chain-metric-sort-head > div > span {
  font-size: 10px;
  line-height: 1.35;
  color: #7890a1;
}

.chain-node-metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 9px;
  border-top: 1px solid #eef2f5;
  border-bottom: 1px solid #eef2f5;
}

.chain-node-metric {
  min-width: 0;
  padding: 8px 7px 7px;
  border-right: 1px solid #eef2f5;
}

.chain-node-metric:last-child {
  border-right: 0;
}

.chain-node-metric-label,
.chain-node-metric strong,
.chain-node-metric small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chain-node-metric-label {
  font-size: 9px;
  color: #6e8494;
}

.chain-node-metric strong {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.2;
  color: #225783;
}

.chain-node-metric small {
  margin-top: 4px;
  font-size: 8px;
  color: #8a9aa6;
}

.chain-node-metric.is-missing strong {
  color: #9aa8b3;
}

.chain-metric-sort {
  padding: 11px 14px 12px;
  border-bottom: 1px solid #e9eef2;
  background: #f9fbfd;
}

.chain-metric-sort-head > div {
  display: grid;
  gap: 2px;
}

.chain-metric-direction,
.chain-metric-choice {
  min-height: 27px;
  border: 1px solid #d8e2ea;
  border-radius: 6px;
  background: #fff;
  color: #537086;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.chain-metric-direction {
  flex: 0 0 auto;
  min-width: 58px;
  padding: 0 8px;
}

.chain-metric-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 9px;
}

.chain-metric-choice {
  padding: 0 7px;
}

.chain-metric-choice.active,
.chain-metric-direction:not(:disabled):hover {
  border-color: #3a77ab;
  background: #eaf3fb;
  color: #245f91;
}

.chain-metric-direction:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.chain-node-detail > .chain-node-metrics,
.chain-node-detail > .chain-metric-sort {
  border: 1px solid rgba(104, 128, 146, 0.14);
  border-radius: 8px;
}

.chain-node-detail > .chain-node-metrics .chain-node-metric {
  padding-top: 10px;
  padding-bottom: 10px;
}

.chain-node-detail > .chain-node-metrics .chain-node-metric-label {
  font-size: 11px;
}

.chain-node-detail > .chain-node-metrics .chain-node-metric strong {
  font-size: 16px;
}

.chain-node-detail > .chain-node-metrics .chain-node-metric small {
  font-size: 10px;
}

.chain-popup-list { max-height: 260px; overflow-y: auto; }
.chain-popup-ent {
  display: block; padding: 8px 12px; text-decoration: none; color: inherit;
  border-bottom: 1px solid #f0f2f5; transition: background 120ms;
}
.chain-popup-ent:last-child { border-bottom: none; }
.chain-popup-ent:hover { background: #edf3f8; }
.chain-popup-ent-name { font-weight: 600; font-size: 13px; color: #2e3942; }
.chain-popup-ent-meta { font-size: 11px; color: #7a8a96; margin-top: 2px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.chain-popup-score {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(69, 123, 157, 0.1);
  color: #356486;
  font-size: 10px;
  font-weight: 700;
}
.chain-popup-tag {
  display: inline-block; font-size: 10px; padding: 1px 5px; border-radius: 3px;
  background: #e8f0f6; color: #4a6a80;
}
.chain-popup-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.chain-popup-reason {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f3f7fa;
  color: #5d6d79;
  font-size: 10px;
  line-height: 1;
}

.chain-popup-foot {
  padding: 10px 12px 12px;
  border-top: 1px solid #eef2f5;
  background: #fafcfe;
}

.chain-popup-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  border-radius: 8px;
  border: 0;
  background: rgba(69, 123, 157, 0.08);
  color: #356486;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.chain-popup-more em {
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  opacity: 0.72;
}

.chain-popup-more:hover {
  background: rgba(69, 123, 157, 0.14);
  color: #244f70;
}

@media (max-width: 720px) {
  .chain-node-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chain-node-metric:nth-child(2n) {
    border-right: 0;
  }

  .chain-node-metric:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid #eef2f5;
  }

  .chain-metric-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.chain-node.hit {
  box-shadow: 0 0 0 2px rgba(100, 156, 190, 0.35), 0 8px 16px rgba(28, 48, 64, 0.16);
}

.chain-node.chain-node-target,
.chain-node.hit.chain-node-target {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.24), 0 0 0 8px rgba(59, 130, 246, 0.14), 0 10px 24px rgba(37, 99, 235, 0.28);
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  z-index: 45;
}
.chain-node.tone-peach {
  background: linear-gradient(135deg, #7ec8e8, #5cb8dc);
}

.chain-node.tone-peach > span {
  color: #2c3e50;
}

.chain-node.tone-lilac {
  background: linear-gradient(135deg, #8898c8, #6878a8);
}

.chain-node.tone-lilac > span {
  color: #2c3e50;
}

.chain-node.tone-brown {
  background: linear-gradient(135deg, #a898c4, #8878a8);
}

.chain-node.tone-brown span {
  color: #2c3e50;
}

.chain-node.tone-yellow {
  background: linear-gradient(135deg, #88d0c4, #68b8ac);
}

.chain-node.tone-yellow > span {
  color: #2c3e50;
}

.chain-node.tone-red {
  background: linear-gradient(135deg, #a8a0d0, #8888bc);
}

.chain-node.tone-red > span {
  color: #2c3e50;
}

.chain-node.tone-cyan {
  background: linear-gradient(135deg, #f0c8a0, #e8b488);
}

.chain-node.tone-cyan > span {
  color: #2c3e50;
}

.chain-node.tone-green {
  background: linear-gradient(135deg, #88ccaa, #68b890);
}

.chain-node.tone-green > span {
  color: #2c3e50;
}

.chain-node.tone-orange {
  background: linear-gradient(135deg, #f0b0c0, #e898a8);
}

.chain-node.tone-orange > span {
  color: #2c3e50;
}

.chain-right {
  display: grid;
  grid-template-rows: auto auto auto auto 1fr auto;
  overflow-y: auto;
}

.chain-summary {
  padding: 8px 10px;
  display: grid;
  gap: 6px;
  border-bottom: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(38, 112, 184, 0.05), rgba(255, 255, 255, 0.98));
}

.chain-summary-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.chain-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.chain-summary-kicker {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #5b7e98;
}

.chain-summary h4 {
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
  color: #223847;
}

.chain-summary-note {
  margin: 2px 0 0;
  font-size: 10px;
  line-height: 1.4;
  color: rgba(76, 103, 122, 0.82);
}

.chain-summary-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(219, 132, 76, 0.12);
  color: #9a5a2d;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.chain-summary-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.chain-summary-stats span {
  display: grid;
  gap: 1px;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background: rgba(255, 255, 255, 0.9);
  font-size: 9px;
  color: rgba(81, 104, 120, 0.9);
  text-align: center;
}

.chain-summary-stats b {
  font-size: 14px;
  line-height: 1;
  color: #223847;
}

.chain-summary-weak {
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background: rgba(255, 255, 255, 0.88);
}

.chain-summary-weak[open] {
  background: rgba(255, 255, 255, 0.94);
}

.chain-summary-weak-toggle {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  padding: 2px;
  border-radius: 12px;
  transition: background 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.chain-summary-weak-toggle:hover {
  background: rgba(38, 112, 184, 0.05);
}

.chain-summary-weak-toggle::-webkit-details-marker {
  display: none;
}

.chain-summary-weak.empty p {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(84, 106, 121, 0.9);
}

.chain-summary-weak-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}

.chain-summary-weak-kicker {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(38, 112, 184, 0.08);
  color: #4e7593;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
}

.chain-summary-weak-title {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.chain-summary-weak-title h5 {
  margin: 0;
  font-size: 12px;
  color: #2a4152;
}

.chain-summary-weak-title span {
  font-size: 10px;
  line-height: 1.4;
  color: #72889a;
}

.chain-summary-weak-tools {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chain-summary-weak-count {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 8px;
  margin-right: 6px;
  border-radius: 999px;
  background: rgba(38, 112, 184, 0.06);
  color: #6c8496;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.chain-summary-weak-arrow {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(38, 112, 184, 0.08);
  position: relative;
}

.chain-summary-weak-arrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid #4f7694;
  border-bottom: 2px solid #4f7694;
  transform: translateY(-1px) rotate(45deg);
  transition: transform 160ms var(--ease-out);
}

.chain-summary-weak[open] .chain-summary-weak-arrow::before {
  transform: translateY(1px) rotate(-135deg);
}

.chain-summary-weak-list {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.chain-summary-weak-item {
  display: grid;
  gap: 6px;
  padding: 10px 11px;
  border-radius: 12px;
  background: rgba(245, 249, 252, 0.96);
  border: 1px solid rgba(20, 57, 88, 0.07);
}

.chain-summary-weak-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chain-summary-weak-row strong {
  font-size: 13px;
  line-height: 1.35;
  color: #243b4b;
}

.chain-summary-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.chain-summary-badge.level-critical {
  background: rgba(210, 88, 88, 0.14);
  color: #a44a4a;
}

.chain-summary-badge.level-high {
  background: rgba(214, 137, 78, 0.14);
  color: #a6642d;
}

.chain-summary-badge.level-medium {
  background: rgba(185, 144, 79, 0.12);
  color: #8c6b35;
}

.chain-summary-weak-item p {
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
  color: rgba(70, 91, 106, 0.95);
}

.chain-summary-weak-meta {
  display: grid;
  gap: 4px;
}

.chain-summary-weak-meta span {
  font-size: 11px;
  line-height: 1.55;
  color: rgba(92, 115, 130, 0.92);
}

.chain-brief {
  padding: 10px;
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(38, 112, 184, 0.04), rgba(255, 255, 255, 0.92));
}

.chain-brief-card {
  border-radius: 16px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-2);
  padding: 14px;
}

.chain-brief-card.primary {
  border-color: rgba(38, 112, 184, 0.14);
  background: linear-gradient(180deg, rgba(38, 112, 184, 0.08), rgba(255, 255, 255, 0.98));
}

.chain-brief-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.chain-brief-card h3 {
  margin: 8px 0 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--navy);
}

.chain-brief-card p {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.8;
  color: rgba(41, 66, 83, 0.9);
}

.chain-brief-list {
  margin: 10px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: rgba(36, 59, 78, 0.88);
  font-size: 12px;
  line-height: 1.72;
}

.chain-brief-list.compact {
  gap: 5px;
}

.chain-park-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.chain-park-item {
  border-radius: 12px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background: rgba(247, 250, 253, 0.9);
  padding: 10px 12px;
}

.chain-park-item b {
  display: block;
  font-size: 13px;
  color: var(--navy);
}

.chain-park-item span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}

.chain-park-item em {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.chain-tabs {
  padding: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--stroke);
}

.chain-tab {
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: 500;
  font-family: var(--font-sans);
  letter-spacing: 0.01em;
  transition: all 180ms var(--ease-out);
}

.chain-tab:hover {
  background: var(--paper);
  color: var(--ink);
}

.chain-tab.active {
  border-color: var(--accent);
  background: rgba(38, 112, 184, 0.06);
  color: var(--accent);
  font-weight: 600;
}

.chain-panel {
  overflow: auto;
  padding: 10px;
}

.chain-right-bottom {
  padding: 8px;
  border-top: 1px solid rgba(20, 57, 88, 0.08);
  background: linear-gradient(180deg, rgba(246, 250, 253, 0.92), rgba(255, 255, 255, 0.98));
}

.chain-intro {
  font-size: 13px;
  line-height: 1.8;
  color: rgba(41, 66, 83, 0.94);
}

.chain-intro-tip {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(87, 117, 139, 0.86);
}

.chain-leaders {
  margin-top: 12px;
}

.chain-leaders h5 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(61, 92, 113, 0.86);
}

.chain-leader-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  margin: 0 6px 6px 0;
  border-radius: 999px;
  border: 1px solid rgba(38, 112, 184, 0.14);
  background: rgba(38, 112, 184, 0.06);
  font-size: 12px;
  color: #2f6289;
}

.chain-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chain-chip {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
}

.chain-list {
  display: grid;
  gap: 8px;
}

.chain-list-row {
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: var(--paper);
  padding: 10px 12px;
  transition: all 180ms var(--ease-out);
}

.chain-list-row:hover {
  border-color: var(--accent);
  background: #ffffff;
}

.chain-list-row b {
  display: block;
  font-size: 13px;
  color: rgba(30, 55, 72, 0.96);
}

.chain-list-row span {
  display: block;
  margin-top: 4px;
  color: rgba(78, 111, 133, 0.86);
  font-size: 12px;
}

.chain-list-row i {
  font-style: normal;
  color: rgba(36, 83, 117, 0.9);
}

.chain-leader-list {
  display: grid;
  gap: 8px;
}

.chain-leader-item {
  display: block;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: var(--paper);
  padding: 10px 12px;
  text-decoration: none;
  transition: all 180ms var(--ease-out);
}

.chain-leader-item:hover {
  border-color: var(--accent);
  background: #ffffff;
}

.chain-leader-item b {
  display: block;
  font-size: 13px;
  color: rgba(31, 56, 73, 0.96);
}

.chain-leader-item span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: rgba(79, 112, 134, 0.86);
}

.chain-link-btn:focus-visible,
.chain-ind-btn:focus-visible,
.chain-tab:focus-visible,
.chain-map-head .op:focus-visible,
.chain-search input:focus-visible,
.chain-leader-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 1360px) {
  .chain-layout {
    grid-template-columns: 1fr 260px;
  }

  .chain-search {
    width: min(260px, 28vw);
  }
}

@media (max-width: 1080px) {
  .chain-root {
    grid-template-rows: auto 1fr;
  }

  .chain-topbar {
    flex-wrap: wrap;
  }

  .chain-top-tools {
    width: 100%;
    flex-wrap: wrap;
  }

  .chain-search {
    width: 100%;
  }

  .chain-layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(420px, 1fr) auto;
  }

  .chain-right {
    overflow: auto;
  }

  .chain-right {
    max-height: 520px;
  }
}

/* ════════════════════════════════════════════════════════
   企业精准画像系统 — Portrait Page
   ════════════════════════════════════════════════════════ */

/* ── top bar ── */
.portrait-topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 20px; background: #1d3557; color: #fff; border-radius: 8px 8px 0 0;
}
/* ════════════════════════════════════════════
   企业精准画像系统 — Portrait Page (revised)
   ════════════════════════════════════════════ */

/* ── page wrapper ── */
.portrait-page {
  display: grid;
  gap: 0;
  min-height: calc(100vh - 128px);
  padding-bottom: 6px;
}

.portrait-hero {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid rgba(44, 86, 132, 0.12);
  background: linear-gradient(90deg, #dce6f0, #d2dfee);
}
.portrait-hero::after {
  display: none;
}
.portrait-hero-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 18px;
}
.portrait-hero-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.portrait-hero-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.portrait-hero-title {
  margin: 0;
  font-size: 14px;
  line-height: 1.25;
  color: #1d3e5c;
  font-weight: 700;
  white-space: nowrap;
}
.portrait-hero-summary-item {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #6b8baa;
  white-space: nowrap;
}
.portrait-hero-summary-item.is-total {
  font-size: 12px;
  color: #4a6e8f;
}
.portrait-hero-summary-item b {
  font-size: 17px;
  line-height: 1;
  color: #2670b8;
  font-weight: 700;
}
.portrait-hero-summary-item em {
  font-style: normal;
  font-size: 11px;
  color: #8da5ba;
}
.portrait-hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(38, 112, 184, 0.15);
  color: #2670b8;
  text-decoration: none;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.portrait-hero-link:hover {
  background: rgba(38, 112, 184, 0.06);
  border-color: rgba(38, 112, 184, 0.25);
}
.portrait-hero-link.is-warm {
  color: #c47a2a;
  border-color: rgba(196, 122, 42, 0.18);
}
.portrait-hero-link.is-warm:hover {
  background: rgba(196, 122, 42, 0.06);
  border-color: rgba(196, 122, 42, 0.3);
}
.portrait-hero-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: rgba(245, 248, 252, 0.9);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  transition: color 0.16s ease;
}
.portrait-hero-action:hover {
  color: #fff;
}

.portrait-filter-bar .portrait-search-form {
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 200px;
  flex-shrink: 0;
}
.portrait-filter-bar .portrait-search-input {
  flex: 1;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #cfd9e5;
  border-right: 0;
  border-radius: 5px 0 0 5px;
  background: #fff;
  font-size: 12px;
  color: #20384f;
  outline: none;
}
.portrait-filter-bar .portrait-search-input:focus {
  border-color: #4e84c5;
}
.portrait-filter-bar .portrait-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #f0a133;
  border-radius: 0 5px 5px 0;
  background: linear-gradient(180deg, #f7ad3c, #ee9719);
  color: #fff;
  font-size: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.portrait-filter-bar .portrait-search-btn:hover {
  filter: brightness(1.06);
}
.portrait-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 14px;
  background: #f9fbfd;
  border: 1px solid rgba(204, 217, 232, 0.95);
  border-top: 0;
}
.portrait-active-empty {
  display: none;
}
.portrait-active-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(64, 121, 184, 0.08);
  border: 1px solid rgba(64, 121, 184, 0.14);
  color: #35577d;
  font-size: 12px;
}
.portrait-active-chip b {
  font-size: 11px;
  color: #6287ae;
}
.portrait-active-chip em {
  font-style: normal;
  color: #1f3f63;
}

.portrait-workspace {
  display: flex;
  flex-direction: column;
  min-height: 620px;
  border: 1px solid rgba(204, 217, 232, 0.95);
  border-top: 0;
  border-radius: 0;
  overflow: hidden;
}

.portrait-filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(180deg, #f4f8fc, #edf3fa);
  border: 1px solid rgba(204, 217, 232, 0.95);
  border-top: 0;
  flex-wrap: wrap;
}
.portrait-filter-bar > .portrait-select {
  width: auto;
  min-width: 0;
  max-width: 130px;
  height: 30px;
  padding: 0 6px;
  font-size: 12px;
  flex-shrink: 1;
}

.portrait-filter-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: 0;
  border: 0;
  border-right: 1px solid rgba(204, 217, 232, 0.95);
  background: linear-gradient(180deg, #eef4fb, #e8eff9);
  box-shadow: none;
  overflow: hidden;
  padding-bottom: 10px;
}
.portrait-filter-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(61, 105, 150, 0.08);
  background: rgba(255, 255, 255, 0.4);
}
.portrait-filter-title {
  font-size: 15px;
  line-height: 1;
  font-weight: 700;
  color: #214b78;
}
.portrait-filter-desc {
  font-size: 11px;
  color: #90a1b3;
}
.portrait-filter-group {
  margin: 10px 10px 0;
  padding: 10px 10px 12px;
  border: 1px solid rgba(61, 105, 150, 0.06);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}
.portrait-filter-group:last-child {
  margin-bottom: 0;
}
.portrait-filter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #214b78;
}
.portrait-filter-label::before {
  content: "";
  width: 3px;
  height: 15px;
  border-radius: 999px;
  background: linear-gradient(180deg, #51a7ff, #70c0ff);
}
.portrait-chain-filter-note {
  display: grid;
  gap: 6px;
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(68, 125, 187, 0.08);
  border: 1px solid rgba(68, 125, 187, 0.12);
}
.portrait-chain-filter-note b {
  font-size: 13px;
  color: #20456d;
}
.portrait-chain-filter-note span {
  font-size: 12px;
  line-height: 1.5;
  color: #6e8095;
}
.portrait-chain-filter-clear {
  font-size: 12px;
  color: #3e72a8;
  text-decoration: none;
}
.portrait-chain-filter-clear:hover {
  text-decoration: underline;
}
.portrait-select {
  display: block;
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #d2dcea;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  color: #23435f;
  outline: none;
  cursor: pointer;
}
.portrait-select:focus {
  border-color: #4d82c1;
}
.portrait-select-stack {
  margin-top: 8px;
}
.portrait-filter-shortcut {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(54, 118, 183, 0.12);
  border: 1px solid rgba(54, 118, 183, 0.18);
  color: #295889;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.portrait-filter-shortcut:hover {
  color: #1c4671;
  background: rgba(54, 118, 183, 0.16);
}
.portrait-filter-tip {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: #7b8ea3;
}

.portrait-entlist-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  border-radius: 0;
  border: 0;
  background: #fff;
  box-shadow: none;
  overflow: hidden;
}
.portrait-entlist-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  background: #f4f8fc;
  border-bottom: 1px solid rgba(61, 105, 150, 0.1);
}
.portrait-select-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #7f90a3;
}
.portrait-entlist-col-title {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: #214b78;
}
.portrait-manage-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  background: linear-gradient(180deg, #f7ad3c, #ee9719);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}
.portrait-manage-btn:hover {
  filter: brightness(1.03);
}
.portrait-entlist-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.portrait-enttable {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.portrait-enttable thead th {
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #5a7a96;
  text-align: left;
  background: #f0f5fa;
  border-bottom: 1px solid rgba(77, 130, 193, 0.12);
  white-space: nowrap;
}
.portrait-th-rank { width: 40px; text-align: right; }
.portrait-th-name { }
.portrait-th-industry { width: 90px; }
.portrait-th-kpi { width: 70px; text-align: right; }
.portrait-ent-row td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(77, 130, 193, 0.08);
  background: linear-gradient(90deg, rgba(241, 248, 255, 0.98), rgba(255, 248, 230, 0.72));
  transition: background 0.16s ease;
}
.portrait-enttable tbody tr:nth-child(odd) td {
  background: linear-gradient(90deg, rgba(241, 248, 255, 0.98), rgba(255, 248, 230, 0.72));
}
.portrait-enttable tbody tr:nth-child(even) td {
  background: linear-gradient(90deg, rgba(224, 238, 252, 0.98), rgba(255, 232, 186, 0.88));
}
.portrait-ent-row.is-alt td {
  background: linear-gradient(90deg, rgba(224, 238, 252, 0.98), rgba(255, 232, 186, 0.88));
}
.portrait-ent-row:hover td {
  background: linear-gradient(90deg, rgba(217, 233, 249, 0.98), rgba(255, 225, 173, 0.92));
}
.portrait-ent-rank {
  width: 40px;
  font-size: 12px;
  color: #8b9db0;
  text-align: right;
  white-space: nowrap;
}
.portrait-ent-industry {
  font-size: 12px;
  color: #4a6e8f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.portrait-ent-kpi {
  font-size: 12px;
  font-weight: 600;
  color: #2d5478;
  text-align: right;
  white-space: nowrap;
}
.portrait-ent-name-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.portrait-ent-link {
  font-size: 13px;
  font-weight: 600;
  color: #1f3f63;
  text-decoration: none;
}
.portrait-ent-link:hover {
  color: #467cb2;
  text-decoration: underline;
}
.portrait-ent-badges {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
}
.portrait-ent-chain-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 2px;
  color: #708391;
}
.portrait-ent-chain-score {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(69, 123, 157, 0.08);
  color: #356486;
  font-size: 10px;
  font-weight: 700;
}
.portrait-ent-chain-reason {
  font-size: 11px;
  line-height: 1.45;
}
.portrait-empty-cell {
  padding: 32px 20px;
  color: #7c8da0;
  text-align: center;
  font-size: 13px;
}

.portrait-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  border-top: 1px solid rgba(61, 105, 150, 0.08);
  background: linear-gradient(180deg, #f9fcff, #f2f7fc);
}
.portrait-pagination-meta {
  font-size: 12px;
  color: #73869a;
}
.portrait-pagination-links {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.portrait-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(77, 130, 193, 0.14);
  background: #fff;
  color: #305679;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.portrait-page-link:hover {
  border-color: rgba(77, 130, 193, 0.22);
  background: #f3f8ff;
}
.portrait-page-link.active {
  background: linear-gradient(180deg, #5aa7ff, #3f86df);
  border-color: rgba(63, 134, 223, 0.55);
  color: #fff;
}
.portrait-page-link.disabled {
  color: #a0afbe;
  background: #f6f8fb;
  border-color: rgba(77, 130, 193, 0.08);
}
.portrait-page-link.nav {
  padding: 0 12px;
}
.portrait-page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  color: #88a0b6;
  font-size: 12px;
}

.portrait-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  cursor: default;
  flex-shrink: 0;
}
.portrait-tag-gx { background: #e05f5f; }
.portrait-tag-zj { background: #f08b4b; }
.portrait-tag-pd { background: #2f9a88; }
.portrait-tag-rd { background: #4b76d7; }
.portrait-tag-ds { background: #7664ec; }
.portrait-tag-su { background: #1ba888; }
.portrait-tag-sc { background: #3389d7; }
.portrait-tag-fw { background: #677785; }

.portrait-entlist-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 14px;
  border-top: 1px solid rgba(61, 105, 150, 0.1);
  background: #f8fafe;
  font-size: 12px;
  color: #708292;
}
.portrait-foot-left,
.portrait-foot-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.portrait-foot-count b {
  color: #214b78;
  font-size: 15px;
}
.portrait-foot-clear {
  color: #cf5a5a;
  text-decoration: none;
}
.portrait-foot-clear:hover {
  text-decoration: underline;
}
.portrait-foot-stats {
  color: #4678ad;
}
.portrait-export-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 26px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid #e89b1e;
  background: linear-gradient(180deg, #f7ad3c, #ee9719);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.16s ease;
  font-family: var(--font-sans);
}
.portrait-export-btn:hover {
  filter: brightness(1.06);
}

.portrait-endcap {
  height: 4px;
  background: linear-gradient(180deg, #3e6ea6, #37679c);
  border-top: 1px solid rgba(43, 82, 127, 0.24);
}


/* ── detail page: info strip ── */
.portrait-info-strip { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; line-height: 1.6; align-items: center; }
.portrait-info-strip > div { display: inline-flex; align-items: center; gap: 4px; }

/* ── portrait detail: compact enterprise header card ── */
.portrait-detail-card { overflow: visible; }
.portrait-detail-hd { padding: 12px 20px 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid rgba(30, 60, 90, 0.06); background: linear-gradient(180deg, rgba(247, 250, 253, 0.5), transparent); flex-wrap: wrap; }
.portrait-detail-hd .title { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); display: inline; }
.portrait-detail-hd .meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.portrait-detail-uscc { font-size: 12px; color: var(--muted); margin-left: 12px; font-weight: 400; }
.portrait-detail-meta { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.portrait-detail-bd { padding: 8px 20px 10px; border-bottom: 1px solid rgba(30, 60, 90, 0.06); }
.portrait-detail-hd .btn { padding: 6px 12px; font-size: 12px; }

/* ── portrait detail: score section (merged into same card) ── */
.portrait-detail-score-section { }
.portrait-detail-score-hd { padding: 12px 20px 8px; border-bottom: 1px solid rgba(30, 60, 90, 0.06); background: linear-gradient(180deg, rgba(247, 250, 253, 0.3), transparent); }
.portrait-detail-score-hd .title { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); }
.portrait-detail-score-hd .meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.portrait-detail-score-bd { padding: 16px 20px 20px; }

/* ── detail page: dimension grid ── */
.portrait-dim-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.portrait-dim-card { background: #f8fafb; border-radius: 8px; padding: 14px; border: 1px solid #e8ecf1; }
.portrait-dim-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.portrait-dim-icon { font-size: 18px; }
.portrait-dim-head h4 { margin: 0; font-size: 14px; color: #1d3557; }
.portrait-dim-table { width: 100%; font-size: 12px; }
.portrait-dim-table td { padding: 4px 0; vertical-align: top; }
.portrait-dim-label { color: #6c7a89; width: 120px; }
.portrait-dim-value { color: #1d3557; font-weight: 500; }

/* ── detail page: events + risk ── */
.portrait-event { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f0f2f5; font-size: 13px; }
.portrait-event:last-child { border-bottom: 0; }
.portrait-event-title { flex: 1; color: #1d3557; }
.portrait-event-date { color: #8899aa; font-size: 12px; white-space: nowrap; }
.portrait-risk-list { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.portrait-risk-item { padding: 7px 0; border-bottom: 1px solid #f0f2f5; color: #1d3557; line-height: 1.6; }
.portrait-risk-item:last-child { border-bottom: 0; }

/* ── detail page: score overview layout ── */
.pid-overall-score { font-size: 28px; font-weight: 800; color: #5cc8ff; letter-spacing: -0.02em; text-shadow: 0 0 24px rgba(92, 200, 255, 0.15); }
.pid-overall-label { font-size: 14px; color: #8899aa; margin-left: 2px; }
.pid-score-layout { display: flex; gap: 16px; align-items: center; }
.pid-radar-wrap { flex: 0 0 340px; }
.pid-radar-wrap .portrait-radar { width: 340px; height: 340px; }
.pid-bars-wrap { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.pid-score-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.pid-score-label { width: 80px; white-space: nowrap; color: #3a5068; font-weight: 500; }
.pid-score-track { flex: 1; height: 12px; background: rgba(228, 233, 240, 0.85); border-radius: 6px; overflow: hidden; }
.pid-score-fill { height: 100%; border-radius: 7px; transition: width .5s var(--ease-out); }
.pid-score-fill.high { background: linear-gradient(90deg, #47e0a0, #2bc784); box-shadow: 0 0 8px rgba(43, 199, 132, 0.3); }
.pid-score-fill.mid  { background: linear-gradient(90deg, #5cc8ff, #3aa3e8); box-shadow: 0 0 8px rgba(58, 163, 232, 0.25); }
.pid-score-fill.low  { background: linear-gradient(90deg, #f5a623, #e8832a); box-shadow: 0 0 8px rgba(232, 131, 42, 0.25); }
.pid-score-num { width: 34px; text-align: right; font-weight: 700; color: #1d3557; font-size: 14px; }
.portrait-radar { display: block; margin: 0 auto; }

/* ── detail page: indicator card grid ── */
.pid-dim-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pid-dim-card { background: #fff; border: 1px solid rgba(0,0,0,0.06); border-left: 4px solid transparent; border-radius: 10px; padding: 14px 14px 10px 14px; display: flex; flex-direction: column; transition: box-shadow .25s ease, transform .25s ease; position: relative; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
.pid-dim-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.10); transform: translateY(-3px); }
.pid-dim-card-scale { grid-column: span 1; border: 1px solid rgba(22, 55, 88, 0.08); border-radius: 16px; padding: 15px 15px 12px; background: linear-gradient(180deg, #ffffff 0%, #fdfefe 100%); box-shadow: 0 6px 18px rgba(32, 76, 118, 0.07); }
.pid-dim-card-scale:hover { box-shadow: 0 10px 24px rgba(32, 76, 118, 0.11); transform: translateY(-2px); }
.pid-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.pid-card-head-scale { gap: 10px; margin-bottom: 10px; }
.pid-card-head-bar { width: 7px; height: 24px; border-radius: 999px; background: linear-gradient(180deg, #ff7c72 0%, #e85d4c 100%); box-shadow: 0 3px 8px rgba(232, 93, 76, 0.16); flex-shrink: 0; }
.pid-card-accent { font-size: 24px; }
.pid-card-title { font-size: 16px; font-weight: 700; }
.pid-card-title-scale { font-size: 17px; font-weight: 800; color: #1f3450; letter-spacing: 0.01em; }
.pid-card-body { display: flex; align-items: center; gap: 14px; flex: 1; min-height: 90px; }
.pid-card-body-scale { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px 16px; align-items: center; min-height: 90px; }
.pid-card-illust { flex: 0 0 130px; display: flex; align-items: center; justify-content: center; }
.pid-card-illust svg,
.pid-card-illust img { width: 130px; height: 130px; object-fit: contain; }
.pid-card-illust-scale { flex: 0 0 140px; justify-content: center; align-items: flex-end; }
.pid-card-illust-img-scale { width: 130px; height: auto; filter: drop-shadow(0 8px 12px rgba(57, 128, 212, 0.1)); }
.pid-card-score-area { flex: 1; }
.pid-card-score-area-scale { min-width: 0; padding-left: 4px; }
.pid-card-score { display: flex; align-items: baseline; gap: 4px; margin-bottom: 8px; }
.pid-card-score-scale { gap: 5px; margin-bottom: 8px; }
.pid-card-score-num { font-size: 38px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.pid-card-score-num-scale { font-size: 46px; font-weight: 800; line-height: 0.96; letter-spacing: -0.045em; }
.pid-card-score-unit { font-size: 14px; color: #8899aa; font-weight: 500; }
.pid-card-score-unit-scale { font-size: 12px; color: #939fad; font-weight: 600; }
.pid-card-sub-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pid-card-sub-list-scale { gap: 6px; }
.pid-card-sub-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #556677; }
.pid-card-sub-item-scale { gap: 8px; font-size: 12px; color: #5e6f82; font-weight: 600; }
.pid-card-sub-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.pid-card-sub-item-scale .pid-card-sub-dot { width: 7px; height: 7px; }
.pid-card-foot { display: flex; justify-content: flex-end; margin-top: 10px; padding-top: 8px; }
.pid-card-action-scale { grid-column: 1 / -1; justify-self: end; align-self: end; padding-left: 0; }
.pid-card-detail-btn { display: inline-block; padding: 6px 16px; font-size: 12px; font-weight: 600; color: #fff; background: linear-gradient(135deg, #f5a623, #e8832a); border-radius: 12px; text-decoration: none; transition: opacity .2s ease, transform .15s ease; cursor: pointer; box-shadow: 0 2px 8px rgba(232, 131, 42, 0.25); }
.pid-card-detail-btn:hover { opacity: 0.88; transform: scale(1.04); }
.pid-card-detail-btn-scale { padding: 8px 18px; font-size: 13px; font-weight: 700; border-radius: 999px; background: linear-gradient(135deg, #ffc15a 0%, #f7a33a 58%, #ec8524 100%); box-shadow: 0 8px 14px rgba(236, 133, 36, 0.2); }
.pid-card-detail-btn-scale:hover { opacity: 1; transform: translateY(-1px); box-shadow: 0 14px 22px rgba(236, 133, 36, 0.28); }

/* ── keep old accordion styles for modal reuse ── */
.pid-dim-section { background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(8px); border: 1px solid rgba(30, 60, 90, 0.07); border-radius: var(--radius); margin-bottom: 12px; transition: border-color 200ms ease, box-shadow 200ms ease; }
.pid-dim-section[open] { border-color: rgba(38, 112, 184, 0.16); box-shadow: 0 2px 12px rgba(38, 112, 184, 0.06); }
.pid-dim-summary { display: flex; align-items: center; gap: 10px; padding: 14px 18px; cursor: pointer; list-style: none; user-select: none; transition: background 200ms ease; }
.pid-dim-summary:hover { background: rgba(38, 112, 184, 0.03); }
.pid-dim-summary::-webkit-details-marker { display: none; }
.pid-dim-summary::before { content: "▸"; font-size: 12px; color: #8899aa; transition: transform .2s var(--ease-out); }
.pid-dim-section[open] > .pid-dim-summary::before { transform: rotate(90deg); color: var(--accent); }
.pid-dim-icon { font-size: 20px; }
.pid-dim-name { font-size: 14px; font-weight: 600; color: #1d3557; flex: 1; }
.pid-dim-score-badge { font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 999px; color: #fff; letter-spacing: 0.02em; }
.pid-dim-score-badge.high { background: linear-gradient(135deg, #2bc784, #1fa86b); }
.pid-dim-score-badge.mid  { background: linear-gradient(135deg, #3ab0ef, #2670b8); }
.pid-dim-score-badge.low  { background: linear-gradient(135deg, #f5a623, #d4821a); }
.pid-dim-body { padding: 8px 18px 18px; }

/* ── detail modal: summary & status ── */
.pid-detail-summary { margin-bottom: 16px; padding: 12px 16px; background: #f8fafb; border-radius: 8px; border: 1px solid #e8ecf1; }
.pid-detail-alert { margin-bottom: 8px; }
.pid-detail-alert-hd { font-size: 14px; font-weight: 700; color: #e74c3c; margin-bottom: 6px; }
.pid-detail-alert-list { margin: 0; padding-left: 20px; font-size: 13px; color: #c0392b; line-height: 1.8; }
.pid-detail-ok { font-size: 13px; color: #1fa86b; font-weight: 600; margin-bottom: 4px; }
.pid-detail-good { font-size: 12px; color: #3a5068; margin-top: 6px; }
.pid-ind-status { width: 24px; text-align: center; font-size: 14px; }
.pid-ind-table tr.pid-ind-risk { background: rgba(231, 76, 60, 0.04); }
.pid-ind-table tr.pid-ind-risk:hover { background: rgba(231, 76, 60, 0.08); }

/* ── drill-down detail rows ── */
.pid-drill-toggle { display: inline-block; cursor: pointer; color: #2670b8; font-size: 11px; font-weight: 600; margin-left: 6px; padding: 1px 6px; border-radius: 3px; background: rgba(38,112,184,0.06); transition: background 150ms; }
.pid-drill-toggle:hover { background: rgba(38,112,184,0.14); }
.pid-ind-has-drill { cursor: pointer; }
.pid-drill-row { display: none; }
.pid-drill-row td { padding: 0 !important; }
.pid-drill-detail { padding: 10px 12px 14px 36px; background: #f6f8fb; border-radius: 0 0 6px 6px; }
.pid-drill-title { font-size: 12px; font-weight: 700; color: #3a5068; margin-bottom: 8px; }
.pid-drill-table { width: 100%; font-size: 11px; border-collapse: collapse; border: 1px solid #e8ecf1; border-radius: 6px; overflow: hidden; }
.pid-drill-table thead th { background: #eef2f7; color: #5a6a7a; font-weight: 600; padding: 6px 10px; text-align: left; font-size: 11px; border-bottom: 1px solid #dde3ea; }
.pid-drill-table tbody td { padding: 6px 10px; border-bottom: 1px solid #f0f2f5; color: #3a5068; }
.pid-drill-table tbody tr:last-child td { border-bottom: 0; }
.pid-drill-table tbody tr:hover { background: rgba(38,112,184,0.03); }
.pid-drill-active { color: #e74c3c; font-weight: 600; }

/* ── cross-enterprise risk overview ── */
.pid-risk-overview { margin-top: 20px; padding-top: 16px; border-top: 2px solid #e8ecf1; }
.pid-risk-overview-hd { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.pid-risk-overview-title { font-size: 14px; font-weight: 700; color: #1d3557; }
.pid-risk-overview-stat { display: flex; gap: 8px; }
.pid-ro-badge { font-size: 11px; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.pid-ro-badge.high { background: rgba(231,76,60,0.1); color: #c0392b; }
.pid-ro-badge.mid { background: rgba(243,156,18,0.1); color: #d4821a; }
.pid-risk-overview-table { margin-top: 4px; overflow-x: auto; }
.pid-risk-overview-table .pid-ro-link { color: #2670b8; text-decoration: none; font-weight: 500; }
.pid-risk-overview-table .pid-ro-link:hover { text-decoration: underline; }
.pid-ro-warn { color: #e74c3c; font-weight: 600; }
.pid-ro-ok { color: #8899aa; }
.pid-ro-signals { font-size: 10px; color: #8899aa; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pid-ro-high td { background: rgba(231,76,60,0.03); }
.pid-ro-mid td { background: rgba(243,156,18,0.02); }
.pid-risk-overview-more { font-size: 11px; color: #8899aa; text-align: center; margin-top: 8px; }

.pid-sub-block { margin-bottom: 14px; }
.pid-sub-block:last-child { margin-bottom: 0; }
.pid-sub-title { font-size: 13px; font-weight: 600; color: #3a5068; margin: 0 0 8px; padding: 4px 0 4px 10px; border-left: 3px solid #5cc8ff; background: linear-gradient(90deg, rgba(92, 200, 255, 0.06), transparent); border-radius: 0 4px 4px 0; }
.pid-ind-table { width: 100%; font-size: 12px; border-collapse: collapse; }
.pid-ind-table tr { border-bottom: 1px solid rgba(238, 241, 245, 0.8); transition: background 150ms ease; }
.pid-ind-table tr:hover { background: rgba(38, 112, 184, 0.03); }
.pid-ind-table tr:last-child { border-bottom: 0; }
.pid-ind-table td { padding: 7px 8px; vertical-align: middle; }
.pid-ind-label { color: #6c7a89; width: 170px; white-space: nowrap; }
.pid-ind-value { color: #1d3557; font-weight: 600; width: 140px; }
.pid-ind-extra { color: #8899aa; font-size: 11px; }

/* ── responsive ── */
@media (max-width: 900px) {
  .portrait-hero-main {
    flex-wrap: wrap;
  }
  .portrait-hero-right {
    gap: 10px;
  }
  .portrait-workspace {
    /* single-column on narrow screens */
  }
  .portrait-filter-bar {
    gap: 6px;
  }
  .portrait-dim-grid { grid-template-columns: 1fr; }
  .pid-dim-grid { grid-template-columns: repeat(2, 1fr); }
  .pid-dim-card-scale { grid-column: span 1; }
  .pid-card-body-scale { grid-template-columns: 120px minmax(0, 1fr); gap: 10px; }
  .pid-card-illust-scale { flex-basis: 120px; }
  .pid-card-illust-img-scale { width: 112px; }
  .pid-card-score-num-scale { font-size: 42px; }
  .pid-score-layout { flex-direction: column; }
  .pid-ind-label { width: 120px; }
  .pid-ind-extra { display: none; }
}

@media (max-width: 640px) {
  .portrait-hero-main,
  .portrait-searchbar,
  .portrait-entlist-head,
  .portrait-entlist-foot,
  .portrait-filter-head,
  .portrait-filter-group {
    padding-left: 14px;
    padding-right: 14px;
  }
  .portrait-search-form {
    max-width: none;
  }
  .portrait-hero-summary {
    flex-direction: column;
    align-items: flex-start;
  }
  .portrait-hero-actions-links {
    justify-content: flex-start;
  }
  .portrait-pagination {
    flex-direction: column;
    align-items: flex-start;
  }
  .portrait-entlist-foot {
    flex-direction: column;
    align-items: flex-start;
  }
  .pid-dim-grid { grid-template-columns: 1fr; }
  .pid-dim-card-scale { grid-column: span 1; padding: 16px 14px 14px; border-radius: 16px; }
  .pid-card-body-scale { grid-template-columns: 108px minmax(0, 1fr); gap: 10px; min-height: 0; }
  .pid-card-illust-scale { justify-content: center; }
  .pid-card-illust-img-scale { width: 92px; }
  .pid-card-score-area-scale { text-align: left; }
  .pid-card-score-scale { justify-content: flex-start; }
  .pid-card-sub-list-scale { align-items: flex-start; width: auto; margin: 0; }
  .pid-card-action-scale { justify-self: end; padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ════════════════════════════════════════════════════════
 *  政企政策智能匹配系统
 * ════════════════════════════════════════════════════════ */

/* --- Home / Landing --- */
.pm-home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pm-home-bg {
  width: 100%;
  min-height: 100vh;
  background: linear-gradient(135deg, #eef3f9 0%, #f5f7fb 40%, #e8eef6 100%);
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.pm-home-header {
  position: relative;
  z-index: 2;
}

.pm-home-back-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.pm-home-back-glyph {
  width: 14px;
  height: 14px;
}

.pm-home-logo {
  font-size: 16px;
  font-weight: 600;
  color: #1a2a40;
  letter-spacing: 0.04em;
  flex: 1 1 auto;
  min-width: 0;
}

.pm-home-header .pm-topbar-actions {
  flex: 0 0 auto;
}

.pm-home-hero {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 56px 24px 60px;
  text-align: center;
}

.pm-home-title {
  font-size: 38px;
  font-weight: 700;
  color: #1a2a40;
  margin: 0 0 16px;
  letter-spacing: 2px;
}

.pm-home-title em {
  font-style: normal;
  color: #2878c8;
}

.pm-home-subtitle {
  font-size: 15px;
  color: #5c6b80;
  margin: 0 0 48px;
  max-width: 520px;
  line-height: 1.7;
  text-wrap: pretty;
}

.pm-home-btns {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.pm-home-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 36px 48px;
  border-radius: 16px;
  text-decoration: none;
  transition: transform 0.18s, box-shadow 0.18s;
  min-width: 220px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  position: relative;
}

.pm-home-btn.ent {
  background: linear-gradient(135deg, #1b5e9e 0%, #2980c4 100%);
  box-shadow: 0 8px 32px rgba(30, 115, 200, 0.35);
}

.pm-home-btn.gov {
  background: linear-gradient(135deg, #1a7a5a 0%, #28a878 100%);
  box-shadow: 0 8px 32px rgba(30, 160, 110, 0.35);
}

.pm-home-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(30, 130, 220, 0.45);
}

.pm-home-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  font-size: 32px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 10px 24px rgba(5, 17, 38, 0.12);
}

.pm-home-btn-glyph {
  width: 30px;
  height: 30px;
  color: #fff;
}

.pm-home-btn-label {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.pm-home-btn-desc {
  font-size: 13px;
  color: rgba(200, 230, 255, 0.8);
  max-width: 180px;
  line-height: 1.5;
  text-wrap: pretty;
}

.pm-home-footer {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 20px;
  font-size: 12px;
  color: #8c99ab;
  border-top: 1px solid #e2e6ed;
}

/* --- Topbar --- */
.pm-topbar {
  margin-bottom: 0;
  position: relative;
  z-index: 2;
}

.pm-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.pm-topbar-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.04em;
  flex: 1 1 auto;
  min-width: 0;
}

.pm-page {
  display: grid;
  gap: 20px;
  padding: 20px 0 24px;
  margin: 0;
  background: transparent;
  min-height: calc(100vh - 96px);
}

.pm-home-header > .pm-topbar-actions,
.pm-topbar > .pm-topbar-actions {
  position: relative;
  z-index: 3;
}

.pm-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #ffffff;
  border: 1px solid #e2e6ed;
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.pm-card::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -44px;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(40, 120, 200, 0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.pm-card > * {
  position: relative;
  z-index: 1;
}

.pm-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a2a40;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8ecf2;
  line-height: 1.4;
}

/* --- Form elements --- */
.pm-form-row {
  margin-bottom: 16px;
}
.pm-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
}
.pm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.pm-field > span {
  font-size: 13px;
  color: #3a4a5c;
  letter-spacing: 0.04em;
}
.pm-field-wide {
  max-width: 480px;
}
.pm-field input,
.pm-field select {
  padding: 8px 12px;
  border: 1px solid #d0d6e0;
  border-radius: 6px;
  background: #ffffff;
  color: #1a2a40;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}
.pm-field input:focus,
.pm-field select:focus {
  border-color: #5ca0e0;
}
.pm-field input::placeholder {
  color: #a0aab8;
}
.pm-ent-search-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}
.pm-ent-search-row input {
  flex: 1 1 auto;
  min-width: 0;
}
.pm-ent-search-btn {
  flex: 0 0 auto;
  min-width: 92px;
  justify-content: center;
}
.pm-fieldset {
  border: 1px solid #e2e6ed;
  border-radius: 10px;
  padding: 20px;
  margin: 16px 0;
}
.pm-fieldset legend {
  font-size: 14px;
  font-weight: 600;
  color: #2a3a50;
  padding: 0 8px;
}
.pm-hint {
  font-size: 12px;
  color: #8c99ab;
  margin: 0 0 12px;
}
.pm-radio-group {
  display: flex;
  gap: 16px;
}
.pm-radio {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #3a4a5c;
  cursor: pointer;
  padding: 6px 14px;
  border: 1px solid #d0d6e0;
  border-radius: 6px;
  transition: all 0.15s;
}
.pm-radio.active,
.pm-radio:has(input:checked) {
  background: rgba(40, 120, 200, 0.08);
  border-color: #5ca0e0;
  color: #1a5a9c;
}
.pm-radio input { display: none; }
.pm-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.pm-submit-btn {
  min-width: 140px;
  padding: 10px 28px !important;
  font-size: 14px !important;
}

/* --- Suggest dropdown --- */
.pm-suggest {
  position: relative;
  margin-top: 8px;
  background: #ffffff;
  border: 1px solid #d0d6e0;
  border-radius: 6px;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.pm-suggest-item {
  padding: 8px 12px;
  font-size: 13px;
  color: #1a2a40;
  cursor: pointer;
  transition: background 0.12s;
}
.pm-suggest-item:hover {
  background: #f0f5fb;
}
.pm-selected-ent {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #f5f7fa;
  border-radius: 8px;
  margin-bottom: 16px;
}
.pm-sel-label {
  font-size: 12px;
  color: #5c6b80;
}
.pm-sel-meta {
  font-size: 12px;
  color: #8c99ab;
}

/* --- Result page --- */
.pm-result-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e6ed;
}
.pm-result-head h2 {
  font-size: 18px;
  color: #1a2a40;
  margin: 0;
}
.pm-ent-badge {
  font-size: 13px;
  background: rgba(40, 120, 200, 0.08);
  color: #2878c8;
  padding: 4px 14px;
  border-radius: 14px;
}
.pm-back-btn {
  margin-left: auto;
}
.pm-result-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.pm-manual-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #d0d6e0;
  background: #fff;
  color: #2878c8;
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.pm-manual-btn:hover {
  background: #eef4fb;
  border-color: #5ca0e0;
}
.pm-result-summary {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}
.pm-result-stat {
  flex: 1;
  text-align: center;
  padding: 20px;
  border-radius: 10px;
  background: #f5f7fa;
  border: 1px solid #e2e6ed;
  min-height: 118px;
  display: grid;
  align-content: center;
  gap: 8px;
}
.pm-result-stat.primary {
  background: linear-gradient(135deg, #eef4fb, #e4edf8);
  border-color: #c8d8ec;
}
.pm-stat-value {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: #2878c8;
}
.pm-result-stat.primary .pm-stat-value {
  color: #d48c00;
}
.pm-stat-label {
  display: block;
  font-size: 13px;
  color: #5c6b80;
  margin-top: 0;
  line-height: 1.6;
}

/* --- Charts --- */
.pm-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.pm-chart-section {
  background: #f5f7fa;
  border: 1px solid #e2e6ed;
  border-radius: 10px;
  padding: 16px;
}
.pm-chart-section h3 {
  font-size: 14px;
  color: #1a2a40;
  margin: 0 0 14px;
}
.pm-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pm-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pm-bar-label {
  font-size: 12px;
  color: #3a4a5c;
  min-width: 60px;
  text-align: right;
}
.pm-bar-track {
  flex: 1;
  height: 18px;
  background: #e8ecf2;
  border-radius: 4px;
  overflow: hidden;
}
.pm-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2980c4, #5cc8ff);
  border-radius: 4px;
  transition: width 0.4s ease;
}
.pm-bar-fill.ind {
  background: linear-gradient(90deg, #1a7a5a, #38d89a);
}
.pm-bar-val {
  font-size: 12px;
  color: #3a4a5c;
  min-width: 70px;
}

/* --- Table --- */
.pm-table-wrap {
  overflow-x: auto;
  margin-top: 16px;
  padding: 14px 14px 10px;
  border-radius: 14px;
  border: 1px solid #e2e6ed;
  background: #ffffff;
  box-shadow: none;
}
.pm-table-wrap h3 {
  font-size: 14px;
  color: #1a2a40;
  margin: 0 0 12px;
}
.pm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.pm-table th {
  text-align: left;
  padding: 11px 12px;
  background: #f5f7fa;
  color: #5c6b80;
  border-bottom: 1px solid #e2e6ed;
  font-weight: 600;
  white-space: nowrap;
  font-size: 12px;
}
.pm-table td {
  padding: 11px 12px;
  color: #2a3a50;
  border-bottom: 1px solid #f0f2f5;
  vertical-align: top;
  line-height: 1.65;
}
.pm-table th:nth-child(1),
.pm-table td:nth-child(1) { width: 88px; }
.pm-table th:nth-child(2),
.pm-table td:nth-child(2) { width: 70px; }
.pm-table th:nth-child(5),
.pm-table td:nth-child(5) { width: 84px; }
.pm-table th:nth-child(6),
.pm-table td:nth-child(6) { width: 84px; }
.pm-table th:nth-child(7),
.pm-table td:nth-child(7) { width: 112px; }
.pm-table th:nth-child(10),
.pm-table td:nth-child(10) { width: 92px; }
.pm-table td.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pm-check-cell {
  width: 84px;
  text-align: center !important;
}
.pm-check-cell input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: #38d89a;
  cursor: pointer;
}
.pm-check-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #2a3a50;
  cursor: pointer;
}
.pm-table tr:hover td {
  background: rgba(40, 120, 200, 0.04);
}
.pm-table tr.pm-selected-row td {
  background: rgba(50, 180, 120, 0.1);
}
.pm-policy-link {
  color: #2878c8;
  cursor: pointer;
  text-decoration: none;
}
.pm-policy-link:hover {
  text-decoration: underline;
}
.pm-score {
  display: inline-block;
  background: rgba(40, 120, 200, 0.08);
  color: #2878c8;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}
.pm-contact-cell {
  min-width: 140px;
  line-height: 1.45;
  white-space: nowrap;
}
.pm-copy-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
}
.pm-contact-phone::before,
.pm-contact-email::before {
  display: inline-block;
  font-size: 11px;
  color: #2878c8;
  white-space: nowrap;
  flex-shrink: 0;
}
.pm-contact-phone::before {
  content: "TEL";
}
.pm-contact-email::before {
  content: "MAIL";
}
.pm-copy-link::after {
  content: "复制";
  font-size: 11px;
  color: #5ca0e0;
  opacity: 0;
  transition: opacity 0.16s ease;
}
.pm-copy-link:hover::after {
  opacity: 1;
}
.pm-contact-phone,
.pm-contact-email,
.pm-contact-missing {
  font-size: 12px;
}
.pm-copy-link.is-complete,
.pm-copy-link.is-partial {
  color: #2a3a50;
}
.pm-contact-missing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d44040;
  white-space: nowrap;
}
.pm-contact-missing::before {
  display: inline-block;
  font-size: 11px;
  color: #d44040;
}
.pm-contact-missing.pm-contact-phone::before {
  content: "TEL";
}
.pm-contact-missing.pm-contact-email::before {
  content: "MAIL";
}
.pm-contact-phone {
  color: #2a3a50;
}
.pm-contact-email {
  color: #2a3a50;
  word-break: break-all;
}
.pm-detail-cell {
  white-space: nowrap;
}
.pm-detail-link {
  border-color: #d0d6e0;
  color: #2878c8;
  background: #f5f7fa;
  min-height: 30px;
  border-radius: 8px;
}
.pm-detail-link:hover {
  background: #e8f0fb;
}
.btn.tiny {
  min-height: 28px;
  padding: 4px 12px;
  font-size: 11px;
  border-radius: 8px;
}
.pm-footer-info {
  text-align: center;
  font-size: 12px;
  color: #8c99ab;
  padding: 20px;
}

/* --- Gov page: dashboard --- */
.pm-policy-form-grid {
  margin-top: 14px;
}
.pm-policy-filter-meta {
  margin-top: 12px;
  font-size: 12px;
  color: #3a4a5c;
}
.pm-policy-filter-meta b {
  color: #d48c00;
  font-size: 14px;
}
.pm-gov-dashboard {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}
.pm-gov-stat {
  flex: 1;
  text-align: center;
  padding: 20px;
  border-radius: 10px;
  background: #f5f7fa;
  border: 1px solid #e2e6ed;
  min-height: 118px;
  display: grid;
  align-content: center;
  gap: 8px;
}
.pm-gov-stat.accent {
  background: linear-gradient(135deg, #eef8f4, #e4f3ec);
  border-color: #c0e0d0;
}
.pm-gov-stat .pm-stat-value {
  font-size: 36px;
  color: #1a8a5a;
}
.pm-gov-stat.accent .pm-stat-value {
  color: #d48c00;
}

/* Mini charts */
.pm-mini-chart {
  background: #f5f7fa;
  border: 1px solid #e2e6ed;
  border-radius: 10px;
  padding: 14px;
}
.pm-mini-chart h4 {
  font-size: 13px;
  color: #1a2a40;
  margin: 0 0 10px;
  font-weight: 600;
}
.pm-mini-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 12px;
  color: #3a4a5c;
}
.pm-mini-row > span:first-child {
  min-width: 56px;
  text-align: right;
}
.pm-mini-bar {
  flex: 1;
  height: 14px;
  background: #e8ecf2;
  border-radius: 3px;
  overflow: hidden;
}
.pm-mini-fill {
  height: 100%;
  background: linear-gradient(90deg, #2980c4, #5cc8ff);
  border-radius: 3px;
  transition: width 0.3s;
}
.pm-mini-fill.scale {
  background: linear-gradient(90deg, #c87a28, #ffc040);
}

/* Policy info */
.pm-policy-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pm-info-row {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 6px 0;
}
.pm-info-label {
  font-size: 12px;
  color: #8c99ab;
  min-width: 70px;
}
.pm-info-value {
  font-size: 13px;
  color: #1a2a40;
  font-weight: 500;
}
.pm-portrait-link {
  text-align: center;
  margin-top: 12px;
}
.pm-portrait-link a {
  color: #2878c8;
  font-size: 13px;
  text-decoration: none;
}
.pm-portrait-link a:hover {
  text-decoration: underline;
}

/* Filter bar */
.pm-filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: #f5f7fa;
  border-radius: 14px;
  border: 1px solid #e2e6ed;
}
.pm-filter-bar label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #5c6b80;
  font-weight: 600;
}
.pm-filter-bar select {
  height: 38px;
  min-width: 146px;
  padding: 0 12px;
  border: 1px solid #d0d6e0;
  border-radius: 10px;
  background: #ffffff;
  color: #1a2a40;
  font-size: 12px;
  outline: none;
}
.pm-filter-bar select:focus,
.kp-filter-bar select:focus,
.decision-toolbar select:focus,
.kp-search-form input:focus,
.decision-search-form input:focus,
.decision-range-form input:focus {
  border-color: rgba(82, 152, 220, 0.34);
  box-shadow: 0 0 0 3px rgba(82, 152, 220, 0.12);
}
.pm-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.pm-filter-pick-count {
  font-size: 12px;
  color: #3a4a5c;
}
.pm-selected-preview {
  margin: 10px 0 16px;
  padding: 12px 14px;
  border: 1px solid #e2e6ed;
  border-radius: 10px;
  background: #f5f7fa;
}
.pm-selected-preview-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: #1a2a40;
  font-size: 13px;
}
.pm-selected-preview-head b {
  color: #d48c00;
}
.pm-selected-preview-head .btn.tiny {
  margin-left: auto;
}
.pm-selected-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pm-selected-pill,
.pm-selected-more {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e8f0fb;
  border: 1px solid #c8d8ec;
  color: #2a3a50;
  font-size: 12px;
}
.pm-selected-more {
  color: #d48c00;
}
.pm-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.pm-pagination .btn.small {
  min-width: 36px;
  border-radius: 10px;
  border-color: #d0d6e0;
  background: #ffffff;
}
.pm-pagination .btn.small:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}
.pm-pagination .btn.small.active {
  border-color: #5ca0e0;
  background: #e8f0fb;
  color: #1a5a9c;
}
.pm-page-ellipsis {
  color: #8c99ab;
  font-size: 12px;
}
.btn.small {
  padding: 6px 14px;
  font-size: 12px;
}

/* Policy selector */
.pm-policy-selector {
  margin-top: 4px;
  margin-bottom: 14px;
  padding: 12px 16px;
}
.pm-policy-selector .pm-card-title {
  font-size: 13px;
  margin: 0 0 6px;
  padding-bottom: 6px;
}
.pm-policy-selector .pm-hint {
  margin: 0 0 6px;
  font-size: 11px;
}
.pm-policy-selector .pm-policy-form-grid {
  grid-template-columns: repeat(5, 1fr);
  gap: 8px 12px;
}
.pm-policy-selector .pm-field > span {
  font-size: 12px;
}
.pm-policy-selector .pm-field select {
  padding: 5px 10px;
  font-size: 12px;
}
.pm-policy-selector .pm-field-wide {
  grid-column: span 2;
  max-width: none;
}
.pm-policy-selector .pm-policy-filter-meta {
  margin-top: 6px;
  font-size: 11px;
}

.small {
  font-size: 11px;
}

/* Key project subsystem */
.kp-page,
.kp-directory-page,
.kp-detail-page,
.decision-page {
  display: grid;
  gap: 18px;
  align-content: start;
}

.kp-topline,
.decision-topline {
  display: none;
}

.kp-topline.sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  padding: 0 16px;
  height: 38px;
  min-height: 38px;
  border-radius: 8px;
  background: #33669E;
  color: #fff;
  box-shadow: 0 1px 4px rgba(43, 84, 133, 0.12);
  margin-bottom: 14px;
}

.kp-topline-main,
.decision-topline-main {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.kp-topline-main > .ui-icon,
.decision-topline-main > .ui-icon,
.pm-topbar > .ui-icon,
.pm-home-header > .ui-icon {
  color: #d4edff;
}

.kp-topline-main > span,
.decision-topline-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.03em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kp-topline-actions,
.decision-mode-switch,
.decision-topline-extra {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}

.kp-back-link,
.decision-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  box-shadow: none;
  transition: background 0.18s ease, border-color 0.18s ease;
  text-decoration: none;
}

.kp-back-link:hover,
.decision-back-link:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow: none;
}

.decision-mode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.decision-mode-btn.active,
.decision-mode-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.decision-mode-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 8px;
  background: #33669E;
  margin-bottom: 12px;
}

.geo-top-right .geo-link,
.geo-link.as-btn,
.chain-link-btn,
.pm-back,
.pm-home-back,
.pm-topbar-ai,
.pm-topbar-note,
.portal-topbar-exit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 500;
  box-shadow: none;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
  white-space: nowrap;
}

.geo-link.as-btn {
  cursor: pointer;
}

.geo-top-right .geo-link:hover,
.geo-link.as-btn:hover,
.chain-link-btn:hover,
.pm-back:hover,
.pm-home-back:hover,
.portal-topbar-exit:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.30);
  color: #fff;
}

.pm-topbar-ai,
.pm-topbar-note {
  font-size: 12px;
}

.pm-topbar-note {
  color: rgba(255, 240, 210, 0.9);
}

.kp-main-map-card .kp-filter-bar {
  padding: 0 0 10px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  border-bottom: 1px solid rgba(20, 57, 88, 0.06);
  margin-bottom: 10px;
}

.kp-filter-bar,
.decision-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(20, 57, 88, 0.07);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-2);
}

.kp-filter-group,
.decision-toolbar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.decision-range-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.decision-range-form label,
.decision-range-form span {
  font-size: 13px;
  color: rgba(22, 57, 84, 0.72);
  font-weight: 600;
}

.kp-filter-group span,
.decision-toolbar-row label {
  font-size: 13px;
  color: rgba(22, 57, 84, 0.72);
  font-weight: 600;
}

.kp-filter-bar select,
.decision-toolbar select,
.kp-search-form input,
.decision-search-form input {
  height: 32px;
  min-width: 100px;
  border-radius: 8px;
  border: 1px solid rgba(20, 57, 88, 0.1);
  background: rgba(255, 255, 255, 0.94);
  padding: 0 10px;
  font-size: 12px;
  color: var(--ink);
}

.kp-search-form input,
.decision-search-form input {
  min-width: 180px;
}

.decision-range-form input {
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(20, 57, 88, 0.1);
  background: rgba(255, 255, 255, 0.94);
  padding: 0 12px;
  font-size: 13px;
  color: var(--ink);
}

.kp-search-form,
.decision-search-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.kp-search-form .btn,
.decision-search-form .btn,
.decision-range-form .btn,
.pm-filter-actions .btn,
.pm-selected-preview-head .btn.tiny {
  min-height: 38px;
  border-radius: 10px;
}

.kp-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 2.35fr) minmax(380px, 1fr);
  grid-template-areas:
    "main track"
    "table table";
  gap: 14px;
  align-items: stretch;
}

.kp-dashboard > .kp-main-stage { grid-area: main; }
.kp-dashboard > .kp-track-card { grid-area: track; }
.kp-dashboard > .kp-table-full { grid-area: table; }

.kp-overview-band {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 14px;
}

.kp-side-card,
.kp-main-map-card,
.kp-bottom-card,
.kp-right-card,
.kp-directory-card,
.kp-detail-card,
.decision-panel,
.decision-stat-panel,
.decision-note-strip {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 18px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.kp-side-card::after,
.kp-main-map-card::after,
.kp-bottom-card::after,
.kp-right-card::after,
.kp-directory-card::after,
.kp-detail-card::after,
.decision-panel::after,
.decision-stat-panel::after,
.decision-note-strip::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -38px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(38, 112, 184, 0.15) 0%, rgba(92, 200, 255, 0.06) 38%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.kp-side-card > *,
.kp-main-map-card > *,
.kp-bottom-card > *,
.kp-right-card > *,
.kp-directory-card > *,
.kp-detail-card > *,
.decision-panel > *,
.decision-stat-panel > *,
.decision-note-strip > * {
  position: relative;
  z-index: 1;
}

.kp-side-card,
.kp-right-card,
.decision-panel,
.decision-stat-panel,
.decision-note-strip,
.kp-detail-card,
.kp-directory-card {
  padding: 12px 14px;
}

.kp-overview-band > .kp-side-card,
.kp-side-metrics > .kp-side-card {
  display: flex;
  flex-direction: column;
}

.kp-right-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.kp-side-card h3,
.kp-card-head h3,
.decision-panel-head h3,
.decision-stat-head h3 {
  margin: 0;
  font-size: 14px;
  color: var(--navy);
  line-height: 1.38;
  text-wrap: balance;
}

.kp-page .kp-side-card h3,
.kp-page .kp-card-head h3 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-wrap: normal;
}

.decision-panel-head,
.decision-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}

.kp-metric-stack {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.kp-metric-btn {
  display: grid;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(38, 112, 184, 0.12);
  background: linear-gradient(180deg, rgba(248, 252, 255, 0.98), rgba(241, 247, 253, 0.96));
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  min-height: 44px;
  align-content: start;
}

.kp-metric-btn.warning {
  border-color: rgba(197, 48, 48, 0.18);
  background: linear-gradient(180deg, rgba(255, 247, 247, 0.98), rgba(255, 240, 240, 0.96));
}

.kp-metric-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(38, 112, 184, 0.2);
  box-shadow: 0 12px 26px rgba(38, 112, 184, 0.08);
}

.kp-metric-btn.warning:hover {
  border-color: rgba(197, 48, 48, 0.24);
  box-shadow: 0 12px 26px rgba(197, 48, 48, 0.08);
}

.kp-metric-btn b {
  font-size: 20px;
  color: var(--navy);
  font-family: var(--font-mono);
}

.kp-metric-btn span,
.kp-mini-metric label,
.kp-map-stage-caption,
.kp-updated-at,
.kp-detail-footer-note {
  color: rgba(22, 57, 84, 0.7);
  font-size: 12px;
  line-height: 1.7;
  white-space: nowrap;
}

.kp-detail-footer-note {
  text-wrap: pretty;
}

.kp-metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.kp-metric-row-compact {
  grid-template-columns: 1fr;
}

.kp-mini-metric {
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(241, 246, 251, 0.9);
  border: 1px solid rgba(20, 57, 88, 0.06);
  display: grid;
  gap: 2px;
  min-height: 40px;
  align-content: start;
}

.kp-mini-metric strong {
  font-size: 16px;
  color: var(--navy);
  font-family: var(--font-mono);
}

.kp-stage-summary {
  margin-top: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(20, 57, 88, 0.07);
  background: linear-gradient(180deg, rgba(246, 252, 255, 0.98), rgba(238, 247, 253, 0.96));
  display: grid;
  gap: 4px;
}

.kp-stage-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: rgba(22, 57, 84, 0.72);
}

.kp-stage-summary-head b {
  color: var(--accent-strong);
  font-size: 12px;
}

.kp-main-stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
}

.kp-main-map-card {
  padding: 16px;
}

.kp-map-stage {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 18%, rgba(38, 112, 184, 0.12), transparent 28%),
    radial-gradient(circle at 82% 20%, rgba(27, 120, 159, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(234, 241, 248, 0.92), rgba(242, 247, 252, 0.98));
  border: 1px solid rgba(20, 57, 88, 0.08);
}

.kp-map-geo-base,
.kp-map-markers,
.kp-map-badges,
.kp-map-focus-card,
.kp-map-legend,
.kp-map-stage-caption {
  position: absolute;
}

.kp-map-stage-grid,
.kp-map-stage-mask,
.kp-map-road-labels {
  position: absolute;
  inset: 0;
}

.kp-map-stage-grid {
  background:
    linear-gradient(rgba(38, 112, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 112, 184, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
}

.kp-map-stage-mask {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.26), transparent 26%),
    radial-gradient(circle at 50% 50%, rgba(38, 112, 184, 0.04), transparent 58%);
}

.kp-map-geo-base,
.kp-map-markers {
  inset: 0;
}

.kp-map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.kp-map-road-label-layer {
  pointer-events: none;
}

.kp-map-road-label rect {
  fill: rgba(255, 255, 255, 0.78);
  stroke: rgba(47, 96, 138, 0.08);
  stroke-width: 0.02;
  vector-effect: non-scaling-stroke;
}

.kp-map-road-label text {
  fill: rgba(39, 76, 111, 0.78);
  font-size: 0.12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-anchor: middle;
  dominant-baseline: middle;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 0.035;
  vector-effect: non-scaling-stroke;
}

.kp-map-road-label.road-major text {
  fill: rgba(31, 73, 121, 0.86);
}

.kp-map-road-label.road-primary text {
  fill: rgba(52, 87, 122, 0.82);
}

.kp-map-basemap .kp-map-water,
.kp-map-basemap .kp-map-road {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.kp-map-basemap .kp-map-water {
  stroke: rgba(88, 164, 208, 0.6);
  stroke-width: 0.22;
}

.kp-map-basemap .kp-map-water.type-0 {
  stroke-width: 0.34;
  stroke: rgba(71, 150, 198, 0.7);
}

.kp-map-basemap .kp-map-water.type-1 {
  stroke-width: 0.26;
}

.kp-map-basemap .kp-map-water.type-2 {
  stroke-width: 0.2;
  stroke: rgba(100, 172, 214, 0.52);
}

.kp-map-basemap .kp-map-road {
  stroke: rgba(131, 151, 170, 0.38);
}

.kp-map-basemap .kp-map-road.minor {
  stroke-width: 0.1;
}

.kp-map-basemap .kp-map-road.primary {
  stroke-width: 0.16;
  stroke: rgba(108, 129, 149, 0.5);
}

.kp-map-basemap .kp-map-road.major {
  stroke-width: 0.22;
  stroke: rgba(89, 111, 136, 0.62);
}

.kp-map-city polygon {
  fill: rgba(64, 130, 194, 0.1);
  stroke: rgba(29, 92, 157, 0.42);
  stroke-width: 0.22;
  vector-effect: non-scaling-stroke;
}

.kp-map-district-mask path {
  fill: rgba(247, 250, 253, 0.46);
}

.kp-map-boundary polygon {
  fill: none;
  stroke: rgba(29, 97, 171, 0.88);
  stroke-width: 0.52;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 10px rgba(39, 110, 180, 0.28));
}

.kp-map-district polygon {
  fill: rgba(69, 128, 187, 0.07);
  stroke: rgba(49, 102, 156, 0.15);
  stroke-width: 0.12;
  vector-effect: non-scaling-stroke;
}

.kp-map-district.subdued polygon {
  fill: rgba(69, 128, 187, 0.025);
  stroke: rgba(49, 102, 156, 0.08);
}

.kp-map-district.focus polygon {
  fill: rgba(61, 127, 195, 0.11);
  stroke: rgba(44, 109, 176, 0.18);
}

.kp-map-district.active polygon {
  fill: rgba(61, 127, 195, 0.16);
  stroke: rgba(41, 108, 177, 0.42);
  stroke-width: 0.24;
  filter: drop-shadow(0 0 8px rgba(41, 108, 177, 0.16));
}

.kp-map-street polygon,
.kp-map-park polygon {
  vector-effect: non-scaling-stroke;
}

.kp-map-street polygon {
  fill: rgba(30, 134, 193, 0.06);
  stroke: rgba(21, 104, 164, 0.3);
  stroke-width: 0.2;
}

.kp-map-street.subdued polygon {
  fill: rgba(30, 134, 193, 0.03);
  stroke: rgba(21, 104, 164, 0.14);
  stroke-width: 0.16;
}

.kp-map-street.active polygon {
  fill: rgba(30, 134, 193, 0.14);
  stroke: rgba(17, 96, 152, 0.58);
  stroke-width: 0.28;
}

.kp-map-park polygon {
  fill: rgba(47, 153, 123, 0.11);
  stroke: rgba(40, 129, 103, 0.38);
  stroke-width: 0.22;
}

.kp-map-park.subdued polygon {
  fill: rgba(47, 153, 123, 0.05);
  stroke: rgba(40, 129, 103, 0.18);
  stroke-width: 0.16;
}

.kp-map-park.active polygon {
  fill: rgba(47, 153, 123, 0.18);
  stroke: rgba(34, 116, 92, 0.64);
  stroke-width: 0.32;
  filter: drop-shadow(0 0 8px rgba(34, 116, 92, 0.16));
}

.kp-map-street text,
.kp-map-park text {
  fill: rgba(28, 77, 111, 0.9);
  font-size: 2px;
  font-weight: 700;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 0.75;
  vector-effect: non-scaling-stroke;
}

.kp-map-street.subdued text,
.kp-map-park.subdued text {
  fill: rgba(28, 77, 111, 0.45);
  font-weight: 500;
}

.kp-map-badges {
  top: 14px;
  left: 14px;
  right: 160px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kp-map-badges span,
.kp-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(33, 82, 126, 0.08);
  color: rgba(35, 72, 104, 0.9);
  font-size: 11px;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(15, 41, 66, 0.08);
  backdrop-filter: blur(8px);
}

.kp-map-badges b {
  color: var(--navy);
  font-family: var(--font-mono);
}

.kp-map-focus-card {
  top: 16px;
  right: 16px;
  z-index: 3;
  width: 200px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(33, 82, 126, 0.1);
  box-shadow: 0 10px 24px rgba(15, 41, 66, 0.1);
  backdrop-filter: blur(10px);
}

.kp-map-focus-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kp-map-focus-kicker {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(32, 106, 179, 0.08);
  color: rgba(25, 87, 144, 0.86);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kp-map-focus-close,
.kp-map-focus-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(33, 82, 126, 0.1);
  background: rgba(255, 255, 255, 0.9);
  color: rgba(39, 76, 111, 0.82);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(15, 41, 66, 0.08);
  backdrop-filter: blur(8px);
}

.kp-map-focus-close:hover,
.kp-map-focus-close:focus-visible,
.kp-map-focus-toggle:hover,
.kp-map-focus-toggle:focus-visible {
  color: var(--navy);
  border-color: rgba(38, 112, 184, 0.16);
}

.kp-map-focus-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
}

.kp-map-focus-card strong {
  display: block;
  margin-top: 10px;
  color: var(--navy);
  font-size: 15px;
  line-height: 1.35;
}

.kp-map-focus-card p {
  margin: 6px 0 0;
  color: rgba(51, 82, 110, 0.82);
  font-size: 12px;
  line-height: 1.45;
}

.kp-map-marker {
  position: absolute;
  transform: translate(-50%, -100%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 4;
  text-decoration: none;
}

.kp-map-marker.active {
  z-index: 5;
}

.kp-map-pin {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 18px 18px 18px 4px;
  transform: rotate(-45deg);
  background: linear-gradient(135deg, #2f80c9, #1b5a9e);
  box-shadow: 0 7px 18px rgba(15, 41, 66, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.9);
}

.kp-map-marker.warning-mid .kp-map-pin {
  background: linear-gradient(135deg, #f1a842, #d97f1e);
}

.kp-map-marker.warning-high .kp-map-pin {
  background: linear-gradient(135deg, #ea6a5f, #bf3e37);
}

.kp-map-pin-core {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
}

.kp-map-marker.active .kp-map-pin {
  transform: rotate(-45deg) scale(1.12);
  box-shadow: 0 12px 24px rgba(15, 41, 66, 0.22);
}

.kp-map-marker-label {
  max-width: 170px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(38, 112, 184, 0.14);
  box-shadow: 0 6px 18px rgba(15, 41, 66, 0.1);
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kp-map-marker.compact .kp-map-marker-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 8px;
  border-radius: 10px;
  background: rgba(24, 45, 70, 0.88);
  color: rgba(255, 255, 255, 0.94);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.kp-map-marker.compact:hover .kp-map-marker-tooltip,
.kp-map-marker.compact:focus-visible .kp-map-marker-tooltip {
  opacity: 1;
}

.kp-map-markers-svg {
  pointer-events: auto;
}

.kp-map-marker-link {
  pointer-events: auto;
  cursor: pointer;
  text-decoration: none;
  --kp-pin: #3b83d0;
  --kp-pin-dark: #225da5;
  --kp-pin-halo: rgba(59, 131, 208, 0.12);
  --kp-bubble-stroke: rgba(33, 102, 166, 0.14);
}

.kp-map-marker-link.warning-mid {
  --kp-pin: #db9a42;
  --kp-pin-dark: #b67622;
  --kp-pin-halo: rgba(219, 154, 66, 0.14);
  --kp-bubble-stroke: rgba(190, 126, 40, 0.16);
}

.kp-map-marker-link.warning-high {
  --kp-pin: #d66a5f;
  --kp-pin-dark: #ad463d;
  --kp-pin-halo: rgba(214, 106, 95, 0.15);
  --kp-bubble-stroke: rgba(190, 78, 66, 0.18);
}

.kp-map-marker-hit {
  fill: transparent;
}

.kp-map-marker-bubble-wrap {
  filter: drop-shadow(0 0.04px 0.12px rgba(15, 41, 66, 0.12));
  transition: opacity 140ms ease;
}

.kp-map-marker-bubble-wrap.quiet {
  filter: none;
}

.kp-map-marker-bubble-wrap.hover-only {
  opacity: 0;
}

.kp-map-marker-link:hover .kp-map-marker-bubble-wrap.hover-only,
.kp-map-marker-link:focus-visible .kp-map-marker-bubble-wrap.hover-only {
  opacity: 1;
}

.kp-map-marker-beacon {
  fill: var(--kp-pin-halo);
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 0.016;
  vector-effect: non-scaling-stroke;
}

.kp-map-marker-halo {
  fill: rgba(255, 255, 255, 0.4);
}

.kp-map-marker-pin {
  fill: var(--kp-pin);
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 0.026;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0.03px 0.1px rgba(15, 41, 66, 0.14));
}

.kp-map-marker-link.warning-mid .kp-map-marker-pin {
  fill: var(--kp-pin);
}

.kp-map-marker-pin-core {
  fill: rgba(255, 255, 255, 0.98);
}

.kp-map-marker-glyph {
  fill: var(--kp-pin-dark);
  opacity: 0.9;
}

.kp-map-marker-bubble {
  fill: rgba(255, 255, 255, 0.94);
  stroke: var(--kp-bubble-stroke);
  stroke-width: 0.02;
  vector-effect: non-scaling-stroke;
}

.kp-map-marker-bubble-wrap.quiet .kp-map-marker-bubble {
  fill: rgba(248, 250, 253, 0.8);
  stroke: rgba(42, 95, 146, 0.08);
  stroke-width: 0.016;
}

.kp-map-marker-text {
  fill: rgba(18, 52, 83, 0.96);
  font-family: var(--font-sans);
  font-size: 0.145px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-anchor: middle;
  dominant-baseline: middle;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 0.024;
  vector-effect: non-scaling-stroke;
  text-rendering: geometricPrecision;
}

.kp-map-marker-bubble-wrap.quiet .kp-map-marker-text {
  fill: rgba(39, 63, 87, 0.88);
  font-size: 0.122px;
  font-weight: 650;
  stroke-width: 0.02;
}

.kp-map-marker-link.active .kp-map-marker-bubble {
  stroke: rgba(29, 97, 171, 0.22);
}

.kp-map-marker-link.active .kp-map-marker-text {
  font-size: 0.155px;
  font-weight: 760;
}

.kp-map-legend {
  left: 16px;
  bottom: 46px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kp-map-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.kp-map-legend i.type-project {
  background: linear-gradient(135deg, #2f80c9, #1b5a9e);
}

.kp-map-legend i.type-street {
  background: rgba(30, 134, 193, 0.7);
}

.kp-map-legend i.type-park {
  background: rgba(47, 153, 123, 0.78);
}

.kp-map-legend i.type-road {
  width: 14px;
  height: 3px;
  border-radius: 999px;
  background: rgba(96, 118, 141, 0.75);
}

.kp-map-legend i.type-water {
  width: 14px;
  height: 3px;
  border-radius: 999px;
  background: rgba(86, 162, 206, 0.8);
}

.kp-map-stage-caption {
  left: 16px;
  bottom: 14px;
  z-index: 3;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(33, 82, 126, 0.08);
  color: rgba(51, 82, 110, 0.76);
  font-size: 11px;
  box-shadow: 0 6px 18px rgba(15, 41, 66, 0.06);
}

.kp-bottom-panels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.kp-bottom-card,
.kp-right-card {
  padding: 18px;
}

.kp-bottom-card.emphasis {
  background: linear-gradient(180deg, rgba(246, 252, 255, 0.98), rgba(236, 246, 252, 0.98));
}

.kp-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.kp-right-card .kp-card-head {
  align-items: flex-start;
  margin-bottom: 10px;
}

.kp-right-card .kp-card-head > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.kp-right-panels .kp-card-head h3 {
  font-size: 15px;
}

.kp-card-kicker {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(38, 112, 184, 0.8);
}

.kp-panel-note {
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(22, 57, 84, 0.68);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kp-right-card .btn {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.kp-ref-layout {
  display: grid;
  gap: 18px;
}

.kp-ref-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.kp-ref-stat-card,
.kp-ref-chart-card,
.kp-ref-table-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background: #fff;
  box-shadow: 0 8px 24px rgba(148, 163, 184, 0.08);
}

.kp-ref-stat-card {
  padding: 20px 22px;
  min-height: 144px;
  background:
    radial-gradient(circle at 100% 0%, rgba(148, 201, 255, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.96));
}

.kp-ref-stat-card.warning {
  border-color: rgba(245, 158, 11, 0.18);
  background:
    radial-gradient(circle at 100% 0%, rgba(251, 191, 36, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(255, 251, 245, 0.98), rgba(255, 247, 237, 0.96));
}

.kp-ref-stat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.kp-ref-stat-meta {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.kp-ref-stat-label {
  margin: 0;
  font-size: 13px;
  color: rgba(51, 65, 85, 0.82);
}

.kp-ref-stat-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.kp-ref-stat-value b {
  font-size: 34px;
  line-height: 1;
  color: var(--navy);
  font-family: var(--font-mono);
}

.kp-ref-stat-unit {
  font-size: 13px;
  color: rgba(37, 99, 235, 0.86);
  font-weight: 600;
}

.kp-ref-stat-note {
  margin: 18px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(71, 85, 105, 0.8);
}

.kp-ref-stat-watermark {
  position: absolute;
  right: -6px;
  bottom: -10px;
  opacity: 0.16;
  color: #93c5fd;
  pointer-events: none;
}

.kp-ref-stat-watermark-glyph.ui-icon {
  width: 82px;
  height: 82px;
}

.kp-ref-stat-icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(219, 234, 254, 0.72);
  border: 1px solid rgba(147, 197, 253, 0.58);
  color: #2563eb;
}

.kp-ref-stat-card.warning .kp-ref-stat-icon {
  background: rgba(255, 237, 213, 0.82);
  border-color: rgba(253, 186, 116, 0.56);
  color: #ea580c;
}

.kp-ref-stat-glyph.ui-icon {
  width: 20px;
  height: 20px;
}

.kp-ref-stat-trend {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: rgba(71, 85, 105, 0.8);
}

.kp-ref-stat-trend-up {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #f97316;
  font-weight: 700;
}

.kp-ref-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.28fr) minmax(0, 1fr);
  gap: 16px;
}

.kp-ref-chart-card {
  padding: 20px 22px;
}

.kp-ref-chart-head,
.kp-ref-table-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.kp-ref-head-accent {
  flex: none;
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f59e0b, #f97316);
  margin-top: 2px;
}

.kp-ref-chart-head h3,
.kp-ref-table-title h3 {
  margin: 0;
  font-size: 15px;
  color: var(--navy);
}

.kp-ref-chart-head p,
.kp-ref-table-title p,
.kp-ref-table-updated,
.kp-ref-table-foot {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(71, 85, 105, 0.78);
}

.kp-ref-gauge-shell {
  min-height: 246px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 16px;
}

.kp-ref-gauge {
  --progress: 0;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 56%),
    conic-gradient(from -90deg, #33669e calc(var(--progress) * 1%), rgba(226, 232, 240, 0.9) 0);
}

.kp-ref-gauge::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 253, 0.96));
  box-shadow: inset 0 0 0 1px rgba(191, 219, 254, 0.56);
}

.kp-ref-gauge-core {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  text-align: center;
}

.kp-ref-gauge-core strong {
  font-size: 36px;
  line-height: 1;
  color: var(--navy);
  font-family: var(--font-mono);
}

.kp-ref-gauge-core span,
.kp-ref-gauge-note {
  font-size: 12px;
  color: rgba(71, 85, 105, 0.78);
}

.kp-ref-gauge-note {
  margin: 0;
}

.kp-ref-stage-list {
  min-height: 246px;
  display: grid;
  align-content: center;
  gap: 14px;
}

.kp-ref-stage-row {
  display: grid;
  gap: 8px;
}

.kp-ref-stage-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: rgba(30, 41, 59, 0.84);
}

.kp-ref-stage-meta b {
  font-family: var(--font-mono);
  color: var(--navy);
}

.kp-ref-stage-track {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(226, 232, 240, 0.7);
}

.kp-ref-stage-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7dd3fc, #33669e);
}

.kp-ref-status-panel {
  min-height: 246px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 14px;
}

.kp-ref-status-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  min-height: 188px;
}

.kp-ref-status-col {
  flex: 1;
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.kp-ref-status-bar-wrap {
  width: 100%;
  max-width: 72px;
  height: 148px;
  padding: 8px 10px 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.92));
}

.kp-ref-status-bar {
  width: 100%;
  min-height: 22px;
  border-radius: 14px 14px 10px 10px;
}

.kp-ref-status-bar.tone-blue {
  background: linear-gradient(180deg, #60a5fa, #2563eb);
}

.kp-ref-status-bar.tone-green {
  background: linear-gradient(180deg, #4ade80, #16a34a);
}

.kp-ref-status-bar.tone-amber {
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
}

.kp-ref-status-bar.tone-slate {
  background: linear-gradient(180deg, #94a3b8, #64748b);
}

.kp-ref-status-count {
  font-size: 24px;
  line-height: 1;
  color: var(--navy);
  font-family: var(--font-mono);
}

.kp-ref-status-label {
  font-size: 12px;
  color: rgba(71, 85, 105, 0.82);
}

.kp-ref-status-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.kp-ref-empty-chart {
  min-height: 246px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.88);
  border: 1px dashed rgba(148, 163, 184, 0.36);
  color: rgba(71, 85, 105, 0.78);
  font-size: 13px;
}

.kp-ref-table-card {
  padding: 0;
}

.kp-ref-table-head {
  padding: 20px 22px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
}

.kp-ref-table-updated {
  margin: 0;
  white-space: nowrap;
}

.kp-ref-table-toolbar,
.kp-ref-filter-row {
  padding: 14px 22px 0;
}

.kp-ref-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.kp-ref-search-form {
  position: relative;
}

.kp-ref-search-form .kp-search-input {
  padding-left: 36px;
  min-width: 320px;
}

.kp-ref-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: rgba(100, 116, 139, 0.82);
  pointer-events: none;
}

.kp-ref-search-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kp-ref-table-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.kp-ref-filter-row {
  padding-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  transition: opacity 0.18s ease, transform 0.18s ease, max-height 0.18s ease, padding-top 0.18s ease, padding-bottom 0.18s ease;
  max-height: 120px;
  opacity: 1;
}

.kp-ref-filter-row.is-collapsed {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
  transform: translateY(-4px);
}

.kp-ref-filter-controls {
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.kp-ref-filter-controls select {
  background: #f8fafc;
}

.kp-ref-directory-btn {
  white-space: nowrap;
}

.kp-ref-table-wrap {
  padding: 0 22px;
  overflow-x: auto;
}

.kp-ref-table {
  table-layout: fixed;
}

.kp-ref-table th:nth-child(1),
.kp-ref-table td:nth-child(1) {
  width: 48px;
}

.kp-ref-table th:nth-child(3),
.kp-ref-table td:nth-child(3) {
  width: 148px;
}

.kp-ref-table th:nth-child(4),
.kp-ref-table td:nth-child(4),
.kp-ref-table th:nth-child(5),
.kp-ref-table td:nth-child(5) {
  width: 104px;
}

.kp-ref-table th:nth-child(6),
.kp-ref-table td:nth-child(6) {
  width: 96px;
}

.kp-ref-table th:nth-child(7),
.kp-ref-table td:nth-child(7) {
  width: 120px;
}

.kp-ref-table th:nth-child(8),
.kp-ref-table td:nth-child(8) {
  width: 74px;
}

.kp-ref-table td:nth-child(2) a,
.kp-ref-table td:nth-child(2) b,
.kp-ref-table td:nth-child(2) .muted {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kp-ref-status-pill,
.kp-ref-row-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.kp-ref-status-pill.primary {
  background: rgba(219, 234, 254, 0.78);
  color: #1d4ed8;
}

.kp-ref-status-pill.warning {
  background: rgba(254, 240, 138, 0.72);
  color: #b45309;
}

.kp-ref-status-pill.danger {
  background: rgba(254, 202, 202, 0.82);
  color: #b91c1c;
}

.kp-ref-status-pill.success {
  background: rgba(220, 252, 231, 0.86);
  color: #15803d;
}

.kp-ref-table-op {
  text-align: right;
}

.kp-ref-row-link {
  border: 1px solid rgba(147, 197, 253, 0.7);
  background: rgba(239, 246, 255, 0.9);
  color: #1d4ed8;
  text-decoration: none;
}

.kp-ref-row-link:hover {
  border-color: rgba(96, 165, 250, 0.88);
  background: rgba(219, 234, 254, 0.92);
}

.kp-ref-table-foot {
  margin: 0;
  padding: 14px 22px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(226, 232, 240, 0.92);
}

/* ========== zdxmdd-style Key-Projects page ========== */
.kp-zdx-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
  background: linear-gradient(135deg, #F0F4FA 0%, #F6F9FD 40%, #EEF3FB 100%);
  background-attachment: fixed;
}
.kp-zdx-content .glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(232, 243, 255, 0.7);
  box-shadow: 0 4px 24px 0 rgba(148, 163, 184, 0.09), 0 1.5px 6px 0 rgba(59, 130, 246, 0.04);
  border-radius: 16px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.kp-zdx-content .glass-card:hover {
  box-shadow: 0 8px 32px 0 rgba(148, 163, 184, 0.13), 0 2px 8px 0 rgba(59, 130, 246, 0.07);
}

/* --- KPI Card Enhancements --- */
.kp-zdx-content .zdx-kpi-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 24px;
  transition: transform 0.28s cubic-bezier(.4,0,.2,1), box-shadow 0.28s ease;
}
.kp-zdx-content .zdx-kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(59, 130, 246, 0.12), 0 2px 8px rgba(59, 130, 246, 0.06);
}
.kp-zdx-content .zdx-kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  border-radius: 16px 16px 0 0;
}
.kp-zdx-content .zdx-kpi-card.kpi-blue::before {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}
.kp-zdx-content .zdx-kpi-card.kpi-indigo::before {
  background: linear-gradient(90deg, #6366f1, #818cf8);
}
.kp-zdx-content .zdx-kpi-card.kpi-emerald::before {
  background: linear-gradient(90deg, #10b981, #34d399);
}
.kp-zdx-content .zdx-kpi-card.kpi-orange::before {
  background: linear-gradient(90deg, #f97316, #fb923c);
}
.kp-zdx-content .zdx-kpi-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  transition: transform 0.3s ease;
}
.kp-zdx-content .zdx-kpi-card:hover .zdx-kpi-icon {
  transform: scale(1.1);
}
.kp-zdx-content .zdx-kpi-icon.icon-blue {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.15);
}
.kp-zdx-content .zdx-kpi-icon.icon-indigo {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.15);
}
.kp-zdx-content .zdx-kpi-icon.icon-emerald {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.15);
}
.kp-zdx-content .zdx-kpi-icon.icon-orange {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.15);
}
.kp-zdx-content .zdx-kpi-value {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.kp-zdx-content .zdx-kpi-value .unit {
  font-size: 13px;
  font-weight: 500;
  margin-left: 4px;
}
.kp-zdx-content .zdx-kpi-label {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 4px;
  font-weight: 500;
}
.kp-zdx-content .zdx-kpi-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed rgba(148, 163, 184, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #94a3b8;
}
.kp-zdx-content .zdx-kpi-footer .zdx-kpi-highlight {
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
}
.kp-zdx-content .zdx-kpi-footer .hl-blue { background: rgba(59,130,246,0.08); color: #3b82f6; }
.kp-zdx-content .zdx-kpi-footer .hl-indigo { background: rgba(99,102,241,0.08); color: #6366f1; }
.kp-zdx-content .zdx-kpi-footer .hl-emerald { background: rgba(16,185,129,0.08); color: #10b981; }
.kp-zdx-content .zdx-kpi-footer .hl-orange { background: rgba(249,115,22,0.08); color: #f97316; }
.kp-zdx-content .zdx-kpi-footer .hl-red { background: rgba(239,68,68,0.08); color: #ef4444; }

/* --- Chart Card Enhancements --- */
.kp-zdx-content .zdx-chart-card {
  position: relative;
  overflow: hidden;
}
.kp-zdx-content .zdx-chart-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,0.08), transparent);
}
.kp-zdx-content .zdx-chart-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.kp-zdx-content .zdx-chart-header .zdx-accent-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #fb923c);
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.35);
  flex-shrink: 0;
}
.kp-zdx-content .zdx-chart-header span {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: 0.2px;
}

/* --- Status Tags Enhanced --- */
.kp-zdx-content .status-tag-running {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.08), rgba(249, 115, 22, 0.04));
  border: 1px solid rgba(249, 115, 22, 0.2);
  color: #ea580c;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.kp-zdx-content .status-tag-warning {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.04));
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #dc2626;
  font-weight: 600;
  letter-spacing: 0.3px;
  animation: zdx-tag-pulse 2.5s ease-in-out infinite;
}
.kp-zdx-content .status-tag-pending {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.04));
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #d97706;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.kp-zdx-content .status-tag-done {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.04));
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #059669;
  font-weight: 600;
  letter-spacing: 0.3px;
}
@keyframes zdx-tag-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
  50% { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08); }
}

/* --- Search & Button Enhanced --- */
.kp-zdx-content .zdx-search-input {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 9px 14px 9px 38px;
  font-size: 12px;
  width: 260px;
  outline: none;
  transition: all 0.25s ease;
}
.kp-zdx-content .zdx-search-input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
  background: #fff;
}
.kp-zdx-content .zdx-search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.kp-zdx-content .zdx-search-wrap .zdx-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  font-size: 15px;
}
.kp-zdx-content .zdx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(.4,0,.2,1);
  border: none;
  letter-spacing: 0.3px;
}
.kp-zdx-content .zdx-btn-primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}
.kp-zdx-content .zdx-btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}
.kp-zdx-content .zdx-btn-outline {
  background: rgba(255,255,255,0.8);
  color: #2563eb;
  border: 1px solid #bfdbfe;
}
.kp-zdx-content .zdx-btn-outline:hover {
  background: rgba(219,234,254,0.5);
  border-color: #93c5fd;
  transform: translateY(-1px);
}

/* --- Table Enhanced --- */
.kp-zdx-content table {
  width: 100%;
  text-align: left;
  font-size: 12px;
  border-collapse: collapse;
}
.kp-zdx-content table thead {
  background: linear-gradient(180deg, #F8FAFC, #F1F5F9);
}
.kp-zdx-content table thead th {
  padding: 14px 20px;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #E8F3FF;
  white-space: nowrap;
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: none;
}
.kp-zdx-content table tbody td {
  padding: 16px 20px;
  color: #64748b;
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.15s ease;
}
.kp-zdx-content table tbody tr {
  transition: all 0.2s ease;
}
.kp-zdx-content table tbody tr:hover {
  background: linear-gradient(90deg, rgba(219,234,254,0.2), rgba(219,234,254,0.08));
}
.kp-zdx-content table tbody tr:hover td {
  color: #334155;
}

/* --- Progress bar inline --- */
.kp-zdx-content .zdx-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.kp-zdx-content .zdx-progress-bar {
  flex: 1;
  height: 6px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
  min-width: 60px;
}
.kp-zdx-content .zdx-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(.4,0,.2,1);
}
.kp-zdx-content .zdx-progress-fill.fill-green { background: linear-gradient(90deg, #10b981, #34d399); }
.kp-zdx-content .zdx-progress-fill.fill-orange { background: linear-gradient(90deg, #f97316, #fb923c); }
.kp-zdx-content .zdx-progress-fill.fill-red { background: linear-gradient(90deg, #ef4444, #f87171); }
.kp-zdx-content .zdx-progress-text {
  font-size: 11px;
  font-weight: 600;
  min-width: 32px;
  text-align: right;
}

/* --- Detail link Enhanced --- */
.kp-zdx-content .zdx-detail-link {
  color: #2563eb;
  cursor: pointer;
  font-size: 12px;
  background: none;
  border: none;
  padding: 4px 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-weight: 500;
}
.kp-zdx-content .zdx-detail-link:hover {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.06);
}
.kp-zdx-content .zdx-accent-bar {
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, #f97316, #fb923c);
  border-radius: 999px;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(249, 115, 22, 0.3);
}
.kp-zdx-content .zdx-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}

/* zdxmdd filter modal */
.zdx-filter-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.zdx-filter-modal-overlay.show {
  opacity: 1;
  pointer-events: all;
}
.zdx-filter-modal-box {
  background: #fff;
  width: 90%;
  max-width: 700px;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.1);
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(8px);
  transition: transform 0.3s ease;
}
.zdx-filter-modal-overlay.show .zdx-filter-modal-box {
  transform: translateY(0);
}
.zdx-filter-modal-header {
  padding: 20px 28px;
  background: linear-gradient(135deg, #1e3a5f, #2d5a8a);
  color: #fff;
  font-size: 17px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 0.3px;
}
.zdx-filter-modal-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.zdx-filter-modal-close:hover {
  background: rgba(255,255,255,0.25);
}
.zdx-filter-modal-body {
  padding: 28px 32px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.85;
  color: #333;
}
.zdx-filter-item {
  margin-bottom: 20px;
}
.zdx-filter-label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.zdx-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.zdx-filter-option {
  padding: 7px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  background: #fff;
  transition: all 0.2s ease;
  font-weight: 500;
}
.zdx-filter-option:hover {
  border-color: #93c5fd;
  background: rgba(219, 234, 254, 0.3);
}
.zdx-filter-option.active {
  background: linear-gradient(135deg, #1e3a5f, #2d5a8a);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(30, 58, 95, 0.25);
}

/* zdxmdd project detail modal */
.zdx-project-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.zdx-project-modal-overlay.show {
  opacity: 1;
  pointer-events: all;
}
.zdx-project-modal-box {
  background: #fff;
  width: 90%;
  max-width: 920px;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.1);
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(8px);
  transition: transform 0.3s ease;
}
.zdx-project-modal-overlay.show .zdx-project-modal-box {
  transform: translateY(0);
}
.zdx-project-modal-header {
  padding: 20px 28px;
  background: linear-gradient(135deg, #1e3a5f, #2d5a8a);
  color: #fff;
  font-size: 17px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.zdx-project-modal-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.zdx-project-modal-close:hover {
  background: rgba(255,255,255,0.25);
}
.zdx-project-modal-body {
  padding: 28px 32px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.85;
  color: #333;
}

/* --- Modal Content Enhanced --- */
.zdx-modal-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}
.zdx-modal-subtitle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f1f5f9;
}
.zdx-modal-subtitle .zdx-modal-badge {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.zdx-modal-subtitle .badge-level {
  background: rgba(99,102,241,0.08);
  color: #6366f1;
}
.zdx-modal-subtitle .badge-type {
  background: rgba(59,130,246,0.08);
  color: #3b82f6;
}
.zdx-modal-subtitle .badge-industry {
  background: rgba(16,185,129,0.08);
  color: #059669;
}

/* progress in modal */
.zdx-modal-progress-section {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 24px;
  border: 1px solid #e2e8f0;
}
.zdx-modal-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.zdx-modal-progress-header .label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}
.zdx-modal-progress-header .value {
  font-size: 24px;
  font-weight: 800;
  color: #1e293b;
}
.zdx-modal-progress-bar {
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}
.zdx-modal-progress-bar .fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(.4,0,.2,1);
}
.zdx-modal-stages {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}
.zdx-modal-stage-item {
  flex: 1;
  text-align: center;
  font-size: 10px;
  color: #94a3b8;
  padding: 6px 2px;
  border-radius: 6px;
  transition: all 0.2s;
}
.zdx-modal-stage-item.active {
  background: rgba(59,130,246,0.08);
  color: #2563eb;
  font-weight: 600;
}
.zdx-modal-stage-item.done {
  background: rgba(16,185,129,0.06);
  color: #059669;
  font-weight: 500;
}

.zdx-modal-info-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.zdx-modal-info-item {
  background: #fafbfc;
  border-radius: 10px;
  padding: 14px 16px;
  border: 1px solid #f1f5f9;
  transition: border-color 0.2s;
}
.zdx-modal-info-item:hover {
  border-color: #e2e8f0;
}
.zdx-modal-info-label {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.zdx-modal-info-value {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}
.zdx-modal-desc {
  background: linear-gradient(135deg, #f9fbfd, #f1f5f9);
  padding: 18px 22px;
  border-radius: 12px;
  border: 1px solid #e6eff9;
  margin-top: 20px;
  color: #475569;
  line-height: 1.75;
  font-size: 13px;
}
.zdx-modal-desc b {
  color: #1e293b;
}
.zdx-modal-issue {
  background: linear-gradient(135deg, #fef2f2, #fff5f5);
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid rgba(239,68,68,0.12);
  margin-top: 12px;
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.75;
}
.zdx-modal-issue b {
  color: #991b1b;
}

@keyframes zdx-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .8; }
}
.zdx-animate-pulse-slow {
  animation: zdx-pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Explicit chart container dimensions (ECharts needs non-zero size) */
#zdx-completion-chart { width: 100%; min-height: 256px; }
#zdx-stage-chart { width: 100%; min-height: 256px; }
#zdx-status-chart { width: 100%; min-height: 256px; }

.kp-stage-row {
  display: grid;
  gap: 4px;
  margin-bottom: 6px;
}

.kp-stage-row > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.kp-stage-bar,
.kp-progress-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(38, 112, 184, 0.08);
  overflow: hidden;
}

.kp-stage-bar span,
.kp-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5cc8ff, #2670b8);
}

.kp-insight-list {
  margin: 14px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: rgba(22, 57, 84, 0.88);
}

.kp-track-list {
  display: grid;
  gap: 10px;
}

.kp-track-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(20, 57, 88, 0.06);
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(242, 247, 251, 0.92));
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.kp-track-item:hover {
  border-color: rgba(38, 112, 184, 0.16);
  box-shadow: 0 4px 12px rgba(38, 112, 184, 0.06);
}

.kp-track-info {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.kp-track-head {
  min-width: 0;
}

.kp-track-head strong {
  min-width: 0;
}

.kp-track-subline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.kp-track-item strong {
  display: block;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.decision-record b {
  display: block;
  color: var(--navy);
}

.kp-track-stage {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(38, 112, 184, 0.08);
  color: rgba(28, 84, 135, 0.88);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.kp-track-sub {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  color: rgba(22, 57, 84, 0.56);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kp-track-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.kp-track-bar {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: rgba(38, 112, 184, 0.08);
  overflow: hidden;
}

.kp-track-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5cc8ff, #2670b8);
  transition: width 0.3s ease;
}

.kp-track-pct {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-strong);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.decision-record span,
.decision-record em {
  font-size: 12px;
  color: rgba(22, 57, 84, 0.68);
}

.kp-track-meta {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding-top: 1px;
  white-space: nowrap;
}

.kp-track-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background: rgba(15, 41, 66, 0.04);
  font-size: 10px;
  font-weight: 600;
  color: rgba(22, 57, 84, 0.72);
  white-space: nowrap;
}

.kp-track-meta .tag {
  margin: 0;
}

.kp-priority-card {
  border-color: rgba(23, 79, 126, 0.22);
  background:
    radial-gradient(circle at top right, rgba(92, 200, 255, 0.22), transparent 38%),
    linear-gradient(155deg, #163a5d, #22577a 62%, #2c6d97);
  box-shadow: 0 18px 36px rgba(17, 54, 86, 0.2);
}

.kp-priority-card::after {
  right: -22px;
  top: -22px;
  width: 148px;
  height: 148px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.04) 40%, transparent 72%);
}

.kp-priority-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(233, 245, 255, 0.86);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kp-priority-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.kp-priority-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.48;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-wrap: normal;
}

.kp-priority-head .tag {
  margin: 0;
}

.kp-priority-summary {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.78;
  color: rgba(228, 243, 255, 0.84);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kp-priority-meta {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 14px;
  overflow: hidden;
}

.kp-priority-meta span {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  color: rgba(233, 245, 255, 0.88);
  white-space: nowrap;
}

.kp-priority-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.kp-priority-stats div {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.kp-priority-stats b {
  display: block;
  font-size: 18px;
  line-height: 1.2;
  font-family: var(--font-mono);
  color: #ffffff;
}

.kp-priority-stats span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: rgba(228, 243, 255, 0.72);
}

.kp-priority-card .btn.primary {
  width: 100%;
  min-height: 38px;
  margin-top: 16px;
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy);
  box-shadow: none;
}

.kp-priority-card .btn.primary:hover {
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(10, 33, 54, 0.18);
}

.kp-priority-card.is-empty {
  border-color: rgba(20, 57, 88, 0.08);
  background: linear-gradient(180deg, rgba(247, 251, 254, 0.98), rgba(240, 246, 251, 0.96));
  box-shadow: var(--shadow);
}

.kp-priority-card.is-empty::after {
  background: radial-gradient(circle, rgba(38, 112, 184, 0.12) 0%, rgba(92, 200, 255, 0.04) 42%, transparent 72%);
}

.kp-priority-card.is-empty .kp-priority-kicker {
  border-color: rgba(38, 112, 184, 0.12);
  background: rgba(38, 112, 184, 0.08);
  color: rgba(25, 87, 144, 0.82);
}

.kp-priority-card.is-empty .kp-priority-head h3 {
  color: var(--navy);
}

.kp-priority-card.is-empty .kp-priority-summary {
  color: rgba(22, 57, 84, 0.72);
}

.kp-insight-card {
  background: linear-gradient(180deg, rgba(248, 252, 255, 0.98), rgba(242, 247, 252, 0.96));
}

.kp-insight-bullets {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
  counter-reset: insight;
}

.kp-insight-bullets li {
  position: relative;
  padding: 12px 12px 12px 44px;
  border-radius: 14px;
  border: 1px solid rgba(20, 57, 88, 0.06);
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.75;
  color: rgba(22, 57, 84, 0.82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kp-insight-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kp-insight-bullets li::before {
  counter-increment: insight;
  content: counter(insight, decimal-leading-zero);
  position: absolute;
  left: 12px;
  top: 12px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(38, 112, 184, 0.08);
  color: var(--accent-strong);
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kp-directory-table tbody tr.active td {
  background: rgba(38, 112, 184, 0.08);
}

.kp-bottom-card .table {
  table-layout: fixed;
}

.kp-bottom-card .table tbody td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kp-bottom-card .table tbody td:nth-child(2) {
  white-space: normal;
}

.kp-bottom-card .table tbody td:nth-child(2) a,
.kp-bottom-card .table tbody td:nth-child(2) b,
.kp-bottom-card .table tbody td:nth-child(2) .muted {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kp-bottom-card .table th:nth-child(1),
.kp-bottom-card .table td:nth-child(1) { width: 44px; }
.kp-bottom-card .table th:nth-child(3),
.kp-bottom-card .table td:nth-child(3) { width: 64px; }
.kp-bottom-card .table th:nth-child(4),
.kp-bottom-card .table td:nth-child(4) { width: 80px; }
.kp-bottom-card .table th:nth-child(5),
.kp-bottom-card .table td:nth-child(5) { width: 88px; }
.kp-bottom-card .table th:nth-child(6),
.kp-bottom-card .table td:nth-child(6),
.kp-bottom-card .table th:nth-child(7),
.kp-bottom-card .table td:nth-child(7),
.kp-bottom-card .table th:nth-child(8),
.kp-bottom-card .table td:nth-child(8) { width: 68px; }

.kp-directory-table th:nth-child(1),
.kp-directory-table td:nth-child(1) { width: 68px; }
.kp-directory-table th:nth-child(3),
.kp-directory-table td:nth-child(3) { width: 120px; }
.kp-directory-table th:nth-child(4),
.kp-directory-table td:nth-child(4),
.kp-directory-table th:nth-child(5),
.kp-directory-table td:nth-child(5) { width: 126px; }

.kp-directory-table-wrap,
.kp-detail-shell {
  display: grid;
  gap: 14px;
}

.kp-directory-hint {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background: rgba(245, 249, 253, 0.88);
  color: rgba(22, 57, 84, 0.68);
  font-size: 12px;
  line-height: 1.7;
  text-wrap: pretty;
}

.kp-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.kp-detail-header h3 {
  margin: 10px 0 8px;
  font-size: 24px;
  color: var(--navy);
}

.kp-detail-head-metrics {
  display: grid;
  gap: 10px;
  min-width: 180px;
}

.kp-detail-head-metrics div {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(241, 246, 251, 0.92);
  display: grid;
  gap: 4px;
}

.kp-detail-head-metrics b {
  font-family: var(--font-mono);
  font-size: 24px;
  color: var(--navy);
}

.kp-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.kp-detail-item {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(244, 248, 252, 0.9);
  border: 1px solid rgba(20, 57, 88, 0.05);
  display: grid;
  gap: 6px;
}

.kp-detail-item label {
  font-size: 12px;
  color: rgba(22, 57, 84, 0.68);
}

.kp-detail-item span {
  color: var(--navy);
  line-height: 1.7;
}

.kp-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
}

.kp-detail-relation h4,
.decision-modal-block h4 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--navy);
}

.kp-detail-relation ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.decision-reference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.decision-module-card {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 20px;
  overflow: hidden;
  isolation: isolate;
  border-radius: 16px;
  border: 1px solid #e1f0ff;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.decision-module-card::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(51, 102, 158, 0.10) 0%, rgba(51, 102, 158, 0.04) 45%, transparent 72%);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.decision-module-card > * {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.decision-module-card.focus {
  border-color: rgba(51, 102, 158, 0.22);
  box-shadow: 0 12px 30px rgba(51, 102, 158, 0.10);
}

.decision-card-top-tag {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.decision-card-top-tag span {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #e8f3ff;
  color: #33669e;
  border: 1px solid #d1e9ff;
  font-weight: 600;
}

.decision-card-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #64748b;
}

.decision-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.decision-summary-item {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #e8f3ff;
  background: #f8fafc;
}

.decision-summary-label {
  margin-bottom: 4px;
  font-size: 12px;
  color: #94a3b8;
}

.decision-summary-value {
  font-size: 20px;
  font-weight: 700;
  color: #33669e;
  line-height: 1.25;
}

.decision-summary-value.is-date {
  font-size: 16px;
}

.decision-conclusion-box {
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid #e8f3ff;
  background: #f8fafc;
  font-size: 13px;
  line-height: 1.6;
  color: #334155;
}

.decision-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.decision-stat-box {
  display: flex;
  align-items: center;
  gap: 16px;
}

.decision-stat-num {
  position: relative;
  padding-left: 12px;
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  color: #33669e;
}

.decision-stat-num::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 4px;
  height: 20px;
  border-radius: 999px;
  background: #f97316;
  transform: translateY(-50%);
}

.decision-stat-info {
  display: grid;
  gap: 6px;
}

.decision-stat-date {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.decision-stat-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #d1e9ff;
  background: #e8f3ff;
  color: #33669e;
  font-size: 12px;
}

.decision-card-tabs {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: #64748b;
}

.decision-card-tab {
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.decision-card-tab.active {
  color: #33669e;
  font-weight: 700;
  border-color: #f97316;
}

.decision-double-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 20px;
  min-width: 0;
}

.decision-list-wrap {
  min-width: 0;
  overflow: visible;
  padding-right: 0;
}

.decision-list-wrap::-webkit-scrollbar {
  width: 4px;
}

.decision-list-wrap::-webkit-scrollbar-thumb {
  background: #e8f3ff;
  border-radius: 999px;
}

.decision-filter-bar {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 16px;
  border: 1px solid rgba(211, 225, 239, 0.92);
  background: linear-gradient(180deg, rgba(250, 252, 255, 0.98) 0%, rgba(243, 248, 255, 0.94) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 12px 28px rgba(44, 92, 146, 0.08);
}

.decision-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.decision-filter-row-range {
  justify-content: flex-end;
}

.decision-filter-row-range .decision-range-form {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
  width: min(100%, 472px);
  margin-left: auto;
  padding: 8px 4px 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(205, 220, 236, 0.94);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 249, 255, 0.94) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 10px 20px rgba(55, 95, 138, 0.07);
}

.decision-filter-row-search .decision-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: min(100%, 472px);
  margin-left: auto;
  padding: 4px 4px 4px 10px;
  border-radius: 14px;
  border: 1px solid rgba(205, 220, 236, 0.94);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 249, 255, 0.94) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 10px 20px rgba(55, 95, 138, 0.07);
}

.decision-filter-row-range .decision-range-form label,
.decision-filter-row-range .decision-range-form span {
  white-space: nowrap;
}

.decision-range-form-compact .decision-range-label,
.decision-range-form-compact .decision-range-sep {
  font-size: 12px;
  color: rgba(38, 77, 108, 0.8);
  font-weight: 600;
  white-space: nowrap;
}

.decision-range-form-compact .decision-range-label {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 4px 0 2px;
  border-radius: 0;
  border: none;
  background: transparent;
  color: #3b668b;
  box-shadow: none;
  font-weight: 700;
}

.decision-range-form-compact input {
  flex: 0 1 152px;
  width: 152px;
  min-width: 0;
  max-width: 172px;
  height: 38px;
  padding: 0 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: normal;
  border-radius: 11px;
  border: 1px solid rgba(205, 222, 239, 0.96);
  background: linear-gradient(180deg, rgba(249, 252, 255, 0.98) 0%, rgba(240, 247, 255, 0.96) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96);
  color: #1a3c5b;
  font-variant-numeric: tabular-nums;
  appearance: none;
  -webkit-appearance: none;
  background-image: none;
}

.decision-range-form-compact input[type="date"]::-webkit-calendar-picker-indicator,
.decision-range-form-compact input[type="date"]::-webkit-clear-button,
.decision-range-form-compact input[type="date"]::-webkit-inner-spin-button {
  display: none;
  -webkit-appearance: none;
}

.decision-range-form-compact input[type="date"]::-webkit-datetime-edit,
.decision-range-form-compact input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}

.decision-range-form-compact input[type="date"]::-webkit-datetime-edit {
  color: #244763;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: normal;
}

.decision-range-form-compact input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

.decision-range-form-compact input[type="date"]::-webkit-datetime-edit-year-field,
.decision-range-form-compact input[type="date"]::-webkit-datetime-edit-month-field,
.decision-range-form-compact input[type="date"]::-webkit-datetime-edit-day-field {
  padding: 0;
  color: #244763;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: normal;
}

.decision-range-form-compact input[type="date"]::-webkit-datetime-edit-text {
  padding: 0 1px;
  color: rgba(84, 112, 139, 0.72);
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: normal;
}

.decision-filter-row-search .decision-search-form input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 10px;
  border: none;
  background: transparent;
  box-shadow: none;
  color: #1a3c5b;
}

.decision-range-form-compact .btn,
.decision-filter-row-search .decision-search-form .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 60px;
  min-width: 60px;
  min-height: 36px;
  padding: 0;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid rgba(61, 113, 165, 0.2);
  background: linear-gradient(180deg, #5c8fc5 0%, #3f74af 100%);
  color: #fff;
  box-shadow: 0 10px 20px rgba(62, 115, 176, 0.18);
}

.decision-range-form-compact .btn[type="submit"] {
  margin-left: auto;
}

.decision-range-form-compact input::placeholder,
.decision-filter-row-search .decision-search-form input::placeholder {
  color: rgba(89, 116, 143, 0.72);
}

.decision-range-form-compact input:focus,
.decision-filter-row-search .decision-search-form input:focus {
  outline: none;
  border-color: rgba(71, 125, 180, 0.65);
  box-shadow: 0 0 0 3px rgba(88, 142, 198, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.decision-range-form-compact .btn:hover,
.decision-filter-row-search .decision-search-form .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(62, 115, 176, 0.22);
}


.decision-card-record-list {
  gap: 8px;
  height: 320px;
  min-height: 320px;
  grid-template-rows: repeat(5, minmax(0, 1fr));
  align-content: stretch;
}

.decision-card-record-list .decision-record {
  min-width: 0;
  min-height: 0;
  height: 100%;
  align-self: stretch;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
}

.decision-card-record-list .decision-record > div {
  flex: 1;
  min-width: 0;
}

.decision-card-record-list .decision-record b,
.decision-card-record-list .decision-record span,
.decision-card-record-list .decision-record em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.decision-card-record-list .decision-record b {
  font-size: 13px;
  line-height: 1.35;
}

.decision-card-record-list .decision-record span {
  display: block;
  margin-top: 2px;
}

.decision-card-record-list .decision-record em {
  flex-shrink: 0;
  max-width: 96px;
  text-align: right;
}

.decision-card-record-list .decision-record:hover {
  transform: translateX(2px);
  background: #f8fafc;
  border-color: #e8f3ff;
}

.decision-card-record-list .decision-empty {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.decision-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.decision-pagination-meta {
  color: rgba(22, 57, 84, 0.72);
  font-size: 12px;
}

.decision-pagination-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.decision-page-link {
  min-width: 34px;
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background: rgba(248, 251, 255, 0.96);
  color: rgba(22, 57, 84, 0.78);
  font-size: 12px;
  font-weight: 700;
}

.decision-page-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #5e9cff);
  border-color: transparent;
}

.decision-page-link.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.decision-page-ellipsis {
  min-width: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(22, 57, 84, 0.56);
  font-size: 14px;
}

.decision-analysis-sidebar {
  width: 220px;
  flex-shrink: 0;
  align-self: start;
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid #e8f3ff;
  background: #f8fafc;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.02);
}

.decision-analysis-title {
  margin: 0 0 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e8f3ff;
  font-size: 13px;
  font-weight: 700;
  color: #33669e;
}

.decision-analysis-sidebar .decision-brief-sidebar-row {
  padding: 4px 0;
  font-size: 13px;
  color: #334155;
}

.decision-analysis-sidebar .decision-brief-sidebar-row b {
  padding: 2px 8px;
  border-radius: 4px;
  background: #ffedd5;
  color: #f97316;
}

.decision-brief-card {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 20px;
  overflow: hidden;
  isolation: isolate;
  border-radius: 20px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 254, 0.94));
  box-shadow: var(--shadow);
}

.decision-brief-card::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -18px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(38, 112, 184, 0.12) 0%, rgba(92, 200, 255, 0.05) 42%, transparent 74%);
  pointer-events: none;
  z-index: 0;
}

.decision-brief-card > * {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.decision-brief-card.focus {
  border-color: rgba(38, 112, 184, 0.18);
  box-shadow: 0 18px 40px rgba(47, 95, 148, 0.14);
}

.decision-brief-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.decision-brief-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(38, 112, 184, 0.1);
  background: rgba(232, 243, 255, 0.9);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.decision-brief-desc {
  margin: 0;
  color: rgba(22, 57, 84, 0.72);
  font-size: 13px;
  line-height: 1.68;
}

.decision-brief-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.decision-brief-metric {
  display: grid;
  gap: 6px;
  min-height: 88px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background: rgba(248, 251, 255, 0.96);
}

.decision-brief-metric span {
  font-size: 12px;
  color: rgba(22, 57, 84, 0.6);
}

.decision-brief-metric strong {
  font-size: 20px;
  color: var(--navy);
  line-height: 1.25;
}

.decision-brief-conclusion {
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background: rgba(248, 251, 255, 0.96);
  color: rgba(22, 57, 84, 0.86);
  font-size: 13px;
  line-height: 1.7;
}

.decision-brief-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.decision-brief-stat {
  display: flex;
  align-items: center;
  gap: 16px;
}

.decision-brief-stat-num {
  position: relative;
  padding-left: 12px;
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
  color: var(--accent-2);
}

.decision-brief-stat-num::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 24px;
  border-radius: 999px;
  background: #f97316;
  transform: translateY(-50%);
}

.decision-brief-stat-info {
  display: grid;
  gap: 6px;
}

.decision-brief-stat-date {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}

.decision-brief-stat-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(38, 112, 184, 0.12);
  background: rgba(232, 243, 255, 0.9);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 600;
}

.decision-brief-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: rgba(22, 57, 84, 0.62);
  font-size: 13px;
}

.decision-brief-switch span {
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.decision-brief-switch span.active {
  color: var(--accent-2);
  font-weight: 700;
  border-color: #f97316;
}

.decision-brief-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  align-items: start;
}

.decision-brief-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.decision-brief-main .decision-toolbar {
  padding: 12px 14px;
  box-shadow: none;
}

.decision-brief-list-wrap {
  min-width: 0;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 6px;
}

.decision-brief-list-wrap::-webkit-scrollbar {
  width: 6px;
}

.decision-brief-list-wrap::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(38, 112, 184, 0.16);
}

.decision-brief-sidebar {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background: rgba(248, 251, 255, 0.96);
  box-shadow: inset 0 0 12px rgba(20, 57, 84, 0.03);
}

.decision-brief-sidebar h4 {
  margin: 0 0 2px;
  font-size: 14px;
  color: var(--accent-2);
}

.decision-brief-sidebar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  font-size: 13px;
  color: rgba(22, 57, 84, 0.8);
}

.decision-brief-sidebar-row b {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 237, 213, 0.9);
  color: #f97316;
  font-size: 11px;
  font-weight: 700;
}

.decision-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 0.72fr;
  gap: 18px;
}

.decision-analysis-board {
  margin-bottom: 16px;
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background: linear-gradient(135deg, rgba(245, 250, 255, 0.96), rgba(235, 244, 252, 0.92));
  box-shadow: var(--shadow);
}

.decision-analysis-dual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.decision-analysis-dual .decision-analysis-board {
  margin-bottom: 0;
  min-height: 100%;
}

.decision-analysis-board.compact {
  padding: 14px 16px;
  border-radius: 18px;
}

.decision-analysis-strip {
  display: grid;
  gap: 12px;
}

.decision-analysis-summary {
  display: grid;
  gap: 6px;
}

.decision-analysis-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.decision-analysis-summary h3 {
  margin: 0;
  font-size: 20px;
  color: var(--navy);
}

.decision-analysis-summary p {
  margin: 0;
  color: rgba(22, 57, 84, 0.7);
  line-height: 1.68;
  font-size: 13px;
  text-wrap: pretty;
}

.decision-analysis-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.decision-analysis-pill {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background: rgba(255, 255, 255, 0.86);
  min-height: 88px;
  display: grid;
  align-content: start;
  gap: 6px;
}

.decision-analysis-pill span {
  display: block;
  font-size: 12px;
  color: rgba(22, 57, 84, 0.62);
}

.decision-analysis-pill strong {
  display: block;
  margin-top: 0;
  font-size: 22px;
  color: var(--navy);
  line-height: 1.2;
}

.decision-analysis-brief {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background: rgba(255, 255, 255, 0.82);
}

.decision-analysis-brief span {
  font-size: 12px;
  color: rgba(22, 57, 84, 0.62);
  font-weight: 700;
}

.decision-analysis-brief p {
  margin: 0;
  color: rgba(22, 57, 84, 0.84);
  line-height: 1.65;
  font-size: 13px;
}

.decision-analysis-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.decision-analysis-head h3 {
  margin: 4px 0 6px;
  font-size: 24px;
  color: var(--navy);
}

.decision-analysis-head p {
  margin: 0;
  max-width: 760px;
  color: rgba(22, 57, 84, 0.72);
  line-height: 1.7;
}

.decision-analysis-kicker {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(38, 112, 184, 0.1);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.decision-analysis-meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.decision-analysis-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.decision-analysis-card,
.decision-analysis-list-card {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background: rgba(255, 255, 255, 0.84);
}

.decision-analysis-card span {
  display: block;
  font-size: 12px;
  color: rgba(22, 57, 84, 0.62);
}

.decision-analysis-card strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  color: var(--navy);
}

.decision-analysis-card small {
  display: block;
  margin-top: 8px;
  line-height: 1.6;
  color: rgba(22, 57, 84, 0.66);
}

.decision-analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.decision-analysis-list-card h4 {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--navy);
}

.decision-analysis-list-card ul,
.decision-analysis-list-card ol {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: rgba(22, 57, 84, 0.84);
}

.decision-analysis-list-card ul {
  padding-left: 0;
  list-style: none;
}

.decision-analysis-list-card ul li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.decision-analysis-list-card ul li b {
  color: var(--accent-2);
}

.decision-analysis-list-card.insight {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 250, 255, 0.96));
}

.decision-panel,
.decision-stat-panel {
  display: grid;
  gap: 16px;
}

.decision-panel.focus {
  border-color: rgba(38, 112, 184, 0.18);
  box-shadow: 0 18px 40px rgba(47, 95, 148, 0.14);
}

.decision-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.decision-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background: rgba(241, 246, 251, 0.9);
  font-size: 13px;
  color: rgba(22, 57, 84, 0.76);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.decision-tabs a:hover {
  transform: translateY(-1px);
  border-color: rgba(38, 112, 184, 0.14);
  background: rgba(248, 251, 255, 0.96);
  color: rgba(22, 57, 84, 0.94);
}

.decision-tabs a.active {
  background: linear-gradient(135deg, rgba(38, 112, 184, 0.14), rgba(38, 112, 184, 0.08));
  color: var(--accent-2);
  border-color: rgba(38, 112, 184, 0.18);
  box-shadow: 0 10px 24px rgba(38, 112, 184, 0.08);
}

.decision-record-list {
  display: grid;
  gap: 10px;
}

.decision-record {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(20, 57, 88, 0.06);
  background: rgba(244, 248, 252, 0.9);
  text-align: left;
  cursor: pointer;
}

.decision-record em {
  font-style: normal;
  white-space: nowrap;
}

.decision-stat-panel ol,
.decision-stat-panel ul,
.decision-note-strip ol {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: rgba(22, 57, 84, 0.84);
}

.decision-note-strip {
  background: linear-gradient(180deg, rgba(140, 245, 247, 0.72), rgba(112, 222, 231, 0.78));
}

.decision-note-strip ol {
  line-height: 1.72;
  text-wrap: pretty;
}

.decision-empty {
  padding: 16px;
  border-radius: 14px;
  background: rgba(244, 248, 252, 0.9);
  color: rgba(22, 57, 84, 0.68);
  font-size: 13px;
  line-height: 1.7;
  border: 1px dashed rgba(20, 57, 88, 0.1);
}

.decision-library-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(20, 57, 88, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 252, 0.94));
  box-shadow: var(--shadow);
}

.decision-library-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
}

.decision-library-block {
  display: grid;
  gap: 12px;
}

.decision-library-highlight {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.decision-library-highlight-item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(38, 112, 184, 0.1);
  background: linear-gradient(180deg, rgba(235, 244, 255, 0.92), rgba(247, 250, 254, 0.96));
}

.decision-library-highlight-item span {
  font-size: 12px;
  color: rgba(22, 57, 84, 0.62);
}

.decision-library-highlight-item strong {
  font-size: 18px;
  color: var(--navy);
}

.decision-library-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(22, 57, 84, 0.62);
}

.decision-library-stats {
  display: grid;
  gap: 10px;
}

.decision-library-stat {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(20, 57, 88, 0.06);
  background: rgba(244, 248, 252, 0.9);
}

.decision-library-stat strong {
  font-size: 18px;
  color: var(--navy);
}

.decision-library-stat span {
  font-size: 13px;
  line-height: 1.65;
  color: rgba(22, 57, 84, 0.72);
}

.decision-library-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.decision-library-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(20, 57, 88, 0.06);
  background: rgba(244, 248, 252, 0.9);
}

.decision-library-list li > div {
  display: grid;
  gap: 4px;
}

.decision-library-list b {
  color: var(--navy);
  font-size: 14px;
}

.decision-library-list span {
  color: rgba(22, 57, 84, 0.7);
  font-size: 12px;
  line-height: 1.65;
}

.decision-library-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(38, 112, 184, 0.12);
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 700;
}

.decision-modal {
  display: grid;
  gap: 12px;
}

.decision-modal-block {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(244, 248, 252, 0.9);
}

.exit-page,
.target-page,
.govstats-page {
  display: grid;
  gap: 20px;
}

.exit-panel,
.target-panel,
.govstats-panel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 10px;
  border: 1px solid #E5E7EB;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 16px 18px;
}

.exit-panel::after,
.target-panel::after,
.govstats-panel::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -36px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(38, 112, 184, 0.08) 0%, rgba(92, 200, 255, 0.03) 40%, transparent 72%);
  pointer-events: none;
}

.exit-panel > *,
.target-panel > *,
.govstats-panel > * {
  position: relative;
  z-index: 1;
}

.exit-panel-head,
.target-panel-head,
.govstats-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #E5E7EB;
  flex-shrink: 0;
}

.exit-panel-head h3,
.target-panel-head h3,
.govstats-panel-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
  color: #1F2937;
}

.exit-panel-head span,
.target-panel-head span,
.govstats-panel-head span {
  color: #6B7280;
  font-size: 13px;
  line-height: 1.7;
  font-weight: normal;
}

/* ── Data Overview Cards (qyqcyj style) ── */
.exit-summary-grid,
.target-summary-grid,
.govstats-hero-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.exit-summary-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.exit-summary-card,
.target-summary-card,
.govstats-hero-card {
  min-height: 80px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  background: #EFF6FF;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.exit-summary-card span,
.target-summary-card span,
.govstats-hero-card span {
  font-size: 13px;
  color: #6B7280;
  line-height: 1.5;
}

.exit-summary-card strong,
.target-summary-card strong,
.govstats-hero-card strong {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: bold;
  color: #1F2937;
  line-height: 1;
  margin-top: 6px;
}

.exit-summary-card.high {
  border-color: rgba(220, 38, 38, 0.12);
  background: #FEE2E2;
}
.exit-summary-card.high strong { color: #DC2626; }

.exit-summary-card.higher {
  border-color: rgba(217, 119, 6, 0.12);
  background: #FEF3C7;
}
.exit-summary-card.higher strong { color: #D97706; }

.exit-summary-card.mid {
  border-color: rgba(37, 99, 235, 0.12);
  background: #EFF6FF;
}
.exit-summary-card.mid strong { color: #2563EB; }

.exit-summary-card.lower,
.exit-summary-card.low {
  border-color: rgba(5, 150, 105, 0.12);
  background: #D1FAE5;
}
.exit-summary-card.lower strong,
.exit-summary-card.low strong { color: #059669; }

/* ── Two-column Layout ── */
.exit-layout {
  display: flex;
  gap: 20px;
  align-items: stretch;
}
.exit-layout > .exit-panel:first-child {
  flex: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.exit-layout > .exit-panel:last-child,
.exit-layout > aside.exit-panel {
  flex: 1;
  min-width: 280px;
  max-width: 380px;
  display: flex;
  flex-direction: column;
}

.target-dual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.govstats-bottom-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* ── Filter Bar (qyqcyj style) ── */
.exit-filter-bar,
.target-filter-bar,
.govstats-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.target-filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  flex: 1;
}

.target-filter-bar-subject {
  justify-content: space-between;
  margin-bottom: 14px;
}

.target-filter-bar-subject label {
  font-size: 12px;
  color: rgba(22, 57, 84, 0.72);
  font-weight: 700;
}

.exit-filter-bar select,
.exit-filter-bar input,
.target-filter-bar select,
.target-filter-form input,
.govstats-filter-bar select,
.govstats-filter-bar input {
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid #E5E7EB;
  background: #fff;
  color: #1F2937;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.exit-filter-bar select:focus,
.exit-filter-bar input:focus {
  border-color: #3B82F6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.exit-filter-bar input,
.target-filter-form input,
.govstats-filter-bar input {
  min-width: 220px;
  flex: 1;
}

.exit-filter-bar .btn.primary {
  background: #3B82F6;
  color: #fff;
  border-color: #3B82F6;
}
.exit-filter-bar .btn.primary:hover {
  background: #2563EB;
}
.exit-filter-bar .btn:not(.primary) {
  background: #F9FAFB;
  color: #6B7280;
  border: 1px solid #E5E7EB;
}

/* ── Table (qyqcyj style) ── */
.exit-table-wrap,
.target-compare-stage {
  overflow: auto;
  border-radius: 8px;
  border: none;
  background: transparent;
  margin-top: 0;
}
.exit-table-wrap {
  max-height: 320px;
  overflow-y: auto;
  flex: 1 1 0;
}

.exit-table {
  border-radius: 8px;
  overflow: hidden;
}

.exit-table th {
  background: #F9FAFB;
  font-weight: bold;
  padding: 10px 10px;
  text-align: left;
  border-bottom: 1px solid #E5E7EB;
  font-size: 13px;
  color: #1F2937;
  position: sticky;
  top: 0;
  z-index: 1;
}

.exit-table td {
  padding: 10px 10px;
  border-bottom: 1px solid #E5E7EB;
  font-size: 13px;
  color: #1F2937;
}

.exit-table tbody tr:hover {
  background: #F9FAFB;
}

.exit-table td,
.exit-table th,
.target-compare-table td,
.target-compare-table th,
.govstats-doc-table td,
.govstats-doc-table th {
  vertical-align: top;
}

/* ── Insight Sidebar (qyqcyj style) ── */
.exit-feed-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1 1 0;
}

.exit-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.exit-insight-card {
  padding: 12px;
  border-radius: 8px;
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  display: grid;
  gap: 8px;
  flex: 1 1 0;
}

.exit-insight-card b {
  color: #1F2937;
  font-size: 13px;
}

/* dual column inside insight card */
.exit-insight-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.exit-insight-sub {
  display: block;
  font-size: 11px;
  color: #9CA3AF;
  margin-bottom: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.exit-insight-list,
.exit-insight-suggestions {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 5px;
}

.exit-insight-list li {
  display: block;
}

.exit-insight-link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #E5E7EB;
  transition: all 0.2s ease;
}

.exit-insight-link:hover {
  transform: translateY(-1px);
  border-color: #93C5FD;
  background: #EFF6FF;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
}

.exit-insight-link.active {
  border-color: #3B82F6;
  background: #EFF6FF;
}

.exit-insight-list span,
.exit-insight-suggestions li {
  color: #6B7280;
  font-size: 12px;
  line-height: 1.6;
}

.exit-insight-list strong {
  color: #1F2937;
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap;
}

/* ── Focus Strip ── */
.exit-focus-strip {
  padding-top: 16px;
}

.exit-focus-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #EFF6FF;
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.exit-focus-content b {
  color: #1F2937;
  font-size: 15px;
}

.exit-focus-content span {
  display: block;
  margin-top: 4px;
  color: #6B7280;
  font-size: 12px;
  line-height: 1.68;
}

.exit-focus-status {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.exit-feed-item {
  padding: 14px;
  border-radius: 8px;
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.exit-feed-item b {
  color: #1F2937;
  font-size: 14px;
}

.exit-feed-item span {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: #6B7280;
  line-height: 1.65;
}

.exit-feed-score {
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--accent);
}

.exit-table tbody tr.is-focus {
  background: rgba(239, 246, 255, 0.6);
}

.exit-table tbody tr.is-focus td {
  border-color: rgba(59, 130, 246, 0.1);
}

/* ── Pagination (qyqcyj style) ── */
.exit-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.exit-pagination-meta {
  color: #6B7280;
  font-size: 13px;
}

.exit-pagination-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.exit-page-link {
  min-width: 34px;
  height: 34px;
  padding: 0 11px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #E5E7EB;
  background: #fff;
  color: #1F2937;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.exit-page-link:hover {
  background: #F9FAFB;
  border-color: #93C5FD;
}

.exit-page-link.active {
  color: #fff;
  background: #3B82F6;
  border-color: #3B82F6;
}

.exit-page-link.disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* ── Note / Help Text ── */
.exit-note,
.govstats-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #F9FAFB;
  color: #6B7280;
  line-height: 1.7;
  font-size: 13px;
  border: 1px solid #E5E7EB;
}

/* ── Disposal Workbench (qyqcyj style) ── */
.exit-disposal-grid {
  display: flex;
  gap: 16px;
}
.exit-disposal-item {
  flex: 1;
  padding: 16px;
  background: #F9FAFB;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
  display: flex;
  flex-direction: column;
}
.exit-disposal-item h4 {
  font-size: 14px;
  font-weight: bold;
  color: #1F2937;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #E5E7EB;
}
.exit-disposal-item p,
.exit-disposal-item div {
  font-size: 13px;
  color: #6B7280;
  line-height: 1.8;
  flex: 1;
}
.exit-disposal-btn {
  display: block;
  width: 100%;
  padding: 8px 16px;
  background: #3B82F6;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  margin-top: 12px;
  transition: background 0.2s;
}
.exit-disposal-btn:hover {
  background: #2563EB;
}

/* ── Risk Level Tags (qyqcyj style) ── */
.exit-level-tag,
.target-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.exit-level-tag.high { color: #DC2626; background: #FEE2E2; }
.exit-level-tag.higher { color: #D97706; background: #FEF3C7; }
.exit-level-tag.mid { color: #2563EB; background: #EFF6FF; }
.exit-level-tag.lower,
.exit-level-tag.low { color: #059669; background: #D1FAE5; }

/* ── alert detail page styles ── */
.alert-overview-strip { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.alert-ov-item { flex: 1 1 120px; min-width: 120px; padding: 12px 16px; border-radius: 10px; background: #f6f8fb; border: 1px solid #e8ecf1; }
.alert-ov-label { font-size: 11px; color: #8899aa; margin-bottom: 4px; }
.alert-ov-value { font-size: 18px; font-weight: 700; color: #1d3557; }
.alert-ov-unit { font-size: 12px; font-weight: 400; color: #8899aa; }
.alert-section { margin-bottom: 20px; }
.alert-section:last-child { margin-bottom: 0; }
.alert-section-title { font-size: 14px; font-weight: 700; color: #1d3557; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid #eef2f7; }
.alert-signals-grid { display: flex; flex-direction: column; gap: 8px; }
.alert-signal-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: rgba(231,76,60,0.04); border-radius: 8px; border-left: 3px solid #e74c3c; }
.alert-signal-name { font-size: 12px; font-weight: 600; color: #e74c3c; white-space: nowrap; min-width: 120px; }
.alert-signal-detail { font-size: 12px; color: #3a5068; }
.alert-suggestion-box { padding: 12px 16px; background: rgba(43,199,132,0.06); border-radius: 8px; border-left: 3px solid #2bc784; font-size: 13px; color: #1d3557; line-height: 1.7; }
.alert-ent-info, .alert-risk-profile { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; }
.alert-info-row { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-bottom: 1px solid #f0f2f5; }
.alert-info-row:nth-child(odd) { background: #fafbfc; }
.alert-info-label { font-size: 12px; color: #8899aa; min-width: 130px; flex-shrink: 0; }
.alert-info-value { font-size: 12px; color: #1d3557; font-weight: 500; }
.alert-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.alert-kpi { text-align: center; padding: 14px 10px; background: #f6f8fb; border-radius: 10px; border: 1px solid #e8ecf1; }
.alert-kpi-val { font-size: 22px; font-weight: 700; color: #2670b8; }
.alert-kpi-label { font-size: 11px; color: #8899aa; margin-top: 4px; }
.alert-events-list { display: flex; flex-direction: column; gap: 0; }
.alert-event-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid #f0f2f5; font-size: 12px; }
.alert-event-row:last-child { border-bottom: 0; }
.alert-event-row:hover { background: rgba(38,112,184,0.03); }
.alert-event-date { color: #8899aa; min-width: 80px; flex-shrink: 0; }
.alert-event-type { min-width: 70px; flex-shrink: 0; }
.alert-event-title { color: #1d3557; flex: 1; }
@media (max-width: 900px) {
  .alert-ent-info, .alert-risk-profile { grid-template-columns: 1fr; }
  .alert-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

.exit-level-tag,
.target-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.exit-level-tag.high { color: #DC2626; background: #FEE2E2; }
.exit-level-tag.higher { color: #D97706; background: #FEF3C7; }
.exit-level-tag.mid { color: #2563EB; background: #EFF6FF; }
.exit-level-tag.lower,
.exit-level-tag.low { color: #059669; background: #D1FAE5; }

.target-trend-card,
.govstats-chart-card {
  margin-top: 16px;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  display: block;
  min-height: 280px;
}

.target-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.target-chart-head b {
  color: var(--navy);
  font-size: 16px;
}

.target-chart-head span {
  display: block;
  margin-top: 4px;
  color: rgba(22, 57, 84, 0.68);
  font-size: 12px;
}

.target-chart-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(38, 112, 184, 0.1);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.target-view-switch {
  display: inline-flex;
  gap: 8px;
}

.target-progress {
  width: 100px;
  height: 6px;
  border-radius: 999px;
  background: #E8F3FF;
  overflow: hidden;
  display: inline-flex;
  vertical-align: middle;
  margin-right: 8px;
}

.target-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #33669E;
}

.target-status.excellent { color: #2B5485; background: #E8F3FF; }
.target-status.ok { color: #059669; background: #ECFDF5; }
.target-status.warn { color: #DC2626; background: #FEF2F2; }
.target-status.pending { color: #D97706; background: #FFFBEB; }
.target-status.locked { color: #6b7280; background: #F1F5F9; }

/* ── Security banner ── */
.target-security-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  padding: 10px 18px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(37,99,235,0.06) 0%, rgba(37,99,235,0.02) 100%);
  border: 1px solid rgba(37,99,235,0.13);
  font-size: 13px;
  color: #334155;
}
.target-security-banner-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #2563eb;
}
.target-security-level {
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(37,99,235,0.10);
  font-size: 12px;
}
.target-security-desc {
  color: #64748b;
  font-size: 12.5px;
}
.target-security-banner-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.target-security-user {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: #475569;
}
.target-security-class {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(239,68,68,0.08);
  color: #dc2626;
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* ── Masked / no-permission rows ── */
.target-row-masked td {
  opacity: 0.55;
}
.target-row-masked .masked-cell {
  color: #9ca3af;
  font-style: italic;
  letter-spacing: 2px;
}
.target-progress.masked span {
  background: #e5e7eb !important;
}
.target-no-permission {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 4px;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.04);
  border: 1px solid rgba(239, 68, 68, 0.12);
  color: #b91c1c;
  font-size: 13px;
}
.target-no-permission svg { flex-shrink: 0; color: #dc2626; }

/* ── Login account selector ── */
.login-account-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  color: #1e293b;
  background: #fff;
  margin-bottom: 2px;
  appearance: auto;
}
.login-account-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.12);
}
.login-account-hint {
  font-size: 11.5px;
  color: #94a3b8;
  margin-bottom: 8px;
}

.target-list-card {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(20, 57, 88, 0.06);
  background: rgba(248, 251, 255, 0.84);
}

.target-list-card.warning {
  background: rgba(255, 248, 248, 0.92);
  border-color: rgba(197, 48, 48, 0.1);
}

.target-list-card h4 {
  margin: 0 0 12px;
  font-size: 15px;
  color: #16a34a;
  display: flex;
  align-items: center;
  gap: 5px;
}
.target-list-card.warning h4 {
  color: #dc2626;
}

.target-list-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.target-list-card li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
}

.target-empty-chart {
  min-height: 220px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(246, 249, 253, 0.86);
  color: rgba(22, 57, 84, 0.66);
}

/* ══════════════════════════════════════════════════════════
   Target Page — Editorial Layout
   ══════════════════════════════════════════════════════════ */
.target-page {
  gap: 18px;
  align-content: start;
  background: transparent;
}

/* ===== jjmbkh.html style overrides for 政府目标督查 page ===== */
/* Card panels — match jjmbkh .card */
.target-page .target-panel {
  border-radius: 16px;
  border: 1px solid #E8F3FF;
  padding: 20px;
  box-shadow: none;
}
.target-page .target-panel::after { display: none; }

/* Panel head — jjmbkh .card-title (border-left bar, no bottom border) */
.target-page .target-panel-head {
  margin-bottom: 16px;
  padding-bottom: 0;
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.target-page .target-panel-head h3 {
  font-size: 15px;
  font-weight: 600;
  color: #2B5485;
  border-left: 4px solid #33669E;
  padding-left: 12px;
  line-height: 1.2;
}

/* Filter bar — jjmbkh .filter-bar */
.target-page .target-control-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid #E8F3FF;
  border-radius: 12px;
}
.target-page .target-control-bar select,
.target-page .target-control-bar input {
  height: 38px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #E8F3FF;
  background: #fff;
  color: #1F2937;
  font-size: 13px;
}
.target-page .target-control-bar input { flex: 1 1 240px; min-width: 200px; }
.target-page .target-control-bar .btn {
  height: 38px;
  min-height: 38px;
  border-radius: 6px;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  border: none;
}
.target-page .target-control-bar .btn.primary {
  background: #33669E;
  color: #fff;
}
.target-page .target-control-bar .btn.primary:hover { background: #2B5485; }
.target-page .target-control-bar .btn.reset {
  background: #E8F3FF;
  color: #33669E;
}
.target-page .target-control-bar .btn.reset:hover { background: #D4E6F8; }

/* Stat cards — jjmbkh .stat-card (plain white, no border accent) */
.target-page .target-stat-card {
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid #E8F3FF;
  background: #fff;
  box-shadow: none;
}
.target-page .target-stat-card span {
  font-size: 13px;
  color: #666;
  margin-bottom: 2px;
}
.target-page .target-stat-card strong {
  font-size: 28px;
  font-weight: 800;
  color: #2B5485;
}
.target-page .target-stat-card em { font-size: 12px; color: #9CA3AF; }

/* Trend bars — jjmbkh .trend-container / .trend-bar (HTML divs, not SVG) */
.target-trend-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 4px 0;
  height: 200px;
}
.target-trend-item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}
.target-trend-bar {
  width: 100%;
  max-width: 38px;
  background: #33669E;
  border-radius: 6px 6px 0 0;
  transition: opacity 0.2s;
}
.target-trend-bar:hover { opacity: 0.85; }
.target-trend-value {
  font-size: 12px;
  font-weight: 600;
  color: #2B5485;
  font-family: var(--font-mono);
}
.target-trend-year {
  font-size: 12px;
  color: #6B7280;
  margin-top: 2px;
}

/* Suggest items — jjmbkh .suggest-item */
.target-page .target-suggest-item {
  background: #F8FAFF;
  padding: 14px 16px;
  border-radius: 10px;
  color: #2B5485;
  font-size: 13.5px;
  line-height: 1.7;
  border-left: 3px solid #33669E;
  flex: 0 0 auto;
}
.target-page .target-suggest-list { gap: 12px; }

/* Compare tabs — jjmbkh .compare-tab (right-aligned pills above table) */
.target-page .target-view-tabs {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}
.target-page .target-view-tab {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 20px;
  background: #E8F3FF;
  color: #2B5485;
  text-decoration: none;
  border: none;
}
.target-page .target-view-tab.active {
  background: #33669E;
  color: #fff;
}

/* Comparison table — jjmbkh .rank-table */
.target-page .target-table-wrap { border: none; background: transparent; }
.target-page .target-compare-table thead th {
  background: #F8FAFF;
  color: #2B5485;
  font-weight: 600;
  font-size: 13px;
  padding: 12px 16px;
  border-bottom: 1px solid #E8F3FF;
  text-align: left;
}
.target-page .target-compare-table tbody td {
  padding: 14px 16px;
  font-size: 13px;
  border-bottom: 1px solid #E8F3FF;
  color: #1F2937;
}
.target-page .target-compare-table tbody tr:hover:not(.target-row-masked) {
  background: #F9FBFF;
}
.target-page .target-compare-table .muted { color: #94A3B8; }

/* Status tag — jjmbkh .status-tag */
.target-page .target-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.target-page .target-status.locked {
  background: #F1F5F9;
  color: #64748B;
}
.target-page .target-status.excellent,
.target-page .target-status.ok {
  background: #ECFDF5;
  color: #10B981;
}
.target-page .target-status.warn {
  background: #FEF2F2;
  color: #DC2626;
}
.target-page .target-status.pending {
  background: #FFFBEB;
  color: #D97706;
}

/* Progress bar — jjmbkh .progress-bar */
.target-page .target-progress {
  display: inline-block;
  height: 6px;
  width: 120px;
  background: #E8F3FF;
  border-radius: 3px;
  overflow: hidden;
  vertical-align: middle;
  margin-right: 8px;
}
.target-page .target-progress span {
  display: block;
  height: 100%;
  background: #33669E;
  border-radius: 3px;
}
.target-page .target-progress.masked span { background: #CBD5E1; }
.target-page .target-row-masked .masked-cell { color: #94A3B8; }
/* ===== end jjmbkh overrides ===== */


/* Top bar */
/* target-topbar: now uses decision-topline; legacy kept for tag styles below */
.target-scope-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  color: rgba(220,235,255,0.92);
}
.target-user-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: rgba(255,255,255,0.82);
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.09);
}
.target-class-tag {
  font-size: 10.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255,120,120,0.18);
  color: rgba(255,200,200,0.9);
  font-weight: 600;
}

/* Control bar — jjmbkh filter-bar style */
.target-control-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.target-ctrl-label {
  font-size: 13px;
  font-weight: 600;
  color: #2B5485;
  margin-right: 2px;
}

.target-control-bar select,
.target-control-bar input {
  height: 36px;
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid #D4E1F0;
  background: #fff;
  color: #1F2937;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.target-control-bar select:focus,
.target-control-bar input:focus {
  border-color: #33669E;
  box-shadow: 0 0 0 2px rgba(51,102,158,0.1);
}

.target-control-bar input {
  flex: 1 1 200px;
  min-width: 140px;
}

.target-control-bar .btn {
  min-height: 36px;
  border-radius: 6px;
  padding: 7px 16px;
  font-size: 13px;
}
.target-control-bar .btn.primary {
  background: #33669E;
  color: #fff;
  border-color: #33669E;
}
.target-control-bar .btn.primary:hover {
  background: #2B5485;
}

/* View tabs inside panel head */
.target-panel-head .target-view-tabs {
  margin-bottom: 0;
}

/* Stat strip — jjmbkh stats-grid style */
.target-stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.target-stat-card {
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid #E8F3FF;
  background: #fff;
  display: grid;
  gap: 6px;
}

.target-stat-card.accent {
  background: #fff;
  border-color: #33669E;
}

.target-stat-card.warn {
  background: #FFF5F5;
  border-color: #FCA5A5;
}

.target-stat-card span {
  font-size: 13px;
  color: #6B7280;
}

.target-stat-card strong {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
  color: #2B5485;
}

.target-stat-card.warn strong {
  color: #dc2626;
}

.target-stat-card small {
  font-size: 13px;
  color: #6B7280;
  font-weight: 400;
}

.target-stat-card em {
  font-style: normal;
  color: #9CA3AF;
  font-size: 12px;
  line-height: 1.5;
}

/* Body — two-column layout: main data + side insight */
.target-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: stretch;
}

.target-body-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.target-body-main > .target-panel:last-child {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.target-body-main > .target-panel:last-child .target-table-wrap {
  flex: 1 1 auto;
}

.target-body-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 16px;
  border: 1px solid #E8F3FF;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 20px;
  overflow: hidden;
  gap: 0;
}

.target-body-side .target-panel {
  border: none;
  background: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  overflow: visible;
}

.target-body-side .target-panel::after {
  display: none;
}

.target-body-side .target-panel:last-child {
  flex: 1 1 auto;
}

.target-body-side .target-panel + .target-panel {
  border-top: 1px solid #E8F3FF;
  margin-top: 16px;
  padding-top: 16px;
}

/* Two-column grid — jjmbkh .grid-2 style */
.target-grid-2 {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.target-grid-2 > .target-panel {
  display: flex;
  flex-direction: column;
}

/* Suggest panel fills height */
.target-suggest-panel .target-suggest-list {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Suggest items — jjmbkh .suggest-item style */
.target-suggest-item {
  background: #F8FAFF;
  padding: 14px 16px;
  border-radius: 10px;
  color: #2B5485;
  font-size: 13.5px;
  line-height: 1.8;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  border-left: 3px solid #33669E;
}

.target-suggest-item + .target-suggest-item {
  margin-top: 0;
}

/* Bar chart SVG */
.target-bar-chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.target-bar-rect {
  transition: opacity 0.2s;
}

.target-bar-rect:hover {
  opacity: 0.8;
}

.target-bar-value {
  font-size: 12px;
  font-weight: 700;
  fill: #2B5485;
  font-family: var(--font-mono);
}

.target-bar-year {
  font-size: 11px;
  fill: #6B7280;
}

/* Trend wrap — jjmbkh card style */
.target-trend-wrap {
  padding: 12px 8px 0;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  flex: 1 1 auto;
  display: flex;
  align-items: flex-end;
  min-height: 200px;
}

/* Subject brief (compact summary in sidebar) */
.target-subject-brief {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #E8F3FF;
  background: #F8FAFF;
  margin-bottom: 8px;
}

.target-subject-brief span {
  font-size: 12px;
  color: #6B7280;
}

.target-subject-brief strong {
  font-family: var(--font-mono);
  font-size: 20px;
  line-height: 1.2;
  color: #2B5485;
}
/* Trend */
.target-trend-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.target-trend-top > div {
  display: grid;
  gap: 4px;
}

.target-trend-top b {
  font-size: 15px;
  font-weight: 600;
  color: #2B5485;
}

.target-trend-note {
  display: block;
  color: #6B7280;
  font-size: 12px;
  line-height: 1.7;
}

.target-trend-latest {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #E8F3FF;
  color: #2B5485;
  font-weight: 600;
  white-space: nowrap;
}

/* Compare — view tabs (jjmbkh compare-tab style) */

.target-subject-form select:focus {
  border-color: #33669E;
  box-shadow: 0 0 0 2px rgba(51,102,158,0.1);
}

.target-view-tabs {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 12px;
}

.target-view-tab {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #2B5485;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.2s;
  background: #E8F3FF;
}

.target-view-tab:hover {
  background: #D4E6F8;
}

.target-view-tab.active {
  background: #33669E;
  color: #fff;
  box-shadow: none;
}

/* Table — jjmbkh rank-table style */
.target-table-wrap {
  border-radius: 8px;
  border: none;
  background: transparent;
  overflow: auto;
}

.target-table-wrap .target-compare-table {
  margin: 0;
}

.target-compare-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #F8FAFF;
  color: #2B5485;
  font-weight: 600;
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid #E8F3FF;
  font-size: 13px;
}

.target-compare-table tbody td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid #F0F4FA;
}

.target-table-wrap .target-compare-table th:first-child,
.target-table-wrap .target-compare-table td:first-child {
  width: 42px;
  text-align: center;
  color: #6B7280;
  font-size: 13px;
}

.target-table-wrap .target-compare-table td:nth-child(2) b {
  color: #1F2937;
  font-size: 13px;
}

.target-table-wrap .target-compare-table tbody tr {
  transition: background 0.15s;
}

.target-table-wrap .target-compare-table tbody tr:hover:not(.target-row-masked) {
  background: #F9FBFF;
}

/* Pagination — jjmbkh style */
.target-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0 4px;
  flex-wrap: wrap;
}
.target-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 4px;
  font-size: 13px;
  color: #1F2937;
  text-decoration: none;
  border: 1px solid #E5E7EB;
  background: #fff;
  transition: all 0.2s;
  cursor: pointer;
}
.target-page-link:hover {
  background: #F9FAFB;
  border-color: #93C5FD;
}
.target-page-link.active {
  background: #33669E;
  color: #fff;
  border-color: #33669E;
  font-weight: 600;
  cursor: default;
}
.target-page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 34px;
  font-size: 13px;
  color: #9CA3AF;
}
.target-page-info {
  margin-left: auto;
  font-size: 13px;
  color: #6B7280;
}

/* Insight cards — jjmbkh suggest/card style */
.target-insight-card {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #E8F3FF;
  background: #F8FAFF;
  display: grid;
  gap: 8px;
}

.target-insight-card.highlight {
  border-color: #33669E;
  background: #EFF6FF;
}

.target-insight-kicker {
  display: inline-flex;
  width: max-content;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  background: #E8F3FF;
  color: #2B5485;
  font-size: 11px;
  font-weight: 600;
}

.target-insight-card h4 {
  margin: 0;
  font-size: 14px;
  color: #2B5485;
}

.target-insight-card b {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  color: #2B5485;
}

.target-insight-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #6B7280;
}

.target-insight-rank-list {
  display: grid;
  gap: 8px;
}

.target-insight-rank {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #E8F3FF;
  background: #fff;
}

.target-insight-rank.empty {
  opacity: 0.7;
}

.target-insight-rank span {
  font-size: 11px;
  color: #9CA3AF;
}

.target-insight-rank b {
  font-size: 14px;
  line-height: 1.4;
  color: #1F2937;
}

.target-insight-rank em {
  font-style: normal;
  color: #6B7280;
  font-size: 12px;
}

.target-insight-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.target-insight-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 4px;
  background: #E8F3FF;
  color: #2B5485;
  font-size: 11px;
  font-weight: 600;
}

/* Subject — jjmbkh style */
.target-subject-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #E8F3FF;
  background: #F8FAFF;
}

.target-subject-form {
  display: flex;
  gap: 8px;
  flex: 1 1 220px;
}

.target-subject-form select {
  height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid #E8F3FF;
  background: #fff;
  font-size: 12px;
  color: #1F2937;
  max-width: none;
  outline: none;
  flex: 1 1 auto;
}

.target-subject-form .btn {
  min-height: 36px;
  border-radius: 6px;
}

.target-subject-label {
  font-size: 12px;
  color: #6B7280;
  font-weight: 600;
}

.target-subject-spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #E8F3FF;
  background: #F8FAFF;
}

.target-subject-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #2B5485;
}

.target-subject-spotlight-main h4 {
  margin: 8px 0 0;
  font-size: 18px;
  color: #1F2937;
  text-wrap: balance;
}

.target-subject-spotlight-main p {
  margin: 8px 0 0;
  color: #6B7280;
  font-size: 12px;
  line-height: 1.75;
}

.target-subject-score {
  min-width: 120px;
  padding: 12px 14px;
  border-radius: 12px;
  display: grid;
  gap: 4px;
  align-content: center;
  background: #F8FAFF;
  border: 1px solid #E8F3FF;
}

.target-subject-score span {
  font-size: 11px;
  color: #6B7280;
}

.target-subject-score strong {
  font-family: var(--font-mono);
  font-size: 22px;
  line-height: 1.15;
}

.target-subject-score em {
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
}

.target-subject-score.excellent {
  background: #EFF6FF;
  border-color: rgba(51, 102, 158, 0.2);
}

.target-subject-score.excellent strong,
.target-subject-score.excellent em {
  color: #33669E;
}

.target-subject-score.ok {
  background: #ECFDF5;
  border-color: rgba(16, 185, 129, 0.2);
}

.target-subject-score.ok strong,
.target-subject-score.ok em {
  color: #059669;
}

.target-subject-score.warn {
  background: #FEF2F2;
  border-color: rgba(239, 68, 68, 0.2);
}

.target-subject-score.warn strong,
.target-subject-score.warn em {
  color: #DC2626;
}

.target-subject-score.pending {
  background: #FFFBEB;
  border-color: rgba(217, 119, 6, 0.2);
}

.target-subject-score.pending strong,
.target-subject-score.pending em {
  color: #D97706;
}

.target-subject-mini-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.target-mini-stat {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #E8F3FF;
  background: #F8FAFF;
  display: grid;
  gap: 4px;
}

.target-mini-stat span {
  font-size: 11px;
  color: #6B7280;
}

.target-mini-stat strong {
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1.2;
  color: #2B5485;
}

.target-subject-list-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 10px;
}

.target-list-card {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #E8F3FF;
  background: #F8FAFF;
}

.target-list-card.warning {
  background: #FEF2F2;
  border-color: #FCA5A5;
}

.target-list-card h4 {
  margin: 0 0 8px;
  font-size: 13px;
  color: #16a34a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.target-list-card.warning h4 {
  color: #dc2626;
}

.target-list-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.target-ind-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.target-ind-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #E8F3FF;
  background: #fff;
  font-size: 12px;
}

.target-ind-list li b {
  color: #1F2937;
  font-weight: 600;
}

.target-ind-list li span {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #2B5485;
  white-space: nowrap;
}

/* Target page responsive */
@media (max-width: 1080px) {
  .target-body {
    grid-template-columns: 1fr;
  }

  .target-body-side {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .target-body-side .target-panel {
    flex: 1 1 280px;
    min-width: 0;
  }

  .target-body-side .target-panel + .target-panel {
    border-top: none;
    border-left: 1px solid #E8F3FF;
    margin-top: 0;
    padding-top: 0;
    margin-left: 20px;
    padding-left: 20px;
  }
}

@media (max-width: 900px) {
  .target-stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .target-grid-2 {
    grid-template-columns: 1fr;
  }

  .target-control-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .target-trend-top,
  .target-subject-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 700px) {
  .target-stat-strip {
    grid-template-columns: 1fr;
  }

  .target-subject-mini-stats {
    grid-template-columns: 1fr;
  }

  .target-subject-form,
  .target-view-tabs {
    flex-direction: column;
  }

  .target-view-tabs { display: grid; }
  .target-view-tab { text-align: center; }
}

/* ══════════════════════════════════════════════════════════
   Government Stats Page — zftjsj.html flat style overrides
   ══════════════════════════════════════════════════════════ */
.govstats-page {
  gap: 20px;
}

.govstats-page > :not(.decision-topline),
.govstats-page > :not(.decision-topline) * {
  font-family: "Inter", sans-serif;
}

.govstats-page .govstats-panel {
  border-radius: 12px;
  border: 1px solid #E8F3FF;
  background: #fff;
  box-shadow: none;
  padding: 20px;
}

.govstats-page .govstats-panel::after {
  display: none;
}

.govstats-page .govstats-panel-head {
  border-bottom: none;
  margin-bottom: 20px;
  padding-bottom: 0;
  gap: 8px;
}

.govstats-page .govstats-panel-head h3 {
  font-size: 16px;
  font-weight: 600;
  color: #2B5485;
  letter-spacing: 0;
}

.govstats-page .govstats-panel-head span {
  font-size: 11px;
  color: #666;
  font-weight: 400;
}

.govstats-page .govstats-macro-head {
  align-items: center;
}

.govstats-page .govstats-macro-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.govstats-page .govstats-macro-actions .btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #E8F3FF;
  background: #F8FAFC;
  color: #33669E;
  font-size: 13px;
}

.govstats-page .govstats-macro-actions .btn.primary {
  border-color: #33669E;
  background: #33669E;
  color: #fff;
}

/* Filter panel — zftjsj 1:1 */
.govstats-filter-panel {
  background: #F8FAFF;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #E8F3FF;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.govstats-filter-panel .govstats-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.govstats-filter-panel .govstats-filter-label {
  font-size: 12px;
  color: #666;
}

.govstats-filter-panel select,
.govstats-filter-panel input {
  padding: 8px 12px;
  border: 1px solid #E8F3FF;
  border-radius: 6px;
  outline: none;
  font-size: 13px;
  color: #000;
  background: #fff;
  width: 180px;
}

.govstats-filter-panel select:focus,
.govstats-filter-panel input:focus {
  border-color: #33669E;
  box-shadow: 0 0 0 2px rgba(51,102,158,0.08);
}

.govstats-filter-panel input {
  flex: 1;
  min-width: 180px;
  width: auto;
}

.govstats-filter-panel .btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
}

.govstats-filter-panel .btn.primary {
  background: #33669E;
  color: #fff;
}

.govstats-filter-panel .btn.primary:hover {
  background: #2B5485;
}

.govstats-filter-panel .btn:not(.primary) {
  background: #F8FAFC;
  color: #33669E;
  border: 1px solid #E8F3FF;
}

.govstats-filter-panel .btn:not(.primary):hover {
  background: #EDF4FC;
}

/* Stat row — zftjsj macro-stats: vertical columns */
.govstats-stats-row {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  padding: 0;
}

.govstats-stats-row .govstats-stat-item {
  display: flex;
  flex-direction: column;
}

.govstats-stats-row .govstats-stat-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 4px;
}

.govstats-stats-row .govstats-stat-value {
  font-family: "Inter", sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #2B5485;
  line-height: 1.15;
}

.govstats-stats-row .govstats-stat-rate {
  font-family: "Inter", sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #10B981;
  line-height: 1.25;
}

/* Chart card — full width, clean */
.govstats-page .govstats-chart-card {
  position: relative;
  min-height: 280px;
  height: 280px;
  margin: 0 0 20px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  max-width: 100%;
  overflow: visible;
}

/* Indicator filter — zftjsj 1:1 */
.govstats-indicator-filter {
  background: #F8FAFF;
  border-radius: 12px;
  padding: 16px;
  border: none;
}

.govstats-indicator-filter .govstats-group-list {
  margin-bottom: 16px;
}

.govstats-indicator-filter .govstats-chip-list {
  gap: 8px;
}

/* Table module — zftjsj 1:1 */
.govstats-page .govstats-doc-toolbar {
  margin-bottom: 14px;
}

.govstats-page .govstats-doc-toolbar .pill {
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 6px;
}

.govstats-page .govstats-doc-table {
  width: 100%;
  border-collapse: collapse;
}

.govstats-page .govstats-doc-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #2B5485;
  background: #F8FAFF;
  border-bottom: 1px solid #E8F3FF;
  font-size: 13px;
}

.govstats-page .govstats-doc-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #E8F3FF;
  color: #000;
  font-size: 13px;
  line-height: 1.6;
}

.govstats-page .govstats-doc-table td b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #000;
  margin-bottom: 2px;
}

.govstats-page .govstats-doc-table td .muted {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
}

.govstats-page .govstats-doc-table tbody tr {
  transition: background 0.15s;
}

.govstats-page .govstats-doc-table tbody tr:hover {
  background: #F9FBFF;
}

.govstats-page .govstats-doc-table .btn.tiny {
  font-size: 13px;
  color: #33669E;
  font-weight: 500;
  cursor: pointer;
}

/* Pagination within govstats */
.govstats-page .exit-pagination {
  margin-top: 18px;
}

.govstats-page .exit-pagination-meta {
  font-size: 12px;
  color: #666;
}

/* SVG trend chart — zftjsj style */
.govstats-page .trend-chart-svg {
  display: block;
  width: 100%;
  height: 280px;
}

.govstats-page .govstats-reference-chart {
  --govstats-ref-side-gap: clamp(36px, 6%, 72px);
  position: relative;
  height: 280px;
  margin-bottom: 20px;
  overflow: visible;
}

.govstats-page .govstats-reference-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--govstats-ref-side-gap);
  width: calc(100% - var(--govstats-ref-side-gap) - var(--govstats-ref-side-gap));
  z-index: 1;
}

.govstats-page .govstats-reference-line .trend-line {
  stroke: #33669E;
  stroke-width: 2;
  fill: none;
}

.govstats-page .govstats-ref-x-axis {
  position: absolute;
  left: var(--govstats-ref-side-gap);
  right: var(--govstats-ref-side-gap);
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  padding: 0 4.75%;
}

.govstats-page .govstats-ref-y-axis {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 0;
}

.govstats-page .govstats-ref-x-axis span,
.govstats-page .govstats-ref-y-axis span {
  color: #666;
  font-size: 12px;
  font-family: "Inter", sans-serif;
  line-height: 1.2;
}

.govstats-page .trend-chart-svg circle {
  fill: #33669E;
  stroke: #fff;
  stroke-width: 2;
}

.govstats-page .trend-dots circle.trend-dot {
  fill: #33669E;
  stroke: #fff;
  stroke-width: 2;
  opacity: 0;
}

.govstats-page .trend-line {
  stroke: #33669E;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.govstats-page .trend-line.forecast {
  stroke: #10B981;
  stroke-width: 2;
  stroke-dasharray: 6 4;
  fill: none;
}

.govstats-page .trend-grid line {
  stroke: transparent;
  stroke-width: 1;
}

.govstats-page .trend-axis-labels text {
  fill: #666;
  font-size: 10px;
}

.govstats-page .trend-y-labels text {
  fill: #666;
  font-size: 9px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .govstats-filter-panel {
    padding: 12px;
    gap: 12px;
  }

  .govstats-filter-panel select,
  .govstats-filter-panel input {
    width: auto;
    min-width: 120px;
  }

  .govstats-stats-row {
    flex-wrap: wrap;
    gap: 16px;
  }

  .govstats-stats-row .govstats-stat-value {
    font-size: 22px;
  }

  .govstats-stats-row .govstats-stat-rate {
    font-size: 16px;
  }

  .govstats-page .govstats-panel {
    padding: 16px;
  }
}

.govstats-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.govstats-side {
  display: none;
}

.govstats-side-link {
  display: none;
}

.govstats-side-link:hover {
  display: none;
}

.govstats-side-link.active {
  display: none;
}

.govstats-main {
  display: grid;
  gap: 18px;
}

.govstats-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.govstats-group-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

/* Section labels inside indicator filter */
.govstats-indicator-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.govstats-indicator-section + .govstats-indicator-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #E8F3FF;
}

.govstats-indicator-title {
  font-size: 12px;
  font-weight: 600;
  color: #2B5485;
}

/* 上级指标 — group chips: zftjsj indicator-tab style */
.govstats-group-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 20px;
  border: none;
  background: #E8F3FF;
  color: #2B5485;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.govstats-group-chip:hover {
  background: #D4E6F8;
}

.govstats-group-chip.active {
  background: #33669E;
  color: #fff;
}

/* 下级指标 — metric chips: smaller, lighter bg */
.govstats-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 14px;
  border-radius: 20px;
  border: none;
  background: #E8F3FF;
  color: #2B5485;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.govstats-chip:hover {
  background: #D4E6F8;
}

.govstats-chip.active {
  color: #fff;
  background: #5A8DBF;
}

.govstats-viz-list {
  display: grid;
  gap: 10px;
}

.govstats-viz-list article {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(246, 249, 253, 0.92);
  border: 1px solid rgba(20, 57, 88, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.govstats-viz-list b {
  color: var(--navy);
  font-size: 13px;
}

.govstats-viz-list span {
  color: rgba(22, 57, 84, 0.72);
  font-size: 12px;
  text-align: right;
}

.govstats-doc-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.govstats-doc-toolbar .pill {
  padding: 4px 12px;
  border-radius: 6px;
  background: #E8F3FF;
  color: #2B5485;
  font-size: 12px;
  font-weight: 500;
}

.govstats-modal-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: rgba(22, 57, 84, 0.78);
  line-height: 1.72;
}

.trend-chart-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.trend-chart-svg circle {
  fill: var(--accent);
  stroke: #fff;
  stroke-width: 2;
}

.trend-dots circle.trend-dot {
  fill: var(--accent);
  stroke: #fff;
  stroke-width: 1.5;
  opacity: 0.7;
}

.trend-grid line {
  stroke: rgba(20, 57, 88, 0.07);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.trend-axis-labels text {
  fill: rgba(22, 57, 84, 0.56);
  font-size: 11px;
}

.trend-y-labels text {
  fill: rgba(22, 57, 84, 0.48);
  font-size: 10px;
}

.trend-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.trend-line.forecast {
  stroke: rgba(38, 112, 184, 0.44);
  stroke-dasharray: 6 6;
}

@media (max-width: 1320px) {
  .exit-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .exit-layout {
    flex-direction: column;
  }
  .exit-layout > .exit-panel:last-child,
  .exit-layout > aside.exit-panel {
    max-width: none;
  }
  .govstats-layout,
  .govstats-bottom-grid,
  .target-dual-grid {
    grid-template-columns: 1fr;
  }

  .target-summary-grid,
  .govstats-hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .decision-reference-grid,
  .decision-grid {
    grid-template-columns: 1fr;
  }

  .decision-summary-grid,
  .decision-brief-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .decision-analysis-dual {
    grid-template-columns: 1fr;
  }

  .decision-double-col,
  .decision-brief-body {
    grid-template-columns: 1fr;
  }

  .decision-library-highlight {
    grid-template-columns: 1fr 1fr;
  }

  .decision-library-grid {
    grid-template-columns: 1fr;
  }

  .kp-bottom-panels {
    grid-template-columns: 1fr;
  }

  .decision-brief-metrics,
  .decision-analysis-cards,
  .decision-analysis-grid,
  .decision-analysis-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .decision-library-highlight {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .kp-dashboard {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "track"
      "table";
  }

  .kp-overview-band {
    grid-template-columns: 1fr 1fr;
  }

  .kp-ref-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kp-ref-chart-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .kp-overview-band {
    grid-template-columns: 1fr;
  }

  .kp-ref-summary-grid {
    grid-template-columns: 1fr;
  }

  .kp-ref-table-head,
  .kp-ref-table-toolbar {
    align-items: stretch;
  }

  .kp-ref-table-toolbar .kp-search-form,
  .kp-ref-table-actions,
  .kp-ref-filter-controls {
    width: 100%;
  }

  .kp-ref-table-toolbar .kp-search-form input {
    width: 100%;
    min-width: 0;
  }

  .kp-ref-filter-controls {
    flex-wrap: wrap;
  }

  .kp-ref-directory-btn {
    width: 100%;
    justify-content: center;
  }

  .exit-focus-content {
    flex-direction: column;
    align-items: stretch;
  }

  .exit-focus-status {
    justify-content: flex-start;
  }

  .exit-panel-head,
  .target-panel-head,
  .govstats-panel-head,
  .target-chart-head,
  .target-filter-bar,
  .target-filter-form,
  .govstats-filter-bar,
  .exit-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .exit-summary-grid,
  .target-summary-grid,
  .govstats-hero-grid {
    grid-template-columns: 1fr 1fr;
  }

  .exit-table-wrap {
    max-height: none;
  }

  .exit-disposal-grid {
    flex-direction: column;
  }

  .kp-filter-bar,
  .decision-filter-bar,
  .decision-toolbar,
  .kp-detail-header,
  .decision-topline {
    flex-direction: column;
    align-items: stretch;
  }

  .kp-detail-grid {
    grid-template-columns: 1fr;
  }

  .kp-metric-row {
    grid-template-columns: 1fr;
  }

  .decision-brief-metrics,
  .decision-analysis-head,
  .decision-analysis-cards,
  .decision-analysis-grid,
  .decision-analysis-metrics {
    grid-template-columns: 1fr;
    display: grid;
  }

  .decision-analysis-dual {
    gap: 12px;
  }
}

/* Responsive */
@media (max-width: 700px) {
  .exit-summary-grid,
  .target-summary-grid,
  .govstats-hero-grid {
    grid-template-columns: 1fr;
  }

  .pm-home-header { padding: 20px 18px; flex-direction: column; align-items: flex-start; }
  .pm-home-btns { flex-direction: column; }
  .pm-home-btn { min-width: unset; width: 100%; }
  .pm-ent-search-row { flex-direction: column; }
  .pm-ent-search-btn { width: 100%; }
  .pm-form-grid { grid-template-columns: 1fr; }
  .pm-charts-row { grid-template-columns: 1fr; }
  .pm-result-summary { flex-direction: column; }
  .pm-gov-dashboard { flex-direction: column; }
  .pm-policy-info { grid-template-columns: 1fr; }
  .pm-filter-bar { flex-direction: column; align-items: stretch; }
  .pm-filter-actions { margin-left: 0; }
  .decision-brief-switch,
  .decision-card-tabs,
  .kp-search-form,
  .decision-search-form,
  .decision-tabs { width: 100%; }

  .decision-mode-switch {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .decision-mode-btn {
    width: 100%;
  }

  .decision-range-form {
    width: 100%;
  }

  .decision-range-form-compact {
    flex-wrap: wrap;
  }

  .decision-filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .decision-filter-row-search .decision-search-form {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .decision-range-form input,
  .decision-range-form .btn {
    width: 100%;
  }
  .decision-summary-grid { grid-template-columns: 1fr; }
  .kp-search-form input,
  .decision-search-form input { width: 100%; }
  .kp-map-stage { min-height: 300px; }
  .kp-map-badges {
    right: 14px;
    gap: 6px;
  }
  .kp-map-focus-card {
    width: 170px;
  }
  .kp-map-marker-label {
    max-width: 138px;
  }
  .kp-map-legend {
    bottom: 52px;
  }
}

/* Login page */
.login-page {
  --login-blue: #245485;
  --login-blue-dark: #173557;
  --login-orange: #f49a35;
  --login-border: #d8e3ee;
  --login-text: #12263f;
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(440px, 560px);
  min-height: 100vh;
  color: var(--login-text);
  background-color: #071e43;
  background-image:
    linear-gradient(90deg, rgba(4, 24, 51, 0.5) 0%, rgba(4, 24, 51, 0.2) 56%, rgba(4, 24, 51, 0.08) 100%),
    url("./login-whale-background.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  font-family: var(--font-sans);
  overflow: hidden;
}

.login-left {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 52px clamp(36px, 7vw, 96px);
  color: #fff;
}

.login-left-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-image: linear-gradient(rgba(255,255,255,0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.12) 1px, transparent 1px), linear-gradient(135deg, transparent 0 42%, rgba(255,255,255,0.18) 42% 43%, transparent 43% 100%);
  background-size: 54px 54px, 54px 54px, 360px 220px;
  pointer-events: none;
}

.login-left-content {
  position: relative;
  display: grid;
  grid-template-columns: 64px max-content;
  align-items: start;
  justify-content: start;
  gap: 16px;
  width: min(820px, 100%);
}

.login-brand-copy {
  min-width: 0;
}

.login-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.login-brand-title {
  margin: 0 0 16px;
  color: #fff;
  font-size: 56px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.08;
  white-space: nowrap;
  text-shadow: 0 4px 22px rgba(2, 18, 41, 0.3);
}

.login-brand-kicker { font-size: 14px; color: rgba(255,255,255,0.76); letter-spacing: 1.5px; }
.login-brand-title {
  margin: 0 0 16px;
  color: #fff;
  font-size: 56px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.08;
  white-space: nowrap;
  text-shadow: 0 4px 22px rgba(2, 18, 41, 0.3);
}
.login-brand-edition {
  margin-left: 10px;
  color: rgba(235, 245, 255, 0.88);
  font-size: 0.46em;
  font-weight: 700;
  vertical-align: 0.14em;
}
.login-brand-sub {
  margin: 0;
  color: rgba(235,245,255,0.82);
  font-size: 17px;
  letter-spacing: 0;
  text-shadow: 0 3px 14px rgba(2, 18, 41, 0.28);
}
.login-brand-mark {
  display: block;
  width: 64px;
  height: 64px;
  margin-top: -2px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(3, 25, 55, 0.3));
}

.login-visual-panel {
  position: relative;
  width: min(430px, 100%);
  height: 126px;
  margin: 34px 0 26px;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.16);
  background:
    radial-gradient(circle at 28% 48%, rgba(139,203,255,0.34), transparent 20%),
    radial-gradient(circle at 66% 34%, rgba(255,255,255,0.18), transparent 18%),
    linear-gradient(135deg, rgba(255,255,255,0.11), rgba(255,255,255,0.05));
  box-shadow: 0 22px 60px rgba(0,0,0,0.15);
  backdrop-filter: blur(10px);
}

.login-brand-sub {
  margin: 0;
  color: rgba(235,245,255,0.82);
  font-size: 17px;
  letter-spacing: 0;
  text-shadow: 0 3px 14px rgba(2, 18, 41, 0.28);
}

.login-brand-mark {
  display: block;
  width: 64px;
  height: 64px;
  margin-top: -2px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(3, 25, 55, 0.3));
}
.login-right { display: flex; align-items: center; justify-content: center; padding: 46px clamp(28px, 5vw, 72px) 46px 20px; }
.login-card { position: relative; width: min(462px, 100%); min-height: 660px; padding: 32px 40px 26px; overflow: clip; border-radius: 18px; background: rgba(255,255,255,0.98); border: 1px solid rgba(216,227,238,0.78); box-shadow: 0 28px 90px rgba(11,34,61,0.26); }
.login-card-header { margin: 2px 0 20px; }
.login-card-kicker { margin: 0 0 8px; color: var(--login-orange); font-size: 12px; font-weight: 800; letter-spacing: 1.6px; }
.login-card-title { margin: 0; color: var(--login-text); font-size: 26px; line-height: 1.25; font-weight: 800; }
.login-card-subtitle { margin: 10px 0 0; color: #6b7f95; font-size: 13px; line-height: 1.6; }

.login-tabs { display: flex; gap: 28px; margin-bottom: 22px; border-bottom: 1px solid #e5edf5; }
.login-tab { position: relative; flex: none; padding: 0 0 12px; border: 0; background: transparent; color: #65778b; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.login-tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: transparent; }
.login-tab:hover, .login-tab.active { color: #1f64a7; }
.login-tab.active::after { background: #1f64a7; }

.login-form { display: flex; flex-direction: column; gap: 13px; }
.login-field label { display: block; margin: 0 0 7px; color: #40566f; font-size: 13px; font-weight: 700; }
.login-field input, .login-account-select { width: 100%; height: 46px; padding: 0 14px; border: 1px solid #d8e3ee; border-radius: 8px; outline: none; background: #f8fbfe; color: #172b44; font-size: 14px; font-family: inherit; transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease; }
.login-field input:focus, .login-account-select:focus { border-color: #2d76bd; background: #fff; box-shadow: 0 0 0 3px rgba(45,118,189,0.12); }
.login-field input::placeholder { color: #aebdcb; }
.login-account-select { appearance: auto; margin-bottom: 0; }
.login-account-hint { margin: 7px 0 0; color: #8aa0b7; font-size: 12px; }
.login-captcha-row { display: grid; grid-template-columns: minmax(0, 1fr) 108px; gap: 10px; align-items: stretch; }
.login-captcha-img { width: 108px; height: 46px; border-radius: 8px; border: 1px solid #d8e3ee; background: #f8fbfe; object-fit: contain; cursor: pointer; }
.login-agree { display: flex; align-items: flex-start; gap: 8px; color: #637a92; font-size: 13px; line-height: 1.5; cursor: pointer; }
.login-agree input[type="checkbox"] { margin-top: 3px; accent-color: #1f64a7; }
.login-link { color: #1f64a7; text-decoration: none; }
.login-link:hover { text-decoration: underline; }
.login-actions-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.login-btn { width: 100%; height: 48px; border: 0; border-radius: 8px; background: linear-gradient(90deg, #2c6fad, #3f86d5); color: #fff; font: inherit; font-size: 16px; font-weight: 800; letter-spacing: 4px; cursor: pointer; box-shadow: 0 12px 26px rgba(45,118,189,0.24); transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease; }
.login-btn:hover { transform: translateY(-1px); background: linear-gradient(90deg, #255f99, #367bc4); box-shadow: 0 16px 32px rgba(45,118,189,0.3); }

.login-other { margin-top: 24px; text-align: center; }
.login-other-label { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; color: #9aa9b8; font-size: 13px; }
.login-other-label::before, .login-other-label::after { content: ""; flex: 1; height: 1px; background: #e5edf5; }
.login-other-icons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.login-other-item { display: grid; justify-items: center; gap: 7px; color: #697b8e; font-size: 11.5px; line-height: 1.25; cursor: pointer; }
.login-other-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; overflow: hidden; border-radius: 50%; background: #e9f3ff; transition: transform 160ms ease, box-shadow 160ms ease; }
.login-other-icon img { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.login-other-blue { background:#e4f0ff; color:#2670b8; }
.login-other-green { background:#def6eb; color:#14854e; }
.login-other-red { background:#fde7e9; color:#cf4552; }
.login-other-sky { background:#e2f1ff; color:#2a76b8; }
.login-other-item:hover .login-other-icon { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(31,100,167,0.14); }
.login-footer-hint { margin: 18px 0 0; text-align: center; color: #9aa9b8; font-size: 13px; }

.login-qr-corner { position: absolute; top: 10px; right: 10px; z-index: 3; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; cursor: pointer; transition: opacity 0.35s var(--ease-smooth), transform 0.35s var(--ease-out), background 160ms ease; }
.login-qr-corner:hover { background: #eef6ff; }
.login-qr-corner svg { display: block; }
.login-qr-tooltip { position: absolute; top: 0; right: 42px; padding: 5px 10px; border-radius: 6px; background: #ff9c73; color: #fff; white-space: nowrap; font-size: 12px; font-weight: 700; pointer-events: none; animation: login-qr-tooltip-pulse 2.5s ease-in-out infinite; }
.login-qr-tooltip::after { content: ""; position: absolute; top: 50%; right: -6px; transform: translateY(-50%); border: 4px solid transparent; border-left-color: #ff9c73; }
@keyframes login-qr-tooltip-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.65; } }
.login-qr-corner.hidden { opacity: 0; pointer-events: none; transform: scale(0.5); }
.login-qr-panel { display: flex; flex-direction: column; align-items: center; padding: 54px 0 0; opacity: 1; transform: translateX(0); transition: opacity 0.4s var(--ease-smooth), transform 0.4s var(--ease-out); position: relative; }
.login-qr-panel.hidden { position: absolute; top: 42px; left: 40px; right: 40px; opacity: 0; transform: translateX(30px); pointer-events: none; }
.login-account-panel { position: relative; opacity: 1; transform: translateX(0); transition: opacity 0.4s var(--ease-smooth), transform 0.4s var(--ease-out); }
.login-account-panel.hidden { position: absolute; top: 34px; left: 40px; right: 40px; opacity: 0; transform: translateX(-30px); pointer-events: none; }
.login-qr-back { align-self: flex-start; border: 0; background: transparent; color: #1f64a7; font: inherit; font-size: 14px; cursor: pointer; margin-bottom: 22px; }
.login-qr-back:hover { text-decoration: underline; }
.login-qr-code { padding: 14px; border-radius: 16px; border: 1px solid #e5edf5; background: #fff; box-shadow: 0 16px 38px rgba(15,46,78,0.08); line-height: 0; }
.login-qr-hint { margin: 18px 0 0; color: #60768c; font-size: 14px; }

.login-brand-row, .login-brand-badge, .login-portal-hint, .login-portal-info, .login-portal-check, .login-left-footer, .login-shield, .login-slogan, .login-sub-slogan { display: none; }

@media (max-width: 1180px) {
  .login-page { grid-template-columns: minmax(420px, 1fr) minmax(420px, 500px); }
  .login-left { padding: 44px 40px; }
  .login-left-content { grid-template-columns: 52px max-content; gap: 14px; }
  .login-brand-title { font-size: 44px; }
  .login-brand-mark { width: 52px; height: 52px; }
}
@media (max-width: 960px) {
  .login-page { width: 100%; max-width: 100vw; grid-template-columns: minmax(0, 1fr); min-height: auto; overflow: auto; }
  .login-left { padding: 36px 24px 20px; }
  .login-left-content { width: min(680px, 100%); }
  .login-right { width: 100%; min-width: 0; padding: 20px 24px 40px; }
  .login-card { width: 100%; max-width: 462px; min-height: 0; }
}
@media (max-width: 640px) {
  .login-left { padding: 30px 20px 18px; }
  .login-left-content { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
  .login-brand-title { font-size: 38px; white-space: normal; }
  .login-brand-edition { display: block; margin: 8px 0 0; font-size: 0.5em; vertical-align: baseline; }
  .login-brand-sub { font-size: 15px; }
  .login-brand-mark { width: 44px; height: 44px; }
  .login-right { padding: 16px 16px 28px; }
  .login-other-icons { grid-template-columns: 1fr 1fr; }
  .login-card { padding: 28px 22px 24px; }
  .login-captcha-row { grid-template-columns: 1fr; }
  .login-captcha-img { width: 100%; }
  .login-qr-tooltip { display: none; }
}

/* ══════════════════════════════════════════
   Portal home (政府端首页)
   ══════════════════════════════════════════ */
/* ── Portal home (inside shell) ── */
.portal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #1a3a5c 0%, #22577a 100%);
  color: #fff;
  padding: 0 20px;
  min-height: 48px;
  border-radius: 10px;
  border: none;
  box-shadow: 0 2px 12px rgba(20, 50, 80, 0.18);
}
.portal-topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.portal-topbar-brand svg {
  color: #7ecbff;
}

.portal-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}
.portal-topbar-brand strong {
  display: block;
  font-size: 17px;
  line-height: 1.15;
  letter-spacing: 0.02em;
}
.portal-topbar-brand em {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.portal-topbar-icon {
  width: 24px;
  height: 24px;
  color: #9bd9ff;
}
.portal-topbar-note,
.portal-topbar-link,
.portal-topbar-exit {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.portal-topbar-note {
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
}
.portal-topbar-link,
.portal-topbar-exit {
  padding: 0 11px;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.portal-topbar-link:hover,
.portal-topbar-exit:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.30);
  color: #fff;
  transform: translateY(-1px);
}
.portal-topbar-exit {
  font-family: inherit;
}

.portal-home-content {
  background: #e8f0f8;
  min-height: calc(100vh - 48px);
  padding: 0;
}
.portal-standalone-home {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(232, 240, 248, 0.92), rgba(246, 249, 252, 0.98) 58%, #f6f9fc 100%),
    radial-gradient(circle at 15% 10%, rgba(44, 120, 180, 0.12), transparent 34%),
    radial-gradient(circle at 82% 8%, rgba(32, 155, 134, 0.10), transparent 30%);
}
.portal-standalone-home .portal-topbar {
  min-height: 58px;
  border-radius: 0;
  padding: 0 28px;
  box-shadow: 0 2px 14px rgba(20, 50, 80, 0.16);
}
.portal-main {
  width: min(1180px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 20px 0 32px;
}
.portal-hero-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 24px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(43, 84, 133, 0.10);
  box-shadow: 0 8px 24px rgba(22, 55, 86, 0.08);
}
.portal-hero-kicker {
  display: block;
  color: #2670b8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.portal-hero-panel h1 {
  margin: 6px 0 6px;
  color: #142b3f;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: 0;
}
.portal-hero-panel p {
  max-width: 560px;
  margin: 0;
  color: #52687c;
  font-size: 14px;
  line-height: 1.7;
}
.portal-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 10px;
  min-width: 330px;
}
.portal-hero-stats span {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f6f9fc;
  border: 1px solid rgba(43, 84, 133, 0.08);
}
.portal-hero-stats b {
  display: block;
  color: #1f5f99;
  font-size: 21px;
  line-height: 1.1;
}
.portal-hero-stats em {
  display: block;
  margin-top: 5px;
  color: #6b7e8e;
  font-size: 12px;
  font-style: normal;
}
.portal-standalone-home .portal-body {
  max-width: none;
  padding: 18px 0 0;
}

.portal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 18px 24px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.portal-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.portal-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.portal-section-icon {
  font-size: 18px;
}

.portal-card {
  display: block;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #dde5ee;
  border-left: 4px solid #2670b8;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.25s var(--ease-smooth), transform 0.25s var(--ease-out);
  cursor: pointer;
}

.portal-card:hover {
  box-shadow: 0 4px 16px rgba(15,41,66,0.10);
  transform: translateY(-1px);
}

.portal-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.portal-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.portal-card-arrow {
  font-size: 20px;
  color: #aab4c0;
  line-height: 1;
  transition: transform 0.2s;
}

.portal-card:hover .portal-card-arrow {
  transform: translateX(3px);
  color: var(--accent);
}

.portal-card-img {
  width: 100%;
  height: 130px;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 8px;
  position: relative;
}

.portal-card-img-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3);
  letter-spacing: 1.5px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
}

.portal-card-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.portal-card-desc {
  font-size: 12px;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

/* Portal responsive */
@media (max-width: 800px) {
  .portal-standalone-home .portal-topbar {
    align-items: flex-start;
    padding: 12px 14px;
  }
  .portal-topbar-actions {
    justify-content: flex-start;
    width: 100%;
    margin-left: 0;
  }
  .portal-main {
    width: calc(100vw - 24px);
    padding: 12px 0 24px;
  }
  .portal-hero-panel {
    display: block;
    padding: 16px;
  }
  .portal-hero-panel h1 {
    font-size: 24px;
  }
  .portal-hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-width: 0;
    margin-top: 14px;
  }
  .portal-hero-stats span {
    padding: 10px;
  }
  .portal-body {
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 14px;
  }
  .portal-standalone-home .portal-body {
    padding: 14px 0 0;
  }
  .portal-card-img {
    height: 105px;
  }
}

/* AI assistant home page */
.portal-ai-home {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 263px minmax(0, 1fr);
  background: #f4f7fb;
  color: #14243c;
}

.portal-ai-home *,
.portal-ai-home *::before,
.portal-ai-home *::after {
  box-sizing: border-box;
}

.portal-ai-sidebar {
  min-height: 100vh;
  padding: 14px 12px;
  background: #fff;
  border-right: 1px solid #dce5ef;
  position: sticky;
  top: 0;
  align-self: start;
}

.portal-ai-user {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-ai-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef0ff;
  color: #3b4bd8;
  font-size: 13px;
  font-weight: 800;
  flex: 0 0 auto;
}

.portal-ai-user-text {
  min-width: 0;
  flex: 1 1 auto;
  text-align: left;
}

.portal-ai-user-text strong,
.portal-ai-user-text em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

.portal-ai-user-text strong {
  font-size: 14px;
  line-height: 18px;
  color: #0f1f35;
  font-weight: 700;
}

.portal-ai-user-text em {
  margin-top: 1px;
  font-size: 11px;
  line-height: 15px;
  color: #68809d;
}

.portal-ai-collapse,
.portal-ai-top-action {
  border: 0;
  background: transparent;
  color: #5c708c;
  cursor: pointer;
}

.portal-ai-collapse {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.portal-ai-collapse:hover,
.portal-ai-top-action:hover {
  background: #edf3f9;
  color: #28598f;
}

.portal-ai-collapse-icon,
.portal-ai-top-icon,
.portal-ai-search-icon,
.portal-ai-chip-icon,
.portal-ai-feature-svg,
.portal-ai-robot-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.portal-ai-new-chat {
  width: 100%;
  height: 44px;
  margin-top: 12px;
  border: 0;
  border-radius: 10px;
  background: #2d5a8e;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(45, 90, 142, 0.18);
}

.portal-ai-new-chat span {
  font-size: 24px;
  line-height: 1;
  font-weight: 300;
}

.portal-ai-new-chat b {
  font-size: 14px;
  font-weight: 700;
}

.portal-ai-search {
  height: 38px;
  margin-top: 8px;
  padding: 0 12px;
  border-radius: 8px;
  background: #eef2f7;
  color: #6d7f98;
  display: flex;
  align-items: center;
  gap: 8px;
}

.portal-ai-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #22344c;
  font-size: 13px;
}

.portal-ai-search input::placeholder {
  color: #8797ad;
}

.portal-ai-history-title {
  margin: 20px 8px 10px;
  color: #7688a0;
  font-size: 12px;
  text-align: left;
}

.portal-ai-history {
  display: grid;
  gap: 4px;
}

.portal-ai-history-item {
  min-height: 40px;
  border-radius: 8px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #16263c;
  text-decoration: none;
  text-align: left;
}

.portal-ai-history-item:hover {
  background: #eef4fa;
}

.portal-ai-history-dot {
  width: 14px;
  height: 14px;
  border: 1.5px solid #8da0bb;
  border-radius: 50%;
  flex: 0 0 auto;
  position: relative;
}

.portal-ai-history-dot::after {
  content: "";
  width: 5px;
  height: 1.5px;
  background: #8da0bb;
  position: absolute;
  right: -3px;
  bottom: 1px;
  transform: rotate(40deg);
  border-radius: 2px;
}

.portal-ai-history-item b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
}

.portal-ai-main {
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.portal-ai-topbar {
  height: 61px;
  padding: 0 32px 0 24px;
  border-bottom: 1px solid #dfe7f1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portal-ai-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #10213a;
  text-decoration: none;
}

.portal-ai-brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  background: #28598f;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 27px;
  line-height: 1;
  font-weight: 900;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.16);
}

.portal-ai-brand strong {
  font-size: 25px;
  font-weight: 850;
  letter-spacing: 0;
}

.portal-ai-top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.portal-ai-top-action {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.portal-ai-stage {
  width: min(770px, calc(100vw - 323px - 48px));
  margin: 0 auto;
  padding: 62px 0 48px;
  text-align: center;
}

.portal-ai-hero-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: #28598f;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px rgba(40, 89, 143, 0.24);
}

.portal-ai-robot-icon {
  width: 30px;
  height: 30px;
}

.portal-ai-stage h1 {
  margin: 0;
  color: #183f71;
  font-size: 30px;
  line-height: 1.28;
  font-weight: 850;
  letter-spacing: 0;
}

.portal-ai-stage p {
  width: min(560px, 100%);
  margin: 8px auto 30px;
  color: #536782;
  font-size: 14px;
  line-height: 1.7;
}

/* 聊天消息内容里的段落不受 stage 的 560px 限宽影响（报告正文需铺满） */
.portal-ai-stage .ai-chat-content p {
  width: auto;
  max-width: none;
  margin: 0 0 12px;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.portal-ai-composer {
  min-height: 120px;
  padding: 18px 18px 16px;
  border: 1px solid #dbe4ef;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 41, 66, 0.06);
  text-align: left;
}

.portal-ai-placeholder {
  color: #8796ac;
  font-size: 14px;
  line-height: 22px;
  min-height: 34px;
}

.portal-ai-composer-row {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.portal-ai-composer-row button {
  height: 36px;
  border: 1px solid #dbe4ef;
  border-radius: 18px;
  background: #fff;
  color: #4d6380;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

.portal-ai-composer-row button:hover {
  border-color: #b9c9dc;
  color: #28598f;
  background: #f7fafc;
}

.portal-ai-composer-spacer {
  flex: 1 1 auto;
}

.portal-ai-composer-row .portal-ai-round-action,
.portal-ai-composer-row .portal-ai-send {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
}

.portal-ai-composer-row .portal-ai-send {
  border-color: #28598f;
  background: #28598f;
  color: #fff;
  font-size: 23px;
  line-height: 1;
  font-weight: 700;
}

.portal-ai-composer-row .portal-ai-send:hover {
  background: #224d7e;
  color: #fff;
}

.portal-ai-mic-symbol {
  width: 12px;
  height: 18px;
  border: 2px solid #667d9b;
  border-radius: 8px;
  display: inline-block;
  position: relative;
}

.portal-ai-mic-symbol::before {
  content: "";
  width: 18px;
  height: 11px;
  border: 2px solid #667d9b;
  border-top: 0;
  border-radius: 0 0 12px 12px;
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
}

.portal-ai-mic-symbol::after {
  content: "";
  width: 2px;
  height: 7px;
  background: #667d9b;
  border-radius: 2px;
  position: absolute;
  left: 50%;
  bottom: -14px;
  transform: translateX(-50%);
}

.portal-ai-section-label {
  margin: 27px auto 20px;
  width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #8b9bb0;
}

.portal-ai-section-label span {
  height: 1px;
  flex: 1 1 auto;
  background: #d8e1ec;
}

.portal-ai-section-label em {
  font-style: normal;
  white-space: nowrap;
  font-size: 13px;
}

.portal-ai-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.portal-ai-feature-card {
  height: 119px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #fff;
  color: #13243c;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.portal-ai-feature-card:hover {
  transform: translateY(-2px);
  border-color: #b7c9de;
  box-shadow: 0 10px 24px rgba(15, 41, 66, 0.08);
}

.portal-ai-feature-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: #edf4fb;
  color: #28598f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.portal-ai-feature-card strong {
  font-size: 14px;
  line-height: 19px;
  font-weight: 800;
}

.portal-ai-feature-card em {
  margin-top: 1px;
  color: #536782;
  font-size: 12px;
  line-height: 18px;
  font-style: normal;
}

@media (max-width: 900px) {
  .portal-ai-home {
    grid-template-columns: 1fr;
  }

  .portal-ai-sidebar {
    min-height: auto;
    position: static;
    border-right: 0;
    border-bottom: 1px solid #dce5ef;
  }

  .portal-ai-history {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .portal-ai-stage {
    width: min(770px, calc(100vw - 32px));
    padding-top: 42px;
  }
}

@media (max-width: 640px) {
  .portal-ai-topbar {
    padding: 0 16px;
  }

  .portal-ai-brand-mark {
    width: 42px;
    height: 42px;
    font-size: 23px;
  }

  .portal-ai-brand strong {
    font-size: 22px;
  }

  .portal-ai-stage h1 {
    font-size: 25px;
  }

  .portal-ai-composer-row {
    flex-wrap: wrap;
  }

  .portal-ai-composer-spacer {
    display: none;
  }

  .portal-ai-feature-grid,
  .portal-ai-history {
    grid-template-columns: 1fr;
  }
}
/* AI assistant home conversation behavior */
.portal-ai-history-item {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.portal-ai-history-item.is-active {
  background: #eef4fb;
  color: #28598f;
}

.portal-ai-history-text {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.portal-ai-history-text time {
  color: #8b9bb0;
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
}

.portal-ai-history-empty {
  margin: 6px 8px 0;
  padding: 10px 8px;
  color: #8b9bb0;
  font-size: 12px;
  line-height: 18px;
  text-align: left;
}

.portal-ai-thread {
  display: none;
  flex-direction: column;
  gap: 8px;
  max-height: 250px;
  margin: 0 0 14px;
  padding: 4px 2px 2px;
  overflow-y: auto;
  text-align: left;
}

.portal-ai-thread.has-messages {
  display: flex;
}

.portal-ai-thread .ai-chat-bubble {
  max-width: 95%;
  font-size: 13px;
  line-height: 1.65;
}

.portal-ai-thread .ai-chat-bubble.ai-msg {
  background: #fff;
  border-color: #dce6f2;
  color: #253a55;
  max-width: 100%;
}

.portal-ai-thread .ai-chat-bubble.user-msg {
  background: #f2f3f5;
  color: #333;
  border-radius: 20px;
  padding: 10px 16px;
}

.portal-ai-input {
  width: 100%;
  min-height: 34px;
  max-height: 92px;
  border: 0;
  outline: 0;
  resize: vertical;
  background: transparent;
  color: #1c2f48;
  font: inherit;
  font-size: 14px;
  line-height: 22px;
}

.portal-ai-input::placeholder {
  color: #8796ac;
}

.portal-ai-input:focus::placeholder {
  color: #a5b1c2;
}
/* AI assistant composer visual polish */
.portal-ai-stage p {
  margin-bottom: 26px;
}

.portal-ai-composer {
  min-height: 112px;
  padding: 15px 16px 14px;
  border-radius: 18px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.portal-ai-composer:focus-within {
  border-color: #b9cbe0;
  box-shadow: 0 12px 30px rgba(40, 89, 143, 0.10);
}

.portal-ai-input {
  min-height: 38px;
  max-height: 104px;
  padding: 2px 2px 0;
  line-height: 24px;
}

.portal-ai-composer-row {
  margin-top: 13px;
  padding-top: 10px;
  border-top: 1px solid #edf2f7;
  gap: 9px;
}

.portal-ai-composer-row button {
  height: 34px;
  border-color: #d9e4ef;
  background: #fbfdff;
  color: #516a87;
  padding: 0 13px;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.portal-ai-composer-row button:not(.portal-ai-round-action):not(.portal-ai-send) {
  min-width: 86px;
}

.portal-ai-chip-icon {
  width: 15px;
  height: 15px;
}

.portal-ai-composer-row .portal-ai-round-action {
  width: 38px;
  height: 38px;
  border-color: #d6e1ed;
  background: #fff;
  color: #667d9b;
}

.portal-ai-composer-row .portal-ai-send {
  width: 42px;
  height: 42px;
  margin-left: 2px;
  border-color: #28598f;
  background: #28598f;
  font-size: 22px;
  box-shadow: 0 8px 18px rgba(40, 89, 143, 0.22);
  transform: translateY(-1px);
}

.portal-ai-composer-row .portal-ai-send:hover {
  box-shadow: 0 10px 22px rgba(40, 89, 143, 0.28);
}

.portal-ai-composer-row .portal-ai-send:active {
  transform: translateY(0);
}

.portal-ai-mic-symbol {
  width: 11px;
  height: 17px;
  border-width: 1.8px;
}

.portal-ai-mic-symbol::before {
  width: 17px;
  height: 10px;
  border-width: 1.8px;
  bottom: -7px;
}

.portal-ai-mic-symbol::after {
  height: 6px;
  bottom: -12px;
}

.portal-ai-thread {
  max-height: 220px;
  margin-bottom: 12px;
  padding: 2px 2px 0;
  gap: 9px;
}

.portal-ai-thread .ai-chat-bubble {
  padding: 9px 13px;
  border-radius: 13px;
  font-size: 13px;
}

.portal-ai-section-label {
  margin-top: 24px;
}

@media (max-width: 640px) {
  .portal-ai-composer {
    padding: 14px;
  }

  .portal-ai-composer-row button:not(.portal-ai-round-action):not(.portal-ai-send) {
    min-width: 0;
  }

  .portal-ai-composer-row .portal-ai-round-action,
  .portal-ai-composer-row .portal-ai-send {
    margin-left: 0;
  }
}
/* End AI assistant composer visual polish */
/* AI assistant icon visual alignment */
.portal-ai-home .ui-icon svg {
  stroke-width: 1.9;
}

.portal-ai-user-avatar {
  width: 36px;
  height: 36px;
  background: #f0efff;
  color: #4b45d8;
  font-size: 13px;
  font-weight: 800;
}

.portal-ai-collapse {
  width: 31px;
  height: 31px;
  color: #526987;
}

.portal-ai-collapse-icon {
  width: 18px;
  height: 18px;
}

.portal-ai-brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  background: #2b5b91;
  font-size: 27px;
  font-weight: 900;
}

.portal-ai-brand strong {
  font-size: 25px;
  font-weight: 850;
}

.portal-ai-top-action {
  width: 34px;
  height: 34px;
  color: #536987;
}

.portal-ai-top-icon {
  width: 19px;
  height: 19px;
}

.portal-ai-search-icon {
  width: 16px;
  height: 16px;
  color: #7a8da5;
}

.portal-ai-new-chat span {
  width: 18px;
  text-align: center;
  font-size: 24px;
  transform: translateY(-1px);
}

.portal-ai-history-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border-width: 1.4px;
  border-color: #8ea1bb;
}

.portal-ai-history-dot::after {
  width: 5px;
  height: 1.5px;
  right: -3px;
  bottom: 1px;
  background: #8ea1bb;
}

.portal-ai-hero-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #2b5b91;
  box-shadow: 0 12px 24px rgba(43, 91, 145, 0.24);
}

.portal-ai-robot-icon {
  width: 31px;
  height: 31px;
}

.portal-ai-hero-icon .ui-icon svg,
.portal-ai-robot-icon svg {
  stroke-width: 2.25;
}

.portal-ai-chip-icon {
  width: 15px;
  height: 15px;
}

.portal-ai-composer-row button:not(.portal-ai-round-action):not(.portal-ai-send) .ui-icon svg {
  stroke-width: 1.8;
}

.portal-ai-round-action {
  color: #647a97;
}

.portal-ai-feature-card {
  border-color: #dbe5ef;
}


.portal-ai-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #edf5fc;
  color: #2b5b91;
}


.portal-ai-feature-svg {
  width: 20px;
  height: 20px;
}

.portal-ai-feature-icon .ui-icon svg,
.portal-ai-feature-svg svg {
  stroke-width: 1.95;
}

.portal-ai-feature-card strong {
  margin-top: 1px;
}
/* End AI assistant icon visual alignment */
/* AI assistant voice send button alignment */
.portal-ai-composer-row .portal-ai-round-action,
.portal-ai-composer-row .portal-ai-send {
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  border-radius: 50%;
  align-self: center;
  flex: 0 0 40px;
  transform: none;
}

.portal-ai-composer-row .portal-ai-round-action {
  border: 1px solid #dbe5f0;
  background: #fff;
  color: #5f7693;
  box-shadow: none;
}

.portal-ai-composer-row .portal-ai-round-action:hover {
  border-color: #c9d7e7;
  background: #f8fbfe;
  color: #2b5b91;
}

.portal-ai-composer-row .portal-ai-send {
  margin-left: 0;
  border: 0;
  background: #2b5b91;
  color: #fff;
  box-shadow: 0 6px 14px rgba(43, 91, 145, 0.20);
}

.portal-ai-composer-row .portal-ai-send:hover {
  background: #254f80;
  box-shadow: 0 8px 18px rgba(43, 91, 145, 0.24);
}

.portal-ai-composer-row .portal-ai-send:active {
  transform: translateY(1px);
}

.portal-ai-action-icon,
.portal-ai-send-icon {
  width: 20px;
  height: 20px;
}

.portal-ai-action-icon svg {
  stroke-width: 1.9;
}

.portal-ai-send-icon svg {
  stroke-width: 2.25;
}

.portal-ai-mic-symbol {
  display: none;
}
/* End AI assistant voice send button alignment */
/* AI assistant one-screen fit */
.portal-ai-home {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.portal-ai-sidebar {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.portal-ai-history {
  max-height: calc(100vh - 178px);
  overflow-y: auto;
  padding-right: 2px;
}

.portal-ai-main {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.portal-ai-stage {
  height: calc(100vh - 61px);
  min-height: 0;
  padding: clamp(32px, 5.6vh, 62px) 0 clamp(20px, 4vh, 42px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  overflow: hidden;
}

.portal-ai-hero-icon {
  flex: 0 0 auto;
  margin-bottom: clamp(10px, 1.5vh, 14px);
}

.portal-ai-stage h1,
.portal-ai-stage p,
.portal-ai-composer,
.portal-ai-section-label,
.portal-ai-feature-grid {
  flex: 0 0 auto;
}

.portal-ai-stage p {
  margin-top: 7px;
  margin-bottom: clamp(18px, 3vh, 26px);
}

.portal-ai-thread {
  max-height: clamp(96px, 18vh, 180px);
}

.portal-ai-composer {
  min-height: 106px;
}

.portal-ai-section-label {
  margin-top: clamp(16px, 2.6vh, 24px);
  margin-bottom: clamp(12px, 2vh, 20px);
}

.portal-ai-feature-grid {
  gap: clamp(8px, 1.4vh, 12px);
}

.portal-ai-feature-card {
  height: clamp(94px, 12.8vh, 119px);
}

.portal-ai-feature-icon {
  width: clamp(34px, 4.5vh, 40px);
  height: clamp(34px, 4.5vh, 40px);
  margin-bottom: clamp(6px, 1.1vh, 10px);
}

.portal-ai-feature-card strong {
  font-size: clamp(13px, 1.45vh, 14px);
  line-height: 18px;
}

.portal-ai-feature-card em {
  font-size: 12px;
  line-height: 17px;
}

@media (max-height: 780px) and (min-width: 901px) {
  .portal-ai-stage {
    padding-top: 24px;
    padding-bottom: 16px;
  }

  .portal-ai-hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }

  .portal-ai-robot-icon {
    width: 28px;
    height: 28px;
  }

  .portal-ai-stage h1 {
    font-size: 27px;
  }

  .portal-ai-stage p {
    margin-bottom: 14px;
    line-height: 1.55;
  }

  .portal-ai-composer {
    min-height: 98px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .portal-ai-input {
    min-height: 30px;
  }

  .portal-ai-composer-row {
    margin-top: 8px;
    padding-top: 8px;
  }

  .portal-ai-section-label {
    margin-top: 12px;
    margin-bottom: 10px;
  }

  .portal-ai-feature-card {
    height: 88px;
  }

  .portal-ai-feature-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 5px;
  }

  .portal-ai-feature-svg {
    width: 17px;
    height: 17px;
  }
}

@media (max-width: 900px) {
  .portal-ai-home,
  .portal-ai-main,
  .portal-ai-sidebar,
  .portal-ai-stage {
    height: auto;
    overflow: visible;
  }
}
/* End AI assistant one-screen fit */
/* End AI assistant home page */
/* ═══════════════════════════════════════
   AI Chat floating widget
   ═══════════════════════════════════════ */
/* ── AI Assistant – inline card on portal ── */
.portal-ai-card {
  border-left-color: #7c3aed !important;
}
.portal-ai-badge {
  display: inline-block;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  vertical-align: 1px;
  margin-right: 2px;
}

.ai-inline-chat {
  margin-top: 8px;
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 8px;
  overflow: hidden;
  background: #fafaff;
}
.ai-inline-messages {
  height: 78px;
  overflow-y: auto;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ai-chat-bubble {
  max-width: 95%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.55;
  word-break: break-word;
  animation: aiFadeIn 250ms ease both;
}
@keyframes aiFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ai-chat-bubble.ai-msg {
  align-self: flex-start;
  background: #fff;
  color: #243746;
  border: 1px solid rgba(99, 102, 241, 0.1);
  border-bottom-left-radius: 3px;
  box-shadow: 0 1px 4px rgba(99, 102, 241, 0.06);
}
.ai-chat-bubble.user-msg {
  align-self: flex-end;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border-bottom-right-radius: 3px;
}

.ai-typing-dots {
  display: inline-flex;
  gap: 3px;
  padding: 2px 0;
}
.ai-typing-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.4);
  animation: aiDot 1.2s ease infinite;
}
.ai-typing-dots i:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes aiDot {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.1); }
}

.ai-inline-footer {
  display: flex;
  gap: 6px;
  padding: 6px 8px;
  border-top: 1px solid rgba(99, 102, 241, 0.08);
  background: #fff;
}
.ai-inline-input {
  flex: 1;
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  outline: none;
  background: rgba(245, 248, 252, 0.8);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.ai-inline-input:focus {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}
.ai-inline-input::placeholder {
  color: rgba(38, 60, 80, 0.35);
}
.ai-inline-send {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 150ms ease, transform 150ms ease;
}
.ai-inline-send:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════
   GIS Consumer-grade polish – search dropdown, offline banner,
   context menu, scroll-hint
   ═══════════════════════════════════════════════════════════════ */

/* ── Search autocomplete dropdown ──────────────────────────── */
.geo-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.06);
  z-index: 120;
  padding: 4px 0;
}

.geo-search-item {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 100ms ease;
}

.geo-search-item:hover,
.geo-search-item.highlighted {
  background: rgba(99, 102, 241, 0.08);
}

.geo-search-item-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: #1e293b;
}

.geo-search-item-type {
  flex: 0 0 auto;
  margin-left: 8px;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.1);
  color: rgba(99, 102, 241, 0.85);
  white-space: nowrap;
}

/* ── Network offline banner ────────────────────────────────── */
.geo-offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  padding: 8px 16px;
  text-align: center;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  animation: geo-offline-slide-in 300ms ease forwards;
}

@keyframes geo-offline-slide-in {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

/* ── Right-click context menu ──────────────────────────────── */
.geo-ctx-menu {
  position: fixed;
  z-index: 10000;
  min-width: 140px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14), 0 1px 4px rgba(0, 0, 0, 0.06);
  padding: 4px 0;
  animation: geo-ctx-pop 120ms ease forwards;
}

@keyframes geo-ctx-pop {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.geo-ctx-item {
  padding: 8px 16px;
  font-size: 13px;
  color: #1e293b;
  cursor: pointer;
  white-space: nowrap;
  transition: background 100ms ease;
}

.geo-ctx-item:first-child { border-radius: 10px 10px 0 0; }
.geo-ctx-item:last-child  { border-radius: 0 0 10px 10px; }

.geo-ctx-item:hover {
  background: rgba(99, 102, 241, 0.08);
}

/* ── Ctrl+scroll zoom hint overlay ─────────────────────────── */
.geo-scroll-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 22px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 80;
  opacity: 0;
  transition: opacity 260ms ease;
}

.geo-scroll-hint.visible {
  opacity: 1;
}

/* ── Fullscreen button & state ─────────────────────────────── */
.geo-fullscreen-btn {
  font-size: 18px;
  line-height: 1;
}

.geo-map-stage:fullscreen {
  width: 100vw;
  height: 100vh;
  background: #f0f4f8;
}

.geo-map-stage:fullscreen .geo-map-controls {
  top: 16px;
  right: 16px;
}

/* ── content-visibility for off-screen heavy sections ──────── */
.kp-dashboard,
.portrait-workspace,
.geo-data-board {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

.brain-page {
  display: grid;
  gap: 16px;
}

.brain-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-radius: 18px;
  border: 1px solid rgba(24, 53, 83, 0.12);
  background:
    linear-gradient(135deg, rgba(11, 42, 68, 0.96), rgba(34, 94, 145, 0.88)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
  color: #ffffff;
  box-shadow: 0 10px 32px rgba(15, 41, 66, 0.16);
}

.brain-page-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.62);
}

.brain-page-head h2 {
  margin: 8px 0 6px;
  font-size: 30px;
  line-height: 1.1;
}

.brain-page-head p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
}

.brain-page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.brain-page-actions .btn {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.brain-page-actions .btn.primary {
  background: rgba(255, 255, 255, 0.96);
  color: #17456b;
}

.brain-dashboard {
  display: grid;
  grid-template-columns: 148px 340px minmax(460px, 1fr) 360px;
  grid-template-areas: "rail left map right";
  gap: 16px;
  align-items: stretch;
}

.brain-rail,
.brain-left-stack,
.brain-map-card,
.brain-right-stack {
  min-width: 0;
}

.brain-rail {
  grid-area: rail;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brain-home-entry,
.brain-rail-card,
.brain-panel {
  border-radius: 16px;
  border: 1px solid rgba(24, 53, 83, 0.10);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 24px rgba(15, 41, 66, 0.08);
}

.brain-home-entry {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 14px;
  min-height: 92px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(236, 244, 252, 0.88));
  color: rgba(23, 69, 107, 0.96);
  font-size: 16px;
  font-weight: 700;
}

.brain-home-icon {
  width: 20px;
  height: 20px;
}

.brain-rail-card {
  padding: 14px 12px;
}

.brain-rail-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(23, 69, 107, 0.92);
  margin-bottom: 10px;
}

.brain-rail-links {
  display: grid;
  gap: 8px;
}

.brain-rail-link {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(45, 102, 155, 0.12);
  background: linear-gradient(180deg, rgba(247, 250, 255, 0.98), rgba(238, 245, 252, 0.92));
  color: rgba(24, 53, 83, 0.88);
  font-size: 13px;
  font-weight: 600;
  transition: transform 180ms var(--ease-out), border-color 180ms ease, box-shadow 180ms ease;
}

.brain-rail-link:hover {
  transform: translateY(-1px);
  border-color: rgba(38, 112, 184, 0.24);
  box-shadow: 0 4px 12px rgba(38, 112, 184, 0.10);
}

.brain-left-stack {
  grid-area: left;
  display: grid;
  gap: 16px;
}

.brain-right-stack {
  grid-area: right;
  display: grid;
  gap: 16px;
}

.brain-right-bottom {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 16px;
}

.brain-panel {
  padding: 14px 16px 16px;
}

.brain-panel.compact {
  padding: 14px 14px 16px;
}

.brain-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.brain-panel-head h3 {
  margin: 0;
  font-size: 18px;
  color: rgba(21, 52, 80, 0.96);
}

.brain-panel-head p {
  margin: 4px 0 0;
  color: rgba(76, 102, 126, 0.78);
  font-size: 12px;
}

.brain-panel-note {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(38, 112, 184, 0.10);
  color: rgba(27, 90, 158, 0.92);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.brain-panel-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.brain-panel-tabs span,
.brain-panel-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.brain-panel-tabs span.active {
  background: rgba(38, 112, 184, 0.14);
  color: rgba(23, 69, 107, 0.96);
}

.brain-panel-tabs a {
  border: 1px solid rgba(38, 112, 184, 0.14);
  color: rgba(38, 112, 184, 0.92);
}

.brain-table-wrap {
  border-radius: 12px;
  border: 1px solid rgba(30, 60, 90, 0.08);
  overflow: hidden;
}

.brain-table {
  width: 100%;
  border-collapse: collapse;
}

.brain-table th,
.brain-table td {
  padding: 10px 11px;
  border-bottom: 1px solid rgba(30, 60, 90, 0.08);
  font-size: 12px;
  text-align: left;
}

.brain-table thead th {
  background: rgba(232, 242, 252, 0.88);
  color: rgba(21, 52, 80, 0.92);
  font-weight: 700;
}

.brain-table tbody tr:nth-child(odd) td {
  background: rgba(250, 252, 255, 0.84);
}

.brain-project-grid {
  display: grid;
  gap: 12px;
}

.brain-project-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(45, 102, 155, 0.12);
  background: linear-gradient(180deg, rgba(247, 251, 255, 0.96), rgba(239, 246, 252, 0.9));
  transition: transform 180ms var(--ease-out), border-color 180ms ease, box-shadow 180ms ease;
}

.brain-project-card:hover {
  transform: translateY(-1px);
  border-color: rgba(38, 112, 184, 0.20);
  box-shadow: 0 6px 16px rgba(38, 112, 184, 0.08);
}

.brain-project-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brain-project-title span {
  color: rgba(21, 52, 80, 0.96);
  font-size: 14px;
  font-weight: 700;
}

.brain-project-title em {
  font-style: normal;
  color: rgba(38, 112, 184, 0.92);
  font-size: 12px;
  font-weight: 700;
}

.brain-project-card dl {
  margin: 0;
  display: grid;
  gap: 8px;
}

.brain-project-card dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brain-project-card dt {
  color: rgba(76, 102, 126, 0.82);
  font-size: 12px;
}

.brain-project-card dd {
  margin: 0;
  color: rgba(21, 52, 80, 0.96);
  font-size: 18px;
  font-weight: 800;
}

.brain-project-alert {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(222, 132, 86, 0.18);
  background: linear-gradient(135deg, rgba(255, 245, 239, 0.94), rgba(255, 250, 247, 0.88));
}

.brain-project-alert span {
  color: rgba(137, 63, 25, 0.82);
  font-size: 13px;
  font-weight: 700;
}

.brain-project-alert strong {
  color: rgba(186, 86, 38, 0.96);
  font-size: 24px;
  line-height: 1;
}

.brain-map-card {
  grid-area: map;
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
  border-radius: 18px;
  border: 1px solid rgba(24, 53, 83, 0.10);
  background: rgba(255, 255, 255, 0.90);
  box-shadow: 0 8px 24px rgba(15, 41, 66, 0.08);
}

.brain-map-current {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(38, 112, 184, 0.10);
  color: rgba(23, 69, 107, 0.92);
  font-size: 12px;
  font-weight: 700;
}

.brain-map-current strong {
  font-size: 13px;
}

.brain-map-stage {
  position: relative;
  min-height: 620px;
  border-radius: 18px;
  border: 1px solid rgba(24, 53, 83, 0.08);
  background:
    radial-gradient(circle at 0% 0%, rgba(38, 112, 184, 0.08), transparent 34%),
    radial-gradient(circle at 100% 100%, rgba(27, 120, 159, 0.06), transparent 32%),
    linear-gradient(180deg, rgba(250, 252, 255, 0.96), rgba(239, 246, 252, 0.9));
  overflow: hidden;
}

.brain-map-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(30, 60, 90, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 60, 90, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.18;
  pointer-events: none;
}

.brain-map-svg,
.brain-map-markers {
  position: absolute;
  inset: 0;
}

.brain-map-svg {
  width: 100%;
  height: 100%;
}

.brain-map-district-outline polygon {
  fill: rgba(38, 112, 184, 0.03);
  stroke: rgba(33, 74, 112, 0.32);
  stroke-width: 0.52;
}

.brain-map-shape-link {
  cursor: pointer;
}

.brain-map-shape polygon {
  fill: var(--brain-fill, rgba(38, 112, 184, 0.22));
  stroke: var(--brain-stroke, rgba(24, 53, 83, 0.38));
  stroke-width: 0.34;
  transition: filter 180ms ease, transform 180ms ease, stroke-width 180ms ease, opacity 180ms ease;
  opacity: 0.94;
}

.brain-map-shape-link:hover .brain-map-shape polygon,
.brain-map-shape.active polygon {
  filter: brightness(1.08) saturate(1.05);
  stroke-width: 0.48;
  opacity: 1;
}

.brain-map-markers {
  pointer-events: none;
  z-index: 2;
}

.brain-map-marker {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
  z-index: 1;
}

.brain-map-marker:hover,
.brain-map-marker.active {
  z-index: 5;
}

.brain-map-marker-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.96);
  background: rgba(21, 52, 80, 0.88);
  box-shadow: 0 0 0 4px rgba(38, 112, 184, 0.12);
  flex: 0 0 auto;
}

.brain-map-marker-label {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(27, 90, 158, 0.14);
  color: rgba(21, 52, 80, 0.96);
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(15, 41, 66, 0.12);
  white-space: nowrap;
}

.brain-map-marker.active .brain-map-marker-label {
  background: rgba(31, 91, 146, 0.96);
  color: #ffffff;
  border-color: rgba(31, 91, 146, 0.96);
}

.brain-map-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translateX(-50%) translateY(4px);
  width: 178px;
  padding: 12px 12px 11px;
  border-radius: 14px;
  border: 1px solid rgba(21, 52, 80, 0.10);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 28px rgba(15, 41, 66, 0.16);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.brain-map-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.97);
  border-right: 1px solid rgba(21, 52, 80, 0.10);
  border-bottom: 1px solid rgba(21, 52, 80, 0.10);
  transform: translateX(-50%) rotate(45deg);
}

.brain-map-tooltip strong {
  display: block;
  margin-bottom: 8px;
  color: rgba(21, 52, 80, 0.96);
  font-size: 13px;
}

.brain-map-tooltip span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: rgba(76, 102, 126, 0.84);
  font-size: 11px;
  line-height: 1.6;
}

.brain-map-tooltip b {
  color: rgba(21, 52, 80, 0.96);
  font-size: 11px;
}

.brain-map-marker:hover .brain-map-tooltip,
.brain-map-marker.active .brain-map-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.brain-map-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(76, 102, 126, 0.82);
  font-size: 12px;
}

.brain-monitor-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.brain-monitor-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(45, 102, 155, 0.12);
  background: rgba(245, 249, 255, 0.88);
  color: rgba(24, 53, 83, 0.84);
  font-size: 12px;
  font-weight: 700;
  transition: transform 180ms var(--ease-out), border-color 180ms ease, box-shadow 180ms ease;
}

.brain-monitor-chip:hover {
  transform: translateY(-1px);
}

.brain-monitor-chip.active {
  background: linear-gradient(135deg, rgba(31, 91, 146, 0.96), rgba(38, 112, 184, 0.92));
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(38, 112, 184, 0.18);
}

.brain-monitor-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.brain-monitor-row,
.brain-kv-list div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(30, 60, 90, 0.08);
  background: linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(240, 247, 252, 0.9));
}

.brain-monitor-row span,
.brain-kv-list span {
  color: rgba(76, 102, 126, 0.82);
  font-size: 12px;
}

.brain-monitor-row strong,
.brain-kv-list strong {
  color: rgba(21, 52, 80, 0.96);
  font-size: 17px;
  line-height: 1;
}

.brain-kv-list {
  display: grid;
  gap: 10px;
}

.brain-alert-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.brain-alert-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(219, 123, 81, 0.12);
  background: linear-gradient(180deg, rgba(255, 248, 244, 0.96), rgba(255, 252, 250, 0.92));
  color: rgba(115, 63, 37, 0.84);
  font-size: 12px;
  font-weight: 700;
}

.brain-alert-list b {
  color: rgba(177, 84, 43, 0.96);
  font-size: 14px;
}

@media (max-width: 1560px) {
  .brain-dashboard {
    grid-template-columns: 148px 340px minmax(0, 1fr);
    grid-template-areas:
      "rail left map"
      "rail right right";
  }
}

@media (max-width: 1220px) {
  .brain-page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .brain-dashboard {
    grid-template-columns: 1fr;
    grid-template-areas:
      "rail"
      "left"
      "map"
      "right";
  }

  .brain-rail {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .brain-home-entry {
    min-height: 100%;
  }

  .brain-map-stage {
    min-height: 560px;
  }
}

@media (max-width: 920px) {
  .brain-rail {
    grid-template-columns: 1fr;
  }

  .brain-right-bottom {
    grid-template-columns: 1fr;
  }

  .brain-map-stage {
    min-height: 460px;
  }

  .brain-map-foot {
    flex-direction: column;
    align-items: flex-start;
  }
}

.brainx-canvas {
  position: relative;
  min-height: calc(100vh - 48px);
  padding: 16px;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 16%, rgba(0, 174, 255, 0.18), transparent 26%),
    radial-gradient(circle at 82% 18%, rgba(0, 194, 255, 0.12), transparent 24%),
    radial-gradient(circle at 48% 82%, rgba(0, 117, 196, 0.10), transparent 34%),
    linear-gradient(180deg, #031826 0%, #042133 42%, #031522 100%);
  box-shadow: inset 0 0 0 1px rgba(68, 185, 255, 0.12), 0 20px 56px rgba(1, 18, 32, 0.34);
}

.brainx-canvas::before,
.brainx-canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.brainx-canvas::before {
  background:
    linear-gradient(rgba(110, 204, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 204, 255, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.12));
}

.brainx-canvas::after {
  inset: 8px;
  border: 1px solid rgba(73, 191, 255, 0.16);
  border-radius: 18px;
  box-shadow: inset 0 0 18px rgba(0, 190, 255, 0.08);
}

.brainx-topline {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.brainx-topline-side {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: rgba(128, 225, 255, 0.6);
}

.brainx-topline-center {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 420px;
  padding: 12px 28px 10px;
  clip-path: polygon(6% 0, 94% 0, 100% 36%, 96% 100%, 4% 100%, 0 36%);
  border: 1px solid rgba(87, 215, 255, 0.32);
  background:
    linear-gradient(180deg, rgba(8, 39, 60, 0.92), rgba(5, 28, 43, 0.9)),
    linear-gradient(90deg, rgba(86, 212, 255, 0.14), rgba(86, 212, 255, 0));
  box-shadow: 0 0 24px rgba(0, 190, 255, 0.14), inset 0 0 22px rgba(0, 162, 255, 0.12);
}

.brainx-topline-center span {
  font-size: 29px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #f1fbff;
  text-shadow: 0 0 20px rgba(94, 218, 255, 0.32);
}

.brainx-topline-center em {
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(124, 226, 255, 0.74);
}

.brainx-topline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.brainx-top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(83, 195, 255, 0.22);
  background: rgba(6, 35, 53, 0.86);
  color: rgba(221, 248, 255, 0.92);
  font-size: 12px;
  font-weight: 700;
  box-shadow: inset 0 0 16px rgba(0, 164, 255, 0.06);
}

.brainx-top-btn.primary {
  background: linear-gradient(135deg, rgba(9, 129, 196, 0.96), rgba(0, 183, 255, 0.92));
  border-color: rgba(125, 228, 255, 0.28);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(0, 180, 255, 0.18);
}

.brainx-canvas.brainx-canvas--map-only {
  padding: 0;
  min-height: 0;
  background: none;
  box-shadow: none;
  border-radius: 0;
}

.brainx-canvas--map-only::before,
.brainx-canvas--map-only::after {
  display: none;
}

.brainx-board.brainx-board--map-only {
  display: block;
}

.brainx-board--map-only .brainx-map-shell {
  border: none;
  background: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}

.brainx-board--map-only .brainx-map-shell::before {
  display: none;
}

.brainx-board--map-only .brainx-map-stage {
  border-radius: 0;
}

/* ── Brain Dashboard fullscreen (map-only, no shell) ─────────── */
body.brain-dashboard-fullscreen {
  background: #0a1628;
  background-image: none;
}

body.brain-dashboard-fullscreen #app {
  min-height: 100vh;
}

body.brain-dashboard-fullscreen .brainx-map-stage {
  min-height: 100vh;
  background: #0a1628;
  box-shadow: none;
}

body.brain-dashboard-fullscreen .brainx-map-stage::before,
body.brain-dashboard-fullscreen .brainx-map-stage::after {
  display: none;
}

body.brain-dashboard-fullscreen .brainx-map-atmosphere {
  display: none;
}

body.brain-dashboard-fullscreen .brainx-map-watermark {
  display: none;
}

body.brain-dashboard-fullscreen .brainx-map-core {
  display: none;
}

body.brain-dashboard-fullscreen .brainx-map-network {
  display: none;
}

body.brain-dashboard-fullscreen .brainx-map-beacons {
  display: none;
}

body.brain-dashboard-fullscreen .brainx-map-statusbar {
  display: none;
}

/* Dark sci-fi theme for SVG map */
body.brain-dashboard-fullscreen .brainx-map-svg {
  background:
    radial-gradient(circle at 50% 44%, rgba(8, 37, 50, 0.48) 0%, rgba(5, 16, 24, 0.84) 44%, rgba(2, 7, 12, 0.99) 100%),
    linear-gradient(180deg, #051018 0%, #02070c 100%);
}

body.brain-dashboard-fullscreen .brainx-map-svg > rect[fill="url(#brainx-center-glow)"] {
  fill: transparent;
}

body.brain-dashboard-fullscreen .brainx-map-terrain-raster {
  opacity: 0.11;
  mix-blend-mode: normal;
}

body.brain-dashboard-fullscreen .brainx-map-terrain-clipped {
  display: block;
  opacity: 0.94;
  mix-blend-mode: normal;
}

body.brain-dashboard-fullscreen .brainx-map-terrain {
  display: none;
}

body.brain-dashboard-fullscreen .brainx-map-terrain-clipped image {
  filter: brightness(0.97) contrast(1.10) saturate(1.02);
}

body.brain-dashboard-fullscreen .brainx-map-backdrop-terrain {
  display: block;
  opacity: 0.025;
  mix-blend-mode: normal;
}

body.brain-dashboard-fullscreen .brainx-map-contours {
  display: block;
  opacity: 0.18;
  mix-blend-mode: screen;
}

body.brain-dashboard-fullscreen .brainx-map-backdrop-regions {
  display: block;
  opacity: 0.92;
}

body.brain-dashboard-fullscreen .brainx-map-backdrop-region polygon {
  fill: rgba(4, 18, 28, 0.64);
  stroke: rgba(70, 132, 150, 0.12);
  stroke-width: 0.04;
}

body.brain-dashboard-fullscreen .brainx-map-contour polygon {
  stroke: rgba(126, 201, 216, 0.12);
  stroke-width: 0.08;
  stroke-dasharray: 0.9 1.6;
}

body.brain-dashboard-fullscreen .brainx-map-outline {
  display: none;
  pointer-events: none;
  filter: none;
}

body.brain-dashboard-fullscreen .brainx-map-outline polygon,
body.brain-dashboard-fullscreen .brainx-map-outline path {
  fill: rgba(5, 28, 40, 0.10);
  stroke: none;
  stroke-width: 0;
  stroke-linejoin: round;
  filter: none;
}

body.brain-dashboard-fullscreen .brainx-map-outline-stack {
  display: none;
  pointer-events: none;
}

body.brain-dashboard-fullscreen .brainx-map-outline-stack polygon,
body.brain-dashboard-fullscreen .brainx-map-outline-stack path {
  fill: rgba(3, 12, 20, 0.26);
  stroke: none;
  stroke-width: 0;
  stroke-linejoin: round;
  filter: none;
}

body.brain-dashboard-fullscreen .brainx-map-outline-stack.s5 polygon,
body.brain-dashboard-fullscreen .brainx-map-outline-stack.s5 path {
  fill-opacity: 0.26;
}

body.brain-dashboard-fullscreen .brainx-map-outline-stack.s4 polygon,
body.brain-dashboard-fullscreen .brainx-map-outline-stack.s4 path {
  fill-opacity: 0.18;
}

body.brain-dashboard-fullscreen .brainx-map-outline-stack.s3 polygon,
body.brain-dashboard-fullscreen .brainx-map-outline-stack.s3 path {
  fill-opacity: 0.14;
}

body.brain-dashboard-fullscreen .brainx-map-outline-stack.s2 polygon,
body.brain-dashboard-fullscreen .brainx-map-outline-stack.s2 path {
  fill-opacity: 0.11;
}

body.brain-dashboard-fullscreen .brainx-map-outline-stack.s1 polygon,
body.brain-dashboard-fullscreen .brainx-map-outline-stack.s1 path {
  fill-opacity: 0.08;
}

body.brain-dashboard-fullscreen .brainx-map-shapes {
  display: none;
  pointer-events: none;
}

body.brain-dashboard-fullscreen .brainx-map-shape polygon {
  fill: rgba(12, 92, 132, 0.012);
  stroke: rgba(186, 232, 242, 0.16);
  stroke-width: 0.01;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

body.brain-dashboard-fullscreen .brainx-map-shape-relief {
  display: block;
  mix-blend-mode: screen;
  pointer-events: none;
}

body.brain-dashboard-fullscreen .brainx-map-shape-relief .brainx-map-shape-base polygon {
  fill: rgba(132, 214, 227, 0.08);
  stroke: none;
}

body.brain-dashboard-fullscreen .brainx-map-shape-relief.r3 .brainx-map-shape-base polygon {
  opacity: 0.18;
}

body.brain-dashboard-fullscreen .brainx-map-shape-relief.r2 .brainx-map-shape-base polygon {
  opacity: 0.14;
}

body.brain-dashboard-fullscreen .brainx-map-shape-relief.r1 .brainx-map-shape-base polygon {
  opacity: 0.1;
}

body.brain-dashboard-fullscreen .brainx-map-street-stroke {
  display: block;
  fill: none;
  stroke: rgba(205, 240, 248, 0.52);
  stroke-width: 0.008;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: drop-shadow(0 0 0.22px rgba(190, 236, 245, 0.10));
}

body.brain-dashboard-fullscreen .brainx-map-street-stroke-outer {
  stroke: rgba(205, 240, 248, 0.22);
  stroke-width: 0.006;
  filter: none;
}

body.brain-dashboard-fullscreen .brainx-map-boundary-cover {
  fill: none;
  stroke-width: 0.016;
  stroke-linejoin: round;
  stroke-linecap: round;
  opacity: 0.96;
  filter: none;
}

body.brain-dashboard-fullscreen .brainx-map-district-stroke {
  fill: none;
  stroke: rgba(224, 247, 252, 0.58);
  stroke-width: 0.018;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: none;
}

body.brain-dashboard-fullscreen .brainx-map-detail-water,
body.brain-dashboard-fullscreen .brainx-map-detail-roads {
  display: none;
}

/* Hide all labels — terrain only */
body.brain-dashboard-fullscreen .brainx-map-labels {
  display: none;
}

body.brain-dashboard-fullscreen .brainx-map-markers {
  z-index: 6;
  opacity: 0.72;
}

body.brain-dashboard-fullscreen .brainx-map-marker {
  transform: translate(-50%, -50%);
  gap: 0;
}

body.brain-dashboard-fullscreen .brainx-map-pin {
  width: 14px;
  height: 14px;
}

body.brain-dashboard-fullscreen .brainx-map-base,
body.brain-dashboard-fullscreen .brainx-map-beam {
  display: none;
}

body.brain-dashboard-fullscreen .brainx-map-dot {
  top: 50%;
  width: 5px;
  height: 5px;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px currentColor, 0 0 12px currentColor;
}

body.brain-dashboard-fullscreen .brainx-map-ring {
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
  opacity: 0.22;
  animation: brainxFullscreenPulse 2.6s ease-out infinite;
}

body.brain-dashboard-fullscreen .brainx-map-marker.major {
  color: #7fd0da;
}

body.brain-dashboard-fullscreen .brainx-map-marker.mid {
  color: #5ab7c7;
}

body.brain-dashboard-fullscreen .brainx-map-marker.minor {
  color: #4f9fb0;
}

body.brain-dashboard-fullscreen .brainx-map-label {
  display: none;
}

body.brain-dashboard-fullscreen .brainx-map-tip {
  border: 1px solid rgba(80, 220, 255, 0.3);
  background: rgba(10, 22, 40, 0.92);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

body.brain-dashboard-fullscreen .brainx-map-tip::after {
  background: rgba(10, 22, 40, 0.92);
  border-right: 1px solid rgba(80, 220, 255, 0.3);
  border-bottom: 1px solid rgba(80, 220, 255, 0.3);
}

body.brain-dashboard-fullscreen .brainx-map-tip strong {
  color: rgba(200, 240, 255, 0.95);
}

body.brain-dashboard-fullscreen .brainx-map-tip span {
  color: rgba(150, 200, 230, 0.7);
}

body.brain-dashboard-fullscreen .brainx-map-tip b {
  color: rgba(80, 220, 255, 0.95);
}

body.brain-dashboard-fullscreen .brainx-map-marker.minor .brainx-map-dot {
  top: 50%;
  width: 4px;
  height: 4px;
  opacity: 0.72;
}

body.brain-dashboard-fullscreen .brainx-map-marker.minor .brainx-map-ring {
  top: 50%;
  width: 10px;
  height: 10px;
  opacity: 0.16;
}

@keyframes brainxFullscreenPulse {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0.46; }
  100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}

/* Counter-scale SVG text labels to undo the GEO_ASPECT scaleX(1.216) */
body.brain-dashboard-fullscreen .brainx-map-backdrop-label text,
body.brain-dashboard-fullscreen .brainx-map-road-label text {
  transform: scaleX(0.822);
}

body.brain-dashboard-fullscreen .brainx-map-road-label rect {
  transform: scaleX(0.822);
}

.brainx-board {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(250px, 280px) minmax(0, 1fr) minmax(280px, 320px);
  gap: 14px;
  align-items: stretch;
}

.brainx-side {
  display: grid;
  gap: 14px;
  align-content: start;
  align-self: start;
  min-width: 0;
}

.brainx-stage {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.brainx-panel,
.brainx-map-shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(71, 190, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(5, 33, 51, 0.92), rgba(3, 23, 37, 0.9)),
    linear-gradient(90deg, rgba(40, 141, 196, 0.08), rgba(40, 141, 196, 0));
  box-shadow: inset 0 0 24px rgba(0, 162, 255, 0.07), 0 16px 30px rgba(1, 11, 20, 0.22);
}

.brainx-panel::before,
.brainx-map-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(84, 220, 255, 0.13), rgba(84, 220, 255, 0) 18%, rgba(84, 220, 255, 0) 82%, rgba(84, 220, 255, 0.13)),
    linear-gradient(180deg, rgba(84, 220, 255, 0.10), rgba(84, 220, 255, 0) 18%, rgba(84, 220, 255, 0) 82%, rgba(84, 220, 255, 0.10));
  opacity: 0.4;
}

.brainx-panel {
  padding: 12px 14px 14px;
}

.brainx-panel-head,
.brainx-stage-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.brainx-panel-head h3,
.brainx-stage-head h2 {
  margin: 0;
  color: #effcff;
  font-size: 18px;
  font-weight: 700;
}

.brainx-stage-head h2 {
  font-size: 24px;
  line-height: 1.1;
}

.brainx-panel-head span,
.brainx-stage-head p,
.brainx-rank-title,
.brainx-map-tag {
  color: rgba(121, 218, 255, 0.72);
  font-size: 12px;
}

.brainx-panel-head span {
  display: block;
  max-width: 220px;
  line-height: 1.5;
  text-align: right;
}

.brainx-stage-head p {
  margin: 6px 0 0;
  max-width: 640px;
  line-height: 1.6;
}

.brainx-capsule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.brainx-capsule {
  padding: 11px 11px 9px;
  border-radius: 12px;
  border: 1px solid rgba(85, 204, 255, 0.14);
  background: linear-gradient(180deg, rgba(5, 40, 63, 0.88), rgba(7, 30, 45, 0.72));
  box-shadow: inset 0 0 16px rgba(0, 183, 255, 0.06);
}

.brainx-capsule-label {
  display: block;
  color: rgba(123, 226, 255, 0.72);
  font-size: 11px;
}

.brainx-capsule strong {
  display: block;
  margin-top: 6px;
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
  text-shadow: 0 0 18px rgba(82, 220, 255, 0.22);
}

.brainx-capsule em {
  display: block;
  margin-top: 7px;
  font-style: normal;
  color: rgba(102, 195, 231, 0.78);
  font-size: 11px;
}

.brainx-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.brainx-metric-card,
.brainx-monitor-card {
  padding: 11px;
  border-radius: 12px;
  border: 1px solid rgba(80, 191, 255, 0.14);
  background: rgba(5, 35, 54, 0.82);
}

.brainx-metric-card span,
.brainx-monitor-card span {
  display: block;
  color: rgba(132, 230, 255, 0.76);
  font-size: 11px;
  line-height: 1.5;
}

.brainx-metric-card strong,
.brainx-monitor-card strong {
  display: block;
  margin-top: 8px;
  color: #fbffff;
  font-size: 20px;
  line-height: 1.1;
}

.brainx-metric-card em {
  display: block;
  margin-top: 7px;
  font-style: normal;
  color: rgba(92, 196, 240, 0.72);
  font-size: 11px;
}

.brainx-enterprise-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(220px, 0.82fr);
  gap: 14px;
}

.brainx-table-wrap {
  border-radius: 14px;
  border: 1px solid rgba(74, 189, 255, 0.16);
  overflow: hidden;
  background: rgba(4, 29, 44, 0.84);
}

.brainx-table {
  width: 100%;
  border-collapse: collapse;
}

.brainx-table th,
.brainx-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(67, 177, 235, 0.12);
  color: rgba(207, 243, 255, 0.88);
  font-size: 12px;
  text-align: left;
}

.brainx-table thead th {
  background: rgba(12, 58, 85, 0.86);
  color: rgba(148, 235, 255, 0.96);
  font-weight: 700;
}

.brainx-table tbody tr:nth-child(odd) td {
  background: rgba(7, 39, 60, 0.46);
}

.brainx-enterprise-side {
  display: grid;
  gap: 12px;
}

.brainx-mini-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.brainx-mini-stat {
  padding: 10px 11px;
  border-radius: 12px;
  border: 1px solid rgba(84, 201, 255, 0.14);
  background: linear-gradient(180deg, rgba(5, 36, 55, 0.92), rgba(4, 25, 38, 0.84));
}

.brainx-mini-stat strong {
  display: block;
  color: #f7feff;
  font-size: 24px;
  line-height: 1;
}

.brainx-mini-stat span {
  display: block;
  margin-top: 8px;
  color: rgba(128, 227, 255, 0.88);
  font-size: 12px;
}

.brainx-mini-stat em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  color: rgba(84, 191, 235, 0.72);
  font-size: 11px;
}

.brainx-bar-list {
  display: grid;
  gap: 9px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(77, 190, 255, 0.14);
  background: rgba(5, 34, 52, 0.82);
}

.brainx-bar-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}

.brainx-bar-row span,
.brainx-bar-row b {
  color: rgba(215, 247, 255, 0.9);
  font-size: 12px;
}

.brainx-bar-track {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.brainx-bar-track i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(74, 239, 255, 0.9), rgba(255, 180, 78, 0.92));
  box-shadow: 0 0 12px rgba(74, 239, 255, 0.34);
}

.brainx-topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.brainx-topic-card {
  display: grid;
  gap: 12px;
  padding: 12px 12px 11px;
  border-radius: 14px;
  border: 1px solid rgba(79, 197, 255, 0.16);
  background: linear-gradient(180deg, rgba(7, 42, 63, 0.92), rgba(4, 26, 40, 0.86));
  box-shadow: inset 0 0 18px rgba(0, 168, 255, 0.05);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.brainx-topic-card:hover {
  transform: translateY(-1px);
  border-color: rgba(104, 223, 255, 0.28);
  box-shadow: inset 0 0 22px rgba(0, 196, 255, 0.08), 0 12px 24px rgba(0, 10, 18, 0.18);
}

.brainx-topic-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.brainx-topic-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(93, 215, 255, 0.2);
  background: rgba(9, 56, 82, 0.8);
  color: #78e7ff;
  box-shadow: 0 0 16px rgba(75, 222, 255, 0.12);
  flex: 0 0 auto;
}

.brainx-topic-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.brainx-topic-title strong {
  color: #f5fdff;
  font-size: 14px;
  line-height: 1.35;
}

.brainx-topic-title span {
  color: rgba(154, 231, 255, 0.72);
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.brainx-topic-metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(86, 210, 255, 0.10);
}

.brainx-topic-metric b {
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
}

.brainx-topic-metric span {
  color: rgba(124, 224, 255, 0.76);
  font-size: 12px;
}

.brainx-chip-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.brainx-chip-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(90, 212, 255, 0.14);
  background: rgba(7, 40, 60, 0.76);
  color: rgba(225, 248, 255, 0.9);
  font-size: 11px;
  font-weight: 700;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.brainx-chip-link:hover {
  transform: translateY(-1px);
  border-color: rgba(109, 223, 255, 0.24);
  box-shadow: 0 8px 16px rgba(0, 10, 18, 0.14);
}

.brainx-link-divider {
  height: 1px;
  margin-top: 12px;
  background: linear-gradient(90deg, rgba(86, 210, 255, 0), rgba(86, 210, 255, 0.28), rgba(86, 210, 255, 0));
}

.brainx-link-section {
  display: grid;
  gap: 8px;
}

.brainx-link-section + .brainx-link-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(86, 210, 255, 0.10);
}

.brainx-link-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.brainx-link-section .brainx-link-list {
  margin-top: 0;
}

.brainx-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(77, 190, 255, 0.14);
  background: rgba(5, 34, 52, 0.82);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.brainx-link-row:hover {
  transform: translateY(-1px);
  border-color: rgba(104, 223, 255, 0.24);
  box-shadow: 0 10px 18px rgba(0, 10, 18, 0.16);
}

.brainx-link-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.brainx-link-main strong {
  color: #f3fdff;
  font-size: 13px;
  line-height: 1.4;
}

.brainx-link-main span {
  color: rgba(152, 231, 255, 0.74);
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.brainx-link-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.brainx-link-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(99, 221, 255, 0.16);
  background: rgba(9, 55, 81, 0.82);
  color: rgba(238, 251, 255, 0.92);
  font-size: 11px;
  font-weight: 700;
}

.brainx-resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.brainx-resource-card {
  display: grid;
  gap: 6px;
  padding: 12px 11px;
  border-radius: 12px;
  border: 1px solid rgba(79, 197, 255, 0.16);
  background: linear-gradient(180deg, rgba(8, 44, 66, 0.9), rgba(4, 26, 40, 0.84));
}

.brainx-resource-card span {
  color: rgba(132, 227, 255, 0.72);
  font-size: 12px;
}

.brainx-resource-card strong {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
}

.brainx-resource-card strong em {
  font-style: normal;
  color: rgba(132, 227, 255, 0.74);
  font-size: 12px;
  font-weight: 600;
}

.brainx-resource-card p {
  margin: 0;
  color: rgba(152, 231, 255, 0.72);
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.brainx-empty {
  padding: 12px 10px;
  border-radius: 12px;
  border: 1px dashed rgba(90, 213, 255, 0.22);
  background: rgba(5, 34, 52, 0.58);
  color: rgba(162, 234, 255, 0.76);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.brainx-project-grid,
.brainx-service-grid {
  display: grid;
  gap: 12px;
}

.brainx-project-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.brainx-project-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(74, 189, 255, 0.16);
  background: linear-gradient(180deg, rgba(7, 44, 66, 0.92), rgba(5, 29, 44, 0.84));
}

.brainx-project-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brainx-project-title span {
  color: #f3fdff;
  font-size: 15px;
  font-weight: 700;
}

.brainx-project-title em {
  font-style: normal;
  color: rgba(132, 227, 255, 0.72);
  font-size: 11px;
}

.brainx-project-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.brainx-project-kpis label {
  display: block;
  color: rgba(118, 220, 255, 0.68);
  font-size: 11px;
}

.brainx-project-kpis strong {
  display: block;
  margin-top: 6px;
  color: #ffffff;
  font-size: 24px;
}

.brainx-project-card p {
  margin: 0;
  color: rgba(108, 204, 241, 0.72);
  font-size: 12px;
}

.brainx-eco-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.brainx-eco-item {
  padding: 14px 12px;
  border-radius: 14px;
  border: 1px solid rgba(72, 190, 255, 0.14);
  background: linear-gradient(180deg, rgba(5, 39, 60, 0.88), rgba(4, 25, 38, 0.82));
  text-align: center;
}

.brainx-eco-item span {
  display: block;
  color: rgba(117, 222, 255, 0.72);
  font-size: 11px;
}

.brainx-eco-item strong {
  display: block;
  margin-top: 10px;
  color: #ffffff;
  font-size: 22px;
}

.brainx-mode-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.brainx-mode-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(89, 207, 255, 0.18);
  background: rgba(5, 38, 56, 0.82);
  color: rgba(205, 244, 255, 0.92);
  font-size: 12px;
  font-weight: 700;
  box-shadow: inset 0 0 14px rgba(0, 160, 255, 0.06);
}

.brainx-mode-pill.active {
  background: linear-gradient(135deg, rgba(5, 132, 199, 0.96), rgba(0, 198, 255, 0.92));
  color: #ffffff;
  box-shadow: 0 0 16px rgba(0, 190, 255, 0.22);
}

.brainx-map-shell {
  padding: 12px;
}

.brainx-map-shell--focus {
  padding: 6px 4px 4px;
}

.brainx-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.brainx-legend {
  display: grid;
  gap: 9px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(103, 225, 255, 0.18);
  background: linear-gradient(180deg, rgba(5, 32, 49, 0.82), rgba(4, 23, 36, 0.72));
  color: rgba(187, 238, 255, 0.84);
  font-size: 12px;
  box-shadow: 0 14px 28px rgba(1, 8, 16, 0.24), inset 0 0 24px rgba(60, 217, 255, 0.06);
}

.brainx-legend span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.brainx-legend b {
  font-size: 12px;
  font-weight: 700;
  color: #effcff;
}

.brainx-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 12px currentColor;
}

.brainx-legend i.major {
  background: #ffbf5a;
  color: #ffbf5a;
}

.brainx-legend i.mid {
  background: #ffe34d;
  color: #ffe34d;
}

.brainx-legend i.minor {
  background: #72ff84;
  color: #72ff84;
}

.brainx-map-tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(88, 209, 255, 0.16);
  background: rgba(6, 37, 56, 0.78);
}

.brainx-map-stage {
  position: relative;
  min-height: 760px;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 92% 74% at 50% 42%, rgba(20, 120, 180, 0.28), transparent 58%),
    radial-gradient(ellipse 56% 50% at 50% 54%, rgba(18, 170, 220, 0.22), transparent 54%),
    radial-gradient(circle at 18% 16%, rgba(12, 90, 150, 0.22), transparent 24%),
    radial-gradient(circle at 84% 18%, rgba(14, 110, 160, 0.18), transparent 24%),
    radial-gradient(circle at 76% 74%, rgba(10, 120, 180, 0.16), transparent 26%),
    linear-gradient(180deg, rgba(2, 16, 28, 0.62), rgba(2, 12, 20, 0.92) 36%, rgba(1, 8, 14, 1)),
    linear-gradient(135deg, #041a2e, #020f1a 58%, #010810);
  box-shadow:
    inset 0 0 0 1px rgba(70, 200, 255, 0.14),
    inset 0 0 80px rgba(0, 150, 240, 0.14),
    0 26px 44px rgba(1, 8, 14, 0.28);
}

.brainx-map-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 46%, rgba(105, 228, 255, 0.08), transparent 26%),
    linear-gradient(rgba(90, 194, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 194, 255, 0.025) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
  opacity: 0.18;
  pointer-events: none;
}

.brainx-map-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 46%, rgba(72, 232, 255, 0.10), transparent 30%),
    radial-gradient(circle at 50% 88%, rgba(7, 24, 38, 0.86), transparent 28%),
    linear-gradient(135deg, rgba(120, 235, 255, 0.04), rgba(120, 235, 255, 0) 34%),
    linear-gradient(180deg, rgba(5, 20, 33, 0), rgba(5, 20, 33, 0.24) 58%, rgba(2, 10, 16, 0.82));
}

.brainx-map-watermark {
  position: absolute;
  left: 50%;
  top: 49%;
  transform: translate(-50%, -50%);
  z-index: 0;
  color: rgba(150, 228, 255, 0.038);
  font-size: 86px;
  font-weight: 800;
  letter-spacing: 0.18em;
  white-space: nowrap;
  text-shadow: 0 0 32px rgba(80, 220, 255, 0.08);
  pointer-events: none;
}

.brainx-map-svg,
.brainx-map-markers {
  position: absolute;
  inset: 0;
}

.brainx-map-svg {
  width: 100%;
  height: 100%;
  z-index: 1;
}

.brainx-map-outline polygon,
.brainx-map-outline path {
  fill: url(#brainx-district-fill);
  stroke: rgba(100, 235, 255, 0.6);
  stroke-width: 0.08;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 3px rgba(60, 220, 255, 0.4)) drop-shadow(0 0 8px rgba(30, 190, 255, 0.2));
}

/* Outer glow on the whole outline group */
.brainx-map-outline {
  filter: url(#brainx-glow-outline);
}

.brainx-map-outline-stack polygon {
  fill: rgba(5, 92, 138, 0.08);
  stroke: rgba(77, 214, 255, 0.05);
  stroke-width: 0.08;
  stroke-linejoin: round;
}

.brainx-map-backdrop-stack polygon,
.brainx-map-backdrop-region polygon,
.brainx-map-water,
.brainx-map-road,
.brainx-map-backdrop-label text,
.brainx-map-road-label text,
.brainx-map-road-label rect {
  vector-effect: non-scaling-stroke;
}

.brainx-map-backdrop-stack polygon {
  fill: rgba(2, 20, 36, 0.12);
  stroke: rgba(60, 180, 240, 0.03);
  stroke-width: 0.08;
  stroke-linejoin: round;
}

.brainx-map-backdrop-stack.s4 polygon { opacity: 0.34; }
.brainx-map-backdrop-stack.s3 polygon { opacity: 0.28; }
.brainx-map-backdrop-stack.s2 polygon { opacity: 0.22; }
.brainx-map-backdrop-stack.s1 polygon { opacity: 0.18; }

.brainx-map-backdrop-terrain {
  opacity: 0.10;
  mix-blend-mode: screen;
}

.brainx-map-terrain-raster {
  opacity: 0.84;
  mix-blend-mode: normal;
}

.brainx-map-terrain-raster image {
  filter: brightness(0.98) contrast(1.06) saturate(0.84);
}

.brainx-map-terrain-clipped {
  display: block;
  opacity: 0.96;
  mix-blend-mode: normal;
}

.brainx-map-terrain-clipped image {
  filter: brightness(1.09) contrast(1.07) saturate(0.86);
}

.brainx-map-backdrop-region polygon {
  fill: rgba(4, 36, 58, 0.32);
  stroke: rgba(70, 200, 250, 0.12);
  stroke-width: 0.06;
  stroke-linejoin: round;
}

.brainx-map-backdrop-region.near polygon {
  fill: rgba(6, 58, 90, 0.38);
  stroke: rgba(80, 220, 255, 0.22);
  stroke-opacity: 0.22;
}

.brainx-map-backdrop-region.mid polygon {
  fill: rgba(5, 44, 70, 0.32);
  stroke: rgba(70, 200, 250, 0.16);
}

.brainx-map-backdrop-region.far polygon {
  fill: rgba(3, 30, 50, 0.26);
  stroke-opacity: 0.10;
}

.brainx-map-outline-stack.s6 polygon { fill-opacity: 0.38; stroke-opacity: 0.18; }
.brainx-map-outline-stack.s5 polygon { fill-opacity: 0.32; stroke-opacity: 0.16; }
.brainx-map-outline-stack.s4 polygon { fill-opacity: 0.26; stroke-opacity: 0.14; }
.brainx-map-outline-stack.s3 polygon { fill-opacity: 0.22; stroke-opacity: 0.12; }
.brainx-map-outline-stack.s2 polygon { fill-opacity: 0.18; stroke-opacity: 0.10; }
.brainx-map-outline-stack.s1 polygon { fill-opacity: 0.14; stroke-opacity: 0.08; }

.brainx-map-terrain {
  opacity: 0.10;
  mix-blend-mode: screen;
}

.brainx-map-contours {
  opacity: 0.82;
  mix-blend-mode: screen;
}

.brainx-map-contour polygon {
  fill: none;
  stroke: rgba(130, 230, 255, 0.22);
  stroke-width: 0.12;
  stroke-dasharray: 1.3 1.7;
  stroke-linejoin: round;
}

.brainx-map-contour.c1 polygon { opacity: 0.58; }
.brainx-map-contour.c2 polygon { opacity: 0.48; }
.brainx-map-contour.c3 polygon { opacity: 0.38; }
.brainx-map-contour.c4 polygon { opacity: 0.28; }
.brainx-map-contour.c5 polygon { opacity: 0.20; }

.brainx-map-detail-water,
.brainx-map-detail-roads {
  mix-blend-mode: screen;
}

.brainx-map-water,
.brainx-map-road {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brainx-map-water {
  stroke: rgba(100, 220, 255, 0.28);
}

.brainx-map-water.type-0 {
  stroke-width: 0.32;
  stroke: rgba(110, 230, 255, 0.36);
}

.brainx-map-water.type-1 {
  stroke-width: 0.22;
}

.brainx-map-water.type-2 {
  stroke-width: 0.16;
  stroke: rgba(90, 210, 255, 0.18);
}

.brainx-map-road {
  stroke: rgba(110, 225, 255, 0.18);
}

.brainx-map-road.minor {
  stroke-width: 0.10;
  stroke-opacity: 0.5;
}

.brainx-map-road.primary {
  stroke-width: 0.14;
  stroke: rgba(120, 235, 255, 0.26);
}

.brainx-map-road.major {
  stroke-width: 0.22;
  stroke: rgba(150, 240, 255, 0.38);
}

.brainx-map-labels {
  pointer-events: none;
}

.brainx-map-backdrop-label text {
  fill: rgba(165, 232, 255, 0.52);
  font-size: 0.78px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-anchor: middle;
  dominant-baseline: middle;
  paint-order: stroke;
  stroke: rgba(2, 18, 31, 0.82);
  stroke-width: 0.16;
}

.brainx-map-backdrop-label.lnear text {
  fill: rgba(186, 243, 255, 0.64);
}

.brainx-map-road-label rect {
  fill: rgba(6, 35, 54, 0.58);
  stroke: rgba(108, 225, 255, 0.14);
  stroke-width: 0.06;
}

.brainx-map-road-label text {
  fill: rgba(208, 246, 255, 0.84);
  font-size: 0.18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-anchor: middle;
  dominant-baseline: middle;
}

.brainx-map-road-label.road-primary text {
  fill: rgba(185, 240, 255, 0.76);
}

.brainx-map-road-label.road-major text {
  fill: rgba(255, 228, 170, 0.88);
}

.brainx-map-network {
  opacity: 0.38;
  mix-blend-mode: screen;
}

.brainx-map-network path {
  fill: none;
  stroke-width: 0.3;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(104, 232, 255, 0.12));
}

.brainx-map-network-core {
  stroke-dasharray: 1.4 1.9;
}

.brainx-map-network-chain {
  stroke-width: 0.22;
  stroke-dasharray: 1 1.6;
  opacity: 0.58;
}

.brainx-map-network circle {
  filter: drop-shadow(0 0 10px rgba(126, 237, 255, 0.18));
}

.brainx-map-shapes {
  opacity: 0.62;
}

.brainx-map-shape-base polygon {
  fill: rgba(6, 58, 90, calc(0.01 + var(--brainx-shape-strength, 0.3) * 0.012));
  stroke: none;
  stroke-width: 0;
}

.brainx-map-shape-relief.r3 polygon { opacity: 0.42; }
.brainx-map-shape-relief.r2 polygon { opacity: 0.30; }
.brainx-map-shape-relief.r1 polygon { opacity: 0.18; }

.brainx-map-shape-link {
  cursor: pointer;
}

/* ── Hit-test overlay: invisible but captures all pointer events ── */
.brainx-map-hittest {
  pointer-events: all;
  cursor: pointer;
}

.brainx-map-hittest polygon {
  fill: rgba(0, 0, 0, 0);
  stroke: none;
  pointer-events: all;
  cursor: pointer;
}

.brainx-map-shape polygon {
  fill: rgba(14, 112, 161, calc(0.015 + var(--brainx-shape-strength, 0.3) * 0.025));
  stroke: none;
  stroke-width: 0;
  stroke-linejoin: round;
  filter: none;
  transition: fill 180ms ease, stroke 180ms ease, filter 180ms ease;
}

.brainx-map-shape-link:hover .brainx-map-shape polygon,
.brainx-map-shape.is-active polygon {
  fill: rgba(80, 220, 255, 0.18);
  stroke: rgba(160, 245, 255, 0.16);
  stroke-width: 0.015;
  filter: drop-shadow(0 0 4px rgba(120, 240, 255, 0.4));
}

/* ── Thin glowing street boundary strokes ── */
.brainx-map-street-strokes {
  pointer-events: none;
}

.brainx-map-street-stroke {
  fill: none;
  stroke: rgba(220, 245, 255, 0.52);
  stroke-width: 0.09;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: drop-shadow(0 0 1.6px rgba(255, 255, 255, 0.55)) drop-shadow(0 0 3.4px rgba(180, 230, 255, 0.24));
}

/* ── Thin glowing district boundary stroke ── */
.brainx-map-street-stroke-outer {
  stroke: rgba(220, 245, 255, 0.22);
  stroke-width: 0.07;
  filter: none;
}

.brainx-map-boundary-cover {
  fill: none;
  stroke-width: 0.12;
  stroke-linejoin: round;
  stroke-linecap: round;
  opacity: 0.96;
  filter: none;
}

.brainx-map-district-strokes {
  pointer-events: none;
}

.brainx-map-district-stroke {
  fill: none;
  stroke: rgba(240, 252, 255, 0.9);
  stroke-width: 0.25;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 10px rgba(180, 240, 255, 0.6)) drop-shadow(0 0 20px rgba(100, 200, 255, 0.3));
}

.brainx-map-markers {
  pointer-events: none;
  z-index: 6;
}

.brainx-map-marker {
  position: absolute;
  transform: translate(-50%, -100%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
  z-index: 2;
}

.brainx-map-pin {
  position: relative;
  width: 30px;
  height: 44px;
}

.brainx-map-ring,
.brainx-map-dot,
.brainx-map-base,
.brainx-map-beam {
  position: absolute;
}

.brainx-map-base {
  left: 50%;
  bottom: -2px;
  width: 28px;
  height: 10px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, currentColor 0%, rgba(255, 255, 255, 0.08) 55%, rgba(255, 255, 255, 0) 72%);
  opacity: 0.38;
  filter: blur(1.2px);
}

.brainx-map-beam {
  left: 50%;
  bottom: 8px;
  width: 2px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), currentColor 42%, rgba(255, 255, 255, 0) 100%);
  opacity: 0.7;
}

.brainx-map-dot {
  left: 50%;
  top: 6px;
  width: 10px;
  height: 10px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, currentColor 45%, rgba(255, 255, 255, 0.08) 100%);
  box-shadow: 0 0 14px currentColor, 0 0 24px currentColor;
}

.brainx-map-ring {
  left: 50%;
  top: 0;
  width: 22px;
  height: 22px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0.42;
  animation: brainxPulse 2.6s ease-out infinite;
}

@keyframes brainxPulse {
  0% { transform: scale(0.6); opacity: 0.5; }
  100% { transform: scale(1.6); opacity: 0; }
}

.brainx-map-marker.major {
  color: #ffad47;
}

.brainx-map-marker.mid {
  color: #ffe34d;
}

.brainx-map-marker.minor {
  color: #63ff68;
}

.brainx-map-marker.minor .brainx-map-dot {
  top: 8px;
  width: 7px;
  height: 7px;
  opacity: 0.7;
}

.brainx-map-marker.minor .brainx-map-ring {
  top: 4px;
  width: 16px;
  height: 16px;
  opacity: 0.26;
}

.brainx-map-label {
  padding: 0 10px;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(113, 221, 255, 0.16);
  background: rgba(4, 28, 43, 0.86);
  color: #effcff;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 10px 18px rgba(0, 9, 18, 0.24);
}

.brainx-map-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 14px);
  transform: translateX(-50%) translateY(6px);
  width: 184px;
  padding: 12px 12px 10px;
  border-radius: 14px;
  border: 1px solid rgba(89, 210, 255, 0.18);
  background: rgba(5, 35, 53, 0.96);
  box-shadow: 0 14px 28px rgba(0, 6, 14, 0.36);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.brainx-map-tip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: rgba(5, 35, 53, 0.96);
  border-right: 1px solid rgba(89, 210, 255, 0.18);
  border-bottom: 1px solid rgba(89, 210, 255, 0.18);
  transform: translateX(-50%) rotate(45deg);
}

.brainx-map-tip strong {
  display: block;
  margin-bottom: 8px;
  color: #ffffff;
  font-size: 13px;
}

.brainx-map-tip span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: rgba(169, 237, 255, 0.84);
  font-size: 11px;
  line-height: 1.6;
}

.brainx-map-tip b {
  color: #ffffff;
}

.brainx-map-marker:hover .brainx-map-tip,
.brainx-map-marker.is-active .brainx-map-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.brainx-map-footer {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.brainx-map-footer.brainx-map-footer--summary {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
}

.brainx-focus-card,
.brainx-rank-card,
.brainx-monitor-column {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(75, 194, 255, 0.16);
  background: rgba(5, 33, 50, 0.88);
}

.brainx-focus-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.brainx-focus-head strong {
  color: #f7feff;
  font-size: 16px;
}

.brainx-focus-head span {
  color: rgba(122, 221, 255, 0.76);
  font-size: 12px;
}

.brainx-focus-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.brainx-focus-stat {
  padding: 9px;
  border-radius: 10px;
  background: rgba(9, 44, 65, 0.78);
  border: 1px solid rgba(74, 192, 255, 0.14);
}

.brainx-focus-stat span {
  display: block;
  color: rgba(122, 223, 255, 0.76);
  font-size: 11px;
}

.brainx-focus-stat strong {
  display: block;
  margin-top: 8px;
  color: #ffffff;
  font-size: 17px;
}

.brainx-rank-card,
.brainx-monitor-column {
  display: grid;
  gap: 10px;
  align-content: start;
}

.brainx-rank-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) minmax(56px, 90px) auto;
  align-items: center;
  gap: 8px;
  color: rgba(218, 246, 255, 0.9);
}

.brainx-rank-row.is-active {
  color: #ffffff;
}

.brainx-rank-index {
  color: rgba(255, 193, 84, 0.92);
  font-size: 11px;
  font-weight: 700;
}

.brainx-rank-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.brainx-rank-bar {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.brainx-rank-bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(84, 241, 255, 0.92), rgba(255, 188, 82, 0.92));
}

.brainx-rank-row b {
  font-size: 12px;
  color: rgba(248, 253, 255, 0.96);
}

.brainx-service-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.brainx-service-card {
  padding: 14px 14px 12px;
  border-radius: 16px;
  border: 1px solid rgba(80, 196, 255, 0.16);
  background: linear-gradient(180deg, rgba(7, 42, 63, 0.92), rgba(4, 26, 40, 0.86));
  box-shadow: inset 0 0 18px rgba(0, 168, 255, 0.05);
}

.brainx-service-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.brainx-service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(93, 215, 255, 0.2);
  background: rgba(9, 56, 82, 0.8);
  color: #78e7ff;
  box-shadow: 0 0 16px rgba(75, 222, 255, 0.12);
}

.brainx-service-glyph {
  width: 18px;
  height: 18px;
}

.brainx-service-head h3 {
  margin: 0;
  color: #f5fdff;
  font-size: 16px;
}

.brainx-service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.brainx-service-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid rgba(87, 210, 255, 0.10);
}

.brainx-service-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.brainx-service-list span {
  color: rgba(171, 236, 255, 0.84);
  font-size: 12px;
}

.brainx-service-list b {
  color: #ffffff;
  font-size: 13px;
}

@media (max-width: 1680px) {
  .brainx-board {
    grid-template-columns: minmax(230px, 250px) minmax(0, 1fr) minmax(250px, 290px);
  }

  .brainx-service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1480px) {
  .brainx-topline {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .brainx-topline-side,
  .brainx-topline-actions {
    justify-self: stretch;
  }

  .brainx-topline-actions {
    justify-content: center;
  }

  .brainx-board {
    grid-template-columns: minmax(240px, 270px) minmax(0, 1fr);
    grid-template-areas:
      "left center"
      "right right";
  }

  .brainx-side.left {
    grid-area: left;
  }

  .brainx-stage {
    grid-area: center;
  }

  .brainx-side.right {
    grid-area: right;
  }
}

@media (max-width: 1180px) {
  .brainx-board {
    grid-template-columns: 1fr;
    grid-template-areas:
      "left"
      "center"
      "right";
  }

  .brainx-topline-center {
    min-width: 0;
    width: 100%;
  }

  .brainx-enterprise-grid,
  .brainx-map-footer,
  .brainx-project-grid {
    grid-template-columns: 1fr;
  }

  .brainx-capsule-grid,
  .brainx-metric-grid,
  .brainx-eco-grid,
  .brainx-service-grid,
  .brainx-topic-grid,
  .brainx-resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .brainx-canvas {
    padding: 14px;
    border-radius: 18px;
  }

  .brainx-topline-center span {
    font-size: 22px;
  }

  .brainx-stage-head,
  .brainx-panel-head,
  .brainx-map-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .brainx-mode-bar,
  .brainx-topline-actions {
    justify-content: flex-start;
  }

  .brainx-panel-head span {
    max-width: none;
    text-align: left;
  }

  .brainx-capsule-grid,
  .brainx-metric-grid,
  .brainx-eco-grid,
  .brainx-service-grid,
  .brainx-topic-grid,
  .brainx-resource-grid,
  .brainx-mini-stat-grid,
  .brainx-focus-stats {
    grid-template-columns: 1fr;
  }

  .brainx-link-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .brainx-link-meta {
    justify-content: flex-start;
  }

  .brainx-map-stage {
    min-height: 460px;
  }

  .brainx-map-watermark {
    font-size: 42px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Brain-X Map – atmosphere / orbit / haze / beacon / hero
   ═══════════════════════════════════════════════════════════════ */

/* ── Atmosphere container ────────────────────────────────────── */
.brainx-map-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* ── Orbiting rings around the map center ────────────────────── */
.brainx-map-orbit {
  position: absolute;
  left: 50%;
  top: 48%;
  border-radius: 50%;
  border: 1px solid rgba(82, 218, 255, 0.05);
  transform: translate(-50%, -50%);
  animation: brainxOrbitSpin 72s linear infinite;
  opacity: 0.18;
}

.brainx-map-orbit.orbit-a {
  width: 62%;
  height: 62%;
  border-color: rgba(82, 218, 255, 0.04);
  animation-duration: 86s;
}

.brainx-map-orbit.orbit-b {
  width: 82%;
  height: 82%;
  border-color: rgba(82, 218, 255, 0.03);
  animation-duration: 108s;
  animation-direction: reverse;
}

.brainx-map-orbit.orbit-c {
  width: 96%;
  height: 96%;
  border-color: rgba(82, 218, 255, 0.02);
  animation-duration: 124s;
}

@keyframes brainxOrbitSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ── Haze glow blobs ─────────────────────────────────────────── */
.brainx-map-haze {
  position: absolute;
  border-radius: 50%;
  filter: blur(82px);
  opacity: 0.2;
  animation: brainxHazePulse 9s ease-in-out infinite alternate;
}

.brainx-map-haze.haze-a {
  width: 38%;
  height: 38%;
  left: 28%;
  top: 22%;
  background: radial-gradient(circle, rgba(0, 172, 255, 0.18), transparent 70%);
}

.brainx-map-haze.haze-b {
  width: 32%;
  height: 32%;
  right: 18%;
  bottom: 20%;
  background: radial-gradient(circle, rgba(0, 214, 255, 0.14), transparent 70%);
  animation-delay: 3s;
}

@keyframes brainxHazePulse {
  0%   { opacity: 0.32; transform: scale(0.92); }
  100% { opacity: 0.52; transform: scale(1.06); }
}

/* ── Hero top bar inside map shell ───────────────────────────── */
.brainx-map-hero-top {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px 8px;
}

.brainx-map-title-group {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.brainx-map-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: rgba(128, 225, 255, 0.55);
  text-transform: uppercase;
}

.brainx-map-title-group h3 {
  margin: 0;
  color: #f0fbff;
  font-size: 19px;
  font-weight: 800;
  text-shadow: 0 0 18px rgba(82, 218, 255, 0.2);
}

.brainx-map-title-group p {
  margin: 0;
  color: rgba(148, 230, 255, 0.62);
  font-size: 12px;
  line-height: 1.6;
  max-width: 560px;
}

.brainx-map-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex-shrink: 0;
  max-width: 420px;
}

.brainx-map-meta-item {
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(82, 204, 255, 0.14);
  background: rgba(5, 38, 58, 0.78);
  text-align: center;
}

.brainx-map-meta-item span {
  display: block;
  color: rgba(132, 228, 255, 0.72);
  font-size: 11px;
}

.brainx-map-meta-item strong {
  display: block;
  margin-top: 4px;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.1;
}

.brainx-map-hero-side {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.brainx-map-hero-side .brainx-legend {
  justify-self: end;
}

/* ── Floating head (legend bar inside map stage) ─────────────── */
.brainx-map-head.brainx-map-head-floating {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  z-index: 6;
  margin-bottom: 0;
  padding: 0 4px;
  pointer-events: auto;
  justify-content: flex-end;
}

.brainx-map-floatcard {
  position: absolute;
  left: 14px;
  bottom: 86px;
  z-index: 6;
  width: min(292px, calc(100% - 28px));
  padding: 14px;
  background: linear-gradient(180deg, rgba(6, 38, 58, 0.90), rgba(4, 28, 44, 0.82));
  box-shadow:
    0 18px 30px rgba(0, 8, 16, 0.34),
    inset 0 0 22px rgba(84, 220, 255, 0.05);
  backdrop-filter: blur(10px);
}

.brainx-map-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.brainx-map-card-head span {
  color: rgba(134, 229, 255, 0.78);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.brainx-map-card-head b {
  color: #ffffff;
  font-size: 12px;
}

.brainx-map-floatcard .brainx-rank-row {
  padding: 4px 0;
}

/* ── Center core marker ──────────────────────────────────────── */
.brainx-map-core {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 4;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brainx-map-core-ring {
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid rgba(255, 196, 82, 0.5);
  animation: brainxCorePulse 2.8s ease-out infinite;
}

.brainx-map-core-ring.ring-b {
  width: 92px;
  height: 92px;
  border-color: rgba(255, 196, 82, 0.24);
  animation-delay: 0.8s;
}

.brainx-map-core-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff8d7, #ffd06a 32%, #ff9328 78%);
  box-shadow:
    0 0 18px rgba(255, 178, 60, 0.6),
    0 0 40px rgba(255, 178, 60, 0.28);
}

.brainx-map-core-label {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(5, 33, 50, 0.88);
  border: 1px solid rgba(255, 196, 82, 0.24);
  color: rgba(255, 220, 140, 0.94);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 0 16px rgba(255, 178, 60, 0.14);
}

@keyframes brainxCorePulse {
  0%   { transform: scale(0.7); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* ── Beacon markers (top streets) ────────────────────────────── */
.brainx-map-beacons {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.brainx-map-beacon {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  cursor: pointer;
  z-index: 7;
}

.brainx-map-beacon-base {
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 42px;
  height: 16px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 1px solid currentColor;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 68%);
  box-shadow: 0 0 14px currentColor;
  opacity: 0.44;
  animation: brainxHotspotPulse 2.6s ease-out infinite;
}

.brainx-map-beacon-line {
  width: 2px;
  height: 44px;
  background: linear-gradient(180deg, rgba(255, 233, 180, 0), currentColor 38%, rgba(255, 255, 255, 0) 100%);
}

.brainx-map-beacon-core {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff8d7, currentColor 46%, rgba(255, 255, 255, 0.06) 100%);
  box-shadow:
    0 0 10px currentColor,
    0 0 22px currentColor;
  animation: brainxBeaconGlow 2s ease-in-out infinite alternate;
}

.brainx-map-beacon.b1 { color: #ffad47; }
.brainx-map-beacon.b2 { color: #ffe34d; }
.brainx-map-beacon.b3 { color: #ffe34d; }
.brainx-map-beacon.b4 { color: #63ff68; }

.brainx-map-beacon-label {
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(5, 33, 50, 0.88);
  border: 1px solid rgba(87, 215, 255, 0.18);
  color: #e8faff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(0, 6, 14, 0.28);
}

.brainx-map-beacon .brainx-map-beacon-line {
  height: 40px;
}
.brainx-map-beacon.b1 .brainx-map-beacon-line { height: 58px; }
.brainx-map-beacon.b2 .brainx-map-beacon-line { height: 50px; }
.brainx-map-beacon.b3 .brainx-map-beacon-line { height: 44px; }
.brainx-map-beacon.b4 .brainx-map-beacon-line { height: 38px; }

@keyframes brainxBeaconGlow {
  0%   { transform: scale(0.92); box-shadow: 0 0 8px currentColor, 0 0 16px currentColor; }
  100% { transform: scale(1.08); box-shadow: 0 0 14px currentColor, 0 0 26px currentColor; }
}

@keyframes brainxHotspotPulse {
  0%   { transform: translateX(-50%) scale(0.78); opacity: 0.58; }
  100% { transform: translateX(-50%) scale(1.28); opacity: 0; }
}

/* ── Status bar at bottom of map ─────────────────────────────── */
.brainx-map-statusbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px 12px;
  background:
    linear-gradient(180deg, rgba(3, 21, 33, 0), rgba(3, 21, 33, 0.76) 34%, rgba(3, 21, 33, 0.96));
}

.brainx-map-statusbar:empty {
  display: none;
}

.brainx-map-status-item {
  display: grid;
  gap: 4px;
  justify-items: center;
  min-width: 150px;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid rgba(88, 211, 255, 0.12);
  background: rgba(5, 31, 47, 0.72);
  box-shadow: inset 0 0 18px rgba(76, 213, 255, 0.04);
  backdrop-filter: blur(8px);
}

.brainx-map-status-item span {
  color: rgba(128, 222, 255, 0.68);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brainx-map-status-item strong {
  color: rgba(228, 249, 255, 0.92);
  font-size: 13px;
}

/* ── Enhance the district outline with glow for dark theme ───── */
.brainx-map-svg {
  filter: drop-shadow(0 0 10px rgba(62, 212, 255, 0.14)) drop-shadow(0 0 24px rgba(20, 160, 240, 0.06));
}

/* ── Responsive – beacons & atmosphere ───────────────────────── */
@media (max-width: 1180px) {
  .brainx-map-hero-top {
    flex-direction: column;
    gap: 10px;
  }

  .brainx-map-hero-side {
    width: 100%;
    justify-items: start;
  }

  .brainx-map-meta {
    gap: 8px;
    justify-content: flex-start;
    max-width: none;
  }

  .brainx-map-hero-side .brainx-legend {
    justify-self: start;
  }

  .brainx-map-beacon-line {
    height: 24px !important;
  }

  .brainx-map-floatcard {
    display: none;
  }

  .brainx-map-statusbar {
    gap: 10px;
  }
}

@media (max-width: 760px) {
  .brainx-map-hero-top {
    padding: 10px 12px 8px;
  }

  .brainx-map-meta-item {
    padding: 6px 10px;
  }

  .brainx-map-hero-side .brainx-legend {
    width: 100%;
    gap: 8px;
  }

  .brainx-map-beacon-label {
    font-size: 10px;
  }

  .brainx-map-core-ring {
    width: 32px;
    height: 32px;
  }

  .brainx-map-core-ring.ring-b {
    width: 52px;
    height: 52px;
  }

  .brainx-map-statusbar {
    padding: 10px 10px 12px;
    gap: 8px;
  }

  .brainx-map-status-item {
    min-width: calc(50% - 8px);
    padding: 8px 10px;
  }
}

/* ================================================================
 *  Enterprise Portal (企业端) Styles
 * ================================================================ */

/* ═══════════════════════════════════════════
   Enterprise Pages
   ═══════════════════════════════════════════ */

.ent-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0;
}

/* ── Top action bar ── */
.ent-top-action-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ent-company-title {
  font-size: 14px;
  font-weight: 600;
  color: #1e3a5f;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ent-action-link {
  font-size: 12px;
  color: #3a7fc8;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid #d0e3ff;
  background: #f4f8ff;
  transition: all 150ms ease;
}

.ent-action-link:hover {
  background: #3a7fc8;
  color: #fff;
  border-color: #3a7fc8;
  text-decoration: none;
}

/* ── Support services bar ── */
.ent-support-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 18px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ent-support-label {
  font-size: 12px;
  font-weight: 600;
  color: #1e3a5f;
  white-space: nowrap;
}

.ent-support-chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  background: #f4f8ff;
  color: #3a7fc8;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #d0e3ff;
  cursor: pointer;
  transition: all 150ms ease;
}

.ent-support-chip:hover {
  background: #3a7fc8;
  color: #fff;
  border-color: #3a7fc8;
}

/* ── Home search area ── */
.ent-home-search {
  display: flex;
  gap: 16px;
  align-items: stretch;
}

.ent-search-box {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ent-search-main-label {
  font-size: 14px;
  font-weight: 600;
  color: #1e3a5f;
}

.ent-search-main-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #dde5ee;
  border-radius: 8px;
  font-size: 13px;
  color: #333;
  resize: vertical;
  outline: none;
  line-height: 1.6;
  background: #f8fafc;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  box-sizing: border-box;
}

.ent-search-main-input:focus {
  border-color: #3a7fc8;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(58, 127, 200, 0.08);
}

.ent-search-main-actions {
  display: flex;
  justify-content: flex-end;
}

.ent-cat-panel {
  width: 240px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ent-cat-title {
  font-size: 13px;
  font-weight: 600;
  color: #1e3a5f;
  margin: 0;
}

.ent-cat-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ent-cat-btn {
  display: block;
  width: 100%;
  padding: 8px 14px;
  border: 1px solid #dde5ee;
  border-radius: 8px;
  background: #f8fafc;
  color: #1e3a5f;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: all 150ms ease;
}

.ent-cat-btn:hover {
  background: #3a7fc8;
  color: #fff;
  border-color: #3a7fc8;
}

.ent-result-hint {
  padding: 10px 18px;
  background: #fffcf5;
  border-radius: 8px;
  border: 1px solid #f0e4c8;
}

.ent-result-hint .muted {
  font-size: 12px;
  color: #8a7a5a;
}

/* ── Dual panel layout ── */
.ent-dual-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.ent-dual-left,
.ent-dual-right {
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ent-dual-left {
  background: #f4f8ff;
  border: 1px solid #d0e3ff;
}

.ent-dual-right {
  background: #fffaf0;
  border: 1px solid #f0e4c8;
}

.ent-dual-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e3a5f;
  margin: 0;
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(58, 127, 200, 0.15);
}

.ent-dual-right .ent-dual-title {
  color: #7a5a0a;
  border-bottom-color: rgba(180, 140, 40, 0.15);
}

/* ── Chart placeholder ── */
.ent-chart-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  border: 1px dashed #c0d4e8;
  color: #7a9cc0;
  font-size: 12px;
}

.ent-dual-right .ent-chart-placeholder {
  border-color: #e0d0a0;
  color: #a09060;
}

/* ── Search card ── */
.ent-search-card {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.ent-search-title {
  font-size: 12px;
  font-weight: 600;
  color: #1e3a5f;
  margin: 0;
}

.ent-search-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.ent-search-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #dde5ee;
  border-radius: 6px;
  font-size: 12px;
  color: #333;
  resize: vertical;
  outline: none;
  background: #fff;
  line-height: 1.5;
  transition: border-color 150ms ease;
}

.ent-search-input:focus {
  border-color: #3a7fc8;
}

.ent-search-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.ent-search-hint {
  font-size: 11px;
  color: #8a8a8a;
  margin: 0;
  line-height: 1.5;
}

/* ── Recommend list ── */
.ent-recommend-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ent-recommend-title {
  font-size: 12px;
  font-weight: 600;
  color: #1e3a5f;
  margin: 0 0 2px;
}

.ent-recommend-item {
  background: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: box-shadow 150ms ease, transform 150ms ease;
  cursor: pointer;
}

.ent-recommend-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.ent-recommend-name {
  font-size: 13px;
  font-weight: 600;
  color: #1a2a40;
  margin-bottom: 3px;
}

.ent-recommend-desc {
  font-size: 12px;
  color: #5c6b80;
  margin-bottom: 2px;
}

.ent-recommend-meta {
  font-size: 11px;
  color: #8a9ab0;
}

/* ── Partner bar ── */
.ent-partner-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 18px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ent-partner-label {
  font-size: 12px;
  font-weight: 600;
  color: #1e3a5f;
  white-space: nowrap;
}

.ent-partner-chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  background: #f4f8ff;
  color: #3a7fc8;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #d0e3ff;
  cursor: pointer;
  transition: all 150ms ease;
}

.ent-partner-chip:hover {
  background: #3a7fc8;
  color: #fff;
  border-color: #3a7fc8;
}

/* ── Company home layout ── */
.ent-company-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
}

.ent-company-side {
  flex-shrink: 0;
}

.ent-company-side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 80px;
}

.ent-company-side-item {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  background: #2B5485;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  transition: all 150ms ease;
  box-shadow: 0 1px 4px rgba(43, 84, 133, 0.15);
}

.ent-company-side-item:hover {
  background: #33669E;
  box-shadow: 0 2px 8px rgba(43, 84, 133, 0.25);
  transform: translateY(-1px);
}

.ent-company-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.ent-company-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
}

.ent-nav-tab {
  font-size: 12px;
  color: #5c6b80;
  cursor: pointer;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #fff;
  transition: all 150ms ease;
}

.ent-nav-tab:hover {
  color: #3a7fc8;
  border-color: #3a7fc8;
  background: #f4f8ff;
  text-decoration: none;
}

.ent-lobster-btn {
  margin-left: auto;
  padding: 6px 14px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f0c040, #e8b020);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(200, 160, 20, 0.2);
  transition: all 150ms ease;
  border: none;
}

.ent-lobster-btn:hover {
  box-shadow: 0 2px 8px rgba(200, 160, 20, 0.35);
  transform: translateY(-1px);
}

.ent-company-intro-card {
  display: flex;
  gap: 18px;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ent-company-photo-placeholder {
  width: 180px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f8ff;
  border-radius: 8px;
  border: 1px dashed #c0d4e8;
  color: #7a9cc0;
  font-size: 12px;
  min-height: 120px;
}

.ent-company-info h3 {
  font-size: 15px;
  font-weight: 700;
  color: #1e3a5f;
  margin: 0 0 8px;
}

.ent-company-info p {
  font-size: 12px;
  color: #5c6b80;
  margin: 3px 0;
  line-height: 1.6;
}

.ent-company-products-card {
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ent-company-products-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: #1e3a5f;
  margin: 0 0 4px;
}

.ent-company-products-card .muted {
  font-size: 12px;
  margin: 0 0 14px;
}

.ent-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.ent-product-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  color: #1a2a40;
  transition: all 150ms ease;
}

.ent-product-item:hover {
  background: #f4f8ff;
  border-color: #3a7fc8;
  box-shadow: 0 1px 4px rgba(58, 127, 200, 0.1);
}

.ent-product-icon {
  font-size: 16px;
}

/* ── Single panel (offline events) ── */
.ent-single-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ent-event-section {
  border-radius: 12px;
  padding: 20px;
}

.ent-event-primary {
  background: #f0faf5;
  border: 1px solid #c0e8d4;
}

.ent-event-secondary {
  background: #fffaf0;
  border: 1px solid #f0e4c8;
}

.ent-event-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.ent-event-card {
  background: #fff;
  border-radius: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 150ms ease;
}

.ent-event-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.ent-event-name {
  font-size: 13px;
  font-weight: 600;
  color: #1a2a40;
  margin-bottom: 4px;
}

.ent-event-desc {
  font-size: 12px;
  color: #5c6b80;
  margin-bottom: 2px;
}

.ent-event-meta {
  font-size: 11px;
  color: #8a9ab0;
}

/* ── Enterprise responsive ── */
@media (max-width: 768px) {
  .ent-home-search {
    flex-direction: column;
  }

  .ent-cat-panel {
    width: 100%;
  }

  .ent-dual-panel {
    grid-template-columns: 1fr;
  }

  .ent-company-layout {
    grid-template-columns: 1fr;
  }

  .ent-company-side-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    position: static;
  }

  .ent-company-side-item {
    flex: 1;
    min-width: 80px;
  }
}

/* Final jjmbkh.html alignment for 政府目标督查 content area.
   The app shell sidebar and topbar are intentionally not changed. */
.ent-tob-shell {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(180deg, #eef3f9 0%, #dfe9f5 100%);
}

.ent-tob-frame {
  display: block;
  width: 100%;
  height: 100vh;
  border: 0;
  background: #ffffff;
}

.ent-tob-floating {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 42;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(9, 27, 46, 0.82);
  border: 1px solid rgba(174, 216, 255, 0.18);
  box-shadow: 0 18px 48px rgba(3, 13, 26, 0.28);
  backdrop-filter: blur(16px);
}

.ent-tob-badge {
  color: #e6f4ff;
  font-size: 12px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.ent-tob-badge b {
  color: #ffffff;
  font-weight: 700;
}

.ent-tob-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f4fbff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.ent-tob-link:hover {
  background: rgba(132, 205, 255, 0.2);
  color: #ffffff;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .ent-tob-floating {
    left: 12px;
    right: 12px;
    bottom: 12px;
    justify-content: space-between;
    padding: 10px 12px;
    gap: 8px;
  }

  .ent-tob-badge {
    max-width: 44vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ent-tob-link {
    min-width: 74px;
    padding: 0 10px;
  }
}

.target-page {
  gap: 20px;
}

.target-page .target-control-bar {
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.target-page .target-control-bar select,
.target-page .target-control-bar input {
  height: 38px;
  padding: 8px 12px;
  border: 1px solid #E8F3FF;
  border-radius: 6px;
  background: #fff;
  color: #1F2937;
  font-size: 13px;
  box-shadow: none;
}

.target-page .target-control-bar select {
  min-width: 220px;
}

.target-page .target-control-bar input {
  flex: 1 1 260px;
  min-width: 220px;
}

.target-page .target-control-bar .btn,
.target-page .target-control-bar .btn.primary,
.target-page .target-control-bar .btn.reset {
  height: 38px;
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: #33669E;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 38px;
  box-shadow: none;
}

.target-page .target-control-bar .btn:hover,
.target-page .target-control-bar .btn.primary:hover,
.target-page .target-control-bar .btn.reset:hover {
  background: #2B5485;
}

.target-page .target-stat-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.target-page .target-stat-card {
  min-height: 118px;
  padding: 16px;
  border: 1px solid #E8F3FF;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
  align-content: start;
}

.target-page .target-stat-card strong {
  margin: 4px 0;
  font-size: 28px;
  font-weight: 800;
  color: #2B5485;
}

.target-page .target-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.target-page .target-panel {
  border: 1px solid #E8F3FF;
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
  padding: 20px;
}

.target-page .target-panel-head {
  margin-bottom: 16px;
  padding: 0;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.target-page .target-panel-head h3 {
  margin: 0;
  padding-left: 12px;
  border-left: 4px solid #33669E;
  color: #2B5485;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}

.target-page .target-trend-container {
  height: 180px;
  padding: 10px 0 0;
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.target-page .target-trend-item {
  flex: 1 1 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
}

.target-page .target-trend-bar {
  width: 100%;
  max-width: 42px;
  background: #33669E;
  border-radius: 6px;
  margin: 0 auto;
}

.target-page .target-trend-value {
  margin: 0;
  color: #2B5485;
  font-size: 12px;
  font-weight: 600;
}

.target-page .target-trend-year {
  color: #64748B;
  font-size: 12px;
}

.target-page .target-suggest-list {
  display: grid;
  gap: 10px;
}

.target-page .target-suggest-item {
  display: block;
  flex: initial;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: #F8FAFF;
  color: #2B5485;
  font-size: 13px;
  line-height: 1.75;
}

.target-page .target-view-tabs {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 16px;
}

.target-page .target-view-tab {
  padding: 6px 16px;
  border-radius: 20px;
  border: 0;
  background: #E8F3FF;
  color: #2B5485;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.target-page .target-view-tab.active {
  background: #33669E;
  color: #fff;
}

.target-page .target-table-wrap {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.target-page .target-compare-table {
  width: 100%;
  border-collapse: collapse;
}

.target-page .target-compare-table thead th {
  padding: 12px 16px;
  border-bottom: 1px solid #E8F3FF;
  background: #F8FAFF;
  color: #2B5485;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.target-page .target-compare-table tbody td {
  padding: 16px;
  border-bottom: 1px solid #E8F3FF;
  color: #1F2937;
  font-size: 13px;
  vertical-align: middle;
}

.target-page .target-compare-table tbody tr:hover:not(.target-row-masked) {
  background: #F9FBFF;
}

.target-page .target-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.target-page .target-progress {
  width: 120px;
  height: 6px;
  margin: 4px 8px 4px 0;
  border-radius: 3px;
  background: #E8F3FF;
}

.target-page .target-progress span {
  background: #33669E;
}

@media (max-width: 900px) {
  .target-page .target-grid-2,
  .target-page .target-stat-strip {
    grid-template-columns: 1fr;
  }

  .target-page .target-control-bar {
    align-items: stretch;
  }

  .target-page .target-control-bar select,
  .target-page .target-control-bar input,
  .target-page .target-control-bar .btn {
    width: 100%;
  }
}

/* Match jjmbkh.html typography and micro-spacing for the target page body only.
   Do not apply this to the shell sidebar or the page topbar. */
.target-page > .target-control-bar,
.target-page > .target-stat-strip,
.target-page > .target-grid-2,
.target-page > .target-panel {
  font-family: "Inter", sans-serif;
}

.target-page > .target-control-bar *,
.target-page > .target-stat-strip *,
.target-page > .target-grid-2 *,
.target-page > .target-panel * {
  font-family: "Inter", sans-serif;
}

.target-page .target-control-bar {
  margin-bottom: 0;
}

.target-page .target-control-bar select,
.target-page .target-control-bar input {
  font-weight: 400;
  letter-spacing: 0;
}

.target-page .target-control-bar .btn,
.target-page .target-control-bar .btn.primary,
.target-page .target-control-bar .btn.reset {
  font-weight: 500;
  letter-spacing: 0;
}

.target-page .target-stat-card span,
.target-page .target-stat-card em {
  font-weight: 400;
}

.target-page .target-stat-card strong {
  font-family: "Inter", sans-serif;
  letter-spacing: -0.02em;
}

.target-page .target-panel-head h3 {
  font-family: "Inter", sans-serif;
  font-weight: 600;
}

.target-page .target-trend-value {
  font-family: "Inter", sans-serif;
  margin-top: 0;
}

.target-page .target-trend-year {
  font-family: "Inter", sans-serif;
}

.target-page .target-compare-table thead th {
  font-family: "Inter", sans-serif;
}

.target-page .target-compare-table tbody td,
.target-page .target-compare-table tbody td b,
.target-page .target-compare-table .muted,
.target-page .target-status {
  font-family: "Inter", sans-serif;
}

/* Closer match to jjmbkh.html trend and suggestion blocks. */
.target-page .target-trend-container {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  height: 180px;
  margin-top: 10px;
  padding: 0;
}

.target-page .target-trend-item {
  flex: 1;
  height: auto;
  display: block;
  text-align: center;
}

.target-page .target-trend-bar {
  width: 100%;
  max-width: none;
  background: #33669E;
  border-radius: 6px;
  margin: 0 auto;
}

.target-page .target-trend-value {
  color: #2B5485;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
}

.target-page .target-trend-year {
  color: #000;
  font-size: 12px;
}

.target-page .target-suggest-item {
  font-size: 14px;
  line-height: normal;
  margin-top: 10px;
}

/* qyqcyj.html style alignment for Enterprise Exit page body only.
   Keep the shell sidebar and the in-page topbar untouched. */
.exit-page {
  gap: 20px;
}

.exit-page > :not(.decision-topline),
.exit-page > :not(.decision-topline) * {
  font-family: "Microsoft YaHei", sans-serif;
}

.exit-page .exit-panel {
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #E5E7EB;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.exit-page .exit-panel::after {
  display: none;
}

.exit-page .exit-panel-head {
  margin: 0 0 16px;
  padding: 0 0 10px;
  border-bottom: 1px solid #E5E7EB;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.exit-page .exit-panel-head h3 {
  margin: 0;
  color: #1F2937;
  font-size: 16px;
  font-weight: 700;
}

.exit-page .exit-panel-head span,
.exit-page .exit-panel-head .sub-title {
  color: #6B7280;
  font-size: 13px;
  font-weight: 400;
}

.exit-page .exit-summary-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.exit-page .exit-summary-card {
  flex: 1 1 130px;
  min-width: 130px;
  min-height: 0;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  text-align: left;
  display: block;
}

.exit-page .exit-summary-card .label {
  color: #6B7280;
  font-size: 13px;
  line-height: 1.5;
}

.exit-page .exit-summary-card .num {
  margin: 6px 0 0;
  color: #1F2937;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

.exit-page .exit-summary-card.data-total { background: #EFF6FF; }
.exit-page .exit-summary-card.data-high { background: #FEE2E2; }
.exit-page .exit-summary-card.data-mid-high { background: #FEF3C7; }
.exit-page .exit-summary-card.data-mid { background: #EFF6FF; }
.exit-page .exit-summary-card.data-low-mid { background: #D1FAE5; }
.exit-page .exit-summary-card.data-low { background: #F3F4F6; }
.exit-page .exit-summary-card.data-high .num { color: #DC2626; }
.exit-page .exit-summary-card.data-mid-high .num { color: #D97706; }
.exit-page .exit-summary-card.data-mid .num { color: #2563EB; }
.exit-page .exit-summary-card.data-low-mid .num { color: #059669; }
.exit-page .exit-summary-card.data-low .num { color: #6B7280; }

.exit-page .exit-layout {
  display: flex;
  align-items: stretch;
  gap: 20px;
}

.exit-page .company-list {
  flex: 2 1 0;
  min-width: 0;
}

.exit-page .risk-info {
  flex: 1 1 0;
  min-width: 300px;
  max-width: none;
}

.exit-page .exit-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
}

.exit-page .exit-filter-bar select,
.exit-page .exit-filter-bar input {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  background: #fff;
  color: #1F2937;
  font-size: 13px;
  outline: none;
}

.exit-page .exit-filter-bar select {
  min-width: 126px;
}

.exit-page .exit-filter-bar input {
  flex: 1 1 220px;
  min-width: 200px;
}

.exit-page .exit-filter-bar select:focus,
.exit-page .exit-filter-bar input:focus {
  border-color: #3B82F6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.exit-page .filter-btn-group {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.exit-page .exit-filter-bar .btn {
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.exit-page .exit-filter-bar .btn-search,
.exit-page .exit-filter-bar .btn.primary {
  color: #fff;
  background: #3B82F6;
  border: 1px solid #3B82F6;
}

.exit-page .exit-filter-bar .btn-reset,
.exit-page .exit-filter-bar .btn:not(.primary) {
  color: #6B7280;
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
}

.exit-page .exit-table-wrap {
  max-height: none;
  overflow: visible;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.exit-page .exit-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
  font-size: 13px;
}

.exit-page .exit-table th {
  position: static;
  padding: 12px 10px;
  border-bottom: 1px solid #E5E7EB;
  background: #F9FAFB;
  color: #1F2937;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.exit-page .exit-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #E5E7EB;
  color: #1F2937;
  font-size: 13px;
  vertical-align: middle;
}

.exit-page .exit-table tbody tr:hover {
  background: #F9FAFB;
}

.exit-page .operate-btn {
  color: #3B82F6;
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
}

.exit-page .operate-btn:hover {
  color: #2563EB;
  text-decoration: underline;
}

.exit-page .exit-level-tag {
  min-width: 0;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 400;
}

.exit-page .exit-pagination {
  justify-content: center;
  margin-top: 16px;
}

.exit-page .exit-pagination-meta {
  display: none;
}

.exit-page .exit-page-link {
  min-width: 0;
  height: auto;
  padding: 5px 11px;
  border-radius: 4px;
  background: #fff;
  color: #1F2937;
  font-size: 13px;
}

.exit-page .exit-page-link.active {
  color: #fff;
  background: #3B82F6;
  border-color: #3B82F6;
}

.exit-page .risk-chart {
  margin: 20px 0;
  text-align: center;
}

.exit-page .risk-chart-title {
  color: #1F2937;
  font-size: 13px;
}

.exit-page .chart-container {
  position: relative;
  width: 170px;
  height: 170px;
  margin: 14px auto 0;
  border-radius: 50%;
}

.exit-page .chart-inner {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: #fff;
  color: #6B7280;
  font-size: 12px;
  line-height: 1.6;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
}

.exit-page .risk-legend {
  margin-top: 10px;
  color: #6B7280;
  font-size: 12px;
  line-height: 1.6;
}

.exit-page .risk-type {
  margin-top: 16px;
  color: #1F2937;
  font-size: 13px;
  line-height: 1.7;
}

.exit-page .risk-type strong {
  color: #1F2937;
}

.exit-page .exit-disposal-grid {
  display: flex;
  gap: 16px;
}

.exit-page .exit-disposal-item {
  flex: 1;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
  background: #F9FAFB;
}

.exit-page .exit-disposal-item h4 {
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #E5E7EB;
  color: #1F2937;
  font-size: 14px;
  font-weight: 700;
}

.exit-page .exit-disposal-item div,
.exit-page .exit-disposal-item p {
  color: #6B7280;
  font-size: 13px;
  line-height: 1.8;
}

.exit-page .exit-disposal-btn {
  width: 100%;
  margin-top: 6px;
  padding: 8px 16px;
  border: 0;
  border-radius: 6px;
  background: #3B82F6;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
}

.exit-page .exit-disposal-btn:hover {
  background: #2563EB;
}

@media (max-width: 1100px) {
  .exit-page .exit-layout,
  .exit-page .exit-disposal-grid {
    flex-direction: column;
  }

  .exit-page .risk-info {
    min-width: 0;
  }

  .exit-page .filter-btn-group {
    margin-left: 0;
  }
}

/* zdxmdd.html closer visual match for Key Projects body only.
   Do not apply to the government sidebar or the page topbar. */
.kp-zdx-content {
  padding: 24px 28px 28px;
  background: #F6F9FD;
  background-attachment: scroll;
  color: #334155;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.kp-zdx-content * {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.kp-zdx-content .glass-card {
  background: #FFFFFF;
  border: 1px solid #E8F3FF;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(148, 163, 184, 0.08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.kp-zdx-content .glass-card:hover {
  box-shadow: 0 4px 16px rgba(148, 163, 184, 0.08);
  transform: none;
}

.kp-zdx-content .zdx-kpi-card {
  min-height: 154px;
  padding: 24px;
  border-radius: 12px;
}

.kp-zdx-content .zdx-kpi-card::before {
  display: none;
}

.kp-zdx-content .zdx-kpi-bg-icon {
  position: absolute;
  right: -18px;
  bottom: -22px;
  width: 96px;
  height: 96px;
  color: #BFDBFE;
  opacity: 0.28;
  transform-origin: center;
  transition: transform 0.25s ease;
  pointer-events: none;
}

.kp-zdx-content .zdx-kpi-bg-icon.warn {
  color: #FDBA74;
  opacity: 0.22;
}

.kp-zdx-content .zdx-kpi-bg-icon .ui-icon,
.kp-zdx-content .zdx-kpi-bg-icon svg {
  width: 100%;
  height: 100%;
}

.kp-zdx-content .zdx-kpi-card:hover .zdx-kpi-bg-icon {
  transform: scale(1.05);
}

.kp-zdx-content .zdx-kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  padding: 8px;
  font-size: 22px;
}

.kp-zdx-content .zdx-kpi-card:hover .zdx-kpi-icon {
  transform: none;
}

.kp-zdx-content .zdx-kpi-icon.icon-blue,
.kp-zdx-content .zdx-kpi-icon.icon-indigo,
.kp-zdx-content .zdx-kpi-icon.icon-emerald {
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
}

.kp-zdx-content .zdx-kpi-icon.icon-orange {
  background: #FFF7ED;
  color: #EA580C;
  border: 1px solid #FED7AA;
}

.kp-zdx-content .zdx-kpi-label {
  margin: 0 0 4px;
  color: #64748B;
  font-size: 14px;
  font-weight: 400;
}

.kp-zdx-content .zdx-kpi-value {
  color: #334155;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.kp-zdx-content .zdx-kpi-value .unit {
  color: #2563EB;
  font-size: 14px;
  font-weight: 400;
}

.kp-zdx-content .kpi-orange .zdx-kpi-value,
.kp-zdx-content .kpi-orange .zdx-kpi-value .unit {
  color: #EA580C;
}

.kp-zdx-content .zdx-kpi-footer {
  margin-top: 16px;
  padding-top: 0;
  border-top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #94A3B8;
  font-size: 12px;
}

.kp-zdx-content .zdx-kpi-trend {
  color: #F97316;
  font-weight: 500;
}

.kp-zdx-content .zdx-kpi-trend.warn {
  color: #EA580C;
}

.kp-zdx-content .zdx-chart-card {
  border-radius: 12px;
  overflow: visible;
}

.kp-zdx-content .zdx-chart-card::after {
  display: none;
}

.kp-zdx-content .zdx-chart-header {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kp-zdx-content .zdx-chart-header span {
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

.kp-zdx-content .zdx-gauge-card {
  min-height: 330px;
}

.kp-zdx-content .zdx-gauge-card .zdx-chart-header {
  margin-bottom: 0;
}

.kp-zdx-content .zdx-accent-bar {
  width: 4px;
  height: 16px;
  border-radius: 999px;
  background: #F97316;
  box-shadow: none;
}

.kp-zdx-content .zdx-search-input {
  width: 256px;
  padding: 8px 16px 8px 36px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  background: #F8FAFC;
  color: #334155;
  font-size: 12px;
}

.kp-zdx-content .zdx-search-input:focus {
  border-color: #93C5FD;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.08);
}

.kp-zdx-content .zdx-search-wrap .zdx-search-icon {
  left: 12px;
  font-size: 14px;
}

.kp-zdx-content .zdx-btn {
  min-height: 34px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
}

.kp-zdx-content .zdx-btn-primary {
  background: #2563EB;
  color: #fff;
  box-shadow: none;
}

.kp-zdx-content .zdx-btn-primary:hover {
  background: #1D4ED8;
  box-shadow: none;
  transform: none;
}

.kp-zdx-content .zdx-btn-outline {
  background: #FFFFFF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
}

.kp-zdx-content .zdx-btn-outline:hover {
  background: #EFF6FF;
  border-color: #93C5FD;
  transform: none;
}

.kp-zdx-content table {
  color: #334155;
  font-size: 12px;
}

.kp-zdx-content table thead {
  background: #F8FAFC;
}

.kp-zdx-content table thead th {
  padding: 16px 24px;
  border-bottom: 1px solid #DBEAFE;
  color: #475569;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}

.kp-zdx-content table tbody td {
  padding: 16px 24px;
  border-bottom: 1px solid #DBEAFE;
  color: #64748B;
  font-size: 12px;
}

.kp-zdx-content table tbody tr:hover {
  background: rgba(239, 246, 255, 0.45);
}

.kp-zdx-content table tbody tr:hover td {
  color: #334155;
}

.kp-zdx-content .status-tag-running {
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.2);
  color: #F97316;
  font-weight: 400;
  letter-spacing: 0;
}

.kp-zdx-content .status-tag-warning {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #EF4444;
  font-weight: 400;
  letter-spacing: 0;
}

.kp-zdx-content .status-tag-pending {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #F59E0B;
  font-weight: 400;
  letter-spacing: 0;
}

.kp-zdx-content .status-tag-done {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #3B82F6;
  font-weight: 400;
  letter-spacing: 0;
}

.kp-zdx-content .zdx-detail-link {
  color: #2563EB;
  padding: 0;
  background: transparent;
  border-radius: 0;
  font-size: 12px;
  font-weight: 400;
}

.kp-zdx-content .zdx-detail-link:hover {
  color: #1D4ED8;
  background: transparent;
  text-decoration: underline;
}

@media (max-width: 900px) {
  .kp-zdx-content {
    padding: 18px;
  }

  .kp-zdx-content .zdx-search-input {
    width: min(100%, 256px);
  }
}

/* Government workbench shell redesign */
.app-shell.gov-shell {
  --shell-side-offset: 240px;
  --shell-main-pad-x: 32px;
  min-height: 100vh;
  grid-template-columns: 240px minmax(0, 1fr);
  background: #f3f8fe;
}

.gov-shell .side {
  width: 240px;
  min-width: 240px;
  max-width: 240px;
  background: #28547f;
  color: #d6e5f5;
  box-shadow: 2px 0 14px rgba(28, 67, 108, 0.14);
  overflow-y: auto;
}

.gov-shell .brand {
  min-height: 81px;
  padding: 28px 22px 22px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #244b75;
}

.gov-shell .brand-title {
  margin: 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: 0;
}

.gov-shell .brand-sub {
  display: none;
}

.gov-shell .nav {
  padding: 0;
  gap: 0;
  display: block;
}

.gov-shell .nav-group {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gov-shell .nav-group-title {
  height: 48px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #f3f8ff;
  font-size: 14px;
  font-weight: 700;
}

.gov-shell .nav-group-chevron {
  width: 15px;
  height: 15px;
  color: rgba(214, 229, 245, 0.82);
}

.gov-shell .nav-group-chevron svg {
  stroke-width: 2;
}

.gov-shell .nav-group-items {
  padding: 6px 0 8px;
}

/* 分组折叠：点标题栏收起/展开（状态存 localStorage，重渲染后保持） */
.gov-shell .nav-group-title {
  cursor: pointer;
  user-select: none;
}
.gov-shell .nav-group-chevron {
  transition: transform 0.2s ease;
}
.gov-shell .nav-group.is-collapsed .nav-group-items {
  display: none;
}
.gov-shell .nav-group.is-collapsed .nav-group-chevron {
  transform: rotate(-90deg);
}

.gov-shell .nav a {
  position: relative;
  height: 41px;
  padding: 0 22px;
  border-radius: 0;
  gap: 10px;
  color: rgba(214, 229, 245, 0.76);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  background: transparent;
}

.gov-shell .nav a::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(143, 171, 202, 0.76);
  flex: 0 0 auto;
}

.gov-shell .nav a .nav-dot {
  display: none;
}

.gov-shell .nav a .nav-icon {
  width: 18px;
  height: 18px;
  border-radius: 0;
  background: transparent;
  color: rgba(176, 203, 231, 0.82);
}

.gov-shell .nav a .nav-icon .ui-icon,
.gov-shell .nav-icon-glyph {
  width: 16px;
  height: 16px;
  opacity: 1;
}

.gov-shell .nav a .nav-icon svg {
  stroke-width: 1.9;
}

.gov-shell .nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.gov-shell .nav a:hover .nav-icon {
  color: #cfe8ff;
}

.gov-shell .nav a.active {
  background: #33699f;
  color: #fff;
  font-weight: 700;
  box-shadow: inset 4px 0 0 #59b6ff;
}

.gov-shell .nav a.active::before {
  background: #9bd6ff;
}

.gov-shell .nav a.active .nav-icon {
  background: transparent;
  color: #80caff;
}

.gov-shell .nav a.active .nav-label {
  color: #eaf6ff;
}

.gov-shell .main {
  min-height: 100vh;
  padding: 20px 28px 40px 32px;
  background: #f3f8fe;
}

/* 智慧招商（zsyz iframe）：底部 padding 收窄，iframe 高度按 121px 余量计算（0817 小分辨率滚动条修复） */
.gov-shell .main:has(#zsyz-iframe) {
  padding-bottom: 20px;
}

.gov-shell .topbar {
  height: 61px;
  min-height: 61px;
  max-height: 61px;
  margin: 0 0 20px;
  padding: 0 20px;
  border-radius: 10px;
  background: #33699f;
  box-shadow: none;
}

.gov-shell .topbar-brand {
  gap: 8px;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}

.gov-shell .topbar-brand-icon {
  width: 20px;
  height: 20px;
  border-radius: 0;
  background: transparent;
}

.gov-shell .topbar-brand-icon .ui-icon,
.gov-shell .topbar-brand .ui-icon {
  width: 18px;
  height: 18px;
  color: #e8f5ff;
}

.gov-shell .topbar-brand-icon svg,
.gov-shell .topbar-brand .ui-icon svg {
  stroke-width: 2.1;
}

.gov-shell .topbar-right {
  gap: 14px;
}

.gov-shell .topbar-user {
  height: 32px;
  padding: 0;
  gap: 6px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 13px;
  font-weight: 700;
}

.gov-shell .topbar-user .link-icon {
  width: 15px;
  height: 15px;
  opacity: 1;
  color: #fff;
}

.gov-shell .gov-secret-meta .link-icon {
  width: 16px;
  height: 16px;
}

.gov-shell .topbar-action-btn.gov-home-btn {
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.gov-shell .topbar-action-btn.gov-home-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.45);
}

.gov-shell .topbar-action-btn.gov-home-btn .link-icon {
  width: 14px;
  height: 14px;
  color: #fff;
  opacity: 1;
}

.gov-shell .target-page,
.gov-shell .govstats-page,
.gov-shell .exit-page,
.gov-shell .decision-page,
.gov-shell .portrait-page {
  width: 100%;
}

.gov-shell .target-page .target-stat-card,
.gov-shell .target-page .target-panel,
.gov-shell .govstats-page .govstats-panel,
.gov-shell .exit-page .exit-panel,
.gov-shell .portrait-workspace,
.gov-shell .portrait-filter-bar {
  border-color: #dfeaf6;
  box-shadow: none;
}

.gov-shell .target-page .target-panel,
.gov-shell .govstats-page .govstats-panel,
.gov-shell .exit-page .exit-panel {
  border-radius: 12px;
}

.gov-shell .target-page .target-panel-head h3,
.gov-shell .govstats-page .govstats-panel-head h3 {
  color: #174a80;
}

@media (max-width: 980px) {
  .app-shell.gov-shell {
    grid-template-columns: 1fr;
  }

  .gov-shell .side {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    display: none;
    z-index: 1200;
  }

  .app-shell.gov-shell.side-open .side {
    display: block;
    box-shadow: 4px 0 18px rgba(15, 39, 66, 0.35);
  }

  .gov-shell .main {
    padding: 16px;
  }
}
/* End government workbench shell redesign */
/* Portrait dashboard page redesign */
.gov-shell .portrait-dashboard-page {
  display: grid;
  gap: 20px;
  min-height: auto;
  padding: 0;
  color: #0f2742;
}

.gov-shell .portrait-dashboard-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  flex-wrap: wrap;
}

.gov-shell .portrait-dashboard-filter .portrait-select,
.gov-shell .portrait-dashboard-filter .portrait-search-input {
  height: 34px;
  border: 1px solid #dbe8f6;
  border-radius: 5px;
  background: #fff;
  color: #0f2742;
  font-size: 13px;
  box-shadow: none;
}

.gov-shell .portrait-dashboard-filter .portrait-select {
  width: auto;
  min-width: 150px;
  max-width: 210px;
  padding: 0 10px;
}

.gov-shell .portrait-dashboard-filter .portrait-search-input {
  flex: 1 1 230px;
  min-width: 220px;
  padding: 0 12px;
}

.gov-shell .portrait-dashboard-filter .portrait-select:focus,
.gov-shell .portrait-dashboard-filter .portrait-search-input:focus {
  border-color: #8db2d8;
  outline: none;
  box-shadow: 0 0 0 2px rgba(51, 105, 159, 0.08);
}

.gov-shell .portrait-dashboard-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-width: 86px;
  padding: 0 16px;
  border-radius: 5px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}

.gov-shell .portrait-dashboard-btn.primary {
  background: #33699f;
  color: #fff;
}

.gov-shell .portrait-dashboard-btn.primary:hover {
  background: #28547f;
}

.gov-shell .portrait-dashboard-btn.reset {
  border-color: #dbe8f6;
  background: #fff;
  color: #33699f;
}

.gov-shell .portrait-dashboard-btn.reset:hover {
  background: #edf5fc;
}

.gov-shell .portrait-dashboard-btn.small {
  height: 32px;
  min-width: 68px;
  padding: 0 14px;
}

.gov-shell .portrait-chain-note-row .portrait-filter-group {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.gov-shell .portrait-chain-note-row .portrait-filter-label {
  display: none;
}

.gov-shell .portrait-active-filters {
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}

.gov-shell .portrait-active-chip {
  min-height: 28px;
  border-radius: 16px;
  border-color: #dbe8f6;
  background: #fff;
  color: #28547f;
}

.gov-shell .portrait-stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.gov-shell .portrait-stat-card,
.gov-shell .portrait-dashboard-panel {
  border: 1px solid #dfeaf6;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

.gov-shell .portrait-stat-card {
  min-height: 126px;
  padding: 20px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

.gov-shell .portrait-stat-card span {
  color: #0f2742;
  font-size: 14px;
  font-weight: 500;
}

.gov-shell .portrait-stat-card strong {
  margin-top: 10px;
  color: #204e82;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0;
}

.gov-shell .portrait-stat-card em {
  margin-top: 12px;
  color: #0f2742;
  font-size: 13px;
  font-style: normal;
}

.gov-shell .portrait-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
  gap: 20px;
}

.gov-shell .portrait-dashboard-panel {
  padding: 20px;
}

.gov-shell .portrait-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 16px;
}

.gov-shell .portrait-panel-head h3 {
  margin: 0;
  padding-left: 12px;
  border-left: 4px solid #33699f;
  color: #174a80;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
}

.gov-shell .portrait-table-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
  flex-wrap: wrap;
}

.gov-shell .portrait-chart-panel {
  min-height: 260px;
}

.gov-shell .portrait-chart-stage {
  height: 180px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0 0;
}

.gov-shell .portrait-chart-item {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  text-align: center;
}

.gov-shell .portrait-chart-bar {
  width: min(100%, 64px);
  min-height: 32px;
  border-radius: 6px 6px 4px 4px;
  background: #33699f;
}

.gov-shell .portrait-chart-item b {
  color: #204e82;
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
}

.gov-shell .portrait-chart-item span {
  max-width: 100%;
  color: #0f2742;
  font-size: 12px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gov-shell .portrait-advice-list {
  display: grid;
  gap: 12px;
}

.gov-shell .portrait-advice-list p {
  margin: 0;
  padding: 14px;
  border-radius: 10px;
  background: #f6f9fd;
  color: #204e82;
  font-size: 14px;
  line-height: 1.65;
}

.gov-shell .portrait-table-panel {
  padding: 20px;
}

.gov-shell .portrait-dashboard-table-card {
  min-height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.gov-shell .portrait-dashboard-page .portrait-entlist-body {
  overflow-x: auto;
}

.gov-shell .portrait-dashboard-page .portrait-enttable {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
}

.gov-shell .portrait-dashboard-page .portrait-enttable thead th {
  padding: 14px 16px;
  border-bottom: 1px solid #dfeaf6;
  background: #f6f9fd;
  color: #174a80;
  font-size: 14px;
  font-weight: 700;
}

.gov-shell .portrait-dashboard-page .portrait-ent-row td,
.gov-shell .portrait-dashboard-page .portrait-enttable tbody tr:nth-child(odd) td,
.gov-shell .portrait-dashboard-page .portrait-enttable tbody tr:nth-child(even) td,
.gov-shell .portrait-dashboard-page .portrait-ent-row.is-alt td {
  padding: 18px 16px;
  border-bottom: 1px solid #dfeaf6;
  background: #fff;
}

.gov-shell .portrait-dashboard-page .portrait-ent-row:hover td {
  background: #f9fbff;
}

.gov-shell .portrait-dashboard-page .portrait-ent-rank {
  width: 64px;
  color: #0f2742;
  font-size: 14px;
  text-align: left;
}

.gov-shell .portrait-dashboard-page .portrait-ent-link {
  color: #0f2742;
  font-size: 15px;
  font-weight: 700;
}

.gov-shell .portrait-dashboard-page .portrait-ent-industry,
.gov-shell .portrait-dashboard-page .portrait-ent-kpi {
  color: #0f2742;
  font-size: 14px;
}

.gov-shell .portrait-dashboard-page .portrait-ent-kpi {
  text-align: left;
  font-weight: 600;
}

.gov-shell .portrait-dashboard-page .portrait-ent-chain-meta {
  color: #64748b;
}

.gov-shell .portrait-dashboard-page .portrait-pagination,
.gov-shell .portrait-dashboard-page .portrait-entlist-foot {
  padding: 14px 0 0;
  border-top: 0;
  background: transparent;
}

.gov-shell .portrait-dashboard-page .portrait-page-link {
  border-color: #dbe8f6;
  background: #fff;
  color: #33699f;
}

.gov-shell .portrait-dashboard-page .portrait-page-link.active {
  border-color: #33699f;
  background: #33699f;
  color: #fff;
}

.gov-shell .portrait-dashboard-page .portrait-endcap,
.gov-shell .portrait-dashboard-page .portrait-hero,
.gov-shell .portrait-dashboard-page .portrait-entlist-head,
.gov-shell .portrait-dashboard-page .portrait-select-all,
.gov-shell .portrait-dashboard-page .portrait-manage-btn {
  display: none;
}

@media (max-width: 1180px) {
  .gov-shell .portrait-dashboard-grid,
  .gov-shell .portrait-stat-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .gov-shell .portrait-dashboard-filter .portrait-select,
  .gov-shell .portrait-dashboard-filter .portrait-search-input,
  .gov-shell .portrait-dashboard-btn {
    width: 100%;
    max-width: none;
  }

  .gov-shell .portrait-table-tools,
  .gov-shell .portrait-panel-head,
  .gov-shell .portrait-entlist-foot,
  .gov-shell .portrait-pagination {
    align-items: flex-start;
    flex-direction: column;
  }
}
/* End portrait dashboard page redesign */
/* Portrait dashboard exact module alignment */
.gov-shell .portrait-dashboard-page {
  gap: 20px;
}

.gov-shell .portrait-dashboard-filter {
  min-height: 34px;
  justify-content: flex-start;
}

.gov-shell .portrait-dashboard-filter .portrait-primary-select {
  width: 154px;
  min-width: 154px;
}

.gov-shell .portrait-dashboard-filter .portrait-search-input {
  flex: 0 1 260px;
  width: 260px;
  min-width: 220px;
}

.gov-shell .portrait-stat-card {
  min-height: 128px;
  padding: 20px 18px 18px;
}

.gov-shell .portrait-stat-card strong small {
  margin-left: 3px;
  color: inherit;
  font-size: 18px;
  font-weight: 700;
}

.gov-shell .portrait-stat-card em {
  margin-top: 10px;
}

.gov-shell .portrait-chart-panel,
.gov-shell .portrait-advice-panel {
  min-height: 260px;
}

.gov-shell .portrait-chart-stage {
  height: 178px;
  padding: 18px 0 2px;
  gap: 14px;
}

.gov-shell .portrait-chart-bar {
  width: min(100%, 116px);
  background: #33699f;
  border-radius: 6px;
}

.gov-shell .portrait-chart-item b {
  margin-top: 4px;
  color: #204e82;
  font-size: 15px;
}

.gov-shell .portrait-chart-item span {
  color: #0f2742;
  font-size: 13px;
}

.gov-shell .portrait-advice-list {
  padding-top: 3px;
}

.gov-shell .portrait-advice-list p {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: 10px;
}

.gov-shell .portrait-compare-panel {
  padding: 20px 20px 18px;
}

.gov-shell .portrait-view-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.gov-shell .portrait-view-tab {
  height: 32px;
  min-width: 86px;
  padding: 0 16px;
  border: 0;
  border-radius: 18px;
  background: #eaf4ff;
  color: #33699f;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: default;
}

.gov-shell .portrait-view-tab.active {
  background: #33699f;
  color: #fff;
}

.gov-shell .portrait-region-table {
  min-width: 760px;
}

.gov-shell .portrait-region-table thead th {
  height: 48px;
  padding: 0 16px;
  text-align: left;
}

.gov-shell .portrait-region-table tbody td {
  height: 76px;
  padding: 14px 16px;
  color: #0f2742;
  font-size: 15px;
  vertical-align: middle;
}

.gov-shell .portrait-region-table tbody tr:nth-child(even) td {
  background: #f8fbff;
}

.gov-shell .portrait-region-table tbody tr:hover td {
  background: #f3f8fe;
}

.gov-shell .portrait-region-name {
  display: block;
  margin-bottom: 6px;
  color: #0f2742;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
}

.gov-shell .portrait-region-sub {
  display: block;
  color: #66798f;
  font-size: 12px;
  line-height: 1.2;
}

.gov-shell .portrait-region-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 24px;
  padding: 0 10px;
  border-radius: 14px;
  background: #eef4fb;
  color: #5f7893;
  font-size: 12px;
  line-height: 1;
}

.gov-shell .portrait-region-status.ok {
  background: #e8f6ef;
  color: #237a4e;
}

.gov-shell .portrait-region-status.warn {
  background: #fff4e5;
  color: #ad6b00;
}

.gov-shell .portrait-region-status.locked {
  background: #eef4fb;
  color: #5f7893;
}

@media (max-width: 720px) {
  .gov-shell .portrait-view-tabs {
    width: 100%;
  }

  .gov-shell .portrait-view-tab {
    flex: 1 1 0;
  }
}
/* End portrait dashboard exact module alignment */
/* Portrait detail v2 redesign */
.gov-shell .portrait-detail-v2 {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 0 0 18px;
  color: #122844;
}

.gov-shell .portrait-chain-status {
  min-height: min(620px, calc(100vh - 150px));
  place-items: center;
  padding: 24px;
}

.gov-shell .portrait-chain-status-card {
  display: grid;
  gap: 24px;
  width: min(680px, 100%);
  padding: 36px;
  text-align: center;
}

.gov-shell .portrait-chain-status-main {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.gov-shell .portrait-chain-status-kicker {
  color: #2f6cae;
  font-size: 13px;
  font-weight: 800;
}

.gov-shell .portrait-chain-status-main h1,
.gov-shell .portrait-chain-status-main h2,
.gov-shell .portrait-chain-status-main p {
  margin: 0;
}

.gov-shell .portrait-chain-status-main h1 {
  color: #122844;
  font-size: 24px;
  line-height: 1.35;
}

.gov-shell .portrait-chain-status-main h2 {
  color: #35526e;
  font-size: 17px;
}

.gov-shell .portrait-chain-status-main p {
  color: #6f8295;
  font-size: 14px;
  line-height: 1.7;
}

.gov-shell .portrait-chain-status-path {
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 6px;
  background: #f2f7fc;
  overflow-wrap: anywhere;
}

.gov-shell .portrait-chain-status-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gov-shell .portrait-chain-status-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #dceaf7;
  border-top-color: #2f6cae;
  border-radius: 50%;
  animation: portrait-chain-status-spin 750ms linear infinite;
}

@keyframes portrait-chain-status-spin {
  to {
    transform: rotate(360deg);
  }
}

.gov-shell .portrait-detail-v2-card {
  background: #fff;
  border: 1px solid #dceaf7;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(30, 70, 112, 0.08);
  overflow: hidden;
}

.gov-shell .portrait-detail-v2-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 18px;
  border-left: 4px solid #3aa9ff;
}

.gov-shell .portrait-detail-v2-main h1 {
  margin: 0 0 8px;
  color: #102b4d;
  font-size: 25px;
  line-height: 1.2;
  font-weight: 800;
}

.gov-shell .portrait-detail-v2-meta,
.gov-shell .portrait-detail-v2-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: #6e8297;
  font-size: 13px;
  line-height: 1.5;
}

.gov-shell .portrait-detail-v2-info {
  margin-top: 12px;
  color: #273c55;
}

.gov-shell .portrait-detail-v2-info span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.gov-shell .portrait-detail-v2-info-icon,
.gov-shell .portrait-detail-v2-info-icon .ui-icon {
  width: 15px;
  height: 15px;
  color: #7e98b6;
}

.gov-shell .portrait-ai-intro-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  margin-top: 14px;
  padding: 0 18px;
  border: 1px solid #2f8ee8;
  border-radius: 7px;
  background: #eff7ff;
  color: #1d6fc3;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.gov-shell .portrait-ai-intro-btn:hover {
  background: #e4f1ff;
}

.gov-shell .portrait-ai-intro-btn-icon,
.gov-shell .portrait-ai-intro-btn-icon .ui-icon {
  width: 16px;
  height: 16px;
}

.gov-shell .portrait-detail-v2-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
  min-width: 320px;
}

.gov-shell .portrait-detail-v2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 16px;
  border: 1px solid #d8e5f2;
  border-radius: 7px;
  background: #fff;
  color: #213750;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 3px 8px rgba(23, 54, 86, 0.05);
  cursor: pointer;
}

.gov-shell .portrait-detail-v2-btn.primary {
  border-color: #1f71bd;
  background: #1f71bd;
  color: #fff;
}

.gov-shell .portrait-detail-v2-score {
  padding: 22px 24px 24px;
}

.gov-shell .portrait-detail-v2-section-title {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 12px;
}

.gov-shell .portrait-detail-v2-section-title h2,
.gov-shell .portrait-detail-v2-panel-head h2 {
  margin: 0;
  color: #102b4d;
  font-size: 18px;
  font-weight: 800;
}

.gov-shell .portrait-detail-v2-section-title strong {
  color: #3d9bea;
  font-size: 46px;
  line-height: 1;
  font-weight: 800;
}

.gov-shell .portrait-detail-v2-section-title span {
  color: #8b9aaa;
  font-size: 15px;
  font-weight: 700;
}

.gov-shell .portrait-detail-v2 .pid-score-layout {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(420px, 1fr);
  gap: 32px;
  align-items: center;
}

.gov-shell .portrait-detail-v2 .pid-radar-wrap {
  flex: none;
  display: flex;
  justify-content: center;
}

.gov-shell .portrait-detail-v2 .pid-radar-wrap .portrait-radar {
  width: 330px;
  height: 330px;
}

.gov-shell .portrait-detail-v2 .pid-bars-wrap {
  gap: 13px;
}

.gov-shell .portrait-detail-v2 .pid-score-row {
  gap: 12px;
  font-size: 14px;
}

.gov-shell .portrait-detail-v2 .pid-score-label {
  width: 96px;
  color: #50667e;
  font-weight: 700;
}

.gov-shell .portrait-detail-v2 .pid-score-track {
  height: 12px;
  background: #e9eef5;
  border-radius: 999px;
}

.gov-shell .portrait-detail-v2 .pid-score-fill,
.gov-shell .portrait-detail-v2 .pid-score-fill.high,
.gov-shell .portrait-detail-v2 .pid-score-fill.mid,
.gov-shell .portrait-detail-v2 .pid-score-fill.low {
  background: linear-gradient(90deg, #ffb31b 0%, #fb7f20 100%);
  box-shadow: none;
}

.gov-shell .portrait-detail-v2 .pid-score-num {
  width: 36px;
  color: #142c4c;
  font-size: 14px;
  font-weight: 800;
}

.gov-shell .portrait-detail-v2-indicators {
  padding: 22px 24px 24px;
  background: #eefbff;
}

.gov-shell .portrait-detail-v2-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.gov-shell .portrait-detail-v2-panel-head span {
  color: #7e8ea0;
  font-size: 13px;
}

.gov-shell .portrait-detail-v2 .pid-dim-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 20px;
}

.gov-shell .portrait-detail-v2 .pid-dim-card,
.gov-shell .portrait-detail-v2 .pid-dim-card-scale {
  min-height: 236px;
  border: 1px solid #dfe8f2;
  border-left: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 9px 22px rgba(40, 84, 127, 0.08);
  transform: none;
}

.gov-shell .portrait-detail-v2 .pid-dim-card:hover,
.gov-shell .portrait-detail-v2 .pid-dim-card-scale:hover {
  transform: none;
  box-shadow: 0 12px 26px rgba(40, 84, 127, 0.11);
}

.gov-shell .portrait-detail-v2 .pid-card-head,
.gov-shell .portrait-detail-v2 .pid-card-head-scale {
  margin-bottom: 8px;
}

.gov-shell .portrait-detail-v2 .pid-card-title,
.gov-shell .portrait-detail-v2 .pid-card-title-scale {
  color: #102b4d;
  font-size: 20px;
  font-weight: 800;
}

.gov-shell .portrait-detail-v2 .pid-card-head-bar {
  width: 6px;
  height: 24px;
  background: linear-gradient(180deg, #ff6f65, #ff4d43);
}

.gov-shell .portrait-detail-v2 .pid-card-body-scale,
.gov-shell .portrait-detail-v2 .pid-card-body {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  min-height: 134px;
  align-items: center;
}

.gov-shell .portrait-detail-v2 .pid-card-illust,
.gov-shell .portrait-detail-v2 .pid-card-illust-scale {
  justify-content: center;
  align-items: center;
}

.gov-shell .portrait-detail-v2 .pid-card-illust svg,
.gov-shell .portrait-detail-v2 .pid-card-illust img,
.gov-shell .portrait-detail-v2 .pid-card-illust-img-scale {
  width: 132px;
  max-height: 132px;
  object-fit: contain;
}

.gov-shell .portrait-detail-v2 .pid-card-score-num,
.gov-shell .portrait-detail-v2 .pid-card-score-num-scale {
  color: #071a35 !important;
  font-size: 52px;
  line-height: 1;
  font-weight: 800;
}

.gov-shell .portrait-detail-v2 .pid-card-score-unit,
.gov-shell .portrait-detail-v2 .pid-card-score-unit-scale {
  color: #7d8fa3;
  font-size: 12px;
}

.gov-shell .portrait-detail-v2 .pid-card-sub-list,
.gov-shell .portrait-detail-v2 .pid-card-sub-list-scale {
  gap: 7px;
}

.gov-shell .portrait-detail-v2 .pid-card-sub-item,
.gov-shell .portrait-detail-v2 .pid-card-sub-item-scale {
  color: #4d6279;
  font-size: 13px;
}

.gov-shell .portrait-detail-v2 .pid-card-detail-btn,
.gov-shell .portrait-detail-v2 .pid-card-detail-btn-scale {
  border-radius: 999px;
  background: linear-gradient(135deg, #ffb742 0%, #ff733a 100%);
  box-shadow: 0 9px 18px rgba(255, 120, 58, 0.22);
}

.gov-shell .portrait-detail-v2-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.gov-shell .portrait-detail-v2-bottom .portrait-detail-v2-card {
  min-height: 176px;
  padding: 20px 22px;
}

.gov-shell .portrait-detail-v2-list .portrait-event {
  min-height: 44px;
}

.gov-shell .portrait-detail-v2-risk .portrait-risk-item {
  margin-bottom: 12px;
  padding: 13px 16px;
  border: 0;
  border-left: 3px solid #ff9400;
  border-radius: 6px;
  background: #fff3dd;
  color: #df6b00;
  font-weight: 700;
}

.portrait-ai-intro-modal {
  display: grid;
  gap: 18px;
  color: #19324e;
}

.portrait-ai-intro-section {
  padding-bottom: 14px;
  border-bottom: 1px solid #e4edf6;
}

.portrait-ai-intro-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.portrait-ai-intro-section h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: #143456;
  font-size: 15px;
}

.portrait-ai-intro-icon,
.portrait-ai-intro-icon .ui-icon {
  width: 17px;
  height: 17px;
  color: #2d93ee;
}

.portrait-ai-intro-section p {
  margin: 0;
  color: #27425f;
  font-size: 14px;
  line-height: 1.85;
}

.portrait-ai-intro-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.portrait-ai-intro-tag {
  padding: 6px 12px;
  border: 1px solid #cfe4fb;
  border-radius: 16px;
  background: #f2f8ff;
  color: #1d6fc3;
  font-size: 12px;
  font-weight: 700;
}

.portrait-ai-intro-highlight {
  margin-top: 14px;
  padding: 14px 16px;
  border-left: 4px solid #399aec;
  border-radius: 8px;
  background: #eaf5ff;
  color: #173a5f;
  line-height: 1.7;
}

.portrait-ai-intro-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.portrait-ai-intro-kpis span {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 14px 10px;
  border: 1px solid #dce7f3;
  border-radius: 8px;
  background: #f8fbff;
  color: #536a82;
  font-size: 12px;
}

.portrait-ai-intro-kpis b {
  color: #3d9bea;
  font-size: 24px;
}

.gov-shell .portrait-ai-fab {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 60;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #4c9cff 0%, #8956d7 100%);
  color: #fff;
  box-shadow: 0 16px 28px rgba(86, 84, 204, 0.3);
  cursor: pointer;
}

.gov-shell .portrait-ai-fab-icon,
.gov-shell .portrait-ai-fab-icon .ui-icon {
  width: 24px;
  height: 24px;
}

.gov-shell .portrait-ai-chat {
  position: fixed;
  right: 26px;
  bottom: 92px;
  z-index: 61;
  width: min(380px, calc(100vw - 44px));
  height: 432px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(20, 42, 78, 0.22);
}

.gov-shell .portrait-ai-chat.is-open {
  display: flex;
}

.gov-shell .portrait-ai-chat-head {
  height: 70px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: linear-gradient(135deg, #4d8cff 0%, #8352c8 100%);
  color: #fff;
}

.gov-shell .portrait-ai-chat-head > span {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gov-shell .portrait-ai-chat-icon,
.gov-shell .portrait-ai-chat-icon .ui-icon {
  width: 24px;
  height: 24px;
}

.gov-shell .portrait-ai-chat-head b {
  display: block;
  font-size: 17px;
}

.gov-shell .portrait-ai-chat-head em {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-style: normal;
  opacity: 0.86;
}

.gov-shell .portrait-ai-chat-head button {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.gov-shell .portrait-ai-chat-body {
  flex: 1;
  overflow: auto;
  padding: 16px;
  background: #fff;
}

.gov-shell .portrait-ai-message {
  margin-bottom: 12px;
}

.gov-shell .portrait-ai-message.assistant {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 9px;
}

.gov-shell .portrait-ai-message.assistant > span {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #6f60d8;
  color: #fff;
  font-weight: 800;
}

.gov-shell .portrait-ai-message p {
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f0f1f4;
  color: #1d2f45;
  font-size: 13px;
  line-height: 1.65;
}

.gov-shell .portrait-ai-message.user {
  display: flex;
  justify-content: flex-end;
}

.gov-shell .portrait-ai-message.user p {
  max-width: 82%;
  background: #e8f1ff;
  color: #1559a9;
}

.gov-shell .portrait-ai-quick {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.gov-shell .portrait-ai-quick button {
  height: 28px;
  padding: 0 12px;
  border: 1px solid #d4ddff;
  border-radius: 14px;
  background: #f6f8ff;
  color: #4c5ed0;
  font-size: 12px;
  cursor: pointer;
}

.gov-shell .portrait-ai-chat-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid #edf1f7;
}

.gov-shell .portrait-ai-chat-foot input {
  flex: 1;
  height: 38px;
  min-width: 0;
  border: 1px solid #6a69ff;
  border-radius: 20px;
  padding: 0 14px;
  color: #1d2f45;
  outline: none;
}

.gov-shell .portrait-ai-chat-foot button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #7061dc;
  color: #fff;
  cursor: pointer;
}

.gov-shell .portrait-ai-send-icon,
.gov-shell .portrait-ai-send-icon .ui-icon {
  width: 18px;
  height: 18px;
}

@media (max-width: 1180px) {
  .gov-shell .portrait-detail-v2 .pid-score-layout,
  .gov-shell .portrait-detail-v2-bottom {
    grid-template-columns: 1fr;
  }

  .gov-shell .portrait-detail-v2 .pid-dim-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .gov-shell .portrait-detail-v2-head,
  .gov-shell .portrait-detail-v2-actions {
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
  }

  .gov-shell .portrait-detail-v2 .pid-dim-grid {
    grid-template-columns: 1fr;
  }

  .portrait-ai-intro-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* End portrait detail v2 redesign */

/* Portrait detail qyhx reference polish */
.gov-shell .portrait-detail-v2 {
  gap: 16px;
  padding: 0 0 18px;
  color: #1a365d;
}

.gov-shell .portrait-detail-v2-company-score {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
  border: 1px solid #dfeaf5;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.gov-shell .portrait-detail-v2-company-score .portrait-detail-v2-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.gov-shell .portrait-detail-v2-head {
  padding: 18px 24px;
  border-left: 0;
  border-bottom: 1px solid #f0f2f5;
}

.gov-shell .portrait-detail-v2-titleline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}

.gov-shell .portrait-detail-v2-titleline h1 {
  margin: 0;
  color: #1a365d;
  font-size: 26px;
  line-height: 1.22;
  font-weight: 800;
}

.gov-shell .portrait-detail-v2-titleline span {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  background: #fff3e0;
  color: #f57c00;
  font-size: 11px;
  font-weight: 700;
}

.gov-shell .portrait-detail-v2-meta {
  gap: 8px 12px;
  color: #8a98a8;
  font-size: 12px;
}

.gov-shell .portrait-detail-v2-meta span:not(:last-child)::after {
  content: "?";
  margin-left: 12px;
  color: #c5ced8;
}

.gov-shell .portrait-detail-v2-info {
  gap: 10px 24px;
  margin-top: 12px;
  color: #4a5568;
  font-size: 14px;
}

.gov-shell .portrait-detail-v2-info span {
  gap: 6px;
}

.gov-shell .portrait-detail-v2-info b {
  color: #2d3748;
  font-weight: 700;
}

.gov-shell .portrait-ai-intro-btn {
  height: 38px;
  margin-top: 12px;
  padding: 0 18px;
  border: 1px solid #4299e1;
  border-radius: 8px;
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
  color: #2b6cb0;
  font-size: 13px;
  box-shadow: none;
}

.gov-shell .portrait-ai-intro-btn:hover {
  background: linear-gradient(135deg, #e0efff 0%, #d4ecfc 100%);
  box-shadow: 0 4px 12px rgba(66, 153, 225, 0.2);
  transform: translateY(-1px);
}

.gov-shell .portrait-detail-v2-actions {
  min-width: 330px;
  gap: 8px;
}

.gov-shell .portrait-detail-v2-btn {
  height: 34px;
  padding: 0 14px;
  border-color: #e0e6ee;
  border-radius: 6px;
  color: #4a5568;
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
}

.gov-shell .portrait-detail-v2-btn:hover {
  border-color: #4299e1;
  color: #2b6cb0;
  box-shadow: 0 2px 8px rgba(66, 153, 225, 0.15);
}

.gov-shell .portrait-detail-v2-btn.primary {
  border-color: #ff9800;
  background: #ff9800;
  color: #fff;
}

.gov-shell .portrait-detail-v2-btn.primary:hover {
  border-color: #f57c00;
  background: #f57c00;
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.gov-shell .portrait-detail-v2-score {
  padding: 20px 24px 24px;
  background: #f8fbff;
}

.gov-shell .portrait-detail-v2-score-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 4px;
}

.gov-shell .portrait-detail-v2-section-title {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: baseline;
  gap: 4px;
  margin: 0;
}

.gov-shell .portrait-detail-v2-section-title h2 {
  grid-column: 1 / -1;
  color: #28384f;
  font-size: 16px;
  font-weight: 800;
}

.gov-shell .portrait-detail-v2-section-title strong {
  color: #4299e1;
  font-size: 42px;
  font-weight: 800;
}

.gov-shell .portrait-detail-v2-section-title span {
  color: #9aa8b8;
  font-size: 14px;
  font-weight: 600;
}

.gov-shell .portrait-detail-v2-score-tabs {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 620px;
  padding-top: 18px;
}

.gov-shell .portrait-detail-v2-score-tabs span {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 12px;
  background: #f0f4f8;
  color: #8794a3;
  font-size: 12px;
  white-space: nowrap;
}

.gov-shell .portrait-detail-v2 .pid-score-layout {
  grid-template-columns: 280px minmax(520px, 1fr);
  gap: 36px;
  align-items: center;
}

.gov-shell .portrait-detail-v2 .pid-radar-wrap {
  justify-content: flex-start;
}

.gov-shell .portrait-detail-v2 .pid-radar-wrap .portrait-radar {
  width: 280px;
  height: 280px;
}

.gov-shell .portrait-detail-v2 .pid-bars-wrap {
  width: min(92%, 980px);
  justify-self: end;
  gap: 10px;
  padding-top: 8px;
}

.gov-shell .portrait-detail-v2 .pid-score-row {
  gap: 12px;
  padding-top: 5px;
  font-size: 13px;
}

.gov-shell .portrait-detail-v2 .pid-score-label {
  width: 90px;
  text-align: right;
  color: #5f6e7d;
  font-size: 13px;
  font-weight: 600;
}

.gov-shell .portrait-detail-v2 .pid-score-track {
  height: 16px;
  border-radius: 8px;
  background: #edf2f7;
}

.gov-shell .portrait-detail-v2 .pid-score-fill,
.gov-shell .portrait-detail-v2 .pid-score-fill.high,
.gov-shell .portrait-detail-v2 .pid-score-fill.mid,
.gov-shell .portrait-detail-v2 .pid-score-fill.low {
  border-radius: 8px;
  background: linear-gradient(90deg, #ff9800 0%, #ffb74d 100%);
}

.gov-shell .portrait-detail-v2 .pid-score-num {
  width: 36px;
  color: #28384f;
  font-size: 13px;
  font-weight: 800;
}

.gov-shell .portrait-detail-v2-indicators {
  margin-top: 0;
  padding: 24px;
  border: 0;
  border-radius: 12px;
  background: #eef9fe;
  box-shadow: none;
}

.gov-shell .portrait-detail-v2-panel-head {
  margin-bottom: 20px;
}

.gov-shell .portrait-detail-v2-panel-head h2 {
  color: #1d2129;
  font-size: 18px;
  font-weight: 800;
}

.gov-shell .portrait-detail-v2-panel-head span {
  color: #86909c;
  font-size: 13px;
}

.gov-shell .portrait-detail-v2 .pid-dim-grid {
  gap: 20px;
}

.gov-shell .portrait-detail-v2 .pid-dim-card,
.gov-shell .portrait-detail-v2 .pid-dim-card-scale {
  height: 280px;
  min-height: 280px;
  padding: 16px;
  border: 1px solid #e8f4ff;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.gov-shell .portrait-detail-v2 .pid-dim-card:hover,
.gov-shell .portrait-detail-v2 .pid-dim-card-scale:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.gov-shell .portrait-detail-v2 .pid-card-head,
.gov-shell .portrait-detail-v2 .pid-card-head-scale {
  gap: 10px;
  margin-bottom: 14px;
}

.gov-shell .portrait-detail-v2 .pid-card-head-bar {
  width: 4px;
  height: 22px;
  border-radius: 2px;
  background: #ff4d4f;
  box-shadow: none;
}

.gov-shell .portrait-detail-v2 .pid-card-title,
.gov-shell .portrait-detail-v2 .pid-card-title-scale {
  color: #1d2129;
  font-size: 19px;
  font-weight: 800;
}

.gov-shell .portrait-detail-v2 .pid-card-body,
.gov-shell .portrait-detail-v2 .pid-card-body-scale {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  min-height: 170px;
  align-items: center;
}

.gov-shell .portrait-detail-v2 .pid-card-illust,
.gov-shell .portrait-detail-v2 .pid-card-illust-scale {
  width: 132px;
  min-width: 132px;
  height: 160px;
  align-items: center;
  justify-content: center;
}

.gov-shell .portrait-detail-v2 .pid-card-illust svg,
.gov-shell .portrait-detail-v2 .pid-card-illust img,
.gov-shell .portrait-detail-v2 .pid-card-illust-img-scale {
  width: 120px;
  max-height: 150px;
  object-fit: contain;
}

.gov-shell .portrait-detail-v2 .pid-card-score-area,
.gov-shell .portrait-detail-v2 .pid-card-score-area-scale {
  min-width: 0;
  padding-left: 8px;
}

.gov-shell .portrait-detail-v2 .pid-card-score,
.gov-shell .portrait-detail-v2 .pid-card-score-scale {
  gap: 6px;
  margin-bottom: 8px;
}

.gov-shell .portrait-detail-v2 .pid-card-score-num,
.gov-shell .portrait-detail-v2 .pid-card-score-num-scale {
  color: #1d2129 !important;
  font-size: 42px;
  line-height: 1;
  font-weight: 800;
}

.gov-shell .portrait-detail-v2 .pid-card-score-unit,
.gov-shell .portrait-detail-v2 .pid-card-score-unit-scale {
  color: #86909c;
  font-size: 13px;
  font-weight: 600;
}

.gov-shell .portrait-detail-v2 .pid-card-sub-list,
.gov-shell .portrait-detail-v2 .pid-card-sub-list-scale {
  gap: 6px;
}

.gov-shell .portrait-detail-v2 .pid-card-sub-item,
.gov-shell .portrait-detail-v2 .pid-card-sub-item-scale {
  color: #666;
  font-size: 14px;
  font-weight: 500;
}

.gov-shell .portrait-detail-v2 .pid-card-action-scale,
.gov-shell .portrait-detail-v2 .pid-card-foot {
  align-self: end;
  justify-self: end;
  margin-top: 0;
  padding-top: 0;
}

.gov-shell .portrait-detail-v2 .pid-card-detail-btn,
.gov-shell .portrait-detail-v2 .pid-card-detail-btn-scale {
  padding: 7px 18px;
  border-radius: 20px;
  background: #ff7a45;
  box-shadow: none;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.gov-shell .portrait-detail-v2-bottom {
  gap: 20px;
}

.gov-shell .portrait-detail-v2-bottom .portrait-detail-v2-card {
  min-height: 210px;
  padding: 20px 24px;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.gov-shell .portrait-detail-v2-list .portrait-event {
  min-height: 50px;
  border-bottom: 1px solid #edf2f7;
}

.gov-shell .portrait-detail-v2-risk .portrait-risk-item {
  padding: 12px 15px;
  border-left: 3px solid #ff9800;
  border-radius: 0 6px 6px 0;
  background: #fff3e0;
  color: #e65100;
  font-size: 14px;
}

.modal.portrait-intro-shell {
  width: min(720px, 92vw);
  max-height: min(86vh, 760px);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.22);
}

.modal.portrait-intro-shell .hd {
  padding: 24px 30px 14px;
  border-bottom: 0;
}

.modal.portrait-intro-shell .hd h3 {
  color: #1a365d;
  font-size: 22px;
  font-weight: 800;
}

.modal.portrait-intro-shell .hd h3::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 14px;
  background: #4299e1;
}

.modal.portrait-intro-shell .hd .btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f5f7fa;
  color: #6b7280;
  font-size: 0;
}

.modal.portrait-intro-shell .hd .btn::before {
  content: "\00d7";
  font-size: 24px;
  line-height: 1;
}

.modal.portrait-intro-shell .bd {
  padding: 0 30px 28px;
}

.portrait-ai-intro-modal {
  gap: 22px;
  color: #1a365d;
}

.portrait-ai-intro-section {
  padding-bottom: 18px;
  border-bottom: 1px solid #edf2f7;
}

.portrait-ai-intro-section h4 {
  margin-bottom: 12px;
  color: #1a365d;
  font-size: 15px;
  font-weight: 800;
}

.portrait-ai-intro-section p {
  color: #4a5568;
  font-size: 14px;
  line-height: 1.9;
}

.portrait-ai-intro-tag {
  padding: 4px 12px;
  border-radius: 20px;
  background: #f0f7ff;
  color: #2b6cb0;
  font-size: 12px;
  font-weight: 600;
}

.portrait-ai-intro-highlight {
  padding: 16px 20px;
  border-left: 4px solid #4299e1;
  border-radius: 10px;
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
  color: #2d3748;
}

.portrait-ai-intro-kpis {
  gap: 16px;
}

.portrait-ai-intro-kpis span {
  padding: 16px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.portrait-ai-intro-kpis b {
  color: #4299e1;
  font-size: 24px;
}

.gov-shell .portrait-ai-fab {
  right: 30px;
  bottom: 30px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.gov-shell .portrait-ai-fab:hover {
  transform: scale(1.08) rotate(4deg);
  box-shadow: 0 6px 30px rgba(102, 126, 234, 0.5);
}

.gov-shell .portrait-ai-chat {
  right: 30px;
  bottom: 100px;
  width: min(380px, calc(100vw - 48px));
  height: min(520px, calc(100vh - 140px));
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.gov-shell .portrait-ai-chat-head {
  height: auto;
  min-height: 72px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gov-shell .portrait-ai-chat-head b {
  font-size: 16px;
}

.gov-shell .portrait-ai-chat-head em {
  font-size: 11px;
}

.gov-shell .portrait-ai-message p {
  border-radius: 8px;
  background: #f4f6f9;
  color: #2d3748;
}

.gov-shell .portrait-ai-quick button {
  border-color: #dbeafe;
  background: #f0f7ff;
  color: #2b6cb0;
}

.gov-shell .portrait-ai-chat-foot {
  padding: 14px 16px;
}

.gov-shell .portrait-ai-chat-foot input {
  height: 40px;
  border-color: #d8dff0;
}

.gov-shell .portrait-ai-chat-foot input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

.gov-shell .portrait-ai-chat-foot button {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

@media (max-width: 1180px) {
  .gov-shell .portrait-detail-v2 .pid-score-layout {
    grid-template-columns: 1fr;
  }

  .gov-shell .portrait-detail-v2 .pid-bars-wrap {
    width: 100%;
    justify-self: stretch;
  }
}

@media (max-width: 760px) {
  .gov-shell .portrait-detail-v2-score-head {
    flex-direction: column;
  }

  .gov-shell .portrait-detail-v2-score-tabs {
    justify-content: flex-start;
    padding-top: 0;
  }
}
/* End portrait detail qyhx reference polish */

/* Portrait jzhx reference list polish */
.gov-shell .main:has(.portrait-jz-page) {
  padding: 0;
  background: #eef1f5;
  overflow: hidden;
}

.gov-shell .portrait-jz-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 12px 12px;
  background: #eef1f5;
  color: #333;
  font-size: 13px;
}

.gov-shell .portrait-jz-topbar {
  height: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 4px 0 8px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.gov-shell .portrait-jz-breadcrumb {
  color: #8d98a7;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gov-shell .portrait-jz-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.gov-shell .portrait-jz-top-search {
  height: 32px;
  display: flex;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
  background: #fff;
}

.gov-shell .portrait-jz-top-search .portrait-search-input {
  width: 202px;
  height: 100%;
  border: 0;
  padding: 0 10px;
  color: #666;
  font-size: 12px;
  outline: none;
}

.gov-shell .portrait-jz-top-search .portrait-search-input::placeholder {
  color: #b7bec8;
}

.gov-shell .portrait-jz-top-search button {
  height: 100%;
  min-width: 63px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-left: 1px solid #e0e0e0;
  background: #fff;
  color: #4f5f70;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}

.gov-shell .portrait-jz-search-icon,
.gov-shell .portrait-jz-search-icon .ui-icon {
  width: 14px;
  height: 14px;
}

.gov-shell .portrait-jz-role-btn {
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 12px;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  background: #fff;
  color: #555;
  font-size: 12px;
  text-decoration: none;
}

.gov-shell .portrait-jz-role-icon,
.gov-shell .portrait-jz-role-icon .ui-icon {
  width: 15px;
  height: 15px;
}

.gov-shell .portrait-jz-panel {
  overflow: hidden;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.gov-shell .portrait-jz-search-section {
  padding: 0 18px 14px;
  border-bottom: 1px solid #eee;
  background: #fff;
}

.gov-shell .portrait-jz-main-search {
  display: flex;
  align-items: stretch;
  width: 420px;
  max-width: min(420px, 100%);
  height: 34px;
}

.gov-shell .portrait-jz-main-search .portrait-search-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #ddd;
  border-right: 0;
  border-radius: 3px 0 0 3px;
  background: #fff;
  color: #666;
  font-size: 12px;
  outline: none;
}

.gov-shell .portrait-jz-main-search .portrait-search-input::placeholder {
  color: #b8c0ca;
}

.gov-shell .portrait-jz-main-search .portrait-search-btn {
  width: 44px;
  height: 34px;
  border: 0;
  border-radius: 0 3px 3px 0;
  background: #e8913a;
  color: #fff;
  cursor: pointer;
}

.gov-shell .portrait-jz-main-search .portrait-search-btn:hover {
  background: #d4802f;
  filter: none;
}

.gov-shell .portrait-jz-filter {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 10px 18px 12px;
  border: 0;
  border-bottom: 1px solid #eee;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.gov-shell .portrait-jz-filter-left {
  width: 58px;
  flex: 0 0 58px;
  padding-top: 28px;
}

.gov-shell .portrait-jz-filter-left b {
  display: block;
  color: #222;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 800;
}

.gov-shell .portrait-jz-filter-left span {
  display: block;
  margin-top: 3px;
  color: #a6afba;
  font-size: 11px;
  line-height: 1.25;
}

.gov-shell .portrait-jz-filter-groups {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 10px;
  align-items: end;
}

.gov-shell .portrait-jz-filter-group {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.gov-shell .portrait-jz-filter-group-space {
  grid-column: 1 / -1;
}

.gov-shell .portrait-jz-filter-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #2c5f8e;
  font-size: 12px;
  font-weight: 800;
}

.gov-shell .portrait-jz-filter-group label::before {
  content: "";
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: #2c5f8e;
  flex: 0 0 auto;
}

.gov-shell .portrait-jz-filter .portrait-select {
  width: 100%;
  height: 30px;
  padding: 0 10px;
  border: 1px solid #ddd;
  border-radius: 3px;
  background: #fff;
  color: #666;
  font-size: 12px;
  outline: none;
  box-shadow: none;
}

.gov-shell .portrait-jz-filter .portrait-select:focus {
  border-color: #9ebbd7;
  box-shadow: none;
}

.gov-shell .portrait-jz-filter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.gov-shell .portrait-jz-page .portrait-active-filters {
  display: none;
  padding: 8px 18px;
  border: 0;
  border-bottom: 1px solid #eee;
  background: #fff;
}

.gov-shell .portrait-jz-page .portrait-active-chip {
  min-height: 24px;
  border-radius: 12px;
  background: #edf5fc;
  border-color: #d5e5f5;
  color: #2c5f8e;
}

.gov-shell .portrait-jz-workspace,
.gov-shell .portrait-workspace.portrait-jz-workspace {
  flex: 1 1 auto;
  min-height: 0;
  display: block;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  overflow: hidden;
}

.gov-shell .portrait-jz-page .portrait-entlist-col {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  overflow: hidden;
}

.gov-shell .portrait-jz-page .portrait-entlist-head {
  height: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  border-bottom: 1px solid #eee;
  background: #fff;
}

.gov-shell .portrait-jz-page .portrait-select-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #666;
  font-size: 12px;
}

.gov-shell .portrait-jz-page .portrait-select-all input,
.gov-shell .portrait-jz-page .portrait-row-check {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #2c5f8e;
}

.gov-shell .portrait-jz-page .portrait-entlist-col-title {
  color: #222;
  font-size: 13px;
  font-weight: 800;
}

.gov-shell .portrait-jz-page .portrait-manage-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 14px;
  margin-left: auto;
  border-radius: 3px;
  background: #e8913a;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.gov-shell .portrait-jz-page .portrait-entlist-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  background: #fff;
}

.gov-shell .portrait-jz-page .portrait-enttable {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.gov-shell .portrait-jz-page .portrait-enttable thead {
  display: none;
}

.gov-shell .portrait-jz-page .portrait-ent-row {
  height: 38px;
}

.gov-shell .portrait-jz-page .portrait-ent-row td,
.gov-shell .portrait-jz-page .portrait-ent-row.is-alt td {
  height: 38px;
  padding: 0;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
  vertical-align: middle;
}

.gov-shell .portrait-jz-page .portrait-ent-row:nth-child(even) td,
.gov-shell .portrait-jz-page .portrait-ent-row.is-alt td {
  background: #f5efe6;
}

.gov-shell .portrait-jz-page .portrait-ent-row:hover td {
  background: #fafafa;
}

.gov-shell .portrait-jz-page .portrait-ent-row:nth-child(even):hover td,
.gov-shell .portrait-jz-page .portrait-ent-row.is-alt:hover td {
  background: #ede7dd;
}

.gov-shell .portrait-jz-page .portrait-ent-check {
  width: 40px;
  padding-left: 18px !important;
  text-align: left;
}

.gov-shell .portrait-jz-page .portrait-ent-rank {
  width: 38px;
  color: #999;
  font-size: 12px;
  text-align: right;
  padding-right: 10px !important;
}

.gov-shell .portrait-jz-page .portrait-ent-name-cell {
  padding-left: 0 !important;
}

.gov-shell .portrait-jz-page .portrait-ent-link {
  color: #222;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.gov-shell .portrait-jz-page .portrait-ent-link:hover {
  color: #2c5f8e;
  text-decoration: underline;
}

.gov-shell .portrait-jz-page .portrait-ent-badges,
.gov-shell .portrait-jz-page .portrait-ent-chain-meta,
.gov-shell .portrait-jz-page .portrait-ent-industry,
.gov-shell .portrait-jz-page .portrait-ent-kpi {
  display: none;
}

.gov-shell .portrait-jz-page .portrait-pagination {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 18px;
  border-top: 1px solid #eee;
  background: #fff;
}

.gov-shell .portrait-jz-page .portrait-pagination-meta {
  color: #8a96a3;
  font-size: 12px;
}

.gov-shell .portrait-jz-page .portrait-pagination-links {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.gov-shell .portrait-jz-page .portrait-page-link,
.gov-shell .portrait-jz-page .portrait-page-ellipsis {
  min-width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border: 1px solid #dfe7ef;
  border-radius: 4px;
  background: #fff;
  color: #53667a;
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
}

.gov-shell .portrait-jz-page .portrait-page-link.active {
  border-color: #2c5f8e;
  background: #2c5f8e;
  color: #fff;
}

.gov-shell .portrait-jz-page .portrait-page-link.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.gov-shell .portrait-jz-page .portrait-page-link.nav {
  min-width: 58px;
}

.gov-shell .portrait-jz-page .portrait-page-ellipsis {
  border-color: transparent;
  background: transparent;
}

.gov-shell .portrait-jz-page .portrait-entlist-foot {
  height: 46px;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-top: 1px solid #eee;
  background: #fff;
}

.gov-shell .portrait-jz-page .portrait-foot-left,
.gov-shell .portrait-jz-page .portrait-foot-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.gov-shell .portrait-jz-page .portrait-foot-count {
  color: #666;
  font-size: 12px;
}

.gov-shell .portrait-jz-page .portrait-foot-count b {
  color: #2c5f8e;
  font-weight: 800;
}

.gov-shell .portrait-jz-page .portrait-foot-clear {
  color: #e8913a;
  font-size: 12px;
  text-decoration: none;
}

.gov-shell .portrait-jz-page .portrait-foot-clear:hover {
  text-decoration: underline;
}

.gov-shell .portrait-jz-page .portrait-foot-stats {
  color: #4e5969;
  font-size: 12px;
}

.gov-shell .portrait-jz-page .portrait-export-btn {
  height: 24px;
  padding: 0 14px;
  border: 0;
  border-radius: 3px;
  background: #e8913a;
  color: #fff;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}

.gov-shell .portrait-jz-page .portrait-endcap {
  display: block;
  height: 36px;
  min-height: 36px;
  border-radius: 0 0 4px 4px;
  background: #2c5f8e;
}

.gov-shell .portrait-jz-ai-btn {
  position: fixed;
  right: 26px;
  bottom: 132px;
  z-index: 80;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #2c5f8e 0%, #1e4a6e 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(44, 95, 142, 0.35);
  cursor: pointer;
}

.gov-shell .portrait-jz-ai-btn:hover {
  transform: scale(1.08);
  background: linear-gradient(135deg, #3570a5 0%, #2c5f8e 100%);
  box-shadow: 0 6px 24px rgba(44, 95, 142, 0.45);
}

.gov-shell .portrait-jz-ai-icon,
.gov-shell .portrait-jz-ai-icon .ui-icon {
  width: 26px;
  height: 26px;
}

@media (max-width: 1100px) {
  .gov-shell .portrait-jz-filter-groups {
    grid-template-columns: 1fr;
  }

  .gov-shell .portrait-jz-filter-group-space {
    grid-column: auto;
  }

  .gov-shell .portrait-jz-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .gov-shell .portrait-jz-page {
    padding: 0 8px 8px;
  }

  .gov-shell .portrait-jz-topbar {
    height: auto;
    min-height: 48px;
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 8px;
  }

  .gov-shell .portrait-jz-top-actions,
  .gov-shell .portrait-jz-top-search,
  .gov-shell .portrait-jz-main-search {
    width: 100%;
  }

  .gov-shell .portrait-jz-filter {
    flex-direction: column;
    gap: 10px;
  }

  .gov-shell .portrait-jz-filter-left {
    width: auto;
    flex-basis: auto;
  }

  .gov-shell .portrait-jz-filter-row {
    grid-template-columns: 1fr;
  }
}
/* End portrait jzhx reference list polish */
/* Portrait list unification tweaks */
.gov-shell .main:has(.portrait-jz-page) {
  background: #f3f8fe;
}

.gov-shell .portrait-jz-page {
  gap: 12px;
  padding: 16px 20px 20px;
  background: #f3f8fe;
  color: #0f2742;
}

.gov-shell .portrait-jz-topbar {
  height: 52px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid #dfeaf6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(44, 95, 142, 0.08);
}

.gov-shell .portrait-jz-breadcrumb {
  color: #64748b;
}

.gov-shell .portrait-jz-top-search,
.gov-shell .portrait-jz-role-btn {
  border-color: #dbe8f6;
  border-radius: 6px;
}

.gov-shell .portrait-jz-top-search button {
  border-left-color: #dbe8f6;
  background: #f7fbff;
  color: #33699f;
}

.gov-shell .portrait-jz-top-search button:hover,
.gov-shell .portrait-jz-role-btn:hover {
  background: #edf5fc;
  color: #28547f;
}

.gov-shell .portrait-jz-role-btn {
  color: #33699f;
}

.gov-shell .portrait-jz-panel,
.gov-shell .portrait-workspace.portrait-jz-workspace {
  border: 1px solid #dfeaf6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(44, 95, 142, 0.08);
}

.gov-shell .portrait-jz-search-section {
  padding: 14px 18px;
  border-bottom-color: #dfeaf6;
}

.gov-shell .portrait-jz-main-search .portrait-search-input,
.gov-shell .portrait-jz-filter .portrait-select {
  border-color: #dbe8f6;
  border-radius: 6px;
}

.gov-shell .portrait-jz-main-search .portrait-search-input:focus,
.gov-shell .portrait-jz-filter .portrait-select:focus {
  border-color: #8db2d8;
  box-shadow: 0 0 0 2px rgba(51, 105, 159, 0.08);
}

.gov-shell .portrait-jz-main-search .portrait-search-input {
  border-right: 0;
  border-radius: 6px 0 0 6px;
}

.gov-shell .portrait-jz-main-search .portrait-search-btn {
  border-radius: 0 6px 6px 0;
  background: #33699f;
}

.gov-shell .portrait-jz-main-search .portrait-search-btn:hover {
  background: #28547f;
}

.gov-shell .portrait-jz-filter {
  border-bottom-color: #dfeaf6;
  background: #f8fbff;
}

.gov-shell .portrait-jz-filter-left b,
.gov-shell .portrait-jz-filter-group label {
  color: #28547f;
}

.gov-shell .portrait-jz-filter-group label::before {
  background: #33699f;
}

.gov-shell .portrait-jz-page .portrait-entlist-head,
.gov-shell .portrait-jz-page .portrait-pagination,
.gov-shell .portrait-jz-page .portrait-entlist-foot {
  border-color: #dfeaf6;
}

.gov-shell .portrait-jz-page .portrait-manage-btn,
.gov-shell .portrait-jz-page .portrait-export-btn {
  border-radius: 5px;
  background: #33699f;
}

.gov-shell .portrait-jz-page .portrait-manage-btn:hover,
.gov-shell .portrait-jz-page .portrait-export-btn:hover {
  background: #28547f;
}

.gov-shell .portrait-jz-page .portrait-ent-row:nth-child(even) td,
.gov-shell .portrait-jz-page .portrait-ent-row.is-alt td {
  background: #f6f9fd;
}

.gov-shell .portrait-jz-page .portrait-ent-row:hover td,
.gov-shell .portrait-jz-page .portrait-ent-row:nth-child(even):hover td,
.gov-shell .portrait-jz-page .portrait-ent-row.is-alt:hover td {
  background: #edf5fc;
}

.gov-shell .portrait-jz-page .portrait-ent-link {
  color: #0f2742;
}

.gov-shell .portrait-jz-page .portrait-ent-link:hover,
.gov-shell .portrait-jz-page .portrait-foot-clear,
.gov-shell .portrait-jz-page .portrait-foot-count b {
  color: #33699f;
}

.gov-shell .portrait-jz-page .portrait-page-link.active {
  border-color: #33699f;
  background: #33699f;
}

.gov-shell .portrait-jz-page .portrait-endcap {
  border-radius: 0 0 8px 8px;
  background: #28547f;
}

.gov-shell .portrait-jz-ai-btn {
  background: linear-gradient(135deg, #33699f 0%, #28547f 100%);
  box-shadow: 0 6px 18px rgba(44, 95, 142, 0.32);
}

.gov-shell .portrait-jz-ai-btn:hover {
  background: linear-gradient(135deg, #3d78b1 0%, #33699f 100%);
}
/* End portrait list unification tweaks */
/* Portrait shell topbar restore */
.gov-shell .main:has(.portrait-jz-page) {
  padding: 20px 28px 40px 32px;
  background: #f3f8fe;
  overflow: auto;
}

.gov-shell .portrait-jz-page {
  min-height: calc(100vh - 141px);
  padding: 0;
}
/* End portrait shell topbar restore */
/* Portrait search alignment tweaks */
.gov-shell .portrait-jz-main-search {
  align-items: center;
  height: 34px;
}

.gov-shell .portrait-jz-main-search .portrait-search-input {
  height: 34px;
  line-height: 34px;
}

.gov-shell .portrait-jz-main-search .portrait-search-btn {
  width: 44px;
  height: 34px;
  min-width: 44px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  box-sizing: border-box;
}

.gov-shell .portrait-jz-main-search .portrait-search-btn svg {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin: 0;
}

.gov-shell .portrait-jz-top-search button {
  min-height: 32px;
  line-height: 1;
}

.gov-shell .portrait-jz-search-icon,
.gov-shell .portrait-jz-search-icon .ui-icon,
.gov-shell .portrait-jz-search-icon svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
}
/* End portrait search alignment tweaks */
/* Portrait action accent restore */
.gov-shell .portrait-jz-main-search .portrait-search-btn,
.gov-shell .portrait-jz-page .portrait-manage-btn,
.gov-shell .portrait-jz-page .portrait-export-btn {
  background: #e8913a;
  color: #fff;
}

.gov-shell .portrait-jz-main-search .portrait-search-btn:hover,
.gov-shell .portrait-jz-page .portrait-manage-btn:hover,
.gov-shell .portrait-jz-page .portrait-export-btn:hover {
  background: #d4802f;
}

.gov-shell .portrait-jz-page .portrait-foot-clear {
  color: #e8913a;
}
/* End portrait action accent restore */
/* Global government AI assistant */
.gov-shell .global-ai-fab {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 85;
  height: 56px;
  padding: 6px 18px 6px 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #dbe5f0;
  border-radius: 28px;
  background: #fff;
  color: #fff;
  box-shadow: 0 10px 24px rgba(44, 95, 142, 0.34);
  cursor: grab;
  opacity: 0.92;
  overflow: hidden;
  touch-action: none;
  transition: opacity 160ms ease, box-shadow 160ms ease;
}

.gov-shell .global-ai-fab:hover {
  opacity: 1;
  box-shadow: 0 14px 30px rgba(44, 95, 142, 0.4);
}

.gov-shell .global-ai-fab-img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 50%;
  pointer-events: none;
}

.gov-shell .global-ai-fab-label {
  font-size: 15px;
  font-weight: 700;
  color: #2c5f8e;
  letter-spacing: 1px;
  white-space: nowrap;
  pointer-events: none;
}

.gov-shell .global-ai-fab-icon,
.gov-shell .global-ai-fab-icon .ui-icon,
.gov-shell .global-ai-fab-icon svg {
  width: 25px;
  height: 25px;
}

.gov-shell .global-ai-chat {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 86;
  width: min(720px, calc(100vw - 32px));
  height: min(820px, calc(100vh - 48px));
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
}

.gov-shell .global-ai-chat.is-open {
  display: flex;
  animation: globalAiSlideUp 0.25s ease;
}

@keyframes globalAiSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.gov-shell .global-ai-resize {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  cursor: nwse-resize;
  z-index: 3;
  touch-action: none;
}

.global-ai-chat-body:has(.user-msg) .global-ai-quick {
  display: none;
}

.gov-shell .global-ai-chat-head {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #2c5f8e 0%, #1e4a6e 100%);
  color: #fff;
}

.gov-shell .global-ai-chat-head > span {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  flex: 0 0 auto;
}

.gov-shell .global-ai-chat-icon,
.gov-shell .global-ai-chat-icon .ui-icon,
.gov-shell .global-ai-chat-icon svg {
  width: 24px;
  height: 24px;
}

.gov-shell .global-ai-chat-head b {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}

.gov-shell .global-ai-chat-head em {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-style: normal;
  color: rgba(255, 255, 255, 0.8);
}

.gov-shell .global-ai-chat-head button.global-ai-chat-clear {
  margin-left: auto;
  height: 24px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.gov-shell .global-ai-chat-head button.global-ai-chat-clear:hover {
  background: rgba(255, 255, 255, 0.3);
}

.gov-shell .global-ai-chat-head button.global-ai-chat-close {
  margin-left: 8px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.gov-shell .global-ai-chat-head button.global-ai-chat-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.gov-shell .global-ai-chat-head button.global-ai-chat-history {
  margin-left: 8px;
  height: 24px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.gov-shell .global-ai-chat-head button.global-ai-chat-history:hover,
.gov-shell .global-ai-chat-head button.global-ai-chat-history.is-active {
  background: rgba(255, 255, 255, 0.3);
}

.gov-shell .global-ai-chat-head button.global-ai-chat-history .ui-icon {
  width: 14px;
  height: 14px;
}

.gov-shell .global-ai-history-panel {
  position: absolute;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.gov-shell .global-ai-history-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #eef2f7;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.gov-shell .global-ai-history-panel-close {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.gov-shell .global-ai-history-panel-close:hover {
  background: #f1f5f9;
}

.gov-shell .global-ai-history-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.gov-shell .global-ai-history-empty {
  padding: 32px 0;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
}

.gov-shell .global-ai-history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  color: #334155;
}

.gov-shell .global-ai-history-item:hover {
  background: #f1f5f9;
}

.gov-shell .global-ai-history-item.is-active {
  background: #edf5fc;
}

.gov-shell .global-ai-history-item-icon {
  width: 16px;
  height: 16px;
  color: #94a3b8;
  flex: 0 0 auto;
}

.gov-shell .global-ai-history-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gov-shell .global-ai-history-text b {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gov-shell .global-ai-history-text time {
  font-size: 11px;
  color: #94a3b8;
}

.gov-shell .global-ai-history-del {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  flex: 0 0 auto;
}

.gov-shell .global-ai-history-del:hover {
  background: #fee2e2;
  color: #dc2626;
}

.gov-shell .global-ai-history-del .ui-icon {
  width: 14px;
  height: 14px;
}

.gov-shell .global-ai-net-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 4px 8px;
  border: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.gov-shell .global-ai-net-toggle:hover {
  background: rgba(255, 255, 255, 0.22);
}

.gov-shell .global-ai-net-toggle .global-ai-net-toggle-track {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.25);
  transition: background 0.2s;
}

.gov-shell .global-ai-net-toggle .global-ai-net-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}

.gov-shell .global-ai-net-toggle.is-active .global-ai-net-toggle-track {
  background: #22c55e;
}

.gov-shell .global-ai-net-toggle.is-active .global-ai-net-toggle-knob {
  transform: translateX(14px);
}

.gov-shell .global-ai-net-toggle em {
  display: inline;
  margin: 0;
  font-size: 12px;
  font-style: normal;
  color: inherit;
}

.gov-shell .global-ai-chat-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 18px;
  background: #f6f9fd;
}

.gov-shell .global-ai-welcome {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}



.gov-shell .global-ai-welcome p {
  margin: 0;
  padding: 10px 14px;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  border-top-left-radius: 2px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  line-height: 1.6;
}

.gov-shell .global-ai-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.gov-shell .global-ai-quick button {
  padding: 6px 12px;
  border: 1px solid #d7e6f7;
  border-radius: 999px;
  background: #eaf2fb;
  color: #2c5f8e;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.gov-shell .global-ai-quick button:hover {
  background: #2c5f8e;
  color: #fff;
}

.gov-shell .global-ai-messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.gov-shell .global-ai-messages.has-messages {
  margin-top: 4px;
}

.gov-shell .global-ai-messages .ai-chat-bubble {
  max-width: 95%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
}

.gov-shell .global-ai-messages .ai-chat-bubble.ai-msg {
  align-self: flex-start;
  border: 1px solid #eef2f7;
  border-top-left-radius: 2px;
  background: #fff;
  color: #334155;
  box-shadow: none;
}

.gov-shell .global-ai-messages .ai-chat-bubble.user-msg {
  align-self: flex-end;
  border-top-right-radius: 2px;
  background: #2c5f8e;
  color: #fff;
}

/* 用户气泡内 markdown 容器默认 var(--ink) 深色，蓝底上看不清，强制白色 */
.gov-shell .global-ai-messages .ai-chat-bubble.user-msg .ai-chat-content,
.gov-shell .global-ai-messages .ai-chat-bubble.user-msg .ai-chat-content strong {
  color: #fff;
}

.gov-shell .global-ai-chat-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid #eef2f7;
  background: #fff;
}

.gov-shell .global-ai-chat-foot textarea {
  flex: 1 1 auto;
  min-width: 0;
  max-height: 96px;
  height: 40px;
  resize: none;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  color: #0f2742;
  font-family: inherit;
  font-size: 13px;
  line-height: 38px;
  outline: none;
}

.gov-shell .global-ai-chat-foot textarea:focus {
  border-color: #2c5f8e;
  box-shadow: none;
}

.gov-shell .global-ai-chat-foot button {
  width: 44px;
  height: 40px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #2c5f8e 0%, #1e4a6e 100%);
  color: #fff;
  cursor: pointer;
}

.gov-shell .global-ai-send-icon,
.gov-shell .global-ai-send-icon .ui-icon,
.gov-shell .global-ai-send-icon svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 760px) {
  .gov-shell .global-ai-fab {
    right: 18px;
    bottom: 18px;
  }

  .gov-shell .global-ai-chat {
    right: 14px;
    bottom: 14px;
    width: calc(100vw - 28px);
    height: min(500px, calc(100vh - 28px));
  }
}
/* End global government AI assistant */
/* Government pages unified polish */
.gov-shell {
  --gov-blue: #33699f;
  --gov-blue-dark: #28547f;
  --gov-blue-soft: #edf5fc;
  --gov-border: #dfeaf6;
  --gov-border-strong: #cfe1f3;
  --gov-text: #0f2742;
  --gov-muted: #64748b;
  --gov-card-shadow: 0 4px 14px rgba(44, 95, 142, 0.08);
}

.gov-shell .main {
  color: var(--gov-text);
}

/* 企业画像 iframe 页：底部只留 8px，避免蓝条下方露出整条父容器 padding（40px）的空白 */
.gov-shell .main:has(#portrait-iframe),
.gov-shell .main:has(#portrait-detail-iframe) {
  padding-bottom: 8px;
}

.gov-shell :is(.card, .target-panel, .target-stat-card, .govstats-panel, .govstats-stat-card, .exit-panel, .decision-panel, .pm-card, .pm-selected-preview, .kp-ref-table-card, .kp-bottom-card, .portrait-dashboard-panel, .portrait-stat-card, .portrait-detail-v2-card, .chain-side-panel, .chain-detail-panel) {
  border-color: var(--gov-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--gov-card-shadow);
}

.gov-shell :is(.card .hd, .target-panel-head, .govstats-panel-head, .exit-panel-head, .decision-panel-head, .portrait-panel-head, .portrait-detail-v2-panel-head, .kp-ref-table-head) {
  border-bottom-color: var(--gov-border);
}

.gov-shell :is(.card .title, .target-panel-head h3, .govstats-panel-head h3, .exit-panel-head h3, .decision-panel-head h3, .portrait-panel-head h3, .portrait-detail-v2-panel-head h2, .kp-ref-table-title h3) {
  color: #174a80;
  font-weight: 800;
  letter-spacing: 0;
}

.gov-shell :is(.muted, .card .meta, .target-panel-head span, .govstats-panel-head span, .exit-panel-head span, .decision-panel-head span) {
  color: var(--gov-muted);
}

.gov-shell :is(.btn, .portrait-dashboard-btn, .target-btn, .exit-btn, .govstats-btn, .decision-btn, .kp-ref-table-op, .zdx-btn) {
  min-height: 32px;
  border-radius: 6px;
  border-color: var(--gov-border-strong);
  background: #fff;
  color: var(--gov-blue);
  font-weight: 600;
  box-shadow: none;
}

.gov-shell :is(.btn, .portrait-dashboard-btn, .target-btn, .exit-btn, .govstats-btn, .decision-btn, .kp-ref-table-op, .zdx-btn):hover {
  border-color: #b7d0e9;
  background: var(--gov-blue-soft);
  color: var(--gov-blue-dark);
  transform: none;
  box-shadow: none;
}

.gov-shell :is(.btn.primary, .portrait-dashboard-btn.primary, .target-btn.primary, .exit-btn.primary, .govstats-btn.primary, .decision-btn.primary, .zdx-btn-primary) {
  border-color: var(--gov-blue);
  background: var(--gov-blue);
  color: #fff;
}

.gov-shell :is(.btn.primary, .portrait-dashboard-btn.primary, .target-btn.primary, .exit-btn.primary, .govstats-btn.primary, .decision-btn.primary, .zdx-btn-primary):hover {
  border-color: var(--gov-blue-dark);
  background: var(--gov-blue-dark);
  color: #fff;
}

.gov-shell :is(input[type="text"], input[type="search"], input[type="number"], textarea, select, .portrait-search-input, .portrait-select) {
  border-color: var(--gov-border-strong);
  border-radius: 6px;
  color: var(--gov-text);
  font-family: inherit;
}

.gov-shell :is(input[type="text"], input[type="search"], input[type="number"], textarea, select, .portrait-search-input, .portrait-select):focus {
  border-color: #8db2d8;
  outline: none;
  box-shadow: 0 0 0 2px rgba(51, 105, 159, 0.08);
}

.gov-shell .gov-topbar .tenant-switcher {
  height: 32px;
  min-height: 32px;
  box-sizing: border-box;
}

.gov-shell .gov-topbar .tenant-switcher > span,
.gov-shell .gov-topbar .tenant-switcher select {
  color: #fff;
  -webkit-text-fill-color: #fff;
}

.gov-shell .gov-topbar .tenant-switcher option {
  color: #172033;
  -webkit-text-fill-color: #172033;
  background: #fff;
}

.gov-shell :is(.table, .pm-table, .exit-table, .target-compare-table, .govstats-doc-table, .kp-ref-table, .portrait-enttable) {
  color: var(--gov-text);
}

.gov-shell :is(.table, .pm-table, .exit-table, .target-compare-table, .govstats-doc-table, .kp-ref-table, .portrait-enttable) thead th {
  border-bottom-color: var(--gov-border);
  background: #f6f9fd;
  color: #174a80;
  font-weight: 800;
}

.gov-shell :is(.table, .pm-table, .exit-table, .target-compare-table, .govstats-doc-table, .kp-ref-table, .portrait-enttable) tbody td {
  border-bottom-color: #edf3fa;
}

.gov-shell :is(.table, .pm-table, .exit-table, .target-compare-table, .govstats-doc-table, .kp-ref-table, .portrait-enttable) tbody tr:hover td {
  background: #f9fbff;
}

.gov-shell :is(.pill, .tag, .portrait-active-chip, .pm-selected-pill, .pm-selected-more) {
  border-color: #d5e5f5;
  background: #edf5fc;
  color: var(--gov-blue);
  border-radius: 999px;
}

.gov-shell :is(.kpi, .target-stat-card, .govstats-stat-card, .portrait-stat-card) {
  border-color: var(--gov-border);
  background: #fff;
  box-shadow: var(--gov-card-shadow);
}

.gov-shell :is(.kpi .value, .target-stat-value, .govstats-stat-value, .portrait-stat-card strong) {
  color: #174a80;
  letter-spacing: 0;
}

.gov-shell :is(.filter-bar, .target-control-bar, .exit-filter-bar, .govstats-filter-bar, .decision-toolbar, .pm-filter-bar, .kp-filter-bar, .portrait-dashboard-filter) {
  border-color: var(--gov-border);
  border-radius: 10px;
  background: #f8fbff;
}

.gov-shell :is(.modal, .chain-node-detail-modal, .decision-modal) {
  border-color: var(--gov-border);
  border-radius: 12px;
}

@media (max-width: 980px) {
  .gov-shell .main {
    padding: 16px;
  }
}
/* End government pages unified polish */

/* Geo and chain page topbar unification */
.gov-shell .geo-topbar,
.gov-shell .chain-topbar {
  height: 61px;
  min-height: 61px;
  max-height: 61px;
  margin: 0 0 20px;
  padding: 0 20px;
  border-radius: 10px;
  background: #33699f;
  color: #fff;
  box-shadow: none;
}

.gov-shell .chain-root {
  height: calc(100vh - 141px);
  max-height: calc(100vh - 141px);
  grid-template-rows: 61px 1fr;
  border-radius: 0;
  background: transparent;
}

.gov-shell .chain-layout {
  height: calc(100vh - 202px);
}

.gov-shell .geo-top-left,
.gov-shell .chain-brand {
  min-width: 0;
}

.gov-shell .geo-brand,
.gov-shell .chain-brand {
  gap: 8px;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}

.gov-shell .geo-brand .topbar-brand-icon,
.gov-shell .chain-brand .topbar-brand-icon {
  width: 20px;
  height: 20px;
  border-radius: 0;
  background: transparent;
}

.gov-shell .geo-brand .topbar-brand-icon .ui-icon,
.gov-shell .geo-brand .brand-icon,
.gov-shell .chain-brand .topbar-brand-icon .ui-icon,
.gov-shell .chain-brand .brand-icon {
  width: 18px;
  height: 18px;
  color: #e8f5ff;
  opacity: 1;
}

.gov-shell .geo-top-right,
.gov-shell .chain-top-tools {
  gap: 10px;
}

.gov-shell .chain-topbar .tenant-switcher,
.gov-shell .geo-topbar .tenant-switcher {
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(236, 246, 255, 0.86);
}

.gov-shell .chain-topbar .tenant-switcher span,
.gov-shell .geo-topbar .tenant-switcher span {
  color: rgba(236, 246, 255, 0.76);
}

.gov-shell .chain-topbar .tenant-switcher select,
.gov-shell .geo-topbar .tenant-switcher select {
  height: 32px;
  max-width: 132px;
  color: #fff;
  -webkit-text-fill-color: #fff;
  font-weight: 700;
  background-color: transparent;
}

.gov-shell .chain-topbar .tenant-switcher option,
.gov-shell .geo-topbar .tenant-switcher option {
  color: #172033;
  -webkit-text-fill-color: #172033;
  background: #fff;
}

.gov-shell .chain-domain-picker {
  position: relative;
  flex: 0 0 auto;
  color: #173a5e;
}

.gov-shell .chain-domain-picker > summary {
  height: 34px;
  min-width: 142px;
  max-width: 196px;
  padding: 0 10px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 14px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  list-style: none;
  box-sizing: border-box;
}

.gov-shell .chain-domain-picker > summary::-webkit-details-marker {
  display: none;
}

.gov-shell .chain-domain-picker > summary span {
  color: rgba(236, 246, 255, 0.76);
  font-size: 12px;
  white-space: nowrap;
}

.gov-shell .chain-domain-picker > summary strong {
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gov-shell .chain-domain-picker-chevron {
  width: 14px;
  height: 14px;
  color: #fff;
  transform: rotate(-90deg);
  transition: transform 160ms ease;
}

.gov-shell .chain-domain-picker[open] .chain-domain-picker-chevron {
  transform: rotate(90deg);
}

.gov-shell .chain-domain-picker-panel {
  position: absolute;
  top: calc(100% + 9px);
  left: 0;
  z-index: 90;
  width: 334px;
  max-height: min(470px, calc(100vh - 120px));
  padding: 11px;
  overflow: hidden;
  border: 1px solid #cbdceb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(20, 55, 87, 0.18);
}

.gov-shell .tenant-domain-picker--end .chain-domain-picker-panel {
  right: 0;
  left: auto;
}

.gov-shell .chain-domain-picker-head,
.gov-shell .chain-domain-picker-head > div {
  display: flex;
}

.gov-shell .chain-domain-picker-head {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gov-shell .chain-domain-picker-head > div {
  min-width: 0;
}

.gov-shell .chain-domain-picker-head strong {
  color: #173a5e;
  font-size: 14px;
  font-weight: 800;
}

.gov-shell .chain-domain-picker-head em {
  color: #7b90a5;
  font-size: 10px;
  font-style: normal;
}

.gov-shell .chain-domain-picker-head em {
  color: #7890a5;
  white-space: nowrap;
}

.gov-shell .chain-domain-picker-search {
  height: 34px;
  margin-top: 9px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #d6e2ed;
  border-radius: 6px;
  background: #f8fafc;
}

.gov-shell .chain-domain-picker-search-icon {
  width: 14px;
  height: 14px;
  color: #6e88a1;
}

.gov-shell .chain-domain-picker-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #244665;
  font: inherit;
  font-size: 12px;
}

.gov-shell .chain-domain-breadcrumb {
  margin: 7px 4px 6px;
  display: flex;
  align-items: baseline;
  font-size: 10px;
}

.gov-shell .chain-domain-breadcrumb strong {
  min-width: 0;
  overflow: hidden;
  color: #7890a5;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gov-shell .chain-domain-breadcrumb i {
  margin: 0 3px;
  color: #b0bec9;
  font-style: normal;
}

.gov-shell .chain-domain-tree {
  max-height: min(330px, calc(100vh - 250px));
  overflow: auto;
  scrollbar-gutter: stable;
}

.gov-shell .chain-domain-options,
.gov-shell .chain-domain-options ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.gov-shell .chain-domain-options ul {
  margin-left: 10px;
  padding-left: 8px;
  border-left: 1px solid #dbe7f1;
}

.gov-shell .chain-domain-options ul[hidden] {
  display: none;
}

.gov-shell .chain-domain-option-line {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 2px;
}

.gov-shell .chain-domain-branch-toggle,
.gov-shell .chain-domain-branch-placeholder {
  width: 20px;
  height: 30px;
}

.gov-shell .chain-domain-branch-toggle {
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #7394b2;
  cursor: pointer;
}

.gov-shell .chain-domain-branch-toggle:hover,
.gov-shell .chain-domain-branch-toggle:focus-visible {
  outline: 0;
  background: #edf5fb;
  color: #2f73ad;
}

.gov-shell .chain-domain-branch-icon {
  width: 12px;
  height: 12px;
  transform: rotate(180deg);
  transition: transform 150ms ease;
}

.gov-shell .chain-domain-branch-toggle.is-open .chain-domain-branch-icon {
  transform: rotate(-90deg);
}

.gov-shell .chain-domain-option {
  min-height: 34px;
  padding: 5px 7px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #294d6d;
  text-decoration: none;
}

.gov-shell .tenant-domain-picker button.chain-domain-option {
  width: 100%;
  appearance: none;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.gov-shell .tenant-domain-picker button.chain-domain-option:disabled {
  cursor: default;
  opacity: 1;
}

.gov-shell .chain-domain-option-line > .chain-domain-option {
  min-width: 0;
}

.gov-shell .chain-domain-option:hover {
  border-color: transparent;
  background: #f3f8fc;
}

.gov-shell .chain-domain-option.is-current {
  border-color: transparent;
  background: #eaf3fb;
}

.gov-shell .chain-domain-option-copy {
  min-width: 0;
  display: flex;
  align-items: center;
}

.gov-shell .chain-domain-option-copy strong {
  overflow: hidden;
  color: #244665;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gov-shell .chain-domain-option-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.gov-shell .chain-domain-child-count {
  min-width: 14px;
  height: 16px;
  padding: 0 2px;
  display: inline-grid;
  place-items: center;
  border-radius: 3px;
  background: transparent;
  color: #8a9dad;
  font-size: 9px;
  font-weight: 750;
  line-height: 1;
  box-sizing: border-box;
}

.gov-shell .chain-domain-option em {
  padding: 0;
  background: transparent;
  color: #2f6fa6;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.gov-shell .chain-domain-search-empty {
  margin: 16px 0 6px;
  color: #7d91a4;
  font-size: 11px;
  text-align: center;
}

.gov-shell .geo-search,
.gov-shell .chain-search {
  width: min(340px, 28vw);
  height: 34px;
  min-height: 34px;
  padding: 0 0 0 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.gov-shell .chain-search {
  padding-right: 12px;
}

.gov-shell .geo-search:focus-within,
.gov-shell .chain-search:focus-within {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.gov-shell .geo-search input,
.gov-shell .chain-search input {
  height: 32px;
  color: #fff;
  font-size: 13px;
}

.gov-shell .geo-search input::placeholder,
.gov-shell .chain-search input::placeholder {
  color: rgba(255, 255, 255, 0.68);
}

.gov-shell .geo-search-btn,
.gov-shell .chain-link-btn,
.gov-shell .geo-top-right .geo-link {
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}

.gov-shell .geo-search-btn:hover,
.gov-shell .chain-link-btn:hover,
.gov-shell .geo-top-right .geo-link:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.gov-shell .geo-top-right .geo-link .link-icon,
.gov-shell .chain-link-btn .link-icon {
  width: 14px;
  height: 14px;
  color: #fff;
  opacity: 1;
}

.gov-shell .chain-top-tools .sep {
  color: rgba(255, 255, 255, 0.42);
}

@media (max-width: 1080px) {
  .gov-shell .chain-root {
    grid-template-rows: auto 1fr;
  }

  .gov-shell .geo-topbar,
  .gov-shell .chain-topbar {
    height: auto;
    min-height: 61px;
    max-height: none;
    padding: 12px 14px;
    flex-wrap: wrap;
  }

  .gov-shell .geo-top-left,
  .gov-shell .geo-top-right,
  .gov-shell .chain-top-tools {
    width: 100%;
    flex-wrap: wrap;
  }

  .gov-shell .geo-search,
  .gov-shell .chain-search {
    width: 100%;
  }

  .gov-shell .chain-topbar .chain-domain-picker,
  .gov-shell .chain-topbar .chain-domain-picker > summary,
  .gov-shell .geo-topbar .chain-domain-picker,
  .gov-shell .geo-topbar .chain-domain-picker > summary {
    width: 100%;
    max-width: none;
  }

  .gov-shell .chain-domain-picker-panel {
    width: min(340px, calc(100vw - 56px));
  }

  .gov-shell .chain-layout {
    height: auto;
  }
}
/* End geo and chain page topbar unification */

/* Industry graph side panel, selectively restored from local tero. */
.chain-map-head .op.chain-template {
  color: #245f91;
  font-weight: 800;
}

.chain-template-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 35, 58, 0.42);
  backdrop-filter: blur(5px);
}

.chain-template-modal {
  width: min(720px, calc(100vw - 40px));
  max-height: calc(100vh - 64px);
  overflow: auto;
  border: 1px solid rgba(54, 104, 154, 0.18);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(19, 50, 82, 0.28);
}

.chain-template-modal-head,
.chain-template-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 24px;
}

.chain-template-modal-head {
  border-bottom: 1px solid rgba(64, 110, 154, 0.12);
}

.chain-template-modal-head span {
  display: block;
  margin-bottom: 4px;
  color: #6e8aaa;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.chain-template-modal-head h3 {
  margin: 0;
  color: #163a5e;
  font-size: 20px;
  font-weight: 900;
}

.chain-template-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #eef4fb;
  color: #315b86;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.chain-template-modal-body {
  padding: 20px 24px 8px;
}

.chain-template-lead,
.chain-template-note {
  margin: 0 0 16px;
  color: #43566e;
  font-size: 14px;
  line-height: 1.75;
}

.chain-template-steps {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.chain-template-step {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(62, 111, 158, 0.12);
  border-radius: 12px;
  background: #f5f9fd;
}

.chain-template-step strong {
  color: #19466f;
  font-size: 14px;
}

.chain-template-step span {
  color: #4e647a;
  font-size: 13px;
  line-height: 1.6;
}

.chain-template-preview {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr 1.55fr;
  margin: 14px 0 16px;
  overflow: hidden;
  border: 1px solid rgba(64, 110, 154, 0.18);
  border-radius: 12px;
  background: #fff;
  font-size: 12px;
}

.chain-template-preview > div {
  min-height: 38px;
  padding: 10px 12px;
  border-right: 1px solid rgba(64, 110, 154, 0.12);
  border-bottom: 1px solid rgba(64, 110, 154, 0.12);
  color: #35536f;
}

.chain-template-preview > div:nth-child(-n+4) {
  background: #2e6399;
  color: #fff;
  font-weight: 900;
}

.chain-template-preview .wide {
  background: #eef6ff;
  color: #164a78;
  font-weight: 800;
}

.chain-template-modal-actions {
  justify-content: flex-end;
  border-top: 1px solid rgba(64, 110, 154, 0.12);
}

.chain-template-primary,
.chain-template-secondary {
  min-width: 110px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.chain-template-primary {
  border: 1px solid #f1992c;
  background: #f1992c;
  color: #fff;
  box-shadow: 0 8px 18px rgba(241, 153, 44, 0.22);
}

.chain-template-secondary {
  border: 1px solid rgba(49, 91, 134, 0.18);
  background: #fff;
  color: #315b86;
}

.gov-shell .chain-layout {
  grid-template-columns: minmax(0, 1fr) 316px;
  gap: 12px;
}

.gov-shell .chain-right {
  display: block;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  border-color: #dbe8f5;
  background: #f7fbff;
  box-shadow: 0 14px 34px rgba(31, 74, 112, 0.10);
}

.gov-shell .chain-right * {
  letter-spacing: 0;
}

.gov-shell .chain-side-scroll {
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: minmax(260px, 0.98fr) minmax(300px, 1.02fr);
  gap: 12px;
  padding: 12px;
  overflow: hidden;
}

.gov-shell .chain-side-section {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #d9e7f5;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(32, 74, 112, 0.055);
}

.gov-shell .chain-side-section-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 13px 10px;
  border-bottom: 1px solid rgba(41, 105, 166, 0.10);
  background: #fff;
}

.gov-shell .chain-side-section-head.compact {
  padding-bottom: 8px;
}

.gov-shell .chain-side-kicker {
  display: block;
  margin-bottom: 4px;
  color: #7e99b3;
  font-size: 9px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.gov-shell .chain-side-section-head h3 {
  margin: 0;
  color: #163a5e;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 900;
}

.gov-shell .chain-side-count {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eaf4ff;
  color: #235c95;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(38, 112, 184, 0.06);
}

.gov-shell .chain-side-scope {
  flex: 0 0 auto;
  margin: 0 10px 10px;
  padding: 9px 10px;
  border: 1px solid #dce9f6;
  border-radius: 11px;
  background: linear-gradient(180deg, #f8fbff, #f3f8fd);
}

.gov-shell .chain-side-scope span {
  display: block;
  color: #1c466e;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 900;
}

.gov-shell .chain-side-scope em {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  color: #73889d;
  font-size: 11px;
  line-height: 1.45;
  font-style: normal;
  font-weight: 700;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.gov-shell .chain-side-catalog .chain-ind-list {
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding: 0 9px 10px;
  scrollbar-width: thin;
}

.gov-shell .chain-side-catalog .chain-ind-btn {
  width: 100%;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  column-gap: 8px;
  align-items: center;
  min-height: 52px;
  margin: 0 0 8px;
  padding: 8px 9px;
  border: 1px solid #edf3fa;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(31, 74, 112, 0.035);
}

.gov-shell .chain-side-catalog .chain-ind-btn:hover {
  border-color: rgba(38, 112, 184, 0.24);
  background: #f9fcff;
  transform: translateY(-1px);
}

.gov-shell .chain-side-catalog .chain-ind-btn.active {
  border-color: rgba(38, 112, 184, 0.58);
  background: linear-gradient(180deg, #f5faff, #fff);
  box-shadow: inset 0 0 0 1px rgba(38, 112, 184, 0.10), 0 7px 16px rgba(38, 112, 184, 0.10);
}

.gov-shell .chain-side-catalog .chain-ind-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #edf6ff;
  font-size: 13px;
  line-height: 1;
}

.gov-shell .chain-side-catalog .chain-ind-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.gov-shell .chain-side-catalog .chain-ind-name {
  min-width: 0;
  display: -webkit-box;
  overflow: hidden;
  color: #183b5d;
  font-size: 12.5px;
  line-height: 1.32;
  font-weight: 900;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.gov-shell .chain-side-catalog .chain-ind-owner {
  overflow: hidden;
  color: #7b8fa2;
  font-size: 10.5px;
  line-height: 1.2;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gov-shell .chain-side-catalog .chain-ind-output {
  align-self: center;
  margin-left: 0;
  padding: 4px 9px;
  border-radius: 999px;
  background: #37a55a;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: none;
}

.gov-shell .chain-side-catalog .chain-ind-btn.active .chain-ind-output {
  background: #2f9b51;
}

.gov-shell .chain-side-detail .chain-tabs {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(41, 105, 166, 0.10);
  background: #f7fbff;
}

.gov-shell .chain-side-detail .chain-tab {
  min-width: 0;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 6px;
  border: 1px solid rgba(41, 105, 166, 0.11);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: #60758a;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}

.gov-shell .chain-side-detail .chain-tab.active {
  border-color: rgba(38, 112, 184, 0.42);
  background: #fff;
  color: #23609a;
  box-shadow: 0 5px 12px rgba(38, 112, 184, 0.08);
}

.gov-shell .chain-tab-badge {
  min-width: 20px;
  height: 17px;
  padding: 0 5px;
  font-size: 10px;
}

.gov-shell .chain-side-detail .chain-panel {
  min-height: 0;
  overflow-y: auto;
  padding: 11px 12px 12px;
  color: #40586f;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 252, 255, 0.94));
}

.gov-shell .chain-side-detail .chain-intro {
  color: #40586f;
  font-size: 12.5px;
  line-height: 1.75;
}

.gov-shell .chain-side-detail .chain-intro-tip {
  margin-top: 10px;
  color: #8193a5;
  font-size: 11.5px;
  line-height: 1.55;
}

.gov-shell .chain-side-detail .chain-weak-panel {
  overflow: hidden;
  border: 1px solid #e0eaf5;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

.gov-shell .chain-side-detail .chain-summary-weak-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.gov-shell .chain-side-catalog .chain-ind-list::-webkit-scrollbar,
.gov-shell .chain-side-detail .chain-panel::-webkit-scrollbar {
  width: 6px;
}

.gov-shell .chain-side-catalog .chain-ind-list::-webkit-scrollbar-thumb,
.gov-shell .chain-side-detail .chain-panel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(89, 121, 153, 0.28);
}

@media (max-width: 1360px) {
  .gov-shell .chain-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .gov-shell .chain-side-scroll {
    gap: 10px;
    padding: 10px;
  }
}

@media (max-width: 1180px) {
  .gov-shell .chain-layout {
    grid-template-columns: minmax(0, 1fr) 286px;
  }

  .gov-shell .chain-side-catalog .chain-ind-btn {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .gov-shell .chain-side-catalog .chain-ind-output {
    grid-column: 2;
    justify-self: start;
    margin-top: 4px;
  }
}

@media (max-width: 720px) {
  .chain-template-modal-backdrop {
    padding: 14px;
  }

  .chain-template-modal {
    width: calc(100vw - 28px);
  }

  .chain-template-step {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .chain-template-preview {
    grid-template-columns: 1fr 1fr;
  }
}

/* Markdown Parsing Styles for AI Chat Content */
.ai-chat-content {
  color: var(--ink);
  line-height: 1.85;
}
.ai-chat-content h1, .ai-chat-content h2, .ai-chat-content h3 {
  color: var(--navy);
  margin-top: 1.2em;
  margin-bottom: 0.6em;
  font-weight: 700;
}
/* 研究报告章节标题（_reportHeadingsMd 提升）：主章带左侧强调条，子章加粗藏青 */
.ai-chat-content h3 {
  font-size: 16px;
  margin: 1.5em 0 0.7em;
  padding-left: 10px;
  border-left: 3px solid var(--accent);
}
.ai-chat-content h4 {
  font-size: 14.5px;
  margin: 1.2em 0 0.5em;
  color: var(--navy);
  font-weight: 700;
}
.ai-chat-content p { margin: 0 0 14px; }
.ai-chat-content p:last-child { margin-bottom: 0; }
.ai-chat-content strong { color: var(--accent); font-weight: 600; }
.ai-chat-content ul, .ai-chat-content ol { margin: 0 0 12px; padding-left: 24px; }
.ai-chat-content li { margin-bottom: 6px; }

/* Premium Table Styles matching System Theme */
.ai-chat-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13px;
  background-color: var(--card);
  border-radius: var(--radius-sm, 8px);
  overflow: hidden;
  box-shadow: var(--shadow-2);
  border: 1px solid var(--stroke);
}
.ai-chat-content th, .ai-chat-content td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--stroke);
}
.ai-chat-content table th:nth-child(1),
.ai-chat-content table td:nth-child(1),
.ai-chat-content table th:nth-child(2),
.ai-chat-content table td:nth-child(2) {
  white-space: nowrap;
}
.ai-chat-content th {
  background-color: var(--accent-light);
  font-weight: 600;
  color: var(--navy);
  border-bottom: 2px solid var(--accent);
}
.ai-chat-content tr:last-child td {
  border-bottom: none;
}
.ai-chat-content tbody tr:nth-child(even) {
  background-color: var(--paper);
}
.ai-chat-content tbody tr:hover {
  background-color: var(--accent-glow);
}

/* 报告生成中的等待提示：文字呼吸闪烁（不加额外图标），表示系统未卡死 */
.ai-chat-bubble.is-thinking .ai-chat-content {
  animation: aiThinkingBreath 1.5s ease-in-out infinite;
}
@keyframes aiThinkingBreath {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.portal-ai-history-item {
  position: relative;
}
.portal-ai-history-del {
  display: none;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #e74c3c;
  padding: 4px;
  background: #eef4fa;
  border-radius: 4px;
}
.portal-ai-history-del svg {
  width: 14px;
  height: 14px;
}
.portal-ai-history-item:hover .portal-ai-history-del {
  display: flex;
  align-items: center;
  justify-content: center;
}
.portal-ai-history-item:hover time {
  opacity: 0;
}

/* Hide AI chat bubble on home page */
.pm-home .ai-chat-bubble.ai-msg,
.pm-home ~ .global-ai-chat .ai-chat-bubble.ai-msg,
.pm-home ~ .ai-chat-bubble.ai-msg,
.app-shell:has(.pm-home) .ai-chat-bubble.ai-msg,
.app-shell:has(.pm-home) .global-ai-chat {
    display: none !important;
}

.portal-ai-history-item:hover .portal-ai-history-del {
    opacity: 1 !important;
}
.portal-ai-history-del:hover {
    color: #ef4444;
}
.portal-ai-mode-btn.is-active {
    background: #eef2ff !important;
    color: #4f46e5 !important;
    border-color: #4f46e5 !important;
}
.portal-ai-mode-btn.is-active svg {
    stroke: #4f46e5 !important;
}
.portal-ai-robot-icon {
    width: 40px !important;
    height: 40px !important;
}

.auth-users-admin {
  display: grid;
  gap: 14px;
}
.auth-users-form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) minmax(160px, 1fr) minmax(120px, 1fr) minmax(120px, 1fr) auto 88px auto;
  gap: 10px;
  align-items: center;
}
.auth-users-input {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(30, 60, 90, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  padding: 7px 9px;
  font-size: 13px;
}
.auth-users-days {
  max-width: 88px;
}
.auth-users-input[multiple] {
  min-height: 58px;
  padding: 5px 7px;
}
.auth-users-input:disabled,
.auth-users-check input:disabled + span {
  opacity: 0.52;
  cursor: not-allowed;
}
.auth-users-input:disabled {
  background: rgba(235, 240, 246, 0.82);
  color: rgba(30, 44, 58, 0.56);
}
.auth-users-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: var(--ink);
  font-size: 13px;
}
.auth-users-check.compact {
  justify-content: center;
}
.auth-users-check.disabled {
  color: rgba(30, 44, 58, 0.48);
  cursor: not-allowed;
}
.auth-users-table-wrap {
  overflow: auto;
}

/* Token 用量看板（大模型配置页，仅管理员可见） */
.token-usage-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.token-usage-kpi {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 12px;
  color: #64748b;
}
.token-usage-kpi b {
  font-size: 15px;
  color: #0f2942;
}
.token-usage-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(520px, 100%), 1fr));
  gap: 48px;
  margin-bottom: 22px;
}
@media (max-width: 960px) {
  .token-usage-charts {
    grid-template-columns: 1fr;
  }
}
.auth-users-table-wrap:has(.settings-perm-tree) {
  max-height: 70vh;
}
.auth-users-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1080px;
  font-size: 13px;
}
.auth-users-table th,
.auth-users-table td {
  border-bottom: 1px solid rgba(30, 60, 90, 0.08);
  padding: 10px 8px;
  text-align: left;
  vertical-align: middle;
}
.auth-users-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  background: rgba(247, 250, 253, 0.72);
}
/* 大模型配置页：修复 grid 子项被宽表格撑出视口导致右侧按钮被裁掉 */
.settings-page > * {
  min-width: 0;
}
.llm-config-table {
  min-width: 0;
  table-layout: fixed;
}
.llm-config-table th,
.llm-config-table td {
  overflow-wrap: anywhere;
}
.llm-config-table code {
  white-space: normal;
  word-break: break-all;
}
.settings-perm-tree tbody tr td:nth-child(2) {
  min-width: 200px;
}
.settings-perm-tree thead {
  position: sticky;
  top: 0;
  z-index: 2;
}
.settings-perm-tree thead tr th {
  background: rgba(247, 250, 253, 0.96);
  box-shadow: 0 1px 0 rgba(30,60,90,0.1);
}
.settings-perm-tree thead tr th:nth-child(3),
.settings-perm-tree tbody tr td:nth-child(3) {
  width: 120px;
}
.settings-perm-tree thead tr th:nth-child(4),
.settings-perm-tree tbody tr td:nth-child(4) {
  width: 70px;
  text-align: center;
}
.settings-perm-tree thead tr th:nth-child(5),
.settings-perm-tree tbody tr td:nth-child(5) {
  min-width: 140px;
}
.settings-perm-tree thead tr th:nth-child(6),
.settings-perm-tree tbody tr td:nth-child(6),
.settings-perm-tree thead tr th:nth-child(7),
.settings-perm-tree tbody tr td:nth-child(7),
.settings-perm-tree thead tr th:nth-child(8),
.settings-perm-tree tbody tr td:nth-child(8),
.settings-perm-tree thead tr th:nth-child(9),
.settings-perm-tree tbody tr td:nth-child(9) {
  width: 56px;
  text-align: center;
}
.settings-perm-tree .perm-tree-indent {
  display: inline-block;
  width: 4px;
  height: 1em;
  margin-right: 2px;
  border-left: 2px solid #d0d8e0;
}
.menu-icon-preview {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  vertical-align: middle;
}
.menu-icon-svg {
  width: 18px;
  height: 18px;
  stroke: var(--ink);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.menu-icon-option {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 8px;
  border: 2px solid transparent; cursor: pointer;
  transition: background 0.15s;
}
.menu-icon-option:hover { background: #e8edf4; }
.menu-icon-option .menu-icon-svg { width: 22px; height: 22px; }
.auth-users-table .settings-menu-group-row td {
  padding-top: 14px;
  padding-bottom: 8px;
  background: rgba(38, 112, 184, 0.08);
  color: var(--navy);
  font-weight: 800;
}
.account-tenant-table {
  min-width: 760px;
}
.account-tenant-table th:last-child,
.account-tenant-table td:last-child {
  width: 240px;
}
.account-tenant-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.account-tenant-table tbody tr:not(.row-default) .hover-visible {
  visibility: hidden;
}
.account-tenant-table tbody tr:not(.row-default):hover .hover-visible {
  visibility: visible;
}
.account-tenant-current {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(38, 112, 184, 0.10);
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.auth-trial-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  background: rgba(38, 112, 184, 0.10);
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
}
.auth-trial-pill.trial {
  background: rgba(21, 128, 61, 0.10);
  color: #15803d;
}
.auth-trial-pill.danger {
  background: rgba(197, 48, 48, 0.10);
  color: #c53030;
}

.settings-page {
  display: grid;
  gap: 16px;
}
.settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid rgba(30, 60, 90, 0.08);
  border-radius: 8px;
  background: #fff;
}
.settings-head h2 {
  margin: 0;
  color: var(--navy);
  font-size: 20px;
  line-height: 1.3;
}
.settings-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.settings-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.settings-inline-form,
.settings-form,
.settings-profile-grid,
.settings-card-block,
.settings-placeholder {
  padding: 16px;
  border: 1px solid rgba(30, 60, 90, 0.08);
  border-radius: 8px;
  background: #fff;
}
.settings-inline-form {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(120px, 1fr) 90px minmax(180px, 1fr);
  gap: 10px;
  align-items: center;
}
.syslog-filter {
  display: flex;
  flex-wrap: wrap;
}
.syslog-filter .auth-users-input {
  width: auto;
}
.syslog-filter [data-role="syslog-source"] {
  width: 190px;
}
.syslog-filter [data-role="syslog-hours"] {
  width: 110px;
}
.syslog-filter [data-role="syslog-keyword"] {
  width: 240px;
}
.settings-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 14px;
}
.settings-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.settings-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}
.settings-profile-grid label,
.settings-profile-grid div {
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(247, 250, 253, 0.8);
}
.settings-profile-grid label {
  display: block;
}
.settings-profile-grid b,
.settings-profile-grid span {
  display: block;
}
.settings-profile-grid b {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}
.settings-profile-grid span {
  color: var(--ink);
  font-size: 14px;
}
.settings-placeholder {
  color: var(--muted);
  line-height: 1.7;
}
.settings-placeholder b {
  display: block;
  margin-bottom: 6px;
  color: var(--navy);
}
.account-menu {
  position: relative;
  padding-bottom: 8px;
  margin-bottom: -8px;
}
.account-menu-button {
  border: 0;
  cursor: pointer;
  font: inherit;
}
.gov-shell .account-menu-button.gov-user-meta {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
}
.gov-shell .account-menu-button.gov-user-meta:hover,
.gov-shell .account-menu:focus-within .account-menu-button.gov-user-meta {
  background: rgba(255, 255, 255, 0.18);
}
.account-menu-panel {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 50;
  min-width: 156px;
  padding: 6px;
  border: 1px solid rgba(30, 60, 90, 0.12);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(9, 30, 55, 0.18);
}
.account-menu:hover .account-menu-panel,
.account-menu:focus-within .account-menu-panel {
  display: grid;
}
.account-menu-panel a,
.account-menu-panel button {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #1f344d;
  font: inherit;
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.account-menu-panel a:hover,
.account-menu-panel button:hover {
  background: rgba(38, 112, 184, 0.08);
  color: var(--accent);
}
@media (max-width: 960px) {
  .auth-users-form {
    grid-template-columns: 1fr 1fr;
  }
  .settings-inline-form,
  .settings-form,
  .settings-profile-grid,
  .settings-menu-form {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .auth-users-form {
    grid-template-columns: 1fr;
  }
  .auth-users-days {
    max-width: none;
  }
}

.settings-menu-form {
  grid-template-columns: 120px 70px 1fr 60px 80px 120px 100px 1fr;
}
.settings-menu-form .btn {
  grid-column: 1 / -1;
  justify-self: end;
  margin-top: 4px;
}

.auth-users-input-static {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 9px;
  font-size: 13px;
  color: var(--muted);
  background: rgba(30, 60, 90, 0.04);
  border-radius: 8px;
  border: 1px solid transparent;
}

.audit-log-table {
  min-width: 1280px;
}
.audit-content-cell {
  min-width: 360px;
  max-width: 620px;
}
.audit-summary {
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.audit-change-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.audit-change-list li {
  display: grid;
  grid-template-columns: 86px minmax(90px, 1fr) 18px minmax(90px, 1fr);
  gap: 6px;
  align-items: start;
  color: var(--muted);
  line-height: 1.45;
}
.audit-change-list.compact li {
  grid-template-columns: 86px minmax(120px, 1fr);
}
.audit-change-list b {
  color: var(--ink);
  font-weight: 700;
}
.audit-change-list span {
  word-break: break-word;
}
.audit-change-list em {
  color: var(--accent);
  font-style: normal;
  text-align: center;
}
.audit-flag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(38, 112, 184, 0.10);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}


/* ── 招商天眼查 (Investment MCP) ── */
.mcp-split {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 14px;
}

.mcp-search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.mcp-search-bar .mcp-input {
  flex: 1;
  min-width: 0;
}

.mcp-input,
.mcp-select {
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  background: #ffffff;
  color: var(--ink);
  transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}

.mcp-input:focus,
.mcp-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(38, 112, 184, 0.08);
}

.mcp-warning {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(204, 138, 21, 0.08);
  border: 1px solid rgba(204, 138, 21, 0.2);
  color: rgba(160, 98, 7, 0.95);
  margin-bottom: 12px;
  font-size: 13px;
}

.mcp-search-source {
  font-size: 12px;
  color: var(--muted, #8a8f98);
  margin: 0 0 8px;
}

.mcp-search-refresh {
  border: none;
  background: none;
  padding: 0;
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}

.mcp-detail-head h4 {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--navy);
  font-weight: 700;
}

.mcp-detail-section {
  margin-bottom: 16px;
}

.mcp-detail-section h5 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}

.mcp-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(30, 60, 90, 0.06);
  font-size: 13px;
}

.mcp-detail-row span {
  color: var(--muted);
}

.thinking {
  color: var(--muted);
  font-size: 13px;
  padding: 12px 0;
  animation: thinking-pulse 1.4s ease-in-out infinite;
}
@keyframes thinking-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.invest-report {
  margin: 14px 0;
  padding: 14px;
  background: rgba(240, 244, 248, 0.5);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.7;
}
.invest-report h1, .invest-report h2, .invest-report h3, .invest-report h4 {
  font-size: 14px;
  color: var(--primary);
  margin: 10px 0 6px;
}
.invest-report p { margin: 6px 0; }
.invest-report ul { padding-left: 18px; margin: 6px 0; }

.invest-promot-grid .card {
  min-width: 0;
}

.invest-promot-grid .table-wrap,
.invest-promot-grid .split,
.invest-promot-grid .sys-quick-grid {
  min-width: 0;
}

@media (max-width: 1180px) {
  .invest-promot-grid {
    grid-template-columns: 1fr;
  }
  .invest-promot-grid .card {
    grid-column: span 1 !important;
  }
  .invest-promot-grid .split {
    grid-template-columns: 1fr;
  }
  .invest-promot-grid .table {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }
  .invest-promot-grid .mcp-search-bar {
    flex-wrap: wrap;
  }
  .invest-promot-grid .mcp-search-bar .mcp-input {
    min-width: 200px;
  }
}

.mcp-pre {
  white-space: pre-wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(240, 244, 248, 0.6);
  padding: 10px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  max-height: 220px;
  overflow: auto;
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .mcp-split {
    grid-template-columns: 1fr;
  }
}

/* Portrait iframe integration */
.portrait-page-wrap {
  width: 100%;
  height: 100%;
  min-height: 0;
}
.portrait-iframe {
  width: 100%;
  height: calc(100vh - 110px);
  border: none;
  display: block;
}

/* AI 回复名字标签（TOG-AI） */
.ai-chat-name {
  font-size: 14px;
  font-weight: 700;
  color: #2670b8;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

/* 等待文字必须保持实色可读，不依赖透明文字与背景裁剪的浏览器组合。 */
.ai-chat-bubble.is-thinking .ai-chat-content {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: #2670b8;
  animation: aiThinkingBreath 1.5s ease-in-out infinite;
}
.ai-chat-bubble.is-thinking .ai-chat-content strong,
.ai-chat-bubble.is-thinking .ai-chat-content p,
.ai-chat-bubble.is-thinking .ai-chat-content span {
  color: inherit;
  -webkit-text-fill-color: currentColor;
}
/* 等待提示用小一号字（2026-11-11 用户反馈字体偏大） */
.ai-chat-bubble.is-thinking .ai-chat-content,
.ai-chat-bubble.is-thinking .ai-chat-content p {
  font-size: 13px;
  line-height: 1.6;
}
@keyframes aiShimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

/* 全局 AI 助手弹窗：表格铺满气泡宽度；窄窗口单元格允许换行（不撑破布局） */
.global-ai-chat .ai-chat-content table,
.global-ai-messages .ai-chat-content table {
  width: 100%;
  table-layout: auto;
}
.global-ai-chat .ai-chat-content th,
.global-ai-chat .ai-chat-content td,
.global-ai-messages .ai-chat-content th,
.global-ai-messages .ai-chat-content td {
  white-space: normal;
  word-break: break-word;
}
/* 通用表样式给前两列设了 white-space: nowrap（:nth-child 优先级更高），窄面板长公司名不换行会把表格撑出气泡被裁掉，这里用更高优先级压回去 */
.global-ai-chat .ai-chat-content table th:nth-child(1),
.global-ai-chat .ai-chat-content table td:nth-child(1),
.global-ai-chat .ai-chat-content table th:nth-child(2),
.global-ai-chat .ai-chat-content table td:nth-child(2),
.global-ai-messages .ai-chat-content table th:nth-child(1),
.global-ai-messages .ai-chat-content table td:nth-child(1),
.global-ai-messages .ai-chat-content table th:nth-child(2),
.global-ai-messages .ai-chat-content table td:nth-child(2) {
  white-space: normal;
  word-break: break-word;
}
.global-ai-chat .ai-chat-content {
  overflow-x: auto;
  word-break: break-word;
}

/* Logged-in AI home: 2026-07 reference layout */
.portal-ai-home.is-reference-home {
  grid-template-columns: 264px minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  background: #f8fafc;
  color: #1e293b;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.portal-ai-home.is-reference-home .portal-ai-sidebar {
  position: relative;
  top: auto;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 0;
  padding: 0 12px 12px;
  overflow: hidden;
  border-right: 1px solid #e2e8f0;
  background: #fff;
}

.portal-ai-home.is-reference-home .ui-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.portal-ai-home.is-reference-home .portal-ai-user {
  flex: 0 0 62px;
  height: 62px;
  gap: 12px;
  padding: 0;
}

.portal-ai-home.is-reference-home .portal-ai-user-avatar {
  width: 36px;
  height: 36px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 13px;
}

.portal-ai-home.is-reference-home .portal-ai-user-text strong {
  color: #334155;
  font-size: 14px;
  font-weight: 500;
}

.portal-ai-home.is-reference-home .portal-ai-collapse {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: #64748b;
}

.portal-ai-home.is-reference-home .portal-ai-collapse-icon,
.portal-ai-home.is-reference-home .portal-ai-top-icon {
  width: 20px;
  height: 20px;
}

.portal-ai-home.is-reference-home .portal-ai-new-chat {
  flex: 0 0 44px;
  height: 44px;
  gap: 8px;
  margin: 0 0 8px;
  padding: 0 16px;
  border-radius: 12px;
  background: #2b5485;
  box-shadow: 0 2px 5px rgba(43, 84, 133, 0.14);
}

.portal-ai-home.is-reference-home .portal-ai-new-chat b {
  font-size: 14px;
  font-weight: 500;
}

.portal-ai-home.is-reference-home .portal-ai-new-chat:hover {
  background: #23466f;
}

.portal-ai-home.is-reference-home .portal-ai-new-chat .portal-ai-new-chat-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: currentColor;
  font-size: initial;
  transform: none;
}

.portal-ai-home.is-reference-home .portal-ai-search {
  flex: 0 0 36px;
  height: 36px;
  margin: 0 0 3px;
  padding: 0 12px;
  border-radius: 8px;
  background: #f1f5f9;
}

.portal-ai-home.is-reference-home .portal-ai-search input {
  font-size: 14px;
}

.portal-ai-home.is-reference-home .portal-ai-history-shell {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.portal-ai-home.is-reference-home .portal-ai-history-title {
  flex: 0 0 auto;
  margin: 12px 8px 7px;
  padding: 2px 0;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
}

.portal-ai-home.is-reference-home .portal-ai-history {
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  min-height: 0;
  max-height: none;
  gap: 2px;
  padding-right: 2px;
  overflow-x: hidden;
  overflow-y: auto;
}

.portal-ai-home.is-reference-home .portal-ai-history-item {
  min-height: 40px;
  padding: 0 10px;
  border-radius: 8px;
  color: #334155;
}

.portal-ai-home.is-reference-home .portal-ai-history-item:hover,
.portal-ai-home.is-reference-home .portal-ai-history-item.is-active {
  background: #f1f5f9;
  color: #2b5485;
}

.portal-ai-home.is-reference-home .portal-ai-history-item b {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}

.portal-ai-home.is-reference-home .portal-ai-history-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: #94a3b8;
}

.portal-ai-home.is-reference-home .portal-ai-history-item:hover .portal-ai-history-icon,
.portal-ai-home.is-reference-home .portal-ai-history-item.is-active .portal-ai-history-icon {
  color: #2b5485;
}

.portal-ai-home.is-reference-home .portal-ai-main {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.portal-ai-home.is-reference-home .portal-ai-topbar {
  flex: 0 0 62px;
  height: 62px;
  padding: 0 24px;
  border-bottom: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.94);
}

.portal-ai-home.is-reference-home .portal-ai-brand {
  gap: 0;
}

.portal-ai-home.is-reference-home .portal-ai-brand strong {
  color: #1e293b;
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
}

.portal-ai-home.is-reference-home .portal-ai-top-actions {
  gap: 4px;
}

.portal-ai-home.is-reference-home .portal-ai-top-action {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: #64748b;
}

.portal-ai-home.is-reference-home .portal-ai-stage {
  width: min(768px, calc(100vw - 312px));
  height: calc(100vh - 62px);
  min-height: 0;
  margin: 0 auto;
  padding: 32px 0;
  justify-content: center;
  overflow: hidden;
}

.portal-ai-home.is-reference-home .portal-ai-hero-logo {
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border: 1px solid rgba(43, 84, 133, 0.22);
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 9px 20px rgba(30, 64, 103, 0.18);
}

.portal-ai-home.is-reference-home .portal-ai-hero h1 {
  color: #1e293b;
  font-size: 30px;
  line-height: 1.3;
  font-weight: 700;
}

.portal-ai-home.is-reference-home .portal-ai-hero h1 span,
.portal-ai-home.is-reference-home .portal-ai-hero h1 strong {
  font: inherit;
}

.portal-ai-home.is-reference-home .portal-ai-hero h1 strong {
  color: #2b5485;
}

.portal-ai-home.is-reference-home .portal-ai-hero > p {
  width: min(560px, 100%);
  margin: 8px auto 32px;
  color: #64748b;
  font-size: 15px;
  line-height: 1.5;
}

.portal-ai-home.is-reference-home .portal-ai-composer {
  min-height: 112px;
  padding: 16px;
  border: 1px solid #dbe4ef;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 41, 66, 0.06);
}

.portal-ai-home.is-reference-home .portal-ai-composer:focus-within {
  border-color: #aac0da;
  box-shadow: 0 10px 26px rgba(43, 84, 133, 0.1);
}

.portal-ai-home.is-reference-home .portal-ai-composer-row {
  margin-top: 12px;
  padding-top: 0;
  border-top: 0;
  gap: 8px;
}

.portal-ai-home.is-reference-home .portal-ai-composer-row button {
  height: 36px;
  min-width: 0;
  padding: 0 14px;
  gap: 6px;
  border-radius: 18px;
  background: #fff;
  color: #536b88;
  font-size: 13px;
  font-weight: 500;
}

.portal-ai-home.is-reference-home .portal-ai-input {
  min-height: 28px;
  max-height: 180px;
  padding: 0;
  font-size: 15px;
  line-height: 24px;
}

.portal-ai-home.is-reference-home .portal-ai-chip-icon {
  width: 16px;
  height: 16px;
}

.portal-ai-home.is-reference-home .portal-ai-composer-row .portal-ai-send {
  background: #2b5485;
  color: #fff;
}

.portal-ai-home.is-reference-home .portal-ai-composer-row .portal-ai-send:hover {
  background: #23466f;
  color: #fff;
}

.portal-ai-home.is-reference-home .portal-ai-section-label {
  width: 144px;
  margin: 28px auto 16px;
  gap: 12px;
  color: #94a3b8;
}

.portal-ai-home.is-reference-home .portal-ai-section-label em {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.portal-ai-home.is-reference-home .portal-ai-feature-grid {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 12px;
}

.portal-ai-home.is-reference-home .portal-ai-feature-row {
  display: grid;
  gap: 12px;
}

.portal-ai-home.is-reference-home .portal-ai-feature-row-primary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.portal-ai-home.is-reference-home .portal-ai-feature-row-secondary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.portal-ai-home.is-reference-home .portal-ai-feature-card {
  height: auto;
  min-height: 116px;
  min-width: 0;
  padding: 16px;
  border-color: #dce5ef;
  border-radius: 16px;
}

.portal-ai-home.is-reference-home .portal-ai-feature-card:hover {
  border-color: #9fb7d1;
  box-shadow: 0 8px 20px rgba(15, 41, 66, 0.08);
}

.portal-ai-home.is-reference-home .portal-ai-feature-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: #edf4fb;
  color: #2b5485;
}

.portal-ai-home.is-reference-home .portal-ai-feature-card strong {
  max-width: 100%;
  color: #1e293b;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.portal-ai-home.is-reference-home .portal-ai-feature-card em {
  max-width: 100%;
  margin-top: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 16px;
  overflow-wrap: anywhere;
}

@media (max-height: 820px) and (min-width: 901px) {
  .portal-ai-home.is-reference-home .portal-ai-stage {
    justify-content: flex-start;
    padding-top: 20px;
    padding-bottom: 14px;
  }

  .portal-ai-home.is-reference-home .portal-ai-hero-logo {
    width: 54px;
    height: 54px;
    margin-bottom: 9px;
    border-radius: 14px;
  }

  .portal-ai-home.is-reference-home .portal-ai-hero h1 {
    font-size: 26px;
  }

  .portal-ai-home.is-reference-home .portal-ai-hero > p {
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.5;
  }

  .portal-ai-home.is-reference-home .portal-ai-composer {
    min-height: 96px;
    padding-top: 11px;
    padding-bottom: 11px;
    border-radius: 20px;
  }

  .portal-ai-home.is-reference-home .portal-ai-composer-row {
    margin-top: 7px;
    padding-top: 0;
  }

  .portal-ai-home.is-reference-home .portal-ai-section-label {
    margin-top: 10px;
    margin-bottom: 8px;
  }

  .portal-ai-home.is-reference-home .portal-ai-feature-grid,
  .portal-ai-home.is-reference-home .portal-ai-feature-row {
    gap: 8px;
  }

  .portal-ai-home.is-reference-home .portal-ai-feature-card {
    height: auto;
    min-height: 88px;
    padding: 8px 6px;
    border-radius: 12px;
  }

  .portal-ai-home.is-reference-home .portal-ai-feature-icon {
    width: 30px;
    height: 30px;
    margin-bottom: 3px;
  }

  .portal-ai-home.is-reference-home .portal-ai-feature-svg {
    width: 16px;
    height: 16px;
  }

  .portal-ai-home.is-reference-home .portal-ai-feature-card strong {
    font-size: 13px;
    line-height: 18px;
  }

  .portal-ai-home.is-reference-home .portal-ai-feature-card em {
    font-size: 11px;
    line-height: 15px;
  }
}

@media (max-width: 900px) {
  .portal-ai-home.is-reference-home {
    display: block;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .portal-ai-home.is-reference-home .portal-ai-sidebar {
    height: auto;
    min-height: 0;
    padding-bottom: 10px;
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
  }

  .portal-ai-home.is-reference-home .portal-ai-history-shell {
    display: none;
  }

  .portal-ai-home.is-reference-home .portal-ai-main,
  .portal-ai-home.is-reference-home .portal-ai-stage {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .portal-ai-home.is-reference-home .portal-ai-stage {
    width: min(768px, calc(100vw - 32px));
    padding: 34px 0 40px;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .portal-ai-home.is-reference-home .portal-ai-user {
    flex-basis: 54px;
    height: 54px;
  }

  .portal-ai-home.is-reference-home .portal-ai-topbar {
    height: 56px;
    padding: 0 16px;
  }

  .portal-ai-home.is-reference-home .portal-ai-brand strong {
    font-size: 22px;
  }

  .portal-ai-home.is-reference-home .portal-ai-stage {
    width: calc(100vw - 24px);
    padding-top: 26px;
  }

  .portal-ai-home.is-reference-home .portal-ai-hero h1 {
    font-size: 25px;
  }

  .portal-ai-home.is-reference-home .portal-ai-composer-row {
    flex-wrap: wrap;
  }

  .portal-ai-home.is-reference-home .portal-ai-composer-spacer {
    display: none;
  }

  .portal-ai-home.is-reference-home .portal-ai-feature-row-primary,
  .portal-ai-home.is-reference-home .portal-ai-feature-row-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-ai-home.is-reference-home .portal-ai-feature-card {
    height: auto;
    min-height: 112px;
    padding: 12px;
  }
}
/* End logged-in AI home reference layout */

/* Logged-in home composer interactions */
.portal-ai-home.is-reference-home .portal-ai-file-input {
  display: none;
}

.portal-ai-home.is-reference-home .portal-ai-attachments {
  display: none;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.portal-ai-home.is-reference-home .portal-ai-attachments.has-files {
  display: flex;
}

.portal-ai-home.is-reference-home .portal-ai-attachment-chip {
  min-width: 0;
  max-width: 242px;
  height: 38px;
  padding: 0 6px 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #d8e4f0;
  border-radius: 8px;
  background: #f8fbfe;
  color: #3f5e80;
}

.portal-ai-home.is-reference-home .portal-ai-attachment-chip-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

.portal-ai-home.is-reference-home .portal-ai-attachment-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.portal-ai-home.is-reference-home .portal-ai-attachment-copy strong {
  overflow: hidden;
  color: #274b73;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-ai-home.is-reference-home .portal-ai-attachment-copy em {
  margin-top: 2px;
  color: #8191a5;
  font-size: 10px;
  font-style: normal;
  white-space: nowrap;
}

.portal-ai-home.is-reference-home .portal-ai-attachment-remove {
  width: 24px;
  height: 24px;
  min-width: 24px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #7b8da3;
  cursor: pointer;
}

.portal-ai-home.is-reference-home .portal-ai-attachment-remove:hover {
  background: #e6eef7;
  color: #2b5485;
}

.portal-ai-home.is-reference-home .portal-ai-attachment-remove-icon {
  width: 14px;
  height: 14px;
}

.portal-ai-home.is-reference-home .portal-ai-composer-row .portal-ai-attachment-btn.is-active,
.portal-ai-home.is-reference-home .portal-ai-composer-row .portal-ai-mode-btn.is-active {
  border-color: #8eaccb !important;
  background: #eaf2fa !important;
  color: #2b5485 !important;
}

.portal-ai-home.is-reference-home .portal-ai-composer-row .portal-ai-mode-btn.is-active svg {
  stroke: currentColor !important;
}

.portal-ai-home.is-reference-home .portal-ai-composer-row button:focus-visible,
.portal-ai-home.is-reference-home .portal-ai-attachment-remove:focus-visible {
  outline: 2px solid #79a4d0;
  outline-offset: 2px;
}
/* End logged-in home composer interactions */

/* Industry graph catalog and full-width graph detail */
.chain-layout.chain-layout-single,
.gov-shell .chain-layout.chain-layout-single {
  grid-template-columns: minmax(0, 1fr);
}

.gov-shell .main:has(> .chain-root) {
  height: 100vh;
  min-height: 0;
  padding-bottom: 20px;
  overflow: hidden;
}

.gov-shell .main > .chain-root {
  flex: 1 1 auto;
  height: auto;
  max-height: none;
  min-height: 0;
}

.gov-shell .main > .chain-root > .chain-layout {
  height: auto;
  min-height: 0;
}

.chain-layout-graph .chain-center {
  border-radius: 8px;
}

.chain-map-head .chain-portrait-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}

.chain-map-head .chain-directory-return {
  color: #245f91;
  font-weight: 800;
  white-space: nowrap;
}

.chain-catalog-main {
  min-width: 0;
  height: 100%;
  overflow: auto;
  border: 1px solid #dbe7f2;
  border-radius: 8px;
  background: #f7fafe;
  box-shadow: 0 10px 28px rgba(31, 74, 112, 0.08);
  scrollbar-gutter: stable;
}

.chain-catalog-toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 96px;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid #dce7f1;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.chain-catalog-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #7892ac;
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.chain-catalog-toolbar h1 {
  margin: 0;
  color: #153b61;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: 0;
}

.chain-catalog-toolbar p {
  margin: 6px 0 0;
  color: #6d8196;
  font-size: 12px;
  line-height: 1.4;
}

.chain-catalog-range {
  width: fit-content;
  margin-top: 10px;
  padding: 3px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid #d6e3ee;
  border-radius: 6px;
  background: #f3f7fa;
}

.chain-catalog-range > span {
  padding: 0 7px;
  color: #7890a6;
  font-size: 10px;
  font-weight: 700;
}

.chain-catalog-range a {
  min-height: 26px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: #55728e;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.chain-catalog-range a:hover {
  background: #e8f1f8;
  color: #2b6598;
}

.chain-catalog-range a.is-active {
  background: #356fa6;
  color: #fff;
  box-shadow: 0 2px 5px rgba(36, 89, 137, 0.16);
}

.chain-catalog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chain-catalog-action {
  height: 34px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #cfdeec;
  border-radius: 6px;
  background: #fff;
  color: #315b84;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.chain-catalog-action:hover {
  border-color: #83a8cd;
  background: #f2f7fc;
}

.chain-catalog-action.primary {
  border-color: #ec9128;
  background: #ec9128;
  color: #fff;
}

.chain-catalog-action.primary:hover {
  border-color: #d97d19;
  background: #d97d19;
}

.chain-catalog-action-icon {
  width: 15px;
  height: 15px;
}

.chain-catalog-action.primary .chain-catalog-action-icon {
  transform: rotate(180deg);
}

.chain-catalog-content {
  padding: 20px 22px 28px;
}

.chain-catalog-group + .chain-catalog-group {
  margin-top: 26px;
}

.chain-catalog-group-head {
  min-height: 38px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #dfe8f1;
}

.chain-catalog-group-head > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.chain-catalog-group-head span {
  color: #7c94aa;
  font-size: 9px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.chain-catalog-group-head h2 {
  margin: 0 0 10px;
  color: #234b73;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0;
}

.chain-catalog-group-head em {
  margin-bottom: 10px;
  color: #7c8fa2;
  font-size: 11px;
  line-height: 1.2;
  font-style: normal;
}

.chain-catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.chain-catalog-card {
  position: relative;
  min-width: 0;
  min-height: 132px;
  padding: 16px 16px 14px 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr auto;
  column-gap: 12px;
  row-gap: 10px;
  overflow: hidden;
  border: 1px solid #dbe6f0;
  border-left: 4px solid #4f86bd;
  border-radius: 8px;
  background: #fff;
  color: #213d5a;
  text-decoration: none;
  box-shadow: 0 5px 16px rgba(34, 75, 112, 0.045);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.chain-catalog-card:hover {
  border-color: #9dbbd7;
  box-shadow: 0 10px 24px rgba(34, 75, 112, 0.11);
  transform: translateY(-2px);
}

.chain-catalog-card.is-placeholder {
  border-style: dashed;
  background: #fbfcfe;
  box-shadow: none;
}

.chain-catalog-card.is-placeholder .chain-catalog-card-copy > span,
.chain-catalog-card.is-placeholder .chain-catalog-card-metrics {
  color: #8799aa;
}

.chain-catalog-card.tone-green {
  border-left-color: #4aa487;
}

.chain-catalog-card.tone-orange {
  border-left-color: #df8a3b;
}

.chain-catalog-card.tone-violet {
  border-left-color: #7d76b6;
}

.chain-catalog-card-index {
  position: absolute;
  top: 14px;
  left: 14px;
  color: #91a5b9;
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
}

.chain-catalog-card-icon {
  position: absolute;
  top: 38px;
  left: 14px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: #eaf3fc;
  color: #3974ad;
}

.tone-green .chain-catalog-card-icon {
  background: #e8f6f1;
  color: #34846b;
}

.tone-orange .chain-catalog-card-icon {
  background: #fff1e3;
  color: #bd6d25;
}

.tone-violet .chain-catalog-card-icon {
  background: #f0eef9;
  color: #6962a2;
}

.chain-status-actions {
  margin-top: 18px;
  display: flex;
  justify-content: center;
}

.chain-status-actions .chain-catalog-action {
  text-decoration: none;
}

.chain-catalog-card-icon .catalog-icon {
  width: 19px;
  height: 19px;
}

.chain-catalog-card-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.chain-catalog-card-copy strong {
  overflow-wrap: anywhere;
  color: #173a5e;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 800;
}

.chain-catalog-card-copy > span {
  margin-top: 4px;
  color: #7b8fa3;
  font-size: 10px;
  line-height: 1.35;
}

.chain-catalog-card-metrics {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #637b91;
  font-size: 11px;
  line-height: 1.2;
}

.chain-catalog-card-metrics strong {
  margin-right: 3px;
  color: #255f96;
  font-size: 15px;
}

.chain-catalog-planned-label {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border: 1px solid #d9e4ee;
  border-radius: 4px;
  background: #f3f7fa;
  color: #71879b;
  font-weight: 700;
}

.chain-catalog-card-open {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  color: #3d70a1;
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
}

.chain-catalog-card-open .catalog-open-icon {
  width: 14px;
  height: 14px;
  transform: rotate(180deg);
}

.chain-domain-group {
  padding: 12px 14px 14px;
  border: 1px solid #d8e5f0;
  border-radius: 8px;
  background: #f2f7fb;
}

.chain-domain-group + .chain-catalog-group {
  margin-top: 22px;
}

.chain-domain-group .chain-catalog-group-head {
  min-height: 30px;
  margin-bottom: 8px;
}

.chain-domain-group .chain-catalog-group-head h2,
.chain-domain-group .chain-catalog-group-head em {
  margin-bottom: 7px;
}

.chain-domain-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.chain-domain-card {
  min-width: 0;
  min-height: 68px;
  padding: 10px 11px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 9px;
  row-gap: 5px;
  border: 1px solid #cfdeeb;
  border-radius: 8px;
  background: #fff;
  color: #244766;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(35, 75, 110, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.chain-domain-card.is-current {
  border-color: #8db5d8;
  background: #f8fcff;
  box-shadow: inset 3px 0 0 #3978af;
}

.chain-domain-card:hover {
  border-color: #7da8cf;
  box-shadow: 0 8px 20px rgba(35, 75, 110, 0.11);
  transform: translateY(-1px);
}

.chain-domain-card-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: #dfeefa;
  color: #3274ad;
}

.chain-domain-card-icon .catalog-domain-icon {
  width: 16px;
  height: 16px;
}

.chain-domain-card-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.chain-domain-card-copy strong {
  overflow-wrap: anywhere;
  color: #173f65;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 800;
}

.chain-domain-card-copy span {
  margin-top: 3px;
  color: #7a90a4;
  font-size: 10px;
}

.chain-domain-card-metrics {
  grid-column: 2 / 4;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #637b91;
  font-size: 10px;
}

.chain-domain-card-metrics strong {
  margin-right: 2px;
  color: #2c679d;
  font-size: 12px;
}

.chain-domain-card-open {
  grid-column: 3;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  color: #386d9d;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.chain-domain-card-open .catalog-open-icon {
  width: 13px;
  height: 13px;
  transform: rotate(180deg);
}

.chain-catalog-empty {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #6b8094;
}

.chain-catalog-empty strong {
  color: #315676;
  font-size: 16px;
}

.chain-catalog-empty a {
  color: #2f6fa8;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 1180px) {
  .chain-catalog-grid,
  .chain-domain-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .chain-catalog-toolbar {
    position: static;
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .chain-catalog-actions {
    justify-content: flex-start;
  }

  .chain-catalog-content {
    padding: 16px;
  }

  .chain-catalog-grid,
  .chain-domain-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* End industry graph catalog */

/* Regional economic geography workbench */
.geo-workbench-root {
  --wb-panel-width: 286px;
  --wb-dashboard-width: 246px;
  --wb-work-gap: 12px;
  --wb-top-filter-height: 52px;
  --wb-floating-panel-top: 76px;
  background: #eef4f9;
}

.geo-workbench-layout {
  position: relative;
  min-height: calc(100vh - 84px);
  height: calc(100vh - 84px);
  padding: 0;
  overflow: hidden;
}

.app-shell .geo-workbench-panel,
.geo-workbench-panel {
  position: absolute;
  z-index: 19;
  top: var(--wb-floating-panel-top);
  bottom: 64px;
  left: 12px;
  width: var(--wb-panel-width);
  max-height: none;
  border: 1px solid #d5e1ec;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(31, 70, 108, 0.14);
  animation: none;
  overflow: visible;
}

.geo-wb-panel-body,
.geo-wb-dashboard-body {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}

.geo-wb-panel-body {
  padding: 16px 12px;
}

.geo-wb-panel-body::-webkit-scrollbar,
.geo-wb-dashboard-body::-webkit-scrollbar {
  width: 5px;
}

.geo-wb-panel-body::-webkit-scrollbar-thumb,
.geo-wb-dashboard-body::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: #bfd0df;
}

.geo-wb-panel-title {
  padding: 0 2px 12px;
  border-bottom: 1px solid #e3ebf2;
}

.geo-wb-panel-title h2 {
  margin: 0;
  color: #173f64;
  font-size: 17px;
  line-height: 1.2;
}

.geo-wb-scope-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 10px 0 2px;
  overflow: hidden;
  border: 1px solid #dbe7f0;
  border-radius: 7px;
  background: #dbe7f0;
}

.geo-wb-scope-card > span {
  min-width: 0;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 8px 10px;
  background: #f4f8fb;
}

.geo-wb-scope-card em {
  color: #8296a8;
  font-size: 8px;
  font-style: normal;
}

.geo-wb-scope-card b {
  overflow: hidden;
  color: #24577f;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-wb-filter-list {
  min-width: 0;
}

.geo-wb-layer-reveal[hidden],
.geo-wb-filter-body[hidden],
.geo-wb-filter-controls[hidden] {
  display: none;
}

.geo-wb-layer-reveal {
  margin-top: 8px;
}

.geo-wb-filter-list {
  margin-top: 2px;
}

.geo-wb-filter-accordion {
  border-bottom: 1px solid #e4ecf3;
  background: transparent;
}

.geo-wb-filter-trigger {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: #315a7f;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.geo-wb-filter-trigger:hover {
  color: #1f659d;
}

.geo-wb-filter-chevron {
  width: 14px;
  height: 14px;
  color: #6f899f;
  transition: transform 0.16s ease;
}

.geo-wb-filter-accordion.is-open .geo-wb-filter-chevron {
  transform: rotate(180deg);
}

.geo-wb-filter-body {
  padding: 0 0 13px;
}

.geo-wb-industry-quick {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 9px;
}

.geo-wb-industry-quick > div {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #496b87;
  font-size: 9px;
}

.geo-wb-industry-quick > div em {
  color: #93a3b0;
  font-size: 8px;
  font-style: normal;
}

.geo-wb-industry-quick button {
  min-width: 0;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid #dce6ee;
  border-radius: 6px;
  background: #f8fafc;
  color: #557086;
  font-size: 9px;
  cursor: pointer;
}

.geo-wb-industry-quick button:hover,
.geo-wb-industry-quick button.is-active {
  border-color: #76a4ca;
  background: #eaf3fb;
  color: #245f93;
}

.geo-wb-industry-quick button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-wb-industry-quick button b {
  flex: 0 0 auto;
  color: #2f779f;
  font-size: 9px;
}

.geo-wb-filter-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 9px;
}

.geo-wb-filter-mode {
  min-width: 0;
  min-height: 32px;
  padding: 0 7px;
  border: 1px solid #d8e4ed;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: #617b90;
  font-size: 9px;
  cursor: pointer;
}

.geo-wb-filter-mode:hover,
.geo-wb-filter-mode.is-active {
  border-color: #7fa9cd;
  background: #eaf3fb;
  color: #245f93;
}

.geo-wb-filter-controls {
  min-width: 0;
}

.geo-wb-section {
  padding: 13px 2px;
  border-bottom: 1px solid #e5edf4;
}

.geo-wb-section h3,
.geo-wb-dashboard-section h3 {
  margin: 0 0 10px;
  color: #365b7d;
  font-size: 12px;
  line-height: 1.2;
}

.geo-wb-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.geo-wb-section-head h3 {
  margin: 0;
}

.geo-wb-section-head > span {
  color: #899cac;
  font-size: 9px;
}

.geo-wb-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.geo-wb-fields label:first-child {
  grid-column: 1 / -1;
}

.geo-wb-fields label,
.geo-wb-style-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.geo-wb-fields label > span,
.geo-wb-style-field > span {
  color: #8294a5;
  font-size: 9px;
}

.geo-wb-fields select,
.geo-wb-wide-select,
.geo-wb-style-field select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 26px 0 9px;
  border: 1px solid #d7e2ec;
  border-radius: 6px;
  background-color: #f9fbfd;
  color: #31536f;
  font-size: 10px;
}

.geo-wb-fields select:focus,
.geo-wb-wide-select:focus,
.geo-wb-style-field select:focus {
  border-color: #6d9cc8;
  outline: 2px solid rgba(64, 125, 180, 0.12);
}

.geo-wb-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.geo-wb-check {
  min-width: 0;
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid #dce6ee;
  border-radius: 6px;
  background: #fafcfd;
  color: #526b80;
  font-size: 10px;
  cursor: pointer;
}

.geo-wb-check:has(input:checked) {
  border-color: #82acd1;
  background: #eaf3fb;
  color: #235f95;
}

.geo-wb-check input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #3474ad;
}

.geo-wb-canvas-filters {
  position: absolute;
  z-index: 18;
  top: 10px;
  right: auto;
  left: 50%;
  width: min(1160px, calc(100% - 24px));
  display: flex;
  align-items: center;
  gap: 0;
  height: var(--wb-top-filter-height);
  min-height: var(--wb-top-filter-height);
  padding: 5px 8px;
  overflow-x: hidden;
  overflow-y: hidden;
  border: 1px solid #d5e1ec;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 18px rgba(31, 70, 108, 0.12);
  transform: translateX(-50%);
}

.geo-wb-canvas-filter-group {
  flex: 4 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border-left: 1px solid #e4ebf2;
}

.geo-wb-canvas-filter-group:first-child {
  padding-left: 0;
  border-left: 0;
}

.geo-wb-canvas-filter-group:last-child {
  flex-grow: 5;
  padding-right: 0;
}

.geo-wb-canvas-filter-group h3 {
  flex: 0 0 auto;
  margin: 0;
  color: #365b7d;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.geo-wb-canvas-options {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.geo-wb-canvas-filters .geo-wb-check {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  min-height: 28px;
  justify-content: flex-start;
  gap: 5px;
  padding: 0 7px;
  background: #fff;
  font-size: 10px;
  white-space: nowrap;
}

.geo-wb-canvas-filters .geo-wb-check span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.geo-wb-canvas-filters .geo-wb-check input {
  width: 13px;
  height: 13px;
}

.geo-wb-layer-section {
  padding-bottom: 9px;
}

.geo-wb-layer-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.geo-wb-layer-card {
  position: relative;
  min-height: 50px;
  padding: 8px;
  border: 1px solid #d8e4ed;
  border-left: 3px solid #6e93b3;
  border-radius: 7px;
  background: #fbfcfd;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.geo-wb-layer-card.enterprise { border-left-color: #3d8ab8; }
.geo-wb-layer-card.metric { border-left-color: #e48a32; }

.geo-wb-layer-card.is-hidden {
  opacity: 0.58;
  background: #f5f7f9;
}

.geo-wb-layer-card.is-selected {
  border-color: #8eb2d0;
  background: #fff;
  box-shadow: 0 4px 12px rgba(37, 86, 127, 0.09);
}

.geo-wb-layer-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.geo-wb-layer-identity {
  min-width: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.geo-wb-layer-identity:hover b,
.geo-wb-layer-identity[aria-pressed="true"] b {
  color: #1f639a;
}

.geo-wb-layer-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #eaf1f7;
  color: #406d94;
}

.geo-wb-layer-card.enterprise .geo-wb-layer-icon {
  background: #e6f2f7;
  color: #2f7fa8;
}

.geo-wb-layer-card.metric .geo-wb-layer-icon {
  background: #fff0df;
  color: #c87526;
}

.geo-wb-layer-svg {
  width: 16px;
  height: 16px;
}

.geo-wb-layer-identity > span:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.geo-wb-layer-identity b {
  overflow: hidden;
  color: #294e6c;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-wb-layer-identity em {
  overflow: hidden;
  margin-top: 2px;
  color: #8497a8;
  font-size: 8px;
  line-height: 1.35;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-wb-layer-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.geo-wb-layer-actions details {
  position: relative;
}

.geo-wb-layer-actions summary,
.geo-wb-layer-eye {
  position: relative;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #72899c;
  font-size: 12px;
  cursor: pointer;
  list-style: none;
}

.geo-wb-layer-actions summary:hover,
.geo-wb-layer-eye:hover,
.geo-wb-layer-eye.is-active {
  background: #eaf2f8;
  color: #2d6594;
}

.geo-wb-layer-eye:not(.is-active)::after {
  content: "";
  position: absolute;
  width: 17px;
  height: 1px;
  background: currentColor;
  transform: rotate(-42deg);
}

.geo-wb-layer-actions summary::-webkit-details-marker {
  display: none;
}

.geo-wb-layer-entry-actions {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e2eaf1;
}

.geo-wb-layer-card.is-selected .geo-wb-layer-entry-actions {
  display: grid;
}

.geo-wb-layer-entry-actions button {
  min-width: 0;
  min-height: 31px;
  padding: 0 7px;
  border: 1px solid #cfdeea;
  border-radius: 5px;
  background: #f7fafc;
  color: #456b8b;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.geo-wb-layer-entry-actions button:hover,
.geo-wb-layer-entry-actions button[aria-pressed="true"] {
  border-color: #6f9fc7;
  background: #eaf3fa;
  color: #245f93;
}

.geo-wb-layer-pane {
  display: none;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e5edf3;
}

.geo-wb-layer-card.is-selected.is-pane-detail .geo-wb-layer-detail-pane {
  display: block;
}

.geo-wb-layer-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-top: 0;
}

.geo-wb-layer-card.enterprise .geo-wb-layer-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.geo-wb-layer-control {
  min-width: 0;
  min-height: 29px;
  padding: 0 4px;
  border: 1px solid #d8e3ec;
  border-radius: 5px;
  background: #fff;
  color: #647e93;
  font-size: 8px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.geo-wb-layer-control:hover {
  border-color: #8fb3d0;
  color: #2e6592;
}

.geo-wb-layer-control.is-active {
  border-color: #78a8ce;
  background: #eaf3fa;
  color: #225f92;
}

.geo-wb-layer-copy-count {
  display: block;
  margin-top: 5px;
  color: #8498a9;
  font-size: 8px;
  text-align: right;
}

.geo-wb-layer-menu {
  position: absolute;
  z-index: 30;
  top: 33px;
  right: 0;
  width: 106px;
  padding: 4px;
  border: 1px solid #d6e1ea;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(24, 56, 87, 0.16);
}

.geo-wb-layer-menu button {
  width: 100%;
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #49657d;
  text-align: left;
  font-size: 10px;
  cursor: pointer;
}

.geo-wb-layer-menu button:hover {
  background: #eef4f8;
  color: #245f93;
}

.geo-wb-style-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 14px;
}

.geo-wb-style-field input[type="color"] {
  width: 100%;
  height: 36px;
  padding: 4px;
  border: 1px solid #d7e2ec;
  border-radius: 6px;
  background: #fff;
}

.geo-wb-style-range {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  align-items: center;
  gap: 8px;
}

.geo-wb-style-range input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: #3474ad;
}

.geo-wb-style-range output {
  color: #45657f;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.geo-wb-style-toggle {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid #d7e2ec;
  border-radius: 6px;
  background: #fff;
}

.geo-wb-style-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #3474ad;
}

.geo-wb-style-toggle em {
  color: #45657f;
  font-size: 12px;
  font-style: normal;
}

.geo-wb-style-modal {
  position: fixed;
  z-index: 1600;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.geo-wb-style-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(18, 40, 61, 0.52);
  cursor: default;
}

.geo-wb-style-dialog {
  position: relative;
  z-index: 1;
  width: min(880px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #cfdae4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(16, 42, 65, 0.28);
}

.geo-wb-style-dialog-head {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 18px;
  border-bottom: 1px solid #e3eaf0;
}

.geo-wb-style-dialog-head > div {
  min-width: 0;
}

.geo-wb-style-dialog-head span {
  display: block;
  color: #7d91a3;
  font-size: 10px;
  font-weight: 800;
}

.geo-wb-style-dialog-head h2 {
  margin: 2px 0 0;
  color: #183a58;
  font-size: 20px;
  line-height: 1.25;
}

.geo-wb-style-dialog-head p {
  margin: 4px 0 0;
  color: #7a8fa1;
  font-size: 12px;
}

.geo-wb-style-dialog-close {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #f2f6f9;
  color: #6f8496;
  font-size: 24px;
  cursor: pointer;
}

.geo-wb-style-dialog-close:hover {
  background: #e8f0f6;
  color: #245f93;
}

.geo-wb-style-mode-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid #e3eaf0;
  background: #f7fafc;
}

.geo-wb-style-mode-card {
  min-width: 0;
  min-height: 94px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  padding: 7px;
  border: 1px solid #d8e3ec;
  border-radius: 7px;
  background: #fff;
  color: #45647e;
  cursor: pointer;
}

.geo-wb-style-mode-card:hover {
  border-color: #8cb2d0;
}

.geo-wb-style-mode-card.is-active {
  border-color: #3474ad;
  background: #edf5fb;
  color: #1f5d90;
  box-shadow: inset 0 0 0 1px rgba(52, 116, 173, 0.12);
}

.geo-wb-style-mode-card b {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-wb-thumb-map,
.geo-wb-thumb-heat,
.geo-wb-thumb-honey,
.geo-wb-thumb-bars {
  position: relative;
  height: 53px;
  overflow: hidden;
  border-radius: 5px;
  background: #e9f1f6;
}

.geo-wb-thumb-map::before,
.geo-wb-thumb-map::after {
  content: "";
  position: absolute;
  width: 78px;
  height: 2px;
  background: #fff;
  transform: rotate(-24deg);
}

.geo-wb-thumb-map::before {
  top: 17px;
  left: -7px;
}

.geo-wb-thumb-map::after {
  right: -8px;
  bottom: 14px;
  transform: rotate(19deg);
}

.geo-wb-thumb-map i {
  position: absolute;
  z-index: 1;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #2d78ca;
  box-shadow: 0 1px 3px rgba(19, 65, 105, 0.22);
}

.geo-wb-thumb-map i:nth-child(1) { top: 10px; left: 22%; }
.geo-wb-thumb-map i:nth-child(2) { top: 28px; left: 52%; }
.geo-wb-thumb-map i:nth-child(3) { top: 12px; right: 15%; }

.geo-wb-thumb-heat {
  background:
    radial-gradient(circle at 30% 62%, rgba(245, 55, 45, 0.94) 0 8%, rgba(250, 207, 64, 0.78) 18%, rgba(49, 211, 151, 0.45) 32%, transparent 51%),
    radial-gradient(circle at 70% 35%, rgba(245, 55, 45, 0.9) 0 7%, rgba(250, 207, 64, 0.75) 17%, rgba(49, 211, 151, 0.42) 31%, transparent 50%),
    #e9f1f6;
}

.geo-wb-thumb-honey {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.geo-wb-thumb-honey i {
  width: 27px;
  height: 31px;
  display: grid;
  place-items: center;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: #42a6df;
}

.geo-wb-thumb-honey i:nth-child(2),
.geo-wb-thumb-honey i:nth-child(4) {
  background: #36c6a6;
  transform: translateY(9px);
}

.geo-wb-thumb-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
}

.geo-wb-thumb-bars i {
  width: 15px;
  border-radius: 3px 3px 0 0;
  background: #3189c9;
}

.geo-wb-thumb-bars i:nth-child(1) { height: 44%; }
.geo-wb-thumb-bars i:nth-child(2) { height: 82%; background: #28b8c8; }
.geo-wb-thumb-bars i:nth-child(3) { height: 61%; }
.geo-wb-thumb-bars i:nth-child(4) { height: 92%; background: #28b8c8; }

.geo-wb-style-dialog-main {
  min-height: 330px;
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(360px, 1.15fr);
  gap: 18px;
  padding: 18px;
  overflow: auto;
}

.geo-wb-style-preview,
.geo-wb-style-settings {
  min-width: 0;
}

.geo-wb-style-preview {
  display: flex;
  flex-direction: column;
  padding: 14px;
  border: 1px solid #dce6ee;
  border-radius: 7px;
  background: #f7fafc;
}

.geo-wb-style-preview-head,
.geo-wb-style-settings-head {
  min-height: 36px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.geo-wb-style-preview-head b,
.geo-wb-style-settings-head h3 {
  margin: 0;
  color: #294f6d;
  font-size: 14px;
}

.geo-wb-style-preview-head span {
  color: #2f71a7;
  font-size: 12px;
  font-weight: 700;
}

.geo-wb-style-preview-stage {
  min-height: 216px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d8e3ec;
  border-radius: 6px;
  background: #eaf1f6;
}

.geo-wb-style-preview > p {
  margin: 10px 0 0;
  color: #72889a;
  font-size: 12px;
  line-height: 1.55;
}

.geo-wb-style-preview-map {
  position: relative;
  width: 100%;
  height: 216px;
  overflow: hidden;
  background-color: #e9f1f6;
}

.geo-wb-style-preview-map::before,
.geo-wb-style-preview-map::after {
  content: "";
  position: absolute;
  width: 120%;
  height: 3px;
  background: rgba(255, 255, 255, 0.92);
  transform: rotate(-20deg);
}

.geo-wb-style-preview-map::before { top: 64px; left: -25%; }
.geo-wb-style-preview-map::after { right: -23%; bottom: 55px; transform: rotate(17deg); }

.geo-wb-style-preview-map.is-point .line {
  position: absolute;
  width: 2px;
  height: 260px;
  background: rgba(255, 255, 255, 0.72);
}

.geo-wb-style-preview-map.is-point .line.one { top: -18px; left: 34%; transform: rotate(29deg); }
.geo-wb-style-preview-map.is-point .line.two { top: -24px; right: 27%; transform: rotate(-18deg); }

.geo-wb-style-preview-map.is-point .marker {
  position: absolute;
  z-index: 2;
  width: var(--preview-size);
  height: var(--preview-size);
  border: 4px solid #fff;
  border-radius: 50% 50% 50% 10%;
  background: var(--preview-color);
  box-shadow: 0 3px 9px rgba(23, 61, 94, 0.24);
  transform: rotate(-45deg);
}

.geo-wb-style-preview-map.is-point .marker.one { top: 34px; left: 24%; }
.geo-wb-style-preview-map.is-point .marker.two { top: 94px; left: 55%; }
.geo-wb-style-preview-map.is-point .marker.three { right: 18%; bottom: 28px; }

.geo-wb-style-preview-map.is-point .label {
  position: absolute;
  z-index: 3;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.92);
  color: #345874;
  font-size: 10px;
}

.geo-wb-style-preview-map.is-point .label.one { top: 74px; left: 18%; }
.geo-wb-style-preview-map.is-point .label.two { right: 11%; bottom: 17px; }

.geo-wb-style-preview-map.is-heat {
  opacity: var(--preview-opacity);
  background-color: #e9f1f6;
}

.geo-wb-style-preview-map.is-heat .heat {
  position: absolute;
  width: calc(var(--preview-radius) * 3.2);
  height: calc(var(--preview-radius) * 3.2);
  border-radius: 50%;
  background: radial-gradient(circle, #ef3f34 0 11%, #f7c83e 24%, #35d29b 43%, rgba(48, 139, 215, 0.25) 66%, transparent 74%);
}

.geo-wb-style-preview-map.is-heat.is-ocean .heat {
  background: radial-gradient(circle, #20b8d5 0 14%, #42d7c3 31%, rgba(51, 119, 205, 0.36) 58%, transparent 74%);
}

.geo-wb-style-preview-map.is-heat.is-warm .heat {
  background: radial-gradient(circle, #e94734 0 14%, #f49434 31%, rgba(250, 205, 61, 0.42) 58%, transparent 74%);
}

.geo-wb-style-preview-map.is-heat .heat.one { top: 18px; left: 13%; }
.geo-wb-style-preview-map.is-heat .heat.two { top: 78px; left: 45%; }
.geo-wb-style-preview-map.is-heat .heat.three { right: 5%; bottom: 2px; }

.geo-wb-style-preview-map.is-honeycomb {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3px;
  padding: 32px;
}

.geo-wb-style-preview-map.is-honeycomb span {
  width: var(--preview-cell);
  height: calc(var(--preview-cell) * 1.12);
  display: grid;
  place-items: center;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: color-mix(in srgb, var(--preview-color) calc(var(--preview-opacity) * 100%), transparent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  outline: 1px solid var(--preview-border);
}

.geo-wb-style-preview-map.is-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 18px;
  padding: 28px 30px 25px;
}

.geo-wb-style-preview-map.is-bars span {
  position: relative;
  z-index: 2;
  width: var(--preview-width);
  max-width: 42px;
  border-radius: 4px 4px 0 0;
  background: var(--preview-color);
  opacity: var(--preview-opacity);
  box-shadow: 7px 7px 0 rgba(31, 72, 108, 0.12);
}

.geo-wb-style-settings-head {
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e3eaf0;
}

.geo-wb-style-settings-head p {
  margin: 1px 0 0;
  color: #8798a8;
  font-size: 11px;
}

.geo-wb-style-settings-panel[hidden] {
  display: none;
}

.geo-wb-style-dialog .geo-wb-style-field > span:first-child {
  color: #5a748b;
  font-size: 11px;
  font-weight: 700;
}

.geo-wb-style-dialog .geo-wb-style-field select {
  height: 36px;
  font-size: 12px;
}

.geo-wb-style-dialog-foot {
  min-height: 64px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid #e3eaf0;
  background: #f7fafc;
}

.geo-wb-style-dialog-foot button {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid #cfdae4;
  border-radius: 6px;
  background: #fff;
  color: #45657f;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.geo-wb-style-dialog-foot button:hover {
  border-color: #7ba6c8;
  color: #245f93;
}

.geo-wb-style-dialog-foot .geo-wb-style-reset-mode {
  background: transparent;
}

.geo-wb-style-dialog-foot button.primary {
  border-color: #2f6fa7;
  background: #2f6fa7;
  color: #fff;
}

.geo-wb-style-dialog-foot button.primary:hover {
  border-color: #245d8f;
  background: #245d8f;
  color: #fff;
}

@media (max-width: 760px) {
  .geo-wb-style-modal {
    padding: 10px;
  }

  .geo-wb-style-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .geo-wb-style-mode-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .geo-wb-style-dialog-main {
    grid-template-columns: 1fr;
  }

  .geo-wb-style-preview-stage,
  .geo-wb-style-preview-map {
    min-height: 180px;
    height: 180px;
  }

  .geo-wb-style-dialog-foot {
    grid-template-columns: 1fr 1fr;
  }

  .geo-wb-style-dialog-foot > span {
    display: none;
  }

  .geo-wb-style-dialog-foot .geo-wb-style-reset-mode {
    grid-column: 1 / -1;
  }
}

.geo-wb-reset {
  width: 100%;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  border: 1px solid #d4e0ea;
  border-radius: 6px;
  background: #f7fafc;
  color: #45637c;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.geo-wb-reset:hover {
  border-color: #8eb1d0;
  background: #edf5fb;
  color: #225f95;
}

.geo-wb-inline-icon,
.geo-wb-toggle-icon {
  width: 15px;
  height: 15px;
}

.geo-wb-panel-toggle {
  position: absolute;
  z-index: 24;
  top: 12px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #d4e0ea;
  border-radius: 6px;
  background: #fff;
  color: #396b98;
  box-shadow: 0 3px 10px rgba(28, 66, 101, 0.12);
  cursor: pointer;
}

.geo-wb-panel-toggle.left { right: -39px; }
.geo-wb-panel-toggle.right { left: -39px; }

.app-shell .geo-workbench-dashboard,
.geo-workbench-dashboard {
  position: absolute;
  z-index: 19;
  top: var(--wb-floating-panel-top);
  right: 12px;
  bottom: 128px;
  width: var(--wb-dashboard-width);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: none;
  overflow: visible;
}

.geo-wb-dashboard-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
}

.geo-wb-dashboard-card {
  padding: 14px 12px;
  border: 1px solid #d5e1ec;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(31, 70, 108, 0.14);
}

.geo-wb-dashboard-card .geo-wb-panel-title {
  padding-right: 2px;
  padding-left: 2px;
}

.geo-wb-stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: 12px;
}

.geo-wb-stat-grid article {
  min-height: 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 8px;
  padding: 10px 11px;
  border: 1px solid #dfe8ef;
  border-radius: 7px;
  background: #f8fafc;
}

.geo-wb-stat-grid article > span {
  color: #708498;
  font-size: 12px;
  font-weight: 600;
}

.geo-wb-stat-grid article > b {
  grid-row: 1 / 3;
  grid-column: 2;
  color: #225b8f;
  font-size: 16px;
  text-align: right;
  white-space: nowrap;
}

.geo-wb-stat-grid article > em {
  color: #8b9baa;
  font-size: 8px;
  font-style: normal;
}

.geo-wb-dashboard-section {
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid #e3ebf2;
}

.geo-wb-dashboard-section p {
  margin: 0;
  color: #728698;
  font-size: 9px;
  line-height: 1.65;
}

.geo-wb-breakdown {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  color: #60778b;
  font-size: 9px;
}

.geo-wb-breakdown i {
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: #e7edf2;
}

.geo-wb-breakdown i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #4d8bbf;
}

.geo-wb-breakdown em {
  color: #315f88;
  font-style: normal;
  text-align: right;
}

.geo-wb-market-summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding: 9px 10px;
  border: 1px solid #dfe8ef;
  border-radius: 7px;
  background: #f8fafc;
}

.geo-wb-market-summary span {
  color: #708498;
  font-size: 9px;
}

.geo-wb-market-summary b {
  color: #225b8f;
  font-size: 16px;
  white-space: nowrap;
}

.geo-wb-dashboard-breakdowns {
  margin-top: 9px;
}

.geo-workbench-root .geo-wb-map-wrap {
  inset: 0;
  display: block;
  z-index: 2;
  overflow: hidden;
  border: 1px solid #d2dee8;
  border-radius: 8px;
  background: #edf3f8;
  box-shadow: 0 4px 16px rgba(31, 70, 108, 0.07);
}

.geo-workbench-root .geo-map-head,
.geo-workbench-root .geo-data-board,
.geo-workbench-root .geo-bottom-drawer,
.geo-workbench-root .geo-map-legend {
  display: none !important;
}

.geo-workbench-root .geo-map-stage {
  min-height: 0;
  height: 100%;
  border-radius: 8px;
}

.geo-workbench-root .geo-map-stage::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 51px;
  border-top: 1px solid #d7e2eb;
  background: rgba(255, 255, 255, 0.96);
  z-index: 10;
  pointer-events: none;
}

.geo-workbench-root .geo-map-viewport {
  bottom: 52px;
  border-radius: 8px 8px 0 0;
}

.geo-workbench-root .geo-map-controls {
  top: auto;
  right: auto;
  bottom: 7px;
  left: 50%;
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid #d4e0ea;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(34, 73, 108, 0.1);
  transform: translateX(-50%);
}

.geo-workbench-root .geo-map-controls button {
  width: 42px;
  height: 36px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #315f88;
  box-shadow: none;
  font-size: 16px;
  backdrop-filter: none;
}

.geo-workbench-root .geo-map-controls button:hover {
  border-color: transparent;
  background: #edf4fa;
  color: #1f5586;
  box-shadow: none;
  transform: none;
}

.geo-workbench-root .geo-map-controls button:active {
  background: #e1edf7;
  box-shadow: none;
  transform: translateY(1px);
}

.geo-workbench-root .geo-map-controls [data-action="geo_zoom_out"] { order: 1; }
.geo-workbench-root .geo-map-controls [data-action="geo_zoom_reset"] { order: 2; }
.geo-workbench-root .geo-map-controls [data-action="geo_zoom_in"] { order: 3; }
.geo-workbench-root .geo-map-controls [data-action="geo_fullscreen"] {
  order: 4;
  margin-left: 2px;
  border-left: 1px solid #d7e2eb;
  border-radius: 0 5px 5px 0;
}

.geo-workbench-root .geo-map-scale {
  right: 12px;
  bottom: 64px;
}

.geo-workbench-root .geo-zoom-badge {
  top: auto;
  right: 12px;
  bottom: 96px;
}

.geo-workbench-root .geo-map-stage:fullscreen .geo-map-controls {
  top: auto;
  right: auto;
  bottom: 7px;
  left: 50%;
}

.geo-workbench-root .geo-map-stage:fullscreen .geo-map-scale {
  bottom: 64px;
}

.geo-workbench-root .geo-density-canvas {
  opacity: var(--wb-heat-opacity);
  filter: blur(var(--wb-heat-blur));
}

.geo-workbench-root.wb-heat-ocean .geo-density-canvas {
  filter: blur(var(--wb-heat-blur)) hue-rotate(38deg) saturate(0.9);
}

.geo-workbench-root.wb-heat-warm .geo-density-canvas {
  filter: blur(var(--wb-heat-blur)) hue-rotate(-35deg) saturate(1.2);
}

.geo-workbench-root .geo-db-location-dot,
.geo-workbench-root .geo-entity-dot {
  width: var(--wb-point-size);
  height: var(--wb-point-size);
  background: var(--wb-point-color);
}

.geo-workbench-root.wb-point-dot .geo-marker-svg {
  display: none;
}

.geo-workbench-root.wb-point-dot .geo-db-location-dot::after,
.geo-workbench-root.wb-point-dot .geo-entity-dot::after {
  width: 7px;
  height: 7px;
  display: block;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.geo-workbench-root.wb-point-no-label .geo-entity-card {
  display: none !important;
}

.geo-workbench-root.wb-mode-point .geo-density-canvas,
.geo-workbench-root.wb-mode-honeycomb .geo-density-canvas,
.geo-workbench-root.wb-mode-bar3d .geo-density-canvas {
  display: none !important;
}

.geo-workbench-root.wb-hide-region .geo-boundary-svg,
.geo-workbench-root.wb-hide-region .geo-city-mask-outline,
.geo-workbench-root.wb-hide-region .geo-focus-dim-svg {
  display: none !important;
}

.geo-workbench-root.wb-hide-enterprise .geo-layer-enterprise,
.geo-workbench-root.wb-hide-metric .geo-density-canvas,
.geo-workbench-root.wb-hide-metric .geo-wb-hex,
.geo-workbench-root.wb-hide-metric .geo-wb-bar,
.geo-workbench-root.wb-hide-building .geo-layer-carrier.geo-carrier-building,
.geo-workbench-root.wb-hide-factory .geo-layer-carrier.geo-carrier-factory {
  display: none !important;
}

.geo-wb-hex,
.geo-wb-bar {
  position: absolute;
  z-index: 7;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.geo-wb-hex {
  width: clamp(40px, var(--wb-hex-size), 122px);
  aspect-ratio: 1.15;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--wb-hex-border);
  background: var(--wb-hex-color);
  opacity: var(--wb-hex-opacity);
  clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%);
  color: #fff;
  filter: drop-shadow(0 3px 5px rgba(24, 55, 82, 0.18));
  transform: translate(-50%, -50%) scale(var(--wb-hex-scale));
}

.geo-wb-panel-toggle.points-right .geo-wb-toggle-icon {
  transform: rotate(180deg);
}

.geo-wb-hex b {
  font-size: 11px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.geo-wb-bar {
  width: var(--wb-bar-width);
  height: var(--wb-bar-height);
  transform: translate(-50%, -100%);
}

.geo-wb-bar i {
  position: absolute;
  inset: 0;
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--wb-bar-color) 72%, #102f4d), var(--wb-bar-color) 48%, color-mix(in srgb, var(--wb-bar-color) 80%, #fff));
  opacity: var(--wb-bar-opacity);
  box-shadow: 5px 6px 10px rgba(26, 55, 83, 0.18);
  transform: skewY(-5deg);
  transform-origin: bottom;
}

.geo-wb-bar b,
.geo-wb-bar em {
  position: absolute;
  left: calc(100% + 7px);
  width: 116px;
  padding: 2px 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.9);
  color: #31536f;
  font-size: 9px;
  font-style: normal;
  white-space: nowrap;
}

.geo-wb-bar b { top: 2px; }
.geo-wb-bar em { top: 20px; color: #6a8094; }

.geo-wb-map-note {
  position: absolute;
  z-index: 22;
  left: 50%;
  bottom: 68px;
  max-width: 420px;
  padding: 8px 12px;
  border: 1px solid #d7e2eb;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  color: #657b8f;
  font-size: 10px;
  transform: translateX(-50%);
}

.geo-wb-map-status {
  position: absolute;
  z-index: 17;
  bottom: 64px;
  left: calc(var(--wb-panel-width) + 24px);
  max-width: calc(100% - var(--wb-panel-width) - var(--wb-dashboard-width) - 60px);
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(204, 218, 231, 0.94);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 18px rgba(31, 70, 108, 0.12);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.geo-wb-map-status > span {
  min-width: 82px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 8px 11px;
  border-left: 1px solid #e4ebf2;
}

.geo-wb-map-status > span:first-child {
  min-width: 104px;
  border-left: 0;
}

.geo-wb-map-status em {
  color: #8294a5;
  font-size: 8px;
  font-style: normal;
  line-height: 1.2;
}

.geo-wb-map-status b {
  overflow: hidden;
  color: #28577f;
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-workbench-root.wb-left-collapsed .geo-wb-map-status {
  left: 62px;
}

.geo-workbench-root.wb-right-collapsed .geo-wb-map-status {
  max-width: calc(100% - var(--wb-panel-width) - 98px);
}

.geo-workbench-root.wb-left-collapsed.wb-right-collapsed .geo-wb-map-status {
  max-width: calc(100% - 124px);
}

.geo-workbench-panel.is-collapsed,
.geo-workbench-dashboard.is-collapsed {
  width: 38px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.geo-workbench-panel.is-collapsed .geo-wb-panel-body,
.geo-workbench-dashboard.is-collapsed .geo-wb-dashboard-body {
  display: none;
}

@media (max-width: 1280px) {
  .geo-workbench-root {
    --wb-panel-width: 250px;
    --wb-dashboard-width: 220px;
    --wb-work-gap: 8px;
  }
}

@media (max-width: 980px) {
  .geo-workbench-layout {
    height: auto;
    min-height: calc(100vh - 84px);
    overflow: visible;
    padding: 10px;
  }

  .app-shell .geo-workbench-panel,
  .geo-workbench-panel,
  .app-shell .geo-workbench-dashboard,
  .geo-workbench-dashboard {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    max-width: none;
    margin-bottom: 10px;
  }

  .geo-workbench-panel.is-collapsed,
  .geo-workbench-dashboard.is-collapsed {
    width: 100%;
    min-height: 38px;
  }

  .geo-wb-panel-toggle.left,
  .geo-wb-panel-toggle.right {
    top: 4px;
    right: 4px;
    left: auto;
  }

  .geo-wb-canvas-filters {
    position: relative;
    inset: auto;
    width: 100%;
    margin-bottom: 10px;
    transform: none;
  }

  .geo-wb-map-status {
    display: none;
  }

  .geo-workbench-root .geo-wb-map-wrap {
    position: relative;
    inset: auto !important;
    height: 64vh;
    min-height: 520px;
    margin-bottom: 10px;
  }

  .geo-wb-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .geo-wb-fields,
  .geo-wb-check-grid,
  .geo-wb-style-grid,
  .geo-wb-stat-grid {
    grid-template-columns: 1fr;
  }

}

/* Video-inspired map cockpit: keep the system's light visual language. */
.geo-workbench-root {
  --wb-panel-width: 276px;
  --wb-dashboard-width: 282px;
  --wb-top-filter-height: 48px;
  --wb-floating-panel-top: 70px;
}

.geo-workbench-root .geo-map-viewport {
  transition: transform 0.26s ease;
}

.geo-workbench-dashboard {
  bottom: 64px !important;
  overflow: visible !important;
  border: 1px solid #d5e1ec !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 8px 24px rgba(31, 70, 108, 0.14) !important;
}

.geo-workbench-dashboard.is-collapsed {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

.geo-wb-dashboard-body {
  gap: 0;
  padding: 14px 12px 12px;
}

.geo-wb-dashboard-title {
  padding: 0 2px 12px;
  border-bottom: 1px solid #e1e9f0;
}

.geo-wb-dashboard-title > span,
.geo-wb-dashboard-heading > span {
  color: #7d96ac;
  font-size: 8px;
  font-weight: 800;
}

.geo-wb-dashboard-title h2 {
  margin: 3px 0;
  color: #173f64;
  font-size: 17px;
}

.geo-wb-dashboard-title p {
  margin: 0;
  color: #8396a7;
  font-size: 9px;
}

.geo-wb-dashboard-card {
  padding: 13px 2px;
  border: 0;
  border-bottom: 1px solid #e4ebf2;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.geo-wb-dashboard-card:last-child {
  border-bottom: 0;
}

.geo-workbench-dashboard.is-compact {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.geo-workbench-dashboard.is-compact .geo-wb-dashboard-body {
  gap: 10px;
  max-height: 100%;
  padding: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.geo-workbench-dashboard.is-compact .geo-wb-dashboard-card {
  padding: 14px 12px;
  border: 1px solid #d5e1ec;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(31, 70, 108, 0.14);
}

.geo-workbench-dashboard.is-compact .geo-wb-dashboard-card:last-child {
  border-bottom: 1px solid #d5e1ec;
}

.geo-wb-dashboard-heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  padding-left: 8px;
  border-left: 3px solid #3d7db4;
}

.geo-wb-dashboard-heading h3 {
  margin: 0;
  color: #2c5579;
  font-size: 12px;
}

.geo-wb-overview-hero {
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: end;
  gap: 2px 8px;
  margin-bottom: 6px;
  padding: 12px;
  border-radius: 7px;
  background: #315f8d;
  color: #fff;
}

.geo-wb-overview-hero > span {
  align-self: start;
  color: #dce9f4;
  font-size: 9px;
}

.geo-wb-overview-hero > b {
  grid-column: 1 / -1;
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

.geo-wb-overview-hero > b em {
  margin-left: 4px;
  color: #dce9f4;
  font-size: 9px;
  font-style: normal;
  font-weight: 500;
}

.geo-wb-overview-hero > i {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  color: #c9e5d9;
  font-size: 8px;
  font-style: normal;
  white-space: nowrap;
}

.geo-wb-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.geo-wb-overview-grid article {
  min-width: 0;
  min-height: 62px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 7px;
  border: 1px solid #e0e8ef;
  border-radius: 6px;
  background: #f7fafc;
}

.geo-wb-overview-grid article span,
.geo-wb-overview-grid article em {
  overflow: hidden;
  color: #7a8e9f;
  font-size: 8px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-wb-overview-grid article b {
  overflow: hidden;
  color: #245f93;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-wb-industry-summary {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.geo-wb-industry-donut {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.geo-wb-industry-donut > span {
  width: 54px;
  height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px #edf2f6;
}

.geo-wb-industry-donut b {
  color: #245f93;
  font-size: 15px;
  line-height: 1.1;
}

.geo-wb-industry-donut em {
  color: #8295a5;
  font-size: 7px;
  font-style: normal;
}

.geo-wb-industry-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.geo-wb-industry-list > div {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(52px, 1fr) 36px 20px;
  align-items: center;
  gap: 7px;
  color: #61798d;
  font-size: 9px;
}

.geo-wb-industry-list > div {
  padding-left: 7px;
  border-left: 3px solid var(--wb-industry-color, #3979ad);
}

.geo-wb-industry-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-wb-industry-list i {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5edf3;
}

.geo-wb-industry-list i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3c80b8, #62a99b);
}

.geo-wb-industry-list em {
  color: #315f88;
  font-style: normal;
  text-align: right;
}

.geo-wb-region-detail {
  margin: 0;
}

.geo-wb-region-live {
  min-height: 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 4px 8px;
  margin-bottom: 7px;
  padding: 10px 11px;
  border: 1px solid #d8e7ef;
  border-radius: 7px;
  background: #edf6f4;
}

.geo-wb-region-live > span {
  color: #59817a;
  font-size: 8px;
}

.geo-wb-region-live > b {
  grid-row: 2;
  overflow: hidden;
  color: #235b55;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-wb-region-live > em {
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  color: #65847f;
  font-size: 8px;
  font-style: normal;
}

.geo-wb-region-live > em > i:first-child {
  color: #286b63;
  font-size: 18px;
  font-style: normal;
  font-weight: 800;
}

.geo-wb-region-live > em > i:last-child {
  font-style: normal;
}

.geo-wb-region-detail > div {
  min-height: 29px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px dashed #e4ebf1;
}

.geo-wb-region-detail > div:last-child {
  border-bottom: 0;
}

.geo-wb-region-detail dt {
  color: #7d8fa0;
  font-size: 9px;
}

.geo-wb-region-detail dd {
  margin: 0;
  overflow: hidden;
  color: #315a7e;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-wb-region-detail dd em {
  color: #8ca0af;
  font-size: 8px;
  font-style: normal;
  font-weight: 500;
}

.geo-wb-region-source {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 7px 0 0;
  color: #7891a3;
  font-size: 8px;
}

.geo-wb-region-source span::before {
  content: "";
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 5px;
  border-radius: 50%;
  background: #52a77f;
}

.geo-wb-region-source em {
  font-style: normal;
}

.geo-wb-key-enterprises {
  margin: 0;
  padding: 0;
  list-style: none;
}

.geo-wb-key-enterprises li + li {
  border-top: 1px solid #edf2f5;
}

.geo-wb-key-enterprises a,
.geo-wb-key-enterprises li {
  min-width: 0;
}

.geo-wb-key-enterprises a {
  min-height: 42px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  color: inherit;
  text-decoration: none;
}

.geo-wb-key-enterprises a:hover b {
  color: #1f6ea8;
}

.geo-wb-key-enterprises a > span {
  color: #91a2b0;
  font-size: 8px;
  font-weight: 800;
}

.geo-wb-key-enterprises a > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.geo-wb-key-enterprises b,
.geo-wb-key-enterprises em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-wb-key-enterprises b {
  color: #294f71;
  font-size: 9px;
}

.geo-wb-key-enterprises em {
  color: #8a9aa8;
  font-size: 8px;
  font-style: normal;
}

.geo-wb-key-enterprises strong {
  color: #3c739f;
  font-size: 8px;
  white-space: nowrap;
}

.geo-wb-empty {
  margin: 0;
  padding: 10px;
  border-radius: 6px;
  background: #f5f8fa;
  color: #8496a6;
  font-size: 9px;
  text-align: center;
}

.geo-workbench-root .geo-map-legend {
  right: auto;
  bottom: 64px;
  left: calc(var(--wb-panel-width) + 24px);
  max-width: calc(100% - var(--wb-panel-width) - var(--wb-dashboard-width) - 64px);
  display: flex !important;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(199, 215, 228, 0.92);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 5px 16px rgba(31, 70, 108, 0.13);
  backdrop-filter: blur(10px);
}

.geo-workbench-root .geo-map-legend span,
.geo-workbench-root .geo-map-legend .geo-heat-scale span,
.geo-workbench-root .geo-map-legend .geo-heat-scale em,
.geo-workbench-root .geo-legend-toggle {
  color: #587187;
  font-size: 9px;
}

.geo-workbench-root .geo-map-legend .geo-heat-scale {
  border-right-color: #d8e3eb;
}

.geo-workbench-root.wb-left-collapsed .geo-map-legend {
  left: 62px;
  max-width: calc(100% - var(--wb-dashboard-width) - 100px);
}

.geo-workbench-root.wb-right-collapsed .geo-map-legend {
  max-width: calc(100% - var(--wb-panel-width) - 104px);
}

@media (max-width: 1440px) {
  .geo-workbench-root {
    --wb-panel-width: 248px;
    --wb-dashboard-width: 248px;
  }

  .geo-wb-canvas-filter-group {
    padding-right: 7px;
    padding-left: 7px;
  }

  .geo-wb-canvas-filters .geo-wb-check {
    padding: 0 5px;
    font-size: 9px;
  }

}
/* End regional economic geography workbench */

/* 2026-09-15 顶栏合一：数据域切换器并入用户菜单（组合按钮） */
.account-menu-combined .account-menu-domain-sep {
  margin: 0 6px;
  opacity: 0.45;
}
.account-menu-combined .account-menu-domain {
  font-weight: 600;
}
.account-menu-combined .account-menu-chevron {
  width: 12px;
  height: 12px;
  margin-left: 6px;
  opacity: 0.8;
}
.account-menu-combined .account-menu-panel {
  min-width: 320px;
  max-width: 360px;
  padding: 8px;
}
.account-menu-combined .account-menu-links {
  display: grid;
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(30, 60, 90, 0.10);
}
.account-menu-combined .account-menu-domain-panel .chain-domain-picker-panel {
  position: static;
  width: 100%;
  max-height: 320px;
  overflow-y: auto;
  border: 0;
  box-shadow: none;
  padding: 0;
}
.account-menu-combined .account-menu-domain-panel .chain-domain-picker-head {
  padding: 2px 4px 6px;
}
/* 域树内元素豁免用户菜单链接样式（.account-menu-panel a/button 会污染树按钮，特异性更高的还原规则） */
.account-menu-combined .account-menu-domain-panel a,
.account-menu-combined .account-menu-domain-panel button {
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}
.account-menu-combined .account-menu-domain-panel a:hover,
.account-menu-combined .account-menu-domain-panel button:hover {
  background: transparent;
  color: inherit;
}

/* 2026-09-15 我的数据域：初始归属地标注 */
.account-tenant-home {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(38, 112, 184, 0.10);
  color: #2670b8;
  font-size: 12px;
  white-space: nowrap;
}

/* 2026-09-15 二期：知识库目录树拖拽落点高亮 */
.swa-kb-cat-row.kb-drop-hover .swa-kb-node {
  outline: 2px dashed #2670b8;
  outline-offset: 1px;
  background: rgba(38, 112, 184, 0.10);
}
