/* ==========================================================
   PV Estimator — Design System v3.0
   布局：固定顶栏 + 左侧参数栏（可滚动）+ 右侧地图（全屏固定）
   ========================================================== */

/* ── Reset & 基础 ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* 品牌色 */
  --blue-600:  #2563eb;
  --blue-700:  #1d4ed8;
  --blue-50:   #eff6ff;
  --blue-100:  #dbeafe;
  --blue-200:  #bfdbfe;

  /* 功能色 */
  --green-600: #16a34a;
  --green-50:  #f0fdf4;
  --green-100: #dcfce7;
  --amber-600: #d97706;
  --amber-50:  #fffbeb;
  --amber-100: #fef3c7;
  --red-600:   #dc2626;
  --red-50:    #fef2f2;
  --red-100:   #fee2e2;

  /* 中性色 */
  --gray-950:  #0c0f15;
  --gray-900:  #0f172a;
  --gray-800:  #1e293b;
  --gray-700:  #334155;
  --gray-600:  #475569;
  --gray-500:  #64748b;
  --gray-400:  #94a3b8;
  --gray-300:  #cbd5e1;
  --gray-200:  #e2e8f0;
  --gray-100:  #f1f5f9;
  --gray-50:   #f8fafc;
  --white:     #ffffff;

  /* 语义 token */
  --c-primary:     var(--blue-600);
  --c-primary-dk:  var(--blue-700);
  --c-bg:          #eef2f8;
  --c-surface:     var(--white);
  --c-border:      var(--gray-200);
  --c-border-md:   var(--gray-300);
  --c-text:        var(--gray-900);
  --c-text-sub:    var(--gray-600);
  --c-text-hint:   var(--gray-400);

  /* 尺寸 */
  --header-h:    52px;
  --sidebar-w:   480px;
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --radius-xl:   18px;

  /* 阴影 */
  --shadow-xs: 0 1px 2px rgba(15,23,42,.05);
  --shadow-sm: 0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04);
  --shadow-md: 0 4px 12px rgba(15,23,42,.08), 0 2px 4px rgba(15,23,42,.04);
  --shadow-lg: 0 10px 30px rgba(15,23,42,.10), 0 4px 8px rgba(15,23,42,.05);

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--c-text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

html, body { height: 100%; overflow: hidden; }

/* ── 顶部导航栏 ──────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--gray-900);
  border-bottom: 1px solid rgba(255,255,255,.06);
  z-index: 200;
  display: flex;
  align-items: center;
}

.header-inner {
  width: 100%;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.brand-icon { font-size: 1.25rem; line-height: 1; }

.brand-title {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--gray-400);
  margin-top: 1px;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.project-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.35rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.project-select {
  min-width: 11rem;
  max-width: 16rem;
  height: 1.9rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(2, 6, 23, 0.55);
  color: #e2e8f0;
  font-size: 0.75rem;
  padding: 0 0.5rem;
  outline: none;
}

.project-select:focus {
  border-color: rgba(96, 165, 250, 0.9);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.project-btn.btn {
  height: 1.9rem;
  padding: 0 0.5rem;
  font-size: 0.72rem;
  white-space: nowrap;
}

.project-meta {
  font-size: 0.7rem;
  color: var(--gray-300);
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-blue  { background: rgba(37,99,235,.2);  color: var(--blue-200); }
.badge-green { background: rgba(22,163,74,.2);  color: #86efac; }

/* ── 应用主体框架 ─────────────────────────────────────────── */
.app-shell {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0; bottom: 0;
  display: flex;
  background: var(--c-bg);
}

/* ── 左侧参数栏 ──────────────────────────────────────────── */
.param-panel {
  width: var(--sidebar-w);
  flex-shrink: 0;
  height: 100%;
  overflow-y: auto;
  background: var(--c-bg);
  border-right: 1px solid var(--c-border);
  padding: 1rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-300) transparent;
}

.param-panel::-webkit-scrollbar { width: 5px; }
.param-panel::-webkit-scrollbar-track { background: transparent; }
.param-panel::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 999px; }

/* ── 右侧地图面板 ────────────────────────────────────────── */
.map-panel {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* 地图工具栏（搜索 + 图层）须高于底图与控件，避免被瓦片/覆盖物遮挡 */
.map-toolbar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 1100;
  display: flex;
  justify-content: stretch;
  pointer-events: auto;
}

/* 搜索 + 底图：同一白底卡片，上下分区 */
.map-toolbar-card {
  width: 100%;
  max-width: 42rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem 0.6rem;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-lg);
}

.map-toolbar-card .map-search-wrap {
  flex: none;
  width: 100%;
}

.map-toolbar-card .map-search-inner {
  box-shadow: none;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
}

.map-toolbar-card .map-search-inner:focus-within {
  border-color: var(--c-primary);
}

/* 储能测算页地图工具栏：更紧凑，避免搜索窗口过宽 */
.map-toolbar--compact {
  justify-content: flex-start;
}

.map-toolbar--compact .map-toolbar-card {
  width: min(34rem, 100%);
  max-width: 34rem;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem 0.5rem;
}

.map-toolbar--compact .map-search-icon {
  width: 14px;
  height: 14px;
  margin: 0 0.42rem 0 0.52rem;
}

.map-toolbar--compact .map-search-input {
  padding: 0.5rem 0.2rem;
  font-size: 0.83rem;
}

.map-toolbar--compact .map-search-btn {
  padding: 0.5rem 0.76rem;
  font-size: 0.76rem;
}

.map-toolbar--compact .map-basemap-strip {
  gap: 0.42rem;
  min-height: 2.2rem;
}

.map-toolbar--compact .map-layer-label {
  font-size: 0.68rem;
}

.map-toolbar--compact .layer-btn {
  padding: 0.4rem 0.28rem;
  font-size: 0.64rem;
}

/* 地图容器本体：明确低于工具栏，避免整图合成层盖住搜索条 */
.map-box {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 0;
}

/* 地图底部版权提示（低于工具栏，高于瓦片） */
.map-hint {
  position: absolute;
  bottom: 28px;
  left: 12px;
  z-index: 1050;
  background: rgba(15,23,42,.65);
  color: rgba(255,255,255,.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  pointer-events: none;
  max-width: calc(100% - 24px);
  line-height: 1.5;
}

.map-hint code {
  background: rgba(255,255,255,.15);
  padding: 0 0.25em;
  border-radius: 3px;
}

/* ── 搜索框 ──────────────────────────────────────────────── */
.map-search-wrap {
  flex: 1;
  position: relative;
  min-width: 0;
}

.map-search-inner {
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1.5px solid transparent;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.map-search-inner:focus-within {
  border-color: var(--c-primary);
  box-shadow: var(--shadow-lg), 0 0 0 3px rgba(37,99,235,.12);
}

.map-search-icon {
  width: 15px; height: 15px;
  margin: 0 0.5rem 0 0.65rem;
  flex-shrink: 0;
  color: var(--c-text-hint);
}

.map-search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.55rem 0.25rem;
  font-size: 0.875rem;
  color: var(--c-text);
  background: transparent;
  min-width: 0;
}

.map-search-input::placeholder { color: var(--c-text-hint); }

.map-search-btn {
  flex-shrink: 0;
  padding: 0.55rem 0.9rem;
  background: var(--c-primary);
  color: var(--white);
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  margin: 0;
}

.map-search-btn:hover { background: var(--c-primary-dk); }
.map-search-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.map-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1200;
  max-height: 240px;
  overflow-y: auto;
  list-style: none;
}

.map-search-results li {
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
  color: var(--c-text);
  cursor: pointer;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.map-search-results li:last-child { border-bottom: none; }

.map-search-results li:hover {
  background: var(--blue-50);
  color: var(--c-primary);
}

.result-name { font-weight: 600; }
.result-sub  { font-size: 0.73rem; color: var(--c-text-hint); display: block; margin-top: 1px; }

.search-empty {
  padding: 0.75rem 0.85rem;
  color: var(--c-text-hint);
  font-size: 0.82rem;
  text-align: center;
  cursor: default !important;
}
.search-empty:hover { background: none !important; color: var(--c-text-hint) !important; }

/* ── 底图：标签 + 三等分分段条 ─────────────────────────────── */
.map-basemap-strip {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  min-height: 2.5rem;
}

.map-layer-label {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 0 0.15rem 0 0.1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--c-text-hint);
  white-space: nowrap;
}

.map-layer-label::after {
  content: "：";
  font-weight: 700;
  margin-left: 1px;
}

.layer-switcher {
  flex: 1;
  display: flex;
  min-width: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--c-border);
  background: var(--gray-50);
}

.layer-btn {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.35rem;
  background: transparent;
  color: var(--c-text-sub);
  border: none;
  border-right: 1px solid var(--c-border);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: normal;
  margin: 0;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.layer-btn:last-child { border-right: none; }
.layer-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.85);
  color: var(--c-text);
}
.layer-btn.active {
  background: var(--c-primary);
  color: var(--white);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.layer-btn:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
  z-index: 1;
}

/* ── 面积绘制模块 ──────────────────────────────────────────── */
.area-panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1.5px solid transparent;
  padding: 6px;
  min-width: 260px;
}

/* ── 面积估算卡片：图片风格（工具栏 + 左右两栏） ────────── */
.area-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 0.1rem 0 0.1rem;
}

.area-toolbar-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--c-text-sub);
  margin-right: 0.2rem;
}

.area-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.78rem;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid transparent;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  background: #fff;
  color: var(--c-text);
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.area-tool-btn:hover { filter: brightness(0.98); }
.area-tool-btn.active {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18) inset;
}

.area-tool-btn--primary {
  color: #2563eb;
  border-color: #c7d2fe;
  background: #eef2ff;
}
.area-tool-btn--primary:hover { background: #e0e7ff; }
.area-tool-btn--primary.active { background: #c7d2fe; border-color: #818cf8; }

.area-tool-btn--danger {
  color: #dc2626;
  border-color: #fecaca;
  background: #fef2f2;
}
.area-tool-btn--danger:hover { background: #fee2e2; }

.area-tool-btn--ghost {
  color: var(--c-text-sub);
  border-color: #e5e7eb;
  background: #fff;
}

.area-tool-icon {
  font-size: 0.95em;
  line-height: 1;
}

.area-estimator-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.7rem;
}

/* 左：已绘制区域列表 */
.area-list-panel {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  min-height: 196px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.area-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
  color: var(--c-text);
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  border-bottom: 1px solid #e5e7eb;
}

.area-list-header-title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
}

.area-list-header-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.area-list-header-count {
  font-size: 0.72rem;
  color: var(--c-text-hint);
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e5e7eb;
}

.area-list-scroll {
  flex: 1 1 auto;
  max-height: 204px;
  overflow-y: auto;
  background: #fff;
}
.area-list-scroll::-webkit-scrollbar { width: 6px; }
.area-list-scroll::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 3px;
}
.area-list-scroll::-webkit-scrollbar-thumb:hover { background: #cbd5e1; }

.area-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.area-list-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.85rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.82rem;
  color: var(--c-text);
  transition: background .12s ease;
}
.area-list-item:last-child { border-bottom: none; }
.area-list-item:hover { background: #f5f9ff; }
.area-list-item:hover .area-list-item-remove { opacity: 1; }

.area-list-item-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 0.3rem;
  border-radius: 6px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 0.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.area-list-item-name {
  color: var(--c-text);
  font-weight: 600;
}

.area-list-item-value {
  color: #2563eb;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.area-list-item-unit {
  margin-left: 0.15em;
  font-weight: 600;
  font-size: 0.82em;
  color: #64748b;
}

.area-list-item-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 6px;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.65;
  transition: all .15s ease;
}
.area-list-item-remove:hover {
  color: #fff;
  background: #ef4444;
  border-color: #ef4444;
  opacity: 1;
  transform: scale(1.05);
}
.area-list-item-remove:active { transform: scale(0.95); }

.area-list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.6rem 0.85rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--c-text-hint);
}

.area-list-empty-icon {
  font-size: 1.6rem;
  color: #cbd5e1;
  line-height: 1;
}

.area-list-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  background: linear-gradient(180deg, #f8fafc, #eef2ff);
  border-top: 1px solid #e5e7eb;
  font-size: 0.82rem;
}

.area-list-footer-label {
  color: var(--c-text-sub);
  font-weight: 600;
}

.area-list-footer-value {
  color: #1d4ed8;
  font-weight: 800;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.area-list-footer-unit {
  margin-left: 0.15em;
  font-size: 0.82em;
  color: #64748b;
  font-weight: 700;
}

/* 已绘区域 → 项目数据库持久化状态指示 */
.area-save-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem 0.6rem;
  font-size: 0.74rem;
  color: #64748b;
  background: #f8fafc;
  border-top: 1px dashed #e5e7eb;
}
.area-save-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cbd5e1;
  flex-shrink: 0;
}
.area-save-status.is-saving .area-save-status-dot { background: #fbbf24; }
.area-save-status.is-saved .area-save-status-dot { background: #10b981; }
.area-save-status.is-error .area-save-status-dot { background: #ef4444; }
.area-save-status.is-warn .area-save-status-dot { background: #f59e0b; }
.area-save-status.is-saved { color: #047857; }
.area-save-status.is-error { color: #b91c1c; }
.area-save-status.is-warn { color: #b45309; }

/* 装机量估算：全宽水平布局 */
.area-est-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.2rem;
  padding: 0.7rem 0.9rem;
  background: linear-gradient(180deg, #ffffff 0%, #f5f8ff 100%);
  border: 1px solid #dbe6ff;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.06);
}

.area-est-title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-text);
  padding-right: 0.9rem;
  border-right: 1px dashed #d9e3f5;
  white-space: nowrap;
}

.area-est-panel > .area-est-apply-btn {
  margin-left: auto;
}

.area-est-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  font-size: 0.7rem;
  line-height: 1;
}

.area-est-row {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
}

.area-est-row-label {
  font-size: 0.78rem;
  color: var(--c-text-sub);
  white-space: nowrap;
}

.area-est-row-field {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.area-coeff-input {
  width: 72px;
  padding: 0.32rem 0.55rem;
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  text-align: right;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1d4ed8;
  background: #fff;
  font-variant-numeric: tabular-nums;
}
.area-coeff-input:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.25);
}

.area-est-row-unit {
  margin-left: 0.15em;
  font-size: 0.72rem;
  color: var(--c-text-hint);
  white-space: nowrap;
}

.area-est-row--readonly .area-est-row-values {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
}

.area-est-row-main {
  color: #1d4ed8;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.area-est-row-sub {
  color: var(--c-text-sub);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.area-est-apply-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1.05rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, #4f46e5, #6366f1);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.28);
  transition: filter .15s ease, transform .05s ease;
}
.area-est-apply-btn:hover { filter: brightness(1.05); }
.area-est-apply-btn:active { transform: translateY(1px); }

.area-est-apply-icon {
  font-weight: 700;
  font-size: 1rem;
}

.area-est-hint {
  margin: 0.65rem 0 0;
  font-size: 0.72rem;
  color: var(--c-text-hint);
  line-height: 1.5;
}

.area-panel-inline {
  width: 100%;
  min-width: 0;
  box-shadow: var(--shadow-xs);
  border-color: var(--c-border);
  background: var(--white);
}

/* ── 参数区卡片 ──────────────────────────────────────────── */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  background: var(--gray-50);
  border-bottom: 1px solid var(--c-border);
}

.card-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--c-primary);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0;
}

.card-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--c-text);
  flex: 1;
}

.card-hint-inline {
  font-size: 0.75rem;
  color: var(--c-text-hint);
  font-style: italic;
}

.card-body { padding: 1rem; }

/* ── 表单字段 ────────────────────────────────────────────── */
.field-block { display: flex; flex-direction: column; gap: 0.3rem; }

.field-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-700);
  line-height: 1.3;
}

.field-label small {
  font-weight: 400;
  color: var(--c-text-hint);
}

.field-input {
  width: 100%;
  padding: 0.45rem 0.65rem;
  border: 1.5px solid var(--c-border-md);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--c-text);
  font-size: 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

.field-input[type="file"] {
  appearance: auto;
  -webkit-appearance: auto;
  padding: 0.35rem;
  font-size: 0.8rem;
  border-style: dashed;
  background: var(--gray-50);
  cursor: pointer;
}

.field-input[type="file"]:hover {
  background: var(--blue-50);
  border-color: var(--c-primary);
}

select.field-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' fill='none' stroke='%2394a3b8' stroke-width='1.5'%3E%3Cpolyline points='1 1 5 6 9 1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  padding-right: 1.75rem;
}

.field-input:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

.field-hint {
  font-size: 0.73rem;
  color: var(--c-text-hint);
  line-height: 1.4;
}

.field-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.field-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.75rem; }
.field-grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 0.75rem; }
.field-list-vertical { display: flex; flex-direction: column; gap: 1rem; }
.field-list-vertical .field-block { width: 100%; }

/* 坐标显示卡（地图上方信息条） */
.coord-info-bar {
  position: absolute;
  bottom: 28px;
  right: 12px;
  background: rgba(15,23,42,.70);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: rgba(255,255,255,.9);
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  pointer-events: none;
  display: flex;
  gap: 0.75rem;
}

.coord-info-bar span { opacity: .7; }
.coord-info-bar strong { font-weight: 600; }

/* ── 坐标 + 参数 嵌入左侧栏 ─────────────────────────────── */
.location-params { display: flex; flex-direction: column; gap: 0.65rem; }

/* ── PR 汇总条 ───────────────────────────────────────────── */
.pr-summary-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: linear-gradient(90deg, var(--blue-50), var(--green-50));
  border-bottom: 1px solid var(--c-border);
  flex-wrap: wrap;
}

.pr-item { display: flex; flex-direction: column; gap: 0.05rem; }

.pr-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-text-hint);
}

.pr-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-primary);
}

.pr-gauge-wrap {
  flex: 1;
  min-width: 80px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pr-gauge-bar {
  flex: 1;
  height: 6px;
  background: var(--gray-200);
  border-radius: 999px;
  overflow: hidden;
}

.pr-gauge-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-600), #22c55e);
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(.4,0,.2,1);
}

.pr-gauge-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--green-600);
  white-space: nowrap;
  min-width: 2.5rem;
}

/* ── 损失面板折叠按钮 ────────────────────────────────────── */
.loss-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--c-text-sub);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.loss-toggle:hover { border-color: var(--c-primary); color: var(--c-primary); background: var(--blue-50); }
.loss-toggle[aria-expanded="true"] { background: var(--blue-50); color: var(--c-primary); border-color: var(--blue-200); }

.toggle-arrow {
  width: 12px; height: 12px;
  transition: transform 0.25s cubic-bezier(.4,0,.2,1);
}

.loss-toggle[aria-expanded="true"] .toggle-arrow { transform: rotate(180deg); }

/* ── 损失面板 ────────────────────────────────────────────── */
.loss-body {
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(.4,0,.2,1), opacity 0.3s ease;
  max-height: 2000px;
  opacity: 1;
}

.loss-body.collapsed { max-height: 0; opacity: 0; }

.loss-group {
  padding: 0.75rem 1rem 0.6rem;
  border-bottom: 1px solid var(--c-border);
}

.loss-group:last-child { border-bottom: 0; }

.loss-group-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--c-text);
}

.loss-group-icon { font-size: 0.9rem; }
.loss-group-sub  { font-size: 0.72rem; font-weight: 400; color: var(--c-text-hint); }

.loss-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.5rem 0.75rem;
}

.loss-item { display: flex; flex-direction: column; gap: 0.2rem; }

.loss-label { font-size: 0.75rem; font-weight: 600; color: var(--gray-600); }

.loss-input-row { display: flex; align-items: center; gap: 0.3rem; }

.loss-input {
  width: 4.5rem;
  padding: 0.3rem 0.4rem;
  border: 1.5px solid var(--c-border-md);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 0.85rem;
  text-align: right;
  color: var(--c-text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.loss-input:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 2px rgba(37,99,235,.1);
}

.loss-unit { font-size: 0.75rem; color: var(--c-text-sub); flex-shrink: 0; }

.loss-mini-bar-wrap {
  flex: 1;
  height: 5px;
  background: var(--gray-200);
  border-radius: 999px;
  overflow: hidden;
  max-width: 48px;
}

.loss-mini-bar {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--amber-600), #f59e0b);
  border-radius: 999px;
  width: 0%;
  transition: width 0.3s ease;
}

.loss-hint { font-size: 0.68rem; color: var(--c-text-hint); line-height: 1.3; }

.auto-note {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin-top: 0.4rem;
  font-size: 0.73rem;
  color: var(--c-text-sub);
  line-height: 1.4;
}

.auto-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.35rem;
  border-radius: 4px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
  letter-spacing: 0.02em;
}

/* ── 操作区 ──────────────────────────────────────────────── */
.action-top-row {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* ── 按钮系统 ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.48rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
  line-height: 1;
}

.btn:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: var(--c-primary);
  color: var(--white);
  border-color: var(--c-primary);
  box-shadow: 0 1px 3px rgba(37,99,235,.3);
}

.btn-primary:hover {
  background: var(--c-primary-dk);
  border-color: var(--c-primary-dk);
  box-shadow: 0 2px 6px rgba(37,99,235,.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--white);
  color: var(--c-primary);
  border-color: var(--blue-200);
}

.btn-secondary:hover {
  background: var(--blue-50);
  border-color: var(--c-primary);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--white);
  color: var(--c-text-sub);
  border-color: var(--c-border-md);
}

.btn-ghost:hover { background: var(--gray-100); color: var(--c-text); border-color: var(--gray-400); }

.btn-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--c-text-hint);
  font-size: 0.75rem;
  cursor: pointer;
}

.btn-link:hover { color: var(--red-600); text-decoration: underline; }

/* ── 草稿行 ──────────────────────────────────────────────── */
.draft-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--c-border);
}

.draft-hint { font-size: 0.73rem; color: var(--c-text-hint); }

/* ── 进度条 ──────────────────────────────────────────────── */
.progress-wrap { margin-top: 0.75rem; }

.progress-label {
  font-size: 0.78rem;
  color: var(--c-text-sub);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.progress-label::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-primary);
  animation: pulse-dot 1.2s ease-in-out infinite;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: var(--gray-200);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--c-primary), #60a5fa);
  border-radius: 999px;
  width: 0%;
  transition: width 0.35s ease;
}

/* ── 状态行 ──────────────────────────────────────────────── */
.status-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.75rem;
  background: var(--gray-50);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--c-text-sub);
  margin-top: 0.75rem;
  transition: background 0.2s;
}

.status-line.busy {
  background: var(--amber-50);
  border-color: var(--amber-100);
  color: var(--amber-600);
}

.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.ready  { background: var(--green-600); }
.status-dot.busy   { background: var(--amber-600); animation: pulse-dot 1.2s ease-in-out infinite; }
.status-dot.error  { background: var(--red-600); }
.status-dot.done   { background: var(--c-primary); }

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.45); opacity: 0.55; }
}

/* ── 消息框 ──────────────────────────────────────────────── */
.msg-box {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  white-space: pre-wrap;
  line-height: 1.55;
  border: 1px solid;
  margin-top: 0.65rem;
}

.msg-box.err { background: var(--red-50);   border-color: #fca5a5; color: #991b1b; }
.msg-box.ok  { background: var(--green-50); border-color: #86efac; color: #166534; }

/* ── 对比结果卡片 (Dashboard 风格) ────────────────────────── */
.compare-box {
  margin-top: 1rem;
}

.res-card {
  background: var(--white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.res-header {
  padding: 0.85rem 1.25rem;
  background: var(--gray-50);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.res-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--c-text);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.res-title svg {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--c-primary);
}

.res-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.res-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.res-badge.gray { background: var(--gray-200); color: var(--gray-700); }
.res-badge.delta-pos { background: var(--green-50); color: var(--green-700); border: 1px solid var(--green-200); }
.res-badge.delta-neg { background: var(--red-50); color: var(--red-700); border: 1px solid var(--red-200); }
.res-badge.delta-zero { background: var(--gray-100); color: var(--gray-600); }

.res-skipped {
  padding: 0.5rem 1.25rem;
  background: var(--amber-50);
  color: var(--amber-800);
  font-size: 0.8rem;
  border-bottom: 1px solid var(--amber-200);
}

.res-grid {
  display: flex;
  flex-wrap: wrap;
  padding: 1.25rem;
  gap: 1.5rem;
}

.res-col {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.res-divider {
  width: 1px;
  background: var(--c-border);
  margin: 0 0.5rem;
}

.res-col-title {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.res-value-group {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.res-label {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.res-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--c-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.res-val small {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-400);
  margin-left: 1px;
}

.res-footer {
  padding: 0.85rem 1.25rem;
  background: var(--blue-50);
  border-top: 1px solid var(--blue-100);
  font-size: 0.85rem;
  color: var(--blue-900);
  text-align: center;
}

@media (max-width: 600px) {
  .res-grid { flex-direction: column; gap: 1.25rem; }
  .res-divider { width: 100%; height: 1px; margin: 0; }
}

/* ── 参考信息 ────────────────────────────────────────────── */
.ref-section {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  font-size: 0.78rem;
}

.ref-section summary {
  padding: 0.55rem 1rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--c-text-hint);
  user-select: none;
  list-style: none;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ref-section summary::before {
  content: "›";
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.2s;
  display: inline-block;
}

.ref-section[open] summary::before { transform: rotate(90deg); }

.ref-section summary:hover { background: var(--gray-50); color: var(--c-text-sub); }
.ref-section[open] summary { background: var(--gray-50); border-bottom: 1px solid var(--c-border); color: var(--c-text-sub); }

.ref-body {
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  color: var(--c-text-sub);
  line-height: 1.6;
}

.ref-body a { color: var(--c-primary); text-decoration: none; }
.ref-body a:hover { text-decoration: underline; }

.ref-body code {
  background: var(--gray-100);
  border: 1px solid var(--c-border);
  border-radius: 4px;
  padding: 0.1em 0.3em;
  font-size: 0.9em;
  font-family: "SFMono-Regular", Consolas, monospace;
}

.disclaimer {
  font-size: 0.72rem;
  color: var(--c-text-hint);
  padding-top: 0.35rem;
  border-top: 1px solid var(--c-border);
  margin-top: 0.1rem;
}

/* ── 工具类 ──────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── 响应式 ──────────────────────────────────────────────── */
@media (max-width: 860px) {
  html, body { overflow: auto; }

  .header-inner {
    flex-wrap: wrap;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
  }
  .site-header {
    height: auto;
    min-height: var(--header-h);
  }
  .project-toolbar {
    width: 100%;
    order: 3;
  }
  .project-select {
    flex: 1;
    max-width: none;
  }
  .header-meta {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .project-meta {
    width: 100%;
    text-align: right;
  }

  .app-shell {
    position: static;
    flex-direction: column;
    height: auto;
  }

  .param-panel {
    width: 100%;
    height: auto;
    overflow-y: visible;
    border-right: none;
    border-bottom: 1px solid var(--c-border);
  }

  .map-panel {
    height: 420px;
    flex: none;
  }

  .map-toolbar { position: absolute; }
  .map-toolbar-card { max-width: none; }
  .area-panel { min-width: 0; width: 100%; }
  .area-estimator-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .area-toolbar { flex-wrap: wrap; }
  .map-hint, .coord-info-bar { display: none; }

  .field-grid-4 { grid-template-columns: 1fr 1fr; }
  .field-grid-3 { grid-template-columns: 1fr 1fr; }
  .loss-grid    { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 500px) {
  :root { --sidebar-w: 100%; }
  .field-grid-2, .field-grid-3, .field-grid-4 { grid-template-columns: 1fr; }
  .action-top-row { flex-direction: column; align-items: stretch; }
  .loss-grid { grid-template-columns: 1fr; }

  .area-toolbar {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .map-basemap-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }
  .map-layer-label { padding: 0.1rem 0 0; }
  .layer-btn { font-size: 0.62rem; padding: 0.4rem 0.25rem; }
}

/* ── 实用工具类 ────────────────────────────────────────────── */
.mt-3 {
  margin-top: 0.75rem;
}

.year-mode-block {
  min-width: 200px;
  flex: 1;
}

/* ── 项目管理页 ─────────────────────────────────────────── */
.project-page {
  min-height: 100vh;
  background: var(--c-bg);
  color: var(--c-text);
  overflow: auto;
}

.project-page-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--gray-900);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.project-page-header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.project-page-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.project-page-sub {
  margin-top: 0.15rem;
  font-size: 0.8rem;
  color: var(--gray-300);
}

.project-page-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.project-page-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1rem;
}

.project-page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.project-page-hint {
  font-size: 0.82rem;
  color: var(--gray-600);
}

.project-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.8rem;
}

.project-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 0.8rem;
}

.project-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.project-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-900);
}

.project-card-tag {
  font-size: 0.68rem;
  color: #1d4ed8;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 0.1rem 0.4rem;
  white-space: nowrap;
}

.project-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.48rem;
}

.project-card-label {
  display: block;
  font-size: 0.72rem;
  color: var(--gray-500);
}

.project-card-value {
  font-size: 0.9rem;
  color: var(--gray-900);
}

.project-card-actions {
  margin-top: 0.7rem;
  display: flex;
  justify-content: flex-end;
}

.project-empty {
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-md);
  color: var(--gray-600);
  background: #fff;
  padding: 1rem;
  text-align: center;
}

/* ── 光储微网 / PV-ESS 顶部身份标识 ───────────────────────── */
.pv-ess-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 0.85rem;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #ecfeff 0%, #fff7ed 100%);
  border: 1px solid #99f6e4;
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.pv-ess-badge.hidden {
  display: none;
}

.pv-ess-badge-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: linear-gradient(180deg, #14b8a6 0%, #f59e0b 100%);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.18);
  flex-shrink: 0;
}

.pv-ess-badge-link {
  margin-left: 0.5rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  color: #fff;
  font-weight: 600;
  font-size: 0.7rem;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 120ms ease;
}

.pv-ess-badge-link:hover {
  background: #0f172a;
}
