/* 中转站皮肤 · 由注入器在 HTML 里引用；只覆盖样式，不改任何数据 */
/* ============================================================
     1. 设计令牌（UI 设计库「配色方案：夜色玻璃」）
     #070A12 背景 / #121830 表面 / #7C5CFF 主色 / #EEF1FF 文字
     ============================================================ */
  :root {
    --skin-brand: #7C5CFF;
    --skin-brand-hi: #8B6DFF;
    --skin-bg: #070A12;
    --skin-surface: #121830;
    --skin-text: #EEF1FF;
    --skin-dim: #8E9BC4;

    --radius: 14px;
    --primary: #7C5CFF;
    --primary-foreground: #ffffff;
    --ring: #7C5CFF;
    --accent: color-mix(in oklab, #7C5CFF 18%, #070A12);
    --accent-foreground: #EEF1FF;
    --sidebar-primary: #7C5CFF;
    --sidebar-primary-foreground: #ffffff;
    --sidebar-accent: #7C5CFF;
    --chart-1: #8B6DFF;
    --chart-2: #38BDF8;
    --chart-3: #A78BFA;
    --chart-4: #34D399;
    --chart-5: #FBBF24;
    --overview-accent-1: #8B6DFF;
    --overview-accent-2: #38BDF8;
    --overview-accent-3: #A78BFA;
  }

  /* 深色：真正生效的那一套 */
  .dark {
    color-scheme: dark;
    --background: #070A12;
    --foreground: #EEF1FF;
    --card: #121830;
    --card-foreground: #EEF1FF;
    --popover: #151C36;
    --popover-foreground: #EEF1FF;
    --secondary: #1B2342;
    --secondary-foreground: #C9D2EE;
    --muted: #161D38;
    --muted-foreground: #8E9BC4;
    --border: rgba(255, 255, 255, 0.13);
    --input: rgba(255, 255, 255, 0.18);
    --destructive: #F87171;
    --success: #34D399;
    --warning: #FBBF24;
    --info: #38BDF8;
    --sidebar: #0B0F1C;
    --sidebar-foreground: #C9D2EE;
    --sidebar-border: rgba(255, 255, 255, 0.10);
    --sidebar-ring: #7C5CFF;
  }

  /* 浅色：只换主色，别把深色令牌套上去 */
  :root:not(.dark) {
    --primary: #6A48F5;
    --ring: #6A48F5;
    --sidebar-primary: #6A48F5;
    --radius: 14px;
  }

  /* ============================================================
     2. 底色：铺两团柔和光晕（毛玻璃要有东西可糊）
     ============================================================ */
  .dark body {
    background-color: #070A12;
    background-image:
      radial-gradient(760px 760px at 4% -8%, rgba(124, 92, 255, 0.26), transparent 64%),
      radial-gradient(680px 680px at 104% 8%, rgba(56, 189, 248, 0.14), transparent 62%),
      radial-gradient(700px 700px at 46% 116%, rgba(124, 92, 255, 0.10), transparent 66%);
    background-attachment: fixed;
    background-repeat: no-repeat;
  }
  .dark #root { background: transparent; }

  /* ============================================================
     3. 侧边栏：毛玻璃
     ============================================================ */
  .dark [data-sidebar="sidebar"],
  .dark aside[class*="border-sidebar-border"],
  .dark .bg-sidebar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)) !important;
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-color: rgba(255, 255, 255, 0.09) !important;
  }

  /* 选中的菜单项：品牌色淡底 + 内描边 */
  .dark [data-sidebar="menu-button"][data-active="true"],
  .dark [data-sidebar="menu-button"][aria-current="page"] {
    background: color-mix(in srgb, #7C5CFF 20%, transparent) !important;
    color: #E4DEFF !important;
    box-shadow: inset 0 0 0 1px rgba(124, 92, 255, 0.38);
  }
  .dark [data-sidebar="menu-button"]:hover {
    background: rgba(255, 255, 255, 0.06) !important;
  }

  /* ============================================================
     4. 卡片 / 弹层：表面色 + 一道亮边
     ============================================================ */
  .dark [class*="bg-card"],
  .dark [data-slot="card"] {
    border-color: rgba(255, 255, 255, 0.10) !important;
  }
  .dark [data-slot="card"] {
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 30px rgba(0, 0, 0, 0.28);
  }
  .dark [data-slot="dialog-content"],
  .dark [role="dialog"] {
    background: rgba(21, 28, 54, 0.92) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 0 34px rgba(124, 92, 255, 0.20), 0 24px 60px rgba(0, 0, 0, 0.55);
  }

  /* ============================================================
     5. 主按钮：品牌紫实心 + 紫色投影
     ============================================================ */
  .dark [data-slot="button"].bg-primary,
  .dark button.bg-primary {
    background: linear-gradient(180deg, #8B6DFF, #6C4BF0) !important;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 6px 18px rgba(124, 92, 255, 0.36);
    transition: box-shadow .2s, transform .12s, filter .2s;
  }
  .dark [data-slot="button"].bg-primary:hover {
    filter: brightness(1.08);
    box-shadow: 0 8px 26px rgba(124, 92, 255, 0.5);
  }
  .dark [data-slot="button"].bg-primary:active { transform: scale(.985); }

  /* 次按钮：透明底 + 白 20% 边 */
  .dark [data-slot="button"].border {
    border-color: rgba(255, 255, 255, 0.20) !important;
    color: #C9D2EE;
  }
  .dark [data-slot="button"].border:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(255, 255, 255, 0.32) !important;
  }

  /* ============================================================
     6. 输入框：聚焦变紫 + 3px 光圈
     ============================================================ */
  .dark input,
  .dark textarea,
  .dark [data-slot="select-trigger"] {
    background: rgba(255, 255, 255, 0.045) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    transition: border-color .18s, box-shadow .18s, background .18s;
  }
  .dark input:focus,
  .dark textarea:focus,
  .dark input:focus-visible {
    border-color: #7C5CFF !important;
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.22) !important;
    outline: none !important;
  }
  .dark input::placeholder, .dark textarea::placeholder { color: #7C88AD !important; }

  /* ============================================================
     7. 表格：悬停高亮 + 表头沉底
     ============================================================ */
  .dark table tbody tr { transition: background .14s; }
  .dark table tbody tr:hover {
    background: color-mix(in srgb, #7C5CFF 8%, #121830) !important;
  }
  .dark table thead th {
    color: #8E9BC4 !important;
    font-weight: 600;
    background: rgba(24, 32, 64, 0.96);
  }

  /* 徽标 / 标签：只有小面积用语义色 */
  .dark [class*="text-green"], .dark [data-tone="success"] { color: #34D399 !important; }
  .dark [class*="text-red"], .dark [data-tone="danger"] { color: #F87171 !important; }
  .dark [class*="text-yellow"], .dark [class*="text-amber"] { color: #FBBF24 !important; }

  /* ============================================================
     8. 细节：选中色 / 滚动条 / 焦点环 / 过渡
     ============================================================ */
  .dark ::selection { background: rgba(124, 92, 255, 0.38); color: #fff; }

  .dark * { scrollbar-width: thin; scrollbar-color: rgba(238, 241, 255, 0.28) transparent; }
  .dark *::-webkit-scrollbar { width: 10px; height: 10px; }
  .dark *::-webkit-scrollbar-track { background: transparent; }
  .dark *::-webkit-scrollbar-thumb {
    background: rgba(238, 241, 255, 0.28);
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: padding-box;
  }
  .dark *::-webkit-scrollbar-thumb:hover { background: rgba(238, 241, 255, 0.48); background-clip: padding-box; }

  .dark :focus-visible { outline: 2px solid rgba(124, 92, 255, 0.7); outline-offset: 2px; }

  /* 数字等宽，表格读数更整齐 */
  .dark td, .dark .font-mono { font-variant-numeric: tabular-nums; }

  /* 顶部 header：半透明吸顶 */
  .dark header[class*="sticky"],
  .dark header[class*="top-0"] {
    background: linear-gradient(180deg, rgba(7, 10, 18, 0.92), rgba(7, 10, 18, 0.6)) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  /* 图表：让默认蓝绿换成紫青 */
  .dark svg path[stroke="#4ca9ff"], .dark svg path[stroke="#6cb6ff"] { stroke: #8B6DFF !important; }
  .dark svg path[stroke="#00a3aa"], .dark svg path[stroke="#00c9d1"] { stroke: #38BDF8 !important; }
