/* Design Tokens — 2L Support & 2L Engenharia */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Font Families */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Outfit', sans-serif;

  /* Typography Scale */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  /* Spacing Grid (8px Base) */
  --space-1: 0.25rem;     /* 4px */
  --space-2: 0.5rem;      /* 8px */
  --space-3: 0.75rem;     /* 12px */
  --space-4: 1rem;        /* 16px */
  --space-5: 1.25rem;     /* 20px */
  --space-6: 1.5rem;      /* 24px */
  --space-8: 2rem;        /* 32px */
  --space-10: 2.5rem;     /* 40px */
  --space-12: 3rem;       /* 48px */
  --space-16: 4rem;       /* 64px */

  /* Border Radii */
  --radius-xs: 0.25rem;   /* 4px */
  --radius-sm: 0.375rem;  /* 6px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.5rem;   /* 24px */
  --radius-full: 9999px;

  /* Elevation (Shadows) */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow-red: 0 0 15px rgba(178, 43, 36, 0.35);
  --shadow-glow-gold: 0 0 15px rgba(245, 158, 11, 0.25);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* -------------------------------------------------------------
     THEMES DEFINITION
     ------------------------------------------------------------- */
  
  /* Brand Core Colors (Logo: Terracotta and Sunset Sun) */
  --color-brand-red: hsl(4, 66%, 42%);         /* Terracotta Red (#b22b24) */
  --color-brand-red-hover: hsl(4, 66%, 35%);
  --color-brand-red-glow: rgba(178, 43, 36, 0.2);
  --color-brand-gold: hsl(38, 96%, 53%);       /* Amarelo Solar (#f59e0b) */
  --color-brand-gold-hover: hsl(38, 96%, 45%);
  --color-gradient-brand: linear-gradient(135deg, hsl(38, 96%, 53%) 0%, hsl(14, 90%, 50%) 100%);

  /* Status Colors */
  --color-status-pending: hsl(38, 92%, 50%);         /* Pendente (Amarelo) */
  --color-status-pending-bg: rgba(245, 158, 11, 0.08);
  --color-status-assigned: hsl(199, 89%, 48%);        /* Designada (Azul Claro) */
  --color-status-assigned-bg: rgba(14, 165, 233, 0.08);
  --color-status-progress: hsl(217, 91%, 60%);        /* Em Execução (Azul) */
  --color-status-progress-bg: rgba(59, 130, 246, 0.08);
  --color-status-review: hsl(262, 83%, 58%);          /* Em Revisão (Roxo) */
  --color-status-review-bg: rgba(139, 92, 246, 0.08);
  --color-status-success: hsl(142, 70%, 45%);         /* Resolvida/Aprovada (Verde) */
  --color-status-success-bg: rgba(16, 185, 129, 0.08);
  --color-status-danger: hsl(0, 72%, 51%);            /* Recusada/Alerta (Vermelho) */
  --color-status-danger-bg: rgba(239, 68, 68, 0.08);
}

/* Light Theme Variables (Website & Light Option) */
[data-theme="light"] {
  --bg-app: hsl(210, 40%, 98%);
  --bg-surface: hsl(0, 0%, 100%);
  --bg-surface-hover: hsl(210, 40%, 96%);
  --bg-input: hsl(0, 0%, 100%);
  
  --text-main: hsl(222, 47%, 11%);
  --text-sub: hsl(215, 16%, 47%);
  --text-muted: hsl(215, 16%, 65%);
  
  --border-color: hsl(214, 32%, 91%);
  --border-color-focus: var(--color-brand-red);
  
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.04);
}

/* Dark Theme Variables (2L Support Default Dashboard) */
[data-theme="dark"] {
  --bg-app: hsl(222, 47%, 6%);
  --bg-surface: hsl(222, 36%, 10%);
  --bg-surface-hover: hsl(222, 30%, 14%);
  --bg-input: hsl(222, 36%, 8%);
  
  --text-main: hsl(210, 40%, 98%);
  --text-sub: hsl(215, 20%, 65%);
  --text-muted: hsl(215, 14%, 46%);
  
  --border-color: rgba(226, 232, 240, 0.06);
  --border-color-focus: var(--color-brand-red);
  
  --glass-bg: rgba(15, 23, 42, 0.65);
  --glass-border: rgba(255, 255, 255, 0.03);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Fallback to dark theme by default if no attribute is set */
:root {
  --bg-app: hsl(222, 47%, 6%);
  --bg-surface: hsl(222, 36%, 10%);
  --bg-surface-hover: hsl(222, 30%, 14%);
  --bg-input: hsl(222, 36%, 8%);
  
  --text-main: hsl(210, 40%, 98%);
  --text-sub: hsl(215, 20%, 65%);
  --text-muted: hsl(215, 14%, 46%);
  
  --border-color: rgba(226, 232, 240, 0.06);
  --border-color-focus: var(--color-brand-red);
  
  --glass-bg: rgba(15, 23, 42, 0.65);
  --glass-border: rgba(255, 255, 255, 0.03);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}
