﻿html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    width: 100%;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(180deg, #f4f8fb 0%, #eef4f8 100%);
    color: #22313f;
}

* {
    box-sizing: border-box;
}

.auth-page {
    width: 100%;
    min-height: 100vh;
    padding: 24px;
}

.auth-shell {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 48px);
    background: rgba(255, 255, 255, 0.93);
    backdrop-filter: blur(8px);
    border: 1px solid #e1e9ef;
    border-radius: 22px;
    box-shadow: 0 14px 34px rgba(24, 53, 79, 0.08);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.auth-left,
.auth-right {
    position: relative;
    z-index: 1;
}

.auth-left {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 42px;
    background: transparent;
}

.auth-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 42px;
    position: relative;
}

    .auth-right::before {
        content: "";
        position: absolute;
        top: -120px;
        right: -110px;
        bottom: -120px;
        left: 10%;
        background: linear-gradient(180deg, #0d5f96 0%, #0a4f7d 100%);
        border-radius: 42% 0 0 42% / 24% 0 0 28%;
        z-index: 0;
    }

.brand-block {
    max-width: 420px;
    text-align: left;
}

.brand-logo {
    font-size: 72px;
    font-weight: 700;
    line-height: 1;
    color: #a7adb3;
    margin-bottom: 12px;
}

.brand-c {
    color: #0d5f96;
}

.brand-subtitle {
    font-size: 26px;
    font-weight: 700;
    color: #154f79;
    margin-bottom: 18px;
}

.brand-text {
    font-size: 18px;
    line-height: 1.55;
    color: #1d5d88;
    font-weight: 700;
    max-width: 420px;
    margin: 0 0 26px 0;
}

.brand-actions {
    margin-bottom: 40px;
}

.brand-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: #5d6d79;
}

.auth-form-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 390px;
    color: #fff;
}

    .auth-form-card h2 {
        margin: 0 0 8px 0;
        font-size: 32px;
        font-weight: 700;
        color: #ffffff;
    }

.auth-helper {
    margin: 0 0 20px 0;
    font-size: 15px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
}

.message-box {
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 12px;
    font-weight: 700;
}

.error-box-visible {
    border: 1px solid #f1c0c0;
    background: #fff0f0;
    color: #9a2b2b;
}

.success-box-visible {
    border: 1px solid #b8e0c0;
    background: #edf9f0;
    color: #1d6b34;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

    .form-group label {
        font-size: 12px;
        font-weight: 700;
        color: rgba(255, 255, 255, 0.96);
    }

.field-input {
    width: 100%;
    height: 40px;
    border: 1px solid #c9d8e2;
    background: #fff;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 12px;
    color: #22313f;
}

    .field-input:focus {
        outline: none;
        border-color: #6aa8d1;
        box-shadow: 0 0 0 4px rgba(13, 95, 150, 0.10);
    }

.password-wrapper {
    position: relative;
}

    .password-wrapper .field-input {
        padding-right: 66px;
    }

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    border: 0;
    background: #eef7ff;
    color: #0d5f96;
    font-size: 11px;
    font-weight: 700;
    border-radius: 8px;
    padding: 6px 8px;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease;
}

    .password-toggle:hover {
        background: #dfeefb;
    }

.field-validation {
    min-height: 14px;
    font-size: 11px;
    color: #ffd9d9;
    font-weight: 700;
}

.form-actions {
    margin-top: 18px;
}

.primary,
.secondary {
    border: 0;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    padding: 10px 14px;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.primary {
    background: #f3b000;
    color: #fff;
    width: 100%;
    min-height: 40px;
}

    .primary:hover {
        background: #d89d00;
        transform: translateY(-1px);
    }

.secondary {
    background: transparent;
    color: #d89d00;
    border: 1px solid #f3c45d;
    min-width: 150px;
}

    .secondary:hover {
        background: #fff8e7;
        transform: translateY(-1px);
    }

.auth-link-btn {
    min-width: 170px;
}

.auth-submit:disabled {
    opacity: .75;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 1100px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-right::before {
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;
        border-radius: 28px 28px 0 0;
    }

    .auth-left {
        padding-bottom: 10px;
    }

    .auth-right {
        padding-top: 18px;
    }

    .brand-block {
        text-align: center;
    }

    .brand-text {
        margin-left: auto;
        margin-right: auto;
    }

    .brand-footer {
        justify-content: center;
    }
}

@media (max-width: 700px) {
    .auth-page {
        padding: 14px;
    }

    .auth-shell {
        min-height: auto;
    }

    .auth-left,
    .auth-right {
        padding: 28px 20px;
    }

    .brand-logo {
        font-size: 54px;
    }

    .brand-subtitle {
        font-size: 22px;
    }

    .brand-text {
        font-size: 15px;
    }

    .auth-form-card h2 {
        font-size: 26px;
    }
}

/* ===== AJUSTE VISUAL LOGIN - BLOQUE IZQUIERDO ===== */

.brand-block {
    max-width: 520px;
    width: 100%;
}

.brand-logo-wrapper {
    width: 100%;
    margin-bottom: 22px;
}

.brand-logo-img {
    width: 300px !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
}

.brand-subtitle-institucional {
    max-width: 520px;
    margin-top: 0;
    margin-bottom: 22px;
    color: #154f79;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.16;
    letter-spacing: -0.02em;
}

.brand-text {
    max-width: 470px;
    margin: 0 0 26px 0;
    color: #154f79;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.45;
}

.brand-support-text {
    max-width: 470px;
    margin: 0;
    color: #34495e;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.45;
}

    .brand-support-text strong {
        color: #154f79;
        font-weight: 800;
        white-space: nowrap;
    }

/* Ajuste general para que el bloque izquierdo respire mejor */
.auth-left {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 52px;
}

/* Ajuste responsivo */
@media (max-width: 900px) {
    .brand-logo-img {
        width: 240px !important;
    }

    .brand-subtitle-institucional {
        font-size: 22px;
    }

    .brand-text {
        font-size: 16px;
    }

    .brand-support-text {
        font-size: 14px;
    }

    .auth-left {
        padding: 34px 28px;
    }
}