/* ============================================================
   茶产业金融服务平台 — 设计系统
   高级商业化风格：深色主题 + 翡翠绿品牌色 + 琥珀金强调色
   ============================================================ */

:root {
  /* 主色：翡翠绿（茶产业气质）*/
  --brand-50:  #ecfdf5;
  --brand-100: #d1fae5;
  --brand-300: #6ee7b7;
  --brand-400: #34d399;
  --brand-500: #10b981;
  --brand-600: #059669;
  --brand-700: #047857;

  /* 强调色：琥珀金 */
  --gold-300: #fcd34d;
  --gold-400: #fbbf24;
  --gold-500: #f59e0b;

  /* 中性深色背景 */
  --bg-0: #0a0f0d;      /* 最深底 */
  --bg-1: #0f1714;      /* 页面底 */
  --bg-2: #141f1a;      /* 卡片底 */
  --bg-3: #1a2922;      /* 卡片浮层 */
  --bg-4: #213229;      /* 悬浮/hover */

  /* 文字 */
  --text-0: #f4faf7;
  --text-1: #c8d6cf;
  --text-2: #8da399;
  --text-3: #5e7068;

  /* 边框/分割 */
  --line: rgba(110, 231, 183, 0.12);
  --line-2: rgba(255, 255, 255, 0.06);

  /* 风险等级色 */
  --risk-a: #34d399;   /* 绿 */
  --risk-b: #fbbf24;   /* 黄 */
  --risk-c: #fb923c;   /* 橙 */
  --risk-d: #f87171;   /* 红 */
  --info-blue: #60a5fa;

  /* 阴影 */
  --shadow-card: 0 10px 40px -12px rgba(0,0,0,0.55);
  --shadow-pop: 0 24px 70px -10px rgba(0,0,0,0.7);
  --glow-brand: 0 0 30px -6px rgba(16,185,129,0.45);

  /* 圆角 */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* 过渡 */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* 默认主题标记 */
  --map-tile: dark;
}

/* ============================================================
   浅色主题（通过 data-theme="light" 切换）
   ============================================================ */
[data-theme="light"] {
  --brand-300: #10b981;
  --brand-400: #059669;
  --brand-600: #047857;

  --gold-400: #d97706;
  --gold-500: #b45309;

  /* 中性浅色背景 */
  --bg-0: #e8efe9;
  --bg-1: #f3f7f4;      /* 页面底 */
  --bg-2: #ffffff;      /* 卡片底 */
  --bg-3: #f6faf8;      /* 卡片浮层 */
  --bg-4: #eef4f0;      /* 悬浮/hover */

  /* 文字 */
  --text-0: #14241d;
  --text-1: #41564c;
  --text-2: #6b8278;
  --text-3: #93a89e;

  /* 边框/分割 */
  --line: rgba(16, 185, 129, 0.16);
  --line-2: rgba(0, 0, 0, 0.07);

  /* 阴影（浅色下更柔和） */
  --shadow-card: 0 8px 30px -14px rgba(20, 60, 45, 0.18);
  --shadow-pop: 0 20px 50px -12px rgba(20, 60, 45, 0.22);
  --glow-brand: 0 0 24px -6px rgba(16, 185, 129, 0.3);

  --map-tile: light;
}

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

html, body {
  height: 100%;
  background: var(--bg-1);
  color: var(--text-1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#app { height: 100vh; }

/* 主题切换平滑过渡（作用于所有元素的背景/边框/颜色/阴影） */
.page, .topbar, .sidebar, .card, .kpi, .content, .modal, .input, .select, .textarea,
.filter-bar, .fb-tab, .ff-card, .w-cell, .financeable-box, .receipt-card, .role-chip,
.upload-zone, .sample-item, .op-item, .garden-item, .risk-hero, .dim-item, .risk-warn,
.success-banner, .forecast-box, .rec-result, .toast {
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease),
              color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

/* 数字使用等宽，金融感 */
.num, .num-l, .num-m, .num-s {
  font-family: "SF Mono", "JetBrains Mono", "Roboto Mono", Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

a { color: var(--brand-300); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(110,231,183,0.18); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(110,231,183,0.32); }

/* ============================================================
   动画关键帧
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
}
@keyframes shimmer {
  0% { background-position: -468px 0; }
  100% { background-position: 468px 0; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floaty {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes dash {
  to { stroke-dashoffset: 0; }
}
@keyframes countUp { from { opacity: 0; } to { opacity: 1; } }

/* 通用动画类（带延迟）*/
.anim-up { animation: fadeInUp 0.6s var(--ease-out) both; }
.anim-fade { animation: fadeIn 0.5s ease both; }
.anim-scale { animation: scaleIn 0.5s var(--ease-out) both; }
.d1 { animation-delay: 0.08s; }
.d2 { animation-delay: 0.16s; }
.d3 { animation-delay: 0.24s; }
.d4 { animation-delay: 0.32s; }
.d5 { animation-delay: 0.40s; }
.d6 { animation-delay: 0.48s; }
.d7 { animation-delay: 0.56s; }
.d8 { animation-delay: 0.64s; }

/* ============================================================
   通用布局
   ============================================================ */
.page {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(16,185,129,0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(245,158,11,0.05), transparent 55%),
    var(--bg-1);
}

/* 顶栏 */
.topbar {
  height: 62px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-3));
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  position: relative;
  z-index: 30;
}
.topbar .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text-0);
  letter-spacing: 0.5px;
}
.topbar .logo-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--glow-brand);
  position: relative;
  overflow: hidden;
}
.topbar .logo-mark::after {
  content: '茶';
  font-size: 18px;
  color: #fff;
  font-weight: 700;
}
.topbar .logo-sub {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 400;
  margin-left: 2px;
}
.topbar .topbar-right {
  margin-left: auto;
  display: flex; align-items: center; gap: 18px;
}
.topbar .role-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-1);
}
.topbar .role-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand-400);
  box-shadow: 0 0 8px var(--brand-400);
}
.topbar .avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #2a1d05;
}

/* 工作台主体：侧栏 + 内容 */
.work-body { flex: 1; display: flex; min-height: 0; }
.sidebar {
  width: 220px;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex; flex-direction: column; gap: 4px;
  flex-shrink: 0;
  overflow-y: auto;
}
.side-title {
  font-size: 11px; color: var(--text-3); letter-spacing: 1px;
  padding: 14px 12px 8px; text-transform: uppercase;
}
.side-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  color: var(--text-1);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  position: relative;
}
.side-item:hover { background: var(--bg-3); color: var(--text-0); }
.side-item.active {
  background: linear-gradient(90deg, rgba(16,185,129,0.18), rgba(16,185,129,0.04));
  color: var(--brand-300);
  font-weight: 600;
}
.side-item.active::before {
  content: ''; position: absolute; left: 0; top: 22%; bottom: 22%;
  width: 3px; border-radius: 2px;
  background: var(--brand-400);
  box-shadow: 0 0 10px var(--brand-400);
}
.side-item .si-icon { width: 18px; text-align: center; font-size: 16px; opacity: 0.9; }
.side-foot {
  margin-top: auto;
  padding: 14px 12px;
  font-size: 12px; color: var(--text-3);
  border-top: 1px solid var(--line-2);
}

.content {
  flex: 1; min-width: 0;
  padding: clamp(16px, 2.4vh, 26px) clamp(20px, 2.4vw, 32px) clamp(24px, 3vh, 40px);
  overflow-y: auto;
  position: relative;
}
.page-head { margin-bottom: 22px; }
.page-title {
  font-size: 22px; font-weight: 700; color: var(--text-0);
  display: flex; align-items: center; gap: 12px;
}
.page-sub { font-size: 13px; color: var(--text-2); margin-top: 6px; }

/* ============================================================
   卡片
   ============================================================ */
.card {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.card.hover-rise:hover { transform: translateY(-3px); border-color: rgba(110,231,183,0.28); }

.card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.card-title {
  font-size: 15px; font-weight: 700; color: var(--text-0);
  display: flex; align-items: center; gap: 9px;
}
.card-title .ct-bar {
  width: 4px; height: 16px; border-radius: 2px;
  background: linear-gradient(180deg, var(--brand-400), var(--brand-600));
}
.card-more { font-size: 12px; color: var(--text-2); cursor: pointer; transition: color .2s; }
.card-more:hover { color: var(--brand-300); }

/* 网格 */
.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-12 { grid-template-columns: 1fr 2fr; }
.g-21 { grid-template-columns: 2fr 1fr; }
/* 茶园气象地图页：地图占满整个内容区，左侧浮层卡片 */
.g-map-full { position: relative; width: 100%; height: calc(100vh - 62px - 86px); min-height: 420px; }
/* 仅 gardenMap 页取消内容区内边距与滚动，让地图铺满 */
.content:has(.g-map-full) { padding: 0; overflow: hidden; }
/* 地图容器占满 .g-map-full */
.garden-map-box { width: 100%; position: relative; height: 100%; }

/* 左侧浮层卡片：半透明可折叠（避让左上角 zoom 控件） */
.g-float-card {
  position: absolute; left: 14px; z-index: 650;
  width: clamp(240px, 22vw, 300px);
  background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: max-height 0.28s var(--ease-out);
}
[data-theme="light"] .g-float-card { background: rgba(255,255,255,0.92); border-color: rgba(20,36,29,0.1); }
[data-theme="dark"] .g-float-card,
.g-float-card { background: rgba(20,31,26,0.9); }
/* 列表卡从 80px 开始，避开左上角 Leaflet zoom 控件（约顶 70px） */
.g-float-card.gfc-list { top: 80px; max-height: calc(50% - 90px); }
.g-float-card.gfc-monitor { bottom: 14px; max-height: calc(50% - 20px); }
/* 折叠态：仅留标题条 */
.g-float-card.collapsed { max-height: 48px; }
.g-float-card.collapsed .gfc-body { display: none; }
.gfc-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; cursor: pointer; flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}
.g-float-card.collapsed .gfc-head { border-bottom-color: transparent; }
.gfc-head:hover { background: rgba(16,185,129,0.06); }
.gfc-title { font-size: 14px; font-weight: 700; color: var(--text-0); display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.gfc-live { font-size: 10px; padding: 2px 7px; }
.gfc-toggle { font-size: 13px; color: var(--text-2); flex-shrink: 0; }
.gfc-body { padding: 12px 14px; overflow-y: auto; flex: 1; min-height: 0; }
.gfc-body .garden-list { max-height: none; }
.gfc-body .weather-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gfc-body .w-cell { padding: 10px; }
.gfc-body .w-value { font-size: 18px; }
.gfc-body .forecast-box { margin-top: 8px; }

/* 窄屏：浮层卡片加宽、限高，避免遮挡地图 */
@media (max-width: 1180px) {
  .g-float-card { width: clamp(220px, 30vw, 280px); }
}
@media (max-width: 768px) {
  .g-float-card { width: calc(100% - 28px); }
  .g-float-card.gfc-list { top: 80px; max-height: calc(40% - 16px); }
  .g-float-card.gfc-monitor { max-height: calc(48% - 16px); }
}
.span-2 { grid-column: span 2; }
@media (max-width: 1180px) {
  .g-4 { grid-template-columns: repeat(2, 1fr); }
  .g-3 { grid-template-columns: repeat(2, 1fr); }
  .g-12, .g-21 { grid-template-columns: 1fr; }
}

/* ============================================================
   KPI 指标卡
   ============================================================ */
.kpi {
  background: linear-gradient(150deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.kpi::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-400), transparent);
  opacity: 0.6;
}
.kpi:hover { transform: translateY(-3px); border-color: rgba(110,231,183,0.3); }
.kpi .kpi-label {
  font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 7px;
}
.kpi .kpi-icon {
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  background: rgba(16,185,129,0.12); color: var(--brand-300);
  margin-left: auto;
}
.kpi .kpi-value {
  font-size: 30px; font-weight: 700; color: var(--text-0);
  margin-top: 12px; line-height: 1.1;
}
.kpi .kpi-value .unit { font-size: 14px; color: var(--text-2); margin-left: 4px; font-weight: 400; }
.kpi .kpi-delta {
  margin-top: 10px; font-size: 12px;
  display: flex; align-items: center; gap: 5px;
}
.kpi-delta.up { color: var(--brand-400); }
.kpi-delta.down { color: var(--risk-d); }
.kpi-delta.flat { color: var(--text-2); }

/* ============================================================
   数据看板 —— flex 铺满布局：一屏可见、下方不留空、风险环图居中最醒目
   ============================================================ */
/* 看板容器高度 = 视口 - 顶栏(62) - 页面头(62+22) - 上内边距(26)，铺满到视口底部、下方不留空 */
.dash-wrap {
  display: flex; flex-direction: column;
  height: calc(100vh - 62px - 84px - 26px);
  min-height: 360px;
  gap: clamp(12px, 1.6vh, 18px);
}
/* 看板页取消 content 下内边距，使看板铺满到视口底部 */
.content:has(.dash-wrap) { padding-bottom: 0; }
/* 顶部 KPI：恢复原有大字号 */
.dash-kpis { gap: clamp(12px, 1.5vw, 18px); flex-shrink: 0; }
.dash-kpis .kpi { padding: clamp(14px, 1.8vh, 20px) clamp(16px, 1.6vw, 24px); }
.dash-kpis .kpi .kpi-value { font-size: clamp(26px, 3vh, 32px); margin-top: 12px; }
.dash-kpis .kpi .kpi-delta { margin-top: 10px; }
/* 主区：三列 flex，撑满剩余高度，下方不留空 */
.dash-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: clamp(12px, 1.5vw, 18px); }
.dash-col { display: flex; flex-direction: column; gap: clamp(12px, 1.5vw, 18px); min-height: 0; }
.dash-grow { flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* 图表容器弹性填满卡片剩余空间 */
.dash-fill-chart { flex: 1; min-height: 0; width: 100%; }
.dash-half-chart { height: clamp(150px, 24vh, 300px); width: 100%; }
/* 中间风险环图卡片：突出醒目 */
.dash-col-center { display: flex; flex-direction: column; }
.dash-risk-card {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(16,185,129,0.06), var(--bg-2));
  border-color: rgba(110,231,183,0.28);
  box-shadow: 0 0 0 1px rgba(110,231,183,0.12), var(--shadow-card);
}
.dash-risk-chart { flex: 1; min-height: 180px; width: 100%; }
.dash-risk-legend {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px;
  padding-top: 14px; margin-top: 4px; border-top: 1px solid var(--line);
}
.drl-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.drl-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.drl-name { color: var(--text-1); flex: 1; }
.drl-val { color: var(--text-0); font-weight: 700; font-family: 'DIN', monospace; }
.drl-pct { color: var(--text-3); font-size: 12px; min-width: 38px; text-align: right; }
/* 待办列表 */
.dash-todo { display: flex; flex-direction: column; gap: clamp(8px, 1.1vh, 12px); flex: 1; }
.dash-todo-row { display: flex; align-items: center; gap: 12px; font-size: 13px; }
/* 窄屏：主区堆叠为单列 */
@media (max-width: 1180px) {
  .dash-kpis { grid-template-columns: repeat(2, 1fr); }
  .dash-main { grid-template-columns: 1fr; }
  .dash-half-chart { height: 180px; }
  .dash-risk-chart { min-height: 240px; }
}
/* 矮屏：KPI 字号略缩，保证一屏 */
@media (max-height: 820px) {
  .dash-kpis .kpi .kpi-value { font-size: 24px; }
  .dash-half-chart { height: clamp(120px, 18vh, 200px); }
}

/* ============================================================
   标签 / 徽章
   ============================================================ */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 11px; border-radius: 20px;
  font-size: 12px; font-weight: 500; line-height: 1.5;
  border: 1px solid transparent;
}
.tag-green { background: rgba(52,211,153,0.14); color: var(--brand-300); border-color: rgba(52,211,153,0.3); }
.tag-yellow { background: rgba(251,191,36,0.14); color: var(--gold-400); border-color: rgba(251,191,36,0.3); }
.tag-orange { background: rgba(251,146,60,0.14); color: #fb923c; border-color: rgba(251,146,60,0.3); }
.tag-red { background: rgba(248,113,113,0.14); color: var(--risk-d); border-color: rgba(248,113,113,0.3); }
.tag-blue { background: rgba(96,165,250,0.14); color: var(--info-blue); border-color: rgba(96,165,250,0.3); }
.tag-gray { background: rgba(255,255,255,0.06); color: var(--text-2); border-color: var(--line-2); }
.tag-brand { background: rgba(16,185,129,0.14); color: var(--brand-300); border-color: rgba(16,185,129,0.3); }

/* 风险等级徽章（A/B/C/D）*/
.grade-badge {
  width: 38px; height: 38px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; font-family: "SF Mono", monospace;
  border: 1px solid transparent;
}
.grade-A { background: rgba(52,211,153,0.16); color: var(--brand-400); border-color: rgba(52,211,153,0.4); }
.grade-B { background: rgba(251,191,36,0.16); color: var(--gold-400); border-color: rgba(251,191,36,0.4); }
.grade-C { background: rgba(251,146,60,0.16); color: #fb923c; border-color: rgba(251,146,60,0.4); }
.grade-D { background: rgba(248,113,113,0.16); color: var(--risk-d); border-color: rgba(248,113,113,0.4); }

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600; color: var(--text-1);
  background: var(--bg-3); border: 1px solid var(--line);
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: var(--bg-4); color: var(--text-0); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
  color: #fff; border-color: transparent;
  box-shadow: 0 6px 20px -6px rgba(16,185,129,0.6);
}
.btn-primary:hover { box-shadow: 0 10px 28px -6px rgba(16,185,129,0.75); transform: translateY(-2px); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: #2a1d05; border-color: transparent; font-weight: 700;
  box-shadow: 0 6px 20px -6px rgba(245,158,11,0.55);
}
.btn-gold:hover { transform: translateY(-2px); }
.btn-ghost { background: transparent; }
.btn-danger { background: rgba(248,113,113,0.12); color: var(--risk-d); border-color: rgba(248,113,113,0.35); }
.btn-danger:hover { background: rgba(248,113,113,0.2); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 30px; font-size: 15px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

/* ============================================================
   表单
   ============================================================ */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; font-size: 13px; color: var(--text-2);
  margin-bottom: 8px; font-weight: 500;
}
.form-label .req { color: var(--risk-d); margin-left: 3px; }
.input, .select, .textarea {
  width: 100%; padding: 12px 14px;
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--r-sm); color: var(--text-0); font-size: 14px;
  transition: border-color 0.25s, box-shadow 0.25s;
  font-family: inherit;
}
.input::placeholder { color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
}
.textarea { resize: vertical; min-height: 80px; }
.select { cursor: pointer; }
.form-row { display: flex; gap: 16px; }
.form-row > * { flex: 1; }

/* ============================================================
   表格
   ============================================================ */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: left; padding: 13px 16px;
  color: var(--text-2); font-weight: 500; font-size: 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td {
  padding: 15px 16px; border-bottom: 1px solid var(--line-2);
  color: var(--text-1); vertical-align: middle;
}
.tbl tbody tr { transition: background 0.2s; }
.tbl tbody tr:hover { background: rgba(16,185,129,0.05); }
.tbl .td-strong { color: var(--text-0); font-weight: 600; }
.tbl .row-action {
  color: var(--brand-300); cursor: pointer; font-size: 13px; font-weight: 600;
  transition: color 0.2s;
}
.tbl .row-action:hover { color: var(--brand-400); }

/* ============================================================
   进度条
   ============================================================ */
.progress {
  height: 6px; background: rgba(255,255,255,0.06); border-radius: 4px; overflow: hidden;
}
.progress > div {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--brand-400), var(--brand-600));
  transition: width 0.9s var(--ease-out);
}
.progress.yellow > div { background: linear-gradient(90deg, var(--gold-400), var(--gold-500)); }
.progress.red > div { background: linear-gradient(90deg, #fb923c, var(--risk-d)); }

/* ============================================================
   描述列表（key-value 信息块）
   ============================================================ */
.desc { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px; }
.desc-item { display: flex; flex-direction: column; gap: 5px; }
.desc-label { font-size: 12px; color: var(--text-2); }
.desc-value { font-size: 15px; color: var(--text-0); font-weight: 500; }
.desc-value.num { font-size: 16px; }

/* 分割 */
.divider { height: 1px; background: var(--line-2); margin: 20px 0; }
.section-title {
  font-size: 14px; font-weight: 700; color: var(--text-0);
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.section-title .st-num {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--bg-3); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--brand-300); font-family: monospace;
}

/* 空状态 / loading */
.loading-spin {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid rgba(16,185,129,0.2);
  border-top-color: var(--brand-400);
  animation: spin 0.8s linear infinite;
}

/* ============================================================
   Toast
   ============================================================ */
.toast-wrap {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.toast {
  background: linear-gradient(135deg, var(--bg-3), var(--bg-4));
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 13px 22px; color: var(--text-0); font-size: 14px;
  box-shadow: var(--shadow-pop); display: flex; align-items: center; gap: 10px;
  animation: slideInRight 0.4s var(--ease-out), fadeIn 0.3s ease;
}
.toast.success { border-color: rgba(52,211,153,0.4); }
.toast.success .t-ico { color: var(--brand-400); }
.toast.warn { border-color: rgba(251,191,36,0.4); }
.toast.warn .t-ico { color: var(--gold-400); }
.toast.error { border-color: rgba(248,113,113,0.4); }
.toast.error .t-ico { color: var(--risk-d); }
.toast .t-ico { font-size: 17px; }
.modal-mask {
  position: fixed; inset: 0; background: rgba(4,8,6,0.65);
  backdrop-filter: blur(6px); z-index: 200;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.3s ease;
}
[data-theme="light"] .modal-mask { background: rgba(40,50,45,0.35); }
.modal {
  width: 480px; max-width: 92vw;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--shadow-pop); padding: 28px;
  animation: scaleIn 0.35s var(--ease-out);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-title { font-size: 17px; font-weight: 700; color: var(--text-0); }
.modal-x { color: var(--text-2); cursor: pointer; font-size: 20px; transition: color .2s; }
.modal-x:hover { color: var(--text-0); }
.modal-foot { display: flex; gap: 12px; justify-content: flex-end; margin-top: 22px; }

/* Leaflet 地图深色适配 */
.leaflet-container { background: var(--bg-1) !important; font-family: inherit !important; }
.leaflet-popup-content-wrapper {
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2)) !important;
  color: var(--text-1) !important; border: 1px solid var(--line) !important;
  border-radius: var(--r-md) !important; box-shadow: var(--shadow-pop) !important;
}
.leaflet-popup-tip { background: var(--bg-3) !important; }
.leaflet-popup-content { margin: 14px 16px !important; }
.leaflet-control-attribution { display: none !important; }
.leaflet-bar a { background: var(--bg-3) !important; color: var(--text-1) !important; border-color: var(--line) !important; }

/* ============================================================
   视图切换过渡
   ============================================================ */
.fade-enter-active, .fade-leave-active { transition: opacity 0.28s ease; }
.fade-enter-from, .fade-leave-to { opacity: 0; }

.slide-enter-active { transition: all 0.4s var(--ease-out); }
.slide-enter-from { opacity: 0; transform: translateX(20px); }

/* 内容区子视图过渡 */
.view-enter-active { transition: all 0.45s var(--ease-out); }
.view-enter-from { opacity: 0; transform: translateY(16px); }
.view-leave-active { transition: all 0.2s ease; position: absolute; width: 100%; }
.view-leave-to { opacity: 0; transform: translateY(-8px); }

/* 列表行入场 */
.row-enter-active { transition: all 0.4s var(--ease-out); }
.row-enter-from { opacity: 0; transform: translateX(-14px); }

/* 链路节点连线 */
.flow-line { stroke: var(--brand-400); stroke-width: 2; fill: none; stroke-dasharray: 6 6; animation: dash 1s linear infinite; }
@keyframes dash-flow { to { stroke-dashoffset: -100; } }

/* 评分大数字渐显 */
.score-big { animation: scaleIn 0.7s var(--ease-out) both; }

/* 自定义脉冲点（地图风险）*/
.pulse-dot { animation: pulseGlow 2s infinite; }

/* ============================================================
   上传区
   ============================================================ */
.upload-zone {
  border: 2px dashed rgba(110,231,183,0.3);
  border-radius: var(--r-md);
  padding: 44px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  background: rgba(16,185,129,0.03);
}
.upload-zone:hover {
  border-color: var(--brand-400);
  background: rgba(16,185,129,0.08);
  transform: translateY(-2px);
}
.up-icon { font-size: 40px; margin-bottom: 12px; animation: floaty 4s ease-in-out infinite; }
.up-text { font-size: 15px; color: var(--text-0); font-weight: 600; }
.up-hint { font-size: 12px; color: var(--text-3); margin-top: 8px; }

.sample-list { display: flex; flex-direction: column; gap: 10px; }
.sample-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--bg-1); border: 1px solid var(--line);
  cursor: pointer; transition: all 0.25s var(--ease);
}
.sample-item:hover { border-color: rgba(110,231,183,0.4); transform: translateX(4px); }
.sample-item.active { border-color: var(--brand-400); background: rgba(16,185,129,0.08); }
.sample-item .sp-icon { font-size: 22px; }
.sample-item .sp-name { font-size: 13px; color: var(--text-0); font-weight: 500; }
.sample-item .sp-desc { font-size: 11px; color: var(--text-2); margin-top: 2px; }

.empty-state {
  padding: 50px 20px; text-align: center; color: var(--text-3);
}
.empty-state .es-icon { font-size: 44px; opacity: 0.5; margin-bottom: 12px; }
.empty-state .es-text { font-size: 13px; }

/* 识别进度 */
.recognizing { padding: 10px 0; }
.rec-line {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0; font-size: 13px; color: var(--text-3);
  transition: color 0.4s;
}
.rec-line.done { color: var(--brand-300); }
.rec-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg-4); border: 2px solid var(--text-3);
  transition: all 0.4s;
}
.rec-dot.active { border-color: var(--brand-400); animation: pulseGlow 1.2s infinite; }
.rec-dot.done { background: var(--brand-400); border-color: var(--brand-400); }
.conf { font-family: monospace; font-size: 12px; padding: 2px 7px; border-radius: 10px; }
.conf.high { background: rgba(52,211,153,0.16); color: var(--brand-400); }
.conf.mid { background: rgba(251,191,36,0.16); color: var(--gold-400); }
.conf.low { background: rgba(248,113,113,0.16); color: var(--risk-d); }

/* 订单选择 */
.order-pick { display: flex; flex-direction: column; gap: 12px; }
.op-item {
  padding: 14px 16px; border-radius: var(--r-md);
  background: var(--bg-1); border: 1.5px solid var(--line);
  cursor: pointer; transition: all 0.25s var(--ease);
}
.op-item:hover { border-color: rgba(110,231,183,0.4); transform: translateX(4px); }
.op-item.active { border-color: var(--brand-400); background: rgba(16,185,129,0.08); box-shadow: 0 0 0 3px rgba(16,185,129,0.1); }
.op-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.op-id { font-size: 12px; color: var(--text-2); }
.op-buyer { font-size: 14px; color: var(--text-0); font-weight: 600; margin-bottom: 4px; }
.op-prod { font-size: 12px; color: var(--text-2); margin-bottom: 10px; }
.op-foot { display: flex; align-items: center; justify-content: space-between; }
.op-amt { font-size: 17px; color: var(--brand-300); font-weight: 700; }
.op-due { font-size: 11px; color: var(--text-3); }

/* 可融资金额展示盒 */
.financeable-box {
  display: flex; align-items: center; gap: 20px;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(16,185,129,0.04));
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--r-md);
}
.fb-label { font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.fb-value { font-size: 30px; font-weight: 700; color: var(--brand-300); font-family: monospace; }
.fb-right { flex: 1; }
.fb-formula { font-size: 12px; color: var(--text-1); margin-bottom: 6px; font-family: monospace; }
.fb-tip { font-size: 11px; color: var(--text-3); }

/* ============================================================
   筛选 tab 栏
   ============================================================ */
.filter-bar { display: flex; align-items: center; justify-content: space-between; }
.fb-tabs { display: flex; gap: 6px; }
.fb-tab {
  padding: 8px 18px; border-radius: 20px; cursor: pointer;
  font-size: 13px; color: var(--text-2); background: var(--bg-2);
  border: 1px solid var(--line); transition: all 0.25s var(--ease);
}
.fb-tab:hover { color: var(--text-0); border-color: rgba(110,231,183,0.3); }
.fb-tab.active { background: linear-gradient(135deg, var(--brand-400), var(--brand-600)); color: #fff; border-color: transparent; font-weight: 600; }
.fb-count { font-size: 13px; color: var(--text-3); }

/* ============================================================
   审批详情页
   ============================================================ */
.back-bar {
  display: inline-block; margin-bottom: 16px;
  color: var(--brand-300); cursor: pointer; font-size: 14px; font-weight: 500;
  transition: transform 0.2s;
}
.back-bar:hover { transform: translateX(-4px); }

.detail-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 18px; }
@media (max-width: 1180px) { .detail-grid { grid-template-columns: 1fr; } }

.text-grade-A { color: var(--brand-400); }
.text-grade-B { color: var(--gold-400); }
.text-grade-C { color: #fb923c; }
.text-grade-D { color: var(--risk-d); }
.text-red { color: var(--risk-d); }
.grade-tag-A { background: rgba(52,211,153,0.16); color: var(--brand-400); border-color: rgba(52,211,153,0.4); }
.grade-tag-B { background: rgba(251,191,36,0.16); color: var(--gold-400); border-color: rgba(251,191,36,0.4); }
.grade-tag-C { background: rgba(251,146,60,0.16); color: #fb923c; border-color: rgba(251,146,60,0.4); }
.grade-tag-D { background: rgba(248,113,113,0.16); color: var(--risk-d); border-color: rgba(248,113,113,0.4); }
.grade-badge.big { width: 56px; height: 56px; font-size: 30px; border-radius: 14px; }

/* 风控报告 */
.risk-card {
  background: linear-gradient(165deg, var(--bg-3), var(--bg-2));
  border: 1px solid rgba(110,231,183,0.18);
}
.risk-hero {
  display: flex; align-items: center; gap: 24px;
  padding: 22px; border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(245,158,11,0.04));
  border: 1px solid var(--line);
}
.rh-score { display: flex; align-items: baseline; }
.rh-num { font-size: 64px; font-weight: 800; line-height: 1; }
.rh-unit { font-size: 18px; color: var(--text-2); margin-left: 4px; }
.rh-grade { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rh-level { font-size: 12px; color: var(--text-2); }
.rh-meta { flex: 1; display: flex; flex-direction: column; gap: 8px; padding-left: 16px; border-left: 1px solid var(--line); }
.rh-meta-item { display: flex; flex-direction: column; }
.rh-meta-item > span:first-child { font-size: 11px; color: var(--text-3); }
.rh-meta-item > span:last-child { font-size: 14px; color: var(--text-0); font-weight: 600; }

.dim-list { margin-top: 20px; display: flex; flex-direction: column; gap: 18px; }
.dim-head { display: flex; align-items: center; justify-content: space-between; }
.dim-name { font-size: 14px; color: var(--text-1); font-weight: 600; }
.dim-weight { font-size: 11px; color: var(--text-3); margin-left: 8px; font-weight: 400; }
.dim-score { font-size: 18px; font-weight: 700; color: var(--text-0); }
.dim-level { font-size: 11px; margin-left: 6px; padding: 2px 7px; border-radius: 10px; background: rgba(255,255,255,0.08); }
.dim-detail { font-size: 12px; color: var(--text-2); margin-top: 6px; line-height: 1.5; }

.risk-warn {
  display: flex; gap: 12px; margin-top: 18px;
  padding: 16px 18px; border-radius: var(--r-md);
  background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.25);
}
.rw-icon { font-size: 20px; }
.rw-title { font-size: 13px; color: var(--gold-400); font-weight: 600; margin-bottom: 4px; }
.rw-text { font-size: 12px; color: var(--text-1); line-height: 1.6; }

/* ============================================================
   放款成功 + 资金流转
   ============================================================ */
.success-banner {
  display: flex; align-items: center; gap: 22px;
  padding: 26px 30px; border-radius: var(--r-lg);
  background: linear-gradient(120deg, rgba(16,185,129,0.16), rgba(16,185,129,0.04));
  border: 1px solid rgba(52,211,153,0.35);
}
.sb-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: #fff; font-weight: 700;
  box-shadow: var(--glow-brand);
  animation: scaleIn 0.5s var(--ease-out) both, pulseGlow 2.5s 0.5s infinite;
}
.sb-body { flex: 1; }
.sb-title { font-size: 22px; font-weight: 700; color: var(--text-0); }
.sb-text { font-size: 13px; color: var(--text-2); margin-top: 6px; }
.sb-amount { text-align: right; }
.sb-amount-num { font-size: 30px; font-weight: 800; color: var(--brand-300); font-family: monospace; }
.sb-amount-label { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.fund-flow { display: flex; flex-direction: column; gap: 0; }
.ff-node { display: flex; gap: 16px; position: relative; opacity: 0; transform: translateX(-20px); transition: all 0.5s var(--ease-out); }
.ff-node.show { opacity: 1; transform: translateX(0); }
.ff-dot {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  background: var(--bg-3); border: 1px solid var(--line); position: relative; z-index: 2;
}
.ff-loan { background: rgba(16,185,129,0.16); border-color: rgba(52,211,153,0.4); }
.ff-pay { background: rgba(245,158,11,0.16); border-color: rgba(251,191,36,0.4); }
.ff-repay { background: rgba(96,165,250,0.16); border-color: rgba(96,165,250,0.4); }
.ff-deduct { background: rgba(167,139,250,0.16); border-color: rgba(167,139,250,0.4); }
.ff-settle { background: rgba(52,211,153,0.16); border-color: rgba(52,211,153,0.4); }
.ff-card { flex: 1; padding: 16px 20px; background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 16px; }
.ff-node.current .ff-card { border-color: rgba(110,231,183,0.4); box-shadow: 0 0 0 3px rgba(16,185,129,0.1); }
.ff-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ff-label { font-size: 13px; font-weight: 700; padding: 3px 11px; border-radius: 6px; background: rgba(255,255,255,0.06); }
.ff-label.ff-loan { color: var(--brand-300); }
.ff-label.ff-pay { color: var(--gold-400); }
.ff-label.ff-repay { color: var(--info-blue); }
.ff-label.ff-deduct { color: #a78bfa; }
.ff-label.ff-settle { color: var(--brand-400); }
.ff-time { font-size: 12px; color: var(--text-3); }
.ff-route { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-1); margin-bottom: 8px; }
.ff-arrow { color: var(--brand-400); font-weight: 700; }
.ff-party { color: var(--text-0); font-weight: 500; }
.ff-amt { font-size: 22px; font-weight: 700; color: var(--brand-300); margin-bottom: 6px; }
.ff-desc { font-size: 12px; color: var(--text-2); }
.ff-connector {
  position: absolute; left: 21px; top: 44px; bottom: -16px; width: 2px;
  background: linear-gradient(180deg, var(--brand-400), transparent);
  opacity: 0; transition: opacity 0.5s;
}
.ff-connector.active { opacity: 0.4; }

/* ============================================================
   地图
   ============================================================ */
.map-card { padding: 0; }
.map-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-2); }
.lg-item { display: flex; align-items: center; gap: 6px; }
.lg-dot { width: 10px; height: 10px; border-radius: 50%; }
.garden-list { display: flex; flex-direction: column; gap: 10px; }
.garden-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border-radius: var(--r-sm); background: var(--bg-1); border: 1px solid var(--line);
  cursor: pointer; transition: all 0.25s var(--ease);
}
.garden-item:hover { border-color: rgba(110,231,183,0.4); transform: translateX(4px); }
.garden-item.active { border-color: var(--brand-400); background: rgba(16,185,129,0.08); }
.gi-dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 8px currentColor; }
.gi-name { font-size: 14px; color: var(--text-0); font-weight: 600; }
.gi-area { font-size: 11px; color: var(--text-2); margin-top: 2px; }

.weather-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.w-cell { padding: 14px; background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-sm); }
.w-label { font-size: 11px; color: var(--text-3); margin-bottom: 6px; }
.w-value { font-size: 22px; font-weight: 700; color: var(--text-0); }
.w-value .unit { font-size: 13px; color: var(--text-2); font-weight: 400; margin-left: 3px; }
.forecast-box { padding: 14px; background: rgba(96,165,250,0.06); border-radius: var(--r-sm); border: 1px solid rgba(96,165,250,0.2); }
.fc-label { font-size: 12px; color: var(--info-blue); font-weight: 600; margin-bottom: 6px; }
.fc-text { font-size: 13px; color: var(--text-1); line-height: 1.6; }

/* 地图标记自定义 */
.garden-marker { background: transparent; border: none; }
.gm-pin {
  width: 28px; height: 28px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: #fff; font-weight: 700; position: relative; top: -6px;
}
.gm-pulse {
  position: absolute; top: -6px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--c); opacity: 0.3;
  animation: pulseGlow 2s infinite;
}

/* ============================================================
   仓单卡片
   ============================================================ */
.receipt-card { padding: 16px; border-radius: var(--r-md); background: var(--bg-1); border: 1px solid var(--line); transition: all 0.25s var(--ease); }
.receipt-card:hover { border-color: rgba(110,231,183,0.4); transform: translateX(4px); }
.rc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rc-id { font-size: 12px; color: var(--text-2); }
.rc-prod { font-size: 14px; color: var(--text-0); font-weight: 500; margin-bottom: 12px; }
.rc-foot { display: flex; align-items: center; justify-content: space-between; }
.rc-amt { font-size: 18px; font-weight: 700; color: var(--brand-300); }

/* alert 行 */
.alert-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; }

/* ============================================================
   主题切换按钮
   ============================================================ */
.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-3); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.3s var(--ease);
  font-size: 17px;
}
.theme-toggle:hover { background: var(--bg-4); transform: rotate(15deg) scale(1.08); }
.theme-toggle .tt-ico { transition: transform 0.4s var(--ease); }

/* ============================================================
   地图气象图层控件
   ============================================================ */
.weather-layer-control {
  position: absolute; top: 12px; right: 12px; z-index: 600;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 10px;
  box-shadow: var(--shadow-card);
  min-width: 150px;
}
.wlc-title { font-size: 11px; color: var(--text-3); margin-bottom: 8px; letter-spacing: 0.5px; font-weight: 600; }
.wlc-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 6px; cursor: pointer;
  font-size: 12px; color: var(--text-1); transition: all 0.2s var(--ease);
}
.wlc-item:hover { background: var(--bg-3); color: var(--text-0); }
.wlc-item.active { background: rgba(16,185,129,0.14); color: var(--brand-300); font-weight: 600; }
.wlc-radio {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid var(--text-3); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.wlc-item.active .wlc-radio { border-color: var(--brand-400); }
.wlc-item.active .wlc-radio::after {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-400);
}
/* 分隔线 */
.wlc-divider { height: 1px; background: var(--line); margin: 8px 4px; }
/* 快捷视图切换（世界视图/四川茶产区） */
.wlc-action {
  justify-content: center; gap: 6px;
  font-size: 12px; color: var(--text-2);
  border: 1px dashed var(--line);
  margin-top: 2px;
}
.wlc-action:hover { border-color: var(--brand-400); color: var(--brand-300); background: rgba(16,185,129,0.08); }
/* 气象数据来源标识 */
.wlc-source {
  padding: 8px 10px; margin: 0 4px;
  font-size: 10px; line-height: 1.5; color: var(--text-3);
  background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.18); border-radius: var(--r-sm);
}
.wlc-source b { color: var(--brand-300); font-size: 11px; letter-spacing: 0.5px; }

/* 气象图层图例 */
.weather-legend {
  position: absolute; bottom: 30px; left: 12px; z-index: 600;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 10px 14px;
  box-shadow: var(--shadow-card);
  display: none;
}
.weather-legend.show { display: block; }
.wl-title { font-size: 11px; color: var(--text-3); font-weight: 600; margin-bottom: 6px; }
.wl-bar {
  width: 180px; height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, #e6e6e6, #ffaaff, #ff00ff, #910991, #554eb1, #3988c7, #4bb698, #bee43d, #eaa43e, #e15e5d, #be3066, #631416, #2b0001);
}
/* 温度图例（Ventusky 官方色板：-40℃ 浅灰/粉 → 0℃ 青绿 → 20℃ 橙 → 30℃ 红粉 → 50℃ 深红） */
.wl-bar.temp { background: linear-gradient(90deg, #e6e6e6, #ffaaff, #ff00ff, #910991, #554eb1, #3988c7, #4bb698, #bee43d, #eaa43e, #e15e5d, #be3066, #631416, #2b0001); }
/* 降水图例（Ventusky rain-1h：0mm 透明 → 0.1mm 极淡蓝紫 → 1mm 青 → 5mm 绿 → 10mm 橙 → 30mm 红粉 → 50mm 深红） */
.wl-bar.rain { background: linear-gradient(90deg, rgba(82,71,141,0.1), #52478d, #4369c4, #40a0b4, #bee43d, #eaa43e, #e15e5d, #be3066, #541029); }
.wl-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-2); margin-top: 4px; }

/* 地图水印/版权（高德）隐藏 */
.amap-copyright, .amap-logo { display: none !important; }

/* 浅色主题下地图控件、图例自动跟随变量，无需额外处理 */

