/**
 * Telas públicas — login, setup, recuperação de senha
 * Layout split-screen reutilizável (tokens --lt-*)
 */

:root {
    --lt-auth-brand: var(--lt-primary, #2563eb);
    --lt-auth-brand-dark: var(--lt-primary-dark, #1e40af);
    --lt-auth-accent: #38bdf8;
    --lt-auth-surface: rgba(255, 255, 255, 0.96);
    --lt-auth-border: rgba(148, 163, 184, 0.35);
    --lt-auth-text: var(--lt-text, #0f172a);
    --lt-auth-muted: var(--lt-text-muted, #64748b);
    --lt-auth-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    --lt-auth-radius: 20px;
}

/* ---- Base ---- */

html,
body.lt-auth-page {
    min-height: 100vh;
    margin: 0;
    font-family: var(--lt-font);
    color: var(--lt-auth-text);
    background: #0b1220;
}

body.lt-auth-page {
    position: relative;
    overflow-x: hidden;
}

.lt-auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 60% at 10% 20%, rgba(37, 99, 235, 0.45), transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 80%, rgba(56, 189, 248, 0.25), transparent 50%),
        linear-gradient(145deg, #0f172a 0%, #1e293b 45%, #0b1220 100%);
    overflow: hidden;
}

.lt-auth-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    animation: ltAuthFloat 14s ease-in-out infinite;
}

.lt-auth-blob--1 {
    width: 420px;
    height: 420px;
    top: -80px;
    left: -60px;
    background: rgba(37, 99, 235, 0.35);
}

.lt-auth-blob--2 {
    width: 320px;
    height: 320px;
    bottom: 10%;
    right: 8%;
    background: rgba(56, 189, 248, 0.22);
    animation-delay: -4s;
}

.lt-auth-blob--3 {
    width: 260px;
    height: 260px;
    top: 45%;
    left: 38%;
    background: rgba(99, 102, 241, 0.18);
    animation-delay: -8s;
}

@keyframes ltAuthFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(12px, -18px) scale(1.04); }
}

/* ---- Shell ---- */

.lt-auth-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(300px, 1fr) minmax(340px, 480px);
}

.lt-auth--wide .lt-auth-shell {
    grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem;
    gap: 1.5rem;
    align-items: stretch;
}

.lt-auth--centered .lt-auth-shell {
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.25rem;
    gap: 0;
    align-items: center;
}

/* ---- Brand panel ---- */

.lt-auth-brand {
    display: flex;
    align-items: center;
    padding: clamp(1.5rem, 4vw, 3rem);
    color: #f8fafc;
}

.lt-auth-brand__inner {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-height: 100%;
}

.lt-auth-brand__head {
    animation: ltAuthFadeUp 0.6s ease both;
}

.lt-auth-brand__logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.15rem 1.65rem;
    margin-bottom: 1.5rem;
    background: #ffffff;
    border-radius: 18px;
    box-shadow:
        0 14px 36px rgba(0, 0, 0, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.65);
}

.lt-auth-brand__logo {
    display: block;
    max-width: min(340px, 100%);
    max-height: 110px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0;
}

.lt-auth-brand__icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    margin-bottom: 1.25rem;
    font-size: 1.75rem;
    color: #fff;
    backdrop-filter: blur(8px);
}

.lt-auth-brand__title {
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 0 0 0.5rem;
    color: #fff;
}

.lt-auth-brand__subtitle {
    margin: 0;
    font-size: 1rem;
    line-height: 1.55;
    color: rgba(248, 250, 252, 0.78);
    max-width: 34ch;
}

.lt-auth-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lt-auth-features__item {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: ltAuthFadeUp 0.6s ease both;
}

.lt-auth-features__item:nth-child(2) { animation-delay: 0.08s; }
.lt-auth-features__item:nth-child(3) { animation-delay: 0.16s; }

.lt-auth-features__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(56, 189, 248, 0.18);
    color: #7dd3fc;
    font-size: 1.1rem;
}

.lt-auth-features__item strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.15rem;
}

.lt-auth-features__item span {
    display: block;
    font-size: 0.84rem;
    line-height: 1.45;
    color: rgba(248, 250, 252, 0.72);
}

.lt-auth-brand__footer {
    margin-top: auto;
    padding-top: 1rem;
    color: rgba(248, 250, 252, 0.55);
    font-size: 0.8rem;
}

.lt-auth-brand__footer i {
    margin-right: 0.35rem;
}

/* ---- Main / card ---- */

.lt-auth-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(1rem, 3vw, 2rem);
}

.lt-auth--wide .lt-auth-main {
    justify-content: flex-start;
    padding: 0;
}

.lt-auth-card {
    width: 100%;
    background: var(--lt-auth-surface);
    border: 1px solid var(--lt-auth-border);
    border-radius: var(--lt-auth-radius);
    box-shadow: var(--lt-auth-shadow);
    backdrop-filter: blur(16px);
    overflow: hidden;
    animation: ltAuthFadeUp 0.55s ease 0.1s both;
}

.lt-auth--centered .lt-auth-card {
    max-width: 440px;
    margin: 0 auto;
}

.lt-auth--payment .lt-auth-card {
    max-width: 520px;
    margin: 0 auto;
}

.lt-auth--payment .lt-auth-shell {
    max-width: 1080px;
}

.lt-auth--wide .lt-auth-card {
    min-height: calc(100vh - 3rem);
}

.lt-auth-card__head {
    padding: 1.75rem 1.75rem 0;
}

.lt-auth-card__title {
    margin: 0 0 0.35rem;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--lt-auth-text);
}

.lt-auth-card__subtitle {
    margin: 0;
    color: var(--lt-auth-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.lt-auth-card__body {
    padding: 1.75rem;
}

.lt-auth--wide .lt-auth-card__body {
    padding: 1.5rem 1.75rem 2rem;
}

.lt-auth-mobile-footer {
    display: none;
    text-align: center;
    margin: 1rem 0 0;
    font-size: 0.78rem;
    color: rgba(248, 250, 252, 0.55);
}

.lt-auth-mobile-footer i {
    margin-right: 0.25rem;
}

/* ---- Form ---- */

.lt-auth-label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--lt-auth-text);
}

.lt-auth-input-wrap {
    position: relative;
}

.lt-auth-input-icon {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--lt-auth-muted);
    font-size: 1rem;
    pointer-events: none;
    z-index: 2;
}

.lt-auth-input {
    width: 100%;
    padding: 0.78rem 0.95rem 0.78rem 2.65rem !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    background: #fff !important;
    font-size: 0.95rem !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lt-auth-input:focus {
    border-color: var(--lt-auth-brand) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12) !important;
}

.lt-auth-input-wrap--password .lt-auth-input {
    padding-right: 2.75rem !important;
}

.lt-auth-password-toggle {
    position: absolute;
    right: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--lt-auth-muted);
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.lt-auth-password-toggle:hover {
    color: var(--lt-auth-brand);
    background: rgba(37, 99, 235, 0.08);
}

.lt-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin-top: 0.25rem;
    padding: 0.85rem 1.25rem;
    border: 0;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff !important;
    background: linear-gradient(135deg, var(--lt-auth-brand) 0%, var(--lt-auth-brand-dark) 100%);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.lt-auth-btn:hover,
.lt-auth-btn:focus {
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.34);
    filter: brightness(1.03);
}

.lt-auth-btn:active {
    transform: translateY(0);
}

.lt-auth-btn.is-loading {
    pointer-events: none;
    opacity: 0.85;
}

.lt-auth-note {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.82rem;
    color: var(--lt-auth-muted);
}

.lt-auth-note i {
    color: var(--lt-auth-brand);
    margin-right: 0.25rem;
}

.lt-auth-alert {
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.lt-auth-alert--emphasis {
    border: 0;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #991b1b;
}

.lt-auth-alert--emphasis strong {
    color: #b91c1c;
}

/* ---- Status / bloqueio / PIX ---- */

.lt-auth-status {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.25rem;
    border-radius: 20px;
    display: grid;
    place-items: center;
    font-size: 2rem;
}

.lt-auth-status--danger {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.lt-auth-status--warning {
    background: rgba(217, 119, 6, 0.12);
    color: #d97706;
}

.lt-auth-solutions__title {
    margin: 0 0 0.85rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--lt-auth-text);
}

.lt-auth-solutions__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.lt-auth-solutions__list li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--lt-auth-muted);
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #f1f5f9;
}

.lt-auth-solutions__list li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.lt-auth-solutions__list i {
    color: var(--lt-success, #16a34a);
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.lt-auth-actions--stack {
    flex-direction: column;
}

.lt-auth-actions--stack .lt-auth-btn,
.lt-auth-actions--stack .btn {
    width: 100%;
    justify-content: center;
}

.lt-auth-invoice {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem 1.15rem;
    margin-bottom: 1.5rem;
}

.lt-auth-invoice__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.45rem 0;
    font-size: 0.88rem;
}

.lt-auth-invoice__row + .lt-auth-invoice__row {
    border-top: 1px solid #e2e8f0;
}

.lt-auth-invoice__row span {
    color: var(--lt-auth-muted);
}

.lt-auth-invoice__row strong {
    color: var(--lt-auth-text);
    text-align: right;
}

.lt-auth-invoice__amount {
    font-size: 1.05rem;
    color: var(--lt-auth-brand-dark) !important;
}

.lt-auth-pix__title {
    margin: 0 0 1rem;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
}

.lt-auth-pix__qr {
    text-align: center;
    padding: 1.25rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    margin-bottom: 1rem;
}

.lt-auth-pix__qr img {
    max-width: 220px;
    width: 100%;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 0.75rem;
}

.lt-auth-pix__code {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
}

.lt-auth-pix__code-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--lt-auth-muted);
    margin-bottom: 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.lt-auth-pix__code code {
    display: block;
    word-break: break-all;
    font-size: 0.78rem;
    line-height: 1.5;
    color: #0f172a;
    white-space: pre-wrap;
}

.lt-auth-btn--success {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
    box-shadow: 0 10px 24px rgba(22, 163, 74, 0.22) !important;
    margin-bottom: 0.5rem;
}

.lt-auth-btn--success:hover {
    box-shadow: 0 14px 28px rgba(22, 163, 74, 0.3) !important;
}

/* ---- Setup / wide content ---- */

.lt-auth-section-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.lt-auth-section-title h5,
.lt-auth-section-title h6 {
    margin: 0;
    font-weight: 700;
}

.lt-auth-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(37, 99, 235, 0.1);
    color: var(--lt-auth-brand-dark);
}

.lt-auth--wide .form-control,
.lt-auth--wide .form-select {
    border-radius: 10px;
    border-color: #e2e8f0;
    padding: 0.6rem 0.85rem;
}

.lt-auth--wide .form-control:focus,
.lt-auth--wide .form-select:focus {
    border-color: var(--lt-auth-brand);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.lt-auth--wide .form-label {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--lt-auth-text);
}

.lt-auth-module-check {
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    transition: border-color 0.2s ease, background 0.2s ease;
    cursor: pointer;
}

.lt-auth-module-check:has(input:checked) {
    border-color: var(--lt-auth-brand) !important;
    background: rgba(37, 99, 235, 0.04);
}

.lt-auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

@keyframes ltAuthFadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Responsive ---- */

@media (max-width: 960px) {
    .lt-auth-shell {
        grid-template-columns: 1fr;
        padding: 0;
        max-width: none;
    }

    .lt-auth--centered .lt-auth-shell,
    .lt-auth--wide .lt-auth-shell {
        padding: 0;
        gap: 0;
    }

    .lt-auth-brand {
        padding: 1.5rem 1.25rem 1rem;
        align-items: flex-start;
    }

    .lt-auth-brand__inner {
        gap: 0;
        min-height: auto;
    }

    .lt-auth-features,
    .lt-auth-brand__footer {
        display: none;
    }

    .lt-auth-brand__logo-wrap {
        padding: 0.85rem 1.15rem;
        margin-bottom: 1rem;
        border-radius: 14px;
    }

    .lt-auth-brand__logo {
        max-width: min(260px, 100%);
        max-height: 80px;
    }

    .lt-auth-brand__title {
        font-size: 1.35rem;
    }

    .lt-auth-brand__subtitle {
        font-size: 0.9rem;
    }

    .lt-auth-main {
        padding: 0 1rem 1.5rem;
    }

    .lt-auth--wide .lt-auth-main {
        padding: 0 1rem 1.5rem;
    }

    .lt-auth--wide .lt-auth-card {
        min-height: auto;
    }

    .lt-auth-card {
        border-radius: 18px;
    }

    .lt-auth-mobile-footer {
        display: block;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lt-auth-blob,
    .lt-auth-brand__head,
    .lt-auth-features__item,
    .lt-auth-card {
        animation: none;
    }
}

/* ---- Aliases legados (login antigo) ---- */

body.lt-login-page {
    min-height: 100vh;
    margin: 0;
    font-family: var(--lt-font);
}

.login-wrap,
.lt-login-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 0 1rem;
}

.login-card,
.lt-login-card {
    background: var(--lt-auth-surface);
    border-radius: var(--lt-auth-radius);
    box-shadow: var(--lt-auth-shadow);
    border: 1px solid var(--lt-auth-border);
}

.btn-login,
.lt-btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.85rem 1.25rem;
    border: 0;
    border-radius: 12px;
    font-weight: 700;
    color: #fff !important;
    background: linear-gradient(135deg, var(--lt-auth-brand) 0%, var(--lt-auth-brand-dark) 100%);
}
