/* Pantalla de acceso de Portal SOL */
:root {
    --login-blue: #2454b8;
    --login-light-blue: #3a7bd5;
    --login-navy: #173276;
    --login-deep-navy: #10214f;
    --login-text: #111827;
    --login-muted: #64748b;
    --login-line: #dbe3ed;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    min-height: 100%;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--login-text);
    background: #ffffff;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.login-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    background: #ffffff;
}

/* Panel de identidad */
.login-identity {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 100vh;
    overflow: hidden;
    padding: 48px;
    color: #ffffff;
    background:
        radial-gradient(circle at 20% 10%, rgba(94, 165, 232, 0.42), transparent 38%),
        linear-gradient(155deg, #2067da 0%, #2b4ba0 48%, var(--login-deep-navy) 100%);
}

.login-identity::before,
.login-identity::after {
    position: absolute;
    content: "";
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    pointer-events: none;
}

.login-identity::before {
    top: -310px;
    left: -240px;
    width: 520px;
    height: 520px;
}

.login-identity::after {
    right: -250px;
    bottom: -250px;
    width: 420px;
    height: 420px;
}

.login-brand {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.login-logo-wrap {
    display: grid;
    place-items: center;
    width: clamp(220px, 20vw, 290px);
    aspect-ratio: 1;
    padding: 32px;
    overflow: hidden;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 25px 55px rgba(8, 25, 67, 0.26);
}

.login-logo-wrap img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.login-brand-copy h1 {
    max-width: 560px;
    margin: 27px 0 0;
    color: #ffffff;
    font-size: clamp(32px, 3vw, 43px);
    font-weight: 850;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.login-brand-copy p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.81);
    font-size: 16px;
}

.login-brand-separator {
    width: 48px;
    height: 2px;
    margin: 28px 0;
    background: rgba(255, 255, 255, 0.45);
}

.login-brand small {
    color: rgba(255, 255, 255, 0.68);
    font-size: 13px;
}

/* Panel del formulario */
.login-form-panel {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 52px;
    background: #ffffff;
}

.login-form-wrap {
    display: flex;
    flex-direction: column;
    width: min(430px, 100%);
    min-height: 570px;
}

.login-heading {
    margin-top: auto;
    margin-bottom: 32px;
}

.portal-label {
    display: block;
    margin-bottom: 8px;
    color: var(--login-light-blue);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-mobile-brand {
    display: none;
}

.login-heading h2 {
    margin: 0;
    color: var(--login-text);
    font-size: clamp(31px, 3vw, 40px);
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -0.035em;
}

.login-heading p {
    margin: 8px 0 0;
    color: var(--login-muted);
    font-size: 14px;
}

.login-form {
    display: grid;
    gap: 19px;
}

.login-field {
    display: grid;
    gap: 8px;
    margin: 0;
}

.login-field > label {
    margin: 0;
    color: #66738b;
    font-size: 13px;
    font-weight: 600;
}

.input-with-icon {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    min-height: 52px;
    padding: 0 14px;
    color: #91a0b6;
    background: #f8fafc;
    border: 1px solid var(--login-line);
    border-radius: 9px;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-with-icon:focus-within {
    background: #ffffff;
    border-color: var(--login-light-blue);
    box-shadow: 0 0 0 4px rgba(58, 123, 213, 0.1);
}

.input-with-icon > i {
    justify-self: center;
    font-size: 16px;
}

.input-with-icon input {
    width: 100%;
    min-width: 0;
    height: 50px;
    padding: 0 8px;
    color: #1e293b;
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 13px;
}

.input-with-icon input::placeholder {
    color: #b4bfce;
    opacity: 1;
}

.password-field {
    grid-template-columns: 22px minmax(0, 1fr) 32px;
}

.password-field button {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    color: #8b9aae;
    background: transparent;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.password-field button:hover {
    color: var(--login-light-blue);
    background: rgba(58, 123, 213, 0.08);
}

.forgot-link {
    justify-self: end;
    margin-top: -7px;
    padding: 0;
    color: var(--login-light-blue);
    font-size: 13px;
    text-decoration: none;
}

.forgot-link:hover {
    color: var(--login-blue);
    text-decoration: underline;
}

.login-error {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 7px;
    font-size: 12px;
}

.login-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    margin-top: 2px;
    padding: 0 22px;
    color: #ffffff;
    background: linear-gradient(90deg, #1676ed, #1a2e6e);
    border: 0;
    border-radius: 9px;
    box-shadow: 0 12px 24px rgba(43, 75, 160, 0.18);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-submit:hover:not(:disabled) {
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 15px 29px rgba(43, 75, 160, 0.25);
}

.login-submit:active {
    transform: translateY(0);
}

.login-form-wrap footer {
    margin-top: auto;
    padding-top: 45px;
    color: #b2bdca;
    text-align: center;
    font-size: 11px;
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

.password-field button:focus-visible,
.forgot-link:focus-visible,
.login-submit:focus-visible {
    outline: 3px solid rgba(51, 122, 216, 0.34);
    outline-offset: 3px;
}

@media (max-width: 980px) and (min-width: 768px) {
    .login-identity,
    .login-form-panel {
        padding: 36px;
    }
}

@media (max-width: 767px) {
    .login-page {
        display: block;
        min-height: 100vh;
    }

    .login-identity {
        min-height: 205px;
        padding: 23px;
    }

    .login-brand {
        flex-direction: row;
        gap: 17px;
        width: min(480px, 100%);
        text-align: left;
    }

    .login-logo-wrap {
        flex: 0 0 112px;
        width: 112px;
        padding: 15px;
    }

    .login-brand-copy h1 {
        margin: 0;
        font-size: 24px;
        line-height: 1.12;
    }

    .login-brand-copy p {
        margin-top: 5px;
        font-size: 12px;
        line-height: 1.4;
    }

    .login-brand-separator,
    .login-brand small {
        display: none;
    }

    .login-form-panel {
        min-height: calc(100vh - 205px);
        padding: 32px 24px;
    }

    .login-form-wrap {
        min-height: 490px;
    }

    .login-heading {
        margin-top: 0;
    }

    .login-mobile-brand {
        display: block;
        margin-bottom: 9px;
        color: var(--login-light-blue);
        font-size: 10px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .portal-label {
        display: none;
    }

    .login-heading h2 {
        font-size: 31px;
    }

    .login-form-wrap footer {
        padding-top: 35px;
    }
}

@media (max-width: 410px) {
    .login-identity {
        min-height: 172px;
    }

    .login-logo-wrap {
        flex-basis: 88px;
        width: 88px;
        padding: 12px;
    }

    .login-brand-copy h1 {
        font-size: 21px;
    }

    .login-brand-copy p {
        font-size: 11px;
    }

    .login-form-panel {
        min-height: calc(100vh - 172px);
        padding: 26px 19px;
    }

    .login-heading {
        margin-bottom: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
