/* ============================================
   EDITOR DE PARTITURAS — Design Tokens
   ============================================ */

:root {
  /* ── Tipografia ── */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --fs-3xl: 2.5rem;
  --fs-4xl: 3.5rem;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  --lh-tight: 1.2;
  --lh-normal: 1.5;
  --lh-relaxed: 1.7;

  /* ── Espaçamento ── */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* ── Border Radius ── */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 9999px;

  /* ── Z-Index ── */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;
  --z-tooltip: 600;

  /* ── Transições ── */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
  --duration-slower: 600ms;

  /* ── Sombras ── */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.24);
  --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.3);
  --shadow-glow-amber: 0 0 20px rgba(245, 158, 11, 0.3);

  /* ── Layout ── */
  --header-height: 56px;
  --sidebar-width: 112px;
  --sidebar-width-expanded: 220px;
  --transport-height: 72px;
  --content-max-width: 900px;

  /* ── Glassmorphism ── */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(16px);
}

/* ══════════════════════════════════════════
   DARK THEME (Padrão)
   ══════════════════════════════════════════ */
[data-theme="dark"],
:root {
  --color-bg: hsl(250, 50%, 6%);
  --color-bg-alt: hsl(250, 45%, 9%);
  --color-surface: hsl(250, 40%, 12%);
  --color-surface-hover: hsl(250, 38%, 15%);
  --color-surface-active: hsl(250, 35%, 18%);
  --color-surface-elevated: hsl(250, 35%, 16%);
  --color-surface-overlay: hsla(250, 50%, 6%, 0.85);

  --color-border: hsl(250, 25%, 18%);
  --color-border-subtle: hsl(250, 20%, 14%);
  --color-border-strong: hsl(250, 20%, 25%);

  --color-text: hsl(250, 15%, 92%);
  --color-text-secondary: hsl(250, 10%, 65%);
  --color-text-tertiary: hsl(250, 8%, 45%);
  --color-text-inverse: hsl(250, 50%, 8%);

  --color-accent: hsl(270, 80%, 65%);
  --color-accent-hover: hsl(270, 80%, 72%);
  --color-accent-subtle: hsla(270, 80%, 65%, 0.12);
  --color-accent-text: hsl(270, 90%, 80%);

  --color-secondary: hsl(35, 90%, 60%);
  --color-secondary-hover: hsl(35, 90%, 68%);
  --color-secondary-subtle: hsla(35, 90%, 60%, 0.12);

  --color-success: hsl(150, 70%, 45%);
  --color-success-subtle: hsla(150, 70%, 45%, 0.12);
  --color-warning: hsl(45, 90%, 55%);
  --color-warning-subtle: hsla(45, 90%, 55%, 0.12);
  --color-error: hsl(0, 75%, 60%);
  --color-error-subtle: hsla(0, 75%, 60%, 0.12);
  --color-info: hsl(210, 80%, 60%);
  --color-info-subtle: hsla(210, 80%, 60%, 0.12);

  --color-scrollbar: hsl(250, 20%, 22%);
  --color-scrollbar-hover: hsl(250, 20%, 30%);

  --staff-color: hsl(250, 15%, 55%);
  --note-color: hsl(250, 15%, 88%);
  --cursor-color: hsl(270, 80%, 65%);

  color-scheme: dark;
}

/* ══════════════════════════════════════════
   LIGHT THEME
   ══════════════════════════════════════════ */
[data-theme="light"] {
  --color-bg: hsl(250, 20%, 97%);
  --color-bg-alt: hsl(250, 15%, 94%);
  --color-surface: hsl(0, 0%, 100%);
  --color-surface-hover: hsl(250, 15%, 96%);
  --color-surface-active: hsl(250, 15%, 93%);
  --color-surface-elevated: hsl(0, 0%, 100%);
  --color-surface-overlay: hsla(250, 20%, 97%, 0.9);

  --color-border: hsl(250, 15%, 88%);
  --color-border-subtle: hsl(250, 10%, 92%);
  --color-border-strong: hsl(250, 15%, 78%);

  --color-text: hsl(250, 50%, 12%);
  --color-text-secondary: hsl(250, 15%, 40%);
  --color-text-tertiary: hsl(250, 10%, 60%);
  --color-text-inverse: hsl(0, 0%, 100%);

  --color-accent: hsl(270, 70%, 55%);
  --color-accent-hover: hsl(270, 70%, 48%);
  --color-accent-subtle: hsla(270, 70%, 55%, 0.08);
  --color-accent-text: hsl(270, 80%, 40%);

  --color-secondary: hsl(35, 85%, 50%);
  --color-secondary-hover: hsl(35, 85%, 43%);
  --color-secondary-subtle: hsla(35, 85%, 50%, 0.08);

  --color-success: hsl(150, 60%, 38%);
  --color-success-subtle: hsla(150, 60%, 38%, 0.08);
  --color-warning: hsl(45, 85%, 48%);
  --color-warning-subtle: hsla(45, 85%, 48%, 0.08);
  --color-error: hsl(0, 70%, 52%);
  --color-error-subtle: hsla(0, 70%, 52%, 0.08);
  --color-info: hsl(210, 75%, 50%);
  --color-info-subtle: hsla(210, 75%, 50%, 0.08);

  --color-scrollbar: hsl(250, 10%, 82%);
  --color-scrollbar-hover: hsl(250, 10%, 72%);

  --staff-color: hsl(250, 10%, 35%);
  --note-color: hsl(250, 40%, 15%);
  --cursor-color: hsl(270, 70%, 55%);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.15);
  --shadow-glow-amber: 0 0 20px rgba(245, 158, 11, 0.15);

  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(0, 0, 0, 0.06);

  color-scheme: light;
}
