/**
 * ============================================================================
 * NAOWEE AUTHENTICATION THEME - BASE STYLES
 * ============================================================================
 * Sistema de diseño base para las pantallas de autenticación de Keycloak
 * Realm: nao-suite
 * ============================================================================
 */

/* ============================================================================
   DESIGN TOKENS - Variables CSS
   ============================================================================ */

:root {
    /* === COLORES PRINCIPALES === */
    --color-primary-navy: #002B5B;
    --color-primary-navy-dark: #001A3D;
    --color-primary-navy-light: #003C7A;

    --color-accent-orange: #D74009;
    --color-accent-orange-hover: #B33507;
    --color-accent-orange-light: #E85A1F;

    /* === COLORES NEUTRALES === */
    --color-white: #FFFFFF;
    --color-gray-50: #F9FAFB;
    --color-gray-100: #F3F4F6;
    --color-gray-200: #E5E7EB;
    --color-gray-300: #D1D5DB;
    --color-gray-400: #9CA3AF;
    --color-gray-500: #6B7280;
    --color-gray-600: #4B5563;
    --color-gray-700: #374151;
    --color-gray-800: #1F2937;
    --color-gray-900: #111827;

    /* === COLORES DE TEXTO === */
    --color-text-primary: #282834;
    --color-text-secondary: #646587;
    --color-text-tertiary: var(--color-gray-500);

    /* === COLORES DE ENLACES === */
    --color-link: var(--color-accent-orange);
    --color-link-hover: #353AC5;
    --color-link-visited: var(--color-primary-navy);

    /* === COLORES DE ESTADO === */
    --color-success: #10B981;
    --color-success-light: #D1FAE5;
    --color-error: #EF4444;
    --color-error-light: #FEE2E2;
    --color-warning: #F59E0B;
    --color-warning-light: #FEF3C7;
    --color-info: #3B82F6;
    --color-info-light: #DBEAFE;

    /* === TIPOGRAFÍA === */
    --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    --font-family-display: 'Outfit', var(--font-family-primary);

    --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-size-5xl: 3rem;
    /* 48px */

    --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: 2.5rem;
    /* 40px */
    --spacing-3xl: 3rem;
    /* 48px */
    --spacing-4xl: 4rem;
    /* 64px */
    --spacing-5xl: 5rem;
    /* 80px */

    /* === BORDES Y RADIOS === */
    --border-radius-sm: 0.25rem;
    /* 4px */
    --border-radius-md: 0.5rem;
    /* 8px */
    --border-radius-lg: 0.75rem;
    /* 12px */
    --border-radius-xl: 1rem;
    /* 16px */
    --border-radius-2xl: 1.5rem;
    /* 24px */
    --border-radius-full: 9999px;

    --border-width-thin: 1px;
    --border-width-medium: 2px;
    --border-width-thick: 3px;

    /* === SOMBRAS === */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);

    /* === 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);
    --transition-slower: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* === Z-INDEX === */
    --z-index-dropdown: 1000;
    --z-index-sticky: 1020;
    --z-index-fixed: 1030;
    --z-index-modal-backdrop: 1040;
    --z-index-modal: 1050;
    --z-index-popover: 1060;
    --z-index-tooltip: 1070;

    /* === LAYOUT === */
    --container-max-width: 1440px;
    --form-max-width: 457px;
    --brand-panel-width: 35%;
    --content-panel-width: 65%;
}

/* ============================================================================
   RESET Y NORMALIZACIÓN
   ============================================================================ */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--color-text-primary);
    background-color: var(--color-white);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* ============================================================================
   TIPOGRAFÍA BASE
   ============================================================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-family-display);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-gray-900);
    margin: 0;
}

h1 {
    font-size: var(--font-size-4xl);
}

h2 {
    font-size: var(--font-size-3xl);
}

h3 {
    font-size: var(--font-size-2xl);
}

h4 {
    font-size: var(--font-size-xl);
}

h5 {
    font-size: var(--font-size-lg);
}

h6 {
    font-size: var(--font-size-base);
}

p {
    margin: 0;
    line-height: var(--line-height-normal);
}

a {
    color: var(--color-link);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

a:focus {
    outline: 2px solid var(--color-link-hover);
    outline-offset: 2px;
}

/* ============================================================================
   UTILIDADES GLOBALES
   ============================================================================ */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.font-medium {
    font-weight: var(--font-weight-medium);
}

.font-semibold {
    font-weight: var(--font-weight-semibold);
}

.font-bold {
    font-weight: var(--font-weight-bold);
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-fade-in {
    animation: fadeIn var(--transition-base) ease-out;
}

.animate-slide-in-up {
    animation: slideInUp var(--transition-slow) ease-out;
}

.animate-slide-in-right {
    animation: slideInRight var(--transition-slow) ease-out;
}

/* ============================================================================
   RESPONSIVE BREAKPOINTS
   ============================================================================ */

/* Mobile First Approach */
/* sm: 640px */
/* md: 768px */
/* lg: 1024px */
/* xl: 1280px */
/* 2xl: 1536px */

@media (max-width: 768px) {
    :root {
        --font-size-4xl: 1.875rem;
        /* 30px en móvil */
        --font-size-3xl: 1.5rem;
        /* 24px en móvil */
    }
}