@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;600;700&display=swap');

:root {
    --brand-gold: #fccb00;
    --brand-navy: #0d2e5a;
    --brand-cyan: #38bdf8;
    --bg-light: #fffdf5;
    --white: #ffffff;
    --text-main: #0d2e5a;
    --shadow: 0 10px 25px rgba(13, 46, 90, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--brand-gold); 
    background-image: radial-gradient(circle at center, #fdd835 0%, #fbc02d 100%);
    font-family: 'Nunito', sans-serif;
    padding: 20px;
}

.container {
    display: flex;
    width: 900px;
    height: 550px;
    background: var(--white);
    border-radius: 25px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
    border: 8px solid var(--white); 
}

.panel-izquierdo {
    width: 45%;
    background-color: var(--brand-navy); 
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    position: relative;
    background-image: radial-gradient(var(--brand-cyan) 1px, transparent 1px);
    background-size: 20px 20px;
}

.panel-izquierdo img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin-bottom: 20px;
    object-fit: cover;
    background-color: var(--white);
    border: 5px solid var(--brand-gold);
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
}

.panel-izquierdo h1 {
    font-family: 'Fredoka One', cursive;
    font-size: 38px;
    margin-bottom: 10px;
    color: var(--brand-gold);
    text-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}

.panel-izquierdo p {
    font-size: 18px;
    font-weight: 600;
    opacity: 0.9;
}

.panel-derecho {
    width: 55%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--white);
    padding: 50px;
}

.formulario {
    width: 100%;
    max-width: 350px;
}

.formulario h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 32px;
    color: var(--brand-navy);
    text-align: center;
    margin-bottom: 30px;
}

.input-box {
    position: relative;
    margin-bottom: 20px;
}

.input-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--brand-navy); 
    font-size: 20px;
    z-index: 10;
}

.input-box input {
    width: 100%;
    padding: 14px 45px 14px 45px; 
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    font-size: 16px;
    background: #f8fafc;
    transition: all 0.3s;
    font-family: 'Nunito', sans-serif;
    color: var(--brand-navy);
    font-weight: 600;
}

.input-box input:focus {
    border-color: var(--brand-gold);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(252, 203, 0, 0.15);
}

.input-box .toggle-password {
    left: auto;
    right: 15px;
    color: #94a3b8;
    cursor: pointer;
}
.input-box .toggle-password:hover {
    color: var(--brand-navy);
}

.remember-me-box label {
    font-weight: 600;
    color: var(--brand-navy);
}

.forgot-link {
    text-align: right;
    margin-bottom: 25px;
}

.forgot-link a {
    text-decoration: none;
    color: var(--brand-cyan);
    font-size: 14px;
    font-weight: 700;
    transition: color 0.3s;
}

.forgot-link a:hover {
    color: var(--brand-navy);
    text-decoration: underline;
}

.btn_Login {
    width: 100%;
    padding: 14px;
    background: var(--brand-navy); 
    border: 2px solid var(--brand-navy);
    color: var(--white);
    border-radius: 50px;
    cursor: pointer;
    font-size: 18px;
    font-family: 'Fredoka One', cursive;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.btn_Login:hover {
    background: var(--brand-gold); 
    border-color: var(--brand-gold);
    color: var(--brand-navy);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(252, 203, 0, 0.4);
}

.btn_Login:disabled {
    background: #ccc;
    border-color: #ccc;
    color: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#mensaje {
    margin-top: 15px;
    text-align: center;
    font-weight: 700;
    font-size: 0.9em;
    min-height: 20px;
}
.exito { color: #16a34a; }
.error { color: #dc2626; }

.modal {
    display: none; 
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 46, 90, 0.8); 
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background-color: var(--white);
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    border-top: 10px solid var(--brand-gold);
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    font-weight: bold;
    color: #cbd5e1;
    cursor: pointer;
}
.close:hover { color: var(--brand-navy); }

.modal-content h2 {
    font-family: 'Fredoka One';
    color: var(--brand-navy);
    margin-bottom: 10px;
}

.modal-content p {
    color: #64748b;
    margin-bottom: 20px;
}

.modal-content input {
    width: 100%;
    padding: 14px 45px 14px 45px; 
    margin-bottom: 20px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    font-family: 'Nunito';
    font-weight: 600;
    color: var(--brand-navy);
}

.modal-content input:focus {
    border-color: var(--brand-gold);
    outline: none;
    background: var(--white);
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        width: 100%;
        height: auto;
        border: none;
    }

    .panel-izquierdo {
        width: 100%;
        padding: 40px 20px;
        border-bottom-left-radius: 30px;
        border-bottom-right-radius: 30px;
        z-index: 2;
    }

    .panel-derecho {
        width: 100%;
        padding: 40px 20px;
        margin-top: -20px; 
        padding-top: 40px;
        z-index: 1;
    }
    
    .panel-izquierdo h1 { font-size: 30px; }
}

.modal-content .input-box i {
    position: absolute !important;
    top: 15px !important; 
    transform: none !important; 
    bottom: auto !important;
    line-height: 1 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    left: 15px !important;
    z-index: 10;
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

input[type="password"]::-webkit-contacts-auto-fill-button,
input[type="password"]::-webkit-credentials-auto-fill-button {
    visibility: hidden;
    pointer-events: none;
    position: absolute;
    right: 0;
}