﻿:root {
    --primary: #d90429; /* Rojo Servica */
    --dark: #1a1a1a;
    --gray: #f4f4f9;
    --text: #2d3436;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    color: var(--text);
}

.login-screen {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    height: 100vh;
}

/* --- ESTILO DE LA IMAGEN (Lado Izquierdo) --- */
.login-visual {
    position: relative;
    background-color: #000;
    display: flex;
    align-items: flex-end;
    padding: 60px;
}

.bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6; /* Controla la opacidad general de la imagen */
}

.visual-overlay {
    position: absolute;
    inset: 0;
    /* Degradado de negro a transparente para que el texto resalte */
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
    z-index: 1;
}

.visual-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 500px;
}

.main-logo {
    max-width: 160px;
    margin-bottom: 30px;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}

.visual-content h1 {
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

/* --- ESTILO DEL FORMULARIO (Lado Derecho) --- */
.login-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 40px;
}

.form-wrapper {
    width: 100%;
    max-width: 380px;
}

.custom-input-group {
    margin-bottom: 20px;
}

    .custom-input-group label {
        display: block;
        font-weight: 600;
        margin-bottom: 8px;
        font-size: 0.9rem;
    }

.modern-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: var(--gray);
    transition: all 0.3s ease;
}

    .modern-input:focus {
        outline: none;
        border-color: var(--primary);
        background: #fff;
        box-shadow: 0 0 0 4px rgba(217, 4, 41, 0.1);
    }

.btn-primary-modern {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    margin-top: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

    .btn-primary-modern:hover {
        background: #b30322;
        transform: translateY(-2px);
    }

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Loader */
.loader-overlay {
    position: fixed;
    inset: 0;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.4s;
}

/* Responsividad */
@media (max-width: 992px) {
    .login-screen {
        grid-template-columns: 1fr;
    }

    .login-visual {
        display: none;
    }
    /* En móviles ocultamos la imagen pesada */
}

/* Estilo para el logo dentro del formulario */
.form-logo {
    max-width: 200px; /* Ajusta este tamaño según prefieras */
    height: auto;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
}

.form-wrapper header {
    align-items: center; /* Centra el logo y los textos horizontalmente */
}

/* Opcional: Centrar solo en móviles para mejor UX */
@media (max-width: 992px) {
    .form-logo {
        margin-left: auto;
        margin-right: auto;
    }

    .form-wrapper header {
        text-align: center;
    }
}

/* Aseguramos que el contenido visual izquierdo no quede vacío visualmente */
.visual-content h1 {
    font-size: 3rem;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Animación de entrada suave */
.form-wrapper {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* Estilo para los inputs de contraseña al ser validados */
.modern-input[type="password"] {
    letter-spacing: 0.1em; /* Hace que los puntitos se vean más elegantes */
}

/* Contenedor del componente OTP para que se centre y tenga aire */
.netui-container-custom {
    padding: 20px;
    background: #fdfdfd;
    border-radius: 12px;
    border: 1px solid #eee;
    margin-bottom: 20px;
}

/* Ajuste sutil a los inputs de NetUI si es necesario */
.NetUI-otp input {
    border-radius: 8px !important;
    border: 1px solid #ddd !important;
    font-weight: 700 !important;
    transition: all 0.3s ease !important;
}

    .NetUI-otp input:focus {
        border-color: var(--primary) !important;
        box-shadow: 0 0 0 4px rgba(217, 4, 41, 0.1) !important;
        outline: none !important;
    }

.alert-danger {
    background-color: rgba(217, 4, 41, 0.1);
    border: 1px solid rgba(217, 4, 41, 0.2);
    color: #d90429;
    border-radius: 8px;
    font-size: 0.85rem;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    20%, 60% {
        transform: translateX(-5px);
    }

    40%, 80% {
        transform: translateX(5px);
    }
}
