/* ===================== VARIABLES CSS ===================== */
/* Fuente Poppins de Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    /* === COLORES PRINCIPALES - Azul === */

    /* Color principal */
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-primary-light: #60a5fa;
    --color-primary-dark: #1e3a8a;

    /* Color de texto principal */
    --color-secondary: #1e2a3a;
    --color-secondary-hover: #111827;

    /* Colores de estado */
    --color-success: #059669;
    --color-success-hover: #047857;
    --color-warning: #d97706;
    --color-warning-hover: #b45309;
    --color-danger: #dc2626;
    --color-danger-hover: #b91c1c;
    --color-info: #0891b2;

    /* Brand colors */
    --emerald-50:  #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-200: #a7f3d0;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --emerald-800: #065f46;
    --emerald-900: #064e3b;

    /* Color de fondo activo / acento */
    --color-primary-bg: #eff6ff;
    --color-primary-bg-hover: #dbeafe;
    --color-border-focus: #3b82f6;

    /* Gradiente "IA" - flujo azul-índigo */
    --gradient-secondary: linear-gradient(
        135deg,
        #3b82f6 0%,
        #6366f1 50%,
        #60a5fa 100%
    );

    /* Gradiente principal (spectrum bar) */
    --gradient-primary: linear-gradient(
        90deg,
        #1e3a8a 0%,
        #2563eb 40%,
        #60a5fa 75%,
        #818cf8 100%
    );

    /* Alias de compatibilidad */
    --genial-gradient: var(--gradient-secondary);
    --lefebvre-gradient: var(--gradient-primary);

    /* Grises y neutros */
    --color-gray-50:  #f8fafc;
    --color-gray-100: #f1f5f9;
    --color-gray-200: #e2e8f0;
    --color-gray-300: #cbd5e1;
    --color-gray-400: #94a3b8;
    --color-gray-500: #64748b;
    --color-gray-600: #475569;
    --color-gray-700: #334155;
    --color-gray-800: #1e293b;
    --color-gray-900: #0f172a;

    /* Texto */
    --color-text:           #1e293b;
    --color-text-secondary: #334155;
    --color-text-muted:     #64748b;
    --color-text-light:     #94a3b8;

    /* Fondos */
    --color-bg:           #ffffff;
    --color-bg-secondary: #f8fafc;
    --color-bg-tertiary:  #f1f5f9;

    /* Bordes */
    --color-border:       #e2e8f0;
    --color-border-light: #f1f5f9;

    /* Sombras */
    --shadow-sm:  0 1px 3px rgba(6, 78, 59, 0.06);
    --shadow-md:  0 4px 14px rgba(6, 78, 59, 0.10);
    --shadow-lg:  0 10px 28px rgba(6, 78, 59, 0.12);
    --shadow-xl:  0 20px 44px rgba(6, 78, 59, 0.14);
    --shadow-modal: 0 24px 64px rgba(6, 78, 59, 0.18);

    /* Sombra de color primario (para botones hover) */
    --shadow-primary: 0 4px 14px rgba(37, 99, 235, 0.30);

    /* Variantes alpha del primario (para backgrounds, overlays, sombras) */
    --color-primary-alpha-08: rgba(37, 99, 235, 0.08);
    --color-primary-alpha-12: rgba(37, 99, 235, 0.12);
    --color-primary-alpha-20: rgba(37, 99, 235, 0.20);
    --color-primary-alpha-30: rgba(37, 99, 235, 0.30);

    /* Colores de estado — backgrounds y bordes */
    --color-success-bg:     #ecfdf5;
    --color-success-border: #a7f3d0;
    --color-warning-bg:     #fffbeb;
    --color-warning-border: #fde68a;
    --color-warning-text:   #92400e;
    --color-danger-bg:      #fef2f2;
    --color-danger-border:  #fecaca;

    /* Gradiente para el texto "IA" del logo (flujo azul-índigo) */
    --gradient-ia: linear-gradient(90deg, #3b82f6, #6366f1, #60a5fa, #818cf8, #3b82f6);

    /* Overlay de modales */
    --color-overlay: rgba(10, 30, 20, 0.45);

    /* ── Sidebar oscuro ────────────────────────────────── */
    --sidebar-bg:            #141820;
    --sidebar-border:        rgba(255, 255, 255, 0.06);
    --sidebar-text:          #b0bdd0;
    --sidebar-text-hover:    #e8eef7;
    --sidebar-text-active:   #ffffff;
    --sidebar-label:         #6b82a0;
    --sidebar-hover-bg:      rgba(255, 255, 255, 0.05);
    --sidebar-active-bg:         rgba(37, 99, 235, 0.16);
    --sidebar-active-border:     #60a5fa;
    --sidebar-active-border-dim: rgba(96, 165, 250, 0.45);
    --sidebar-footer-border:     rgba(255, 255, 255, 0.07);

    /* Espaciado */
    --spacing-xs:  0.25rem;  /* 4px */
    --spacing-sm:  0.5rem;   /* 8px */
    --spacing-md:  1rem;     /* 16px */
    --spacing-lg:  1.5rem;   /* 24px */
    --spacing-xl:  2rem;     /* 32px */
    --spacing-2xl: 3rem;     /* 48px */

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

    /* Tipografía */
    --font-family:      'Poppins', Arial, sans-serif;
    --font-family-mono: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Monaco, 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.25;
    --line-height-normal:  1.5;
    --line-height-relaxed: 1.75;

    /* Transiciones */
    --transition-fast:   0.15s ease;
    --transition-normal: 0.2s ease;
    --transition-slow:   0.3s ease;
    --transition-spring: 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Z-index */
    --z-dropdown:     100;
    --z-sticky:       200;
    --z-modal:        300;
    --z-tooltip:      400;
    --z-notification: 500;
}

/* ── Keyframes globales ─────────────────────────────────── */

@keyframes gradient-flow {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slide-in-left {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes scale-in {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}

/* ── Clases de animación reutilizables ──────────────────── */

.gradient-animated {
    background: linear-gradient(90deg, #10b981, #0d9488, #34d399, #6ee7b7, #10b981);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-flow 4s ease infinite;
}

.animate-fade-in    { animation: fade-in 0.3s ease forwards; }
.animate-slide-left { animation: slide-in-left 0.25s ease forwards; }
.animate-scale-in   { animation: scale-in 0.2s ease forwards; }
