/* ═══════════════════════════════════════════
   澜知·城脉 · 统一框架与组件样式（PC业务端）
   深色政务风，与驾驶舱设计令牌对齐
   ═══════════════════════════════════════════ */

/* ─── 页面骨架 ─── */
.app-body {
  display: flex;
  height: calc(100vh - 56px);
  margin-top: 56px;
}

/* ─── 顶部导航 ─── */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  height: 56px; display: flex; align-items: center;
  background: linear-gradient(180deg, #0C2548 0%, #0A2342 100%);
  border-bottom: 1px solid rgba(22,119,255,0.35);
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
  padding: 0 18px; gap: 18px;
}
.topnav-brand { display: flex; align-items: center; gap: 10px; }
.topnav-logo {
  width: 34px; height: 34px; border-radius: 8px; flex: none;
  background: linear-gradient(135deg, #1677FF, #00CFE8);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #fff;
  box-shadow: 0 0 12px rgba(22,119,255,0.5);
}
.topnav-name { font-size: 16px; font-weight: 700; letter-spacing: 1px; white-space: nowrap; }
.topnav-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; letter-spacing: 2px; }
.topnav-menu { display: flex; gap: 4px; flex: 1; justify-content: center; }
.topnav-item {
  padding: 7px 18px; border-radius: 6px; cursor: pointer;
  color: var(--text-secondary); font-size: 14px;
  transition: all var(--dur-fast);
  position: relative; text-decoration: none;
}
.topnav-item:hover { color: #fff; background: rgba(22,119,255,0.15); }
.topnav-item.active { color: #fff; background: rgba(22,119,255,0.25); }
.topnav-item.active::after {
  content: ''; position: absolute; left: 18px; right: 18px; bottom: -1px;
  height: 2px; background: linear-gradient(90deg, #1677FF, #00CFE8);
  border-radius: 2px;
}
.topnav-right { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
/* ── 顶部导航分组下拉 ── */
.topnav-group { position: relative; }
.topnav-caret { font-style: normal; font-size: 10px; margin-left: 2px; opacity: 0.7; }
.topnav-drop {
  display: none; position: absolute; top: 100%; left: 0; min-width: 208px;
  background: #0F2B52; border: 1px solid rgba(22,119,255,0.35); border-radius: 8px;
  padding: 6px; z-index: 950; box-shadow: 0 10px 28px rgba(0,0,0,0.45);
}
.topnav-group:hover .topnav-drop { display: block; }
.topnav-drop-item {
  display: block; padding: 9px 12px; border-radius: 6px;
  color: var(--text-secondary); font-size: 13px; text-decoration: none; white-space: nowrap;
}
.topnav-drop-item:hover { background: rgba(22,119,255,0.18); color: #fff; }
.topnav-drop-item.active { background: rgba(22,119,255,0.3); color: #fff; }
/* ── 侧栏系统分组标签 ── */
.sidenav-group {
  font-size: 11px; color: var(--text-muted); letter-spacing: 1px;
  padding: 10px 10px 0; border-bottom: 1px dashed rgba(22,119,255,0.2);
  margin-bottom: 4px; padding-bottom: 6px;
}
/* ── 侧栏子系统分组（系统级菜单） ── */
.sidenav-sys-title {
  font-size: 13px; font-weight: 700; color: #fff;
  padding: 6px 10px 10px; letter-spacing: 1px;
  border-bottom: 1px solid rgba(22,119,255,0.35); margin-bottom: 6px;
}
.sidenav-sys { margin: 2px 0; }
.sidenav-sys-head {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px; margin: 2px 0; border-radius: 6px;
  color: rgba(255,255,255,0.85); font-size: 13.5px; font-weight: 600;
  text-decoration: none; transition: all var(--dur-fast);
}
.sidenav-sys-head i { font-style: normal; font-size: 14px; color: var(--c-accent); flex: none; }
.sidenav-sys-head em {
  font-style: normal; margin-left: auto; font-size: 11px;
  color: var(--text-muted); background: rgba(255,255,255,0.08);
  border-radius: 8px; padding: 0 6px; flex: none;
}
.sidenav-sys-head:hover { background: rgba(22,119,255,0.16); color: #fff; }
.sidenav-sys-head.active {
  background: linear-gradient(90deg, rgba(22,119,255,0.4), rgba(0,207,232,0.12));
  color: #fff; border-left: 3px solid var(--c-primary); padding-left: 7px;
}
.sidenav-sys.open .sidenav-sys-head.active { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.sidenav-sub {
  background: rgba(3,15,35,0.55); border-left: 1px solid rgba(22,119,255,0.3);
  margin: 0 4px 4px 12px; border-radius: 0 6px 6px 0; padding: 2px 0;
}
.sidenav-sub .sidenav-item { padding: 7px 10px 7px 14px; font-size: 12.5px; }
.sidenav-sub .sidenav-item.active { border-left: none; padding-left: 17px; }
.topnav-icon { color: var(--text-secondary); cursor: pointer; font-size: 15px; position: relative; }
.topnav-icon:hover { color: #fff; }
.topnav-badge {
  position: absolute; top: -6px; right: -8px;
  background: var(--c-critical); color: #fff; font-size: 10px;
  border-radius: 8px; padding: 0 5px; line-height: 14px;
}
.topnav-user { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 13px; }
.topnav-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #18B7A0, #1677FF);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: #fff; font-weight: 600;
}

/* ─── 左侧导航 ─── */
.sidenav {
  width: 212px; flex: none; overflow-y: auto;
  background: #0A2342; border-right: 1px solid rgba(22,119,255,0.2);
  padding: 10px 8px;
}
.sidenav::-webkit-scrollbar { width: 4px; }
.sidenav::-webkit-scrollbar-thumb { background: rgba(22,119,255,0.3); border-radius: 4px; }
.sidenav-module { font-size: 12px; color: var(--text-muted); padding: 8px 10px 4px; letter-spacing: 2px; }
.sidenav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; margin: 2px 0; border-radius: 6px;
  color: var(--text-secondary); font-size: 13px; cursor: pointer;
  text-decoration: none; transition: all var(--dur-fast);
}
.sidenav-item:hover { background: rgba(22,119,255,0.12); color: #fff; }
.sidenav-item.active {
  background: linear-gradient(90deg, rgba(22,119,255,0.35), rgba(0,207,232,0.15));
  color: #fff; border-left: 3px solid var(--c-primary);
}
.sidenav-num {
  margin-left: auto; font-size: 11px; color: var(--text-muted);
  background: rgba(255,255,255,0.06); border-radius: 8px; padding: 0 6px;
}

/* ─── 内容区 ─── */
.page-content {
  flex: 1; overflow-y: auto; padding: 14px 16px;
  background:
    radial-gradient(1200px 500px at 20% -10%, rgba(22,119,255,0.08), transparent 60%),
    radial-gradient(900px 400px at 90% 0%, rgba(0,207,232,0.05), transparent 60%),
    var(--bg-page);
}
.page-content::-webkit-scrollbar { width: 6px; height: 6px; }
.page-content::-webkit-scrollbar-thumb { background: rgba(22,119,255,0.3); border-radius: 4px; }
@media (max-width: 1100px) {
  .topnav { padding: 0 10px; gap: 8px; }
  .topnav-menu { justify-content: flex-start; overflow-x: auto; }
  .topnav-item { padding: 7px 10px; white-space: nowrap; }
  .sidenav { width: 176px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .col-main-70, .col-main-60 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .topnav-sub, .topnav-right .topnav-user { display: none; }
  .topnav-menu { display: none; }
  .app-body { height: calc(100vh - 56px); }
  .sidenav { width: 54px; padding: 8px 4px; }
  .sidenav-module, .sidenav-item span:not(.sidenav-num), .sidenav-num { display: none; }
  .sidenav-item { justify-content: center; padding: 10px 4px; }
  .page-content { padding: 10px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .page-title { font-size: 18px; }
}
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 12px; flex-wrap: wrap; gap: 8px;
}
.page-title { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.page-title::before {
  content: ''; width: 4px; height: 20px; border-radius: 2px;
  background: linear-gradient(180deg, #1677FF, #00CFE8);
}
.page-crumb { font-size: 12px; color: var(--text-muted); }

/* ─── 布局网格 ─── */
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.col-main-70 { grid-template-columns: 7fr 3fr; }
.col-main-60 { grid-template-columns: 3fr 2fr; }
.row-2 { grid-template-rows: auto 1fr; }

/* ─── 面板 ─── */
.panel {
  background: linear-gradient(180deg, rgba(13,42,77,0.85), rgba(10,35,66,0.9));
  border: 1px solid rgba(22,119,255,0.22);
  border-radius: 10px; padding: 12px 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 4px 16px rgba(0,0,0,0.25);
  min-height: 40px;
}
.panel-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; margin-bottom: 10px;
  padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.panel-title .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.panel-title .extra { margin-left: auto; font-weight: 400; font-size: 12px; color: var(--text-muted); }
.dot-water { background: var(--c-water); box-shadow: 0 0 6px var(--c-water); }
.dot-drainage { background: var(--c-drainage); box-shadow: 0 0 6px var(--c-drainage); }
.dot-primary { background: var(--c-primary); box-shadow: 0 0 6px var(--c-primary); }
.dot-warning { background: var(--c-warning); box-shadow: 0 0 6px var(--c-warning); }
.dot-danger { background: var(--c-danger); box-shadow: 0 0 6px var(--c-danger); }

/* ─── KPI 卡 ─── */
.kpi-strip { display: grid; gap: 12px; margin-bottom: 12px; }
.kpi-card {
  background: linear-gradient(160deg, rgba(22,119,255,0.16), rgba(10,35,66,0.9) 55%);
  border: 1px solid rgba(22,119,255,0.3);
  border-radius: 10px; padding: 12px 14px; cursor: pointer;
  transition: all var(--dur-normal); position: relative; overflow: hidden;
}
.kpi-card::after {
  content: ''; position: absolute; right: -20px; top: -20px; width: 70px; height: 70px;
  background: radial-gradient(circle, rgba(0,207,232,0.15), transparent 70%);
}
.kpi-card:hover { transform: translateY(-2px); border-color: rgba(0,207,232,0.5); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }
.kpi-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.kpi-value { font-size: 26px; font-weight: 700; color: var(--text-kpi); font-family: 'DIN', 'Arial', sans-serif; letter-spacing: 0.5px; }
.kpi-value .unit { font-size: 13px; font-weight: 400; color: var(--text-muted); margin-left: 3px; }
.kpi-trend { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.kpi-trend.up { color: var(--c-normal); }
.kpi-trend.down { color: var(--c-critical); }
.kpi-trend.bad { color: var(--c-danger); }
.kpi-trend .sep { color: var(--text-muted); margin: 0 6px; }

/* ─── 筛选条 ─── */
.filter-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: rgba(13,42,77,0.7); border: 1px solid rgba(22,119,255,0.2);
  border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: 13px;
}
.filter-label { color: var(--text-muted); }
.filter-bar .seg { display: flex; background: rgba(6,23,46,0.8); border-radius: 6px; overflow: hidden; }
.filter-bar .seg button {
  background: none; border: none; color: var(--text-secondary); font-size: 13px;
  padding: 5px 14px; cursor: pointer; font-family: inherit;
}
.filter-bar .seg button.active { background: var(--c-primary); color: #fff; }
.filter-bar .seg button:hover:not(.active) { color: #fff; }
.filter-ctrl {
  background: rgba(6,23,46,0.8); border: 1px solid rgba(22,119,255,0.3);
  color: var(--text-secondary); border-radius: 6px; padding: 5px 10px; font-size: 13px;
  font-family: inherit; outline: none;
}
.filter-ctrl:focus { border-color: var(--c-accent); }
.filter-spacer { flex: 1; }
.btn-filter {
  background: linear-gradient(135deg, #1677FF, #0F5FD4); border: none; color: #fff;
  border-radius: 6px; padding: 6px 18px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.btn-filter:hover { filter: brightness(1.15); }

/* ─── 按钮 ─── */
.btn {
  border: 1px solid rgba(22,119,255,0.45); background: rgba(22,119,255,0.12);
  color: var(--c-accent); border-radius: 6px; padding: 6px 14px;
  font-size: 13px; cursor: pointer; font-family: inherit; transition: all var(--dur-fast);
}
.btn:hover { background: rgba(22,119,255,0.25); }
.btn-primary { background: linear-gradient(135deg, #1677FF, #0F5FD4); color: #fff; border: none; }
.btn-primary:hover { filter: brightness(1.15); }
.btn-danger { border-color: rgba(239,68,68,0.5); color: #FF7A7A; background: rgba(239,68,68,0.1); }
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-sm { padding: 3px 10px; font-size: 12px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── 标签/徽章 ─── */
.tag {
  display: inline-block; font-size: 11px; border-radius: 4px; padding: 2px 8px; line-height: 16px;
}
.tag-normal { background: rgba(34,197,94,0.18); color: #4ADE80; border: 1px solid rgba(34,197,94,0.4); }
.tag-warning { background: rgba(234,179,8,0.18); color: #FACC15; border: 1px solid rgba(234,179,8,0.4); }
.tag-danger { background: rgba(245,158,11,0.18); color: #FB923C; border: 1px solid rgba(245,158,11,0.4); }
.tag-critical { background: rgba(239,68,68,0.2); color: #F87171; border: 1px solid rgba(239,68,68,0.5); }
.tag-info { background: rgba(22,119,255,0.15); color: #60A5FA; border: 1px solid rgba(22,119,255,0.4); }
.tag-muted { background: rgba(138,148,166,0.15); color: #9CA9BA; border: 1px solid rgba(138,148,166,0.3); }
.tag-offline { background: rgba(138,148,166,0.15); color: #6B8AAC; border: 1px solid rgba(138,148,166,0.3); }

/* ─── 表格 ─── */
.table-wrap { overflow: auto; max-height: 100%; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: rgba(6,23,46,0.95); color: var(--text-muted);
  font-weight: 600; text-align: left; padding: 9px 10px;
  border-bottom: 1px solid rgba(22,119,255,0.3); white-space: nowrap;
}
.data-table tbody td { padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,0.05); color: var(--text-secondary); }
.data-table tbody tr { cursor: pointer; transition: background var(--dur-fast); }
.data-table tbody tr:hover { background: rgba(22,119,255,0.1); }
.data-table tbody tr.selected { background: rgba(22,119,255,0.18); }
.data-table .num { font-family: 'DIN', 'Arial', sans-serif; color: var(--text-kpi); }

/* ─── Tab ─── */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid rgba(22,119,255,0.2); margin-bottom: 10px; }
.tabs .tab {
  padding: 7px 16px; cursor: pointer; color: var(--text-secondary); font-size: 13px;
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all var(--dur-fast);
}
.tabs .tab:hover { color: #fff; }
.tabs .tab.active { color: var(--c-accent); border-bottom-color: var(--c-accent); font-weight: 600; }
.tabs .tab .cnt { font-size: 11px; color: var(--text-muted); margin-left: 4px; }

/* ─── 列表 ─── */
.item-list { display: flex; flex-direction: column; gap: 2px; }
.item-list li {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 13px;
  color: var(--text-secondary); transition: background var(--dur-fast);
}
.item-list li:hover { background: rgba(22,119,255,0.12); }
.item-list li.active { background: rgba(22,119,255,0.2); color: #fff; }
.item-list .idx { width: 20px; color: var(--text-muted); font-size: 12px; flex: none; }
.item-list .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-list .val { font-family: 'DIN', sans-serif; color: var(--text-kpi); }
.item-list .meta { font-size: 11px; color: var(--text-muted); display: block; margin-top: 2px; }

/* ─── 抽屉 ─── */
.drawer-mask {
  position: fixed; inset: 0; z-index: 1000; background: rgba(2,10,20,0.55);
  opacity: 0; transition: opacity var(--dur-normal); pointer-events: none;
}
.drawer-mask.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 1001;
  width: 480px; max-width: 92vw;
  background: linear-gradient(180deg, #0D2A4D, #0A2342);
  border-left: 1px solid rgba(22,119,255,0.35);
  box-shadow: -8px 0 30px rgba(0,0,0,0.5);
  transform: translateX(100%); transition: transform var(--dur-normal);
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; padding: 14px 16px;
  border-bottom: 1px solid rgba(22,119,255,0.25);
}
.drawer-head h3 { font-size: 16px; flex: 1; }
.drawer-close { cursor: pointer; color: var(--text-muted); font-size: 18px; background: none; border: none; }
.drawer-close:hover { color: #fff; }
.drawer-body { flex: 1; overflow-y: auto; padding: 14px 16px; }
.drawer-foot { padding: 12px 16px; border-top: 1px solid rgba(22,119,255,0.25); display: flex; gap: 10px; justify-content: flex-end; }

/* ─── 弹窗 ─── */
.modal-mask {
  position: fixed; inset: 0; z-index: 1100; background: rgba(2,10,20,0.6);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity var(--dur-normal);
}
.modal-mask.open { opacity: 1; pointer-events: auto; }
.modal {
  width: 440px; max-width: 92vw;
  background: linear-gradient(180deg, #0D2A4D, #0A2342);
  border: 1px solid rgba(22,119,255,0.4); border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  transform: scale(0.9); transition: transform var(--dur-normal);
}
.modal-mask.open .modal { transform: scale(1); }
.modal-head { padding: 14px 18px; border-bottom: 1px solid rgba(22,119,255,0.25); font-size: 15px; font-weight: 600; display: flex; align-items: center; }
.modal-head .icon { margin-right: 8px; }
.modal-body { padding: 16px 18px; font-size: 13px; color: var(--text-secondary); line-height: 1.8; }
.modal-body .row { display: flex; gap: 8px; margin: 6px 0; }
.modal-body .row .k { color: var(--text-muted); width: 90px; flex: none; text-align: right; }
.modal-body .row .v { color: var(--text-primary); }
.modal-foot { padding: 12px 18px; border-top: 1px solid rgba(22,119,255,0.25); display: flex; gap: 10px; justify-content: flex-end; }
.modal-input, .modal-select {
  width: 100%; background: rgba(6,23,46,0.8); border: 1px solid rgba(22,119,255,0.35);
  color: var(--text-primary); border-radius: 6px; padding: 7px 10px; font-size: 13px;
  font-family: inherit; outline: none; margin: 4px 0;
}

/* ─── Toast ─── */
.toast-wrap { position: fixed; top: 68px; left: 50%; transform: translateX(-50%); z-index: 1200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: rgba(13,42,77,0.96); border: 1px solid rgba(22,119,255,0.4);
  color: var(--text-primary); padding: 9px 18px; border-radius: 8px; font-size: 13px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4); animation: toastIn 0.3s ease;
}
.toast.success { border-color: rgba(34,197,94,0.5); }
.toast.warn { border-color: rgba(234,179,8,0.5); }
.toast.error { border-color: rgba(239,68,68,0.5); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ─── 字段行 ─── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.form-item { display: flex; flex-direction: column; gap: 4px; }
.form-item label { font-size: 12px; color: var(--text-muted); }
.form-item .full { grid-column: 1 / -1; }

/* ─── 时间线/流程 ─── */
.steps { display: flex; align-items: flex-start; gap: 0; padding: 6px 0; }
.steps .step { flex: 1; text-align: center; position: relative; }
.steps .step::before {
  content: ''; position: absolute; top: 14px; left: -50%; width: 100%;
  height: 2px; background: rgba(22,119,255,0.2);
}
.steps .step:first-child::before { display: none; }
.steps .step.done::before { background: var(--c-primary); }
.steps .step .node {
  width: 28px; height: 28px; border-radius: 50%; margin: 0 auto 6px;
  background: rgba(22,119,255,0.15); border: 2px solid rgba(22,119,255,0.4);
  color: var(--text-secondary); font-size: 12px; display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
}
.steps .step.done .node { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.steps .step.current .node { background: var(--c-accent); border-color: var(--c-accent); color: #06213a; box-shadow: 0 0 12px rgba(0,207,232,0.6); }
.steps .step .step-name { font-size: 12px; color: var(--text-secondary); }
.steps .step .step-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ─── 地图容器 ─── */
.map-box { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid rgba(22,119,255,0.22); }
.map-box #map, .map-box .map-canvas { width: 100%; height: 100%; position: absolute; inset: 0; }
.map-toolbar {
  position: absolute; top: 10px; left: 10px; z-index: 5;
  display: flex; gap: 6px; flex-wrap: wrap; max-width: 92%;
}
.map-toolbar .map-btn {
  background: rgba(10,35,66,0.88); border: 1px solid rgba(22,119,255,0.4);
  color: var(--text-secondary); font-size: 12px; padding: 4px 10px; border-radius: 5px;
  cursor: pointer; font-family: inherit; backdrop-filter: blur(4px);
}
.map-toolbar .map-btn.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.map-legend {
  position: absolute; bottom: 10px; right: 10px; z-index: 5;
  background: rgba(10,35,66,0.88); border: 1px solid rgba(22,119,255,0.3);
  border-radius: 6px; padding: 6px 10px; font-size: 11px; color: var(--text-secondary);
  display: flex; gap: 10px; flex-wrap: wrap; backdrop-filter: blur(4px);
}
.map-legend .lg { display: flex; align-items: center; gap: 4px; }
.map-legend .sw { width: 10px; height: 10px; border-radius: 2px; }
.map-tip {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 5;
  background: rgba(10,35,66,0.9); border: 1px solid rgba(22,119,255,0.3);
  border-radius: 14px; padding: 3px 14px; font-size: 12px; color: var(--text-muted);
  pointer-events: none; backdrop-filter: blur(4px);
}

/* ─── 进度条 ─── */
.progress { height: 8px; border-radius: 4px; background: rgba(255,255,255,0.08); overflow: hidden; }
.progress .bar { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #1677FF, #00CFE8); transition: width 0.6s ease; }
.progress .bar.warn { background: linear-gradient(90deg, #F59E0B, #EAB308); }
.progress .bar.crit { background: linear-gradient(90deg, #EF4444, #F59E0B); }

/* ─── 环形/图表容器 ─── */
.chart-box { width: 100%; height: 100%; min-height: 200px; }
.chart-title { font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }

/* ─── 卡片网格 ─── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.card {
  background: linear-gradient(180deg, rgba(13,42,77,0.85), rgba(10,35,66,0.9));
  border: 1px solid rgba(22,119,255,0.22); border-radius: 10px; padding: 14px; cursor: pointer;
  transition: all var(--dur-normal);
}
.card:hover { transform: translateY(-3px); border-color: rgba(0,207,232,0.5); box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
.card .card-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.card .card-num { font-size: 22px; font-weight: 700; color: var(--text-kpi); }
.card .card-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ─── 登录页 ─── */
.login-page {
  display: flex; align-items: center; justify-content: center; min-height: 100vh;
  background:
    radial-gradient(800px 400px at 15% 20%, rgba(22,119,255,0.25), transparent 60%),
    radial-gradient(700px 400px at 85% 80%, rgba(0,207,232,0.18), transparent 60%),
    radial-gradient(500px 300px at 70% 10%, rgba(24,183,160,0.12), transparent 60%),
    var(--bg-page);
  position: relative; overflow: hidden;
}
.login-page::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(22,119,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22,119,255,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(700px 500px at center, #000 30%, transparent 75%);
}
.login-card {
  position: relative; z-index: 2; width: 400px;
  background: linear-gradient(180deg, rgba(13,42,77,0.92), rgba(10,35,66,0.95));
  border: 1px solid rgba(22,119,255,0.35); border-radius: 16px;
  padding: 38px 36px 30px; box-shadow: 0 24px 80px rgba(0,0,0,0.55);
}
.login-logo { text-align: center; margin-bottom: 26px; }
.login-logo .big {
  width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 14px;
  background: linear-gradient(135deg, #1677FF, #00CFE8);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; color: #fff;
  box-shadow: 0 0 24px rgba(22,119,255,0.6);
}
.login-logo h1 { font-size: 20px; letter-spacing: 2px; }
.login-logo p { font-size: 12px; color: var(--text-muted); margin-top: 8px; letter-spacing: 1px; }
.login-field { margin-bottom: 16px; }
.login-field label { font-size: 12px; color: var(--text-muted); display: block; margin-bottom: 6px; }
.login-input {
  width: 100%; background: rgba(6,23,46,0.85); border: 1px solid rgba(22,119,255,0.35);
  color: var(--text-primary); border-radius: 8px; padding: 11px 14px; font-size: 14px;
  font-family: inherit; outline: none; transition: border-color var(--dur-fast);
}
.login-input:focus { border-color: var(--c-accent); box-shadow: 0 0 0 3px rgba(0,207,232,0.15); }
.login-error { color: #F87171; font-size: 12px; margin-top: 6px; min-height: 16px; display: none; }
.login-btn {
  width: 100%; margin-top: 8px; padding: 12px; border: none; border-radius: 8px;
  background: linear-gradient(135deg, #1677FF, #0F5FD4); color: #fff; font-size: 15px;
  font-weight: 600; cursor: pointer; font-family: inherit; letter-spacing: 6px;
  transition: all var(--dur-fast);
}
.login-btn:hover { filter: brightness(1.15); box-shadow: 0 8px 24px rgba(22,119,255,0.4); }
.login-foot { text-align: center; font-size: 11px; color: var(--text-muted); margin-top: 22px; }

/* ─── 门户卡片 ─── */
.portal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.portal-card {
  background: linear-gradient(170deg, rgba(13,42,77,0.9), rgba(10,35,66,0.95));
  border: 1px solid rgba(22,119,255,0.25); border-radius: 14px; padding: 22px;
  cursor: pointer; transition: all var(--dur-normal); position: relative; overflow: hidden;
  text-decoration: none; color: inherit; display: block;
}
.portal-card::after {
  content: ''; position: absolute; right: -30px; bottom: -30px; width: 120px; height: 120px;
  border-radius: 50%; background: radial-gradient(circle, var(--pc, #1677FF), transparent 70%);
  opacity: 0.18;
}
.portal-card:hover { transform: translateY(-4px); border-color: var(--pc, #1677FF); box-shadow: 0 12px 32px rgba(0,0,0,0.4); }
.portal-card .pc-icon {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 14px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.portal-card h3 { font-size: 16px; margin-bottom: 8px; }
.portal-card p { font-size: 12px; color: var(--text-muted); line-height: 1.7; }
.portal-card .pc-more { margin-top: 12px; font-size: 12px; color: var(--pc, #1677FF); }

/* ─── 滚动条美化 ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); }
::-webkit-scrollbar-thumb { background: rgba(22,119,255,0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(22,119,255,0.5); }

/* ─── 响应式 ─── */
@media (max-width: 1360px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .portal-grid { grid-template-columns: repeat(2, 1fr); }
}
