/* ============================================
   GOTOSEND DESIGN SYSTEM - TOKENS v2.0
   Sistema completo con todas las variables del proyecto
   ============================================ */

:root {
    /* =========================
       COLORES PRINCIPALES
       ========================= */
    
    /* Brand Colors */
    --gsr-primary: #074b78;
    --gsr-primary-dark: #010640;
    --gsr-primary-light: #0a5e96;
    --gsr-primary-subtle: #e8f4fd;
    
    /* Accent Colors */
    --gsr-accent: #00ff88;
    --gsr-accent-dark: #00c851;
    --gsr-accent-light: #66ffb3;
    --gsr-accent-subtle: #e8f5e8;
    
    /* Secondary Colors */
    --gsr-secondary: #00a8ff;
    --gsr-secondary-dark: #0078ff;
    --gsr-secondary-light: #66c9ff;
    
    /* Estado Colors */
    --gsr-success: #00c851;
    --gsr-success-light: #d4f1d4;
    --gsr-success-dark: #00a041;
    
    --gsr-warning: #ffb300;
    --gsr-warning-light: #fff3cd;
    --gsr-warning-dark: #ff8800;
    
    --gsr-error: #ff3838;
    --gsr-error-light: #ffe0e0;
    --gsr-error-dark: #d32f2f;
    
    --gsr-info: #2196f3;
    --gsr-info-light: #e3f2fd;
    --gsr-info-dark: #1976d2;
    
    /* Neutral Colors */
    --gsr-gray-50: #fafbfc;
    --gsr-gray-100: #f5f7fa;
    --gsr-gray-200: #e1e8ed;
    --gsr-gray-300: #c3cfe2;
    --gsr-gray-400: #98a6bc;
    --gsr-gray-500: #6c757d;
    --gsr-gray-600: #495057;
    --gsr-gray-700: #343a40;
    --gsr-gray-800: #212529;
    --gsr-gray-900: #0f1419;
    
    /* Text Colors */
    --gsr-text-primary: #212529;
    --gsr-text-secondary: #6c757d;
    --gsr-text-muted: #98a6bc;
    --gsr-text-inverse: #ffffff;
    
    /* Background Colors */
    --gsr-bg-primary: #ffffff;
    --gsr-bg-secondary: #fafbfc;
    --gsr-bg-tertiary: #f5f7fa;
    --gsr-bg-overlay: rgba(7, 75, 120, 0.95);
    
    /* =========================
       GRADIENTES MEJORADOS
       ========================= */
    --gsr-gradient-primary: linear-gradient(135deg, #074b78 0%, #010640 100%);
    --gsr-gradient-accent: linear-gradient(135deg, #00c851 0%, #00ff88 100%);
    --gsr-gradient-info: linear-gradient(135deg, #f8fbff 0%, #e8f4fd 100%);
    --gsr-gradient-light: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --gsr-gradient-rainbow: linear-gradient(90deg, #00ff88, #00a8ff, #0078ff);
    --gsr-gradient-success: linear-gradient(135deg, #e8f5e8 0%, #d4f1d4 100%);
    --gsr-gradient-warning: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
    --gsr-gradient-mesh: radial-gradient(at 40% 20%, hsla(200, 90%, 50%, 0.3) 0px, transparent 50%),
                         radial-gradient(at 80% 0%, hsla(150, 100%, 50%, 0.2) 0px, transparent 50%),
                         radial-gradient(at 0% 50%, hsla(220, 80%, 60%, 0.3) 0px, transparent 50%);
    
    /* =========================
       TIPOGRAFÍA
       ========================= */
    --gsr-font-primary: 'Play', sans-serif;
    --gsr-font-secondary: 'Roboto Condensed', sans-serif;
    --gsr-font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    
    /* Font Sizes */
    --gsr-text-xs: 0.75rem;     /* 12px */
    --gsr-text-sm: 0.875rem;    /* 14px */
    --gsr-text-base: 1rem;      /* 16px */
    --gsr-text-lg: 1.125rem;    /* 18px */
    --gsr-text-xl: 1.25rem;     /* 20px */
    --gsr-text-2xl: 1.5rem;     /* 24px */
    --gsr-text-3xl: 1.875rem;   /* 30px */
    --gsr-text-4xl: 2.25rem;    /* 36px */
    --gsr-text-5xl: 3rem;       /* 48px */
    --gsr-text-6xl: 4rem;       /* 64px */
    
    /* Font Weights */
    --gsr-font-light: 300;
    --gsr-font-regular: 400;
    --gsr-font-medium: 500;
    --gsr-font-semibold: 600;
    --gsr-font-bold: 700;
    
    /* Line Heights */
    --gsr-leading-tight: 1.25;
    --gsr-leading-normal: 1.5;
    --gsr-leading-relaxed: 1.75;
    
    /* Letter Spacing */
    --gsr-tracking-tight: -0.025em;
    --gsr-tracking-normal: 0;
    --gsr-tracking-wide: 0.025em;
    --gsr-tracking-wider: 0.05em;
    --gsr-tracking-widest: 0.1em;
    
    /* =========================
       ESPACIADO
       ========================= */
    --gsr-space-0: 0;
    --gsr-space-1: 0.25rem;   /* 4px */
    --gsr-space-2: 0.5rem;    /* 8px */
    --gsr-space-3: 0.75rem;   /* 12px */
    --gsr-space-4: 1rem;      /* 16px */
    --gsr-space-5: 1.25rem;   /* 20px */
    --gsr-space-6: 1.5rem;    /* 24px */
    --gsr-space-7: 1.75rem;   /* 28px */
    --gsr-space-8: 2rem;      /* 32px */
    --gsr-space-10: 2.5rem;   /* 40px */
    --gsr-space-12: 3rem;     /* 48px */
    --gsr-space-16: 4rem;     /* 64px */
    --gsr-space-20: 5rem;     /* 80px */
    --gsr-space-24: 6rem;     /* 96px */
    
    /* =========================
       BORDES
       ========================= */
    --gsr-border-width: 1px;
    --gsr-border-width-2: 2px;
    --gsr-border-width-3: 3px;
    --gsr-border-width-4: 4px;
    --gsr-border-width-5: 5px;
    --gsr-border-color: #e1e8ed;
    --gsr-border-color-dark: #c3cfe2;
    --gsr-border-color-light: #f5f7fa;
    
    /* Border Radius */
    --gsr-radius-none: 0;
    --gsr-radius-sm: 0.25rem;    /* 4px */
    --gsr-radius-base: 0.5rem;   /* 8px */
    --gsr-radius-md: 0.75rem;    /* 12px */
    --gsr-radius-lg: 1rem;       /* 16px */
    --gsr-radius-xl: 1.5rem;     /* 24px */
    --gsr-radius-2xl: 2rem;      /* 32px */
    --gsr-radius-full: 9999px;
    
    /* =========================
       SOMBRAS MEJORADAS
       ========================= */
    --gsr-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --gsr-shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --gsr-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --gsr-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --gsr-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --gsr-shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --gsr-shadow-3xl: 0 30px 60px rgba(0, 0, 0, 0.2);
    --gsr-shadow-primary: 0 20px 40px rgba(7, 75, 120, 0.15);
    --gsr-shadow-accent: 0 4px 15px rgba(0, 200, 81, 0.3);
    --gsr-shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    --gsr-shadow-elevation-1: 0 2px 8px rgba(0, 0, 0, 0.08);
    --gsr-shadow-elevation-2: 0 4px 16px rgba(0, 0, 0, 0.1);
    --gsr-shadow-elevation-3: 0 8px 24px rgba(0, 0, 0, 0.12);
    --gsr-shadow-elevation-4: 0 16px 32px rgba(0, 0, 0, 0.14);
    --gsr-shadow-elevation-5: 0 24px 48px rgba(0, 0, 0, 0.16);
    
    /* =========================
       TRANSICIONES Y ANIMACIONES
       ========================= */
    --gsr-transition-fast: 150ms ease;
    --gsr-transition-base: 250ms ease;
    --gsr-transition-slow: 350ms ease;
    --gsr-transition-slower: 500ms ease;
    --gsr-transition-slowest: 700ms ease;
    
    /* Easing Functions */
    --gsr-ease-in: cubic-bezier(0.4, 0, 1, 1);
    --gsr-ease-out: cubic-bezier(0, 0, 0.2, 1);
    --gsr-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --gsr-ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --gsr-ease-elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6);
    
    /* Duraciones de animación */
    --gsr-duration-instant: 100ms;
    --gsr-duration-fast: 200ms;
    --gsr-duration-normal: 300ms;
    --gsr-duration-slow: 500ms;
    --gsr-duration-slower: 800ms;
    --gsr-duration-slowest: 1000ms;
    
    /* =========================
       Z-INDEX MEJORADO
       ========================= */
    --gsr-z-0: 0;
    --gsr-z-10: 10;
    --gsr-z-20: 20;
    --gsr-z-30: 30;
    --gsr-z-40: 40;
    --gsr-z-50: 50;
    --gsr-z-auto: auto;
    --gsr-z-dropdown: 1000;
    --gsr-z-sticky: 1020;
    --gsr-z-fixed: 1030;
    --gsr-z-modal-backdrop: 1040;
    --gsr-z-modal: 1050;
    --gsr-z-popover: 1060;
    --gsr-z-tooltip: 1070;
    --gsr-z-notification: 1080;
    --gsr-z-9999: 9999;
    
    /* =========================
       BREAKPOINTS
       ========================= */
    --gsr-screen-xs: 375px;
    --gsr-screen-sm: 640px;
    --gsr-screen-md: 768px;
    --gsr-screen-lg: 1024px;
    --gsr-screen-xl: 1280px;
    --gsr-screen-2xl: 1536px;
    
    /* =========================
       NUEVOS TOKENS PARA WIZARD Y COMPONENTES AVANZADOS
       ========================= */
    /* Wizard Steps */
    --gsr-wizard-step-size: 40px;
    --gsr-wizard-step-size-sm: 32px;
    --gsr-wizard-line-height: 2px;
    --gsr-wizard-step-spacing: 120px;
    
    /* Timeline */
    --gsr-timeline-dot-size: 20px;
    --gsr-timeline-dot-size-lg: 24px;
    --gsr-timeline-line-width: 2px;
    --gsr-timeline-content-spacing: 32px;
    
    /* Charts */
    --gsr-chart-height: 300px;
    --gsr-chart-height-sm: 200px;
    --gsr-chart-grid-color: rgba(0, 0, 0, 0.05);
    
    /* Cards */
    --gsr-card-padding: 1.5rem;
    --gsr-card-padding-sm: 1rem;
    --gsr-card-padding-lg: 2rem;
    
    /* KPI Dashboard */
    --gsr-kpi-icon-size: 48px;
    --gsr-kpi-value-size: 2.5rem;
    --gsr-kpi-trend-size: 0.875rem;
    
    /* Estados de órdenes (colores específicos) */
    --gsr-status-pending: #ffc107;
    --gsr-status-processing: #2196f3;
    --gsr-status-confirmed: #00bcd4;
    --gsr-status-preparing: #ff9800;
    --gsr-status-in-transfer: #3f51b5;
    --gsr-status-delivered: #4caf50;
    --gsr-status-failed: #f44336;
    --gsr-status-canceled: #9e9e9e;
    --gsr-status-refunded: #9c27b0;
    
    /* Blur effects */
    --gsr-blur-sm: blur(4px);
    --gsr-blur-base: blur(8px);
    --gsr-blur-md: blur(12px);
    --gsr-blur-lg: blur(16px);
    --gsr-blur-xl: blur(24px);
    
    /* Grid gaps */
    --gsr-gap-xs: 0.5rem;
    --gsr-gap-sm: 1rem;
    --gsr-gap-base: 1.5rem;
    --gsr-gap-md: 2rem;
    --gsr-gap-lg: 3rem;
    --gsr-gap-xl: 4rem;
}

/* ============================================
   MODO OSCURO
   ============================================ */

html[data-theme="dark"],
[data-theme="dark"] {
    /* Colores adaptados para modo oscuro */
    --gsr-primary: #0a5e96;
    --gsr-primary-dark: #074b78;
    --gsr-primary-light: #1a7ab8;
    --gsr-primary-subtle: #0a2540;
    
    --gsr-accent: #66ffb3;
    --gsr-accent-dark: #00ff88;
    --gsr-accent-light: #99ffcc;
    --gsr-accent-subtle: #0a3320;
    
    /* Neutrales invertidos */
    --gsr-gray-50: #0f1419;
    --gsr-gray-100: #1a1f2e;
    --gsr-gray-200: #2a3142;
    --gsr-gray-300: #3a4556;
    --gsr-gray-400: #4a5568;
    --gsr-gray-500: #6c757d;
    --gsr-gray-600: #8892a0;
    --gsr-gray-700: #a4adb8;
    --gsr-gray-800: #c3cfe2;
    --gsr-gray-900: #e1e8ed;
    
    /* Textos */
    --gsr-text-primary: #e1e8ed;
    --gsr-text-secondary: #a4adb8;
    --gsr-text-muted: #6c757d;
    --gsr-text-inverse: #0f1419;
    
    /* Fondos */
    --gsr-bg-primary: #0f1419;
    --gsr-bg-secondary: #1a1f2e;
    --gsr-bg-tertiary: #2a3142;
    --gsr-bg-overlay: rgba(15, 20, 25, 0.95);
    
    /* Bordes */
    --gsr-border-color: #2a3142;
    --gsr-border-color-dark: #3a4556;
    --gsr-border-color-light: #1a1f2e;
    
    /* Gradientes ajustados */
    --gsr-gradient-primary: linear-gradient(135deg, #0a5e96 0%, #074b78 100%);
    --gsr-gradient-light: linear-gradient(135deg, #1a1f2e 0%, #2a3142 100%);
    
    /* Sombras más intensas */
    --gsr-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --gsr-shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --gsr-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --gsr-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --gsr-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    --gsr-shadow-primary: 0 20px 40px rgba(0, 255, 136, 0.1);
}

/* ============================================
   ESTILOS BASE DE APLICACIÓN
   ============================================ */

/* Reset base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Aplicar fuentes base */
body {
    font-family: var(--gsr-font-secondary);
    font-size: var(--gsr-text-base);
    line-height: var(--gsr-leading-normal);
    color: var(--gsr-text-primary);
    background-color: var(--gsr-bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Títulos con Play */
h1, h2, h3, h4, h5, h6, 
.gsr-heading {
    font-family: var(--gsr-font-primary);
    font-weight: var(--gsr-font-bold);
    letter-spacing: var(--gsr-tracking-wide);
}

/* ============================================
   UTILIDADES CSS CUSTOM PROPERTIES
   ============================================ */
/* Permite usar las variables como clases utilitarias */
.gsr-gradient-primary { background: var(--gsr-gradient-primary); }
.gsr-gradient-accent { background: var(--gsr-gradient-accent); }
.gsr-gradient-mesh { background: var(--gsr-gradient-mesh); }
.gsr-shadow-primary { box-shadow: var(--gsr-shadow-primary); }
.gsr-shadow-accent { box-shadow: var(--gsr-shadow-accent); }