.auth-page { background: #fff; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 992px) {
    .auth-shell { grid-template-columns: 1.05fr 1fr; }
}

.auth-brand {
    display: none;
    position: relative;
    overflow: hidden;
    flex-direction: column;
    justify-content: space-between;
    gap: 2.5rem;
    padding: 2.75rem 3.5rem;
    color: var(--tp-cream);
    background: linear-gradient(160deg, var(--tp-navy) 0%, var(--tp-navy-raised) 55%, var(--tp-navy) 100%);
}
@media (min-width: 992px) {
    .auth-brand { display: flex; }
}
.auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 25%, transparent 75%);
    mask-image: radial-gradient(ellipse at 50% 50%, #000 25%, transparent 75%);
    pointer-events: none;
}
.auth-orb { position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; animation: tp-orb 16s ease-in-out infinite; }
.auth-orb-1 { width: 420px; height: 420px; top: -170px; right: -150px; background: var(--tp-orange); opacity: .32; }
.auth-orb-2 { width: 340px; height: 340px; bottom: -150px; left: -110px; background: var(--tp-blue); opacity: .24; animation-delay: -6s; }
.auth-orb-3 { width: 220px; height: 220px; top: 55%; left: 58%; background: var(--tp-orange-light); opacity: .12; animation-delay: -11s; }
.auth-brand > *:not(.auth-orb) { position: relative; z-index: 1; }

.auth-brand-title {
    font-size: clamp(1.9rem, 2.6vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.03em;
    color: #fff;
    margin: 1.1rem 0 .9rem;
    text-wrap: balance;
}
.auth-brand-sub { color: var(--tp-slate); font-size: .98rem; line-height: 1.7; max-width: 30rem; margin: 0; }

.auth-demo {
    margin-top: 2rem;
    max-width: 27rem;
    overflow: hidden;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 18px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.auth-demo-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .85rem 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    font-size: .82rem;
    font-weight: 700;
}
.auth-demo-live { display: inline-flex; align-items: center; gap: .45rem; font-size: .72rem; color: #75d6a8; }
.auth-demo-row {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .75rem 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    font-size: .8rem;
    color: var(--tp-slate);
}
.auth-demo-row:last-child { border-bottom: 0; }
.auth-demo-time { min-width: 2.8rem; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.auth-demo-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.auth-facts { display: flex; flex-wrap: wrap; gap: 1.5rem 2.25rem; font-size: .85rem; color: var(--tp-slate); }
.auth-facts strong { display: block; font-size: 1.15rem; font-weight: 800; color: #fff; }

.auth-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: hidden;
    padding: 1.5rem 1rem;
    background: var(--tp-bg);
}
@media (min-width: 576px) {
    .auth-panel { padding: 2rem 2.5rem; }
}
@media (min-width: 992px) {
    .auth-panel { background: #fff; padding: 2.75rem 3.5rem; }
}
.auth-panel::before {
    content: '';
    position: absolute;
    width: 340px;
    height: 340px;
    top: -170px;
    right: -120px;
    border-radius: 50%;
    background: var(--tp-orange);
    opacity: .14;
    filter: blur(70px);
    pointer-events: none;
}
@media (min-width: 992px) {
    .auth-panel::before { display: none; }
}

.auth-topbar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
@media (min-width: 992px) {
    .auth-topbar { justify-content: flex-end; }
}
.auth-wordmark {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -.03em;
    color: var(--tp-text);
    text-decoration: none;
}
.auth-wordmark-text span { color: var(--tp-orange); }
.auth-wordmark:hover { color: var(--tp-text); }
.auth-back {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .8rem;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--tp-muted);
    text-decoration: none;
    transition: background .2s, color .2s;
}
.auth-back i { transition: transform .2s; }
.auth-back:hover { color: var(--tp-orange-dark); background: var(--tp-orange-dim); }
.auth-back:hover i { transform: translateX(-3px); }

.auth-body { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; padding: 1.5rem 0; }
.auth-card { width: 100%; max-width: 420px; }
@media (max-width: 991.98px) {
    .auth-card {
        background: #fff;
        border: 1px solid var(--tp-border);
        border-radius: 20px;
        padding: 2rem 1.5rem;
        box-shadow: 0 24px 48px -24px rgba(14, 26, 43, .22);
    }
}
.auth-card > * { animation: tp-rise .55s cubic-bezier(.2, .7, .2, 1) both; }
.auth-card > :nth-child(2) { animation-delay: .07s; }
.auth-card > :nth-child(3) { animation-delay: .14s; }
.auth-card > :nth-child(4) { animation-delay: .21s; }
.auth-card > :nth-child(5) { animation-delay: .28s; }
.auth-card > :nth-child(n + 6) { animation-delay: .35s; }

.auth-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    margin-bottom: 1.25rem;
    font-size: 1.45rem;
    color: #fff;
    background: linear-gradient(135deg, var(--tp-orange), var(--tp-orange-dark));
    box-shadow: 0 12px 24px -8px rgba(185, 64, 26, .55);
}
.auth-title { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: .35rem; }
.auth-sub { color: var(--tp-muted); font-size: .92rem; line-height: 1.6; margin-bottom: 1.75rem; }

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    margin-bottom: 1.25rem;
    padding: .85rem 1rem;
    border: 1px solid;
    border-radius: 12px;
    font-size: .86rem;
    line-height: 1.5;
}
.auth-alert i { margin-top: 1px; }
.auth-alert.is-success { background: #edf9f2; border-color: #bfe8cf; color: #146c43; }
.auth-alert.is-info { background: rgba(242, 92, 42, .07); border-color: var(--tp-orange-border); color: #8a3214; }

.f-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: .45rem;
    font-size: .82rem;
    font-weight: 700;
}
.f-label a { font-weight: 600; color: var(--tp-blue); text-decoration: none; }
.f-label a:hover { text-decoration: underline; }
.field { position: relative; }
.field .lead-ic {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #74848d;
    font-size: 1.05rem;
    pointer-events: none;
    transition: color .2s;
}
.field input {
    width: 100%;
    height: 52px;
    padding: 0 1rem 0 2.85rem;
    border: 1.5px solid #e1e7ec;
    border-radius: 12px;
    background: #f5f8fa;
    color: var(--tp-text);
    font-size: .95rem;
    font-family: inherit;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.field input.has-toggle { padding-right: 3.2rem; }
.field input::placeholder { color: #74848d; }
.field input:hover { border-color: #cdd7de; }
.field input:focus { outline: none; border-color: var(--tp-blue); background: #fff; box-shadow: 0 0 0 4px rgba(13, 110, 253, .12); }
.field:focus-within .lead-ic { color: var(--tp-blue); }
.field input.is-invalid { border-color: #dc3545; background: #fff8f8; }
.toggle-pass {
    position: absolute;
    right: .45rem;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #74848d;
    font-size: 1.1rem;
    transition: background .2s, color .2s;
}
.toggle-pass:hover,
.toggle-pass:focus-visible { color: var(--tp-blue); background: rgba(13, 110, 253, .08); outline: none; box-shadow: 0 0 0 2px rgba(13, 110, 253, .35); }
.caps-hint { display: none; align-items: center; gap: .35rem; margin-top: .5rem; font-size: .78rem; font-weight: 600; color: #8a5300; }
.caps-hint.show { display: flex; }
.f-error { display: flex; align-items: center; gap: .4rem; margin-top: .45rem; font-size: .8rem; font-weight: 600; color: #b02a37; }

.btn-auth {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    border: 0;
    border-radius: 12px;
    color: #fff;
    font-weight: 700;
    font-size: .98rem;
    background: linear-gradient(135deg, var(--tp-blue) 0%, #0a58ca 100%);
    box-shadow: 0 12px 26px -10px rgba(13, 110, 253, .6);
    transition: transform .2s, box-shadow .2s, filter .2s;
}
.btn-auth::after {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .28), transparent);
    transform: skewX(-20deg);
    transition: left .6s;
}
.btn-auth:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -10px rgba(13, 110, 253, .7); }
.btn-auth:hover::after { left: 125%; }
.btn-auth:active { transform: none; }
.btn-auth:focus-visible { outline: 3px solid rgba(13, 110, 253, .45); outline-offset: 2px; }
.btn-auth .arrow { transition: transform .2s; }
.btn-auth:hover .arrow { transform: translateX(4px); }
.btn-auth .spin {
    display: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tp-spin .7s linear infinite;
}
.btn-auth.is-loading { pointer-events: none; filter: saturate(.85); }
.btn-auth.is-loading .spin { display: inline-block; }
.btn-auth.is-loading .arrow { display: none; }

.auth-divider { display: flex; align-items: center; gap: .9rem; margin: 1.6rem 0 1.25rem; font-size: .8rem; color: var(--tp-muted); }
.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: #e1e7ec; }
.btn-auth-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    height: 48px;
    border: 1.5px solid #e1e7ec;
    border-radius: 12px;
    background: #fff;
    color: var(--tp-text);
    font-weight: 700;
    font-size: .92rem;
    text-decoration: none;
    transition: border-color .2s, color .2s, background .2s;
}
.btn-auth-secondary:hover { border-color: var(--tp-orange); color: var(--tp-orange-dark); background: #fff8f5; }
.btn-auth-secondary:focus-visible { outline: 3px solid rgba(242, 92, 42, .4); outline-offset: 2px; }
.badge-free { font-size: .7rem; font-weight: 700; color: var(--tp-orange-dark); background: var(--tp-orange-dim); padding: .2rem .5rem; border-radius: 999px; }
.auth-note { margin: 1.25rem 0 0; font-size: .8rem; color: var(--tp-muted); text-align: center; line-height: 1.6; }
.auth-note a { color: var(--tp-blue); }
.auth-link-button { background: none; border: 0; padding: 0; color: var(--tp-muted); font-size: .88rem; font-weight: 600; text-decoration: underline; }
.auth-link-button:hover { color: var(--tp-text); }

.auth-foot { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; font-size: .8rem; color: var(--tp-muted); }
.auth-foot a { color: var(--tp-muted); text-decoration: none; }
.auth-foot a:hover { color: var(--tp-orange-dark); text-decoration: underline; }
.auth-foot-links { display: flex; flex-wrap: wrap; gap: .25rem .9rem; }

@keyframes tp-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -50px) scale(1.08); }
    66% { transform: translate(-30px, 30px) scale(.94); }
}
@keyframes tp-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes tp-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .auth-orb, .auth-card > * { animation: none; }
    .btn-auth, .btn-auth::after, .btn-auth .arrow, .auth-back i { transition: none; }
    .btn-auth:hover { transform: none; }
}

.auth-alert.is-danger { background: #fff5f5; border-color: #f3c2c7; color: #b02a37; }

.destination-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    max-width: 100%;
    padding: .15rem .65rem;
    border: 1px solid #e1e7ec;
    border-radius: 999px;
    background: #f5f8fa;
    font-weight: 700;
    color: var(--tp-text);
    word-break: break-all;
}
.auth-sub .change-link { margin-left: .25rem; font-weight: 600; color: var(--tp-blue); text-decoration: none; white-space: nowrap; }
.auth-sub .change-link:hover { text-decoration: underline; }

.otp-group { display: flex; justify-content: space-between; gap: .5rem; }
.otp-box {
    flex: 1;
    min-width: 0;
    max-width: 58px;
    height: 60px;
    text-align: center;
    font-family: inherit;
    font-size: 1.5rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--tp-text);
    border: 1.5px solid #e1e7ec;
    border-radius: 12px;
    background: #f5f8fa;
    caret-color: var(--tp-blue);
    transition: border-color .2s, background .2s, box-shadow .2s, transform .15s;
}
.otp-box:hover { border-color: #cdd7de; }
.otp-box:focus { outline: none; border-color: var(--tp-blue); background: #fff; box-shadow: 0 0 0 4px rgba(13, 110, 253, .12); }
.otp-box.is-filled { border-color: rgba(13, 110, 253, .55); background: #fff; animation: tp-pop .18s ease; }
.otp-group.is-complete .otp-box { border-color: var(--tp-blue); }
.otp-group.is-invalid .otp-box { border-color: #dc3545; background: #fff8f8; }

.otp-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    margin-top: .85rem;
    font-size: .8rem;
    color: var(--tp-muted);
}
.otp-expiry { display: inline-flex; align-items: center; gap: .35rem; font-variant-numeric: tabular-nums; }
.otp-expiry.is-expired { color: #b02a37; font-weight: 600; }
.link-btn { background: none; border: 0; padding: 0; font-size: inherit; font-weight: 700; color: var(--tp-blue); font-variant-numeric: tabular-nums; }
.link-btn:hover { text-decoration: underline; }
.link-btn:disabled { color: var(--tp-muted); text-decoration: none; cursor: not-allowed; }

@keyframes tp-pop { 50% { transform: scale(1.08); } }

@media (prefers-reduced-motion: reduce) {
    .otp-box, .otp-box.is-filled { animation: none; transition: none; }
}
