/* 1) 层顺序只声明一次 */
@layer reset, tokens, base, layout, components, utilities;

@layer tokens {
  :root {
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-text: #0f172a;
    --color-muted: #64748b;
    --color-border: #e2e8f0;
    --color-brand: #2563eb;
    --color-brand-dark: #1d4ed8;
    --color-brand-soft: #dbeafe;
    --color-warning-soft: #fef3c7;

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;

    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.5rem;

    --shadow-sm: 0 1px 2px rgb(15 23 42 / 8%);
    --shadow-md: 0 12px 32px rgb(15 23 42 / 16%);
  }

  [data-theme="dark"] {
    --color-bg: #0f172a;
    --color-surface: #1e293b;
    --color-text: #e2e8f0;
    --color-muted: #94a3b8;
    --color-border: #334155;
    --color-brand: #60a5fa;
    --color-brand-dark: #3b82f6;
    --color-brand-soft: #1e3a8a;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 30%);
    --shadow-md: 0 12px 32px rgb(0 0 0 / 45%);
  }
}
