/*
 * True Impact Foundation — authentication pages
 * Shared by login and future password/OTP screens.
 * Global brand tokens, buttons, alerts and fields remain in app.css.
 */

.tif-login-shell,
.tif-login-shell * {
    box-sizing: border-box;
}

.tif-login-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(440px, 1.02fr) minmax(440px, .98fr);
    grid-template-areas: "proof login";
    background: #fff;
}

.tif-login-panel {
    grid-area: login;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 100vh;
    padding: 48px clamp(34px, 6vw, 92px);
    background:
        radial-gradient(circle at 100% 0%, rgba(100, 74, 158, .14), transparent 32%),
        radial-gradient(circle at 4% 96%, rgba(244, 183, 46, .09), transparent 25%),
        #fff;
}

.tif-login-panel::before,
.tif-login-panel::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.tif-login-panel::before {
    top: -155px;
    right: -155px;
    width: 330px;
    height: 330px;
    border: 52px solid rgba(100, 74, 158, .035);
    border-radius: 50%;
    box-shadow: 0 0 0 34px rgba(100, 74, 158, .018);
}

.tif-login-panel::after {
    right: 26px;
    bottom: 22px;
    width: 135px;
    height: 135px;
    opacity: .2;
    background-image: radial-gradient(circle, rgba(100, 74, 158, .48) 1.1px, transparent 1.3px);
    background-size: 17px 17px;
    mask-image: linear-gradient(315deg, #000, transparent 78%);
    -webkit-mask-image: linear-gradient(315deg, #000, transparent 78%);
}

.tif-login-card {
    position: relative;
    z-index: 1;
    width: min(100%, 510px);
}

.tif-login-brand {
    display: inline-flex;
    align-items: center;
    width: min(240px, 64vw);
    margin: 0 0 52px;
    text-decoration: none;
}

.tif-login-brand img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 82px;
    object-fit: contain;
    object-position: left center;
}

.tif-login-heading {
    margin-bottom: 30px;
}

.tif-login-heading .eyebrow {
    color: #644a9e;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
}

.tif-login-heading h1 {
    margin: 10px 0;
    color: #201b27;
    font-size: clamp(38px, 4.5vw, 54px);
    line-height: 1.04;
    font-weight: 700;
    letter-spacing: -.045em;
}

.tif-login-heading p {
    max-width: 450px;
    margin: 0;
    color: #77717c;
    font-size: 16px;
    line-height: 1.65;
}

.tif-login-shell .field-group {
    margin-bottom: 20px;
}

.tif-login-shell .field-group > label,
.tif-login-shell .field-label-row label {
    color: #302a39;
    font-size: 14px;
    font-weight: 650;
}

.tif-login-shell .field-group input {
    min-height: 58px;
    border: 1px solid #ded9e5;
    border-radius: 15px;
    background: #fbfafc;
    color: #25202b;
    font-size: 15px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.tif-login-shell .field-group input:hover {
    border-color: #c9bfd8;
    background: #fff;
}

.tif-login-shell .field-group input:focus {
    border-color: #644a9e;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(100, 74, 158, .11);
}

.tif-login-shell .password-field {
    position: relative;
}

.tif-login-shell .password-field input {
    padding-right: 62px;
}

.tif-password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
    color: #644a9e;
    background: transparent;
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    transition: color .18s ease, background .18s ease;
}

.tif-password-toggle:hover {
    color: #452b80;
    background: #f0ebf8;
}

.tif-password-toggle:focus-visible {
    outline: 3px solid rgba(100, 74, 158, .25);
    outline-offset: 1px;
}

.tif-password-toggle svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tif-password-toggle .tif-eye-closed,
.tif-password-toggle.is-visible .tif-eye-open {
    display: none;
}

.tif-password-toggle.is-visible .tif-eye-closed {
    display: block;
}

.tif-login-shell .button-primary {
    min-height: 58px;
    margin-top: 8px;
    border-radius: 15px;
    background: #644a9e;
    box-shadow: 0 12px 26px rgba(82, 53, 139, .2);
    font-size: 16px;
    font-weight: 700;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.tif-login-shell .button-primary:hover {
    background: #543b8d;
    box-shadow: 0 14px 30px rgba(82, 53, 139, .26);
    transform: translateY(-1px);
}

.tif-login-help {
    margin: 22px 0 0;
    color: #817b86;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}

.tif-login-help a {
    color: #644a9e;
    font-weight: 650;
    text-decoration: none;
}

.tif-login-help a:hover {
    text-decoration: underline;
}

.tif-auth-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 13px;
    color: #9a949f;
    font-size: 12px;
    line-height: 1.5;
}

.tif-auth-legal-links {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.tif-auth-legal-links::before,
.tif-auth-legal-links span + span::before {
    content: "•";
    margin-right: 12px;
    color: #d0cad4;
}

.tif-auth-footer-mobile {
    display: none;
}

.tif-proof-panel {
    grid-area: proof;
    position: relative;
    display: flex !important;
    overflow: hidden;
    min-height: 100vh;
    padding: 48px clamp(34px, 5vw, 76px);
    background:
        radial-gradient(circle at 12% 16%, rgba(255, 255, 255, .13), transparent 29%),
        radial-gradient(circle at 92% 10%, rgba(244, 183, 46, .2), transparent 24%),
        radial-gradient(circle at 78% 90%, rgba(255, 255, 255, .08), transparent 25%),
        linear-gradient(145deg, #6c50a6 0%, #573b8d 50%, #3d236e 100%);
    color: #fff;
}

.tif-proof-panel::before,
.tif-proof-panel::after {
    content: "" !important;
    position: absolute;
    display: block !important;
    pointer-events: none;
}

.tif-proof-panel::before {
    top: -205px;
    right: -190px;
    width: 430px;
    height: 430px;
    border: 68px solid rgba(255, 255, 255, .055);
    border-radius: 50%;
    box-shadow: 0 0 0 45px rgba(255, 255, 255, .025);
}

.tif-proof-panel::after {
    left: 26px;
    bottom: 22px;
    width: 170px;
    height: 170px;
    opacity: .32;
    background-image: radial-gradient(circle, rgba(255, 255, 255, .42) 1.2px, transparent 1.4px);
    background-size: 18px 18px;
    mask-image: linear-gradient(145deg, #000, transparent 78%);
    -webkit-mask-image: linear-gradient(145deg, #000, transparent 78%);
}

.tif-proof-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: min(100%, 620px);
    margin: 0 auto;
}

.tif-testimonial-card {
    width: 100%;
    padding: clamp(26px, 4vw, 40px);
    background: rgba(255, 255, 255, .11);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 24px;
    box-shadow: 0 22px 55px rgba(29, 13, 62, .18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.tif-testimonial-stage {
    display: grid;
    min-height: 315px;
}

.tif-testimonial-slide {
    grid-area: 1 / 1;
    align-self: center;
    visibility: hidden;
    opacity: 0;
    transform: translateX(12px);
    transition: opacity .32s ease, transform .32s ease, visibility .32s ease;
    pointer-events: none;
}

.tif-testimonial-slide.is-active {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.tif-quote-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 22px;
    color: #563d89;
    background: #f4b72e;
    border-radius: 50%;
}

.tif-quote-icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.tif-testimonial-slide blockquote {
    max-width: 500px;
    margin: 0 0 28px;
    color: #fff;
    font-size: clamp(21px, 2.35vw, 30px);
    line-height: 1.42;
    font-weight: 550;
    letter-spacing: -.025em;
}

.tif-testimonial-person {
    display: flex;
    align-items: center;
    gap: 13px;
}

.tif-testimonial-avatar {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    color: #543b87;
    background: #fff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 750;
}

.tif-testimonial-person strong,
.tif-testimonial-person small {
    display: block;
}

.tif-testimonial-person strong {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.tif-testimonial-person small {
    margin-top: 2px;
    color: rgba(255, 255, 255, .7);
    font-size: 12px;
}

.tif-carousel-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .14);
}

.tif-carousel-button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    padding: 0;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease;
}

.tif-carousel-button:hover,
.tif-carousel-button:focus-visible {
    background: rgba(255, 255, 255, .19);
    border-color: rgba(255, 255, 255, .35);
    outline: none;
}

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

.tif-carousel-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tif-carousel-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    background: rgba(255, 255, 255, .35);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: width .2s ease, background .2s ease;
}

.tif-carousel-dot.is-active {
    width: 25px;
    background: #f4b72e;
}

.tif-proof-note {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    line-height: 1.5;
}

.tif-proof-note svg {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    fill: none;
    stroke: #f4b72e;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 900px) {
    .tif-login-shell {
        min-height: 100vh;
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "login"
            "proof";
    }

    .tif-login-panel {
        min-height: auto;
        padding: 30px 22px 42px;
        align-items: flex-start;
    }

    .tif-login-card {
        width: min(100%, 560px);
        margin: 0 auto;
    }

    .tif-login-brand {
        width: min(210px, 58vw);
        justify-content: center;
        margin: 0 auto 38px;
    }

    .tif-login-brand img {
        object-position: center;
    }

    .tif-proof-panel {
        min-height: auto;
        padding: 42px 22px 48px;
    }

    .tif-proof-inner {
        width: min(100%, 560px);
    }

    .tif-auth-footer-desktop {
        display: none;
    }

    .tif-auth-footer-mobile {
        display: flex;
        width: 100%;
        margin: 30px 0 0;
        padding-top: 20px;
        align-items: flex-end;
        justify-content: flex-end;
        flex-direction: column;
        gap: 5px;
        border-top: 1px solid rgba(255, 255, 255, .13);
        color: rgba(255, 255, 255, .68);
        text-align: right;
    }

    .tif-auth-footer-mobile .tif-auth-legal-links {
        color: rgba(255, 255, 255, .82);
    }

    .tif-auth-footer-mobile .tif-auth-legal-links::before {
        display: none;
    }

    .tif-auth-footer-mobile .tif-auth-legal-links span + span::before {
        color: rgba(255, 255, 255, .3);
    }

    .tif-testimonial-slide blockquote {
        font-size: clamp(19px, 5vw, 25px);
    }
}

@media (max-width: 480px) {
    .tif-login-panel {
        padding: 24px 18px 36px;
    }

    .tif-login-brand {
        width: 184px;
        margin-bottom: 30px;
    }

    .tif-login-heading {
        margin-bottom: 25px;
    }

    .tif-login-heading h1 {
        font-size: 36px;
    }

    .tif-login-heading p {
        font-size: 14px;
    }

    .tif-proof-panel {
        padding: 36px 18px 40px;
    }

    .tif-testimonial-card {
        padding: 24px 20px;
        border-radius: 20px;
    }

    .tif-quote-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 18px;
    }

    .tif-testimonial-slide blockquote {
        margin-bottom: 24px;
        line-height: 1.5;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tif-testimonial-slide,
    .tif-login-shell .button-primary {
        transition: none;
    }
}
