/*!
 * 伏虎工作台 UI Polish v1 — 观感统一覆盖层（2026-10-29）
 * 目标：P0 壳/字号/按钮/表/首页降噪/纪检Ledger皮；土地林地间接受益（P0/P1边界）
 * 禁区：不改密码、不改 Nav v259/钉选、不改 nfb_plots/nfb_patch、不改业务数据
 * 部署根：/opt/fhgw/app （经 :3000，非 fuhu-dangjian:3100）
 */
:root {
  --fh-primary: #1a56db;
  --fh-primary-hover: #1e40af;
  --fh-primary-soft: #eff6ff;
  --fh-accent: #1a56db; /* 收敛原 #2563eb → 主色 */
  --fh-success: #16a34a;
  --fh-success-bg: #f0fdf4;
  --fh-warning: #d97706;
  --fh-warning-bg: #fffbeb;
  --fh-danger: #dc2626;
  --fh-danger-bg: #fef2f2;
  --fh-info: #0891b2;
  --fh-text: #111827;
  --fh-text-2: #475569;
  --fh-text-muted: #6b7280;
  --fh-border: #e5e7eb;
  --fh-border-strong: #d1d5db;
  --fh-bg-page: #f8fafc;
  --fh-bg-card: #ffffff;
  --fh-sidebar: #1e293b;
  --fh-sidebar-text: #e2e8f0;
  --fh-zebra: #f8fafc;
  --fh-radius: 8px;
  --fh-radius-lg: 12px;
  --fh-shadow: 0 1px 3px rgba(0,0,0,.08);
  --fh-shadow-modal: 0 20px 40px rgba(15,23,42,.18);
  --fh-sidebar-width: 220px;
  --fh-topbar-height: 60px;
  /* 对齐 style.css 名义变量，减少双轨 */
  --primary: #1a56db;
  --primary-light: #3b82f6;
  --primary-dark: #1e40af;
  --primary-bg: #eff6ff;
  --sidebar-width: 220px;
  --topbar-height: 60px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* ===== P0-1 壳统一（以 index 现行视觉为准） ===== */
.sidebar {
  width: var(--fh-sidebar-width) !important;
  background: var(--fh-sidebar) !important;
  color: var(--fh-sidebar-text);
}
.sidebar.collapsed { width: 64px !important; }
.topbar { height: var(--fh-topbar-height) !important; background: #fff; border-bottom: 1px solid var(--fh-border); }
.page-container { padding: 24px !important; background: var(--fh-bg-page) !important; }
.nav-group-title,
.nav-group-head {
  color: #94a3b8 !important; /* 去掉刺眼金黄 */
  font-size: 12px !important;
  font-weight: 600;
  letter-spacing: .3px;
}
.nav-item.active {
  background: var(--fh-primary) !important;
  color: #fff !important;
  box-shadow: none;
}
.nav-item.active .nav-ico { color: #fff; }

/* ===== P0-2 字号阶梯 ===== */
.module-header h2,
.breadcrumb { font-size: 20px !important; font-weight: 700; color: var(--fh-text); }
.module-header p,
.lg-sub, .wh-sub { font-size: 13px; color: var(--fh-text-muted); }
.card-title, .lg-title, .wh-title { font-size: 16px !important; font-weight: 700; color: var(--fh-text); }
body { font-size: 14px; color: var(--fh-text); }
.data-table, .biz-table, table.lg-t, .lg-t { font-size: 13px !important; }
.stat-label, .lg-kpi span, .wh-kpi span, .caption, .text-muted { font-size: 12px; color: var(--fh-text-muted); }

/* ===== P0-3 按钮主次 ===== */
.btn {
  height: 36px; padding: 0 14px; border-radius: var(--fh-radius);
  font-size: 14px; font-weight: 600;
  border: 1px solid var(--fh-border-strong); background: #fff; color: #374151;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
}
.btn-primary, .btn.btn-primary {
  background: var(--fh-primary) !important; border-color: var(--fh-primary) !important; color: #fff !important;
}
.btn-primary:hover { background: var(--fh-primary-hover) !important; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--fh-primary); }
.lg-btn, .wh-btn, .dm-btn, .bc-tab {
  height: 36px !important; border-radius: var(--fh-radius) !important; font-size: 13px !important;
}
.lg-btn.pri, .wh-btn.pri, .dm-btn.on, .bc-tab.active {
  background: var(--fh-primary) !important;
  border-color: var(--fh-primary) !important;
  color: #fff !important;
}
.login-btn {
  background: var(--fh-primary) !important;
  border: none !important;
  box-shadow: var(--fh-shadow) !important;
}
.login-btn:hover { background: var(--fh-primary-hover) !important; transform: none !important; }

/* 登录绿残留压低：若仍渲染 .login-box 绿主题，强制贴蓝主色 */
.login-overlay { background: linear-gradient(135deg, #1a56db 0%, #3b82f6 100%) !important; }
.login-box .login-header { background: linear-gradient(135deg, #1a56db, #2563eb) !important; }
.login-box .login-btn,
.login-box button[type=submit] {
  background: var(--fh-primary) !important;
  box-shadow: var(--fh-shadow) !important;
}
.form-input:focus { border-color: var(--fh-primary) !important; box-shadow: 0 0 0 3px rgba(26,86,219,.12) !important; }

/* ===== P0-4 表格统一皮肤 ===== */
.data-table th, .biz-table th, table.lg-t th, .lg-t th {
  background: #f8fafc !important;
  color: #374151 !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 10px 12px !important;
  border-bottom: 1px solid var(--fh-border) !important;
  background-image: none !important;
}
.data-table td, .biz-table td, table.lg-t td, .lg-t td {
  padding: 10px 12px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  vertical-align: middle;
  font-size: 13px !important;
  color: #475569;
}
.data-table tbody tr:nth-child(even) td,
.biz-table tbody tr:nth-child(even) td,
table.lg-t tbody tr:nth-child(even) td,
.lg-t tbody tr:nth-child(even) td {
  background: var(--fh-zebra) !important;
}
.data-table tbody tr:hover td,
.biz-table tbody tr:hover td,
table.lg-t tbody tr:hover td,
tr.lg-row:hover td {
  background: #eff6ff !important;
}

/* ===== 卡片留白 / 轻阴影 ===== */
.card, .stat-card, .lg-card, .lg-kpi, .wh-kpi, .module-container, .welcome-banner {
  border: 1px solid var(--fh-border) !important;
  border-radius: var(--fh-radius-lg) !important;
  box-shadow: var(--fh-shadow) !important;
}
.card, .module-container { padding: 16px 18px; background: var(--fh-bg-card); }
.stat-card { padding: 16px 18px !important; }
.lg-kpi, .wh-kpi { padding: 12px 16px !important; }
.lg-kpi b, .wh-kpi b, .stat-value, .stat-num { color: var(--fh-text); font-weight: 700; }
.stat-value { font-size: 22px !important; }
.stat-num { font-size: 28px !important; }

/* ===== 弹窗轻收敛（P0 观感；完整收敛属 P1） ===== */
.modal, .lg-modal, .ov-modal, .pwd-force-modal {
  border-radius: var(--fh-radius-lg) !important;
  box-shadow: var(--fh-shadow-modal) !important;
}
.modal-mask, .lg-mask { background: rgba(15,23,42,.40) !important; }
.modal-header, .lg-mh { padding: 14px 18px !important; }
.modal-body, .lg-mb { padding: 16px 18px !important; }
.modal-footer, .lg-mf { padding: 12px 18px !important; background: #fafafa; }
.lg-f label, .form-label { font-size: 12px !important; font-weight: 600; color: #374151; margin-bottom: 6px; }
.lg-f input, .lg-f select, .lg-f textarea,
.lg-tools input, .lg-tools select {
  border: 1px solid var(--fh-border-strong) !important;
  border-radius: var(--fh-radius) !important;
}
.lg-f input:focus, .lg-f select:focus, .lg-f textarea:focus,
.lg-tools input:focus, .lg-tools select:focus {
  border-color: var(--fh-primary) !important;
  box-shadow: 0 0 0 3px rgba(26,86,219,.12) !important;
}

/* ===== P0-5 首页降噪 ===== */
.welcome-banner {
  background: linear-gradient(135deg, #1a56db, #3b82f6) !important;
  color: #fff !important;
  padding: 20px 24px !important;
  margin-bottom: 16px !important;
}
.welcome-banner h2 { font-size: 20px !important; color: #fff !important; }
.welcome-banner p { font-size: 13px !important; color: #e0e7ff !important; opacity: 1 !important; }
.date-info .big-date, .big-date { font-size: 28px !important; color: inherit; }
/* 快捷卡：压低边框噪音、统一圆角 */
.quick-card, .quick-strip .card, [class*="quick-"] {
  border-radius: var(--fh-radius-lg);
  box-shadow: var(--fh-shadow);
  border-color: var(--fh-border);
}

/* ===== P0-6 纪检 Ledger 皮（!important 压过运行时注入） ===== */
.lg-wrap { padding-bottom: 28px; }
.lg-head { margin-bottom: 14px !important; gap: 12px !important; }
.lg-ico, .wh-ico {
  background: var(--fh-primary-soft) !important;
  background-image: none !important;
  border-radius: 10px !important;
}
.lg-tools, .wh-tools {
  border-radius: var(--fh-radius-lg) !important;
  padding: 12px !important;
  margin-bottom: 14px !important;
  box-shadow: var(--fh-shadow);
}
.lg-a { color: var(--fh-primary) !important; }
.lg-tag { border-radius: 999px !important; padding: 2px 8px !important; font-size: 11px !important; }

/* ===== P0/P1 边界：土地/林地壳层观感（不改 land/forest/nfb 逻辑） ===== */
.bc-bar { padding: 8px 0 12px !important; gap: 8px !important; }
.bc-tab { border-radius: var(--fh-radius) !important; font-weight: 600 !important; }
.dm-wrap {
  border: 1px solid var(--fh-border) !important;
  border-radius: var(--fh-radius-lg) !important;
  box-shadow: var(--fh-shadow) !important;
}
.dm-top { background: #fafafa !important; padding: 12px !important; }
.dm-btn.on { background: var(--fh-primary) !important; border-color: var(--fh-primary) !important; }
.wh-l1 { border-radius: var(--fh-radius-lg) !important; border-color: var(--fh-border) !important; }
.wh-l1h { background: #f8fafc !important; background-image: none !important; }

/* 页框空态略收敛 */
.pf-frame, .pageframe, iframe.pageframe { border-radius: var(--fh-radius-lg); }
