/* =========================================================
   大屏驾驶舱主题（增强层，app.css 之后加载）
   深邃网格背景 + 流光边框 + 扫描线 + 超大发光数字
   适配 1080P / 2K 投屏展示
   ========================================================= */

:root {
  --bg-card: linear-gradient(158deg, rgba(255, 255, 255, 0.068) 0%, rgba(255, 255, 255, 0.018) 100%);
  --line: rgba(212, 175, 55, 0.26);
  --glow-gold: 0 0 20px rgba(240, 199, 94, 0.3);
  --glow-blue: 0 0 22px rgba(59, 130, 246, 0.28);
  --grid-line: rgba(59, 130, 246, 0.045);
}

/* ---------- 深邃背景 + 科技网格纹理 ---------- */
body {
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 46px 46px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 46px 46px,
    radial-gradient(1000px 640px at 10% -10%, rgba(37, 99, 235, 0.24), transparent 62%),
    radial-gradient(900px 620px at 106% 110%, rgba(212, 175, 55, 0.13), transparent 58%),
    linear-gradient(168deg, #040914 0%, #070f20 48%, #03060d 100%);
  background-attachment: fixed;
}

/* 缓慢流动的背景光晕（营造大屏呼吸感） */
.layout::before {
  content: ""; position: fixed; inset: -20%; pointer-events: none; z-index: 0;
  background: radial-gradient(600px 600px at 30% 20%, rgba(37, 99, 235, 0.10), transparent 65%),
              radial-gradient(520px 520px at 75% 70%, rgba(212, 175, 55, 0.07), transparent 65%);
  animation: breathe 14s ease-in-out infinite alternate;
}
@keyframes breathe {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1); opacity: 0.75; }
  to   { transform: translate3d(2%, 1.5%, 0) scale(1.08); opacity: 1; }
}
.layout { position: relative; }
.sidebar, .main { position: relative; z-index: 1; }

/* ---------- 全局滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.02); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.45), rgba(59, 130, 246, 0.4));
  border-radius: 8px; border: 2px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(240, 199, 94, 0.7), rgba(59, 130, 246, 0.6)); background-clip: padding-box; }

/* ---------- 侧边栏 ---------- */
.sidebar {
  background: linear-gradient(180deg, rgba(9, 18, 38, 0.98) 0%, rgba(5, 11, 24, 0.99) 100%);
  box-shadow: 8px 0 34px rgba(0, 0, 0, 0.55);
  border-right: 1px solid rgba(212, 175, 55, 0.18);
}
.sidebar .brand { padding: 26px 18px 20px; position: relative; }
.sidebar .brand::after {
  content: ""; position: absolute; left: 18px; right: 18px; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.6), transparent);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
}
.brand .logo {
  width: 48px; height: 48px; border-radius: 14px;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 0 18px rgba(59, 130, 246, 0.3);
}
.brand .brand-text .t1 { font-size: 16.5px; letter-spacing: 1.5px; }
.brand .brand-text .t2 { font-size: 10.5px; letter-spacing: 3px; }

.nav-group { letter-spacing: 3.5px; font-size: 10px; color: rgba(212, 175, 55, 0.6); padding: 18px 14px 7px; }
.nav-item { position: relative; padding: 12px 14px; margin-bottom: 3px; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.34) 0%, rgba(37, 99, 235, 0.04) 100%);
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: inset 3px 0 0 var(--gold-soft), 0 6px 18px rgba(37, 99, 235, 0.3);
  font-weight: 600;
}
.nav-item.active::before {
  content: ""; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 24px; border-radius: 0 3px 3px 0;
  background: var(--grad-gold); box-shadow: 0 0 12px rgba(240, 199, 94, 0.85);
  animation: barGlow 2.4s ease-in-out infinite alternate;
}
@keyframes barGlow { from { opacity: 0.65; box-shadow: 0 0 6px rgba(240, 199, 94, 0.5); } to { opacity: 1; box-shadow: 0 0 16px rgba(240, 199, 94, 0.9); } }
.nav-item .ico { color: rgba(240, 199, 94, 0.78); }
.nav-item.active .ico { color: var(--gold-soft); filter: drop-shadow(0 0 7px rgba(240, 199, 94, 0.6)); }
.side-foot { letter-spacing: 0.6px; opacity: 0.6; }

/* ---------- 顶栏 ---------- */
.topbar {
  height: 70px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(14, 28, 58, 0.94) 0%, rgba(6, 13, 28, 0.6) 100%);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.24);
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.4);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.6) 22%, rgba(59, 130, 246, 0.55) 60%, transparent 100%);
}
/* 顶栏流动光带 */
.topbar::before {
  content: ""; position: absolute; bottom: 0; left: -25%;
  width: 38%; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(240, 199, 94, 0.95), transparent);
  animation: slideGlow 9s linear infinite;
}
@keyframes slideGlow { from { left: -25%; } to { left: 115%; } }
.topbar .crumb { font-size: 19px; letter-spacing: 1px; background: linear-gradient(90deg, #fff, #cfe0ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.topbar .crumb small { -webkit-text-fill-color: var(--text-dim); }
.clock {
  font-variant-numeric: tabular-nums; font-weight: 600;
  padding: 6px 14px; border-radius: 9px;
  background: rgba(212, 175, 55, 0.12); border: 1px solid rgba(212, 175, 55, 0.28);
  box-shadow: inset 0 0 12px rgba(212, 175, 55, 0.12);
}
.user-chip .avatar { box-shadow: 0 4px 12px rgba(37, 99, 235, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.28); }
/* 全屏按钮 */
.fs-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px; cursor: pointer;
  color: var(--gold-soft);
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.26);
  transition: all 0.22s;
}
.fs-btn:hover { background: rgba(212, 175, 55, 0.22); box-shadow: 0 0 16px rgba(240, 199, 94, 0.35); transform: scale(1.06); }

/* ---------- 卡片：流光边框 ---------- */
.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  padding: 20px 22px;
}
/* 边框流光（一道光沿边框跑动） */
.card::before {
  content: ""; position: absolute; inset: -1px; border-radius: 19px; padding: 1px;
  background: linear-gradient(115deg, transparent 30%, rgba(240, 199, 94, 0.55) 50%, transparent 70%);
  background-size: 250% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: flowBorder 7s linear infinite;
  pointer-events: none;
}
@keyframes flowBorder { from { background-position: 250% 0; } to { background-position: -250% 0; } }
.card-title { font-size: 16px; letter-spacing: 1px; margin-bottom: 16px; }
.card-title::before { width: 4px; height: 18px; box-shadow: 0 0 12px rgba(240, 199, 94, 0.6); }

/* ---------- KPI：超大数字 + 扫描线 ---------- */
.kpi-grid { gap: 20px; margin-bottom: 24px; }
.kpi {
  position: relative; overflow: hidden;
  background:
    radial-gradient(130% 120% at 100% 0%, rgba(59, 130, 246, 0.14), transparent 58%),
    linear-gradient(158deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.022) 100%);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 20px;
  padding: 24px 26px 20px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.28s;
}
.kpi:hover { transform: translateY(-6px); box-shadow: 0 24px 52px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 0 26px rgba(240, 199, 94, 0.22); }
.kpi::after {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.26), transparent 70%);
}
/* 扫描线：自上而下循环扫过 */
.kpi::before {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; top: 0;
  background: linear-gradient(90deg, transparent, rgba(240, 199, 94, 0.75), transparent);
  animation: scanLine 5s linear infinite;
  pointer-events: none;
}
@keyframes scanLine {
  0%   { top: 0;    opacity: 0; }
  8%   { opacity: 0.9; }
  92%  { opacity: 0.9; }
  100% { top: 100%; opacity: 0; }
}
.kpi .label { font-size: 13px; letter-spacing: 1px; color: var(--text-sub); }
.kpi .num {
  font-size: 56px; font-weight: 800; line-height: 1.02;
  font-variant-numeric: tabular-nums; letter-spacing: -1.5px;
  text-shadow: 0 0 28px rgba(96, 165, 250, 0.35), 0 3px 14px rgba(0, 0, 0, 0.45);
}
.kpi .num.gold {
  background: linear-gradient(135deg, #fff2c8 0%, #d4af37 55%, #b8860b 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 16px rgba(212, 175, 55, 0.4));
}
.kpi .sub { font-size: 12px; margin-top: 12px; letter-spacing: 0.4px; }
.kpi .bar { height: 3px; box-shadow: 0 0 14px rgba(255, 255, 255, 0.3); }
.kpi .kpi-mark {
  position: absolute; right: 16px; bottom: 6px;
  font-size: 78px; line-height: 1; opacity: 0.07; pointer-events: none;
}

/* ---------- 表格 ---------- */
.grid-table .el-table th.el-table__cell {
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.16) 0%, rgba(212, 175, 55, 0.04) 100%) !important;
  font-weight: 700; letter-spacing: 1px; font-size: 13px;
}
.grid-table .el-table td.el-table__cell { border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.grid-table .el-table__row:hover > td { background: rgba(59, 130, 246, 0.12) !important; }

/* ---------- 标签 / 预警 ---------- */
.tag-level-严重 { box-shadow: 0 0 14px rgba(239, 68, 68, 0.35); }
.tag-level-较大 { box-shadow: 0 0 12px rgba(245, 158, 11, 0.25); }
.alert-strip {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.22), rgba(239, 68, 68, 0.04));
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.2);
  border-radius: 14px; font-size: 13.5px;
}
.hot-card { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 10px 26px rgba(0, 0, 0, 0.35); }

/* ---------- 入场动效 ---------- */
@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.content > div { animation: riseIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
.kpi { animation: riseIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }
.kpi-grid .kpi:nth-child(2) { animation-delay: 0.06s; }
.kpi-grid .kpi:nth-child(3) { animation-delay: 0.12s; }
.kpi-grid .kpi:nth-child(4) { animation-delay: 0.18s; }
.kpi-grid .kpi:nth-child(5) { animation-delay: 0.24s; }
.kpi-grid .kpi:nth-child(6) { animation-delay: 0.3s; }

/* ---------- 登录页 ---------- */
.login-card {
  background: linear-gradient(160deg, rgba(14, 28, 58, 0.92), rgba(5, 11, 24, 0.88));
  border: 1px solid rgba(212, 175, 55, 0.34);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 40px rgba(37, 99, 235, 0.12);
}
.login-card .logo-big { box-shadow: 0 12px 32px rgba(37, 99, 235, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.28); }

/* ---------- 弹窗 / 图片 ---------- */
.el-dialog, .el-drawer { box-shadow: 0 28px 70px rgba(0, 0, 0, 0.6) !important; }
.gallery .thumb { border-radius: 12px; box-shadow: 0 5px 14px rgba(0, 0, 0, 0.4); transition: transform 0.22s; }
.gallery .thumb:hover { transform: scale(1.07); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5), 0 0 18px rgba(240, 199, 94, 0.35); }

/* ---------- 大屏适配 ---------- */
@media (min-width: 1600px) {
  .content { padding: 26px 32px 48px; }
  .kpi .num { font-size: 66px; }
  .kpi { padding: 28px 30px 22px; }
  .card-title { font-size: 17px; }
  .topbar .crumb { font-size: 21px; }
  .chart { height: 340px; }
}
@media (max-width: 1500px) { .kpi .num { font-size: 46px; } .kpi .kpi-mark { font-size: 64px; } }
@media (max-width: 1280px) { .kpi .num { font-size: 36px; } .kpi .kpi-mark { font-size: 50px; } }
