*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

:root{
    --verde-oscuro: #1c6c42;
    --verde-claro: #26b268;
    --texto-principal: #1e2a26;
    --texto-secundario: #6b7a75;
    --borde: #e2e6e3;
    --error: #d33f3f;
    --fondo-pagina: #eef4f0;
    --input-bg: #e7e9fb;
    --input-bg-focus: #dcdffb;
}

body{
    background: var(--fondo-pagina);
}

/* Iconos SVG inline (reemplazan la fuente de iconos externa) */
.input-icon,
.toggle-password svg,
.btn-icon,
.feature-item svg,
.footer-note svg{
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.login-page{
    height: 100vh;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow: hidden;
    background:
        radial-gradient(circle at 15% 20%, rgba(38,178,104,0.12), transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(28,108,66,0.12), transparent 40%),
        var(--fondo-pagina);
}

.login-card{
    display: flex;
    width: 100%;
    max-width: 1200px;
    max-height: 92vh;
    min-height: 520px;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px -20px rgba(28,108,66,0.25);
}

/* ---------- Panel izquierdo ---------- */
.brand-panel{
    flex: 1 1 48%;
    background: linear-gradient(160deg, var(--verde-oscuro), var(--verde-claro));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 32px;
    position: relative;
    overflow: hidden;
}

.brand-panel::before{
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    border: 24px solid rgba(255,255,255,0.05);
    border-radius: 6px;
    transform: rotate(20deg);
    top: -90px;
    left: -110px;
}

/* Patrón de puntos decorativo (esquina superior izquierda) */
.bg-dots{
    position: absolute;
    top: 28px;
    left: 28px;
    width: 170px;
    height: 170px;
    background-image: radial-gradient(rgba(255,255,255,0.18) 1.5px, transparent 1.5px);
    background-size: 16px 16px;
    pointer-events: none;
}

/* Cruz/plus decorativa (parte inferior izquierda) */
.bg-plus{
    position: absolute;
    bottom: 40px;
    left: 24px;
    width: 90px;
    height: 90px;
    pointer-events: none;
    opacity: 0.5;
}

.bg-plus::before,
.bg-plus::after{
    content: "";
    position: absolute;
    background: rgba(255,255,255,0.14);
}

.bg-plus::before{
    top: 50%;
    left: 0;
    width: 100%;
    height: 14px;
    transform: translateY(-50%);
    border-radius: 4px;
}

.bg-plus::after{
    left: 50%;
    top: 0;
    width: 14px;
    height: 100%;
    transform: translateX(-50%);
    border-radius: 4px;
}

.brand-content{
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    width: 100%;
}

.brand-title{
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}

.brand-subtitle{
    font-size: 0.95rem;
    font-weight: 300;
    opacity: 0.9;
}

.brand-divider{
    display: block;
    width: 70px;
    height: 3px;
    background: rgba(255,255,255,0.5);
    border-radius: 2px;
    margin: 16px auto;
}

.brand-img{
    max-width: 100%;
    margin: 2px 0;
    filter: drop-shadow(0 12px 20px rgba(0,0,0,0.2));
}

.feature-row{
    display: flex;
    justify-content: space-between;
    gap: 4px;
    margin-top: 14px;
}

.feature-item{
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #fff;
    padding: 0 6px;
    position: relative;
}

.feature-item:not(:first-child)::before{
    content: "";
    position: absolute;
    left: -1px;
    top: 2px;
    bottom: 2px;
    width: 1px;
    background: rgba(255,255,255,0.25);
}

.feature-item i,
.feature-item svg{
    font-size: 22px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Panel derecho ---------- */
.form-panel{
    flex: 1 1 52%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 56px;
}

.form-wrapper{
    width: 100%;
    max-width: 400px;
}

.form-wrapper h2{
    text-align: center;
}

.form-wrapper p{
    text-align: center;
}

.form-title{
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--texto-principal);
    margin-bottom: 4px;
}

.form-subtitle{
    font-size: 0.9rem;
    color: var(--texto-secundario);
    margin-bottom: 22px;
}

.field-group{
    margin-bottom: 16px;
}

.field-group label{
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--texto-principal);
    margin-bottom: 7px;
}

.input-wrapper{
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon{
    position: absolute;
    left: 16px;
    color: var(--texto-secundario);
    font-size: 18px;
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.input-wrapper input{
    width: 100%;
    padding: 13px 16px 13px 44px;
    border: 1.5px solid transparent;
    border-radius: 12px;
    font-size: 0.95rem;
    color: var(--texto-principal);
    background: var(--input-bg);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input-wrapper input::placeholder{
    color: #9aa3c7;
}

.input-wrapper input:focus{
    background: var(--input-bg-focus);
    border-color: var(--verde-claro);
    box-shadow: 0 0 0 3px rgba(38,178,104,0.15);
}

.field-group.has-error input{
    border-color: var(--error);
}

.field-group.has-error input:focus{
    box-shadow: 0 0 0 3px rgba(211,63,63,0.12);
}

.error-msg{
    display: block;
    min-height: 16px;
    font-size: 0.75rem;
    color: var(--error);
    margin-top: 4px;
}

.toggle-password{
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--texto-secundario);
    cursor: pointer;
    font-size: 18px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    padding: 4px;
}

.toggle-password svg{
    width: 18px;
    height: 18px;
}

.toggle-password:hover{
    color: var(--verde-oscuro);
}

.form-options{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.checkbox-wrapper{
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.85rem;
    color: var(--texto-secundario);
    cursor: pointer;
}

.checkbox-wrapper input{
    accent-color: var(--verde-claro);
    width: 16px;
    height: 16px;
}

.forgot-link{
    font-size: 0.85rem;
    color: var(--verde-oscuro);
    text-decoration: none;
    font-weight: 600;
}

.forgot-link:hover{
    text-decoration: underline;
}

.btn-submit{
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(to right, var(--verde-oscuro), var(--verde-claro));
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 10px 24px -6px rgba(28,108,66,0.45);
}

.btn-icon{
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.btn-submit:hover{
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -6px rgba(28,108,66,0.5);
}

.btn-submit:active{
    transform: translateY(0);
}

.btn-spinner{
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.btn-submit.loading .btn-icon,
.btn-submit.loading .btn-text{
    opacity: 0.85;
}

.btn-submit.loading .btn-spinner{
    display: inline-block;
}

@keyframes spin{
    to{ transform: rotate(360deg); }
}

.footer-note{
    text-align: center;
    font-size: 0.8rem;
    color: var(--texto-secundario);
    margin-top: 18px;
    line-height: 1.5;
}

.footer-note i,
.footer-note svg{
    display: block;
    font-size: 18px;
    width: 18px;
    height: 18px;
    margin: 0 auto 6px;
    color: var(--texto-secundario);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px){
    .login-page{
        height: auto;
        min-height: 100vh;
        overflow: auto;
        padding: 20px;
    }
    .login-card{
        flex-direction: column;
        min-height: unset;
        max-height: none;
    }
    .brand-panel{
        padding: 28px 22px;
    }
    .brand-title{
        font-size: 1.7rem;
    }
    .brand-subtitle{
        font-size: 0.9rem;
    }
    .brand-img{
        max-width: 38%;
    }
    .feature-row{
        flex-wrap: wrap;
        row-gap: 14px;
    }
    .feature-item{
        flex: 1 1 30%;
    }
    .feature-item:nth-child(3n+1)::before{
        display: none;
    }
    .form-panel{
        padding: 30px 24px;
    }
    .form-title{
        font-size: 1.5rem;
    }
}

/* Pantallas de poca altura (laptops pequeñas) */
@media (max-height: 700px) and (min-width: 861px){
    .brand-panel{
        padding: 24px 28px;
    }
    .brand-title{
        font-size: 1.6rem;
    }
    .brand-img{
        max-width: 34%;
    }
    .brand-divider{
        margin: 10px auto;
    }
    .feature-row{
        margin-top: 10px;
    }
    .form-panel{
        padding: 24px 48px;
    }
    .form-subtitle{
        margin-bottom: 16px;
    }
    .field-group{
        margin-bottom: 12px;
    }
}