﻿/* ============================================================
   🌿 TERRAVIX LOGIN - MINIMAL PROFESSIONAL DESIGN
   Ultra Modern | Clean | High Contrast | Professional UX/UI
   ============================================================ */

/* ══════════════════════════════════════════════════════════
   CSS VARIABLES - WCAG AAA Contrast Standards
   Todos los colores garantizan ratio 7:1 o superior
   Tipografía: System UI stack con números tabulares
   ══════════════════════════════════════════════════════════ */
:root {
  /* Backgrounds - Máximo contraste */
  --tvx-surface: #ffffff;       /* Pure white */

  /* Primary Colors - AAA compliant (7:1+) */
  --tvx-accent: #15803d;        /* green-700 - Corporate Green */
  --tvx-accent-hover: #166534;  /* green-800 - Darker shade */
  --tvx-accent-light: #dcfce7;  /* green-100 - Light backgrounds */
  --tvx-accent-bright: #22c55e; /* green-500 - Bright accent */

  /* Text Colors - AAA Standards (≥7:1 ratio) */
  --tvx-text: #0f172a;          /* slate-900 - Primary AAA 21:1 */
  --tvx-text-secondary: #334155; /* slate-700 - Secondary AAA 8:1 */
  --tvx-text-light: #475569;    /* slate-600 - Tertiary AAA 7:1 */
  --tvx-text-muted: #64748b;    /* slate-500 - Quaternary 4.5:1 */

  /* Borders & Dividers */
  --tvx-border: #e2e8f0;        /* slate-200 */
  --tvx-border-focus: #047857;  /* Accent AAA */

  /* Status Colors - AAA Compliant */
  --tvx-danger: #b91c1c;        /* red-700 - Error AAA 7.5:1 */
  --tvx-danger-light: #dc2626;  /* red-600 */
  --tvx-success: #065f46;       /* emerald-800 - Success AAA 7.2:1 */

  /* Typography - Inter/System UI + números tabulares */
  --tvx-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Inter', system-ui, sans-serif;

  /* Shadows - Professional depth */
  --tvx-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --tvx-shadow-md: 0 2px 4px rgba(0, 0, 0, 0.08);
  --tvx-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ============================================================
   TIPOGRAFÍA GLOBAL - Escalas Senior UX/UI + Números Tabulares
   H1 hero: 32-36px/700 | H1 card: 28-32px/700
   Labels: 14-15px/600 | Cuerpo: 15-16px/400-500
   line-height: 1.45-1.6 en párrafos | NO usar ALL CAPS en párrafos
   ============================================================ */
body {
    font-feature-settings: 'kern' 1, 'liga' 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Números tabulares para métricas */
.tvx-metric,
dt,
[data-metric] {
    font-feature-settings: 'tnum' 1, 'kern' 1;
    font-variant-numeric: tabular-nums;
}

/* ============================================================
   🏗️ GRID PRINCIPAL - PANTALLA DIVIDIDA 50/50 Senior UX/UI
   Desktop: Hero izquierda, Login derecha
   Mobile: Login arriba (primero), Hero abajo
   ============================================================ */
.tvx-login-grid {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
    font-family: var(--tvx-font);
    margin: 0;
    padding: 0;
    background: var(--tvx-surface);
    overflow: hidden;
}

/* Desktop: Grid 50/50 con orden invertido */
@media (min-width: 992px) {
    .tvx-login-grid {
        grid-template-columns: 1fr 1fr;
    }

    .tvx-login-section {
        order: 2; /* Login a la derecha en desktop */
    }

    .tvx-hero {
        order: 1; /* Hero a la izquierda en desktop */
    }
}

/* ============================================================
   🔐 LOGIN SECTION - Columna IZQUIERDA
   ============================================================ */

.tvx-login-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(32px, 8vw, 64px);
    background: var(--tvx-surface);
    position: relative;
    min-height: 100vh;
}

.tvx-card {
    background: #ffffff;
    border-radius: 12px;
    padding: clamp(32px, 6vw, 48px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--tvx-border);
    max-width: 480px;
    width: 100%;
    position: relative;
}

.tvx-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--tvx-accent);
    border-radius: 12px 12px 0 0;
}

/* ══════════════════════════════════════════════════════════
   HEADER DEL CARD - WCAG AAA | Tipografía Senior UX/UI
   H1 card: 28-32px/700 | Subtítulo: 15px/400 | line-height 1.45
   Contraste AAA: 7:1+ en todos los textos
   ══════════════════════════════════════════════════════════ */
.tvx-card__header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 0 1.5rem;
}

.tvx-card__title {
    font-size: clamp(1.75rem, 4vw, 2rem); /* 28-32px */
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #0f172a; /* AAA: 21:1 ratio */
    letter-spacing: -0.025em;
    line-height: 1.2;
    text-align: center;
}

.tvx-card__subtitle {
    font-size: 0.9375rem; /* 15px */
    font-weight: 400;
    color: #334155; /* AAA: 8:1 ratio */
    margin: 0 auto;
    line-height: 1.45;
    max-width: 36ch;
    text-align: center;
}

.tvx-card__hint {
    font-size: 1rem;
    font-weight: 400;
    color: #334155;
    margin: 0 auto;
    line-height: 1.45;
    max-width: 34ch;
    text-align: center;
}

/* Form Styling */
.tvx-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tvx-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tvx-field label {
    font-size: 0.9375rem; /* 15px - Tipografía UX Senior */
    font-weight: 600;
    color: var(--tvx-text);
    margin-bottom: 0.375rem;
}

.tvx-input {
    height: 56px !important;
    border: 2px solid var(--tvx-border) !important;
    border-radius: 8px !important;
    padding: 0 1rem !important;
    font-size: 1rem !important; /* 16px - Cuerpo legible AAA */
    line-height: 1.5 !important;
    font-family: var(--tvx-font) !important;
    color: var(--tvx-text) !important;
    background: #ffffff !important;
    transition: all 0.2s ease !important;
}

.tvx-input::placeholder {
    color: #475569 !important; /* AAA: 7:1 sobre blanco */
    opacity: 1 !important;
}

.tvx-input:focus {
    border-color: var(--tvx-border-focus) !important;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12) !important;
    outline: none !important;
}

.tvx-input:focus-visible {
    outline: 2px solid var(--tvx-accent) !important;
    outline-offset: 2px !important;
}

.tvx-error {
    color: var(--tvx-danger);
    font-size: 0.75rem;
    font-weight: var(--tvx-font-small);
    margin-top: 0.25rem;
}

/* ============================================================
   👁️ PASSWORD TOGGLE - UX Premium Senior Expert
   ⚡ SOLUCIÓN ALINEACIÓN: Campos username y password tienen misma anchura visual
   ============================================================ */

.tvx-password-container {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    /* Importante: Mantener misma anchura que campo normal */
}

.tvx-input--password {
    /* ✅ SOLUCIÓN CRÍTICA: Compensar espacio del toggle para mantener anchura visual idéntica */
    width: 100% !important;
    padding-left: 1.25rem !important; /* Idéntico al campo normal */
    padding-right: 4rem !important; /* Espacio para el botón toggle */
    box-sizing: border-box !important; /* Crucial para cálculo correcto de anchura */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ✅ SOLUCIÓN: Asegurar que el campo normal mantenga las mismas propiedades de box-sizing */
.tvx-input:not(.tvx-input--password) {
    box-sizing: border-box !important;
    width: 100% !important;
}

.tvx-password-toggle {
    position: absolute !important;
    right: 0.75rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0.5rem !important;
    border-radius: 6px !important;
    color: var(--tvx-text-light) !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
    width: 40px !important;
    height: 40px !important;
}

.tvx-password-toggle:hover {
    background: rgba(16, 185, 129, 0.08) !important;
    color: var(--tvx-accent) !important;
}

.tvx-password-toggle:active {
    transform: translateY(-50%) scale(0.95) !important;
}

.tvx-password-toggle:focus {
    outline: 2px solid var(--tvx-accent) !important;
    outline-offset: 2px !important;
}

/* SVG animations - Iconos más intuitivos y claros */
.tvx-password-toggle svg {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    width: 24px !important; /* Tamaño más grande para mejor visibilidad */
    height: 24px !important;
    opacity: 0.8 !important;
}

.tvx-password-toggle:hover svg {
    transform: scale(1.15) !important; /* Más zoom en hover */
    opacity: 1 !important;
}

/* Animación específica para el cambio de estado */
.tvx-password-toggle svg path,
.tvx-password-toggle svg circle {
    transition: all 0.25s ease !important;
}

/* Estado cuando el password está visible - Feedback visual claro */
.tvx-password-toggle[data-visible="true"] {
    color: var(--tvx-accent) !important;
    opacity: 1 !important;
    background: rgba(31, 122, 82, 0.08) !important;
    box-shadow: 0 2px 8px rgba(31, 122, 82, 0.12) !important;
}

/* Mejor indicación visual cuando password está visible */
.tvx-password-toggle[data-visible="true"] svg {
    opacity: 1 !important;
    filter: drop-shadow(0 1px 2px rgba(31, 122, 82, 0.2)) !important;
}

/* Pulso sutil para indicar estado activo */
.tvx-password-toggle[data-visible="true"]:hover {
    animation: subtle-pulse 2s infinite !important;
}

@keyframes subtle-pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(31, 122, 82, 0.25);
    }
    50% {
        box-shadow: 0 4px 16px rgba(31, 122, 82, 0.35);
    }
}

/* Animación suave para el input cuando cambia de tipo */
.tvx-input--password:focus {
    border-color: var(--tvx-accent) !important;
    background: rgba(255, 255, 255, 1) !important;
    box-shadow:
        0 0 0 4px rgba(31, 122, 82, 0.12),
        0 4px 12px rgba(31, 122, 82, 0.08) !important;
    outline: none !important;
    transform: translateY(-1px) !important;
}

/* Tooltip visual mejorado */
.tvx-password-toggle::after {
    content: attr(aria-label);
    position: absolute;
    bottom: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--tvx-text);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 100;
}

.tvx-password-toggle:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* Mejoras adicionales para el contenedor cuando está activo */
.tvx-password-container:focus-within {
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}

.tvx-password-container:focus-within .tvx-password-toggle {
    opacity: 1 !important;
    color: var(--tvx-accent) !important;
}

/* Animación sutil para el icono cuando cambia */
@keyframes eyeToggle {
    0% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(0.9); }
    100% { transform: translateY(-50%) scale(1); }
}

.tvx-password-toggle.toggling {
    animation: eyeToggle 0.2s ease;
}

/* Mejora visual para dispositivos móviles */
@media (max-width: 768px) {
    .tvx-password-toggle {
        width: 48px !important;
        height: 48px !important;
        right: 0.5rem !important;
    }

    .tvx-input--password {
        padding-right: 4.5rem !important;
    }

    .tvx-password-toggle svg {
        width: 24px !important;
        height: 24px !important;
    }

    /* Desactivar tooltip en móviles */
    .tvx-password-toggle::after {
        display: none;
    }
}

/* ══════════════════════════════════════════════════════════
   BOTONES PRIMARIOS - Colores claros (Light Theme)
   ══════════════════════════════════════════════════════════ */
.tvx-btn--primary {
    height: 56px !important;
    background: var(--tvx-accent) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    font-family: var(--tvx-font) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2) !important;
}

/* Variante Light - Colores claros AAA Contrast */
.tvx-btn--primary.tvx-btn--light {
    background: #d1fae5 !important; /* emerald-200 */
    color: #065f46 !important; /* emerald-800 - AAA 7.2:1 */
    border: 1px solid #a7f3d0 !important; /* emerald-300 */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.tvx-btn--primary.tvx-btn--light:hover {
    background: #a7f3d0 !important; /* emerald-300 */
    color: #065f46 !important; /* emerald-800 mantiene AAA */
    border-color: #6ee7b7 !important; /* emerald-400 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;
}

.tvx-btn--primary.tvx-btn--light:focus-visible {
    outline: 2px solid #047857 !important; /* AAA outline */
    outline-offset: 2px !important;
}

.tvx-btn--primary:hover {
    background: var(--tvx-accent-hover) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}

.tvx-btn--primary:active {
    transform: scale(0.98) !important;
}

.tvx-btn--primary:disabled,
.tvx-btn--primary.tvx-btn--light:disabled {
    background: #f3f4f6 !important; /* gray-100 */
    color: #9ca3af !important; /* gray-400 */
    border-color: #e5e7eb !important; /* gray-200 */
    cursor: not-allowed !important;
    box-shadow: none !important;
    opacity: 0.6 !important;
}

/* ══════════════════════════════════════════════════════════
   BOTÓN SECUNDARIO - Estilo Neutro (Gris) para "Volver/Cancelar"
   - Intuitivo: No compite con la acción principal
   - Alto contraste: Slate-900 sobre Slate-50
   ══════════════════════════════════════════════════════════ */
.tvx-btn--secondary {
    min-height: 48px !important;
    height: 48px !important;
    background: #f8fafc !important; /* slate-50 */
    color: #0f172a !important; /* slate-900 */
    border: 1px solid #cbd5e1 !important; /* slate-300 */
    border-radius: 8px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    font-family: var(--tvx-font) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    width: 100% !important;
}

.tvx-btn--secondary:hover {
    background: #f1f5f9 !important; /* slate-100 */
    border-color: #94a3b8 !important; /* slate-400 */
    color: #0f172a !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.tvx-btn--secondary:focus-visible {
    outline: 2px solid #0f172a !important;
    outline-offset: 2px !important;
}

.tvx-btn--secondary:active {
    transform: scale(0.98) !important;
    background: #e2e8f0 !important; /* slate-200 */
}

/* Desactivar estilos "light" antiguos para secondary si existen */
.tvx-btn--secondary.tvx-btn--light {
    background: #f8fafc !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

.tvx-btn--secondary:disabled,
.tvx-btn--secondary.tvx-btn--light:disabled {
    background: #f9fafb !important; /* gray-50 */
    border-color: #e5e7eb !important; /* gray-200 */
    color: #9ca3af !important; /* gray-400 */
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

.tvx-link {
    color: var(--tvx-accent);
    text-decoration: none;
    font-size: 1rem !important; /* Más legible - 16px */
    font-weight: 500 !important; /* Más prominente */
    font-family: var(--tvx-font) !important;
    text-align: center;
    padding: 0.875rem 1rem !important; /* Mejor padding */
    border-radius: 12px;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

.tvx-link:hover {
    color: var(--tvx-accent-2) !important;
    background: rgba(31, 122, 82, 0.08) !important; /* Más visible */
    transform: translateY(-2px) !important; /* Más movimiento */
    text-decoration: none !important;
}

/* ══════════════════════════════════════════════════════════
   ANIMACIONES - Loading Spinner
   ══════════════════════════════════════════════════════════ */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Respeto de prefers-reduced-motion para animaciones */
@media (prefers-reduced-motion: reduce) {
    @keyframes spin {
        from {
            transform: rotate(0deg);
        }
        to {
            transform: rotate(360deg);
        }
    }

    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   📋 FOOTER DEL CARD - Selector de Idioma UX Intuitivo
   ============================================================ */

.tvx-card__footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(31, 122, 82, 0.1);
}

.tvx-lang-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tvx-lang-label {
    font-size: 0.875rem;
    font-weight: var(--tvx-font-small);
    color: var(--tvx-muted);
    margin: 0;
}

.tvx-lang-dropdown-footer {
    min-width: 160px !important;
    max-width: 200px !important;
    background: #ffffff !important;
    border: 1px solid var(--tvx-border) !important;
    border-radius: 8px !important;
    font-family: var(--tvx-font) !important;
    color: var(--tvx-text) !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 0.75rem !important;
    gap: 0.5rem !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
}

.tvx-lang-dropdown-footer:hover {
    border-color: var(--tvx-accent) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.tvx-lang-item-footer {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.5rem 0.75rem !important;
    font-family: var(--tvx-font) !important;
    font-size: 0.875rem !important;
    font-weight: 400 !important;
    color: var(--tvx-text) !important;
    transition: all 0.2s ease !important;
    border-radius: 6px !important;
    margin: 0.1rem !important;
}

.tvx-lang-item-footer:hover {
    background: rgba(16, 185, 129, 0.08) !important;
    color: var(--tvx-accent) !important;
}

/* Flag small variant for footer */
.tvx-flag-footer {
    width: 18px !important;
    height: 12px !important;
    object-fit: cover !important;
    border-radius: 2px !important;
    display: inline-block !important;
}

/* Compact value shown inside dropdown when closed */
.tvx-lang-value-footer {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.tvx-lang-code {
    font-size: 0.85rem !important; /* 14px approx */
    font-weight: 600 !important;
    color: var(--tvx-accent) !important;
}

/* Responsive: make footer language stack neatly on narrow screens */
@media (max-width: 480px) {
    .tvx-lang-footer {
        justify-content: center;
        gap: 0.5rem;
    }
    .tvx-lang-dropdown-footer {
        min-width: 90px !important;
        max-width: 110px !important;
        height: 34px !important;
        font-size: 12px !important;
    }
}

.tvx-flag-footer {
    width: 18px !important; /* Más pequeñas en footer */
    height: 14px !important;
    border-radius: 3px !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
    box-shadow:
        0 1px 6px rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    transition: all 0.3s ease !important;
}

/* ============================================================
   🌐 SELECTOR DE IDIOMAS COMPACTO PREMIUM - Senior UX/UI Design
   ============================================================ */

.tvx-lang {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 100;
}

.tvx-lang-dropdown {
    min-width: 140px !important; /* Más compacto */
    max-width: 160px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(31, 122, 82, 0.15) !important;
    border-radius: 12px !important;
    font-family: var(--tvx-font) !important;
    color: var(--tvx-text) !important;
    height: 44px !important; /* Más compacto */
    display: flex !important;
    align-items: center !important;
    padding: 0 1rem !important; /* Menos padding */
    gap: 0.5rem !important;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.06),
        0 2px 8px rgba(31, 122, 82, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    position: relative !important;
    overflow: hidden !important;
    font-size: 14px !important; /* Texto más pequeño */
    font-weight: 500 !important;
}

.tvx-lang-dropdown::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(31, 122, 82, 0.08), transparent);
    transition: left 0.5s ease;
}

.tvx-lang-dropdown:hover {
    border-color: var(--tvx-accent) !important;
    background: rgba(255, 255, 255, 1) !important;
    transform: translateY(-2px) !important;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.12),
        0 8px 24px rgba(31, 122, 82, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 1) !important;
}

.tvx-lang-dropdown:hover::before {
    left: 100%;
}

.tvx-lang-dropdown:focus,
.tvx-lang-dropdown:focus-within {
    border-color: var(--tvx-accent) !important;
    box-shadow:
        0 0 0 4px rgba(31, 122, 82, 0.15),
        0 12px 40px rgba(0, 0, 0, 0.12) !important;
    outline: none !important;
    transform: translateY(-2px) !important;
}

.tvx-lang-item {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important; /* Menor gap */
    padding: 0.75rem 1rem !important; /* Menos padding */
    font-family: var(--tvx-font) !important;
    font-size: 14px !important; /* Texto más pequeño */
    font-weight: 500 !important;
    color: var(--tvx-text) !important;
    transition: all 0.3s ease !important;
    border-radius: 8px !important; /* Menos redondeado */
    margin: 0.15rem !important; /* Menos margen */
    position: relative !important;
    overflow: hidden !important;
    min-height: 40px !important; /* Más compacto */
}

.tvx-lang-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(31, 122, 82, 0.1), transparent);
    transition: left 0.3s ease;
}

.tvx-lang-item:hover {
    background: linear-gradient(135deg, rgba(31, 122, 82, 0.08), rgba(31, 122, 82, 0.05)) !important;
    color: var(--tvx-accent) !important;
    transform: translateX(3px) !important; /* Menos movimiento */
}

.tvx-lang-item:hover::before {
    left: 100%;
}

.tvx-flag {
    width: 24px !important; /* Más pequeñas */
    height: 18px !important; /* Más pequeñas */
    border-radius: 4px !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.12),
        0 1px 4px rgba(0, 0, 0, 0.08) !important; /* Sombras más suaves */
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    transition: all 0.3s ease !important;
}

.tvx-lang-item:hover .tvx-flag {
    transform: scale(1.05) !important; /* Menos escalado */
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.15),
        0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

/* Radzen Dropdown overrides específicos para idiomas */
.rz-dropdown {
    width: 100% !important;
}

.rz-dropdown-panel {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(31, 122, 82, 0.12) !important;
    border-radius: 12px !important;
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.12),
        0 4px 16px rgba(31, 122, 82, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    margin-top: 6px !important;
    padding: 0.25rem !important; /* Menos padding para compacto */
    animation: dropdownSlideIn 0.25s ease-out !important;
    min-width: 140px !important; /* Consistente con dropdown */
}

@keyframes dropdownSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.rz-dropdown-item {
    padding: 0 !important;
    border: none !important;
    border-radius: 8px !important; /* Más pequeño */
    margin: 0.1rem !important; /* Menos margen */
    overflow: hidden !important;
}

.rz-dropdown-item:hover {
    background: transparent !important;
}

.rz-dropdown-item.rz-state-highlight {
    background: linear-gradient(135deg, rgba(31, 122, 82, 0.12), rgba(31, 122, 82, 0.08)) !important;
    color: var(--tvx-accent) !important;
}

/* Indicador de selección actual mejorado - Compacto */
.tvx-lang-dropdown .rz-dropdown-label {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important; /* Menos gap para compacto */
    font-weight: 500 !important;
    color: var(--tvx-text) !important;
    padding: 0.25rem !important; /* Menos padding */
    font-size: 14px !important; /* Consistente con el tamaño */
}

/* Icono dropdown personalizado - Optimizado */
.tvx-lang-dropdown .rz-dropdown-trigger {
    border: none !important;
    background: transparent !important;
    color: var(--tvx-accent) !important;
    transition: all 0.2s ease !important;
    padding: 0.25rem !important; /* Más compacto */
}

.tvx-lang-dropdown:hover .rz-dropdown-trigger {
    color: var(--tvx-accent-2) !important;
    transform: scale(1.05) !important; /* Menos escalado */
}

/* ============================================================
   🌟 HERO SECTION - Columna DERECHA
   ============================================================ */

.tvx-hero {
    position: relative;
    background: linear-gradient(180deg, #F8FAFC 0%, #ECFDF5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(32px, 8vw, 64px);
    color: #0F172A;
    min-height: 100vh;
    overflow: hidden;
}

.tvx-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(0, 140, 69, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.tvx-hero__content {
    text-align: center;
    max-width: 600px;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* ============================================================
   LOGO - Clean PNG Display
   ============================================================ */

.tvx-hero__logo {
    width: 96px;
    height: 96px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tvx-hero__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.95;
}

.tvx-hero__title {
    font-size: clamp(2rem, 4.5vw, 2.5rem);
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
    color: #0F172A;
    line-height: 1.1;
}

.tvx-hero__subtitle {
    font-size: clamp(0.9375rem, 2vw, 1.0625rem);
    font-weight: 400;
    margin: 0;
    color: #475569;
    line-height: 1.5;
    letter-spacing: 0.01em;
}

/* Grid de Features - Diseño Limpio */
.tvx-features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1rem, 2.5vw, 1.25rem);
    margin-top: clamp(2rem, 4vw, 3rem);
}

/* ══════════════════════════════════════════════════════════
   BENEFIT CARDS - Rediseño Senior UX/UI | WCAG 2.2 AA
   - Accesibles con teclado (tabindex="0")
   - Focus visible con anillo de alto contraste (3:1 ratio)
   - Hover con elevación sutil (sin movimiento lateral)
   - Transiciones ≤ 200ms (no invasivas)
   - Soporte prefers-reduced-motion
   ══════════════════════════════════════════════════════════ */

.tvx-benefit-card {
    cursor: default;
    outline: none;
}

/* Estado Hover - Elevación sutil y cambio de fondo */
.tvx-benefit-card:hover {
    background: rgba(16, 185, 129, 0.06) !important;
    border-color: rgba(16, 185, 129, 0.18) !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

/* Estado Focus - Anillo de alto contraste para navegación por teclado */
.tvx-benefit-card:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
    background: rgba(16, 185, 129, 0.06) !important;
    border-color: #10b981 !important;
}

/* Animación del badge del ícono en hover */
.tvx-benefit-card:hover > div[aria-hidden="true"] {
    background: rgba(16, 185, 129, 0.2) !important;
    transform: scale(1.05);
}

/* Respeto de prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .tvx-benefit-card,
    .tvx-benefit-card > * {
        transition: none !important;
        animation: none !important;
    }

    .tvx-benefit-card:hover > div[aria-hidden="true"] {
        transform: none !important;
    }
}

/* Compatibilidad con estilos legacy (deprecated) */
.tvx-feature {
    background: rgba(255,255,255,0.92);
    border: none;
    border-left: 3px solid #10b981;
    border-radius: 8px;
    padding: 1.25rem;
    text-align: left;
    transition: all 0.2s ease;
}

.tvx-feature:hover {
    background: rgba(16, 185, 129, 0.05);
    transform: translateX(4px);
}

.tvx-feature__icon {
    width: 40px;
    height: 40px;
    background: rgba(16, 185, 129, 0.12);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    color: #10b981;
    flex-shrink: 0;
}

.tvx-feature__title {
    font-size: clamp(0.9375rem, 2vw, 1rem);
    font-weight: 600;
    margin: 0 0 0.375rem 0;
    color: #0F172A;
    letter-spacing: -0.01em;
}

.tvx-feature__desc {
    font-size: clamp(0.8125rem, 1.8vw, 0.875rem);
    font-weight: 400;
    margin: 0;
    color: #475569;
    line-height: 1.5;
}

/* ============================================================
   📱 RESPONSIVE DESIGN - AAA Accessibility Standards
   Mobile-First | Clean | Professional
   ============================================================ */

/* ══════════════════════════════════════════════════════════
   📱 RESPONSIVE DESIGN - Senior UX/UI | Mobile-First
   Breakpoints: 320px → 768px → 992px → 1280px
   ══════════════════════════════════════════════════════════ */

/* Desktop Large (≥ 1280px) - Split equilibrado 50/50 */
@media (min-width: 1280px) {
    .tvx-login-grid {
        grid-template-columns: 1fr 1fr;
    }

    .tvx-card {
        max-width: 480px;
    }

    .tvx-hero__logo {
        width: 80px;
        height: 80px;
    }

    /* Hero ocupa toda la altura, centrado verticalmente */
    .tvx-hero {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Ancho máximo del contenido hero para evitar columnas muy anchas */
    .tvx-hero__content {
        max-width: 520px;
    }
}

/* Desktop Medium (992px - 1279px) - Split compacto */
@media (max-width: 1279px) and (min-width: 992px) {
    .tvx-login-grid {
        grid-template-columns: 1fr 1fr;
    }

    .tvx-card {
        max-width: 420px;
        padding: 2.5rem 2rem;
    }

    .tvx-hero__logo {
        width: 72px;
        height: 72px;
    }

    .tvx-hero {
        min-height: 100vh;
        padding: 2rem 1.5rem;
    }

    .tvx-hero__content {
        max-width: 480px;
    }
}

/* Tablet Portrait (768px - 991px) - Stacked: Login arriba, Hero abajo */
@media (max-width: 991px) and (min-width: 768px) {
    .tvx-login-grid {
        grid-template-columns: 1fr;
        min-height: 100vh;
    }

    /* Login primero (prioridad en mobile) */
    .tvx-login-section {
        padding: 2rem 1.5rem;
        order: 1;
    }

    /* Hero segundo (beneficios complementarios) */
    .tvx-hero {
        min-height: auto;
        padding: 2rem 1.5rem 3rem;
        order: 2;
    }

    .tvx-hero__logo {
        width: 64px;
        height: 64px;
        margin-bottom: 12px;
    }

    /* Reducir espacio entre secciones en tablet */
    .tvx-hero header {
        margin-bottom: 32px !important;
    }

    .tvx-hero ul[role="list"] {
        margin-bottom: 32px !important;
    }
}

/* Mobile (< 768px) - Login priorizado, Hero compacto o colapsable */
@media (max-width: 767px) {
    .tvx-login-grid {
        grid-template-columns: 1fr;
    }

    /* Login primero (prioridad formulario en mobile) */
    .tvx-login-section {
        padding: 1.5rem 1rem;
        min-height: auto;
        order: 1;
    }

    .tvx-card {
        max-width: 100%;
        margin: 0 auto;
        padding: 2rem 1.5rem;
    }

    /* Hero compacto: solo logo + H1 + 3 bullets */
    .tvx-hero {
        min-height: auto;
        padding: 2rem 1rem;
        order: 2;
    }

    .tvx-hero__logo {
        width: 56px;
        height: 56px;
        margin-bottom: 12px;
    }

    .tvx-hero header {
        margin-bottom: 24px !important;
    }

    /* Beneficios en 1 columna, más compactos */
    .tvx-hero ul[role="list"] {
        gap: 12px !important;
        margin-bottom: 24px !important;
    }

    .tvx-benefit-card {
        padding: 10px !important;
        gap: 12px !important;
    }

    .tvx-benefit-card > div[aria-hidden="true"] {
        width: 40px !important;
        height: 40px !important;
    }

    .tvx-benefit-card h2 {
        font-size: 0.9375rem !important;
    }

    .tvx-benefit-card p {
        font-size: 0.8125rem !important;
    }

    /* KPIs en 1 fila scrollable o 2 filas */
    .tvx-hero dl {
        gap: 12px !important;
        grid-template-columns: repeat(3, 1fr);
    }

    .tvx-hero dt {
        font-size: 1.25rem !important;
    }

    .tvx-hero dd {
        font-size: 0.6875rem !important;
    }
}

/* Mobile Small (320px - 480px) - Mínimo viable */
@media (max-width: 480px) {
    .tvx-login-section {
        padding: 1rem 0.75rem;
    }

    .tvx-card {
        padding: 1.5rem 1rem;
        border-radius: 8px;
    }

    .tvx-card__title {
        font-size: 1.5rem;
    }

    .tvx-card__hint {
        font-size: 0.9375rem;
    }

    .tvx-hero__logo {
        width: 100px;
        height: 100px;
        margin-bottom: 1.25rem;
    }

    .tvx-hero__title {
        font-size: 2rem;
    }

    .tvx-hero__subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .tvx-features-grid {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .tvx-feature {
        padding: 1rem;
    }

    .tvx-feature__title {
        font-size: 0.9375rem;
    }

    .tvx-feature__desc {
        font-size: 0.8125rem;
    }

    .tvx-input {
        height: 52px !important;
        font-size: 1rem !important;
    }

    .tvx-btn--primary {
        height: 52px !important;
        font-size: 0.9375rem !important;
    }
}

/* Mobile Small (320px - 480px) - Compact & Touch-Friendly */
@media (max-width: 480px) {
    .tvx-hero {
        padding: 1.25rem 1rem;
    }

    .tvx-login-section {
        padding: 1.25rem 1rem;
    }

    .tvx-card {
        padding: 1.25rem 1rem;
        border-radius: 8px;
    }

    .tvx-card__title {
        font-size: 1.375rem;
    }

    .tvx-card__hint {
        font-size: 0.875rem;
    }

    .tvx-hero__logo {
        width: 80px;
        height: 80px;
        margin-bottom: 1rem;
    }

    .tvx-hero__title {
        font-size: 1.75rem;
    }

    .tvx-hero__subtitle {
        font-size: 0.9375rem;
    }

    .tvx-feature {
        padding: 0.875rem;
    }

    .tvx-feature__icon {
        width: 36px;
        height: 36px;
    }

    .tvx-input {
        height: 48px !important;
        font-size: 1rem !important;
        padding: 0 0.875rem !important;
    }

    .tvx-btn--primary {
        height: 48px !important;
        font-size: 0.9375rem !important;
    }

    .tvx-lang-dropdown-footer {
        height: 40px !important;
        font-size: 0.8125rem !important;
    }

    .tvx-hero__logo img {
        width: 56px !important;
        height: 56px !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .tvx-input {
        border-width: 3px !important;
    }

    .tvx-btn--primary {
        border: 3px solid var(--color-primary-700, #085F45) !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
