/* ═══════════════════════════════════════════════════════════
   VAULT — theme.css
   深色主题（默认）· 浅色主题
   切换方式：<html data-theme="light">
   ═══════════════════════════════════════════════════════════ */

/* ── 深色主题（默认） ─────────────────────────────────────── */
:root,
[data-theme="dark"] {
  --bg:      #0d0e11;
  --bg2:     #13151a;
  --bg3:     #1a1d24;
  --line:    #242730;
  --line2:   #2e3340;
  --dim:     #4a5060;
  --muted:   #7a8294;
  --text:    #c8cdd8;
  --bright:  #e8ecf4;

  --accent:  #4f8ef7;
  --accent2: #3a6fd4;
  --green:   #3ecf8e;
  --red:     #f06e6e;
  --amber:   #f0b429;
  --purple:  #a78bfa;
  --orange:  #fb923c;

  --mono: 'IBM Plex Mono', monospace;
  --sans: 'IBM Plex Sans', sans-serif;

  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(0,0,0,.3);
  --shadow-md: 0 8px 24px rgba(0,0,0,.4);
  --shadow-lg: 0 24px 64px rgba(0,0,0,.5);

  /* 顶栏 accent 条颜色 */
  --modal-accent: var(--accent);

  /* 主题切换按钮图标 */
  --theme-icon: '☀';
  --theme-label: 'LIGHT';

  /* Select 下拉箭头颜色（需要在 JS 里处理或用 filter） */
  --select-arrow-filter: none;
}

/* ── 浅色主题 ─────────────────────────────────────────────── */
[data-theme="light"] {
  --bg:      #f4f5f7;
  --bg2:     #ffffff;
  --bg3:     #eef0f3;
  --line:    #e2e5eb;
  --line2:   #d0d4dc;
  --dim:     #9aa0b0;
  --muted:   #6b7280;
  --text:    #374151;
  --bright:  #111827;

  --accent:  #2563eb;
  --accent2: #1d4ed8;
  --green:   #059669;
  --red:     #dc2626;
  --amber:   #d97706;
  --purple:  #7c3aed;
  --orange:  #ea580c;

  --shadow-sm: 0 2px 8px rgba(0,0,0,.08);
  --shadow-md: 0 8px 24px rgba(0,0,0,.12);
  --shadow-lg: 0 24px 64px rgba(0,0,0,.16);

  --theme-icon: '☾';
  --theme-label: 'DARK';

  --select-arrow-filter: invert(0.4);
}

/* ── 浅色主题下覆盖部分组件细节 ──────────────────────────── */
[data-theme="light"] .toast {
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}

[data-theme="light"] .modal {
  box-shadow: 0 24px 64px rgba(0,0,0,.15);
}

[data-theme="light"] .badge-blue  { background: rgba(37,99,235,.1); }
[data-theme="light"] .badge-green { background: rgba(5,150,105,.1); }
[data-theme="light"] .badge-red   { background: rgba(220,38,38,.1); }
[data-theme="light"] .badge-amber { background: rgba(217,119,6,.1); }

[data-theme="light"] .select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='none' stroke='%236b7280' stroke-width='1.5'%3E%3Cpath d='M4 6l4 4 4-4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ── 主题过渡动画 ─────────────────────────────────────────── */
html.theme-transitioning,
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
  transition:
    background-color .25s ease,
    border-color .25s ease,
    color .2s ease,
    box-shadow .25s ease !important;
}
