:root {
    --auth-text: #15375c;
    --auth-muted: #57718f;
    --auth-border: #c8d7e6;
    --auth-error: #9b1c31;
    --auth-error-bg: #fff1f3;
}

.auth-login-page {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
}

.auth-login-page .auth {
    flex: 1 0 auto;
}

.auth-login-page .footer {
    flex-shrink: 0;
}

.auth {
    display: flex;
    align-items: center;
    min-height: calc(100vh - 132px);
    padding: 24px 0 12px;
    background:
        radial-gradient(circle at left 18%, rgba(197, 214, 231, 0.85), transparent 26%),
        radial-gradient(circle at right 78%, rgba(197, 214, 231, 0.9), transparent 28%),
        linear-gradient(180deg, #f2f6fa 0%, #eaf1f7 100%);
}

.auth__wrap {
    display: flex;
    justify-content: center;
    width: 100%;
}

.auth__card {
    width: min(520px, 100%);
    background: var(--white);
    color: var(--auth-text);
    border: 1px solid rgba(18, 54, 92, 0.12);
    border-radius: 18px;
    padding: 26px 28px;
    box-shadow: 0 28px 60px rgba(18, 54, 92, 0.12);
}

.auth__mobile-brand {
    display: none;
}

.auth__header h1 {
    margin: 0 0 6px;
    font-size: clamp(28px, 4vw, 36px);
    line-height: 1.1;
}

.auth__title-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.auth__title-with-icon svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth__subtitle {
    margin: 0 0 8px;
    color: var(--auth-muted);
    font-size: 16px;
}

.auth__meta {
    margin: 0 0 18px;
    font-weight: 800;
    color: var(--auth-text);
}

.auth__form {
    display: grid;
    gap: 12px;
}

.auth__field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 800;
}

.auth__field input {
    width: 100%;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 16px;
    color: var(--auth-text);
    background: #ffffff;
}

.auth__password-field {
    position: relative;
}

.auth__password-field input {
    padding-right: 48px;
}

.auth__password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--auth-muted);
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
}

.auth__password-toggle:hover,
.auth__password-toggle:focus {
    color: var(--violet);
    background: rgba(111, 144, 184, 0.12);
}

.auth__password-toggle:focus {
    outline: 3px solid rgba(111, 144, 184, 0.24);
}

.auth__password-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth__password-icon--hide {
    display: none;
}

.auth__password-toggle[aria-pressed="true"] .auth__password-icon--show {
    display: none;
}

.auth__password-toggle[aria-pressed="true"] .auth__password-icon--hide {
    display: block;
}

.auth__field input:focus {
    outline: 3px solid rgba(111, 144, 184, 0.24);
    border-color: var(--pink);
}

.auth__remembered-user {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(18, 54, 92, 0.12);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f8fc 100%);
}

.auth__remembered-avatar {
    display: inline-grid;
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    place-items: center;
    overflow: hidden;
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 12px 28px rgba(18, 54, 92, 0.16);
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}

.auth__remembered-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth__remembered-copy {
    min-width: 0;
}

.auth__remembered-copy strong,
.auth__remembered-copy span {
    display: block;
}

.auth__remembered-copy strong {
    color: var(--auth-text);
    font-size: 18px;
    line-height: 1.2;
}

.auth__remembered-copy span {
    margin-top: 4px;
    color: var(--auth-muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.auth__remember-user {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--auth-text);
    font-size: 14px;
    font-weight: 800;
}

.auth__remember-user input {
    width: 18px;
    height: 18px;
    accent-color: var(--violet);
}

.auth__option {
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: var(--auth-text);
}

.auth__option input {
    margin-top: 4px;
}

.auth__option strong {
    display: block;
}

.hint {
    font-size: 12px;
    color: var(--auth-muted);
    margin-top: 6px;
}

.error-box {
    background: var(--auth-error-bg);
    border: 1px solid #f1b6c1;
    color: var(--auth-error);
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 13px;
    margin-bottom: 12px;
}

.error-box ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.field-error {
    color: var(--auth-error);
    font-size: 13px;
    margin-top: 6px;
}

.auth__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.auth__actions .btn {
    display: inline-flex;
    flex: 1 1 0;
    min-width: 160px;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-color: var(--auth-border);
}

.auth__actions .btn--ghost {
    color: var(--violet);
    background: transparent;
}

.auth__back-button {
    gap: 8px;
}

.auth__back-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth__links {
    display: flex;
    justify-content: flex-end;
    font-size: 14px;
}

.auth__links a {
    color: var(--violet);
    font-weight: 800;
    text-decoration: none;
}

.auth__links a:hover {
    text-decoration: underline;
}

.auth__footer {
    margin: 14px 0 0;
    color: var(--auth-muted);
}

.auth__footer a {
    color: var(--violet);
    font-weight: 800;
    text-decoration: none;
}

.auth__footer a:hover {
    text-decoration: underline;
}

@media (max-width: 720px) {
    .auth-login-page {
        min-height: 100dvh;
        background:
            radial-gradient(circle at 0 18%, rgba(215, 227, 239, 0.7), transparent 22%),
            radial-gradient(circle at 100% 88%, rgba(126, 191, 213, 0.42), transparent 28%),
            linear-gradient(180deg, #e8f7f9 0%, #eef2f8 48%, #bde7f3 100%);
    }

    .auth-login-page .nav {
        display: none;
    }

    .auth-login-page .auth {
        display: flex;
        align-items: stretch;
        min-height: auto;
        padding: 0;
        background:
            radial-gradient(110% 36% at 30% 9%, rgba(255, 255, 255, 0.72) 0 38%, transparent 39%),
            radial-gradient(125% 34% at 72% 31%, rgba(255, 255, 255, 0.62) 0 36%, transparent 37%),
            radial-gradient(125% 30% at 35% 74%, rgba(255, 255, 255, 0.5) 0 35%, transparent 36%),
            radial-gradient(95% 30% at 88% 94%, rgba(100, 176, 215, 0.3) 0 36%, transparent 37%);
    }

    .auth-login-page .auth__wrap {
        align-items: stretch;
        padding: 0;
    }

    .auth-login-page .auth__card {
        width: 100%;
        min-height: calc(100dvh - 84px);
        display: grid;
        align-content: center;
        gap: 16px;
        padding: 34px 24px 24px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        text-align: center;
    }

    .auth-login-page .auth__mobile-brand {
        display: grid;
        gap: 20px;
        justify-items: center;
        margin-bottom: 4px;
    }

    .auth-login-page .auth__mobile-brand img {
        width: 152px;
        max-width: 42vw;
        height: auto;
        filter: saturate(0) contrast(1.15);
    }

    .auth-login-page .auth__mobile-brand strong {
        color: #111827;
        font-size: 24px;
        font-weight: 900;
        line-height: 1.05;
        text-align: center;
    }

    .auth-login-page .auth__header {
        display: grid;
        gap: 14px;
        justify-items: center;
    }

    .auth-login-page .auth__header h1 {
        margin: 0;
        color: #111827;
        font-size: 40px;
        line-height: 1.05;
        text-align: center;
    }

    .auth-login-page .auth__title-with-icon {
        gap: 10px;
        justify-content: center;
    }

    .auth-login-page .auth__title-with-icon svg {
        width: 32px;
        height: 32px;
        color: #1976d2;
        stroke-width: 2.2;
    }

    .auth-login-page .auth__subtitle {
        margin: 0;
        color: #667085;
        font-size: 19px;
        line-height: 1.35;
        text-align: center;
    }

    .auth-login-page .auth__form {
        gap: 16px;
    }

    .auth-login-page .auth__field {
        text-align: left;
    }

    .auth-login-page .auth__field label {
        margin-bottom: 8px;
        color: #374151;
        font-size: 18px;
        line-height: 1.15;
    }

    .auth-login-page .auth__field input {
        min-height: 58px;
        border-radius: 14px;
        border-color: #cbd5e1;
        padding: 13px 16px;
        font-size: 18px;
        text-align: center;
    }

    .auth-login-page .auth__password-toggle {
        right: 14px;
        width: 42px;
        height: 42px;
    }

    .auth-login-page .hint {
        display: none;
    }

    .auth-login-page .auth__remembered-user {
        display: grid;
        gap: 12px;
        justify-items: center;
        padding: 0;
        border: 0;
        background: transparent;
        text-align: center;
    }

    .auth-login-page .auth__remembered-avatar {
        width: 96px;
        height: 96px;
        flex-basis: 96px;
        border-color: #bfe2e9;
    }

    .auth-login-page .auth__remembered-copy strong {
        color: #111827;
        font-size: 34px;
        line-height: 1.08;
    }

    .auth-login-page .auth__remembered-copy::before {
        content: "Bienvenido";
        display: block;
        margin-bottom: 8px;
        color: #667085;
        font-size: 20px;
        font-weight: 900;
    }

    .auth-login-page .auth__remembered-copy span {
        display: none;
    }

    .auth-login-page .auth__remembered-user + input + input + .auth__field {
        margin-top: 8px;
    }

    .auth-login-page .auth__remember-user {
        width: 100%;
        justify-content: flex-start;
        gap: 14px;
        color: #374151;
        font-size: 19px;
        text-align: left;
    }

    .auth-login-page .auth__remember-user input {
        width: 32px;
        height: 32px;
        border-radius: 9px;
    }

    .auth-login-page .auth__links {
        justify-content: flex-start;
        font-size: 18px;
    }

    .auth-login-page .auth__links a {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: #1976d2;
        font-weight: 900;
    }

    .auth-login-page .auth__actions {
        display: grid;
        gap: 14px;
    }

    .auth-login-page .auth__actions .btn {
        width: 100%;
        min-height: 62px;
        border-radius: 12px;
        font-size: 19px;
    }

    .auth-login-page .auth__actions .btn--solid-pink {
        background: #1976d2;
        border-color: #1976d2;
        color: #ffffff;
        box-shadow: 0 12px 26px rgba(25, 118, 210, 0.24);
    }

    .auth-login-page .auth__actions .btn--solid-pink:hover,
    .auth-login-page .auth__actions .btn--solid-pink:focus-visible {
        background: #12365c;
        border-color: #12365c;
    }

    .auth-login-page .auth__actions .btn--ghost {
        border-color: rgba(148, 163, 184, 0.5);
        color: #1976d2;
        background: rgba(255, 255, 255, 0.32);
        box-shadow: none;
    }

    .auth-login-page .auth__register-action::before {
        content: "+";
        margin-right: 8px;
        font-size: 22px;
        line-height: 1;
    }

    .auth-login-page .auth__footer {
        display: none;
    }

    .auth-login-page .footer {
        margin-top: auto;
    }

    .auth__actions .btn {
        flex-basis: 100%;
    }
}

@media (max-width: 380px) {
    .auth-login-page .auth__card {
        padding-inline: 18px;
    }

    .auth-login-page .auth__header h1 {
        font-size: 34px;
    }

    .auth-login-page .auth__mobile-brand strong {
        font-size: 21px;
    }

    .auth-login-page .auth__remembered-copy strong {
        font-size: 28px;
    }
}
