﻿:root {
    --color-navy: #00196D;
    --color-blue: #3D5EF6;
    --color-sky: #0080D1;
    --color-gold: #FBC458;
    --color-dark: #13222B;
    --color-white: #FFFFFF;
    --color-bg: #F4F6FB;
    --color-border: #E2E8F0;
    --color-success: #38A169;
    --color-warning: #DD6B20;
    --color-danger: #E53E3E;
    --color-muted: #718096;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-6: 24px;
    --space-8: 32px;
    --space-12: 48px;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

/* 
         ===========================================================
         CAPA PANTALLA COMPLETA: 
         Tapa todo el contenido y barras del MasterPage
         =========================================================== 
        */
.login-fullscreen-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1035; /* Tapará el header del Master (1030) pero dejará los modales encima (1040+) */
    background-color: var(--color-navy);
    overflow-y: auto;
    overflow-x: hidden;
}

body, html {
    height: 100%;
    font-family: 'Neue Montreal', 'Inter', sans-serif;
}

.hero-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.glow-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    animation: floatGlow 20s infinite ease-in-out alternate;
}

.shape-blue {
    width: 60vw;
    height: 60vw;
    background: rgba(61, 94, 246, 0.2);
    top: -20%;
    left: -10%;
}

.shape-sky {
    width: 50vw;
    height: 50vw;
    background: rgba(0, 128, 209, 0.15);
    bottom: -20%;
    right: -10%;
    animation-delay: -5s;
}

@keyframes floatGlow {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(5%, 8%) scale(1.1);
    }
}

.main-container {
    position: relative;
    z-index: 1; /* Para que quede encima de las formas brillantes */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
}

.login-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    width: 100%;
    max-width: 1050px;
    align-items: center;
    gap: var(--space-8);
}

.welcome-side {
    color: var(--color-white);
    padding-right: var(--space-6);
    animation: fadeIn 1s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

    .welcome-side .brand-logo {
        max-width: 250px;
        max-height: 120px;
        width: auto;
        height: auto;
        margin-bottom: var(--space-4);
        display: block;
        object-fit: contain;
    }

    .welcome-side h1 {
        font-size: clamp(2.2rem, 4vw, 3.2rem);
        font-weight: 700;
        line-height: 1.15;
        margin-bottom: var(--space-4);
        letter-spacing: -0.5px;
    }

        .welcome-side h1 span {
            color: var(--color-gold);
        }

    .welcome-side p {
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.8);
        max-width: 420px;
        line-height: 1.5;
        margin-bottom: 0;
        font-weight: 400;
    }

.form-side {
    background: var(--color-white);
    padding: var(--space-8) var(--space-8);
    border-radius: var(--radius-lg);
    color: var(--color-dark);
    box-shadow: 0 25px 50px rgba(19, 34, 43, 0.4);
    animation: slideUp 0.8s ease-out;
    width: 100%;
}

.mobile-logo {
    display: none;
    max-width: 220px;
    margin: 0 auto var(--space-6) auto;
    background: linear-gradient(135deg, var(--color-navy), var(--color-blue));
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 20px rgba(0, 25, 109, 0.15);
}

.form-side h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: var(--space-6);
    letter-spacing: -0.5px;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--color-muted);
    display: inline-block;
}

.form-control-custom {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: var(--space-3) var(--space-4);
    width: 100%;
    margin-bottom: var(--space-4);
    font-size: 14px;
    color: var(--color-dark);
    transition: all 0.3s;
}

    .form-control-custom::placeholder {
        color: var(--color-muted);
        opacity: 0.6;
    }

    .form-control-custom:focus {
        outline: none;
        border-color: var(--color-blue);
        box-shadow: 0 0 0 3px rgba(61, 94, 246, 0.15);
    }

.password-wrapper {
    position: relative;
}

    .password-wrapper .form-control-custom {
        padding-right: var(--space-12);
    }

    .password-wrapper .toggle-icon {
        position: absolute;
        right: var(--space-4);
        top: 13px;
        cursor: pointer;
        color: var(--color-muted);
        font-size: 1.2rem;
        transition: color 0.3s ease;
        z-index: 5;
    }

        .password-wrapper .toggle-icon:hover {
            color: var(--color-blue);
        }

.form-check {
    margin-bottom: var(--space-6);
    display: flex;
    align-items: center;
}

    .form-check input[type="checkbox"] {
        margin-right: 8px;
        margin-top: 0;
        cursor: pointer;
    }

.form-check-label {
    font-size: 14px;
    color: var(--color-dark);
    cursor: pointer;
}

.btn-signin {
    background-color: var(--color-blue);
    color: var(--color-white);
    border: none;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s, box-shadow 0.3s;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

    .btn-signin:hover {
        background-color: var(--color-navy);
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(61, 94, 246, 0.25);
        color: white;
    }

.lost-password {
    display: block;
    margin-top: var(--space-4);
    color: var(--color-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: color 0.3s;
}

    .lost-password:hover {
        color: var(--color-navy);
        text-decoration: underline;
    }

.legal-text {
    margin-top: var(--space-6);
    font-size: 12px;
    color: var(--color-muted);
    line-height: 1.5;
    text-align: center;
}

    .legal-text a {
        color: var(--color-blue);
        text-decoration: underline;
        font-weight: 500;
        cursor: pointer;
    }

        .legal-text a:hover {
            color: var(--color-navy);
        }

.failureNotification {
    background: rgba(229, 62, 62, 0.1) !important;
    border-left: 4px solid var(--color-danger) !important;
    color: var(--color-danger) !important;
    padding: var(--space-3) !important;
    margin-bottom: var(--space-6) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border-radius: var(--radius-sm) !important;
    list-style: none;
    display: block;
}

.modal-content {
    border-radius: var(--radius-md);
    border: none;
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg);
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

.modal-title {
    color: var(--color-navy);
    font-weight: 700;
    font-size: 1.1rem;
}

.modal-body {
    font-size: 14px;
    color: var(--color-dark);
    line-height: 1.6;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 992px) {
    .login-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
        gap: var(--space-4);
    }

    .welcome-side {
        display: none;
    }

    .mobile-logo {
        display: block;
    }

    .form-side {
        padding: var(--space-8) var(--space-6);
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: var(--space-4);
    }

    .form-side {
        padding: var(--space-6) var(--space-4);
        border-radius: 16px;
    }

        .form-side h2 {
            font-size: 24px;
            text-align: center;
            margin-bottom: var(--space-6);
        }

    .mobile-logo {
        max-width: 180px;
        margin-bottom: var(--space-4);
        padding: 10px 18px;
    }
}