.auth-form-layout {
    --auth-accent: #dd0451;
    --auth-accent-soft: #fff0f6;
    --auth-accent-ring: rgba(221, 4, 81, 0.16);
    --auth-accent-shadow: rgba(221, 4, 81, 0.24);
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(310px, 0.82fr) minmax(0, 1.18fr);
    width: min(100%, 1160px);
    margin: 0 auto;
    border: 1px solid rgba(220, 227, 240, 0.9);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(27, 44, 78, 0.13);
}

.auth-form-layout--client {
    --auth-accent: #dd0451;
    --auth-accent-soft: #fff0f6;
    --auth-accent-ring: rgba(221, 4, 81, 0.16);
    --auth-accent-shadow: rgba(221, 4, 81, 0.24);
}

.auth-form-layout--caregiver {
    --auth-accent: #35558e;
    --auth-accent-soft: #eef3fb;
    --auth-accent-ring: rgba(53, 85, 142, 0.16);
    --auth-accent-shadow: rgba(53, 85, 142, 0.24);
}

.auth-login-body.auth-caregiver-page {
    --guau-primary: #35558e;
    --guau-primary-2: #35558e;
    --guau-primary-soft: rgba(53, 85, 142, 0.14);
    --guau-primary-soft-strong: rgba(53, 85, 142, 0.17);
    --guau-primary-ring: rgba(53, 85, 142, 0.15);
    --guau-primary-shadow: rgba(53, 85, 142, 0.28);
    background:
        radial-gradient(48% 32% at 12% 12%, rgba(53, 85, 142, 0.14) 0%, rgba(53, 85, 142, 0) 100%),
        radial-gradient(38% 30% at 88% 18%, rgba(53, 85, 142, 0.08) 0%, rgba(53, 85, 142, 0) 100%),
        linear-gradient(180deg, #f8faff 0%, #f1f5fc 100%);
}

.auth-login-body.auth-caregiver-page .login-shell::before {
    background: linear-gradient(180deg, rgba(53, 85, 142, 0.17) 0%, rgba(53, 85, 142, 0.02) 100%);
}

.auth-login-body.auth-caregiver-page .login-shell::after {
    background: linear-gradient(180deg, rgba(53, 85, 142, 0.12) 0%, rgba(53, 85, 142, 0.02) 100%);
}

.auth-register-body.auth-caregiver-page {
    --guau-primary: #35558e;
    --guau-primary-2: #35558e;
    --guau-soft: rgba(53, 85, 142, 0.13);
    --guau-soft-blue: rgba(53, 85, 142, 0.08);
    --guau-ring: rgba(53, 85, 142, 0.15);
    --guau-submit-shadow: rgba(53, 85, 142, 0.28);
    background:
        radial-gradient(48% 34% at 10% 8%, rgba(53, 85, 142, 0.13) 0%, rgba(53, 85, 142, 0) 100%),
        radial-gradient(42% 30% at 88% 14%, rgba(53, 85, 142, 0.08) 0%, rgba(53, 85, 142, 0) 100%),
        linear-gradient(180deg, #f8faff 0%, #f1f5fc 100%);
}

.auth-register-body.auth-caregiver-page .register-shell::before {
    background: linear-gradient(180deg, rgba(53, 85, 142, 0.2) 0%, rgba(53, 85, 142, 0.02) 100%);
}

.auth-register-body.auth-caregiver-page .register-shell::after {
    background: linear-gradient(180deg, rgba(53, 85, 142, 0.14) 0%, rgba(53, 85, 142, 0.02) 100%);
}

.auth-form-layout--register {
    grid-template-columns: minmax(310px, 0.72fr) minmax(0, 1.28fr);
    width: min(100%, 1280px);
}

.auth-visual {
    position: relative;
    display: flex;
    min-height: 540px;
    overflow: hidden;
    align-items: flex-end;
    border-radius: 21px 0 0 21px;
    background: #283e65;
    color: #ffffff;
}

.auth-visual-image,
.auth-visual-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.auth-visual-image {
    object-fit: cover;
}

.auth-visual--client .auth-visual-image {
    object-position: 70% center;
}

.auth-visual--caregiver .auth-visual-image {
    object-position: 78% center;
}

.auth-visual-overlay {
    background:
        linear-gradient(180deg, rgba(20, 36, 67, 0.04) 0%, rgba(20, 36, 67, 0.22) 36%, rgba(20, 36, 67, 0.88) 100%),
        linear-gradient(90deg, rgba(20, 36, 67, 0.08), transparent 70%);
}

.auth-visual-copy {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: clamp(28px, 4vw, 48px);
}

.auth-visual-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    margin-bottom: 16px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.09em;
    backdrop-filter: blur(8px);
}

.auth-visual-copy h2 {
    max-width: 460px;
    margin: 0 0 12px;
    color: #ffffff;
    font-size: clamp(1.8rem, 3vw, 2.65rem);
    font-weight: 850;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.auth-visual-copy > p {
    max-width: 440px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.6;
}

.auth-visual-note {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 24px;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
}

.auth-visual-note i {
    color: #ffc0d6;
    font-size: 1.05rem;
}

.auth-form-layout .login-panel,
.auth-form-layout .register-panel {
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: clamp(28px, 4vw, 54px);
    align-self: center;
    animation: none;
}

.auth-form-layout .login-card,
.auth-form-layout .register-card {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.auth-form-layout .login-card-header,
.auth-form-layout .register-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #193264 !important;
    font-size: clamp(1.55rem, 2.4vw, 2rem);
    font-weight: 850;
    letter-spacing: -0.03em;
}

.auth-form-layout .login-card-header i,
.auth-form-layout .register-card-header i {
    display: inline-grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    place-items: center;
    border-radius: 14px;
    background: var(--auth-accent-soft);
    color: var(--auth-accent) !important;
    font-size: 1.25rem;
}

.auth-form-layout .login-card .card-body,
.auth-form-layout .register-card .card-body {
    padding: 24px 0 0 !important;
}

.auth-form-layout .login-input-group,
.auth-form-layout .register-input-group {
    min-height: 54px;
    border-radius: 11px;
}

.auth-form-layout .login-input-group:focus-within,
.auth-form-layout .register-input-group:focus-within {
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 4px var(--auth-accent-ring);
}

.auth-form-layout .register-input-group .register-password-toggle:hover,
.auth-form-layout .register-input-group .register-password-toggle:focus-visible {
    color: var(--auth-accent);
}

.auth-form-layout .register-input-group .register-password-toggle:focus-visible {
    outline-color: var(--auth-accent);
}

.auth-form-layout .login-input-group .form-control,
.auth-form-layout .register-input-group .form-control {
    min-width: 0;
    font-size: 0.98rem;
}

.auth-form-layout .login-label,
.auth-form-layout .register-label {
    color: #273e6a;
    font-size: 0.88rem;
    font-weight: 800;
}

.auth-form-layout .login-submit,
.auth-form-layout .register-submit {
    min-height: 54px;
    border: 0;
    border-radius: 11px;
    background: var(--auth-accent);
    box-shadow: 0 12px 26px var(--auth-accent-shadow);
    font-weight: 850;
}

.auth-form-layout .login-submit:hover,
.auth-form-layout .login-submit:focus,
.auth-form-layout .register-submit:hover,
.auth-form-layout .register-submit:focus {
    background: var(--auth-accent);
    box-shadow: 0 16px 32px var(--auth-accent-shadow);
}

.auth-form-layout .login-link,
.auth-form-layout .register-terms-link {
    color: var(--auth-accent) !important;
}

.auth-form-layout .register-consent-captcha-row .register-terms-link,
.auth-form-layout .register-consent-captcha-row .register-terms-link:hover,
.auth-form-layout .register-consent-captcha-row .register-terms-link:focus {
    color: #4f5f80 !important;
}

.auth-form-layout .register-consent-captcha-row .register-terms-link {
    font-weight: 600;
    text-decoration: none !important;
}

.auth-form-layout .register-consent-captcha-row .register-terms-link:hover,
.auth-form-layout .register-consent-captcha-row .register-terms-link:focus {
    text-decoration: underline !important;
    text-underline-offset: 2px;
}

.auth-form-layout .register-login-prompt {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 9px;
    padding: 13px 16px;
    border: 1px solid var(--auth-accent-ring);
    border-radius: 12px;
    background: var(--auth-accent-soft);
    color: #5f6f8f;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
}

.auth-form-layout .register-login-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--auth-accent) !important;
    font-weight: 800;
    text-decoration: none;
}

.auth-form-layout .register-login-link:hover,
.auth-form-layout .register-login-link:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-form-layout .register-login-link:focus-visible {
    border-radius: 4px;
    outline: 2px solid var(--auth-accent);
    outline-offset: 3px;
}

/* The label of the password with "¿Olvidaste tu contraseña?" at its right */
.auth-form-layout .auth-label-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 12px;
}

.auth-form-layout .auth-forgot-link {
    margin-bottom: 0.45rem;
    color: var(--auth-accent) !important;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
}

.auth-form-layout .auth-forgot-link:hover,
.auth-form-layout .auth-forgot-link:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* At the end: the login or the register of the other kind of account, a row in its color (pink, the pet owners; blue,
   the professionals), like in the menu "Acceder" */
.auth-form-layout .auth-other-account {
    --other-accent: #dd0451;
    --other-soft: #ffe3ed;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid #ffe0eb;
    border-radius: 12px;
    background: #fff8fb;
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.auth-form-layout .auth-other-account--caregiver {
    --other-accent: #35558e;
    --other-soft: #e3ecfa;
    border-color: #dbe5f4;
    background: #f6f9fe;
}

.auth-form-layout .auth-other-account > i:first-child {
    display: inline-grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border-radius: 11px;
    background: var(--other-soft);
    color: var(--other-accent);
    font-size: 1.15rem;
}

.auth-form-layout .auth-other-account > span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.auth-form-layout .auth-other-account strong {
    color: #193264;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.25;
}

.auth-form-layout .auth-other-account small {
    color: var(--other-accent);
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.3;
}

.auth-form-layout .auth-other-account-chevron {
    margin-left: auto;
    color: var(--other-accent);
    transition: transform 0.15s ease;
}

.auth-form-layout .auth-other-account:hover,
.auth-form-layout .auth-other-account:focus-visible {
    border-color: var(--other-accent);
}

.auth-form-layout .auth-other-account:hover .auth-other-account-chevron,
.auth-form-layout .auth-other-account:focus-visible .auth-other-account-chevron {
    transform: translateX(2px);
}

.auth-form-layout .auth-other-account:focus-visible {
    outline: 2px solid var(--other-accent);
    outline-offset: 2px;
}

.auth-form-layout .register-card-header i {
    margin-right: 2px;
}

.auth-form-layout .register-card {
    margin-bottom: 0 !important;
}

.auth-form-layout .register-card .card-body > .row {
    --bs-gutter-y: 1rem;
}

.auth-form-layout .register-consent-captcha-row {
    border-radius: 11px;
    border-color: #e2e5e9;
    background: #f7f8fa;
}

.auth-form-layout .register-consent-captcha-row .form-check-label {
    color: #68717d;
}

.auth-form-layout .register-consent-captcha-row .form-check-input {
    border-color: #b8bec7;
}

.auth-form-layout .register-consent-captcha-row .form-check-input:focus {
    border-color: #8b939e;
    box-shadow: 0 0 0 0.18rem rgba(117, 126, 138, 0.18);
}

.auth-form-layout .register-consent-captcha-row .form-check-input:checked {
    background-color: #7b8490;
    border-color: #7b8490;
}

.auth-form-layout .register-consent-captcha-row .register-terms-link,
.auth-form-layout .register-consent-captcha-row .register-terms-link:hover,
.auth-form-layout .register-consent-captcha-row .register-terms-link:focus {
    color: #68717d !important;
}

.auth-form-layout .register-alert,
.auth-form-layout .alert {
    border-radius: 11px;
}

.auth-form-layout .auth-visual-kicker {
    align-self: flex-start;
}

.auth-form-layout--register .register-panel {
    align-self: start;
}

.auth-form-layout--register .register-actions {
    margin-top: 1.2rem;
}

.auth-form-layout--register .register-submit {
    margin-bottom: 0.5rem;
}

@media (max-width: 900px) {
    .auth-form-layout,
    .auth-form-layout--register {
        grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
    }

    .auth-form-layout .login-panel,
    .auth-form-layout .register-panel {
        padding: 28px;
    }
}

@media (max-width: 700px) {
    .auth-form-layout,
    .auth-form-layout--register {
        grid-template-columns: 1fr;
        width: min(100%, 560px);
        border-radius: 18px;
    }

    .auth-visual {
        min-height: 230px;
        border-radius: 17px 17px 0 0;
    }

    .auth-visual-copy {
        padding: 24px 26px;
    }

    .auth-visual-kicker {
        min-height: 26px;
        margin-bottom: 10px;
        font-size: 0.64rem;
    }

    .auth-visual-copy h2 {
        max-width: 450px;
        margin-bottom: 6px;
        font-size: clamp(1.45rem, 6vw, 1.85rem);
    }

    .auth-visual-copy > p {
        max-width: 480px;
        font-size: 0.88rem;
        line-height: 1.45;
    }

    .auth-visual-note {
        display: none;
    }

    .auth-form-layout .login-panel,
    .auth-form-layout .register-panel {
        padding: 24px;
    }
}

@media (max-width: 420px) {
    .auth-visual {
        min-height: 215px;
    }

    .auth-form-layout .login-panel,
    .auth-form-layout .register-panel {
        padding: 20px 17px;
    }

    .auth-form-layout .login-card .card-body,
    .auth-form-layout .register-card .card-body {
        padding-top: 18px !important;
    }
}

@media (max-width: 576px) {
    .auth-form-layout--register .register-consent-captcha-row .form-check {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0 0.55rem;
        padding-left: 0;
    }

    .auth-form-layout--register .register-consent-captcha-row .form-check-input {
        position: static;
        float: none;
        flex: 0 0 1rem;
        width: 1rem;
        height: 1rem;
        margin: 0 !important;
    }

    .auth-form-layout--register .register-consent-captcha-row .form-check-label {
        white-space: nowrap;
        font-size: clamp(0.68rem, 3.3vw, 0.78rem);
        line-height: 1.3;
    }

    .auth-form-layout--register .register-consent-captcha-row .invalid-feedback {
        flex-basis: 100%;
        margin-left: 1.55rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-form-layout *,
    .auth-form-layout *::before,
    .auth-form-layout *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
