﻿:root {
    --rh-blue: #005CBD;
    --rh-blue-dark: #004587;
    --rh-blue-ink: #10395E;
    --rh-green: #00C13A;
    --rh-white: #FFFFFF;
    --rh-canvas: #F3F7FB;
    --rh-text: #21364C;
    --rh-muted: #64748B;
    --rh-border: #D9E4EF;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body.rh-page {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: var(--rh-canvas);
    color: var(--rh-text);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.rh-skip-link {
    position: absolute;
    top: -100px;
    left: 12px;
    z-index: 10;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--rh-white);
    color: var(--rh-blue-dark);
    font-weight: 700;
}

    .rh-skip-link:focus {
        top: 12px;
    }

.rh-topbar {
    background: var(--rh-white);
    border-bottom: 1px solid var(--rh-border);
}

.rh-topbar-inner {
    width: min(1180px, calc(100% - 40px));
    min-height: 90px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.rh-identity {
    display: flex;
    gap: 16px;
    align-items: center;
    min-width: 0;
}

.rh-logo-wrap {
    display: flex;
    flex: 0 0 auto;
    width: 144px;
    height: 62px;
    align-items: center;
    justify-content: center;
}

.rh-logo {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.rh-identity-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

    .rh-identity-copy strong {
        color: var(--rh-blue-ink);
        font-size: .95rem;
    }

    .rh-identity-copy > span {
        color: var(--rh-muted);
        font-size: .76rem;
        line-height: 1.45;
    }

.rh-area-label {
    flex: 0 0 auto;
    border: 1px solid #D5E8FB;
    border-radius: 999px;
    padding: 9px 13px;
    background: #F1F8FF;
    color: var(--rh-blue-dark);
    font-size: .76rem;
    font-weight: 700;
}

.rh-main {
    width: min(1080px, calc(100% - 40px));
    margin: auto;
    padding: 42px 0;
}

.rh-shell {
    display: grid;
    grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr);
    overflow: hidden;
    border: 1px solid #DDE7F1;
    border-radius: 24px;
    background: var(--rh-white);
    box-shadow: 0 24px 75px rgba(26, 62, 104, .10);
}

.rh-intro {
    min-height: 550px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 36px;
    position: relative;
    padding: clamp(30px, 4vw, 56px);
    background: linear-gradient(155deg, var(--rh-blue) 0%, var(--rh-blue-dark) 100%);
    color: var(--rh-white);
    isolation: isolate;
}

    .rh-intro::after {
        content: "";
        position: absolute;
        z-index: -1;
        right: -125px;
        bottom: -145px;
        width: 360px;
        height: 360px;
        border: 1px solid rgba(255, 255, 255, .16);
        border-radius: 50%;
        box-shadow: 0 0 0 42px rgba(255, 255, 255, .035), 0 0 0 95px rgba(255, 255, 255, .025);
    }

.rh-intro-eyebrow {
    display: inline-block;
    margin-bottom: 28px;
    color: #DDF3FF;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .11em;
}

.rh-intro h2 {
    max-width: 370px;
    margin: 0 0 16px;
    color: var(--rh-white);
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 750;
    line-height: 1.15;
    letter-spacing: -.03em;
}

.rh-intro-top > p {
    max-width: 380px;
    margin: 0;
    color: #E2EFFD;
    font-size: .94rem;
    line-height: 1.75;
}

.rh-features {
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.rh-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .92rem;
}

.rh-feature-mark {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .17);
    color: #FFFFFF;
    font-weight: 800;
}

.rh-intro-note {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #DAEAFC;
    font-size: .78rem;
    line-height: 1.5;
}

.rh-note-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: var(--rh-green);
}

.rh-panel {
    padding: clamp(30px, 4.5vw, 58px);
    align-self: center;
}

.rh-step-line {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 24px;
}

.rh-step-number {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #EBF5FF;
    color: var(--rh-blue);
    font-size: .81rem;
    font-weight: 800;
}

.rh-step-caption {
    color: var(--rh-blue-dark);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .09em;
}

.rh-panel-heading {
    margin-bottom: 25px;
}

.rh-access-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 20px;
    border: 1px solid #DCEEFF;
    border-radius: 16px;
    background: #F1F8FF;
    color: var(--rh-blue);
}

    .rh-access-icon svg {
        width: 26px;
        height: 26px;
    }

.rh-panel h1 {
    margin: 0 0 10px;
    color: var(--rh-blue-ink);
    font-size: clamp(1.55rem, 2.4vw, 2.0rem);
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -.02em;
}

.rh-panel-heading > p {
    margin: 0;
    color: var(--rh-muted);
    font-size: .9rem;
    line-height: 1.75;
}

.rh-alert {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 20px;
    padding: 14px 15px;
    border: 1px solid #C9DEF5;
    border-radius: 10px;
    background: #F0F7FF;
    color: #21496F;
    font-size: .86rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

    .rh-alert svg {
        width: 20px;
        height: 20px;
        flex: 0 0 20px;
        margin-top: 2px;
    }

.rh-form {
    display: flex;
    flex-direction: column;
    gap: 19px;
}

.rh-field label {
    display: block;
    margin-bottom: 9px;
    color: var(--rh-text);
    font-size: .87rem;
    font-weight: 700;
}

.rh-field input {
    display: block;
    width: 100%;
    min-height: 52px;
    padding: 12px 15px;
    border: 1px solid #BFCFDF;
    border-radius: 10px;
    background: var(--rh-white);
    color: #142D48;
    font: inherit;
    font-size: 1rem;
    line-height: 1.4;
    transition: border-color .15s ease, box-shadow .15s ease;
}

    .rh-field input::placeholder {
        color: #8190A2;
        opacity: 1;
    }

    .rh-field input:focus {
        outline: none;
        border-color: var(--rh-blue);
        box-shadow: 0 0 0 4px rgba(0, 92, 189, .14);
    }

.rh-field-help {
    margin: 9px 0 0;
    color: var(--rh-muted);
    font-size: .81rem;
    line-height: 1.5;
}

.rh-field input.rh-otp-input {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 750;
    letter-spacing: .34em;
    font-variant-numeric: tabular-nums;
}

.rh-primary-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 13px 18px;
    margin-top: 5px;
    border: 0;
    border-radius: 10px;
    background: var(--rh-blue);
    color: #FFFFFF;
    font: inherit;
    font-size: .94rem;
    font-weight: 750;
    text-align: center;
    cursor: pointer;
    transition: background-color .15s ease, transform .15s ease;
}

    .rh-primary-button:hover {
        background: var(--rh-blue-dark);
    }

    .rh-primary-button:active {
        transform: translateY(1px);
    }

    .rh-primary-button:focus-visible {
        outline: 3px solid var(--rh-green);
        outline-offset: 3px;
    }

    .rh-primary-button svg {
        width: 18px;
        height: 18px;
        flex: 0 0 18px;
    }

.rh-panel-footnote {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid #E3EAF2;
    color: var(--rh-muted);
    font-size: .8rem;
    line-height: 1.6;
}

    .rh-panel-footnote svg {
        width: 18px;
        height: 18px;
        flex: 0 0 18px;
        color: var(--rh-blue);
    }

.rh-footer {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 20px;
    padding: 18px 20px 23px;
    color: var(--rh-muted);
    font-size: .75rem;
    text-align: center;
}

@media (max-width: 840px) {
    .rh-main {
        width: min(620px, calc(100% - 32px));
        padding: 26px 0;
    }

    .rh-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .rh-panel {
        order: 1;
        padding: 36px;
    }

    .rh-intro {
        order: 2;
        min-height: auto;
        gap: 20px;
        padding: 28px 36px;
    }

    .rh-intro-eyebrow {
        margin-bottom: 10px;
    }

    .rh-intro h2 {
        font-size: 1.45rem;
    }

    .rh-intro-top > p {
        font-size: .86rem;
    }

    .rh-features {
        gap: 10px;
    }

    .rh-feature {
        font-size: .82rem;
    }
}

@media (max-width: 575px) {
    .rh-topbar-inner {
        width: calc(100% - 28px);
        min-height: 78px;
        gap: 12px;
    }

    .rh-logo-wrap {
        width: 100px;
        height: 49px;
    }

    .rh-identity {
        gap: 8px;
    }

    .rh-identity-copy strong {
        font-size: .79rem;
    }

    .rh-identity-copy > span {
        font-size: .68rem;
    }

    .rh-area-label {
        display: none;
    }

    .rh-main {
        width: calc(100% - 24px);
        padding: 20px 0 25px;
    }

    .rh-shell {
        border-radius: 18px;
    }

    .rh-panel {
        padding: 27px 22px 31px;
    }

    .rh-intro {
        padding: 25px 22px;
    }

        .rh-intro h2 {
            font-size: 1.3rem;
        }

    .rh-panel-heading > p {
        font-size: .86rem;
    }

    .rh-step-caption {
        font-size: .64rem;
    }

    .rh-footer {
        padding: 8px 12px 20px;
    }
}

@media (max-width: 380px) {
    .rh-identity-copy > span {
        display: none;
    }

    .rh-logo-wrap {
        width: 92px;
    }

    .rh-panel {
        padding: 25px 17px 28px;
    }

    .rh-field input.rh-otp-input {
        letter-spacing: .23em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rh-field input, .rh-primary-button {
        transition: none;
    }

        .rh-primary-button:active {
            transform: none;
        }
}

/* ============================================================
   Ajustes de acceso RR. HH. - mensajes y entrada OTP
   Compatibles con el encabezado/footer del layout compartido.
   ============================================================ */

/* Mensaje informativo (azul): estilo base del aviso. */
.rh-alert--info {
    background: #F0F7FF;
    border-color: #C9DEF5;
    color: #21496F;
}

/* Solicitud de código aceptada (verde). */
.rh-alert--exito {
    background: #ECF9F0;
    border-color: #A8DEC0;
    color: #17633B;
}

/* Código no válido, acceso rechazado u otro error (rojo). */
.rh-alert--error {
    background: #FFF3F2;
    border-color: #F0BCB9;
    color: #A6241B;
}

/* Refuerzo de foco y visualización sin controles numéricos. */
.rh-field input.rh-otp-input {
    appearance: none;
    -moz-appearance: textfield;
}

    .rh-field input.rh-otp-input::-webkit-outer-spin-button,
    .rh-field input.rh-otp-input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

/* Mensaje de validación del código OTP - Acceso RRHH */
.rh-otp-field-error {
    display: block;
    margin: 12px 0 16px;
    padding: 11px 14px;
    color: #b42318;
    background-color: #fff5f4;
    border: 1px solid #f4c7c3;
    border-left: 3px solid #d92d20;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
}

    .rh-otp-field-error[hidden] {
        display: none !important;
    }

.rh-otp-input[aria-invalid="true"] {
    border-color: #d92d20;
}

    .rh-otp-input[aria-invalid="true"]:focus {
        border-color: #d92d20;
        box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.12);
    }
