/* Auto-generated by scripts/build-css.js — DO NOT EDIT */

/* ============================================================
   Design System — Color Tokens
   Light (Perplexity AI) / Dark (Linear)
   ============================================================
   切换规则：
   - 无覆盖 + 亮色系统  → 亮色（Perplexity AI 象牙白）
   - 无覆盖 + 暗色系统  → 暗色（Linear 纯黑）
   - [data-theme="light"] → 强制亮色
   - [data-theme="dark"]  → 强制暗色
   ============================================================ */

/* ============================================================
   亮色主题（默认）— Perplexity AI 风格
   气质：纯净学术象牙桌面，完全灰度，胶囊按钮，干净克制
   ============================================================ */
:root,
[data-theme="light"] {

  /* ── 表面层级（从底到高）── */
  --color-surface-0: #FFFFFF;        /* 页面背景，最底层 */
  --color-surface-1: #FAF8F5;        /* 一级卡片、搜索框背景 */
  --color-surface-2: #F2F0EC;        /* 二级卡片、悬停态 */
  --color-surface-3: #EBE8E3;        /* 三级提升、分割区域 */

  /* ── 文字 ── */
  --color-text-primary: #000000;     /* 主标题、强调内容 */
  --color-text-secondary: #27251E;   /* 正文、次要信息 */
  --color-text-tertiary: #92918B;    /* 辅助说明、元数据 */
  --color-text-muted: #72706B;       /* 禁用态、极低优先级 */
  --color-text-on-accent: #FFFFFF;   /* 深色强调色上的文字 */
  --color-text-link: #27251E;        /* 链接色 */

  /* ── 强调 / 品牌 ── */
  --color-accent: #27251E;           /* 主强调色（石墨深灰） */
  --color-accent-hover: #000000;     /* 强调色悬停 */
  --color-accent-subtle: #FAF8F5;    /* 弱强调背景 */

  /* ── 语义色 ── */
  --color-success: #1aae39;
  --color-success-bg: #edf7ee;
  --color-success-text: #0e7a26;
  --color-warning: #ffb110;
  --color-warning-bg: #fff8e6;
  --color-warning-text: #b37b00;
  --color-error: #eb5757;
  --color-error-bg: #fef0f0;
  --color-error-text: #c0392b;
  --color-info: #5e6ad2;
  --color-info-bg: #eef0fb;
  --color-info-text: #3b48b0;

  /* ── 语义色上的文字色 ── */
  --color-text-on-success: #ffffff;
  --color-text-on-error:   #ffffff;
  --color-text-on-info:    #ffffff;
  --color-text-on-warning: #000000;

  /* ── 边框 ── */
  --color-border: #E5E3DF;
  --color-border-light: #F0EDE9;
  --color-border-input: #E0DDD8;
  --color-border-focus: #27251E;

  /* ── 遮罩 / 叠加 ── */
  --color-overlay: rgba(0, 0, 0, 0.4);
  --color-overlay-light: rgba(0, 0, 0, 0.1);

  /* ── 特殊背景 ── */
  --color-code-bg: #FAF8F5;
  --color-stripe: #FAF8F5;
}

/* ============================================================
   暗色主题 — Linear 风格
   气质：午夜极客控制台，霓虹绿唯一强调，锐利克制
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {

    /* ── 表面层级 ── */
    --color-surface-0: #08090a;      /* Pitch Black — 页面背景 */
    --color-surface-1: #0f1011;      /* Graphite — 一级卡片 */
    --color-surface-2: #161718;      /* Deep Slate — 二级卡片 */
    --color-surface-3: #23252a;      /* Charcoal Grey — 边框/分割 */

    /* ── 文字 ── */
    --color-text-primary: #f7f8f8;   /* Porcelain — 主文字 */
    --color-text-secondary: #d0d6e0; /* Light Steel — 正文 */
    --color-text-tertiary: #8a8f98;  /* Storm Cloud — 辅助 */
    --color-text-muted: #62666d;     /* Fog Grey — 禁用/元数据 */
    --color-text-on-accent: #08090a; /* 霓虹绿按钮上的黑字 */
    --color-text-link: #5e6ad2;      /* Aether Blue — 链接 */

    /* ── 强调 / 品牌 ── */
    --color-accent: #e4f222;         /* Neon Lime — 唯一强调色 */
    --color-accent-hover: #d4e212;
    --color-accent-subtle: #1a1b0a;

    /* ── 语义色 ── */
    --color-success: #27a644;
    --color-success-bg: #0a1a0e;
    --color-success-text: #4cd06a;
    --color-warning: #ffc95e;
    --color-warning-bg: #1a1508;
    --color-warning-text: #ffd98a;
    --color-error: #eb5757;
    --color-error-bg: #1a0a0a;
    --color-error-text: #f08080;
    --color-info: #5e6ad2;
    --color-info-bg: #0a0e1a;
    --color-info-text: #8b94e6;

    /* ── 语义色上的文字色 ── */
    --color-text-on-success: #ffffff;
    --color-text-on-error:   #ffffff;
    --color-text-on-info:    #ffffff;
    --color-text-on-warning: #08090a;

    /* ── 边框 ── */
    --color-border: #23252a;
    --color-border-light: #1a1c20;
    --color-border-input: #383b3f;   /* Gunmetal */
    --color-border-focus: #e4f222;   /* 聚焦用霓虹绿 */

    /* ── 遮罩 / 叠加 ── */
    --color-overlay: rgba(0, 0, 0, 0.6);
    --color-overlay-light: rgba(0, 0, 0, 0.3);

    /* ── 特殊背景 ── */
    --color-code-bg: #0f1011;
    --color-stripe: #0f1011;
  }
}

/* ============================================================
   手动暗色覆盖（覆盖系统偏好和亮色默认）
   ============================================================ */
[data-theme="dark"] {
  --color-surface-0: #08090a;
  --color-surface-1: #0f1011;
  --color-surface-2: #161718;
  --color-surface-3: #23252a;
  --color-text-primary: #f7f8f8;
  --color-text-secondary: #d0d6e0;
  --color-text-tertiary: #8a8f98;
  --color-text-muted: #62666d;
  --color-text-on-accent: #08090a;
  --color-text-link: #5e6ad2;
  --color-accent: #e4f222;
  --color-accent-hover: #d4e212;
  --color-accent-subtle: #1a1b0a;
  --color-success: #27a644;
  --color-success-bg: #0a1a0e;
  --color-success-text: #4cd06a;
  --color-warning: #ffc95e;
  --color-warning-bg: #1a1508;
  --color-warning-text: #ffd98a;
  --color-error: #eb5757;
  --color-error-bg: #1a0a0a;
  --color-error-text: #f08080;
  --color-info: #5e6ad2;
  --color-info-bg: #0a0e1a;
  --color-info-text: #8b94e6;
  --color-text-on-success: #ffffff;
  --color-text-on-error:   #ffffff;
  --color-text-on-info:    #ffffff;
  --color-text-on-warning: #08090a;
  --color-border: #23252a;
  --color-border-light: #1a1c20;
  --color-border-input: #383b3f;
  --color-border-focus: #e4f222;
  --color-overlay: rgba(0, 0, 0, 0.6);
  --color-overlay-light: rgba(0, 0, 0, 0.3);
  --color-code-bg: #0f1011;
  --color-stripe: #0f1011;
}

/* ============================================================
   蓝色亮色主题（shadcn/ui 风格）— 完整第三皮肤
   ============================================================ */
[data-theme="blue"] {
  --color-accent: #3B82F6;
  --color-accent-hover: #2563EB;
  --color-accent-subtle: #EFF6FF;
  --color-text-link: #3B82F6;
  --color-text-on-accent: #FFFFFF;
  --color-border-focus: #3B82F6;
  --color-focus-ring: #3B82F6;
  --color-info: #6366F1;
  --color-info-bg: #EEF2FF;
  --color-info-text: #4338CA;
  --color-text-on-info: #FFFFFF;
  --color-success: #10B981;
  --color-success-bg: #ECFDF5;
  --color-success-text: #065F46;
  --color-text-on-success: #FFFFFF;
  --color-warning: #F59E0B;
  --color-warning-bg: #FFFBEB;
  --color-warning-text: #92400E;
  --color-text-on-warning: #000000;
  --color-error: #EF4444;
  --color-error-bg: #FEF2F2;
  --color-error-text: #991B1B;
  --color-text-on-error: #FFFFFF;
  --color-surface-0: #F8FAFC;
  --color-surface-1: #F1F5F9;
  --color-surface-2: #E2E8F0;
  --color-surface-3: #CBD5E1;
  --color-border: #CBD5E1;
  --color-border-light: #E2E8F0;
  --color-border-input: #CBD5E1;
  --color-code-bg: #F1F5F9;
  --color-stripe: #F8FAFC;
}

/* ============================================================
   Design System — Spacing & Shape Tokens
   间距、圆角、阴影、动效
   统一使用 Linear 体系 — 切换主题只变颜色，形状不变
   ============================================================ */

:root {

  /* ── 间距阶梯（4px 基准）── */
  --space-0:  0;
  --space-1:  0.25rem;  /* 4px */
  --space-2:  0.5rem;   /* 8px  — 元素间隙 */
  --space-3:  0.75rem;  /* 12px — 卡片内边距 */
  --space-4:  1rem;     /* 16px */
  --space-5:  1.5rem;   /* 24px — 区域间距 */
  --space-6:  2rem;     /* 32px */
  --space-8:  3rem;     /* 48px */
  --space-10: 4rem;     /* 64px */
  --space-12: 6rem;     /* 96px */

  /* ── 语义间距（Linear 紧凑风格）── */
  --space-element-gap:  var(--space-2);  /* 8px */
  --space-card-padding: var(--space-3);  /* 12px */
  --space-section-gap:  var(--space-5);  /* 24px */
  --space-page-padding: var(--space-5);  /* 24px */

  /* ── 圆角（Linear 紧致体系）── */
  --radius-none:  0;
  --radius-sm:    0.125rem;   /* 2px — 标签、徽章 */
  --radius-md:    0.375rem;   /* 6px — 卡片、按钮、输入框 */
  --radius-lg:    0.5rem;     /* 8px */
  --radius-xl:    0.75rem;    /* 12px */
  --radius-full:  9999px;     /* 胶囊（导航 pill 等少数场景） */

  /* ── 语义圆角 ── */
  --radius-button: var(--radius-md);   /* 6px */
  --radius-card:   var(--radius-md);   /* 6px */
  --radius-input:  var(--radius-md);   /* 6px */
  --radius-badge:  var(--radius-sm);   /* 2px */
  --radius-modal:  var(--radius-md);   /* 6px */
  --radius-tag:    var(--radius-sm);   /* 2px */

  /* ── 阴影（Linear 锐利 5 级系统）── */
  --shadow-none: none;
  --shadow-sm: rgba(0, 0, 0, 0.4) 0px 2px 4px 0px;
  --shadow-md: rgba(0, 0, 0, 0.01) 0px 5px 2px 0px,
               rgba(0, 0, 0, 0.04) 0px 3px 2px 0px,
               rgba(0, 0, 0, 0.07) 0px 1px 1px 0px,
               rgba(0, 0, 0, 0.08) 0px 0px 1px 0px;
  --shadow-lg: rgba(0, 0, 0, 0.2) 0px 0px 12px 0px;
  --shadow-xl: rgba(0, 0, 0, 0.2) 0px 0px 0px 1px;

  /* ── 语义阴影 ── */
  --shadow-card:     var(--shadow-sm);
  --shadow-elevated: var(--shadow-md);
  --shadow-modal:    var(--shadow-lg);
  --shadow-dropdown: var(--shadow-md);
  --shadow-toast:    var(--shadow-lg);

  /* ── 动效时长 ── */
  --duration-fast:    150ms;
  --duration-normal:  250ms;
  --duration-slow:    400ms;

  /* ── 缓动函数 ── */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ── 容器宽度 ── */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;

  /* ── Z-index 层级 ── */
  --z-base:     0;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-overlay:  300;
  --z-modal:    400;
  --z-toast:    500;
  --z-tooltip:  600;
}

/* ============================================================
   减少动效（可访问性）
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-normal: 0ms;
    --duration-slow: 0ms;
  }
}

/* ============================================================
   Design System — Surface Layer Tokens
   表面层级体系：通过背景色差而非阴影来区分层级
   亮色：象牙白 → 羊皮纸 → 浅灰渐变
   暗色：纯黑 → 石墨 → 深板岩递进
   ============================================================ */

/* ============================================================
   亮色默认 — Perplexity AI
   ============================================================ */
:root,
[data-theme="light"] {

  /* ── 层级背景 ── */
  --surface-page:    var(--color-surface-0);  /* #FFFFFF 页面底 */
  --surface-card:    var(--color-surface-1);  /* #FAF8F5 卡片 */
  --surface-raised:  var(--color-surface-2);  /* #F2F0EC 提升卡片 */
  --surface-overlay: var(--color-surface-3);  /* #EBE8E3 覆盖层 */

  /* ── 交互表面 ── */
  --surface-hover:       rgba(0, 0, 0, 0.04);
  --surface-active:      rgba(0, 0, 0, 0.08);
  --surface-selected:    var(--color-accent-subtle);
  --surface-disabled:    rgba(0, 0, 0, 0.04);

  /* ── 输入表面 ── */
  --surface-input:           var(--color-surface-1);
  --surface-input-disabled:  var(--color-surface-2);

  /* ── 导航表面 ── */
  --surface-nav:         var(--color-surface-0);
  --surface-nav-hover:   var(--color-surface-1);
  --surface-nav-active:  var(--color-surface-1);

  /* ── 表格表面 ── */
  --surface-table-header: var(--color-surface-1);
  --surface-table-row:    transparent;
  --surface-table-stripe: var(--color-stripe);
  --surface-table-hover:  var(--color-surface-1);

  /* ── 语义表面 ── */
  --surface-success:  var(--color-success-bg);
  --surface-warning:  var(--color-warning-bg);
  --surface-error:    var(--color-error-bg);
  --surface-info:     var(--color-info-bg);
}

/* ============================================================
   暗色 — Linear
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {

    --surface-page:    var(--color-surface-0);  /* #08090a */
    --surface-card:    var(--color-surface-1);  /* #0f1011 */
    --surface-raised:  var(--color-surface-2);  /* #161718 */
    --surface-overlay: var(--color-surface-3);  /* #23252a */

    --surface-hover:       rgba(255, 255, 255, 0.04);
    --surface-active:      rgba(255, 255, 255, 0.08);
    --surface-selected:    var(--color-accent-subtle);
    --surface-disabled:    rgba(255, 255, 255, 0.04);

    --surface-input:           transparent;
    --surface-input-disabled:  var(--color-surface-2);

    --surface-nav:         var(--color-surface-0);
    --surface-nav-hover:   var(--color-surface-1);
    --surface-nav-active:  var(--color-surface-1);

    --surface-table-header: var(--color-surface-1);
    --surface-table-row:    transparent;
    --surface-table-stripe: var(--color-stripe);
    --surface-table-hover:  var(--color-surface-1);

    --surface-success:  var(--color-success-bg);
    --surface-warning:  var(--color-warning-bg);
    --surface-error:    var(--color-error-bg);
    --surface-info:     var(--color-info-bg);
  }
}

[data-theme="dark"] {
  --surface-page:    var(--color-surface-0);
  --surface-card:    var(--color-surface-1);
  --surface-raised:  var(--color-surface-2);
  --surface-overlay: var(--color-surface-3);
  --surface-hover:       rgba(255, 255, 255, 0.04);
  --surface-active:      rgba(255, 255, 255, 0.08);
  --surface-selected:    var(--color-accent-subtle);
  --surface-disabled:    rgba(255, 255, 255, 0.04);
  --surface-input:           transparent;
  --surface-input-disabled:  var(--color-surface-2);
  --surface-nav:         var(--color-surface-0);
  --surface-nav-hover:   var(--color-surface-1);
  --surface-nav-active:  var(--color-surface-1);
  --surface-table-header: var(--color-surface-1);
  --surface-table-row:    transparent;
  --surface-table-stripe: var(--color-stripe);
  --surface-table-hover:  var(--color-surface-1);
  --surface-success:  var(--color-success-bg);
  --surface-warning:  var(--color-warning-bg);
  --surface-error:    var(--color-error-bg);
  --surface-info:     var(--color-info-bg);
}

/* ============================================================
   Design System — Typography Tokens
   字体：Inter（主字体）+ JetBrains Mono（等宽）
   统一使用 Linear 字号阶梯 — 切换主题只变颜色，形状不变
   ============================================================ */

/* ============================================================
   字体引入（建议在 HTML <head> 中通过 <link> 引入）
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono&display=swap" rel="stylesheet">
   ============================================================ */

:root {
  /* ── 字体家族 ── */
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', 'SF Mono', 'Fira Code', monospace;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* ── 字重 ── */
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* ── 字号阶梯（Linear 基准，不随主题变化）── */
  --text-xs:     0.625rem;   /* 10px — caption */
  --text-sm:     0.75rem;    /* 12px */
  --text-base:   0.875rem;   /* 14px — body */
  --text-lg:     1rem;       /* 16px */
  --text-xl:     1.063rem;   /* 17px */
  --text-2xl:    1.25rem;    /* 20px */
  --text-3xl:    1.5rem;     /* 24px — heading */
  --text-4xl:    3rem;       /* 48px — heading-lg */
  --text-5xl:    4.5rem;     /* 72px — display */

  /* ── 行高 ── */
  --leading-tight:  1;
  --leading-snug:   1.2;
  --leading-normal: 1.4;
  --leading-relaxed: 1.5;

  /* ── 字间距 ── */
  --tracking-tight:  -0.03em;
  --tracking-normal: -0.01em;
}

/* ============================================================
   实用 Typography Class
   ============================================================ */

.text-display {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
}

.text-heading-lg {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
}

.text-heading {
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
}

.text-heading-sm {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--leading-snug);
  color: var(--color-text-primary);
}

.text-subheading {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-snug);
  color: var(--color-text-secondary);
}

.text-body {
  font-size: var(--text-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
}

.text-body-sm {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
}

.text-caption {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text-tertiary);
}

.text-mono {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

/* ============================================================
   Avatar — 头像 & 头像组
   ============================================================ */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-on-accent);
  background: var(--color-accent);
  overflow: hidden;
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 尺寸变体 */
.avatar-xs  { width: 1.25rem; height: 1.25rem; font-size: 0.5rem; }
.avatar-sm  { width: 1.75rem; height: 1.75rem; font-size: 0.625rem; }
.avatar-md  { width: 2.5rem;  height: 2.5rem;  font-size: var(--text-sm); }
.avatar-lg  { width: 3.5rem;  height: 3.5rem;  font-size: var(--text-lg); }
.avatar-xl  { width: 5rem;    height: 5rem;    font-size: var(--text-2xl); }

/* 方形变体 */
.avatar-square {
  border-radius: var(--radius-md);
}

/* 在线状态 */
.avatar-wrapper {
  position: relative;
  display: inline-flex;
}

.avatar-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  border: 2px solid var(--surface-page);
}

.avatar-status-online  { background: var(--color-success); }
.avatar-status-offline { background: var(--color-text-muted); }
.avatar-status-busy    { background: var(--color-warning); }
.avatar-status-away    { background: var(--color-error); }

/* 头像组 */
.avatar-group {
  display: flex;
  align-items: center;
}

.avatar-group .avatar {
  border: 2px solid var(--surface-page);
}

.avatar-group .avatar + .avatar {
  margin-left: -0.5rem;
}

.avatar-group-remainder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--surface-card);
  color: var(--color-text-tertiary);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  border: 2px solid var(--surface-page);
  margin-left: -0.5rem;
}

/* ============================================================
   Badge — 徽章/标签组件
   亮色：全胶囊，天蓝字
   暗色：2px 圆角，低调灰
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.125rem 0.5rem;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  line-height: 1.5;
  border-radius: var(--radius-badge);
  white-space: nowrap;
  user-select: none;
}

/* ── 语义变体 ── */
.badge-default {
  background: var(--surface-card);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-light);
}

.badge-primary {
  background: var(--color-accent);
  color: var(--color-text-on-accent);
}

.badge-success {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

.badge-warning {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
}

.badge-error {
  background: var(--color-error-bg);
  color: var(--color-error-text);
}

.badge-info {
  background: var(--color-info-bg);
  color: var(--color-info-text);
}

/* ── 尺寸变体 ── */
.badge-sm {
  padding: 0 0.375rem;
  font-size: 0.625rem;
}

.badge-lg {
  padding: 0.25rem 0.75rem;
  font-size: var(--text-sm);
}

/* ── 带关闭按钮 ── */
.badge-dismissible {
  padding-right: 0.25rem;
}

.badge-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  padding: 0;
  margin-left: var(--space-1);
  border: none;
  background: transparent;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  border-radius: 50%;
  font-size: 0.75rem;
  line-height: 1;
}

.badge-dismiss:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.1);
}

/* ── 状态点 ── */
.badge-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
}

/* ============================================================
   Button — 按钮组件
   亮色（Perplexity）：全胶囊，石墨灰为主
   暗色（Linear）：6px 圆角，霓虹绿为唯一 CTA
   ============================================================ */

/* ── 基础重置 ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.5rem 1rem;
  font-family: var(--font-ui);
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--radius-button);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out),
    opacity var(--duration-fast) var(--ease-out);
  outline: none;
}

.btn:focus-visible {
  box-shadow: 0 0 0 2px var(--color-border-focus);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── 尺寸变体 ── */
.btn-sm {
  padding: 0.25rem 0.625rem;
  font-size: var(--text-xs);
  gap: var(--space-1);
}

.btn-md {
  padding: 0.5rem 1rem;
  font-size: var(--text-sm);
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: var(--text-base);
}

.btn-xl {
  padding: 1rem 2rem;
  font-size: var(--text-lg);
}

/* 图标按钮 */
.btn-icon {
  padding: 0.5rem;
  width: 2.25rem;
  height: 2.25rem;
}

.btn-icon.btn-sm {
  width: 1.75rem;
  height: 1.75rem;
  padding: 0.25rem;
}

.btn-icon.btn-lg {
  width: 2.75rem;
  height: 2.75rem;
}

/* ── 主要按钮（亮色：石墨深灰；暗色：霓虹绿） ── */
.btn-primary {
  background: var(--color-accent);
  color: var(--color-text-on-accent);
  border-color: var(--color-accent);
}

.btn-primary:hover {
  opacity: 0.9;
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.btn-primary:active {
  opacity: 0.85;
}

/* ── 次要按钮（outline）── */
.btn-secondary {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--color-accent);
}

/* ── 幽灵按钮（纯文字）── */
.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--surface-hover);
  color: var(--color-text-primary);
}

/* ── 危险按钮 ── */
.btn-danger {
  background: var(--color-error);
  color: #ffffff;
  border-color: var(--color-error);
}

.btn-danger:hover {
  opacity: 0.9;
}

.btn-danger-outline {
  background: transparent;
  color: var(--color-error);
  border-color: var(--color-error);
}

.btn-danger-outline:hover {
  background: var(--surface-error);
}

/* ── 链接按钮 ── */
.btn-link {
  background: transparent;
  color: var(--color-text-link);
  border: none;
  padding: 0;
  font-weight: var(--font-weight-regular);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.btn-link:hover {
  opacity: 0.8;
}

/* ── 全宽按钮 ── */
.btn-block {
  display: flex;
  width: 100%;
}

/* ── 加载中 ── */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
  color: var(--color-text-primary);
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* ── 按钮组 ── */
.btn-group {
  display: inline-flex;
}

.btn-group .btn {
  border-radius: 0;
}

.btn-group .btn:first-child {
  border-top-left-radius: var(--radius-button);
  border-bottom-left-radius: var(--radius-button);
}

.btn-group .btn:last-child {
  border-top-right-radius: var(--radius-button);
  border-bottom-right-radius: var(--radius-button);
}

.btn-group .btn + .btn {
  border-left-width: 0;
}

/* ============================================================
   Card — 卡片组件（默认/提升/交互/嵌套/边距变体）
   ============================================================ */

/* ── 默认卡片 ── */
.card {
  background: var(--surface-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  padding: var(--space-card-padding);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--duration-fast) var(--ease-out);
}

/* ── 无边距卡片 ── */
.card-flush {
  padding: 0;
}

/* ── 宽间距卡片 ── */
.card-spacious {
  padding: var(--space-5); /* 24px */
}

/* ── 提升卡片（更高层级）── */
.card-raised {
  background: var(--surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-card-padding);
  box-shadow: var(--shadow-elevated);
}

/* ── 可点击卡片 ── */
.card-clickable {
  cursor: pointer;
  transition:
    box-shadow var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.card-clickable:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
  transform: translateY(-1px);
}

.card-clickable:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* ── 嵌套卡片（内部子卡片）── */
.card-nested {
  background: var(--surface-page);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  padding: var(--space-3);
  box-shadow: none;
}

/* ── 无边框卡片 ── */
.card-borderless {
  border: none;
}

/* ── 卡片头部 / 内容 / 底部 ── */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border-light);
  margin-bottom: var(--space-3);
}

.card-title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin: 0;
}

.card-description {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  margin-top: var(--space-1);
}

.card-body {
  /* 默认无额外样式 */
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border-light);
  margin-top: var(--space-3);
}

/* ── 语义卡片 ── */
.card-success {
  background: var(--surface-success);
  border-color: var(--color-success);
}

.card-warning {
  background: var(--surface-warning);
  border-color: var(--color-warning);
}

.card-error {
  background: var(--surface-error);
  border-color: var(--color-error);
}

.card-info {
  background: var(--surface-info);
  border-color: var(--color-info);
}

/* ── 媒体卡片（图片在上）── */
.card-media {
  padding: 0;
  overflow: hidden;
}

.card-media img,
.card-media video {
  width: 100%;
  display: block;
}

.card-media .card-body {
  padding: var(--space-card-padding);
}

/* ── 卡片网格容器 ── */
.card-grid {
  display: grid;
  gap: var(--space-4);
}

.card-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.card-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
  .card-grid-2,
  .card-grid-3,
  .card-grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Dropdown Menu — 下拉菜单
   ============================================================ */

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: var(--z-dropdown);
  min-width: 12rem;
  max-width: 20rem;
  padding: var(--space-1);
  background: var(--surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-dropdown);
  animation: dropdown-in var(--duration-fast) var(--ease-spring);
  list-style: none;
  margin: 0;
}

/* 左对齐 */
.dropdown-menu-left {
  right: auto;
  left: 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: 0.375rem var(--space-3);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: background var(--duration-fast) var(--ease-out);
  line-height: 1.5;
}

.dropdown-item:hover {
  background: var(--surface-hover);
  color: var(--color-text-primary);
}

.dropdown-item:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.dropdown-item-danger {
  color: var(--color-error);
}

.dropdown-item-danger:hover {
  background: var(--surface-error);
}

/* 分隔线 */
.dropdown-divider {
  height: 1px;
  margin: var(--space-1) 0;
  background: var(--color-border-light);
  border: none;
}

/* 标签 */
.dropdown-label {
  padding: 0.375rem var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* 快捷键 */
.dropdown-shortcut {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

@keyframes dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ============================================================
   Feedback — Toast / Alert / Skeleton / Progress
   ============================================================ */

/* ============================================================
   Toast / 轻提示
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: var(--space-5);
  right: var(--space-5);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column-reverse;
  gap: var(--space-2);
  max-width: 24rem;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-toast);
  animation: toast-slide-in var(--duration-normal) var(--ease-spring);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.toast-icon {
  flex-shrink: 0;
  font-size: 1rem;
  margin-top: 1px;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: 2px;
}

.toast-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.toast-close:hover {
  color: var(--color-text-primary);
  background: var(--surface-hover);
}

/* 语义变体 */
.toast-success { border-left: 3px solid var(--color-success); }
.toast-error   { border-left: 3px solid var(--color-error); }
.toast-warning { border-left: 3px solid var(--color-warning); }
.toast-info    { border-left: 3px solid var(--color-info); }

@keyframes toast-slide-in {
  from {
    opacity: 0;
    transform: translateX(1rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================================
   Alert / 内联提示
   ============================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-card);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  border: 1px solid transparent;
}

.alert-icon {
  flex-shrink: 0;
  font-size: 1rem;
  margin-top: 1px;
}

.alert-content {
  flex: 1;
}

.alert-title {
  font-weight: var(--font-weight-semibold);
  margin-bottom: 2px;
}

.alert-success {
  background: var(--color-success-bg);
  border-color: var(--color-success);
  color: var(--color-success-text);
}

.alert-warning {
  background: var(--color-warning-bg);
  border-color: var(--color-warning);
  color: var(--color-warning-text);
}

.alert-error {
  background: var(--color-error-bg);
  border-color: var(--color-error);
  color: var(--color-error-text);
}

.alert-info {
  background: var(--color-info-bg);
  border-color: var(--color-info);
  color: var(--color-info-text);
}

/* ============================================================
   Skeleton / 骨架屏
   ============================================================ */
.skeleton {
  background: var(--color-border-light);
  border-radius: var(--radius-sm);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-text {
  height: 0.875rem;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-2);
  background: var(--color-border-light);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-text:last-child {
  width: 60%;
}

.skeleton-heading {
  height: 1.5rem;
  width: 40%;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-3);
  background: var(--color-border-light);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--color-border-light);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

.skeleton-card {
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  padding: var(--space-4);
}

.skeleton-card .skeleton-text + .skeleton-text {
  margin-top: var(--space-2);
}

.skeleton-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* ============================================================
   Progress — 进度条
   ============================================================ */
.progress {
  width: 100%;
  height: 0.5rem;
  background: var(--color-border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  transition: width var(--duration-normal) var(--ease-out);
}

.progress-bar-success { background: var(--color-success); }
.progress-bar-warning { background: var(--color-warning); }
.progress-bar-error   { background: var(--color-error); }

.progress-indeterminate .progress-bar {
  width: 40%;
  animation: progress-indeterminate 1.5s ease-in-out infinite;
}

@keyframes progress-indeterminate {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

/* ============================================================
   Loading Spinner — 加载旋转
   ============================================================ */
.spinner {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spinner-rotate 0.6s linear infinite;
}

.spinner-sm { width: 0.875rem; height: 0.875rem; }
.spinner-lg { width: 2rem; height: 2rem; border-width: 3px; }

@keyframes spinner-rotate {
  to { transform: rotate(360deg); }
}

/* ============================================================
   Input — 输入框、选择框、文本域
   ============================================================ */

/* ── 基础输入 ── */
.input {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-ui);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  background: var(--surface-input);
  border: 1px solid var(--color-border-input);
  border-radius: var(--radius-input);
  outline: none;
  transition:
    border-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
}

.input::placeholder {
  color: var(--color-text-tertiary);
}

.input:hover {
  border-color: var(--color-border);
}

.input:focus {
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 2px var(--color-accent-subtle);
}

.input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--surface-input-disabled);
}

.input[aria-invalid="true"],
.input.is-error {
  border-color: var(--color-error);
}

.input[aria-invalid="true"]:focus,
.input.is-error:focus {
  box-shadow: 0 0 0 2px var(--color-error-bg);
}

/* ── 尺寸变体 ── */
.input-sm {
  padding: 0.25rem 0.5rem;
  font-size: var(--text-xs);
}

.input-lg {
  padding: 0.75rem 1rem;
  font-size: var(--text-lg);
}

/* ── 文本域 ── */
.textarea {
  display: block;
  width: 100%;
  min-height: 5rem;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-ui);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  background: var(--surface-input);
  border: 1px solid var(--color-border-input);
  border-radius: var(--radius-input);
  outline: none;
  resize: vertical;
  transition:
    border-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
}

.textarea:focus {
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 2px var(--color-accent-subtle);
}

/* ── 选择框 ── */
.select {
  display: block;
  width: 100%;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  font-family: var(--font-ui);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  background: var(--surface-input);
  border: 1px solid var(--color-border-input);
  border-radius: var(--radius-input);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2392918B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  cursor: pointer;
}

.select:focus {
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 2px var(--color-accent-subtle);
}

/* ── 复选框 / 单选框 ── */
.checkbox,
.radio {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  cursor: pointer;
}

.checkbox input,
.radio input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--color-accent);
  cursor: pointer;
  margin: 0;
}

/* ── 开关 Toggle ── */
.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-size: var(--text-base);
  color: var(--color-text-secondary);
}

.toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  width: 2.75rem;
  height: 1.5rem;
  background: var(--color-border);
  border-radius: var(--radius-full);
  position: relative;
  transition: background var(--duration-fast) var(--ease-out);
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.25rem;
  height: 1.25rem;
  background: #ffffff;
  border-radius: 50%;
  transition: transform var(--duration-fast) var(--ease-spring);
  box-shadow: var(--shadow-sm);
}

.toggle input:checked + .toggle-track {
  background: var(--color-accent);
}

.toggle input:checked + .toggle-track::after {
  transform: translateX(1.25rem);
}

/* ── 表单组 ── */
.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
}

.form-label-required::after {
  content: ' *';
  color: var(--color-error);
}

.form-help {
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}

.form-error {
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-error);
}

/* ── 输入框带图标 ── */
.input-with-icon {
  position: relative;
}

.input-with-icon .input {
  padding-left: 2.5rem;
}

.input-with-icon .input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-tertiary);
  pointer-events: none;
}

/* ── 搜索输入框 ── */
.input-search {
  border-radius: var(--radius-full);
  padding-left: 2.5rem;
}

/* ============================================================
   Misc — Empty State / Divider / Code Block / Callout / KBD
   ============================================================ */

/* ============================================================
   Empty State — 空状态
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-12) var(--space-5);
}

.empty-state-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--surface-card);
  color: var(--color-text-tertiary);
  font-size: 2rem;
  margin-bottom: var(--space-4);
}

.empty-state-title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.empty-state-description {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  max-width: 24rem;
  margin-bottom: var(--space-5);
  line-height: var(--leading-normal);
}

.empty-state-action {
  /* 使用 .btn 类 */
}

/* ============================================================
   Divider / 分割线
   ============================================================ */
.divider {
  width: 100%;
  height: 1px;
  background: var(--color-border-light);
  border: none;
  margin: var(--space-4) 0;
}

.divider-sm { margin: var(--space-2) 0; }
.divider-lg { margin: var(--space-6) 0; }

/* 带文字的分割线 */
.divider-text {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  margin: var(--space-4) 0;
}

.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border-light);
}

/* 垂直分割线 */
.divider-vertical {
  width: 1px;
  height: auto;
  align-self: stretch;
  background: var(--color-border-light);
}

/* ============================================================
   Code Block — 代码块
   ============================================================ */
.code {
  display: inline;
  padding: 0.125rem 0.375rem;
  font-family: var(--font-mono);
  font-size: 0.875em;
  color: var(--color-text-secondary);
  background: var(--color-code-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
}

.code-block {
  display: block;
  padding: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text-secondary);
  background: var(--color-code-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  overflow-x: auto;
  white-space: pre;
}

/* ============================================================
   Callout / 提示块（Notion 风格）
   ============================================================ */
.callout {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
}

.callout-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.callout-info    { background: var(--color-info-bg);    border-color: var(--color-info);    color: var(--color-info-text); }
.callout-warning { background: var(--color-warning-bg); border-color: var(--color-warning); color: var(--color-warning-text); }
.callout-success { background: var(--color-success-bg); border-color: var(--color-success); color: var(--color-success-text); }
.callout-error   { background: var(--color-error-bg);   border-color: var(--color-error);   color: var(--color-error-text); }

/* ============================================================
   KBD / 键盘快捷键
   ============================================================ */
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.25rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  background: var(--surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 0 var(--color-border);
}

/* ============================================================
   Steps / 步骤条
   ============================================================ */
.steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
  position: relative;
}

.step:not(:last-child)::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
  margin: 0 var(--space-3);
}

.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  flex-shrink: 0;
}

.step-active .step-indicator {
  background: var(--color-accent);
  color: var(--color-text-on-accent);
}

.step-completed .step-indicator {
  background: var(--color-success);
  color: #ffffff;
}

.step-pending .step-indicator {
  background: var(--surface-card);
  color: var(--color-text-tertiary);
  border: 2px solid var(--color-border);
}

.step-label {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.step-completed .step-label {
  color: var(--color-text-primary);
}

.step-pending .step-label {
  color: var(--color-text-muted);
}

/* ============================================================
   Tag / 标签（可关闭的分类标签）
   ============================================================ */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.125rem 0.625rem;
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  background: var(--surface-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-tag);
  white-space: nowrap;
}

.tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.875rem;
  height: 0.875rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: 50%;
}

.tag-remove:hover {
  color: var(--color-text-primary);
  background: var(--surface-hover);
}

.tag-primary   { background: var(--color-accent); color: var(--color-text-on-accent); border-color: var(--color-accent); }
.tag-success   { background: var(--color-success-bg); color: var(--color-success-text); border-color: var(--color-success); }
.tag-warning   { background: var(--color-warning-bg); color: var(--color-warning-text); border-color: var(--color-warning); }
.tag-error     { background: var(--color-error-bg); color: var(--color-error-text); border-color: var(--color-error); }

/* ============================================================
   Modal / Dialog — 模态框 & 对话框
   ============================================================ */

/* ── 遮罩层 ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-overlay);
  backdrop-filter: blur(4px);
  animation: modal-fade-in var(--duration-fast) var(--ease-out);
}

/* ── 模态框面板 ── */
.modal {
  position: relative;
  z-index: var(--z-modal);
  width: 90%;
  max-width: 32rem;
  max-height: 85vh;
  background: var(--surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-modal);
  box-shadow: var(--shadow-modal);
  display: flex;
  flex-direction: column;
  animation: modal-slide-up var(--duration-normal) var(--ease-spring);
}

/* ── 尺寸变体 ── */
.modal-sm { max-width: 24rem; }
.modal-lg { max-width: 48rem; }
.modal-xl { max-width: 64rem; }
.modal-full { max-width: 90vw; max-height: 90vh; }

/* ── 模态框头部 ── */
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: var(--space-5) var(--space-5) 0;
  flex-shrink: 0;
}

.modal-title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin: 0;
}

.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text-tertiary);
  cursor: pointer;
  border-radius: var(--radius-button);
  font-size: 1.25rem;
  line-height: 1;
  transition: background var(--duration-fast) var(--ease-out);
}

.modal-close:hover {
  background: var(--surface-hover);
  color: var(--color-text-primary);
}

/* ── 模态框内容（可滚动）── */
.modal-body {
  padding: var(--space-5);
  overflow-y: auto;
  flex: 1;
  color: var(--color-text-secondary);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
}

/* ── 模态框底部 ── */
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: 0 var(--space-5) var(--space-5);
  flex-shrink: 0;
}

/* ── 确认对话框 ── */
.dialog {
  text-align: center;
}

.dialog .modal-body {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}

.dialog-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  margin: 0 auto var(--space-4);
  font-size: 1.5rem;
}

.dialog-icon-danger {
  background: var(--surface-error);
  color: var(--color-error);
}

.dialog-icon-warning {
  background: var(--surface-warning);
  color: var(--color-warning);
}

/* ── 动画 ── */
@keyframes modal-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modal-slide-up {
  from {
    opacity: 0;
    transform: translateY(1rem) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── 减少动效 ── */
@media (prefers-reduced-motion: reduce) {
  .modal-overlay,
  .modal {
    animation: none;
  }
}

/* ============================================================
   Navigation — 导航组件（顶栏、侧栏、面包屑、分页、标签页）
   ============================================================ */

/* ============================================================
   Top Navbar — 顶部导航栏
   ============================================================ */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
  padding: 0 var(--space-5);
  background: var(--surface-nav);
  border-bottom: 1px solid var(--color-border-light);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  text-decoration: none;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-nav a,
.navbar-nav button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.375rem 0.75rem;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  text-decoration: none;
  border: none;
  background: transparent;
  border-radius: var(--radius-button);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}

.navbar-nav a:hover,
.navbar-nav button:hover {
  background: var(--surface-nav-hover);
  color: var(--color-text-primary);
}

.navbar-nav a.active,
.navbar-nav button.active {
  background: var(--surface-nav-active);
  color: var(--color-text-primary);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ============================================================
   Sidebar — 侧边导航
   ============================================================ */
.sidebar {
  width: 240px;
  min-height: 100vh;
  background: var(--surface-nav);
  border-right: 1px solid var(--color-border-light);
  display: flex;
  flex-direction: column;
  padding: var(--space-3);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.25rem var(--space-3);
  font-family: var(--font-ui);
  font-size: var(--text-base);
  color: var(--color-text-tertiary);
  text-decoration: none;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
  width: 100%;
  text-align: left;
  min-height: 2rem;
}

.sidebar-item:hover {
  background: var(--surface-nav-hover);
  color: var(--color-text-secondary);
}

.sidebar-item.active {
  background: var(--surface-nav-active);
  color: var(--color-text-primary);
  font-weight: var(--font-weight-medium);
}

.sidebar-section-title {
  padding: var(--space-3) var(--space-3) var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   Tabs — 标签页
   ============================================================ */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border-light);
  gap: 0;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.5rem 1rem;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-tertiary);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
  margin-bottom: -1px;
}

.tab:hover {
  color: var(--color-text-secondary);
}

.tab.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.tab:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Pill Tabs ── */
.tabs-pill {
  border-bottom: none;
  gap: var(--space-1);
  padding: var(--space-1);
  background: var(--surface-card);
  border-radius: var(--radius-full);
  display: inline-flex;
}

.tabs-pill .tab {
  border-bottom: none;
  border-radius: var(--radius-full);
  margin-bottom: 0;
  padding: 0.375rem 0.875rem;
}

.tabs-pill .tab.active {
  background: var(--surface-page);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   Breadcrumb — 面包屑
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
}

.breadcrumb-item a {
  color: var(--color-text-secondary);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: var(--color-text-primary);
  text-decoration: underline;
}

.breadcrumb-separator {
  color: var(--color-text-muted);
  user-select: none;
}

/* ============================================================
   Pagination — 分页
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 var(--space-2);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  background: transparent;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  text-decoration: none;
}

.page-item:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.page-item.active {
  background: var(--color-accent);
  color: var(--color-text-on-accent);
  border-color: var(--color-accent);
}

.page-item:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  color: var(--color-text-muted);
}

/* ============================================================
   Table — 数据表格
   ============================================================ */

.table-container {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* ── 表头 ── */
.table thead {
  background: var(--surface-table-header);
  border-bottom: 1px solid var(--color-border);
}

.table th {
  padding: 0.625rem var(--space-3);
  text-align: left;
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  user-select: none;
}

.table th.sortable {
  cursor: pointer;
}

.table th.sortable:hover {
  color: var(--color-text-primary);
}

/* ── 表体 ── */
.table tbody tr {
  border-bottom: 1px solid var(--color-border-light);
  transition: background var(--duration-fast) var(--ease-out);
}

.table tbody tr:last-child {
  border-bottom: none;
}

.table tbody tr:hover {
  background: var(--surface-table-hover);
}

.table tbody tr:nth-child(even) {
  background: var(--surface-table-stripe);
}

.table tbody tr:nth-child(even):hover {
  background: var(--surface-table-hover);
}

.table td {
  padding: 0.625rem var(--space-3);
  vertical-align: middle;
  line-height: var(--leading-normal);
}

/* ── 行状态 ── */
.table tr.selected {
  background: var(--surface-selected) !important;
}

.table tr.clickable {
  cursor: pointer;
}

/* ── 紧凑表格 ── */
.table-compact th,
.table-compact td {
  padding: 0.375rem var(--space-2);
  font-size: var(--text-xs);
}

/* ── 宽松表格 ── */
.table-spacious th,
.table-spacious td {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
}

/* ── 固定列宽帮助类 ── */
.table-col-min  { width: 1%; white-space: nowrap; }
.table-col-sm   { width: 80px; }
.table-col-md   { width: 160px; }
.table-col-lg   { width: 240px; }

/* ── 对齐 ── */
.table .text-left   { text-align: left; }
.table .text-center { text-align: center; }
.table .text-right  { text-align: right; }

/* ── 表格工具栏 ── */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) 0;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.table-toolbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.table-toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ── 空状态 ── */
.table-empty {
  text-align: center;
  padding: var(--space-10) var(--space-4);
  color: var(--color-text-tertiary);
}

/* ============================================================
   Tooltip & Popover — 提示浮层
   ============================================================ */

/* ── Tooltip ── */
.tooltip {
  position: relative;
  display: inline-flex;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.5rem;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--color-text-on-accent);
  background: var(--color-text-primary);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out);
  z-index: var(--z-tooltip);
}

.tooltip:hover::after {
  opacity: 1;
}

/* ── Popover — 弹出卡片 ── */
.popover {
  position: absolute;
  z-index: var(--z-dropdown);
  min-width: 12rem;
  max-width: 20rem;
  padding: var(--space-1);
  background: var(--surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-dropdown);
  animation: popover-in var(--duration-fast) var(--ease-spring);
}

.popover-header {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.popover-body {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.popover-footer {
  padding: var(--space-2) var(--space-3);
  border-top: 1px solid var(--color-border-light);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
}

@keyframes popover-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================================
   Bridge — 兼容 flow-engine 现有 class 用法
   此文件由 build-css.js 自动追加到 app.css 末尾
   ============================================================ */

/* ── 语义色上的文字色 Token ── */
:root,
[data-theme="light"] {
  --color-text-on-success: #ffffff;
  --color-text-on-error:   #ffffff;
  --color-text-on-info:    #ffffff;
  --color-text-on-warning: #000000;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-text-on-warning: #08090a;
  }
}
[data-theme="dark"] {
  --color-text-on-warning: #08090a;
}

/* ── 蓝色亮色主题 ── */
[data-theme="blue"] {
  --color-accent: #3B82F6;
  --color-accent-hover: #2563EB;
  --color-accent-subtle: #EFF6FF;
  --color-text-link: #3B82F6;
  --color-text-on-accent: #FFFFFF;
  --color-border-focus: #3B82F6;
  --color-focus-ring: #3B82F6;
  --color-info: #6366F1;
  --color-info-bg: #EEF2FF;
  --color-info-text: #4338CA;
  --color-text-on-info: #FFFFFF;
  --color-success: #10B981;
  --color-success-bg: #ECFDF5;
  --color-success-text: #065F46;
  --color-text-on-success: #FFFFFF;
  --color-warning: #F59E0B;
  --color-warning-bg: #FFFBEB;
  --color-warning-text: #92400E;
  --color-text-on-warning: #000000;
  --color-error: #EF4444;
  --color-error-bg: #FEF2F2;
  --color-error-text: #991B1B;
  --color-text-on-error: #FFFFFF;
  --color-surface-0: #F8FAFC;
  --color-surface-1: #F1F5F9;
  --color-surface-2: #E2E8F0;
  --color-surface-3: #CBD5E1;
  --color-border: #CBD5E1;
  --color-border-light: #E2E8F0;
  --color-border-input: #CBD5E1;
  --color-code-bg: #F1F5F9;
  --color-stripe: #F8FAFC;
}

/* ── 语义 Token 补全 ── */
:root {
  --color-focus-ring: var(--color-accent);
  --color-link-hover: var(--color-accent-hover);
  --color-selection-bg: var(--color-accent-subtle);
  --size-icon-xs: 0.75rem;
  --size-icon-sm: 1rem;
  --size-icon-md: 1.25rem;
  --size-icon-lg: 1.5rem;
  --font-weight-heading: var(--font-weight-bold);
}

/* ── 微交互 & 动画 ── */
.content { animation: fade-in var(--duration-fast) var(--ease-out); }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.card-clickable, .cfg {
  transition: transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}
.card-clickable:hover, .cfg:hover { transform: translateY(-2px); box-shadow: var(--shadow-elevated); }
.btn:active { transform: scale(0.97); }
.list-row { animation: slide-in var(--duration-normal) var(--ease-out); }
@keyframes slide-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
.table tbody tr { animation: fade-in var(--duration-fast) var(--ease-out); }

/* ── 代码语法高亮 ── */
.hl-kw  { color: var(--color-info); font-weight: var(--font-weight-semibold); }
.hl-str { color: var(--color-success); }
.hl-cmt { color: var(--color-text-muted); font-style: italic; }
.hl-num { color: var(--color-warning); }
.hl-bool { color: var(--color-info); }
.hl-var { color: var(--color-accent); }

/* ── 默认 .btn = 主要按钮（填充）── */
.btn {
  background: var(--color-accent);
  color: var(--color-text-on-accent);
}
.btn:hover { opacity: 0.9; }

/* ── .btn-ghost = 幽灵按钮 ── */
.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border: none;
  font-weight: var(--font-weight-medium);
}
.btn-ghost:hover {
  background: var(--surface-hover);
  color: var(--color-text-primary);
}

/* ── .btn-block = 全宽 ── */
.btn-block { display: flex; width: 100%; }
/* ── .btn-sm = 小按钮 ── */
.btn-sm { padding: 0.25rem 0.625rem; font-size: var(--text-xs); }

/* ── .muted — 辅助文字 ── */
.muted { color: var(--color-text-tertiary); }

/* ── .label — 表单标签 ── */
.label {
  display: block;
  font-weight: var(--font-weight-medium);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

/* ── .row — 水平排列 ── */
.row { display: flex; align-items: center; gap: var(--space-2); }

/* ── .msg — 消息提示 ── */
.msg { font-size: var(--text-sm); margin-top: 14px; min-height: 18px; }
.msg.err { color: var(--color-error); }
.msg.ok { color: var(--color-success-text); }

/* ── Body 基础样式 ── */
body {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  background: var(--surface-page);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}

/* ── Panel — 应用面板 ── */
.panel {
  background: var(--surface-card);
  border-radius: var(--radius-card);
  padding: var(--space-5);
  box-shadow: rgba(0, 0, 0, 0.07) 0px 1px 3px 0px, rgba(0, 0, 0, 0.04) 0px 2px 8px 0px;
}

/* ── Badge — 旧库兼容 ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  background: var(--surface-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-full);
  white-space: nowrap;
  line-height: 1.6;
}
.badge.badge-dot { width: auto !important; height: auto !important; display: inline-flex !important; }
.badge-dot::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--color-text-muted);
  flex-shrink: 0;
}
.badge-active.badge-dot::before { background: var(--color-success); }

/* ── 卡片阴影柔和化 ── */
.card {
  box-shadow: rgba(0, 0, 0, 0.07) 0px 1px 3px 0px, rgba(0, 0, 0, 0.04) 0px 2px 8px 0px;
}

/* ── Mock 卡片（登录页"同步完成"展示卡）── */
.mock {
  background: var(--surface-card);
  border: 1px solid var(--color-border-light);
}

/* ── 输入框增强 ── */
.input, .field {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  background: var(--surface-input);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-input);
  border-radius: var(--radius-input);
  padding: 0.5rem 0.75rem;
  transition: border-color var(--duration-fast) var(--ease-out);
  width: 100%;
  box-sizing: border-box;
}
.input:focus, .field:focus {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 2px var(--color-accent-subtle);
}
select.input, select.field { cursor: pointer; }

/* ── Check pill ── */
.check-pill {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-weight: var(--font-weight-medium); font-size: var(--text-sm);
  color: var(--color-text-secondary);
}
.check-pill::before {
  content: "✓"; color: var(--color-success); font-weight: var(--font-weight-semibold);
}

/* ── Toast 动画 ── */
@keyframes toast-in{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}
