/* Layout de autenticação alinhado à tela inicial (/) — independente do grid legacy */

.login-page-layout--home {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    position: relative;
    min-height: 100dvh;
    max-height: 100dvh;
    height: 100dvh;
    padding: 0;
    overflow: hidden;
    background-color: var(--caprind-shell-bg) !important;
    background-image: none !important;
    box-sizing: border-box;
}

.login-page-layout--home > .login-auth-home {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.login-page-layout--home > .login-page-footer {
    flex: 0 0 auto;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.login-page-layout--home .login-copyright-notice {
    width: 100%;
    max-width: 52rem;
    margin-inline: auto;
    padding: 0.35rem clamp(0.75rem, 3vw, 1.5rem);
    text-align: center;
    color: var(--caprind-login-page-footer-text);
    text-shadow: var(--caprind-login-page-footer-text-shadow, none);
}

.login-page-layout--home .login-copyright-notice__line {
    text-align: center;
    margin-inline: auto;
    color: inherit;
}

.login-page-layout--home .login-page-footer:has(.login-page-footer__actions) .login-copyright-notice {
    padding-right: clamp(4.75rem, 13vw, 6.5rem);
}

.login-page-layout--home .login-page-footer {
    position: relative;
}

.login-page-layout--home .login-page-footer__version {
    color: var(--caprind-login-page-footer-text);
    text-shadow: var(--caprind-login-page-footer-text-shadow, none);
    position: static;
    width: 100%;
    max-width: 52rem;
    margin-top: 0.35rem;
    text-align: center;
}

.login-page-layout--home .login-page-footer__actions {
    position: absolute;
    right: clamp(0.75rem, 3vw, 1.5rem);
    bottom: clamp(0.45rem, 1.2vh, 0.75rem);
    z-index: 3;
}

.login-auth-theme-toggle {
    display: flex;
    justify-content: flex-end;
}

.login-auth-theme-toggle .login-theme-toggle-btn {
    border: 1px solid var(--caprind-login-theme-btn-border);
    color: var(--caprind-login-theme-btn-text);
    background: var(--caprind-login-theme-btn-bg);
    font-weight: 600;
    box-shadow: 0 2px 10px color-mix(in srgb, var(--caprind-shell-bg) 28%, transparent);
}

.login-auth-theme-toggle .login-theme-toggle-btn:hover,
.login-auth-theme-toggle .login-theme-toggle-btn:focus-visible {
    border-color: var(--caprind-login-theme-btn-border-hover);
    color: var(--caprind-login-card-text);
    background: var(--caprind-login-theme-btn-bg-hover);
}

.login-auth-home {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    width: 100%;
    max-width: min(94vw, 56rem);
    min-height: 100%;
    margin: 0 auto;
    padding: 0.35rem clamp(0.75rem, 3vw, 1.25rem) 0.15rem;
    gap: 15px;
    box-sizing: border-box;
}

.login-auth-home--landing {
    gap: clamp(0.35rem, 0.9vh, 0.75rem);
}

.login-auth-home__logo {
    flex: 0 0 auto;
    width: 100%;
    margin: 0;
    padding: 0;
    line-height: 0;
}

.login-auth-home__logo .caprind-home-logo-block {
    width: 100%;
    margin: 0;
    padding: 0;
    line-height: 0;
}

.login-auth-home__logo .caprind-home-logo,
.login-auth-home__logo img.caprind-home-logo {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    max-height: clamp(19.2rem, 45.6dvh, 36rem);
    height: auto !important;
    aspect-ratio: auto !important;
    margin: 0;
    object-fit: contain;
    object-position: center bottom;
}

.login-auth-home__body {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    margin: 0;
}

.login-auth-home__body > form {
    width: 100%;
    margin: 0;
}

/* Logo colado no topo do card (login e demais telas de autenticação) */
.login-auth-home:not(.login-auth-home--landing) .app-auth-card.login-card-shell {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-top: 0;
}

.page:not([data-caprind-theme-family="light"]) .login-auth-home .caprind-home-logo--theme-light {
    display: none !important;
}

.page[data-caprind-theme-family="light"] .login-auth-home .caprind-home-logo--theme-dark {
    display: none !important;
}

@media (max-width: 767.98px) {
    .login-page-layout--home {
        height: auto;
        min-height: 100dvh;
        max-height: none;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .login-page-layout--home > .login-auth-home {
        overflow: visible;
        min-height: auto;
    }

    .login-page-layout--home > .login-page-footer {
        flex: 0 0 auto;
    }

    .login-auth-home {
        justify-content: flex-start;
        min-height: auto;
        padding-bottom: 0.75rem;
    }

    .login-auth-home__logo .caprind-home-logo,
    .login-auth-home__logo img.caprind-home-logo {
        max-height: clamp(15.6rem, 40.8dvh, 28.8rem);
    }
}

.page[data-caprind-theme-family="light"] .login-page-layout--home {
    background-color: var(--caprind-shell-bg) !important;
}

.page[data-caprind-theme="light-blue"] .login-page-layout--home,
.page[data-caprind-theme="light-red"] .login-page-layout--home,
.page[data-caprind-theme="light-green"] .login-page-layout--home {
    background-color: var(--caprind-shell-bg) !important;
}

/* Landing /assinatura */
.login-auth-home--landing {
    max-width: min(96vw, 72rem);
    justify-content: flex-start;
    gap: clamp(0.35rem, 0.9vh, 0.75rem);
    padding-top: clamp(0.25rem, 0.8vh, 0.65rem);
    padding-bottom: clamp(0.75rem, 2vh, 1.25rem);
}

.login-auth-home--landing .login-auth-home__logo {
    width: min(100%, clamp(22.8rem, 42vw, 33.6rem));
    max-width: clamp(22.8rem, 42vw, 33.6rem);
    margin-inline: auto;
}

.login-auth-home--landing .login-auth-home__logo .caprind-home-logo,
.login-auth-home--landing .login-auth-home__logo img.caprind-home-logo {
    width: min(100%, clamp(22.8rem, 42vw, 33.6rem)) !important;
    max-width: clamp(22.8rem, 42vw, 33.6rem) !important;
    max-height: none;
    height: auto;
}

.login-auth-home__body.assinatura-landing-shell {
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    min-height: 0;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    margin: 0;
    padding: 0;
}

.login-page-layout--home:has(.login-auth-home--landing) {
    overflow-y: auto;
    max-height: none;
    height: auto;
    min-height: 100dvh;
}

.login-page-layout--home:has(.login-auth-home--landing) > .login-auth-home--landing {
    min-height: calc(100dvh - 0.5rem);
    overflow: visible;
}

.assinatura-landing__btn-primary {
    background: linear-gradient(180deg, var(--caprind-accent) 0%, var(--caprind-accent-hover) 100%);
    border-color: color-mix(in srgb, var(--caprind-accent) 35%, transparent);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--caprind-accent) 32%, transparent);
}

.assinatura-landing__feature-icon {
    color: var(--caprind-accent);
}

.assinatura-landing__btn-secondary {
    color: var(--caprind-login-card-link, var(--caprind-accent));
    border-bottom-color: color-mix(in srgb, var(--caprind-accent) 45%, transparent);
}

.assinatura-landing__btn-secondary:hover,
.assinatura-landing__btn-secondary:focus {
    color: var(--caprind-login-card-link-hover, var(--caprind-accent-hover));
}

.page[data-caprind-theme-family="light"] .assinatura-landing {
    color: #334155;
}

.page[data-caprind-theme-family="light"] .assinatura-landing__hero-title,
.page[data-caprind-theme-family="light"] .assinatura-landing__feature-title,
.page[data-caprind-theme-family="light"] .assinatura-landing__tagline {
    color: #0f172a;
    text-shadow: none;
}

.page[data-caprind-theme-family="light"] .assinatura-landing__hero-lead,
.page[data-caprind-theme-family="light"] .assinatura-landing__feature-text,
.page[data-caprind-theme-family="light"] .assinatura-landing__highlight-text {
    color: #475569;
    text-shadow: none;
}

.page[data-caprind-theme-family="light"] .assinatura-landing__feature,
.page[data-caprind-theme-family="light"] .assinatura-landing__highlight {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}
