/* ===== RESET ===== */
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

/* ===== BODY ===== */
html, body{
    width:100%;
    min-height:100%;
}

body{
    font-family:'Inter', Arial, sans-serif;
    background:#f1f5f9;
    overflow-x:hidden;
}

/* ===== CONTENEDOR ===== */
.container{
    display:flex;
    min-height:100vh;
    width:100%;
}

/* ===== PANEL FORM ===== */
.form-panel{
    width:50%;
    display:flex;
    justify-content:center;
    align-items:center;
    background:#f1f5f9;
    padding:10px;
}

/* ===== CARD (MÓDULOS) ===== */
.module{
    width:100%;
    max-width:360px;
    background:#ffffff;
    padding:22px;
    border-radius:18px;
    box-shadow:0 8px 22px rgba(0,0,0,0.08);
    display:none;
    animation:fadeIn 0.3s ease;
}

.module.active{
    display:block;
}

/* ===== TITULOS ===== */
.module h2{
    text-align:center;
    color:#2563eb;
    margin-bottom:14px;
    font-size:1.6rem;
}

/* ===== INPUTS ===== */
input{
    width:100%;
    padding:12px;
    margin:6px 0;
    border-radius:10px;
    border:2px solid #e2e8f0;
    font-size:15px;
    background:#f8fafc;
    transition:0.3s;
}

input:focus{
    outline:none;
    border-color:#2563eb;
    background:#ffffff;
    box-shadow:0 0 0 3px rgba(37,99,235,0.12);
}

/* ===== BOTONES ===== */
button{
    width:100%;
    padding:12px;
    margin-top:6px;
    border:none;
    border-radius:10px;
    background:linear-gradient(90deg,#2563eb,#1d4ed8);
    color:white;
    font-weight:600;
    cursor:pointer;
    transition:0.2s;
}

button:hover{
    opacity:0.95;
}

button:active{
    transform:scale(0.97);
}

/* ===== LINKS ===== */
p{
    text-align:center;
    margin-top:6px;
    font-size:14px;
}

p a{
    color:#2563eb;
    text-decoration:none;
    font-weight:600;
}

/* ===== MENSAJES ===== */
#msgRegistro,
#msgLogin,
#msgRecuperar{
    text-align:center;
    font-weight:bold;
    margin-top:8px;
    color:#10b981;
    font-size:13px;
}

/* ===== PANEL DERECHO ===== */
.welcome-panel{
    width:50%;
    background:linear-gradient(135deg,#2563eb,#1e40af);
    color:white;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:20px;
}

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

.welcome-content h1{
    font-size:3.2rem;
    font-weight:800;
    letter-spacing:2px;
    text-shadow:0 0 20px rgba(255,255,255,0.2);
}

.welcome-content .line{
    width:60px;
    height:4px;
    background:white;
    margin:15px auto;
}

.welcome-content p{
    font-size:1.1rem;
    opacity:0.9;
}

/* ===== OCULTAR CÓDIGOS ===== */
#codigoContainer,
#codigoLogin,
#codigoRecuperarContainer{
    display:none;
}

/* ===== ANIMACIÓN ===== */
@keyframes fadeIn{
    from{
        opacity:0;
        transform:translateY(8px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

/* ======================= */
/* 📱 MODO MÓVIL */
/* ======================= */
@media screen and (max-width:768px){

    .container{
        flex-direction:column;
    }

    .welcome-panel{
        display:none !important;
    }

    .form-panel{
        width:100%;
        min-height:100vh;
        padding:12px;
    }

    .module{
        width:100%;
        max-width:100%;
        border-radius:20px;
        padding:18px;
    }

    .module h2{
        font-size:1.4rem;
    }

    input,
    button{
        font-size:15px;
    }
}

/* ======================= */
/* 📱 PEQUEÑAS PANTALLAS */
/* ======================= */
@media screen and (max-width:400px){

    .module{
        padding:16px;
    }

    input{
        padding:11px;
    }

    button{
        padding:11px;
    }
}