/* ==========================================================================
   TrainBrain auth pages (sign in, sign up, password reset)
   Requires brand.css. Layered on top of style.css (Bootstrap 5 + theme), which
   already provides .auth-main / .auth-wrapper / .auth-form and the form
   controls. Namespaced `tb-auth` so nothing leaks into the signed-in app UI.
   ========================================================================== */

.tb-auth {
    display: flex;
    align-items: stretch;
    background: #fff;
}

/* ---------------------------------------------------------------- ink aside */

.tb-auth__aside {
    position: relative;
    overflow: hidden;
    flex: 0 0 44%;
    max-width: 620px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2.5rem;
    padding: clamp(40px, 4vw, 56px);
    background: var(--lp-ink);
    color: var(--lp-dim);
}

.tb-auth__aside>* {
    position: relative;
    z-index: 2;
}

.tb-auth__aside .lp-h2 {
    font-size: clamp(1.6rem, 2.4vw, 2.1rem);
    color: #fff;
}

.tb-auth__aside .lp-lead {
    font-size: 1rem;
    max-width: 42ch;
}

.tb-auth__facts {
    display: grid;
    gap: 1.35rem;
    margin: 0;
    padding-top: 1.75rem;
    border-top: 1px solid var(--lp-line-dark);
}

.tb-auth__facts dt {
    color: var(--lp-mist);
    font-weight: 500;
}

.tb-auth__facts dd {
    margin: 0.35rem 0 0;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.tb-auth__back {
    color: var(--lp-dim);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
}

.tb-auth__back:hover,
.tb-auth__back:focus-visible {
    color: #fff;
}

/* ----------------------------------------------------------------- the form */

.tb-auth__form {
    flex: 1 1 auto;
    padding: 24px;
}

.tb-auth__form .card {
    width: 100%;
    max-width: 440px;
    margin: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.tb-auth__form .card-body {
    padding: 0;
}

.tb-auth__brand {
    margin-bottom: 2.5rem;
}

.tb-auth__head {
    margin-bottom: 1.85rem;
}

.tb-auth__title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: #1d2630;
}

.tb-auth__sub {
    margin: 0.65rem 0 0;
    color: #5b6b79;
    font-size: 0.9688rem;
    line-height: 1.6;
}

.tb-auth .form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: var(--lp-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #5b6b79;
}

.tb-auth .form-control,
.tb-auth .form-select {
    padding: 0.7rem 0.9rem;
}

.tb-auth .btn-primary {
    padding: 0.75rem 1rem;
    font-weight: 600;
}

.tb-auth .invalid-feedback {
    font-size: 0.8125rem;
}

/* the row holding "remember me" and the forgotten-password link */
.tb-auth__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.25rem;
}

.tb-auth__row label,
.tb-auth__row a {
    font-size: 0.875rem;
}

/* the "no account yet?" line under the form */
.tb-auth__alt {
    margin: 1.85rem 0 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--lp-line-light);
    color: #5b6b79;
    font-size: 0.9375rem;
}

/* confirmation screens (account created, check your email) */
.tb-auth__state {
    text-align: center;
}

.tb-auth__state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
    border-radius: 18px;
    font-size: 1.75rem;
    background: rgba(44, 168, 127, 0.12);
    color: var(--lp-ledger);
}

.tb-auth__state .tb-auth__sub {
    margin-left: auto;
    margin-right: auto;
    max-width: 38ch;
}

.tb-auth a:focus-visible,
.tb-auth .btn:focus-visible,
.tb-auth .form-control:focus-visible {
    outline: 2px solid #7ea6ff;
    outline-offset: 2px;
}

/* -------------------------------------------------------------- responsive */

@media (max-width: 1199.98px) {
    .tb-auth__aside {
        display: none;
    }

    .tb-auth__form {
        justify-content: center;
    }
}

@media (max-width: 575.98px) {
    .tb-auth__brand {
        margin-bottom: 2rem;
    }

    .tb-auth__title {
        font-size: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tb-auth__back {
        transition: none;
    }
}
