/* =============================================================================
   TIKISTATS CLIENTS - BASE CSS
   Variables globales, reset, tipografía, estilos base
   ============================================================================= */

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

/* =============================================================================
   CSS CUSTOM PROPERTIES (Variables)
   ============================================================================= */

:root {
    /* === Paleta Principal TikiStats === */
    --color-dark: #232323;        /* Fondo principal, texto en fondos claros */
    --color-green: #80DA47;       /* Color primario de marca, acentos principales, CTAs */
    --color-light-green: #AAE7C9; /* Acentos secundarios, highlights suaves */
    --color-teal: #015144;        /* Header sidebar, elementos institucionales */
    --color-light: #F3F2F2;       /* Texto principal sobre fondos oscuros, fondos claros */
    --color-accent: #1CC294;      /* Acentos complementarios, gradientes con --color-green */

    /* === Colores Funcionales (derivados/complementarios) === */
    --color-dark-bg: #1a1a1a;     /* Fondo secundario, dropdowns */
    --color-card-bg: #242424;     /* Fondo de tarjetas */
    --color-success: #4CAF50;     /* Estados positivos, victorias */
    --color-warning: #FFC107;     /* Alertas, empates */
    --color-danger: #F44336;      /* Errores, derrotas */
    --color-border: rgba(128, 218, 71, 0.1); /* Bordes sutiles */
    --color-muted: #9e9e9e;       /* Texto secundario, labels */
    --color-card-hover: #2a2a2a;  /* Hover state para cards */

    /* === Tipografía === */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-xs: 0.75rem;      /* 12px - Labels de tabla, badges, metadata */
    --font-size-sm: 0.875rem;     /* 14px - Texto secundario, subtítulos de tarjetas */
    --font-size-base: 1rem;       /* 16px - Texto general, párrafos */
    --font-size-md: 1.125rem;     /* 18px - Subtítulos de sección */
    --font-size-lg: 1.25rem;      /* 20px - Títulos de tarjetas, headers de sección */
    --font-size-xl: 1.5rem;       /* 24px - Títulos principales de página */
    --font-size-2xl: 2rem;        /* 32px - Números destacados, stat-numbers */
    --font-size-3xl: 2.5rem;      /* 40px - Números hero, KPIs principales */
}

/* =============================================================================
   RESET Y ESTILOS BASE
   ============================================================================= */

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

body {
    font-family: var(--font-family);
    background-color: var(--color-dark);
    color: var(--color-light);
    min-height: 100vh;
    line-height: 1.6;
}

/* =============================================================================
   UTILIDADES DE TEXTO
   ============================================================================= */

.text-muted {
    color: #e7e7e7 !important;
}

.text-green {
    color: var(--color-green) !important;
}

.text-light-green {
    color: var(--color-light-green) !important;
}

.text-light {
    color: var(--color-light) !important;
}

.text-white {
    color: #ffffff !important;
}

.text-sm {
    font-size: var(--font-size-sm);
}

.text-xs {
    font-size: var(--font-size-xs);
}

.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);
}

/* Colores específicos con tamaños */
.text-2xl-green {
    font-size: var(--font-size-2xl);
    color: var(--color-green) !important;
}

.text-2xl-danger {
    font-size: var(--font-size-2xl);
    color: var(--color-danger) !important;
}

/* =============================================================================
   UTILIDADES DE DIMENSIONES
   ============================================================================= */

.logo-sm {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.logo-md {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-right: 20px;
}

.icon-profile {
    width: 30px;
    height: 30px;
    object-fit: cover;
}

.img-fit-contain {
    object-fit: contain;
}

.img-fit-cover {
    object-fit: cover;
}

/* Dimensiones específicas */
.w-40px { width: 40px; }
.w-50px { width: 50px; }
.w-100px { width: 100px; }
.w-150px { width: 150px; }
.w-215px { width: 215px; }
.w-250px { width: 250px; }

.min-w-250 { min-width: 250px; }

/* Clases de color adicionales */
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-3xl.text-success { 
    font-size: var(--font-size-3xl); 
    color: var(--color-success); 
}
.text-3xl.text-warning { 
    font-size: var(--font-size-3xl); 
    color: var(--color-warning); 
}

/* =============================================================================
   UTILIDADES DE TRANSICIONES
   ============================================================================= */

.transition-transform { 
    transition: transform 0.3s ease; 
}

.transition-all { 
    transition: all 0.3s ease; 
}

/* =============================================================================
   UTILIDADES DE BORDES
   ============================================================================= */

.border-danger-muted { 
    border-color: #dc3545 !important; 
    opacity: 0.6; 
}

.border-success-muted { 
    border-color: #4CAF50 !important; 
    opacity: 0.6; 
}

/* =============================================================================
   FORMULARIOS - ESTILOS BASE
   ============================================================================= */

select {
    color: #474747 !important;
    background-color: #defff6 !important;
}

input::placeholder,
textarea::placeholder {
    color: #ededed !important;
    opacity: 0.7 !important;
}

.form-text {
    color: #dedede !important;
}

.form-control,
.form-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(128, 218, 71, 0.2);
    color: var(--color-light);
    border-radius: 8px;
    padding: 10px 15px;
}

.form-control:focus,
.form-select:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--color-green);
    box-shadow: 0 0 0 0.2rem rgba(128, 218, 71, 0.25);
    color: var(--color-light);
}

/* =============================================================================
   ANIMACIONES GLOBALES
   ============================================================================= */

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

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.3;
    }
}

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

/* =============================================================================
   UTILIDADES DE VISUALIZACIÓN
   ============================================================================= */

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(128, 218, 71, 0.2);
    border-top-color: var(--color-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
