/* ==============================================================
   COLABORADORES IO - LOGIN V2
   Diseño institucional basado en mockup aprobado
   ============================================================== */

:root {
    --cio-blue: #0b2861;
    --cio-blue-dark: #061d4d;
    --cio-blue-deep: #061944;
    --cio-red: #d71132;
    --cio-yellow: #ffd400;
    --cio-white: #ffffff;
    --cio-text: #10224d;
    --cio-muted: #697386;
    --cio-line: #dce2ec;
    --cio-bg: #f4f6fa;
}

.login-v2-body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 82% 8%, rgba(11,40,97,.05), transparent 25%),
        linear-gradient(145deg, #f1f3f7 0%, #fafbfc 50%, #f2f4f8 100%);
    color: var(--cio-text);
}

.login-v2-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 38px 24px;
}

/* UNA SOLA TARJETA, como en el mockup */
.login-v2-shell {
    width: min(1040px, 100%);
    min-height: 650px;
    display: grid;
    grid-template-columns: 46% 54%;
    overflow: hidden;
    border: 1px solid #cfd7e5;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 20px 55px rgba(13, 35, 78, .13);
}

/* ==============================================================
   PANEL IZQUIERDO
   ============================================================== */

.login-v2-brand-panel {
    position: relative;
    overflow: hidden;
    min-height: 650px;
    display: flex;
    flex-direction: column;
    padding: 52px 46px 42px;
    color: #fff;
    background:
        radial-gradient(circle at 50% 38%, rgba(42, 91, 176, .20), transparent 42%),
        linear-gradient(155deg, #06245c 0%, #0b2c6b 54%, #071e4e 100%);
}

/* Sutil textura de luz, no imagen cuadriculada */
.login-v2-brand-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(115deg, transparent 0 72%, rgba(255,255,255,.025) 72% 73%, transparent 73%),
        radial-gradient(circle at 18% 12%, rgba(255,255,255,.06), transparent 22%);
}

.login-v2-logo-box {
    position: relative;
    z-index: 4;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.login-v2-logo {
    display: block;
    width: auto;
    max-width: 245px;
    max-height: 125px;
    object-fit: contain;
    object-position: left center;
}

/* Marca de agua del Sol Ignaciano */
.login-v2-sun {
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 52%;
    width: min(520px, 110%);
    aspect-ratio: 1 / 1;
    transform: translate(-50%, -50%);
    background-image: url("sol_ignaciano.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: .105;
    filter: grayscale(1) brightness(2.3);
    pointer-events: none;
}

/* Si aún no has puesto el PNG, conserva profundidad visual */
.login-v2-sun::after {
    content: "IHS";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255,255,255,.035);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(6rem, 13vw, 11rem);
    font-weight: 700;
}

.login-v2-brand-copy {
    position: relative;
    z-index: 4;
    margin-top: auto;
    margin-bottom: auto;
}

.login-v2-brand-copy h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(2.05rem, 3.4vw, 3.15rem);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.05;
}

.login-v2-brand-copy h1 span {
    color: var(--cio-yellow);
}

.login-v2-brand-copy p {
    margin: 12px 0 0;
    color: rgba(255,255,255,.78);
    font-size: .98rem;
    font-weight: 400;
}

.login-v2-motto {
    position: relative;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
}

.login-v2-motto > span {
    font-size: .73rem;
    font-weight: 500;
    letter-spacing: .42em;
    color: rgba(255,255,255,.82);
}

.login-v2-colorbar {
    width: 192px;
    height: 5px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow: hidden;
    border-radius: 20px;
}

.login-v2-colorbar i:nth-child(1) { background: #22418d; }
.login-v2-colorbar i:nth-child(2) { background: var(--cio-red); }
.login-v2-colorbar i:nth-child(3) { background: var(--cio-yellow); }
.login-v2-colorbar i:nth-child(4) { background: #fff; }

/* ==============================================================
   PANEL DERECHO / FORMULARIO
   ============================================================== */

.login-v2-form-panel {
    min-height: 650px;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.login-v2-form-wrap {
    width: min(390px, calc(100% - 64px));
    margin: auto;
    padding: 52px 0 34px;
}

.login-v2-form-header h2 {
    margin: 0;
    color: var(--cio-blue-dark);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.025em;
}

.login-v2-title-line {
    width: 66px;
    height: 4px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 13px 0 23px;
    overflow: hidden;
    border-radius: 12px;
}

.login-v2-title-line span:nth-child(1) { background: var(--cio-blue); }
.login-v2-title-line span:nth-child(2) { background: var(--cio-red); }
.login-v2-title-line span:nth-child(3) { background: var(--cio-yellow); }

.login-v2-form-header p {
    margin: 0 0 35px;
    color: var(--cio-muted);
    font-size: .86rem;
    line-height: 1.65;
}

.login-v2-alert {
    margin-bottom: 24px;
    border: 0;
    border-radius: 10px;
    font-size: .84rem;
}

.login-v2-field {
    margin-bottom: 27px;
}

.login-v2-field label {
    display: block;
    margin-bottom: 9px;
    color: var(--cio-blue-dark);
    font-size: .78rem;
    font-weight: 750;
}

.login-v2-input {
    min-height: 55px;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid #d8dfe9;
    border-radius: 8px;
    background: #fff;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.login-v2-input:focus-within {
    border-color: #7d91ba;
    box-shadow: 0 0 0 3px rgba(11,40,97,.07);
}

.login-v2-input-icon {
    width: 52px;
    flex: 0 0 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #69758b;
    font-size: 1rem;
}

.login-v2-input input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 0 14px 0 0;
    background: transparent;
    color: var(--cio-text);
    font-size: .92rem;
}

.login-v2-input input::placeholder {
    color: #9aa2b1;
}

.login-v2-submit {
    width: 100%;
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 7px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(100deg, #0c3278 0%, #061d4d 100%);
    font-size: .91rem;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(6,29,77,.18);
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.login-v2-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 11px 24px rgba(6,29,77,.23);
    filter: brightness(1.05);
}

.login-v2-footer {
    min-height: 82px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: auto;
    border-top: 1px solid #edf0f4;
    background: linear-gradient(180deg, #fbfbfc, #f2f4f7);
    color: #7d8490;
    text-align: center;
}

.login-v2-footer span {
    font-size: .72rem;
}

.login-v2-footer small {
    color: #9298a2;
    font-size: .68rem;
}

/* ==============================================================
   RESPONSIVE
   ============================================================== */

@media (max-width: 991.98px) {
    .login-v2-page {
        align-items: flex-start;
        padding: 24px 18px;
    }

    .login-v2-shell {
        grid-template-columns: 42% 58%;
        min-height: 610px;
    }

    .login-v2-brand-panel,
    .login-v2-form-panel {
        min-height: 610px;
    }

    .login-v2-brand-panel {
        padding: 40px 30px 34px;
    }

    .login-v2-logo {
        max-width: 190px;
        max-height: 62px;
    }

    .login-v2-brand-copy h1 {
        font-size: 1.6rem;
    }

    .login-v2-form-wrap {
        width: min(360px, calc(100% - 48px));
    }
}

@media (max-width: 767.98px) {
    .login-v2-page {
        padding: 0;
        background: #fff;
    }

    .login-v2-shell {
        width: 100%;
        min-height: 100vh;
        display: block;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .login-v2-brand-panel {
        min-height: 305px;
        padding: 26px 24px 28px;
    }

    .login-v2-logo-box {
        min-height: 50px;
    }

    .login-v2-logo {
        max-width: 170px;
        max-height: 50px;
    }

    .login-v2-sun {
        width: 340px;
        top: 55%;
        opacity: .09;
    }

    .login-v2-brand-copy {
        margin-top: 50px;
        margin-bottom: 24px;
    }

    .login-v2-brand-copy h1 {
        font-size: 2rem;
    }

    .login-v2-brand-copy p {
        margin-top: 8px;
        font-size: .84rem;
    }

    .login-v2-motto {
        gap: 10px;
    }

    .login-v2-motto > span {
        font-size: .62rem;
        letter-spacing: .34em;
    }

    .login-v2-colorbar {
        width: 145px;
        height: 4px;
    }

    .login-v2-form-panel {
        min-height: calc(100vh - 305px);
    }

    .login-v2-form-wrap {
        width: calc(100% - 42px);
        max-width: 420px;
        padding: 35px 0 38px;
    }

    .login-v2-form-header h2 {
        font-size: 1.7rem;
    }

    .login-v2-form-header p {
        margin-bottom: 27px;
    }

    .login-v2-footer {
        min-height: 70px;
    }
}

@media (max-width: 430px) {
    .login-v2-brand-panel {
        min-height: 275px;
    }

    .login-v2-brand-copy {
        margin-top: 36px;
    }

    .login-v2-brand-copy h1 {
        font-size: 1.75rem;
    }

    .login-v2-sun {
        width: 300px;
    }

    .login-v2-form-panel {
        min-height: calc(100vh - 275px);
    }
}
