/* 
 * 3tentos - Design System Variables
 * Sistema de design centralizado para consistência visual
 * 
 * IMPORTANTE: Este é o arquivo CANÔNICO para variáveis CSS.
 * Todos os outros arquivos devem importar este ou usar essas variáveis.
 * 
 * @version 2.0.0
 * @updated 2026-02-02
 */

:root {
  /* ============================================
     CORES PRINCIPAIS DA MARCA (Brand Colors)
     ============================================ */
  --azul-3tentos: #001f4c;
  --azul-3tentos-claro: #1a4d8c;
  --azul-3tentos-escuro: #001638;
  --vermelho-3tentos: #e30613;
  --vermelho-3tentos-escuro: #c00510;
  
  /* Aliases para compatibilidade com theme.css */
  --primary-color: var(--azul-3tentos);
  --primary-hover: var(--azul-3tentos-claro);
  --secondary-color: var(--vermelho-3tentos);
  --accent-color: var(--vermelho-3tentos);
  --danger-color: var(--vermelho-3tentos);
  --brand-blue: var(--azul-3tentos);
  
  /* ============================================
     CORES SEMÂNTICAS (Semantic Colors)
     ============================================ */
  --success-color: #22c55e;
  --success-light: #dcfce7;
  --success-dark: #166534;
  
  --warning-color: #f59e0b;
  --warning-light: #fef3c7;
  --warning-dark: #92400e;
  
  --info-color: #3b82f6;
  --info-light: #dbeafe;
  --info-dark: #1e40af;
  
  --error-color: var(--vermelho-3tentos);
  --error-light: #fee2e2;
  --error-dark: #991b1b;
  
  /* ============================================
     CORES SECUNDÁRIAS (Secondary Colors)
     ============================================ */
  --verde-renovabio: #2e8b57;
  --verde-claro: #3cb371;
  --laranja: #ff8c00;
  --roxo: #6a5acd;
  --azul-eudr: #4169e1;
  --amarelo: #ffd700;
  
  /* ============================================
     CORES DE FUNDO (Background Colors)
     ============================================ */
  --cinza-fundo: #f5f7fa;
  --branco: #ffffff;
  --cinza-claro: #e0e0e0;
  --cinza-medio: #e2e8f0;
  --cinza-escuro: #334155;
  
  /* Aliases para compatibilidade */
  --bg-body: #f1f5f9;
  --bg-panel: var(--branco);
  --bg-header: var(--branco);
  --bg-card: var(--branco);
  --bg-muted: #f8fafc;
  
  /* ============================================
     CORES DE TEXTO (Text Colors)
     ============================================ */
  --preto-texto: #333333;
  --texto-primario: #2f3545;
  --texto-secundario: #64748b;
  --texto-claro: #94a3b8;
  --texto-branco: #ffffff;
  --texto-muted: #cbd5e1;
  
  /* Aliases para compatibilidade */
  --text-primary: #0f172a;
  --text-secondary: var(--texto-secundario);
  --text-muted: var(--texto-claro);
  --text-light: var(--texto-branco);
  
  /* ============================================
     BORDAS (Borders)
     ============================================ */
  --borda-cor: #e2e8f0;
  --borda-clara: #f1f5f9;
  --borda-focus: rgba(25, 41, 75, 0.25);
  --border-color: var(--borda-cor);
  
  /* ============================================
     SOMBRAS (Shadows)
     ============================================ */
  --sombra: rgba(0, 0, 0, 0.1);
  --sombra-sm: 0 1px 3px rgba(0,0,0,0.08);
  --sombra-md: 0 4px 12px rgba(0,0,0,0.08);
  --sombra-lg: 0 10px 25px rgba(0,0,0,0.12);
  --sombra-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --sombra-brand: 0 4px 15px rgba(0, 31, 76, 0.15);
  
  /* Aliases para compatibilidade */
  --shadow-sm: var(--sombra-sm);
  --shadow-md: var(--sombra-md);
  --shadow-lg: var(--sombra-lg);
  --shadow-xl: var(--sombra-xl);
  
  /* ============================================
     RAIOS DE BORDA (Border Radius)
     ============================================ */
  --border-radius: 8px;
  --border-radius-sm: 4px;
  --border-radius-md: 6px;
  --border-radius-lg: 12px;
  --border-radius-xl: 16px;
  --border-radius-2xl: 20px;
  --border-radius-full: 9999px;
  
  /* ============================================
     GRADIENTES (Gradients)
     ============================================ */
  --gradient-brand: linear-gradient(135deg, var(--azul-3tentos) 0%, var(--azul-3tentos-claro) 100%);
  --gradient-accent: linear-gradient(135deg, var(--vermelho-3tentos) 0%, var(--vermelho-3tentos-escuro) 100%);
  --gradient-bg: linear-gradient(135deg, #f0f4f9 0%, #d7e1ec 100%);
  --gradient-glass: rgba(255, 255, 255, 0.1);
  --gradient-header: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
  
  /* ============================================
     TRANSIÇÕES (Transitions)
     ============================================ */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  --transition: all 0.2s ease;
  --transition-colors: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  --transition-transform: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* ============================================
     ESPAÇAMENTOS (Spacing)
     ============================================ */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;
  
  /* ============================================
     TIPOGRAFIA (Typography)
     ============================================ */
  --font-family-primary: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-family-heading: 'Montserrat', 'Inter', sans-serif;
  --font-family-mono: 'Monaco', 'Fira Code', 'Consolas', monospace;
  
  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */
  
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* ============================================
     LAYOUT (Layout)
     ============================================ */
  --layout-max-width: 1250px;
  --header-height: 72px;
  --toolbar-height: 60px;
  --sidebar-width: 280px;
  --content-max-width: 1440px;
  
  /* ============================================
     Z-INDEX (Layer Ordering)
     ============================================ */
  --z-base: 1;
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-loading: 9999;
  
  /* ============================================
     BREAKPOINTS (Media Query Reference)
     ============================================ */
  /* Não são variáveis CSS, apenas referência:
   * --breakpoint-sm: 640px;
   * --breakpoint-md: 768px;
   * --breakpoint-lg: 1024px;
   * --breakpoint-xl: 1280px;
   * --breakpoint-2xl: 1536px;
   */
}

/* ============================================
   CLASSES UTILITÁRIAS
   ============================================ */

/* Cores de texto */
.text-primary { color: var(--azul-3tentos); }
.text-secondary { color: var(--vermelho-3tentos); }
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-error { color: var(--error-color); }
.text-muted { color: var(--texto-secundario); }
.text-light { color: var(--texto-claro); }

/* Cores de fundo */
.bg-primary { background-color: var(--azul-3tentos); }
.bg-secondary { background-color: var(--vermelho-3tentos); }
.bg-success { background-color: var(--success-color); }
.bg-warning { background-color: var(--warning-color); }
.bg-error { background-color: var(--error-color); }
.bg-light { background-color: var(--cinza-fundo); }
.bg-white { background-color: var(--branco); }
.bg-muted { background-color: var(--bg-muted); }

/* Sombras */
.shadow-none { box-shadow: none; }
.shadow-sm { box-shadow: var(--sombra-sm); }
.shadow-md { box-shadow: var(--sombra-md); }
.shadow-lg { box-shadow: var(--sombra-lg); }
.shadow-xl { box-shadow: var(--sombra-xl); }

/* Bordas */
.rounded-none { border-radius: 0; }
.rounded-sm { border-radius: var(--border-radius-sm); }
.rounded { border-radius: var(--border-radius); }
.rounded-lg { border-radius: var(--border-radius-lg); }
.rounded-xl { border-radius: var(--border-radius-xl); }
.rounded-full { border-radius: var(--border-radius-full); }

/* Transições */
.transition { transition: var(--transition); }
.transition-fast { transition: var(--transition-fast); }
.transition-colors { transition: var(--transition-colors); }

/* Display */
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }

/* Flexbox */
.flex-row { flex-direction: row; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

/* Gap */
.gap-1 { gap: var(--spacing-xs); }
.gap-2 { gap: var(--spacing-sm); }
.gap-3 { gap: var(--spacing-md); }
.gap-4 { gap: var(--spacing-lg); }
.gap-5 { gap: var(--spacing-xl); }

/* Margens */
.m-0 { margin: 0; }
.m-auto { margin: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

/* Padding */
.p-0 { padding: 0; }
.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }
.p-5 { padding: var(--spacing-xl); }
.px-2 { padding-left: var(--spacing-sm); padding-right: var(--spacing-sm); }
.px-3 { padding-left: var(--spacing-md); padding-right: var(--spacing-md); }
.py-2 { padding-top: var(--spacing-sm); padding-bottom: var(--spacing-sm); }
.py-3 { padding-top: var(--spacing-md); padding-bottom: var(--spacing-md); }

/* Texto */
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }

.font-light { font-weight: var(--font-weight-light); }
.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.truncate { 
  overflow: hidden; 
  text-overflow: ellipsis; 
  white-space: nowrap; 
}

/* Width/Height */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-y-auto { overflow-y: auto; }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

/* Opacity */
.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* Visibilidade responsiva - use com cuidado */
@media (max-width: 768px) {
  .hidden-mobile { display: none !important; }
}

@media (min-width: 769px) {
  .hidden-desktop { display: none !important; }
}

/* === CLASSES UTILITÁRIAS === */
.text-primary { color: var(--azul-3tentos); }
.text-secondary { color: var(--vermelho-3tentos); }
.text-success { color: var(--verde-renovabio); }
.text-muted { color: var(--texto-secundario); }

.bg-primary { background-color: var(--azul-3tentos); }
.bg-secondary { background-color: var(--vermelho-3tentos); }
.bg-light { background-color: var(--cinza-fundo); }
.bg-white { background-color: var(--branco); }

.shadow-sm { box-shadow: var(--sombra-sm); }
.shadow-md { box-shadow: var(--sombra-md); }
.shadow-lg { box-shadow: var(--sombra-lg); }

.rounded { border-radius: var(--border-radius); }
.rounded-lg { border-radius: var(--border-radius-lg); }

.transition { transition: var(--transition-normal); }
.transition-fast { transition: var(--transition-fast); }
