/* ============================================================
 * theme.css — 煤制烯烃数智孪生智慧工厂 · 公共设计系统
 * 3D 数字孪生 · 高端科技 · 全站统一视觉/组件/动效库
 * 规范：深空多层背景 + 青(#19d3da)/金(#ffb74d)主辅 + 红绿橙语义
 *       玻璃面板 + 四角金角标 + 内发光；8px 网格；CSS 变量零硬编码
 * ============================================================ */

/* ============ 1. 设计令牌 ============ */
:root {
  /* —— 深空背景层 —— */
  --bg-deep:      #02060f;
  --bg-base:      #060d1c;
  --bg-elev:      #0a1530;
  --bg-panel:     rgba(10, 21, 48, 0.55);
  --bg-panel-solid:#0c1a3a;

  /* —— 主辅色（规范） —— */
  --cyan:        #19d3da;   /* 主色 青 */
  --cyan-soft:   #6ce7ff;
  --cyan-glow:   rgba(25, 211, 218, 0.55);
  --cyan-dim:    rgba(25, 211, 218, 0.18);
  --blue:        #2b6cff;
  --blue-deep:   #0a2a8c;

  /* —— 语义色 —— */
  --green:       #4ade80;   /* 正常 */
  --yellow:      #fbbf24;
  --orange:      #ffb74d;   /* 预警 */
  --red:         #ff5252;   /* 告警 */
  --gold:        #ffb74d;   /* 辅色 金（同预警，语义独立） */
  --gold-soft:   #ffd998;
  --gold-glow:   rgba(255, 183, 77, 0.6);

  /* —— 文字三级 —— */
  --text:        #d7e6ff;   /* 主 */
  --text-mute:   #7d93b8;   /* 次 */
  --text-dim:    #4a5f7a;   /* 弱 */
  --text-risk:   #ff7a85;

  /* —— 玻璃拟态 —— */
  --glass:          rgba(14, 30, 64, 0.42);
  --glass-border:   rgba(108, 231, 255, 0.28);
  --glass-hi:       rgba(180, 240, 255, 0.10);

  /* —— 网格/线条 —— */
  --grid-line:    rgba(25, 211, 218, 0.08);
  --grid-line-hi: rgba(25, 211, 218, 0.22);
  --hairline:     rgba(108, 231, 255, 0.18);

  /* —— 阴影/辉光 —— */
  --glow-cyan:    0 0 24px rgba(25, 211, 218, 0.45);
  --glow-gold:    0 0 18px rgba(255, 183, 77, 0.5);
  --glow-blue:    0 0 40px rgba(43, 108, 255, 0.4);
  --shadow-panel: 0 24px 60px rgba(0,0,0,0.55);
  --shadow-pop:   0 12px 36px rgba(0,0,0,0.6);

  /* —— 字体 —— */
  --font-sans:   "Rajdhani","Oxanium","Orbitron","PingFang SC","Microsoft YaHei","Segoe UI",sans-serif;
  --font-mono:   "JetBrains Mono","Consolas","SFMono-Regular",monospace;
  --font-title:  "Oxanium","Orbitron","PingFang SC","Microsoft YaHei",sans-serif;

  /* —— 圆角/间距（8px 网格） —— */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --r-xl: 20px;
  --gap:  16px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;

  /* —— 动效缓动 —— */
  --ease:    cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in: cubic-bezier(0.55, 0.06, 0.68, 0.19);
  --dur:     0.25s;
}

/* ============ 2. 重置 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  height: 100%; width: 100%; overflow: hidden;
  background: var(--bg-deep); color: var(--text);
  font-family: var(--font-sans); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  letter-spacing: 0.02em;
}
body { position: relative; }
a { color: var(--cyan); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }
canvas { display: block; }
ul, ol { list-style: none; }

/* ============ 3. 深空多层背景（径向深空 + 顶部光晕 + 底部能源辉光） ============ */
.scene-bg {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(25, 211, 218, 0.14) 0%, transparent 65%),
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(43, 108, 255, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 80% 60% at 50% 45%, rgba(10, 42, 140, 0.30) 0%, transparent 60%),
    linear-gradient(180deg, #02060f 0%, #060d1c 55%, #02060f 100%);
}
.scene-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 30%, transparent 82%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 30%, transparent 82%);
  opacity: 0.5; pointer-events: none;
}
.scene-canvas { position: fixed; inset: 0; z-index: 1; display: block; }

/* 纯 CSS 全屏粒子网格背景（备选，无 3D 时使用） */
.particle-bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(25,211,218,0.12), transparent 65%),
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(43,108,255,0.10), transparent 60%),
    var(--bg-deep);
}
.particle-bg::before, .particle-bg::after {
  content: ""; position: absolute; inset: -50%;
  background-image:
    radial-gradient(circle, rgba(25,211,218,0.6) 0.5px, transparent 1px),
    radial-gradient(circle, rgba(108,231,255,0.4) 0.5px, transparent 1px);
  background-size: 48px 48px, 72px 72px;
  background-position: 0 0, 24px 24px;
  animation: drift 60s linear infinite;
  opacity: 0.5;
}
.particle-bg::after { animation-duration: 90s; animation-direction: reverse; opacity: 0.35; }
@keyframes drift { from { transform: translate(0,0); } to { transform: translate(-48px,-48px); } }

/* ============ 4. 玻璃面板 .panel / .glass（统一） + 四角金角标 + 内发光 ============ */
.panel, .glass {
  position: relative;
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  box-shadow:
    inset 0 1px 0 var(--glass-hi),
    inset 0 0 28px rgba(25, 211, 218, 0.06),
    var(--shadow-panel),
    0 0 1px rgba(108, 231, 255, 0.4);
}
.panel::before, .glass::before {
  content: ""; position: absolute; left: 8%; right: 8%; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan-glow), transparent);
  opacity: 0.7;
}
/* 四角金色科技角标（::before/::after 已用于顶部高光，故角标用子元素 .corner-gold） */
.corner-gold { position: absolute; width: 22px; height: 22px; pointer-events: none; }
.corner-gold::before, .corner-gold::after {
  content: ""; position: absolute; background: var(--gold); box-shadow: var(--glow-gold);
}
.corner-gold::before { width: 100%; height: 2px; }
.corner-gold::after  { width: 2px; height: 100%; }
.corner-gold.tl { top: -1px; left: -1px; }
.corner-gold.tl::before { top: 0; left: 0; }
.corner-gold.tl::after  { top: 0; left: 0; }
.corner-gold.tr { top: -1px; right: -1px; }
.corner-gold.tr::before { top: 0; right: 0; }
.corner-gold.tr::after  { top: 0; right: 0; }
.corner-gold.bl { bottom: -1px; left: -1px; }
.corner-gold.bl::before { bottom: 0; left: 0; }
.corner-gold.bl::after  { bottom: 0; left: 0; }
.corner-gold.br { bottom: -1px; right: -1px; }
.corner-gold.br::before { bottom: 0; right: 0; }
.corner-gold.br::after  { bottom: 0; right: 0; }

/* ============ 5. 标题 ============ */
.title-glow {
  font-family: var(--font-title); font-weight: 700; letter-spacing: 0.08em;
  background: linear-gradient(92deg, #d7e6ff 0%, var(--cyan) 45%, var(--gold-soft) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  text-shadow: 0 0 30px rgba(25,211,218,0.25);
  filter: drop-shadow(0 0 8px rgba(25,211,218,0.35));
}
.section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 700; letter-spacing: 0.1em; color: var(--text);
}
.section-title::before {
  content: ""; width: 3px; height: 14px; border-radius: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--gold)); box-shadow: var(--glow-cyan);
}

/* ============ 6. 按钮 .btn（primary/gold/danger/ghost/sm + hover 上浮+扫光+loading） ============ */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; font-size: 15px; font-weight: 600; letter-spacing: 0.06em;
  border-radius: var(--r-md); transition: all var(--dur) var(--ease); overflow: hidden; white-space: nowrap;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { color: #021022; background: linear-gradient(135deg, var(--cyan) 0%, var(--cyan-soft) 50%, #aef6ff 100%); box-shadow: 0 0 22px rgba(25,211,218,0.45), inset 0 1px 0 rgba(255,255,255,0.5); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 0 36px rgba(25,211,218,0.7), inset 0 1px 0 rgba(255,255,255,0.6); transform: translateY(-2px); }
.btn-gold { color: #1a1206; background: linear-gradient(135deg, var(--gold-soft), var(--gold)); box-shadow: var(--glow-gold); }
.btn-gold:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 0 28px rgba(255,183,77,0.7); }
.btn-danger { color: #fff; background: linear-gradient(135deg, var(--red), #ff7a7a); box-shadow: 0 0 18px rgba(255,82,82,0.45); }
.btn-danger:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 0 28px rgba(255,82,82,0.7); }
.btn-ghost { color: var(--cyan); background: linear-gradient(135deg, rgba(25,211,218,0.10), rgba(25,211,218,0.02)); border: 1px solid var(--glass-border); backdrop-filter: blur(8px); }
.btn-ghost:hover:not(:disabled) { background: linear-gradient(135deg, rgba(25,211,218,0.20), rgba(25,211,218,0.06)); box-shadow: 0 0 18px rgba(25,211,218,0.3); transform: translateY(-2px); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: var(--r-sm); }
.btn-risk { color: var(--text-risk); border: 1px solid rgba(255,82,94,0.4); background: rgba(255,82,94,0.08); }
/* 扫光 */
.btn-scan::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 0.6s var(--ease);
}
.btn-scan:hover::after { transform: translateX(120%); }
/* loading 态 */
.btn.is-loading { pointer-events: none; color: transparent !important; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 16px; height: 16px; left: 50%; top: 50%; margin: -8px 0 0 -8px;
  border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%;
  animation: spin 0.8s linear infinite; background: none; transform: none;
}

/* ============ 7. 状态徽章 .badge（红/绿/金/青 + 呼吸灯） ============ */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px;
  font-size: 11px; border-radius: 10px; line-height: 1.6;
  background: rgba(25,211,218,0.1); color: var(--cyan); border: 1px solid var(--cyan-dim);
}
.badge.red { background: rgba(255,82,82,0.12); color: var(--red); border-color: rgba(255,82,82,0.4); }
.badge.green { background: rgba(74,222,128,0.12); color: var(--green); border-color: rgba(74,222,128,0.4); }
.badge.gold { background: rgba(255,183,77,0.12); color: var(--gold); border-color: rgba(255,183,77,0.4); }
.badge.cyan { background: rgba(25,211,218,0.12); color: var(--cyan); border-color: rgba(25,211,218,0.4); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.live .dot, .badge.live::before { content:""; width:6px; height:6px; border-radius:50%; background: var(--green); box-shadow:0 0 8px var(--green); animation: pulse 1.4s infinite; }

/* ============ 8. 进度条 .progress / .progress-3d ============ */
.progress { position: relative; height: 8px; border-radius: 4px; background: rgba(25,211,218,0.10); overflow: hidden; border: 1px solid var(--hairline); }
.progress > i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--cyan), var(--cyan-soft)); box-shadow: 0 0 10px var(--cyan-glow); transition: width 0.6s var(--ease); position: relative; }
.progress > i::after { content:""; position:absolute; inset:0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent); animation: progScan 2s linear infinite; }
@keyframes progScan { from { transform: translateX(-100%);} to { transform: translateX(100%);} }
.progress.warn > i { background: linear-gradient(90deg, var(--orange), var(--yellow)); box-shadow: 0 0 10px rgba(255,183,77,0.5); }
.progress.danger > i { background: linear-gradient(90deg, var(--red), #ff7a7a); box-shadow: 0 0 10px rgba(255,82,82,0.5); }
/* 拟 3D 立体进度 */
.progress-3d { position: relative; height: 20px; border-radius: 6px; background: linear-gradient(180deg, #03081a, #0a1530); border: 1px solid var(--hairline); box-shadow: inset 0 2px 4px rgba(0,0,0,0.6); overflow: hidden; }
.progress-3d > i { display:block; height:100%; border-radius: 6px; background: linear-gradient(180deg, var(--cyan-soft), var(--cyan) 50%, var(--blue-deep)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 0 14px var(--cyan-glow); transition: width 0.6s var(--ease); position: relative; }
.progress-3d > i::before { content:""; position:absolute; left:0; right:8px; top:3px; height:4px; border-radius:3px; background: linear-gradient(90deg, rgba(255,255,255,0.6), transparent); }

/* ============ 9. Tab .tabs（下划线+发光，动效切换） ============ */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--hairline); position: relative; }
.tabs .tab { position: relative; padding: 10px 18px; font-size: 13px; color: var(--text-mute); cursor: pointer; transition: color var(--dur); }
.tabs .tab:hover { color: var(--text); }
.tabs .tab.active { color: var(--cyan); }
.tabs .tab.active::after { content:""; position:absolute; left:8px; right:8px; bottom:-1px; height:2px; background: linear-gradient(90deg, var(--cyan), var(--gold)); box-shadow: var(--glow-cyan); border-radius: 2px; animation: tabIn 0.3s var(--ease); }
@keyframes tabIn { from { transform: scaleX(0); opacity:0;} to { transform: scaleX(1); opacity:1;} }
.tabs .tab.active::before { content:""; position:absolute; left:50%; top:6px; width:4px; height:4px; border-radius:50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); transform: translateX(-50%); }

/* ============ 10. 表格 .g-table / .table-tech ============ */
.g-table, .table-tech { width: 100%; border-collapse: collapse; font-size: 13px; }
.g-table thead th, .table-tech thead th {
  padding: 10px 12px; text-align: left; font-weight: 600; letter-spacing: 0.06em; color: var(--text-mute);
  background: linear-gradient(180deg, rgba(25,211,218,0.14), rgba(25,211,218,0.04));
  border-bottom: 1px solid var(--cyan-dim); position: sticky; top: 0; backdrop-filter: blur(6px);
}
.g-table tbody td, .table-tech tbody td { padding: 9px 12px; border-bottom: 1px solid var(--hairline); color: var(--text); }
.g-table tbody tr:nth-child(even), .table-tech tbody tr:nth-child(even) { background: rgba(25,211,218,0.03); }
.g-table tbody tr, .table-tech tbody tr { transition: background var(--dur); }
.g-table tbody tr:hover, .table-tech tbody tr:hover { background: rgba(25,211,218,0.10); box-shadow: inset 2px 0 0 var(--cyan); }
.table-tech.freeze-first colgroup col:first-child, .table-tech.freeze-first td:first-child, .table-tech.freeze-first th:first-child { position: sticky; left: 0; background: rgba(6,13,28,0.95); z-index: 1; }

/* ============ 11. 环形进度/仪表盘 .ring .gauge ============ */
.ring, .gauge { position: relative; display: inline-block; }
.ring svg, .gauge svg { display: block; }
.ring .track { fill: none; stroke: rgba(25,211,218,0.12); stroke-width: 6; }
.ring .bar { fill: none; stroke: var(--cyan); stroke-width: 6; stroke-linecap: round; filter: drop-shadow(0 0 6px var(--cyan-glow)); transition: stroke-dashoffset 0.6s var(--ease); }
.ring .center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; font-family: var(--font-mono); }

/* ============ 12. 树形菜单/侧边导航 .tree .menu-sider ============ */
.menu-sider { background: var(--bg-panel); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 8px; backdrop-filter: blur(10px); }
.menu-sider .grp { margin-bottom: 2px; }
.menu-sider .grp > .head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 13px; color: var(--text); cursor: pointer; border-radius: var(--r-sm); transition: all var(--dur); }
.menu-sider .grp > .head:hover { background: rgba(25,211,218,0.08); }
.menu-sider .grp.open > .head { color: var(--cyan); }
.menu-sider .grp > .head .caret { transition: transform var(--dur); font-size: 10px; color: var(--text-dim); }
.menu-sider .grp.open > .head .caret { transform: rotate(90deg); color: var(--cyan); }
.menu-sider .sub { max-height: 0; overflow: hidden; transition: max-height 0.3s var(--ease); }
.menu-sider .grp.open .sub { max-height: 600px; }
.menu-sider .sub a { display: flex; align-items: center; gap: 8px; padding: 7px 10px 7px 26px; font-size: 12px; color: var(--text-mute); border-radius: var(--r-sm); }
.menu-sider .sub a:hover { color: var(--text); background: rgba(25,211,218,0.06); }
.menu-sider .sub a.active { color: var(--cyan); background: rgba(25,211,218,0.12); box-shadow: inset 2px 0 0 var(--cyan); }

/* ============ 13. 时间轴 .timeline（节点发光） ============ */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content:""; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: linear-gradient(180deg, var(--cyan), var(--blue-deep), transparent); box-shadow: 0 0 8px var(--cyan-dim); }
.timeline .node { position: relative; padding: 0 0 18px 12px; }
.timeline .node::before { content:""; position: absolute; left: -22px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg-deep); border: 2px solid var(--cyan); box-shadow: 0 0 10px var(--cyan-glow); }
.timeline .node.warn::before { border-color: var(--orange); box-shadow: 0 0 10px rgba(255,183,77,0.6); }
.timeline .node.danger::before { border-color: var(--red); box-shadow: 0 0 10px rgba(255,82,82,0.6); }
.timeline .node .t { font-size: 11px; color: var(--text-dim); font-family: var(--font-mono); }
.timeline .node .c { font-size: 13px; color: var(--text); margin-top: 2px; }

/* ============ 14. 浮层提示 .tooltip .popover ============ */
.tooltip { position: absolute; z-index: 80; padding: 6px 10px; font-size: 12px; color: var(--text); background: rgba(6,13,28,0.95); border: 1px solid var(--cyan-dim); border-radius: var(--r-sm); box-shadow: var(--shadow-pop); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity var(--dur); }
.tooltip.show { opacity: 1; }
.popover { position: absolute; z-index: 85; min-width: 200px; padding: 12px; background: var(--bg-panel-solid); border: 1px solid var(--glass-border); border-radius: var(--r-md); box-shadow: var(--shadow-pop); }
.popover::before { content:""; position:absolute; top:-6px; left:18px; width:12px; height:12px; transform: rotate(45deg); background: var(--bg-panel-solid); border-left:1px solid var(--glass-border); border-top:1px solid var(--glass-border); }

/* ============ 15. 弹窗/抽屉 .modal-drawer ============ */
.modal-mask { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, rgba(2,6,15,0.7), rgba(2,6,15,0.92)); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.modal-mask.show { opacity: 1; pointer-events: auto; }
.modal-card { position: relative; padding: 28px; min-width: 420px; max-width: 92vw; transform: translateY(12px) scale(0.98); transition: transform 0.3s var(--ease); }
.modal-mask.show .modal-card { transform: translateY(0) scale(1); }
.modal-title { font-family: var(--font-title); font-size: 16px; font-weight: 700; letter-spacing: 0.06em; }
.modal-sub { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.modal-close { position: absolute; top: 14px; right: 14px; color: var(--text-dim); font-size: 18px; cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--cyan); }
/* 右侧抽屉 */
.drawer-mask { position: fixed; inset: 0; z-index: 100; background: rgba(2,6,15,0.7); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.drawer-mask.show { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; right: 0; top: 0; bottom: 0; z-index: 101; width: 420px; max-width: 92vw; padding: 24px; transform: translateX(100%); transition: transform 0.35s var(--ease); }
.drawer-mask.show .drawer { transform: translateX(0); }

/* ============ 16. 通知 .toast .notify ============ */
.toast-wrap { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { padding: 10px 18px; border-radius: var(--r-md); font-size: 13px; background: rgba(10,21,48,0.92); border: 1px solid var(--glass-border); color: var(--text); backdrop-filter: blur(12px); box-shadow: 0 8px 24px rgba(0,0,0,0.5); animation: toastIn 0.3s var(--ease); }
.toast.ok  { border-color: var(--green); color: var(--green); box-shadow: 0 0 16px rgba(74,222,128,0.3); }
.toast.err { border-color: var(--red);   color: var(--text-risk); box-shadow: 0 0 16px rgba(255,82,82,0.3); }
.toast.warn{ border-color: var(--orange); color: var(--orange); }
.toast.info{ border-color: var(--cyan); color: var(--cyan); }
.notify-wrap { position: fixed; right: 24px; top: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; width: 320px; }
.notify { position: relative; padding: 12px 14px; border-radius: var(--r-md); background: rgba(10,21,48,0.95); border: 1px solid var(--glass-border); box-shadow: var(--shadow-pop); border-left: 3px solid var(--cyan); animation: notifyIn 0.4s var(--ease); }
.notify.ok { border-left-color: var(--green); }
.notify.err { border-left-color: var(--red); }
.notify.warn { border-left-color: var(--orange); }
.notify .ttl { font-size: 13px; font-weight: 700; color: var(--text); }
.notify .desc { font-size: 12px; color: var(--text-mute); margin-top: 4px; }
.notify .close { position: absolute; top: 8px; right: 8px; color: var(--text-dim); cursor: pointer; }

/* ============ 17. 骨架屏/转圈 .skeleton .spinner ============ */
.skeleton { background: linear-gradient(90deg, rgba(25,211,218,0.04) 25%, rgba(25,211,218,0.14) 37%, rgba(25,211,218,0.04) 63%); background-size: 400% 100%; animation: skel 1.4s ease infinite; border-radius: var(--r-sm); }
.skeleton.line { height: 12px; margin-bottom: 8px; }
.skeleton.box { height: 80px; }
@keyframes skel { from { background-position: 100% 0;} to { background-position: 0 0;} }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(25,211,218,0.25); border-top-color: var(--cyan); border-radius: 50%; animation: spin 0.8s linear infinite; }
.spinner.lg { width: 32px; height: 32px; border-width: 3px; }

/* ============ 18. 图表容器 .chart-box ============ */
.chart-box { position: relative; width: 100%; min-height: 220px; border-radius: var(--r-md); overflow: hidden; background: rgba(4,12,30,0.35); border: 1px solid var(--hairline); }
.chart-box canvas { width: 100% !important; height: 100% !important; display: block; }
.chart-box .chart-title { position: absolute; left: 12px; top: 10px; font-size: 12px; color: var(--text-mute); z-index: 2; }
.chart-box .chart-legend { position: absolute; right: 12px; top: 10px; display: flex; gap: 12px; font-size: 11px; color: var(--text-mute); z-index: 2; }
.chart-box .chart-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }

/* ============ 19. 开关/勾选/单选 .switch .checkbox .radio-tech ============ */
.switch { position: relative; display: inline-block; width: 40px; height: 20px; border-radius: 20px; background: rgba(4,12,30,0.6); border: 1px solid var(--hairline); cursor: pointer; transition: all var(--dur); }
.switch::after { content:""; position:absolute; top:1px; left:1px; width:16px; height:16px; border-radius:50%; background: var(--text-dim); transition: all var(--dur); }
.switch.on { background: rgba(25,211,218,0.25); border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.switch.on::after { left: 21px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--text-mute); user-select: none; }
.checkbox input { display: none; }
.checkbox .box { width: 16px; height: 16px; border: 1px solid var(--glass-border); border-radius: 3px; position: relative; background: rgba(4,12,30,0.5); transition: all var(--dur); }
.checkbox input:checked + .box { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 10px var(--cyan-glow); }
.checkbox input:checked + .box::after { content:""; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px; border: solid #021022; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.radio-tech { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--text-mute); user-select: none; }
.radio-tech input { display: none; }
.radio-tech .box { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--glass-border); position: relative; background: rgba(4,12,30,0.5); transition: all var(--dur); }
.radio-tech input:checked + .box { border-color: var(--cyan); box-shadow: 0 0 10px var(--cyan-glow); }
.radio-tech input:checked + .box::after { content:""; position:absolute; left:3px; top:3px; width:8px; height:8px; border-radius:50%; background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }

/* ============ 20. 筛选标签/搜索 .tag-filter .search ============ */
.tag-filter { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; font-size: 12px; color: var(--text-mute); border: 1px solid var(--hairline); border-radius: 12px; background: rgba(4,12,30,0.4); cursor: pointer; transition: all var(--dur); }
.tag-filter:hover { color: var(--cyan); border-color: var(--cyan-dim); }
.tag-filter.active { color: var(--cyan); border-color: var(--cyan); background: rgba(25,211,218,0.12); box-shadow: 0 0 10px var(--cyan-dim); }
.search { position: relative; display: inline-flex; align-items: center; }
.search input { padding: 8px 12px 8px 32px; font-size: 13px; color: var(--text); background: rgba(4,12,30,0.55); border: 1px solid var(--hairline); border-radius: var(--r-sm); outline: none; transition: all var(--dur); min-width: 200px; }
.search input::placeholder { color: var(--text-dim); }
.search input:focus { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan-dim), 0 0 14px rgba(25,211,218,0.25); }
.search .ico { position: absolute; left: 10px; color: var(--text-dim); pointer-events: none; }

/* ============ 21. KPI 卡 .kpi-card ============ */
.kpi-card { position: relative; padding: 14px 16px; border-radius: var(--r-md); overflow: hidden; }
.kpi-card .label { font-size: 11px; letter-spacing: 0.08em; color: var(--text-mute); text-transform: uppercase; }
.kpi-card .val { font-family: var(--font-mono); font-size: 28px; font-weight: 700; color: var(--text); line-height: 1.2; margin: 6px 0 4px; text-shadow: 0 0 18px rgba(25,211,218,0.4); }
.kpi-card .unit { font-size: 13px; color: var(--text-mute); font-family: var(--font-sans); }
.kpi-card .trend { font-size: 12px; display: inline-flex; align-items: center; gap: 3px; }
.kpi-card .trend.up { color: var(--green); }
.kpi-card .trend.down { color: var(--red); }
.kpi-card .spark { width: 100%; height: 24px; margin-top: 6px; display: block; }
.kpi-card.warn .val { color: var(--orange); text-shadow: 0 0 18px rgba(255,183,77,0.5); }
.kpi-card.danger .val { color: var(--red); text-shadow: 0 0 18px rgba(255,82,82,0.5); animation: pulse 1.4s infinite; }
.kpi-card .corner-gold { width: 14px; height: 14px; }

/* ============ 22. 表单 .field .input（保持兼容） ============ */
.field { position: relative; }
.field-label { display: block; margin-bottom: 6px; font-size: 12px; color: var(--text-mute); letter-spacing: 0.08em; text-transform: uppercase; }
.input { width: 100%; padding: 12px 14px; font-size: 14px; color: var(--text); background: rgba(4,12,30,0.55); border: 1px solid var(--hairline); border-radius: var(--r-sm); outline: none; transition: all var(--dur); }
.input::placeholder { color: var(--text-dim); }
.input:focus { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan-dim), 0 0 14px rgba(25,211,218,0.25); background: rgba(6,18,42,0.7); }
.input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-dim); pointer-events: none; }
.input-with-icon { padding-left: 38px; }
.input-action { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--text-mute); padding: 4px 6px; border-radius: 4px; cursor: pointer; font-size: 12px; }
.input-action:hover { color: var(--cyan); }
.chk { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--text-mute); user-select: none; }
.chk input { display: none; }
.chk .box { width: 16px; height: 16px; border: 1px solid var(--glass-border); border-radius: 3px; position: relative; background: rgba(4,12,30,0.5); transition: all var(--dur); }
.chk input:checked + .box { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 10px var(--cyan-glow); }
.chk input:checked + .box::after { content:""; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px; border: solid #021022; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.role-card { position: relative; padding: 12px 8px; text-align: center; border: 1px solid var(--hairline); border-radius: var(--r-md); background: rgba(4,12,30,0.4); cursor: pointer; transition: all var(--dur); }
.role-card:hover { border-color: var(--cyan-dim); background: rgba(25,211,218,0.06); }
.role-card.active { border-color: var(--cyan); background: linear-gradient(160deg, rgba(25,211,218,0.18), rgba(25,211,218,0.04)); box-shadow: 0 0 16px rgba(25,211,218,0.3), inset 0 0 14px rgba(25,211,218,0.08); }
.role-card.active::before { content:""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg, var(--cyan), var(--gold)); box-shadow: var(--glow-cyan); }
.role-card .ico { font-size: 20px; color: var(--cyan); }
.role-card .nm { font-size: 13px; font-weight: 600; margin-top: 4px; color: var(--text); }
.role-card .ds { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.strength { display: flex; gap: 4px; margin-top: 6px; height: 4px; }
.strength span { flex: 1; border-radius: 2px; background: rgba(108,231,255,0.12); transition: background 0.25s; }
.strength.s1 span:nth-child(1) { background: var(--red); }
.strength.s2 span:nth-child(-n+2) { background: var(--orange); }
.strength.s3 span:nth-child(-n+3) { background: var(--yellow); }
.strength.s4 span { background: var(--green); }

/* ============ 23. 顶部公告/工具条 ============ */
.notice-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; gap: 10px; padding: 6px 24px; font-size: 12px; color: var(--orange); background: linear-gradient(90deg, rgba(255,146,46,0.12), rgba(255,210,74,0.06) 50%, rgba(255,146,46,0.12)); border-bottom: 1px solid rgba(255,183,77,0.25); backdrop-filter: blur(8px); }
.notice-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 8px var(--orange); animation: pulse 1.6s infinite; }
.notice-bar .close { margin-left: auto; color: var(--text-dim); cursor: pointer; padding: 0 6px; }

/* ============ 24. 转场遮罩 ============ */
.transition-veil { position: fixed; inset: 0; z-index: 300; pointer-events: none; background: radial-gradient(ellipse at center, rgba(25,211,218,0.0), rgba(2,6,15,0.0)); opacity: 0; transition: opacity 0.6s var(--ease); }
.transition-veil.active { opacity: 1; background: radial-gradient(ellipse at center, rgba(25,211,218,0.35), rgba(2,6,15,1)); }

/* ============ 25. 动效关键帧 + .no-anim ============ */
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes toastIn { from { opacity:0; transform: translateY(-10px);} to { opacity:1; transform: translateY(0);} }
@keyframes notifyIn { from { opacity:0; transform: translateX(40px);} to { opacity:1; transform: translateX(0);} }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeInUp { from { opacity:0; transform: translateY(16px);} to { opacity:1; transform: translateY(0);} }
@keyframes floatY { 0%,100% { transform: translateY(0);} 50% { transform: translateY(-4px);} }
@keyframes scanLine { 0% { transform: translateY(-100%);} 100% { transform: translateY(100%);} }
.spin { animation: spin 1s linear infinite; display: inline-block; }
.fade-up { animation: fadeInUp 0.6s var(--ease) both; }
.float { animation: floatY 3s ease-in-out infinite; }
.delay-1 { animation-delay: 0.1s; } .delay-2 { animation-delay: 0.2s; } .delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; } .delay-5 { animation-delay: 0.5s; } .delay-6 { animation-delay: 0.6s; }
/* 减动效开关（GPU 友好 + 无障碍） */
.no-anim *, .no-anim *::before, .no-anim *::after {
  animation-duration: 0.001s !important; animation-iteration-count: 1 !important;
  transition-duration: 0.001s !important;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
}

/* ============ 26. 滚动条 ============ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(4,12,30,0.4); }
::-webkit-scrollbar-thumb { background: var(--cyan-dim); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan-glow); }

/* ============ 27. 工具类 + 12 栅格 ============ */
.muted { color: var(--text-mute); } .dim { color: var(--text-dim); } .risk { color: var(--text-risk); }
.mono { font-family: var(--font-mono); } .center { text-align: center; }
.row { display: flex; align-items: center; } .col { display: flex; flex-direction: column; }
.between { justify-content: space-between; } .gap { gap: var(--gap); } .wrap { flex-wrap: wrap; }
.hidden { display: none !important; } .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); }
.col-1 { grid-column: span 1; } .col-2 { grid-column: span 2; } .col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; } .col-5 { grid-column: span 5; } .col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; } .col-8 { grid-column: span 8; } .col-9 { grid-column: span 9; }
.col-10 { grid-column: span 10; } .col-12 { grid-column: span 12; }
