@charset "UTF-8";
/* =============================================================================
   元一 AI 直播 · 云端控制台 · 设计令牌与基础层
   theme.css  —  只放 token / 重置 / 排版 / 布局骨架 / 背景特效层 / 无障碍
   配套：components.css（组件）  ·  规范文档：视觉设计系统.md
   约束：零外部依赖（无 CDN / 无外网字体），可被 Python 后端直接静态托管
   版本：v1.0 · 2026-11-01
   ========================================================================== */

/* -----------------------------------------------------------------------------
   1. 设计令牌 Design Tokens
   -------------------------------------------------------------------------- */
:root {
  color-scheme: dark;

  /* ---- 1.1 底色阶（由深到浅，全部为降饱和冷蓝） -------------------------- */
  --bg-void:      #03060C;   /* 页面最底 · 星空 */
  --bg-base:      #050A13;   /* 主背景 */
  --bg-raised:    #08101E;   /* 抬升面：侧栏 / 顶栏 */
  --bg-panel:     #0B1524;   /* 卡片面板 */
  --bg-panel-2:   #0E1A2C;   /* 卡片内嵌块 */
  --bg-inset:     #060D18;   /* 输入框 / 控制台凹陷 */
  --bg-hover:     #122239;   /* 悬停底 */
  --bg-active:    #16283F;   /* 选中/按下底 */

  /* ---- 1.2 品牌蓝 / 青（主色阶，直接取色板用） --------------------------- */
  --blue-100: #DBEAFE;
  --blue-200: #BFDBFE;
  --blue-300: #93C5FD;
  --blue-400: #60A5FA;
  --blue-500: #3B82F6;
  --blue-600: #2563EB;
  --blue-700: #1D4ED8;
  --cyan-200: #A5F3FC;
  --cyan-300: #67E8F9;
  --cyan-400: #22D3EE;
  --cyan-500: #06B6D4;
  --indigo-400: #818CF8;
  --indigo-500: #6366F1;
  --violet-400: #A78BFA;
  --violet-500: #8B5CF6;

  /* ---- 1.3 语义色（状态一律走这一组，不临时取色） ----------------------- */
  --ok:        #34D399;   /* 成功 / 已连接 / 正常 */
  --ok-strong: #10B981;
  --warn:      #FBBF24;   /* 警告 / 库存偏低 / 即将到期 */
  --warn-strong:#F59E0B;
  --danger:    #FB7185;   /* 危险 / 失败 / 删除 */
  --danger-strong:#F43F5E;
  --live:      #FF4D6D;   /* 直播中（唯一允许的暖色主视觉） */
  --live-strong:#FF3355;
  --vip:       #A78BFA;   /* VIP 通道 */
  --info:      #38BDF8;

  /* 半透明状态底 / 描边（组件里统一用） */
  --ok-soft:     rgba(52, 211, 153, .12);
  --warn-soft:   rgba(251, 191, 36, .12);
  --danger-soft: rgba(251, 113, 133, .12);
  --live-soft:   rgba(255, 77, 109, .13);
  --vip-soft:    rgba(167, 139, 250, .13);
  --info-soft:   rgba(56, 189, 248, .12);
  --ok-line:     rgba(52, 211, 153, .38);
  --warn-line:   rgba(251, 191, 36, .40);
  --danger-line: rgba(251, 113, 133, .40);
  --live-line:   rgba(255, 77, 109, .45);
  --vip-line:    rgba(167, 139, 250, .42);
  --info-line:   rgba(56, 189, 248, .40);

  /* ---- 1.4 文字色阶（深底上的四级层次 + 反白） -------------------------- */
  --fg-hi:   #F0F6FF;   /* 标题 / 关键数字 */
  --fg-base: #C9D7EA;   /* 正文 */
  --fg-mid:  #93A6C0;   /* 次要说明 */
  --fg-low:  #6B7F9B;   /* 占位 / 禁用 */
  --fg-faint:#41536E;   /* 分隔性文字 */
  --fg-on-brand: #041019; /* 品牌渐变上的深色字 */

  /* ---- 1.5 描边 / 分隔 -------------------------------------------------- */
  --line-1: rgba(125, 165, 220, .13);   /* 常规分隔 */
  --line-2: rgba(125, 165, 220, .22);   /* 卡片描边 */
  --line-3: rgba(125, 165, 220, .34);   /* 强调分隔 */
  --line-brand: rgba(56, 189, 248, .38);
  --line-brand-soft: rgba(56, 189, 248, .16);

  /* ---- 1.6 品牌渐变 ---------------------------------------------------- */
  --grad-brand:  linear-gradient(135deg, #22D3EE 0%, #3B82F6 52%, #6366F1 100%);
  --grad-brand-r:linear-gradient(225deg, #6366F1 0%, #3B82F6 48%, #22D3EE 100%);
  --grad-cyan:   linear-gradient(120deg, #67E8F9 0%, #38BDF8 100%);
  --grad-live:   linear-gradient(135deg, #FF6B81 0%, #F43F5E 100%);
  --grad-vip:    linear-gradient(135deg, #C4B5FD 0%, #8B5CF6 100%);
  --grad-panel:  linear-gradient(158deg, rgba(34, 211, 238, .10) 0%, rgba(59, 130, 246, .05) 44%, rgba(5, 10, 19, 0) 100%);
  --grad-panel-hi: linear-gradient(158deg, rgba(34, 211, 238, .16) 0%, rgba(59, 130, 246, .08) 46%, rgba(5, 10, 19, 0) 100%);
  --grad-fade-x: linear-gradient(90deg, transparent, rgba(56, 189, 248, .5), transparent);
  --grad-text:   linear-gradient(96deg, #DBEAFE 0%, #7DD3FC 38%, #60A5FA 72%, #A5B4FC 100%);

  /* ---- 1.7 玻璃拟态 ---------------------------------------------------- */
  --glass-1: rgba(11, 21, 36, .58);   /* 轻玻璃：卡片 */
  --glass-2: rgba(9, 17, 30, .78);    /* 中玻璃：侧栏 / 弹出 */
  --glass-3: rgba(7, 13, 24, .92);    /* 重玻璃：Modal / Toast */
  --glass-blur: 18px;
  --glass-blur-lg: 30px;
  --glass-highlight: inset 0 1px 0 rgba(215, 235, 255, .07);

  /* ---- 1.8 阴影 / 景深（4 级 + 发光） ---------------------------------- */
  --sh-1: 0 1px 2px rgba(0, 0, 0, .40);
  --sh-2: 0 4px 14px -4px rgba(0, 0, 0, .55), 0 1px 2px rgba(0, 0, 0, .35);
  --sh-3: 0 14px 34px -12px rgba(0, 0, 0, .70), 0 2px 6px rgba(0, 0, 0, .35);
  --sh-4: 0 32px 70px -24px rgba(0, 0, 0, .82), 0 8px 20px -10px rgba(0, 0, 0, .5);
  --glow-brand: 0 0 0 1px rgba(56, 189, 248, .24), 0 10px 34px -10px rgba(56, 189, 248, .55);
  --glow-brand-strong: 0 0 0 1px rgba(56, 189, 248, .40), 0 14px 44px -10px rgba(56, 189, 248, .72);
  --glow-live: 0 0 0 1px rgba(255, 77, 109, .30), 0 10px 34px -10px rgba(255, 77, 109, .55);
  --glow-vip: 0 0 0 1px rgba(167, 139, 250, .30), 0 10px 34px -10px rgba(139, 92, 246, .55);
  --glow-danger: 0 0 0 1px rgba(251, 113, 133, .30), 0 10px 30px -10px rgba(244, 63, 94, .50);
  --ring-focus: 0 0 0 2px var(--bg-base), 0 0 0 4px rgba(56, 189, 248, .65);

  /* ---- 1.9 字体 -------------------------------------------------------- */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei",
               "Source Han Sans SC", "Noto Sans CJK SC", "WenQuanYi Micro Hei",
               system-ui, sans-serif;
  --font-mono: "Cascadia Mono", "JetBrains Mono", "SF Mono", ui-monospace,
               Consolas, "Courier New", "Microsoft YaHei UI", monospace;
  --font-num: var(--font-mono);   /* 数字统一等宽，防止跳字 */

  /* ---- 1.10 字号 / 行高 / 字重 ----------------------------------------- */
  --fs-11: 11px; --fs-12: 12px; --fs-13: 13px; --fs-14: 14px;
  --fs-15: 15px; --fs-16: 16px; --fs-18: 18px; --fs-20: 20px;
  --fs-24: 24px; --fs-28: 28px; --fs-32: 32px; --fs-40: 40px; --fs-52: 52px;
  --lh-none: 1; --lh-tight: 1.2; --lh-snug: 1.4; --lh-body: 1.62; --lh-loose: 1.8;
  --fw-regular: 400; --fw-medium: 500; --fw-semi: 600; --fw-bold: 700;
  --ls-tight: -.01em; --ls-wide: .04em; --ls-wider: .14em;  /* 小标签用大间距 */
  /* 字号角色语义化别名 */
  --text-display: var(--fs-40);
  --text-h1: var(--fs-28);
  --text-h2: var(--fs-20);
  --text-h3: var(--fs-16);
  --text-body: var(--fs-14);
  --text-sm: var(--fs-13);
  --text-xs: var(--fs-12);
  --text-micro: var(--fs-11);

  /* ---- 1.11 间距栅格（4px 基准） --------------------------------------- */
  --sp-0: 0;    --sp-1: 4px;  --sp-2: 8px;   --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-7: 28px;  --sp-8: 32px; --sp-10: 40px;
  --sp-12: 48px;--sp-14: 56px;--sp-16: 64px; --sp-20: 80px;
  --gap-2xs: var(--sp-1); --gap-xs: var(--sp-2); --gap-sm: var(--sp-3);
  --gap-md: var(--sp-4);  --gap-lg: var(--sp-6); --gap-xl: var(--sp-8);
  --pad-card: var(--sp-5);      /* 卡片内边距 20 */
  --pad-card-lg: var(--sp-6);   /* 大卡片 24 */
  --pad-control: 10px;          /* 控件内边距 */

  /* ---- 1.11b 紧凑密度（一屏操作台） -----------------------------------
     仅 .card--compact / .field-inline / .pill 等紧凑组件使用；
     常规页面保持 airy 密度，两者共存，不互相污染 */
  --compact-gap: 8px;           /* 紧凑卡片内元素间距 */
  --compact-pad: 10px 12px;     /* 紧凑卡片内边距 */
  --h-statusbar: 52px;          /* 吸顶主状态条高度 */
  --h-cardhead-compact: 38px;   /* 紧凑卡片头高度 */
  --h-control-xs: 26px;         /* 胶囊 / 步进 / 迷你控件高度 */
  --fs-compact: 11px;           /* 紧凑模式辅助字号 */

  /* ---- 1.12 圆角 ------------------------------------------------------- */
  --r-xs: 6px;  --r-sm: 8px;  --r-md: 12px; --r-lg: 16px;
  --r-xl: 22px; --r-2xl: 28px; --r-pill: 999px;
  --r-control: var(--r-sm);
  --r-card: var(--r-lg);

  /* ---- 1.13 尺寸（控件/布局常量） -------------------------------------- */
  --h-control-sm: 30px;
  --h-control: 38px;
  --h-control-lg: 46px;
  --h-topbar: 60px;
  --w-sidebar: 232px;
  --w-sidebar-mini: 72px;
  --w-dock: 400px;
  --w-page-max: 1680px;

  /* ---- 1.14 动效（时长 / 曲线） --------------------------------------- */
  --dur-instant: 90ms;
  --dur-fast: 140ms;
  --dur: 200ms;
  --dur-slow: 340ms;
  --dur-xslow: 620ms;
  --dur-ambient: 26s;        /* 环境级循环（光晕漂移） */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.4, 0, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.42, .64, 1);
  --ease-linear: linear;

  /* ---- 1.15 层级 ------------------------------------------------------- */
  --z-bg: 0;   --z-fx: 1;     --z-content: 2;  --z-sticky: 20;
  --z-dropdown: 40; --z-drawer: 55; --z-modal: 60; --z-toast: 80; --z-tooltip: 90;

  /* ---- 1.16 布局别名 --------------------------------------------------- */
  --content-pad: var(--sp-6);
  --section-gap: var(--sp-5);
}

/* 备用：不支持 color-mix / mask 的旧内核仍能正常阅读（本文件不强制依赖新特性） */

/* -----------------------------------------------------------------------------
   2. 重置 Resets
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg-void);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  color: var(--fg-base);
  background:
    radial-gradient(1200px 620px at 18% -8%, rgba(37, 99, 235, .16), transparent 70%),
    radial-gradient(1000px 520px at 88% 4%, rgba(34, 211, 238, .10), transparent 72%),
    var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, canvas, video { display: block; max-width: 100%; }
a { color: var(--info); text-decoration: none; transition: color var(--dur-fast) var(--ease-out); }
a:hover { color: var(--cyan-300); }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; }
table { border-collapse: collapse; width: 100%; }
fieldset { border: 0; margin: 0; padding: 0; }
hr { border: 0; border-top: 1px solid var(--line-1); margin: var(--sp-4) 0; }
::selection { background: rgba(34, 211, 238, .28); color: #fff; }
/* 重要：组件普遍用 display:flex/inline-flex，会盖掉 UA 的 [hidden] 规则，
   这里强制声明，保证 JS / 后端模板用 hidden 属性控制显隐一定生效。 */
[hidden] { display: none !important; }

/* 滚动条（WebKit + Firefox） */
* { scrollbar-width: thin; scrollbar-color: rgba(96, 165, 250, .32) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(96, 165, 250, .38), rgba(34, 211, 238, .30));
  border-radius: var(--r-pill);
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(96, 165, 250, .62), rgba(34, 211, 238, .5)); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }

/* -----------------------------------------------------------------------------
   3. 排版 Typography
   -------------------------------------------------------------------------- */

/* 3.0 图标基元（内联 SVG + <use> 精灵）：统一描边规则，作为 token 级基础
   —— 注意：形状内部的 fill="currentColor" 属于更近的声明，会正常覆盖这里的继承值 */
.icon,
.nav__icon,
.btn__icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--xs { width: 13px; height: 13px; }
.icon--sm { width: 15px; height: 15px; }
.icon--lg { width: 24px; height: 24px; }

.t-display { font-size: var(--text-display); line-height: var(--lh-tight); font-weight: var(--fw-bold); letter-spacing: var(--ls-tight); color: var(--fg-hi); }
.t-h1 { font-size: var(--text-h1); line-height: var(--lh-tight); font-weight: var(--fw-semi); letter-spacing: var(--ls-tight); color: var(--fg-hi); }
.t-h2 { font-size: var(--text-h2); line-height: var(--lh-snug); font-weight: var(--fw-semi); color: var(--fg-hi); }
.t-h3 { font-size: var(--text-h3); line-height: var(--lh-snug); font-weight: var(--fw-semi); color: var(--fg-hi); }
.t-body { font-size: var(--text-body); line-height: var(--lh-body); color: var(--fg-base); }
.t-sm { font-size: var(--text-sm); line-height: var(--lh-body); color: var(--fg-mid); }
.t-xs { font-size: var(--text-xs); line-height: var(--lh-snug); color: var(--fg-mid); }
.t-muted { color: var(--fg-mid); }
.t-dim { color: var(--fg-low); }
.t-strong { color: var(--fg-hi); font-weight: var(--fw-semi); }

/* 小标签：全大写 + 大字距（中文不加字距，只用于英文/数字标签） */
.t-label {
  font-size: var(--text-micro);
  line-height: 1.4;
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--fg-low);
}

/* 数字：等宽 + 定宽数字，随变化不抖动 */
.mono, .num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 1;
  letter-spacing: .01em;
}
.num--lg { font-size: var(--fs-28); font-weight: var(--fw-semi); color: var(--fg-hi); line-height: 1.1; }
.num--xl { font-size: var(--fs-40); font-weight: var(--fw-bold); color: var(--fg-hi); line-height: 1.05; letter-spacing: -.02em; }
.num--unit { font-size: .62em; font-weight: var(--fw-medium); color: var(--fg-mid); margin-left: 3px; }

/* 渐变文字：大数字 / 品牌标题（仅用于非长文，保证可读性） */
.t-grad {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.t-grad--live { background: var(--grad-live); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.t-grad--vip  { background: var(--grad-vip);  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }

/* 文字微光（只给标题用，大面积正文禁用） */
.t-glow { text-shadow: 0 0 22px rgba(56, 189, 248, .45); }

/* 强调数字的扫描渐变（积分、费用、在线数） */
.num--sweep {
  background: linear-gradient(100deg, var(--fg-hi) 0%, var(--fg-hi) 32%, var(--cyan-300) 50%, var(--blue-300) 62%, var(--fg-hi) 82%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: numSweep 5.5s var(--ease-in-out) infinite;
}
@keyframes numSweep {
  0%, 100% { background-position: 120% 0; }
  50%      { background-position: -20% 0; }
}

/* -----------------------------------------------------------------------------
   4. 应用骨架 App Shell
   -------------------------------------------------------------------------- */
.app {
  position: relative;
  z-index: var(--z-content);
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--w-sidebar) minmax(0, 1fr);
  grid-template-rows: var(--h-topbar) minmax(0, 1fr);
  grid-template-areas: "side top" "side main";
}

.app__topbar {
  grid-area: top;
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  height: var(--h-topbar);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: 0 var(--content-pad);
  background: linear-gradient(180deg, rgba(8, 16, 30, .92), rgba(8, 16, 30, .68));
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border-bottom: 1px solid var(--line-2);
}
.app__topbar::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--grad-fade-x);
  opacity: .5;
  pointer-events: none;
}

.app__sidebar {
  grid-area: side;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: var(--z-sticky);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-3);
  background: linear-gradient(180deg, rgba(8, 16, 30, .95), rgba(5, 10, 19, .95));
  border-right: 1px solid var(--line-2);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.app__main {
  grid-area: main;
  min-width: 0;
  padding: var(--content-pad);
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

.page-wrap { max-width: var(--w-page-max); width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: var(--section-gap); }

/* 无侧栏的独立页（登录 / 结算等） */
.app--bare { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); grid-template-areas: "main"; }

/* 直播操作台：左内容 + 右固定控制坞 */
.console-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--w-dock);
  gap: var(--section-gap);
  align-items: start;
}
.console-split__main,
.console-split__dock { min-width: 0; display: flex; flex-direction: column; gap: var(--section-gap); }
.console-split__dock { position: sticky; top: calc(var(--h-topbar) + var(--content-pad)); }

/* 通用栅格工具 */
.grid { display: grid; gap: var(--section-gap); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); }
.row { display: flex; align-items: center; gap: var(--sp-3); }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: var(--sp-3); }
.spacer { flex: 1 1 auto; }

/* -----------------------------------------------------------------------------
   5. 背景与特效层 FX（三层：光晕 / 网格 / 星点，另加扫描线蒙版）
   —— 全部 pointer-events:none，绝不遮挡交互；prefers-reduced-motion 时静止
   -------------------------------------------------------------------------- */
.fx {
  position: fixed;
  inset: 0;
  z-index: var(--z-fx);
  pointer-events: none;
  overflow: hidden;
  contain: strict;
}

/* 5.1 极光光晕：两块超大面积模糊色团，极慢漂移 */
.fx-aurora::before,
.fx-aurora::after {
  content: "";
  position: absolute;
  width: 78vw; height: 78vw;
  max-width: 1180px; max-height: 1180px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .55;
  mix-blend-mode: screen;
  will-change: transform;
}
.fx-aurora::before {
  top: -34vw; left: -16vw;
  background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, .40), rgba(37, 99, 235, 0) 66%);
  animation: auroraA var(--dur-ambient) var(--ease-in-out) infinite alternate;
}
.fx-aurora::after {
  top: -24vw; right: -20vw;
  background: radial-gradient(circle at 50% 50%, rgba(34, 211, 238, .26), rgba(34, 211, 238, 0) 64%);
  animation: auroraB calc(var(--dur-ambient) * 1.35) var(--ease-in-out) infinite alternate;
}
@keyframes auroraA {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vw, 4vh, 0) scale(1.12); }
}
@keyframes auroraB {
  from { transform: translate3d(0, 0, 0) scale(1.06); }
  to   { transform: translate3d(-5vw, 6vh, 0) scale(.96); }
}

/* 5.2 细网格：48px 科技网格，上下/左右用径向蒙版淡出，避免"格子压正文" */
.fx-grid {
  background-image:
    linear-gradient(to right,  rgba(96, 165, 250, .085) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(96, 165, 250, .085) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px;
  -webkit-mask-image: radial-gradient(130% 96% at 50% -6%, #000 0%, rgba(0, 0, 0, .5) 44%, transparent 76%);
  mask-image: radial-gradient(130% 96% at 50% -6%, #000 0%, rgba(0, 0, 0, .5) 44%, transparent 76%);
  opacity: .9;
}
/* 网格之上的地平线光带 */
.fx-grid::after {
  content: "";
  position: absolute;
  left: 50%; top: 44%;
  width: 130vw; height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, .34), rgba(167, 139, 250, .22), transparent);
  box-shadow: 0 0 22px 2px rgba(56, 189, 248, .18);
}

/* 5.3 星点 / 粒子：由 JS 轻量绘制到 canvas（约 90 个点，requestAnimationFrame）
   无 JS 时仅显示静态底噪，不影响可读性 */
.fx-stars { z-index: var(--z-fx); opacity: .72; }
.fx-stars--nojs {
  background-image:
    radial-gradient(1.4px 1.4px at 12% 22%, rgba(190, 225, 255, .8), transparent),
    radial-gradient(1.2px 1.2px at 34% 68%, rgba(150, 200, 255, .55), transparent),
    radial-gradient(1.6px 1.6px at 58% 18%, rgba(210, 240, 255, .70), transparent),
    radial-gradient(1.2px 1.2px at 76% 52%, rgba(150, 210, 255, .55), transparent),
    radial-gradient(1.4px 1.4px at 88% 84%, rgba(190, 225, 255, .60), transparent),
    radial-gradient(1.2px 1.2px at 46% 88%, rgba(140, 190, 255, .45), transparent),
    radial-gradient(1.2px 1.2px at 22% 46%, rgba(160, 210, 255, .40), transparent);
}

/* 5.4 扫描线：极低对比横向条纹 + 一条缓慢下扫的高光（模拟 CRT/雷达） */
.fx-scanlines {
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(190, 225, 255, .028) 0px,
    rgba(190, 225, 255, .028) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: .55;
}
.fx-sweep::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 180px;
  top: -180px;
  background: linear-gradient(180deg, transparent, rgba(56, 189, 248, .055) 55%, rgba(56, 189, 248, .10) 88%, transparent);
  animation: scanDown 11s linear infinite;
}
@keyframes scanDown {
  0%   { transform: translate3d(0, -10vh, 0); opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { transform: translate3d(0, 118vh, 0); opacity: 0; }
}

/* 5.5 噪点（极轻，压住大面积纯色带的色阶断层） */
.fx-noise {
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}
/* 5.6 顶部氛围光：所有页面共享的一条品牌光带 */
.fx-topglow::before {
  content: "";
  position: absolute;
  top: -46vh; left: 50%;
  width: 92vw; height: 70vh;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 100%, rgba(56, 189, 248, .17), transparent 62%);
  filter: blur(6px);
}

/* 5.7 装饰性微粒（纯 CSS，用于卡片角标/分割线；数量少，成本低） */
.spark {
  position: absolute;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: var(--cyan-300);
  box-shadow: 0 0 8px 1px rgba(103, 232, 249, .8);
  animation: sparkPulse 3.6s var(--ease-in-out) infinite;
}
@keyframes sparkPulse {
  0%, 100% { opacity: .18; transform: scale(.8); }
  50%      { opacity: 1;   transform: scale(1.25); }
}

/* 5.8 霓虹描边 / 分隔线 / 角标装饰 */
.neon-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, .55), rgba(167, 139, 250, .35), transparent);
}
.neon-frame { position: relative; }
.neon-frame::before,
.neon-frame::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 1px solid rgba(56, 189, 248, .55);
  pointer-events: none;
}
.neon-frame::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: var(--r-md); }
.neon-frame::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: var(--r-md); }

/* -----------------------------------------------------------------------------
   6. 无障碍 Accessibility
   -------------------------------------------------------------------------- */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--cyan-300);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
/* 鼠标点击不显示焦点环，键盘才显示 */
:where(button, a, [tabindex]):focus:not(:focus-visible) { outline: none; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
/* 仅读屏可用的状态播报 */
.sr-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* 减少动态偏好：环境动效全停，过渡缩到极短（不影响状态变化的可感知） */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .fx-aurora::before, .fx-aurora::after, .fx-sweep::before, .fx-stars { display: none !important; }
  .num--sweep { animation: none; background-position: 50% 0; }
}

/* 高对比度偏好：强化描边 */
@media (prefers-contrast: more) {
  :root {
    --line-1: rgba(160, 195, 245, .32);
    --line-2: rgba(170, 205, 255, .48);
    --fg-mid: #B8C8DE;
    --fg-low: #93A6C0;
    --glass-1: rgba(8, 15, 27, .92);
    --glass-2: rgba(7, 13, 24, .96);
  }
}

/* 打印（极少用，仅保证导出不会一片黑） */
@media print {
  .fx, .app__sidebar, .app__topbar { display: none !important; }
  body { background: #fff; color: #111; }
  .app { display: block; }
}

/* -----------------------------------------------------------------------------
   7. 响应式断点（桌面优先，覆盖 1280 / 1440 / 1680 / 1920）
   -------------------------------------------------------------------------- */
@media (max-width: 1560px) {
  :root { --w-dock: 360px; }
}
@media (max-width: 1400px) {
  :root { --w-sidebar: 212px; --w-dock: 340px; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1240px) {
  :root { --content-pad: var(--sp-5); }
  .console-split { grid-template-columns: minmax(0, 1fr); }
  .console-split__dock { position: static; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  :root { --w-sidebar: var(--w-sidebar-mini); --h-topbar: 56px; }
  .app__sidebar .nav__label, .app__sidebar .brand__text, .app__sidebar .side-foot__text { display: none; }
  .grid--2, .grid--3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  :root { --content-pad: var(--sp-4); }
  .app { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main"; }
  .app__sidebar {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: auto;
    flex-direction: row; justify-content: space-around; align-items: center;
    z-index: var(--z-sticky); border-right: 0; border-top: 1px solid var(--line-2);
    padding: var(--sp-1) var(--sp-2);
  }
  .console-split__dock { position: static; }
}

/* 竖屏直播操作台提示：低于 1100×640 时改为单列（此处仅示意，实际由栅格断点接管） */
