/* ===== 水电数据分析模块（独立样式，不影响磅单模块） ===== */
.we-stats-bar{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:20px}
.we-stats-bar .stat-card{padding:14px 12px;gap:10px}
.we-stats-bar .stat-icon{width:36px;height:36px}
.we-stats-bar .stat-icon svg{width:18px;height:18px}
.we-stats-bar .stat-value{font-size:1.1rem}
.we-stats-bar .stat-label{font-size:.7rem;white-space:nowrap}
.we-chart-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:20px}
.we-chart-wide{grid-column:1/-1}
.we-chart-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px}
.we-chart-card canvas{height:280px !important;width:100% !important}
.we-scroll-wrap{height:280px;overflow-y:auto;overflow-x:hidden;position:relative;scrollbar-width:none}
.we-venue-row{display:flex;align-items:center;gap:10px;height:23px;padding:0 10px;font-size:.78rem;box-sizing:border-box}
.we-venue-name{width:130px;flex-shrink:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}
.we-venue-track{flex:1;height:13px;border-radius:4px;background:rgba(148,163,184,.15);overflow:hidden}
.we-venue-bar{display:block;height:100%;border-radius:4px}
.we-venue-val{width:96px;flex-shrink:0;text-align:right;color:var(--text);font-variant-numeric:tabular-nums}
#tab-we-dashboard.we-dark .we-venue-name,
#tab-we-dashboard.we-dark .we-venue-val{color:#e5e7eb}
#tab-we-dashboard.we-dark .we-venue-track{background:rgba(148,163,184,.12)}
.we-empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:var(--text-muted);font-size:.85rem}
/* ===== 告警提醒 ===== */
.we-alert-badge{background:var(--danger);color:#fff;border-radius:20px;padding:2px 10px;font-size:.72rem;font-weight:700}
.we-alert-item.up{background:rgba(239,68,68,.06);border-color:rgba(239,68,68,.35)}
.we-alert-item.down{background:rgba(16,185,129,.07);border-color:rgba(16,185,129,.35)}
.we-alert-item.new{background:rgba(59,130,246,.06);border-color:rgba(59,130,246,.35)}
.we-alert-item.down .we-alert-arrow{color:var(--success)}
.we-alert-item.down .we-alert-pct{color:var(--success)}
.we-alert-item.new .we-alert-pct{color:var(--primary)}
#tab-we-dashboard.we-dark .we-alert-controls input{background:#1f2937;color:#e5e7eb;border-color:#374151}
#tab-we-dashboard.we-dark .we-alert-item{background:#111827;border-color:#1f2937}
#tab-we-dashboard.we-dark .we-alert-title{color:#e5e7eb}
#tab-we-dashboard.we-dark .we-alert-detail{color:#94a3b8}
#tab-we-dashboard.we-dark .we-alert-empty{color:#94a3b8}
.we-alert-summary{display:flex;gap:12px;margin-bottom:16px;flex-wrap:wrap}
.we-alert-sum-item{display:flex;align-items:baseline;gap:6px;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:12px 18px;font-size:.8rem;color:var(--text-muted)}
.we-alert-sum-num{font-size:1.3rem;font-weight:700;color:var(--text)}
.we-alert-sum-item.s-up .we-alert-sum-num{color:var(--danger)}
.we-alert-sum-item.s-down .we-alert-sum-num{color:var(--success)}
.we-alert-sum-item.s-new .we-alert-sum-num{color:var(--primary)}
.we-alert-badge-sm{display:inline-block;padding:2px 9px;border-radius:20px;font-size:.7rem;font-weight:700}
.we-alert-badge-sm.s-up{background:rgba(239,68,68,.12);color:var(--danger)}
.we-alert-badge-sm.s-down{background:rgba(16,185,129,.12);color:var(--success)}
.we-alert-badge-sm.s-new{background:rgba(59,130,246,.12);color:var(--primary)}
#tab-we-alert .we-card{background:var(--bg-card)}
.we-alert-tabs{margin-bottom:14px}
.we-alert-tabs .segmented-control{display:inline-flex;background:var(--bg);border:1px solid var(--border);border-radius:10px;padding:3px;gap:2px}
.we-scroll-wrap::-webkit-scrollbar{display:none}
/* canvas 宽度由 JS 内联控制，避免窗口变化时位图拉伸 */
.we-chart-card.we-chart-wide canvas{height:260px !important}
.we-chart-header{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.we-chart-header h3{font-size:.9rem;font-weight:600;margin-bottom:10px;color:var(--text)}
.we-chart-tools .we-chart-filters{margin-bottom:0}
#tab-we-dashboard.we-dark .we-chart-export{color:#94a3b8;border-color:#374151}
#tab-we-dashboard.we-dark .we-chart-export:hover{color:#60a5fa;border-color:#3b82f6;background:rgba(59,130,246,.15)}
.we-chart-filters{display:flex;gap:8px;margin-bottom:10px}
.we-chart-filters select{padding:6px 8px;border:1px solid var(--border);border-radius:var(--radius-sm);font-size:.78rem;background:var(--bg);color:var(--text);font-family:inherit;outline:none;min-width:110px}
.we-chart-filters select:focus{border-color:var(--primary)}
.we-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px;margin-bottom:16px}
.we-card-header{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.we-card-header h3{font-size:.95rem;font-weight:600;color:var(--text)}
.we-table{width:100%;border-collapse:collapse;font-size:.82rem}
.we-table th{background:var(--primary-light);color:var(--primary);font-weight:600;text-align:center;padding:9px 10px;border:1px solid var(--border);white-space:nowrap}
.we-table td{padding:8px 10px;border:1px solid var(--border);color:var(--text)}
.we-table tbody tr:hover td{background:var(--border-light)}
.we-input-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:18px;margin-bottom:16px}
.we-input-form{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end}
.we-input-form .input-group{display:flex;flex-direction:column;gap:4px}
.we-input-form label{font-size:.75rem;color:var(--text-muted)}
.we-input-form input,.we-input-form select{padding:8px 10px;border:1px solid var(--border);border-radius:var(--radius-sm);font-size:.85rem;background:var(--bg);color:var(--text);min-width:130px;font-family:inherit;outline:none}
.we-input-form input:focus,.we-input-form select:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(59,130,246,.12)}
.we-io-bar .btn{padding:7px 14px;font-size:.8rem}
.we-io-drop{position:relative;display:inline-block}
.we-io-menu{position:absolute;top:100%;right:0;background:var(--bg-card);border:1px solid var(--border);border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.15);z-index:300;min-width:160px;overflow:hidden;margin-top:4px;animation:fadeIn .15s ease}
.we-io-item{display:flex;align-items:center;gap:10px;width:100%;padding:11px 16px;border:none;background:none;cursor:pointer;font-size:.85rem;font-family:inherit;color:var(--text);transition:background .15s;text-align:left}
.we-io-item:hover{background:var(--primary-light);color:var(--primary)}
#tab-we-dashboard.we-dark .we-io-menu{background:#1f2937;border-color:#374151}
#tab-we-dashboard.we-dark .we-io-item{color:#e5e7eb}
#tab-we-dashboard.we-dark .we-io-item:hover{background:#0f172a;color:#60a5fa}
.we-io-item svg{width:16px;height:16px;flex-shrink:0}
.we-hint{font-size:.78rem;color:var(--text-muted);margin-top:10px}
.we-hint.error{color:var(--danger)}
.we-hint.success{color:var(--success)}
.we-del-btn{padding:4px 10px;font-size:.72rem;border:1px solid var(--danger);border-radius:var(--radius-sm);background:transparent;color:var(--danger);cursor:pointer;font-family:inherit}
.we-del-btn:hover{background:var(--danger-light)}
.we-edit-btn{border-color:var(--primary);color:var(--primary);margin-right:6px}
.we-edit-btn:hover{background:var(--primary-light)}
.basic-empty{padding:14px;text-align:center;color:var(--text-muted);font-size:.8rem}
/* ===== 水电看板深色主题（纯黑） ===== */
#tab-we-dashboard.we-dark{background:transparent;border-radius:0;padding:0}
.tab-content.tc-dark,.main-area.tc-dark{background:#0b0f1a}
#tab-we-dashboard.we-dark .panel-header h2{color:#f8fafc}
#tab-we-dashboard.we-dark .panel-desc{color:#94a3b8}
#tab-we-dashboard.we-dark .stat-card,
#tab-we-dashboard.we-dark .we-chart-card,
#tab-we-dashboard.we-dark .we-card{background:#111827;border-color:#1f2937;box-shadow:none}
#tab-we-dashboard.we-dark .stat-value{color:#f8fafc}
#tab-we-dashboard.we-dark .stat-label{color:#94a3b8}
#tab-we-dashboard.we-dark .we-chart-header h3,
#tab-we-dashboard.we-dark .we-card-header h3{color:#e5e7eb}
#tab-we-dashboard.we-dark .we-chart-filters select{background:#1f2937;color:#e5e7eb;border-color:#374151}
#tab-we-dashboard.we-dark .we-table th{background:#1e293b;color:#93c5fd;border-color:#1f2937}
#tab-we-dashboard.we-dark .we-table td{color:#e5e7eb;border-color:#1f2937}
#tab-we-dashboard.we-dark .we-table tbody tr:hover td{background:#1e293b}
#tab-we-dashboard.we-dark .we-empty{color:#94a3b8}
#tab-we-dashboard.we-dark .we-scroll-wrap{background:#111827}
#tab-we-dashboard.we-dark .input-group label{color:#94a3b8}
#tab-we-dashboard.we-dark .panel-toolbar input[type="month"],
#tab-we-dashboard.we-dark .we-chart-filters select{background:#1f2937;color:#e5e7eb;border-color:#374151}
#tab-we-dashboard.we-dark .panel-toolbar input[type="month"]:focus,
#tab-we-dashboard.we-dark .we-chart-filters select:focus{border-color:#3b82f6;outline:none}
#tab-we-dashboard.we-dark .panel-toolbar input[type="month"]::-webkit-calendar-picker-indicator{filter:invert(1)}
.we-theme-btn{display:inline-flex;align-items:center;gap:6px}
.we-theme-btn svg{width:16px;height:16px}
@media (max-width:900px){
  .we-stats-bar{grid-template-columns:repeat(3,1fr)}
  .we-chart-grid{grid-template-columns:1fr}
}

/* ===== 水电记录录入：列表视口自适应贴底 + 分页 ===== */
#tab-we-input.tab-panel.active{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}
#tab-we-input .we-input-card{flex:none}
#tab-we-input .we-card{flex:1;display:flex;flex-direction:column;min-height:0;margin-bottom:0}
#tab-we-input .we-card-header{flex:none}
#tab-we-input .we-table-wrap{flex:1;min-height:0;overflow-y:auto;border:1px solid var(--border);border-radius:8px}
#tab-we-input .we-table thead th{position:sticky;top:0;background:var(--bg-card);z-index:1}
#tab-we-input .we-table tbody tr:hover{background:var(--hover)}
/* ===== 费用记录录入：列表视口自适应贴底 + 分页（与水电一致） ===== */
#tab-fee-input.tab-panel.active{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}
#tab-fee-input .fe-card{flex:1;display:flex;flex-direction:column;min-height:0;margin-bottom:0}
#tab-fee-input .fe-card-header{flex:none}
#tab-fee-input .fe-table-wrap{flex:1;min-height:0;overflow-y:auto;border:1px solid var(--border);border-radius:8px}
#tab-fee-input .fe-table thead th{position:sticky;top:0;background:var(--bg-card);z-index:1}

/* ===== 水电模块：表头固定 + separate（还原 1px 网格，避免 separate 产生 2px 双线，消除细缝） ===== */
#tab-we-input .we-table{border-collapse:separate;border-spacing:0}
#tab-we-input .we-table th,
#tab-we-input .we-table td{border:none;border-right:1px solid var(--border);border-bottom:1px solid var(--border)}
#tab-we-input .we-table th:first-child,
#tab-we-input .we-table td:first-child{border-left:1px solid var(--border)}
#tab-we-input .we-table thead th{border-top:1px solid var(--border)}
