/*-----------------------------------------------------------------------------------
    Modern Variables CSS
    Sistema de diseño moderno inspirado en shadcn/ui y Homer
    Soporta skin-light y skin-dark
-----------------------------------------------------------------------------------*/

/* ============================================
   VARIABLES BASE - LIGHT MODE (Default)
   ============================================ */
:root {
  /* Colores de marca - Azul React */
  --brand-primary: #007bff;
  --brand-primary-hover: #0056b3;
  --brand-primary-light: #cce5ff;
  --brand-secondary: #6c757d;
  --brand-accent: #17a2b8;

  /* Backgrounds - Light mode con panel central */
  --background: #f4f4f5;                /* zinc-100 - Fondo general gris claro */
  --background-secondary: #ffffff;      /* Blanco - Sidebar */
  --background-tertiary: #f1f5f9;
  --background-card: #ffffff;           /* Blanco - Cards */
  --background-hover: #f4f4f5;
  --background-panel: #ffffff;          /* Panel central blanco */
  --background-sidebar: #ffffff;        /* Sidebar blanco */

  /* Borders - Estilo shadcn/ui */
  --border-color: #e2e8f0;
  --border-color-light: #f1f5f9;
  --border-color-dark: #cbd5e1;
  --border-radius: 0.625rem;      /* 10px - botones e inputs */
  --border-radius-sm: 0.375rem;   /* 6px - pequeños */
  --border-radius-lg: 0.625rem;   /* 10px - botones e inputs */
  --border-radius-xl: 0.75rem;    /* 12px - cards */
  --border-radius-2xl: 1rem;      /* 16px - elementos grandes */

  /* Texto */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --text-muted: #cbd5e1;
  --text-inverse: #ffffff;

  /* Sombras modernas */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

  /* Estados */
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --error: #ef4444;
  --error-light: #fee2e2;
  --info: #3b82f6;
  --info-light: #dbeafe;

  /* Tipografía moderna */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", 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-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;

  /* 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 */
  --spacing-3xl: 4rem;     /* 64px */

  /* Transiciones */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* ============================================
   DARK MODE - skin-dark (shadcn/ui Zinc Theme)
   html.skin-dark para evitar flash blanco (FOUC)
   ============================================ */
html.skin-dark,
body.skin-dark {
  /* Backgrounds - Paleta Zinc de shadcn/ui con panel central */
  --background: #09090b;              /* zinc-950 - Fondo principal oscuro */
  --background-secondary: #18181b;    /* zinc-900 - Sidebar y headers */
  --background-tertiary: #27272a;     /* zinc-800 - Áreas alternadas */
  --background-card: #18181b;         /* zinc-900 - Cards elevados */
  --background-hover: #27272a;        /* zinc-800 - Hover states */
  --background-panel: #0f0f11;        /* Panel central ligeramente más claro */
  --background-sidebar: #09090b;      /* Sidebar oscuro */

  /* Borders - Sutiles como shadcn */
  --border-color: #27272a;            /* zinc-800 - Borde principal */
  --border-color-light: #18181b;      /* zinc-900 - Borde claro */
  --border-color-dark: #3f3f46;       /* zinc-700 - Separadores visibles */

  /* Texto - Alto contraste estilo shadcn */
  --text-primary: #fafafa;            /* zinc-50 - Texto principal brillante */
  --text-secondary: #a1a1aa;          /* zinc-400 - Texto secundario */
  --text-tertiary: #71717a;           /* zinc-500 - Texto terciario */
  --text-muted: #52525b;              /* zinc-600 - Texto silenciado */
  --text-inverse: #09090b;            /* zinc-950 - Texto inverso */

  /* Sombras sutiles y profesionales */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.35);
  --shadow-sm: 0 2px 4px 0 rgb(0 0 0 / 0.45), 0 1px 2px -1px rgb(0 0 0 / 0.45);
  --shadow-md: 0 4px 8px -2px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.5);
  --shadow-lg: 0 10px 20px -5px rgb(0 0 0 / 0.55), 0 4px 8px -4px rgb(0 0 0 / 0.55);
  --shadow-xl: 0 20px 30px -8px rgb(0 0 0 / 0.6), 0 8px 12px -6px rgb(0 0 0 / 0.6);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.7);

  /* Colores de marca - Azul brillante de shadcn */
  --brand-primary: #3b82f6;           /* blue-500 - Azul principal */
  --brand-primary-hover: #2563eb;     /* blue-600 - Hover */
  --brand-primary-light: #1e3a8a;     /* blue-900 - Fondo */

  /* Estados - Colores vibrantes de shadcn */
  --success: #22c55e;                 /* green-500 - Verde brillante */
  --success-light: #14532d;           /* green-950 */
  --warning: #f59e0b;                 /* amber-500 - Amarillo cálido */
  --warning-light: #451a03;           /* amber-950 */
  --error: #ef4444;                   /* red-500 - Rojo vibrante */
  --error-light: #450a0a;             /* red-950 */
  --info: #3b82f6;                    /* blue-500 - Info = primary */
  --info-light: #1e3a8a;              /* blue-900 */
}

/* ============================================
   LIGHT MODE EXPLÍCITO - skin-light
   ============================================ */
body.skin-light {
  /* Hereda las variables de :root (ya están definidas arriba) */
  /* Este bloque existe por claridad y para posibles overrides futuros */
}

/* ============================================
   TRANSICIONES GLOBALES DESHABILITADAS
   Forzar cambio de tema instantáneo
   ============================================ */

/* El body y todos sus hijos NO deben tener transición de background/color durante cambio de tema */
body.no-transitions,
body.no-transitions *,
body.no-transitions *::before,
body.no-transitions *::after {
  -webkit-transition: none !important;
  -moz-transition: none !important;
  -ms-transition: none !important;
  -o-transition: none !important;
  transition: none !important;
  -webkit-animation: none !important;
  animation: none !important;
}
