/**
 * Dashboard Analytics - CoE de IA
 * Design System
 * Variáveis CSS, cores, tipografia, espaçamentos e animações
 */

/* ==========================================
   CSS VARIABLES - DESIGN TOKENS
   ========================================== */

:root {
  /* Primary Colors */
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --primary-light: #818CF8;
  --primary-dark: #3730A3;
  
  /* Secondary Colors */
  --secondary: #10B981;
  --secondary-hover: #059669;
  --secondary-light: #34D399;
  
  /* Accent */
  --accent: #F59E0B;
  --accent-hover: #D97706;
  --accent-light: #FBBF24;
  
  /* Rankings */
  --rank-gold: #FFD700;
  --rank-silver: #C0C0C0;
  --rank-bronze: #CD7F32;
  
  /* Status Colors */
  --status-approved: #10B981;
  --status-rejected: #EF4444;
  --status-pending: #F59E0B;
  --status-not-approved: #94A3B8;
  
  /* Neutrals - Dark Theme */
  --background: #0F172A;
  --surface: #1E293B;
  --surface-elevated: #334155;
  --surface-hover: #475569;
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-tertiary: #64748B;
  --border: #334155;
  --border-light: #475569;
  
  /* Semantic Colors */
  --success: #10B981;
  --error: #EF4444;
  --warning: #F59E0B;
  --info: #3B82F6;
  
  /* Opacity Levels */
  --opacity-subtle: 0.05;
  --opacity-light: 0.1;
  --opacity-medium: 0.3;
  --opacity-strong: 0.7;
  
  /* ==========================================
     TYPOGRAPHY
     ========================================== */
  
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Font Sizes */
  --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: 2rem;        /* 32px */
  --text-4xl: 2.5rem;      /* 40px */
  --text-5xl: 3rem;        /* 48px */
  --text-6xl: 4rem;        /* 64px */
  
  /* Font Weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  
  /* Line Heights */
  --leading-tight: 1.1;
  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;
  
  /* ==========================================
     SPACING SCALE (8px base)
     ========================================== */
  
  --space-0: 0;
  --space-1: 0.5rem;       /* 8px */
  --space-2: 1rem;         /* 16px */
  --space-3: 1.5rem;       /* 24px */
  --space-4: 2rem;         /* 32px */
  --space-5: 2.5rem;       /* 40px */
  --space-6: 3rem;         /* 48px */
  --space-8: 4rem;         /* 64px */
  --space-10: 5rem;        /* 80px */
  --space-12: 6rem;        /* 96px */
  
  /* ==========================================
     LAYOUT DIMENSIONS
     ========================================== */
  
  --header-height: 72px;
  --sidebar-width: 220px;
  --sidebar-collapsed: 70px;
  --max-width: 1400px;
  
  /* ==========================================
     BORDER RADIUS
     ========================================== */
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* ==========================================
     SHADOWS
     ========================================== */
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  
  --shadow-glow-primary: 0 0 20px rgba(79, 70, 229, 0.3),
                         0 0 40px rgba(79, 70, 229, 0.2);
  --shadow-glow-success: 0 0 20px rgba(16, 185, 129, 0.3);
  --shadow-glow-error: 0 0 20px rgba(239, 68, 68, 0.3);
  
  /* ==========================================
     TRANSITIONS & ANIMATIONS
     ========================================== */
  
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
  --transition-slower: 500ms ease;
  
  /* Z-Index Scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-toast: 600;
  --z-tooltip: 700;
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--background);
  min-height: 100vh;
  text-rendering: optimizeLegibility;
}

/* ==========================================
   TYPOGRAPHY UTILITIES
   ========================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-2);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--primary);
}

a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ==========================================
   ANIMATIONS
   ========================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

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

@keyframes elevate {
  to { transform: translateY(-4px); }
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }

.font-light { font-weight: var(--font-light); }
.font-normal { font-weight: var(--font-normal); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }
.font-extrabold { font-weight: var(--font-extrabold); }

.animate-fadeIn {
  animation: fadeIn var(--transition-base) ease-out;
}

.animate-fadeInScale {
  animation: fadeInScale var(--transition-base) ease-out;
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==========================================
   SCROLLBAR STYLING
   ========================================== */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--surface);
}

::-webkit-scrollbar-thumb {
  background: var(--surface-elevated);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--surface-hover);
}

/* ==========================================
   SELECTION STYLING
   ========================================== */

::selection {
  background-color: var(--primary);
  color: white;
}

::-moz-selection {
  background-color: var(--primary);
  color: white;
}

/* ==========================================
   FOCUS VISIBLE
   ========================================== */

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
