/* =================================================================
   千里眼 · 品牌招商落地选址 Agent — 设计系统
   暗色指挥中心风格：深空底 + 青色主色 + 琥珀辅助 + 玻璃层
   ================================================================= */

:root {
  /* 底色层次（越往上越亮） */
  --bg-0: #05080f;
  --bg-1: #0a0f1a;
  --bg-2: #0f1623;
  --bg-3: #151d2c;
  --bg-4: #1c2536;

  /* 玻璃层 */
  --glass: rgba(19, 27, 42, 0.72);
  --glass-strong: rgba(15, 22, 35, 0.92);
  --glass-border: rgba(120, 165, 220, 0.14);
  --glass-border-hi: rgba(120, 190, 255, 0.28);

  /* 文字 */
  --tx-0: #eef4fb;
  --tx-1: #b6c6d9;
  --tx-2: #7d8ea3;
  --tx-3: #55657a;

  /* 主色 */
  --cyan: #35d6f0;
  --cyan-dim: #1a94ad;
  --teal: #26d6a5;
  --amber: #f5b942;
  --orange: #ff8a65;
  --red: #ef5350;
  --violet: #a78bfa;
  --blue: #5ac8fa;

  --accent-grad: linear-gradient(135deg, #35d6f0 0%, #26d6a5 100%);
  --warn-grad: linear-gradient(135deg, #f5b942 0%, #ff8a65 100%);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 56px rgba(0, 0, 0, 0.55);
  --glow-cyan: 0 0 24px rgba(53, 214, 240, 0.35);

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;

  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Source Han Sans SC', 'Noto Sans CJK SC', sans-serif;
  --mono: 'SF Mono', 'JetBrains Mono', Consolas, 'Cascadia Mono', Menlo, monospace;

  --sidebar-w: 232px;
  --header-h: 60px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg-0);
  color: var(--tx-0);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

body::before {
  /* 极细网格底纹，制造“精密仪器”质感 */
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(90, 200, 250, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 200, 250, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  z-index: 0;
}

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(120, 165, 220, 0.22); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(120, 190, 255, 0.4); }

/* ================= 布局 ================= */
#app {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
  border-right: 1px solid var(--glass-border);
  display: flex; flex-direction: column;
  overflow: hidden;
}

.brand {
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--glass-border);
  display: flex; align-items: center; gap: 11px;
}
.brand-logo {
  width: 38px; height: 38px; flex: none;
  border-radius: 11px;
  background: var(--accent-grad);
  display: grid; place-items: center;
  box-shadow: var(--glow-cyan);
  position: relative;
}
.brand-logo svg { width: 22px; height: 22px; }
.brand-logo::after {
  content: ''; position: absolute; inset: -3px;
  border-radius: 14px; border: 1px solid rgba(53, 214, 240, 0.3);
  animation: pulseRing 3.2s ease-in-out infinite;
}
@keyframes pulseRing {
  0%, 100% { opacity: .35; transform: scale(1); }
  50% { opacity: .8; transform: scale(1.06); }
}
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: 2px; }
.brand-sub { font-size: 10.5px; color: var(--tx-3); letter-spacing: .8px; margin-top: 1px; }

.nav { flex: 1; overflow-y: auto; padding: 12px 10px; }
.nav-group { margin-bottom: 14px; }
.nav-group-title {
  font-size: 10px; color: var(--tx-3); letter-spacing: 1.4px;
  padding: 6px 10px; text-transform: uppercase; font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; margin-bottom: 2px;
  border-radius: var(--r-md);
  color: var(--tx-2); cursor: pointer;
  font-size: 13.5px; font-weight: 500;
  transition: all .16s cubic-bezier(.4, 0, .2, 1);
  position: relative;
  border: 1px solid transparent;
}
.nav-item:hover { background: rgba(120, 190, 255, 0.06); color: var(--tx-1); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(53, 214, 240, 0.16), rgba(53, 214, 240, 0.03));
  color: var(--tx-0);
  border-color: rgba(53, 214, 240, 0.22);
}
.nav-item.active::before {
  content: ''; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 0 3px 3px 0;
  background: var(--accent-grad);
  box-shadow: var(--glow-cyan);
}
.nav-item .ico { width: 17px; height: 17px; flex: none; opacity: .9; }
.nav-item .badge {
  margin-left: auto; font-size: 10px; padding: 1px 6px; border-radius: 9px;
  background: rgba(239, 83, 80, 0.18); color: #ff8a80; font-weight: 600;
}

.sidebar-foot {
  padding: 12px; border-top: 1px solid var(--glass-border);
  font-size: 11px; color: var(--tx-3);
}
.src-dot {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px; border-radius: 20px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--glass-border);
  margin-bottom: 6px; font-size: 10.5px;
}
.dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.dot.live { background: var(--teal); box-shadow: 0 0 7px var(--teal); animation: blink 2s infinite; }
.dot.synth { background: var(--amber); box-shadow: 0 0 7px var(--amber); }
.dot.off { background: var(--tx-3); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ================= 主区域 ================= */
.main { display: flex; flex-direction: column; overflow: hidden; background: var(--bg-0); }

.topbar {
  height: var(--header-h); flex: none;
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px;
  background: var(--glass-strong);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 500;
}
.page-title { font-size: 16px; font-weight: 650; letter-spacing: .5px; }
.page-sub { font-size: 11.5px; color: var(--tx-3); margin-top: 1px; }
.topbar-spacer { flex: 1; }

.select, .input {
  background: var(--bg-2);
  border: 1px solid var(--glass-border);
  color: var(--tx-0);
  border-radius: var(--r-md);
  padding: 7px 11px;
  font-size: 13px;
  font-family: var(--sans);
  outline: none;
  transition: all .16s;
  min-width: 0;
}
.select:focus, .input:focus { border-color: var(--cyan-dim); box-shadow: 0 0 0 3px rgba(53, 214, 240, 0.12); }
.select:hover { border-color: var(--glass-border-hi); }
.input::placeholder { color: var(--tx-3); }
select.select { cursor: pointer; appearance: none; padding-right: 30px;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237d8ea3'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 7px center; background-size: 15px;
}
select.select option { background: var(--bg-2); color: var(--tx-0); }

.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  padding: 8px 16px; border-radius: var(--r-md);
  font-size: 13px; font-weight: 600; font-family: var(--sans);
  cursor: pointer; border: 1px solid transparent;
  transition: all .16s cubic-bezier(.4, 0, .2, 1);
  white-space: nowrap;
}
.btn-primary { background: var(--accent-grad); color: #04141a; box-shadow: 0 4px 16px rgba(53, 214, 240, 0.25); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 7px 22px rgba(53, 214, 240, 0.4); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: rgba(255, 255, 255, 0.04); color: var(--tx-1); border-color: var(--glass-border); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); color: var(--tx-0); border-color: var(--glass-border-hi); }
.btn-warn { background: var(--warn-grad); color: #1a0e02; }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

/* ================= 视图 ================= */
.view { flex: 1; overflow: hidden; display: none; }
.view.active { display: flex; flex-direction: column; }
.view-scroll { flex: 1; overflow-y: auto; padding: 20px; }

/* 地图视图：全屏地图 + 悬浮面板 */
.map-view { position: relative; flex: 1; overflow: hidden; }
#map { position: absolute; inset: 0; background: var(--bg-1); }

/* 地图瓦片滤镜 —— 把亮色路网压成暗色指挥中心风格。
   用 class 选择器（而非 #map）以便所有地图实例复用。 */
.map-dark .leaflet-tile-pane {
  filter: invert(1) hue-rotate(185deg) saturate(0.75) brightness(0.82) contrast(1.12);
}
.map-dim .leaflet-tile-pane { filter: grayscale(0.55) brightness(0.72) contrast(1.05); }

/* 地图容器内的控件文字统一压暗风格 */
.leaflet-container { background: var(--bg-1); font-family: var(--sans); }
.leaflet-control-zoom a {
  background: rgba(15, 22, 35, 0.92) !important;
  color: var(--tx-1) !important;
  border-color: rgba(120, 165, 220, 0.18) !important;
}
.leaflet-control-zoom a:hover { background: rgba(53, 214, 240, 0.18) !important; color: var(--cyan) !important; }
.leaflet-tooltip {
  background: rgba(5, 8, 15, 0.94) !important;
  border: 1px solid rgba(120, 165, 220, 0.24) !important;
  color: var(--tx-1) !important;
  box-shadow: var(--shadow-md) !important;
  font-size: 11.5px !important;
  padding: 5px 9px !important;
  border-radius: 7px !important;
}
.leaflet-tooltip-top:before { border-top-color: rgba(120, 165, 220, 0.24) !important; }
.leaflet-tooltip b { color: var(--tx-0); }

.map-overlay { position: absolute; z-index: 400; }
.map-top-left { top: 14px; left: 14px; display: flex; flex-direction: column; gap: 10px; max-width: 330px; }
.map-top-right { top: 14px; right: 14px; display: flex; flex-direction: column; gap: 10px; width: 288px; max-height: calc(100% - 28px); overflow: hidden auto; }
.map-bottom-left { bottom: 16px; left: 14px; }
.map-bottom-right { bottom: 16px; right: 14px; }

.panel {
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--glass-border);
  font-size: 12.5px; font-weight: 650; letter-spacing: .4px;
}
.panel-head .ico { width: 15px; height: 15px; color: var(--cyan); }
.panel-head .spacer { flex: 1; }
.panel-body { padding: 13px 14px; }
.panel-body.tight { padding: 9px 12px; }
.panel.collapsed .panel-body { display: none; }

.kpi-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.kpi {
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  padding: 9px 11px;
}
.kpi-label { font-size: 10.5px; color: var(--tx-3); margin-bottom: 3px; letter-spacing: .3px; }
.kpi-value { font-size: 19px; font-weight: 700; font-family: var(--mono); letter-spacing: -.5px; line-height: 1.2; }
.kpi-value small { font-size: 11px; font-weight: 500; color: var(--tx-2); margin-left: 3px; font-family: var(--sans); }
.kpi-value.cyan { color: var(--cyan); }
.kpi-value.teal { color: var(--teal); }
.kpi-value.amber { color: var(--amber); }
.kpi-value.orange { color: var(--orange); }
.kpi-value.red { color: var(--red); }

/* 图层开关 */
.layer-list { display: flex; flex-direction: column; gap: 2px; }
.layer-item {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px; border-radius: var(--r-sm);
  cursor: pointer; font-size: 12.5px; color: var(--tx-1);
  transition: background .14s;
}
.layer-item:hover { background: rgba(255, 255, 255, 0.045); }
.switch {
  width: 32px; height: 18px; border-radius: 10px; flex: none;
  background: rgba(255, 255, 255, 0.1);
  position: relative; transition: background .2s;
}
.switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--tx-2); transition: all .2s cubic-bezier(.4, 0, .2, 1);
}
.layer-item.on .switch { background: rgba(53, 214, 240, 0.32); }
.layer-item.on .switch::after { left: 16px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.layer-count { margin-left: auto; font-size: 10.5px; color: var(--tx-3); font-family: var(--mono); }
.layer-swatch { width: 9px; height: 9px; border-radius: 50%; flex: none; }

/* ================= 卡片与栅格 ================= */
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
@media (max-width: 1400px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: 16px;
  transition: all .18s cubic-bezier(.4, 0, .2, 1);
}
.card:hover { border-color: var(--glass-border-hi); }
.card.interactive { cursor: pointer; }
.card.interactive:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card-title { font-size: 13.5px; font-weight: 650; margin-bottom: 3px; display: flex; align-items: center; gap: 7px; }
.card-desc { font-size: 11.5px; color: var(--tx-3); }

.section-title {
  display: flex; align-items: center; gap: 9px;
  font-size: 14px; font-weight: 650; margin: 22px 0 12px;
  letter-spacing: .4px;
}
.section-title:first-child { margin-top: 0; }
.section-title .ico { width: 16px; height: 16px; color: var(--cyan); }
.section-title .hint { font-size: 11.5px; font-weight: 400; color: var(--tx-3); margin-left: 2px; }

/* ================= 表单 ================= */
.field { margin-bottom: 13px; }
.field-label { display: block; font-size: 11.5px; color: var(--tx-2); margin-bottom: 5px; font-weight: 500; }
.field-hint { font-size: 10.5px; color: var(--tx-3); margin-top: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.field-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 5px 11px; border-radius: 20px; font-size: 12px;
  background: rgba(255, 255, 255, 0.035); border: 1px solid var(--glass-border);
  color: var(--tx-2); cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--glass-border-hi); color: var(--tx-1); }
.chip.on { background: rgba(53, 214, 240, 0.16); border-color: rgba(53, 214, 240, 0.42); color: var(--cyan); font-weight: 600; }

/* ================= 评分可视化 ================= */
.score-hero {
  display: flex; align-items: center; gap: 20px;
  padding: 20px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(53, 214, 240, 0.1), rgba(38, 214, 165, 0.045));
  border: 1px solid rgba(53, 214, 240, 0.2);
  margin-bottom: 16px;
}
.score-ring { position: relative; width: 108px; height: 108px; flex: none; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring-val {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--mono); font-size: 29px; font-weight: 700; letter-spacing: -1px;
}
.score-ring-grade {
  position: absolute; bottom: 9px; left: 0; right: 0; text-align: center;
  font-size: 10.5px; color: var(--tx-2); letter-spacing: .5px;
}
.score-meta { flex: 1; min-width: 0; }
.score-verdict { font-size: 14.5px; font-weight: 600; line-height: 1.5; margin-bottom: 8px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2.5px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 650; letter-spacing: .3px;
}
.badge-s { background: rgba(38, 214, 165, 0.18); color: #4ee8bb; border: 1px solid rgba(38, 214, 165, 0.35); }
.badge-a { background: rgba(90, 200, 250, 0.16); color: #7fd4ff; border: 1px solid rgba(90, 200, 250, 0.33); }
.badge-b { background: rgba(245, 185, 66, 0.16); color: #ffcd6b; border: 1px solid rgba(245, 185, 66, 0.33); }
.badge-c { background: rgba(255, 138, 101, 0.16); color: #ffa987; border: 1px solid rgba(255, 138, 101, 0.33); }
.badge-d { background: rgba(239, 83, 80, 0.16); color: #ff8a87; border: 1px solid rgba(239, 83, 80, 0.33); }
.badge-ghost { background: rgba(255, 255, 255, 0.05); color: var(--tx-2); border: 1px solid var(--glass-border); }
.badge-cyan { background: rgba(53, 214, 240, 0.14); color: var(--cyan); border: 1px solid rgba(53, 214, 240, 0.3); }
.badge-amber { background: rgba(245, 185, 66, 0.14); color: var(--amber); border: 1px solid rgba(245, 185, 66, 0.3); }
.badge-red { background: rgba(239, 83, 80, 0.14); color: #ff8a87; border: 1px solid rgba(239, 83, 80, 0.3); }
.badge-teal { background: rgba(38, 214, 165, 0.14); color: var(--teal); border: 1px solid rgba(38, 214, 165, 0.3); }

/* 维度条 */
.dim-list { display: flex; flex-direction: column; gap: 11px; }
.dim-row { display: grid; grid-template-columns: 108px 1fr 46px; align-items: center; gap: 11px; }
.dim-name { font-size: 12.5px; color: var(--tx-1); display: flex; align-items: center; gap: 6px; }
.dim-weight { font-size: 10px; color: var(--tx-3); font-family: var(--mono); }
.dim-bar { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.06); overflow: hidden; position: relative; }
.dim-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--cyan-dim), var(--cyan));
  transition: width .7s cubic-bezier(.2, .8, .2, 1);
  box-shadow: 0 0 10px rgba(53, 214, 240, 0.4);
}
.dim-fill.low { background: linear-gradient(90deg, #a33f2c, var(--orange)); box-shadow: 0 0 10px rgba(255, 138, 101, 0.35); }
.dim-fill.mid { background: linear-gradient(90deg, #a37a1f, var(--amber)); box-shadow: 0 0 10px rgba(245, 185, 66, 0.35); }
.dim-score { font-family: var(--mono); font-size: 13px; font-weight: 650; text-align: right; }

/* 报告块 */
.report-block { margin-bottom: 15px; }
.report-block-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 650; margin-bottom: 8px; color: var(--tx-1);
}
.report-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.report-list li {
  font-size: 12.5px; line-height: 1.62; color: var(--tx-1);
  padding-left: 20px; position: relative;
}
.report-list li::before {
  content: ''; position: absolute; left: 5px; top: 8px;
  width: 5px; height: 5px; border-radius: 50%;
}
.report-list.pro li::before { background: var(--teal); box-shadow: 0 0 7px var(--teal); }
.report-list.con li::before { background: var(--orange); box-shadow: 0 0 7px var(--orange); }
.report-list.act li::before { background: var(--cyan); box-shadow: 0 0 7px var(--cyan); }

/* ================= 表格 ================= */
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th {
  text-align: left; padding: 9px 11px;
  font-size: 11px; font-weight: 600; color: var(--tx-3);
  letter-spacing: .5px; border-bottom: 1px solid var(--glass-border);
  white-space: nowrap; position: sticky; top: 0;
  background: var(--bg-2); z-index: 2;
}
.table td { padding: 9px 11px; border-bottom: 1px solid rgba(255, 255, 255, 0.035); color: var(--tx-1); }
.table tbody tr { transition: background .13s; }
.table tbody tr:hover { background: rgba(120, 190, 255, 0.045); }
.table .num { font-family: var(--mono); text-align: right; white-space: nowrap; }
.table-wrap { overflow: auto; border-radius: var(--r-md); border: 1px solid var(--glass-border); max-height: 480px; }
.table .bar-cell { position: relative; }
.table .bar-cell .bar { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(53, 214, 240, 0.1); border-radius: 2px; }

/* ================= 列表项 ================= */
.rank-list { display: flex; flex-direction: column; gap: 9px; }
.rank-item {
  display: flex; gap: 13px; align-items: flex-start;
  padding: 13px 15px; border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--glass-border);
  cursor: pointer; transition: all .16s;
}
.rank-item:hover { border-color: var(--glass-border-hi); background: rgba(120, 190, 255, 0.055); transform: translateX(2px); }
.rank-item.selected { border-color: rgba(53, 214, 240, 0.5); background: rgba(53, 214, 240, 0.08); box-shadow: 0 0 0 1px rgba(53, 214, 240, 0.15); }
.rank-no {
  width: 30px; height: 30px; flex: none; border-radius: 9px;
  display: grid; place-items: center;
  font-family: var(--mono); font-weight: 700; font-size: 13px;
  background: rgba(255, 255, 255, 0.05); color: var(--tx-2);
}
.rank-no.top1 { background: var(--accent-grad); color: #04141a; box-shadow: var(--glow-cyan); }
.rank-no.top2 { background: rgba(90, 200, 250, 0.22); color: #8fdcff; }
.rank-no.top3 { background: rgba(245, 185, 66, 0.2); color: var(--amber); }
.rank-body { flex: 1; min-width: 0; }
.rank-title { font-size: 13.5px; font-weight: 620; margin-bottom: 3px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.rank-sub { font-size: 11.5px; color: var(--tx-3); }
.rank-metrics { display: flex; gap: 15px; margin-top: 8px; flex-wrap: wrap; }
.rank-metric { font-size: 11px; color: var(--tx-2); }
.rank-metric b { font-family: var(--mono); font-size: 12.5px; color: var(--tx-0); font-weight: 650; margin-left: 3px; }
.rank-score { text-align: right; flex: none; }
.rank-score-val { font-family: var(--mono); font-size: 25px; font-weight: 700; line-height: 1; letter-spacing: -1px; }

/* ================= 提醒 ================= */
.reminder-item {
  display: flex; align-items: center; gap: 13px;
  padding: 12px 15px; border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--tx-3);
  transition: all .16s;
}
.reminder-item:hover { background: rgba(120, 190, 255, 0.05); }
.reminder-item.overdue { border-left-color: var(--red); background: rgba(239, 83, 80, 0.055); }
.reminder-item.urgent { border-left-color: var(--orange); background: rgba(255, 138, 101, 0.045); }
.reminder-item.soon { border-left-color: var(--amber); }
.reminder-item.normal { border-left-color: var(--cyan-dim); }
.reminder-item.done { opacity: .45; }
.reminder-icon { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; font-size: 16px; background: rgba(255, 255, 255, 0.05); }
.reminder-body { flex: 1; min-width: 0; }
.reminder-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.reminder-sub { font-size: 11.5px; color: var(--tx-3); }
.reminder-right { text-align: right; flex: none; }
.reminder-amount { font-family: var(--mono); font-size: 14px; font-weight: 650; }
.reminder-days { font-size: 11px; color: var(--tx-3); }

/* ================= 图表 ================= */
.chart { width: 100%; display: block; }
.chart-legend { display: flex; gap: 15px; flex-wrap: wrap; margin-top: 9px; font-size: 11.5px; color: var(--tx-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

.donut-wrap { display: flex; align-items: center; gap: 20px; }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.donut-legend-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.donut-legend-row .name { color: var(--tx-2); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut-legend-row .val { font-family: var(--mono); font-weight: 600; color: var(--tx-1); }

/* ================= 状态与提示 ================= */
.empty { padding: 46px 20px; text-align: center; color: var(--tx-3); }
.empty-icon { font-size: 38px; opacity: .35; margin-bottom: 10px; }
.empty-title { font-size: 14px; color: var(--tx-2); margin-bottom: 5px; font-weight: 600; }
.empty-desc { font-size: 12px; line-height: 1.7; max-width: 440px; margin: 0 auto; }

.loading { display: flex; align-items: center; justify-content: center; padding: 40px; gap: 11px; color: var(--tx-2); font-size: 13px; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(53, 214, 240, 0.2);
  border-top-color: var(--cyan);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.075) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.toast-wrap { position: fixed; top: 74px; right: 20px; z-index: 3000; display: flex; flex-direction: column; gap: 9px; pointer-events: none; }
.toast {
  background: var(--glass-strong); backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border-hi);
  border-radius: var(--r-md); padding: 11px 16px;
  box-shadow: var(--shadow-lg);
  font-size: 13px; display: flex; align-items: center; gap: 9px;
  animation: slideIn .28s cubic-bezier(.2, .8, .2, 1);
  pointer-events: auto; max-width: 380px;
}
.toast.err { border-color: rgba(239, 83, 80, 0.45); }
.toast.ok { border-color: rgba(38, 214, 165, 0.45); }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }

/* ================= 地图标记 ================= */
.pin {
  position: relative;
  display: grid; place-items: center;
  border-radius: 50%;
  transition: transform .2s cubic-bezier(.2,.8,.2,1);
}
.pin:hover { transform: scale(1.28); z-index: 900 !important; }
.pin-inner {
  border-radius: 50%; display: grid; place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.9);
  font-size: 9px; font-weight: 800; color: #04141a;
}
.pin-label {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  margin-top: 4px; white-space: nowrap;
  font-size: 10.5px; font-weight: 600;
  padding: 1.5px 6px; border-radius: 4px;
  background: rgba(5, 8, 15, 0.85);
  border: 1px solid var(--glass-border);
  color: var(--tx-1);
  opacity: 0; transition: opacity .18s;
  pointer-events: none;
}
.pin:hover .pin-label { opacity: 1; }
.pin.planned .pin-inner { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 185, 66, 0.5); }
  50% { box-shadow: 0 0 0 9px rgba(245, 185, 66, 0); }
}
.pin.open .pin-inner { box-shadow: 0 0 11px rgba(53, 214, 240, 0.55); }
.pin.risk .pin-inner { border-color: var(--red); }

/* 雷达扫描点（用于智能选址候选） */
.radar-pin { position: relative; width: 44px; height: 44px; display: grid; place-items: center; }
.radar-pin .ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid currentColor; opacity: .55;
  animation: radar 2.6s cubic-bezier(.2,.6,.3,1) infinite;
}
.radar-pin .ring:nth-child(2) { animation-delay: .85s; }
.radar-pin .ring:nth-child(3) { animation-delay: 1.7s; }
@keyframes radar {
  0% { transform: scale(.28); opacity: .85; }
  100% { transform: scale(1); opacity: 0; }
}
.radar-pin .core {
  width: 13px; height: 13px; border-radius: 50%;
  background: currentColor; box-shadow: 0 0 13px currentColor;
  border: 2px solid rgba(255, 255, 255, 0.9);
  z-index: 2;
}

/* 地图要素（竞品/潜在客户） */
.dot-marker { border-radius: 50%; border: 1.5px solid rgba(255,255,255,.75); }
.dot-marker.comp { background: rgba(239, 83, 80, 0.85); }
.dot-marker.potential { background: rgba(38, 214, 165, 0.85); }
.dot-marker.office { background: rgba(90, 200, 250, 0.85); }
.dot-marker.transit-metro { background: #fff; border-color: #35d6f0; }

/* 动态连线 */
.leaflet-interactive.link-line { transition: stroke-opacity .2s, stroke-width .2s; }
.link-flow { stroke-dasharray: 7 11; animation: flow 1.5s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -18; } }

.trade-circle { pointer-events: none; }

/* 地图控制按钮组 */
.map-ctrl { display: flex; flex-direction: column; gap: 1px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--glass-border); box-shadow: var(--shadow-md); }
.map-ctrl button {
  width: 34px; height: 34px; border: none; cursor: pointer;
  background: var(--glass-strong); backdrop-filter: blur(12px);
  color: var(--tx-1); font-size: 14px; display: grid; place-items: center;
  transition: all .14s;
}
.map-ctrl button:hover { background: rgba(53, 214, 240, 0.16); color: var(--cyan); }
.map-ctrl button.on { background: rgba(53, 214, 240, 0.2); color: var(--cyan); }

/* ================= 参数面板（选址） ================= */
.config-panel { width: 322px; flex: none; border-right: 1px solid var(--glass-border); background: var(--bg-1); display: flex; flex-direction: column; overflow: hidden; }
.config-body { flex: 1; overflow-y: auto; padding: 16px; }
.config-foot { padding: 13px 16px; border-top: 1px solid var(--glass-border); background: var(--bg-2); }

.result-area { flex: 1; overflow: hidden; display: flex; }
.result-list { width: 400px; flex: none; border-right: 1px solid var(--glass-border); overflow-y: auto; padding: 14px; background: var(--bg-1); }
.result-detail { flex: 1; overflow-y: auto; padding: 18px; }

/* 数据来源角标 */
.src-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; padding: 1.5px 7px; border-radius: 20px;
  background: rgba(255, 255, 255, 0.045); color: var(--tx-3);
  border: 1px solid var(--glass-border);
}
.src-tag.real { background: rgba(38, 214, 165, 0.1); color: var(--teal); border-color: rgba(38, 214, 165, 0.26); }
.src-tag.synth { background: rgba(245, 185, 66, 0.09); color: var(--amber); border-color: rgba(245, 185, 66, 0.24); }

/* 进度条（加载中） */
.progress-bar { height: 3px; background: rgba(255,255,255,.06); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent-grad); border-radius: 2px; transition: width .4s ease; box-shadow: 0 0 10px rgba(53,214,240,.5); }

/* ================= Tab ================= */
.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--glass-border); margin-bottom: 16px; }
.tab {
  padding: 9px 15px; font-size: 13px; color: var(--tx-2); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all .16s; font-weight: 500;
}
.tab:hover { color: var(--tx-1); }
.tab.on { color: var(--cyan); border-bottom-color: var(--cyan); font-weight: 650; }

/* 工具类 */
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.flex { display: flex; } .flex-col { flex-direction: column; } .items-center { align-items: center; }
.justify-between { justify-content: space-between; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.flex-1 { flex: 1; } .min-w-0 { min-width: 0; }
.text-right { text-align: right; } .text-center { text-align: center; }
.mono { font-family: var(--mono); }
.muted { color: var(--tx-3); } .dim { color: var(--tx-2); }
.small { font-size: 11.5px; } .tiny { font-size: 10.5px; }
.bold { font-weight: 650; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.wrap { flex-wrap: wrap; }
.pointer { cursor: pointer; }
