﻿/* =========================================================================
 * 全局设计令牌 — 现代高阶钛板岩与纯白科技卡片 (Titanium Slate & Clean Light Pro)
 * 融合工业级监控与高阶数据管理中枢标准体系
 * 【严禁 Emoji / 默认极佳浅色科技风 / 支持深浅双模平滑切换】
 * ========================================================================= */
:root {
  /* 基础背景与层级表面 (默认：现代钛板岩高阶浅色) */
  --bg: #f4f6fa;
  --bg-alt: #ffffff;
  --panel: #ffffff;
  --panel-alt: #f8fafc;
  --panel-raised: #f1f5f9;
  --panel-hover: #e2e8f0;

  /* 边框令牌 */
  --border: #e2e8f0;
  --border-light: #edf2f7;
  --border-focus: rgba(2, 132, 199, 0.4);

  /* 悠獭高能天青蓝主色 */
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-bg: rgba(2, 132, 199, 0.08);

  /* 状态语义色 */
  --green: #10b981;
  --green-bg: rgba(16, 185, 129, 0.08);
  --amber: #f59e0b;
  --amber-bg: rgba(245, 158, 11, 0.08);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.08);
  --cyan: #06b6d4;
  --cyan-bg: rgba(6, 182, 212, 0.08);
  --purple: #8b5cf6;
  --purple-bg: rgba(139, 92, 246, 0.08);

  /* 状态色别名 */
  --status-sage: #10b981;
  --status-amber: #f59e0b;
  --status-coral: #ef4444;

  /* 灰阶与文字层级 */
  --text: #0f172a;
  --text-muted: #334155;
  --text-dim: #64748b;
  --text-faint: #94a3b8;

  /* 字体家族 */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  /* 阴影令牌 */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 18px -2px rgba(15, 23, 42, 0.05), 0 2px 4px -1px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 10px 25px -4px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);

  /* 侧边栏：经典科技深邃蓝黑双拼 */
  --sidebar-bg: #0b1329;
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --sidebar-text: #94a3b8;
  --sidebar-text-hover: #ffffff;
  --sidebar-item-hover: rgba(255, 255, 255, 0.05);
  --sidebar-active-bg: rgba(2, 132, 199, 0.16);
  --sidebar-active-text: #38bdf8;

  /* ui.css 穿透变量覆写 */
  --brand: #0284c7;
  --brand-hover: #0369a1;
  --brand-active: #075985;
  --brand-light: rgba(2, 132, 199, 0.1);
  --brand-soft: rgba(2, 132, 199, 0.14);
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border-strong: #cbd5e1;
  --text-1: #0f172a;
  --text-2: #475569;
  --text-3: #64748b;
  --sidebar: #0b1329;
  --sidebar-hover: #12192b;
  --sidebar-active: #172138;
}

/* ============ 曜石深色模式（Dark Mode）变量定义 ============ */
body.theme-dark {
  --bg: #07090e;
  --bg-alt: #0a0e17;
  --panel: #0d121f;
  --panel-alt: #12192b;
  --panel-raised: #172138;
  --panel-hover: #1c2844;

  --border: rgba(148, 163, 184, 0.12);
  --border-light: rgba(148, 163, 184, 0.18);
  --border-focus: rgba(56, 189, 248, 0.4);

  --primary: #38bdf8;
  --primary-hover: #7dd3fc;
  --primary-bg: rgba(56, 189, 248, 0.1);

  --green: #34d399;
  --green-bg: rgba(52, 211, 153, 0.12);
  --amber: #fbbf24;
  --amber-bg: rgba(251, 191, 36, 0.12);
  --red: #f87171;
  --red-bg: rgba(248, 113, 113, 0.12);
  --cyan: #22d3ee;
  --cyan-bg: rgba(34, 211, 238, 0.12);
  --purple: #c084fc;
  --purple-bg: rgba(192, 132, 252, 0.12);

  --status-sage: #34d399;
  --status-amber: #fbbf24;
  --status-coral: #f87171;

  --text: #f8fafc;
  --text-muted: #cbd5e1;
  --text-dim: #94a3b8;
  --text-faint: #64748b;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.7);

  --sidebar-bg: #080c16;
  --sidebar-border: rgba(148, 163, 184, 0.08);
  --sidebar-text: #94a3b8;
  --sidebar-text-hover: #ffffff;
  --sidebar-item-hover: #12192b;
  --sidebar-active-bg: rgba(56, 189, 248, 0.14);
  --sidebar-active-text: #38bdf8;

  --brand: #38bdf8;
  --brand-hover: #7dd3fc;
  --brand-active: #0284c7;
  --brand-light: rgba(56, 189, 248, 0.12);
  --brand-soft: rgba(56, 189, 248, 0.16);
  --surface: #0d121f;
  --surface-2: #12192b;
  --border-strong: rgba(148, 163, 184, 0.22);
  --text-1: #f8fafc;
  --text-2: #cbd5e1;
  --text-3: #94a3b8;
  --sidebar: #080c16;
  --sidebar-hover: #12192b;
  --sidebar-active: #172138;
}

/* ============ 核心全局重置与底色 ============ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  width: 100%;
  background: var(--bg) !important;
  color: var(--text) !important;
  font-family: var(--font-display) !important;
  font-size: 13.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a { color: var(--primary); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--primary-hover); }
.mono, .num, .tabular { font-family: var(--font-mono) !important; font-variant-numeric: tabular-nums; }

/* 细滚动条 */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.28); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(2, 132, 199, 0.45); }
body.theme-dark ::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.18); }
body.theme-dark ::-webkit-scrollbar-thumb:hover { background: rgba(56, 189, 248, 0.4); }

/* 激光流光扫描与脉冲动效 */
@keyframes laser-sweep {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes p0-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.97); }
  50% { opacity: 1; transform: scale(1.03); }
}

/* ============ threeui 赛博 HUD 工具类 ============ */
.hud-corner-box {
  position: relative;
}
.hud-corner-box::before,
.hud-corner-box::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-color: var(--primary);
  opacity: 0.65;
  pointer-events: none;
  z-index: 2;
}
.hud-corner-box::before {
  top: -1px;
  left: -1px;
  border-top: 1.5px solid;
  border-left: 1.5px solid;
}
.hud-corner-box::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 1.5px solid;
  border-right: 1.5px solid;
}

