/* 鄱阳县智慧云水务 - 共享样式 */
:root {
  /* 分类配色 */
  --color-production: #3182ce;  /* 生产蓝 */
  --color-pipe: #38a169;        /* 管网绿 */
  --color-business: #d69e2e;    /* 经营金 */
  --color-enterprise: #805ad5;  /* 企管紫 */
  --color-data: #e53e3e;        /* 数据红 */
  /* 通用色 */
  --color-primary: #3182ce;
  --color-success: #38a169;
  --color-warning: #d69e2e;
  --color-danger: #e53e3e;
  --color-info: #805ad5;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; overflow: hidden; }

/* ===== 深色大屏模板 ===== */
.dark-theme {
  background: #0d1b2a; color: #e2e8f0; width: 100%; height: 100vh; display: flex; flex-direction: column; position: relative;
}
.dark-theme .top-header {
  height: 64px; background: linear-gradient(90deg, rgba(13,27,42,0.95), rgba(26,54,93,0.9));
  border-bottom: 1px solid rgba(49,130,206,0.3); display: flex; align-items: center;
  justify-content: space-between; padding: 0 24px; position: relative; z-index: 10;
}
.dark-theme .top-header::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #3182ce, transparent);
}
.dark-theme .header-title {
  font-size: 22px; font-weight: 600; letter-spacing: 2px;
  background: linear-gradient(135deg, #63b3ed, #4299e1); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dark-theme .header-subtitle {
  font-size: 14px; color: #a0aec0; margin-left: 16px; padding-left: 16px;
  border-left: 1px solid rgba(160,174,192,0.3);
}
.dark-theme .header-right { display: flex; align-items: center; gap: 16px; color: #a0aec0; font-size: 13px; }
.dark-theme .header-right .time { color: #63b3ed; }
.dark-theme .header-right .avatar {
  width: 32px; height: 32px; border-radius: 50%; background: rgba(49,130,206,0.3);
  display: flex; align-items: center; justify-content: center; font-size: 14px; color: #63b3ed;
}
.dark-theme .main-content { display: flex; flex: 1; overflow: hidden; }
.dark-theme .sidebar {
  width: 200px; background: rgba(13,27,42,0.95); border-right: 1px solid rgba(49,130,206,0.15);
  padding: 16px 0; overflow-y: auto;
}
.dark-theme .sidebar .nav-group { margin-bottom: 8px; }
.dark-theme .sidebar .nav-group-title {
  font-size: 11px; color: #4a5568; padding: 8px 20px 4px; text-transform: uppercase; letter-spacing: 1px;
}
.dark-theme .sidebar .nav-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 20px; font-size: 13px;
  color: #a0aec0; cursor: pointer; transition: all 0.2s; border-left: 3px solid transparent;
}
.dark-theme .sidebar .nav-item:hover { background: rgba(49,130,206,0.1); color: #e2e8f0; }
.dark-theme .sidebar .nav-item.active {
  background: rgba(49,130,206,0.15); color: #63b3ed; border-left-color: #3182ce;
}
.dark-theme .content-area { flex: 1; padding: 16px; overflow-y: auto; }
.dark-theme .card {
  background: rgba(26,54,93,0.4); border: 1px solid rgba(49,130,206,0.2);
  border-radius: 8px; padding: 16px; backdrop-filter: blur(10px);
}
.dark-theme .card-title {
  font-size: 14px; font-weight: 600; color: #e2e8f0; margin-bottom: 12px;
  padding-bottom: 8px; border-bottom: 1px solid rgba(49,130,206,0.15);
  display: flex; align-items: center; gap: 8px;
}
.dark-theme .card-title .dot { width: 6px; height: 6px; border-radius: 50%; background: #3182ce; }
.dark-theme .stat-value { font-size: 28px; font-weight: 700; color: #63b3ed; }
.dark-theme .stat-label { font-size: 12px; color: #718096; margin-top: 4px; }
.dark-theme .stat-change { font-size: 11px; margin-top: 2px; }
.dark-theme .stat-change.up { color: #48bb78; }
.dark-theme .stat-change.down { color: #fc8181; }
.dark-theme .badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 500;
}
.dark-theme .badge-success { background: rgba(72,187,120,0.2); color: #48bb78; }
.dark-theme .badge-warning { background: rgba(214,158,46,0.2); color: #d69e2e; }
.dark-theme .badge-danger { background: rgba(252,129,129,0.2); color: #fc8181; }
.dark-theme .badge-info { background: rgba(99,179,237,0.2); color: #63b3ed; }
.dark-theme .data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.dark-theme .data-table th {
  text-align: left; padding: 8px 12px; color: #a0aec0; font-weight: 500;
  border-bottom: 1px solid rgba(49,130,206,0.2); background: rgba(13,27,42,0.5);
}
.dark-theme .data-table td {
  padding: 8px 12px; border-bottom: 1px solid rgba(49,130,206,0.1); color: #cbd5e0;
}
.dark-theme .data-table tr:hover td { background: rgba(49,130,206,0.08); }
.dark-theme .chart-placeholder {
  background: rgba(13,27,42,0.5); border: 1px dashed rgba(49,130,206,0.3);
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  color: #4a5568; font-size: 12px; min-height: 120px;
}
.dark-theme .progress-bar {
  height: 6px; background: rgba(49,130,206,0.2); border-radius: 3px; overflow: hidden;
}
.dark-theme .progress-bar .fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
.dark-theme .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dark-theme .grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.dark-theme .grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 16px; }
.dark-theme .grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.dark-theme .grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; }
.dark-theme .mb-16 { margin-bottom: 16px; }

/* ===== 浅色管理模板 ===== */
.light-theme {
  background: #f0f4f8; color: #2d3748; width: 100%; height: 100vh; display: flex; flex-direction: column; position: relative;
}
.light-theme .top-header {
  height: 56px; background: #fff; border-bottom: 1px solid #e2e8f0;
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.light-theme .header-title { font-size: 18px; font-weight: 600; color: #1a365d; }
.light-theme .header-subtitle {
  font-size: 13px; color: #718096; margin-left: 16px; padding-left: 16px;
  border-left: 1px solid #e2e8f0;
}
.light-theme .header-right { display: flex; align-items: center; gap: 16px; color: #718096; font-size: 13px; }
.light-theme .header-right .avatar {
  width: 32px; height: 32px; border-radius: 50%; background: #ebf4ff;
  display: flex; align-items: center; justify-content: center; font-size: 14px; color: #3182ce;
}
.light-theme .main-content { display: flex; flex: 1; overflow: hidden; }
.light-theme .sidebar {
  width: 220px; background: #fff; border-right: 1px solid #e2e8f0; padding: 16px 0; overflow-y: auto;
}
.light-theme .sidebar .nav-group { margin-bottom: 8px; }
.light-theme .sidebar .nav-group-title {
  font-size: 11px; color: #a0aec0; padding: 8px 20px 4px; text-transform: uppercase; letter-spacing: 1px;
}
.light-theme .sidebar .nav-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 20px; font-size: 13px;
  color: #4a5568; cursor: pointer; transition: all 0.2s; border-left: 3px solid transparent;
}
.light-theme .sidebar .nav-item:hover { background: #f7fafc; color: #2d3748; }
.light-theme .sidebar .nav-item.active {
  background: #ebf8ff; color: #3182ce; border-left-color: #3182ce; font-weight: 500;
}
.light-theme .content-area { flex: 1; padding: 20px; overflow-y: auto; background: #f0f4f8; }
.light-theme .page-title {
  font-size: 18px; font-weight: 600; color: #1a365d; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.light-theme .card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.light-theme .card-title {
  font-size: 14px; font-weight: 600; color: #2d3748; margin-bottom: 12px;
  padding-bottom: 8px; border-bottom: 1px solid #edf2f7;
  display: flex; align-items: center; gap: 8px;
}
.light-theme .card-title .dot { width: 6px; height: 6px; border-radius: 50%; background: #3182ce; }
.light-theme .stat-value { font-size: 28px; font-weight: 700; color: #2d3748; }
.light-theme .stat-label { font-size: 12px; color: #718096; margin-top: 4px; }
.light-theme .stat-change { font-size: 11px; margin-top: 2px; }
.light-theme .stat-change.up { color: #38a169; }
.light-theme .stat-change.down { color: #e53e3e; }
.light-theme .badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 500;
}
.light-theme .badge-success { background: #f0fff4; color: #38a169; }
.light-theme .badge-warning { background: #fffff0; color: #d69e2e; }
.light-theme .badge-danger { background: #fff5f5; color: #e53e3e; }
.light-theme .badge-info { background: #ebf8ff; color: #3182ce; }
.light-theme .data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.light-theme .data-table th {
  text-align: left; padding: 10px 12px; color: #4a5568; font-weight: 600;
  border-bottom: 2px solid #e2e8f0; background: #f7fafc;
}
.light-theme .data-table td { padding: 10px 12px; border-bottom: 1px solid #edf2f7; color: #4a5568; }
.light-theme .data-table tr:hover td { background: #f7fafc; }
.light-theme .btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px; border-radius: 6px;
  font-size: 12px; font-weight: 500; cursor: pointer; border: none; transition: all 0.2s;
}
.light-theme .btn-primary { background: #3182ce; color: #fff; }
.light-theme .btn-success { background: #38a169; color: #fff; }
.light-theme .btn-warning { background: #d69e2e; color: #fff; }
.light-theme .btn-outline {
  background: #fff; color: #4a5568; border: 1px solid #e2e8f0;
}
.light-theme .form-group { margin-bottom: 12px; }
.light-theme .form-label { display: block; font-size: 12px; color: #4a5568; margin-bottom: 4px; font-weight: 500; }
.light-theme .form-input {
  width: 100%; padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 6px;
  font-size: 13px; color: #2d3748; background: #fff;
}
.light-theme .form-select {
  width: 100%; padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 6px;
  font-size: 13px; color: #2d3748; background: #fff; appearance: auto;
}
.light-theme .chart-placeholder {
  background: #f7fafc; border: 1px dashed #e2e8f0; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; color: #a0aec0;
  font-size: 12px; min-height: 120px;
}
.light-theme .tabs { display: flex; gap: 0; border-bottom: 2px solid #e2e8f0; margin-bottom: 16px; }
.light-theme .tab {
  padding: 8px 16px; font-size: 13px; color: #718096; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s;
}
.light-theme .tab.active { color: #3182ce; border-bottom-color: #3182ce; font-weight: 500; }
.light-theme .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.light-theme .grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.light-theme .grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 16px; }
.light-theme .grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.light-theme .grid-3-1 { display: grid; grid-template-columns: 3fr 1fr; gap: 16px; }
.light-theme .mb-16 { margin-bottom: 16px; }
.light-theme .search-bar {
  display: flex; gap: 8px; margin-bottom: 16px; align-items: center;
}
.light-theme .search-bar .form-input { width: 240px; max-width: 100%; }
.light-theme .pagination {
  display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 12px; font-size: 12px; color: #718096;
}
.light-theme .pagination .page {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border-radius: 4px; cursor: pointer; border: 1px solid #e2e8f0;
}
.light-theme .pagination .page.active { background: #3182ce; color: #fff; border-color: #3182ce; }

/* ===== 通用SVG图标占位 ===== */
.icon { display: inline-block; width: 16px; height: 16px; vertical-align: middle; }

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
.dark-theme ::-webkit-scrollbar-thumb { background: rgba(49,130,206,0.3); border-radius: 3px; }
.light-theme ::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 3px; }

/* ===== 响应式断点 ===== */
@media (max-width: 1440px) {
  .dark-theme .sidebar { width: 180px; }
  .light-theme .sidebar { width: 200px; }
  .dark-theme .grid-4, .light-theme .grid-4 { grid-template-columns: 1fr 1fr 1fr; }
  .dark-theme .content-area { padding: 12px; }
  .light-theme .content-area { padding: 16px; }
  .light-theme .search-bar .form-input { width: 200px; }
}
@media (max-width: 1280px) {
  .dark-theme .sidebar { width: 160px; }
  .light-theme .sidebar { width: 180px; }
  .dark-theme .sidebar .nav-item, .light-theme .sidebar .nav-item { padding: 8px 16px; font-size: 12px; }
  .dark-theme .sidebar .nav-group-title, .light-theme .sidebar .nav-group-title { padding: 8px 16px 4px; font-size: 10px; }
  .dark-theme .grid-4, .light-theme .grid-4 { grid-template-columns: 1fr 1fr; }
  .dark-theme .grid-3, .light-theme .grid-3 { grid-template-columns: 1fr 1fr; }
  .dark-theme .header-title { font-size: 18px; }
  .light-theme .header-title { font-size: 16px; }
  .light-theme .search-bar .form-input { width: 160px; }
}
@media (max-width: 1024px) {
  .dark-theme .sidebar, .light-theme .sidebar { width: 140px; }
  .dark-theme .sidebar .nav-item, .light-theme .sidebar .nav-item { padding: 7px 12px; }
  .dark-theme .grid-2, .light-theme .grid-2 { grid-template-columns: 1fr; }
  .dark-theme .grid-2-1, .light-theme .grid-2-1 { grid-template-columns: 1fr; }
  .dark-theme .grid-1-2, .light-theme .grid-1-2 { grid-template-columns: 1fr; }
  .light-theme .grid-3-1 { grid-template-columns: 1fr; }
  .dark-theme .content-area { padding: 10px; }
  .light-theme .content-area { padding: 12px; }
  .light-theme .search-bar { flex-wrap: wrap; }
  .light-theme .search-bar .form-input { width: 140px; }
}