@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    background: radial-gradient(circle at 15% 20%, rgba(13, 71, 161, 0.4) 0%, transparent 40%),
                radial-gradient(circle at 85% 80%, rgba(3, 85, 7, 0.35) 0%, transparent 45%),
                linear-gradient(135deg, #031427 0%, #072344 45%, #051a33 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Background animated decorative ambient circles */
.bg-glow-1 {
    position: absolute;
    width: 450px;
    height: 450px;
    top: -100px;
    left: -100px;
    background: radial-gradient(circle, rgba(13, 71, 161, 0.3) 0%, rgba(13, 71, 161, 0) 70%);
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
}

.bg-glow-2 {
    position: absolute;
    width: 500px;
    height: 500px;
    bottom: -120px;
    right: -100px;
    background: radial-gradient(circle, rgba(5, 150, 105, 0.25) 0%, rgba(5, 150, 105, 0) 70%);
    border-radius: 50%;
    filter: blur(50px);
    pointer-events: none;
    z-index: 0;
}

/* Main Container Card */
.login-main-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1050px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 25px 60px -15px rgba(0, 10, 30, 0.5), 
                0 0 0 1px rgba(255, 255, 255, 0.2);
    display: flex;
    overflow: hidden;
    min-height: 580px;
    animation: fadeInScale 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(15px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Left Panel - Login Form */
.login-form-panel {
    flex: 1 1 52%;
    padding: 48px 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* Institutional Badge */
.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(13, 71, 161, 0.08);
    color: #0d47a1;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    width: fit-content;
    margin-bottom: 14px;
    border: 1px solid rgba(13, 71, 161, 0.15);
}

.brand-badge i {
    font-size: 14px;
    color: #0d47a1;
}

/* Header Titles */
.login-title {
    font-size: 28px;
    font-weight: 800;
    color: #052546;
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 28px;
    font-weight: 400;
}

/* Input Fields Group */
.form-group-custom {
    margin-bottom: 20px;
    position: relative;
}

.form-label-custom {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-prefix {
    position: absolute;
    left: 16px;
    color: #94a3b8;
    font-size: 16px;
    pointer-events: none;
    transition: color 0.2s ease;
}

.CajaTexto_login,
.input-custom-login {
    width: 100%;
    padding: 13px 16px 13px 44px;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 500;
    color: #0f172a;
    background-color: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.CajaTexto_login:focus,
.input-custom-login:focus {
    background-color: #ffffff;
    border-color: #0d47a1;
    box-shadow: 0 0 0 4px rgba(13, 71, 161, 0.12);
}

.CajaTexto_login:focus + .input-icon-prefix,
.input-icon-wrapper:focus-within .input-icon-prefix {
    color: #0d47a1;
}

.input-password-field {
    padding-right: 46px;
}

.btn-toggle-password {
    position: absolute;
    right: 14px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.btn-toggle-password:hover {
    color: #0d47a1;
}

/* Submit Button */
.btnIngresar_Login,
.btn-login-submit {
    width: 100%;
    padding: 14px 20px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #ffffff;
    background: linear-gradient(135deg, #0d47a1 0%, #0a3578 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 20px -4px rgba(13, 71, 161, 0.4);
    transition: all 0.25s ease;
    margin-top: 24px;
}

.btnIngresar_Login:hover,
.btn-login-submit:hover {
    background: linear-gradient(135deg, #1557bf 0%, #0d47a1 100%);
    box-shadow: 0 12px 24px -4px rgba(13, 71, 161, 0.5);
    transform: translateY(-1.5px);
}

.btnIngresar_Login:active,
.btn-login-submit:active {
    transform: translateY(1px);
    box-shadow: 0 4px 12px -2px rgba(13, 71, 161, 0.4);
}

.btnIngresar_Login:disabled,
.btn-login-submit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

/* Link Forgot Password */
.forgot-password-wrapper {
    text-align: center;
    margin-top: 18px;
}

.Link_Enviar,
.link-forgot-password {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.Link_Enviar:hover,
.link-forgot-password:hover {
    color: #0d47a1;
    text-decoration: underline;
}

/* Alerts and Messages */
#MensajeEnvio {
    margin-top: 18px;
    font-size: 13.5px;
}

#MensajeEnvio .alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    border: none;
    margin-bottom: 0;
}

#MensajeEnvio .alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

#MensajeEnvio .alert-warning {
    background-color: #fffbeb;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

#MensajeEnvio .alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border-left: 4px solid #22c55e;
}

/* Card Bottom Footer */
.login-card-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

/* Right Panel - Hero / Showcase */
.login-showcase-panel {
    flex: 1 1 48%;
    position: relative;
    background: #061d38;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px;
}

.showcase-bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.88;
    filter: brightness(1.02) contrast(1.05) saturate(1.08);
    transition: transform 8s ease;
}

.login-showcase-panel:hover .showcase-bg-image {
    transform: scale(1.04);
}

.showcase-overlay-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg, 
        rgba(3, 18, 38, 0.45) 0%, 
        rgba(4, 24, 52, 0.40) 45%, 
        rgba(2, 14, 30, 0.82) 100%
    );
}

.showcase-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #ffffff;
}

.showcase-top-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(3, 22, 48, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    width: fit-content;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.showcase-mid-info {
    margin: auto 0;
    padding: 20px 0;
}

.showcase-heading {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 12px;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 0, 0, 0.4);
}

.showcase-desc {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 24px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.showcase-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feature-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(4, 20, 44, 0.62);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 10px 14px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: background 0.25s, transform 0.25s, border-color 0.25s;
}

.feature-pill:hover {
    background: rgba(8, 35, 75, 0.75);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateX(4px);
}

.feature-icon-box {
    width: 36px;
    height: 36px;
    background: rgba(13, 71, 161, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #ffffff;
    flex-shrink: 0;
}

.feature-text-main {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
}

.feature-text-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
}

.showcase-footer {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* =========================================================
   SOPORTE PARA PÁGINA DE ENVÍO / RECUPERACIÓN (Page_Enviar.php)
   ========================================================= */
.Contenedor_Envio {
    width: 100%;
    max-width: 460px;
    margin: auto;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 36px 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 10, 30, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.Titulo_Envio {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: #052546;
    text-align: center;
    margin-bottom: 22px;
    letter-spacing: -0.3px;
}

.btnEnviar {
    width: 100%;
    background: linear-gradient(135deg, #0d47a1 0%, #0a3578 100%);
    color: white;
    padding: 13px;
    font-size: 15px;
    font-weight: 700;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 16px;
    transition: all 0.25s ease;
    box-shadow: 0 8px 20px -4px rgba(13, 71, 161, 0.4);
}

.btnEnviar:hover {
    background: linear-gradient(135deg, #1557bf 0%, #0d47a1 100%);
    transform: translateY(-1.5px);
}

/* =========================================================
   RESPONSIVE DESIGN
   ========================================================= */
@media screen and (max-width: 900px) {
    .login-main-wrapper {
        flex-direction: column;
        max-width: 480px;
        min-height: auto;
    }

    .login-form-panel {
        padding: 36px 28px;
    }

    .login-showcase-panel {
        display: none;
    }
}

@media screen and (max-width: 480px) {
    body {
        padding: 12px;
    }

    .login-form-panel {
        padding: 30px 20px;
    }

    .login-title {
        font-size: 24px;
    }

    .brand-badge {
        font-size: 11px;
        padding: 5px 10px;
    }
}