/* Login-only presentation. Shared authentication pages and header logic stay intact. */
body#tfpLoginPage {
    --login-ink: #0b2132;
    --login-violet: #7435df;
    --login-muted: #647084;
    --login-border: #dcdfe9;
    background: #f5f4f9 !important;
    color: var(--login-ink) !important;
}

body#tfpLoginPage::before { content: none; }

body#tfpLoginPage .auth-page {
    min-height: calc(100vh - var(--tfp-header-fixed-height, 76px));
    min-height: calc(100svh - var(--tfp-header-fixed-height, 76px));
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 36px 28px 48px;
    background: radial-gradient(ellipse at 14% 100%, #ece6fa 0, transparent 50%), #f5f4f9 !important;
}

body#tfpLoginPage .auth-shell {
    display: grid;
    grid-template-columns: minmax(0, .98fr) minmax(0, 1.02fr);
    width: min(1180px, 100%);
    max-width: none;
    min-height: 684px;
    margin: 0;
    padding: 0;
    gap: 0;
    overflow: hidden;
    border: 1px solid #e4e0ef;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 20px 60px #30204a0d, 0 3px 12px #30204a04;
}

body#tfpLoginPage .auth-showcase {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
    min-height: 684px;
    padding: 40px;
    isolation: isolate;
    overflow: hidden;
    background: radial-gradient(ellipse at 95% 85%, #5424a4 0, transparent 65%), #081d2c;
    color: #fff;
}

body#tfpLoginPage .auth-showcase::before { content: none; }
body#tfpLoginPage .auth-showcase__content { position: relative; z-index: 2; }

body#tfpLoginPage .auth-showcase__eyebrow {
    display: inline-flex;
    min-height: 28px;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    margin: 0 0 20px;
    padding: 5px 12px;
    border: 1px solid #af8ef15c;
    border-radius: 999px;
    background: #112138;
    color: #d0baf7;
    font-size: 10px;
    font-weight: 750;
    line-height: 1.4;
    letter-spacing: .1em;
    text-transform: uppercase;
}

body#tfpLoginPage .auth-showcase h2 {
    max-width: 100%;
    margin: 0;
    color: #fff;
    font-size: clamp(48px, 4.1vw, 60px);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -.045em;
    overflow-wrap: normal;
}

body#tfpLoginPage .auth-showcase p {
    max-width: 100%;
    margin: 14px 0 0;
    padding: 0;
    color: #c8d2e3;
    font-size: 16px;
    font-weight: 450;
    line-height: 1.5;
}

body#tfpLoginPage .auth-showcase__mobile-lead { display: none; }

body#tfpLoginPage .auth-showcase__visual {
    position: absolute;
    inset: auto 0 0 auto;
    z-index: 1;
    width: 94%;
    max-width: 520px;
    height: auto;
    opacity: 1;
    pointer-events: none;
}

body#tfpLoginPage .auth-showcase__riko {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 1354 / 1161;
    margin: 0;
    object-fit: contain;
    object-position: center bottom;
    user-select: none;
}

body#tfpLoginPage .auth-showcase__secure {
    position: absolute;
    left: 28px;
    bottom: 24px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100% - 56px);
    margin: 0;
    padding: 7px 11px;
    border-radius: 12px;
    background: #081d2ceb;
    color: #d6d9ee;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}

body#tfpLoginPage .auth-showcase__secure svg {
    width: 23px;
    height: 23px;
    flex: 0 0 23px;
    fill: #53deb3;
    stroke: #081d2c;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body#tfpLoginPage .auth-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 42px 46px;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: var(--login-ink);
    text-align: left;
    box-shadow: none;
}

body#tfpLoginPage .auth-kicker {
    margin: 0 0 12px;
    color: var(--login-violet);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.4;
    letter-spacing: .09em;
}

body#tfpLoginPage .auth-box h1 {
    margin: 0;
    color: var(--login-ink);
    font-size: clamp(34px, 3.4vw, 46px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.04em;
    overflow-wrap: anywhere;
}

body#tfpLoginPage .auth-lead {
    max-width: none;
    margin: 12px 0 28px;
    color: var(--login-muted);
    font-size: 14px;
    font-weight: 450;
    line-height: 1.6;
}

body#tfpLoginPage .auth-form { display: grid; gap: 16px; min-width: 0; margin: 0; }
body#tfpLoginPage .auth-field { display: grid; gap: 8px; min-width: 0; }

body#tfpLoginPage .auth-field > label {
    display: block;
    margin: 0;
    padding: 0;
    color: var(--login-ink) !important;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.5;
    letter-spacing: 0;
    text-transform: none;
}

body#tfpLoginPage .auth-field input {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 54px;
    margin: 0;
    padding: 0 16px;
    border: 1px solid var(--login-border);
    border-radius: 12px;
    border-color: var(--login-border) !important;
    background: #fdfcff !important;
    color: var(--login-ink) !important;
    box-shadow: none !important;
    font-family: inherit;
    font-size: 16px;
    font-weight: 450;
    line-height: 1.5;
    transition: border-color .16s ease, box-shadow .16s ease;
}

body#tfpLoginPage .auth-field input::placeholder { color: #687386; font-weight: 450; opacity: 1; }
body#tfpLoginPage .auth-field input:focus {
    border-color: var(--login-violet) !important;
    background: #fff !important;
    outline: 0;
    box-shadow: 0 0 0 3px #7435df1f !important;
}

body#tfpLoginPage .auth-password { position: relative; min-width: 0; }
body#tfpLoginPage .auth-password input { padding-right: 60px !important; }
body#tfpLoginPage .auth-password__toggle {
    width: 44px !important;
    min-height: 44px !important;
    height: 44px;
    right: 5px;
    border-radius: 9px !important;
    color: #5c647a !important;
}
body#tfpLoginPage .auth-password__toggle:hover { background: #f0e9fc !important; color: var(--login-violet) !important; }
body#tfpLoginPage .auth-password__toggle:focus-visible { outline: 2px solid var(--login-violet); outline-offset: 1px; }
body#tfpLoginPage .auth-password__icon { width: 21px; height: 21px; }

body#tfpLoginPage .auth-form__options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0 16px;
    min-width: 0;
}

body#tfpLoginPage .auth-remember-note {
    display: flex !important;
    align-items: center;
    gap: 10px !important;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 6px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
}

body#tfpLoginPage .auth-remember-note input {
    width: 20px !important;
    height: 20px !important;
    accent-color: var(--login-violet);
    border-radius: 5px;
    cursor: pointer;
}

body#tfpLoginPage .auth-remember-note span {
    color: var(--login-ink) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.5;
}

body#tfpLoginPage .auth-forgot,
body#tfpLoginPage .auth-register a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    max-width: 100%;
    color: #6830c6;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.5;
    text-decoration: none;
    overflow-wrap: anywhere;
}

body#tfpLoginPage .auth-forgot:hover,
body#tfpLoginPage .auth-register a:hover { text-decoration: underline; text-underline-offset: 3px; }

body#tfpLoginPage .auth-box button.auth-submit,
body#tfpLoginPage .auth-form--activation > button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
    min-height: 56px;
    margin: 0;
    padding: 14px 18px;
    border: 1px solid transparent;
    border-radius: 13px !important;
    background: var(--login-violet) !important;
    color: #fff !important;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: 0 8px 20px #7435df1a !important;
    transition: background .16s ease, box-shadow .16s ease;
}

body#tfpLoginPage .auth-box button.auth-submit:hover,
body#tfpLoginPage .auth-form--activation > button:hover {
    background: #6227c5 !important;
    box-shadow: 0 10px 24px #7435df24 !important;
    transform: none;
    filter: none;
}

body#tfpLoginPage .auth-submit i { font-size: 23px; line-height: 1; }
body#tfpLoginPage .auth-form--activation { margin: 0 0 18px; }
body#tfpLoginPage .auth-form--activation > button {
    min-height: 48px;
    border-color: #d9c6f6 !important;
    background: #f4edfd !important;
    color: #5b249e !important;
    font-size: 14px;
    box-shadow: none !important;
}
body#tfpLoginPage .auth-form--activation > button:hover { background: #eadefa !important; color: #4e1d8c !important; box-shadow: none !important; }

body#tfpLoginPage .auth-error,
body#tfpLoginPage .auth-success {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

body#tfpLoginPage .auth-register {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    column-gap: 8px;
    margin-top: 26px;
    padding-top: 16px;
    border-top: 1px solid #e9e5f0;
    color: #616c7f;
    font-size: 13px;
    line-height: 1.5;
}

body#tfpLoginPage .auth-box :is(a, button, input[type="checkbox"]):focus-visible {
    outline: 3px solid #8d5bdf !important;
    outline-offset: 3px;
}

/* A late shared header stylesheet used to paint the login text white on white. */
body#tfpLoginPage .header .header__actions .header__login {
    color: #0b2132 !important;
    -webkit-text-fill-color: #0b2132 !important;
    background: #fff !important;
    border-color: #e3deee !important;
    opacity: 1 !important;
    text-shadow: none !important;
}
body#tfpLoginPage .header .header__actions .header__login:hover { background: #eee8f8 !important; }
body#tfpLoginPage .header .header__actions .header__join {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    background: #7435df !important;
    border-color: #7435df !important;
}
body#tfpLoginPage .header .header__actions .header__join:hover { background: #6227c5 !important; }

/* TFP Chat keeps its existing compact shell and host-specific entry links. */
body#tfpLoginPage.tfp-chat-app-login .auth-shell {
    min-height: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
}
body#tfpLoginPage.tfp-chat-app-login .auth-box button.auth-submit { background: #0c796f !important; }

@media (min-width: 1001px) and (max-width: 1199px) {
    body#tfpLoginPage .auth-showcase { padding: 36px 30px; }
    body#tfpLoginPage .auth-box { padding: 36px 30px; }
}

@media (max-width: 1000px) {
    body#tfpLoginPage .auth-page { align-items: flex-start; padding: 24px 20px 36px; }
    body#tfpLoginPage .auth-shell {
        grid-template-columns: minmax(0, 1fr);
        width: min(560px, 100%);
        min-height: 0;
        gap: 16px;
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }
    body#tfpLoginPage .auth-showcase {
        min-height: 192px;
        padding: 24px;
        border-radius: 22px;
    }
    body#tfpLoginPage .auth-showcase__content { width: 52%; max-width: none; }
    body#tfpLoginPage .auth-showcase__eyebrow { min-height: 24px; margin-bottom: 12px; padding: 4px 9px; font-size: 9px; letter-spacing: .07em; }
    body#tfpLoginPage .auth-showcase h2 { font-size: 36px; line-height: 1.05; }
    body#tfpLoginPage .auth-showcase__lead { display: none; }
    body#tfpLoginPage .auth-showcase__mobile-lead { display: block; margin-top: 10px; font-size: 14px; }
    body#tfpLoginPage .auth-showcase__visual { inset: auto 0 0 auto; width: 48%; max-width: 220px; height: auto; }
    body#tfpLoginPage .auth-showcase__secure { display: none; }
    body#tfpLoginPage .auth-box { padding: 30px; border: 1px solid #e7e3ee; border-radius: 22px; box-shadow: 0 8px 28px #30204a05; }
    body#tfpLoginPage .auth-box h1 { font-size: 36px; }
    body#tfpLoginPage .auth-lead { margin-bottom: 24px; }
}

@media (max-width: 600px) {
    body#tfpLoginPage .auth-page {
        padding: 14px max(12px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
        background: #f5f4f9 !important;
    }
    body#tfpLoginPage .auth-shell { gap: 12px; }
    body#tfpLoginPage .auth-showcase { min-height: 172px; padding: 20px; border-radius: 20px; }
    body#tfpLoginPage .auth-showcase h2 { font-size: 32px; }
    body#tfpLoginPage .auth-showcase__mobile-lead { font-size: 12px; line-height: 1.5; }
    body#tfpLoginPage .auth-box { padding: 24px 22px 18px; border-radius: 20px; }
    body#tfpLoginPage .auth-kicker { margin-bottom: 9px; font-size: 10px; }
    body#tfpLoginPage .auth-box h1 { font-size: 32px; }
    body#tfpLoginPage .auth-lead { margin: 10px 0 22px; font-size: 13px; }
    body#tfpLoginPage .auth-form { gap: 14px; }
    body#tfpLoginPage .auth-form__options { row-gap: 0; column-gap: 12px; }
    body#tfpLoginPage .auth-forgot { margin-left: auto; }
    body#tfpLoginPage .auth-register { margin-top: 22px; padding-top: 12px; font-size: 12px; }
    body#tfpLoginPage .auth-register a { font-size: 12px; }
    body#tfpLoginPage .header .header__actions .header__login,
    body#tfpLoginPage .header .header__actions .header__join { display: none !important; }
}

@media (max-width: 359px) {
    body#tfpLoginPage .auth-showcase { min-height: 160px; padding: 18px 16px; }
    body#tfpLoginPage .auth-showcase__eyebrow { font-size: 8px; padding: 4px 6px; letter-spacing: .04em; }
    body#tfpLoginPage .auth-showcase h2 { font-size: 28px; }
    body#tfpLoginPage .auth-box { padding-left: 18px; padding-right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    body#tfpLoginPage .auth-box :is(a, input, button) { transition: none !important; }
}
