/* ==========================================================================
   Login e cadastro web (templates/registration/login.html + modais de
   accounts/_auth_modals.html). Mesma linguagem da landing: Manrope, tema
   claro, roxo da marca e verde só como destaque. Escopo: .tl-auth.
   ========================================================================== */

@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/manrope/manrope-regular.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/manrope/manrope-semibold.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/manrope/manrope-bold.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/manrope/manrope-extrabold.woff2') format('woff2'); }

body { background: #faf9fc; }

.tl-auth {
    --tl-purple: #2b1b4f;
    --tl-purple-dark: #211638;
    --tl-purple-3: #7650ad;
    --tl-lilac: #f0ecf8;
    --tl-green: #b2ff38;
    --tl-green-hover: #a7f32f;
    --tl-text: #281d40;
    --tl-muted: #6c6480;
    --tl-line: rgba(43, 27, 79, .14);
    --tl-ease: cubic-bezier(.45, 0, .25, 1);

    /* Tokens do Bootstrap usados pelos modais (tema claro da marca) */
    --bs-body-color: #281d40;
    --bs-secondary-color: #6c6480;
    --bs-border-color: rgba(43, 27, 79, .14);
    --bs-card-bg: #fff;
    --bs-tertiary-bg: #faf9fc;
    --brand-primary: #2b1b4f;
    --brand-primary-light: #4a3175;
    --brand-accent: #b2ff38;

    font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--tl-text);
    -webkit-font-smoothing: antialiased;
}
.tl-auth :focus-visible { outline: 2px solid var(--tl-purple-3); outline-offset: 2px; }

/* ---------- Página: foto + formulário ---------- */

.tl-auth .login-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100svh;
    padding: 0;
    background: #faf9fc;
}
.tl-auth .login-page::before { display: none; }

.auth-visual {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    margin: 0;
    overflow: hidden;
    background: #2b1b4f;
}
.auth-visual img { width: 100%; height: 100%; object-fit: cover; object-position: 52% 50%; display: block; }
.auth-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(33, 22, 56, .88) 0%, rgba(33, 22, 56, .25) 48%, rgba(33, 22, 56, 0) 70%);
}
.auth-visual-copy {
    position: absolute;
    z-index: 1;
    left: clamp(28px, 4vw, 64px);
    right: clamp(28px, 4vw, 64px);
    bottom: clamp(32px, 5vw, 72px);
    color: #fff;
}
.auth-visual-title {
    margin: 0 0 10px;
    font-size: clamp(2rem, 1.2rem + 2.6vw, 3.6rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.045em;
}
.auth-visual-text { max-width: 26em; margin: 0; color: rgba(255, 255, 255, .78); font-size: 1.02rem; line-height: 1.6; }

.auth-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px clamp(20px, 4vw, 64px);
}
.auth-brand {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--tl-purple);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -.035em;
    text-decoration: none;
}
.auth-brand:hover { color: var(--tl-purple); }
.auth-brand img { border-radius: 9px; }
.auth-back {
    margin-top: auto;
    padding-top: 24px;
    color: var(--tl-muted);
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none;
}
.auth-back:hover { color: var(--tl-purple); }

.tl-auth .login-card {
    width: 100%;
    max-width: 440px;
    margin: auto 0;
    padding: 40px 0 8px;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.tl-auth .login-title {
    margin: 0;
    color: var(--tl-purple);
    font-size: clamp(1.9rem, 1.5rem + 1.2vw, 2.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.04em;
}
.tl-auth .login-subtitle { color: var(--tl-muted); font-size: .95rem; }
.tl-auth .auth-label { display: block; margin-bottom: 6px; color: var(--tl-purple); font-size: .86rem; font-weight: 700; }

.tl-auth .login-input,
.tl-auth .auth-modal-content .form-control,
.tl-auth .auth-modal-content .form-select {
    background-color: #fff;
    border: 1px solid var(--tl-line);
    border-radius: 12px;
    color: var(--tl-text);
    font-family: inherit;
    transition: border-color .2s var(--tl-ease), box-shadow .2s var(--tl-ease);
}
.tl-auth .login-input { min-height: 52px; padding: .8rem 1rem; }
.tl-auth .login-input::placeholder,
.tl-auth .auth-modal-content .form-control::placeholder { color: #a39cb3; }
.tl-auth .login-input:focus,
.tl-auth .auth-modal-content .form-control:focus,
.tl-auth .auth-modal-content .form-select:focus {
    background-color: #fff;
    border-color: var(--tl-purple-3);
    color: var(--tl-text);
    box-shadow: 0 0 0 4px rgba(118, 80, 173, .14);
}
.tl-auth .form-check-input { border-color: rgba(43, 27, 79, .3); }
.tl-auth .form-check-input:checked { background-color: var(--tl-purple); border-color: var(--tl-purple); }
.tl-auth .form-check-label.login-subtitle { color: var(--tl-text); font-size: .9rem; }
.tl-auth .auth-password-toggle { color: var(--tl-muted); }

.tl-auth .login-link { color: var(--tl-purple-3); font-size: .9rem; font-weight: 700; text-decoration: none; }
.tl-auth .login-link:hover { color: var(--tl-purple); text-decoration: underline; }

.tl-auth .login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    border: 0;
    border-radius: 14px;
    background: var(--tl-purple);
    color: #fff;
    font-size: 1.02rem;
    font-weight: 800;
    transition: transform .25s var(--tl-ease), background-color .25s var(--tl-ease), box-shadow .25s var(--tl-ease);
}
.tl-auth .login-btn:hover { background: var(--tl-purple-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 16px 30px -16px rgba(33, 22, 56, .7); }
.tl-auth .login-btn i { transition: transform .25s var(--tl-ease); }
.tl-auth .login-btn:hover i { transform: translateX(3px); }

.tl-auth .alert { border-radius: 12px; font-size: .9rem; }

.auth-signup {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--tl-line);
}

/* Aviso "agende pelo app" */
.tl-auth .login-app-aviso {
    margin: 0 0 24px;
    padding: 18px 18px 16px;
    border: 1px solid rgba(118, 80, 173, .16);
    border-left: 3px solid var(--tl-green);
    border-radius: 16px;
    background: var(--tl-lilac);
    color: var(--tl-text);
}
.tl-auth .login-app-aviso__titulo { margin: 0 0 6px; color: var(--tl-purple); font-size: .98rem; font-weight: 800; line-height: 1.35; }
.tl-auth .login-app-aviso__titulo i { color: var(--tl-purple-3); }
.tl-auth .login-app-aviso__texto { margin: 0; color: var(--tl-muted); font-size: .88rem; line-height: 1.55; }
.tl-auth .login-app-aviso__botoes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.tl-auth .login-app-aviso__loja {
    display: inline-flex;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: none;
    box-shadow: none;
    transition: transform .25s var(--tl-ease);
}
.tl-auth .login-app-aviso__loja:hover { transform: translateY(-2px); background: none; }
.tl-auth .login-app-aviso__loja img { display: block; height: 40px; width: auto; }

@media (max-width: 991.98px) {
    .tl-auth .login-page { grid-template-columns: 1fr; }
    .auth-visual { position: relative; height: clamp(180px, 34vw, 280px); order: -1; }
    .auth-visual-title { font-size: 1.7rem; }
    .auth-visual-text { font-size: .9rem; }
    .auth-main { padding-top: 22px; }
    .tl-auth .login-card { padding-top: 26px; }
}
@media (max-width: 575.98px) {
    .auth-visual-text { display: none; }
    .auth-visual-copy { bottom: 20px; }
}

/* ---------- Modais: cadastro, recuperação, app, confirmação ---------- */

.modal-backdrop.show { background: #211638; opacity: .62; }

.tl-auth .auth-modal-content { background: #fff; color: var(--tl-text); box-shadow: 0 40px 90px -30px rgba(33, 22, 56, .6); }
.tl-auth .auth-modal-header { background: var(--tl-purple); padding: 1.35rem 1.5rem 1.1rem; }
.tl-auth .auth-modal-title { font-weight: 800; letter-spacing: -.02em; }
.tl-auth .auth-progress-step { background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .72); }
.tl-auth .auth-progress-step.active { background: var(--tl-green); color: var(--tl-purple); }
.tl-auth .auth-progress-step.done { background: rgba(178, 255, 56, .28); color: #fff; }
.tl-auth .auth-progress-divider { background: rgba(255, 255, 255, .18); }

.tl-auth .auth-modal-body { padding: 1.75rem 1.75rem 1.5rem; }
.tl-auth .auth-step-title { color: var(--tl-purple); font-weight: 800; letter-spacing: -.03em; }
.tl-auth .auth-step-subtitle { color: var(--tl-muted); }
.tl-auth .auth-modal-content .form-label { color: var(--tl-purple); font-size: .88rem; font-weight: 700; }
.tl-auth .auth-modal-content .form-text { color: var(--tl-muted); }

.tl-auth .auth-profile-card {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 16px;
    border: 1px solid var(--tl-line);
    border-radius: 16px;
    background: #fff;
    transition: border-color .25s var(--tl-ease), box-shadow .25s var(--tl-ease), transform .25s var(--tl-ease), background-color .25s var(--tl-ease);
}
.tl-auth .auth-profile-card:hover { border-color: rgba(118, 80, 173, .55); transform: translateY(-2px); box-shadow: 0 14px 28px -20px rgba(33, 22, 56, .5); }
.tl-auth .auth-profile-card.selected { border-color: var(--tl-purple); background: var(--tl-lilac); box-shadow: inset 4px 0 0 var(--tl-green); }
.tl-auth .auth-profile-icon { flex: 0 0 44px; margin: 0; background: var(--tl-lilac); color: var(--tl-purple-3); }
.tl-auth .auth-profile-card.selected .auth-profile-icon { background: var(--tl-purple); color: var(--tl-green); }
.tl-auth .auth-profile-name { flex: 1 1 auto; color: var(--tl-purple); font-weight: 800; }
.tl-auth .auth-profile-desc { flex: 1 1 100%; padding-left: 60px; margin-top: -6px; color: var(--tl-muted); }

.tl-auth .auth-modal-footer { background: #faf9fc; border-top-color: var(--tl-line); padding: 1rem 1.75rem; }
.tl-auth .auth-modal-footer .btn,
.tl-auth .auth-verificacao-body ~ .modal-footer .btn { border-radius: 12px; font-weight: 800; }
.tl-auth .btn-accent { background: var(--tl-green); border: 0; color: var(--tl-purple); }
.tl-auth .btn-accent:hover,
.tl-auth .btn-accent:focus-visible { background: var(--tl-green-hover); color: var(--tl-purple); }
.tl-auth .btn-accent:disabled { background: #e6e2ee; color: #8f879f; opacity: 1; }
.tl-auth .btn-outline-secondary { border-color: var(--tl-line); color: var(--tl-purple); background: #fff; }
.tl-auth .btn-outline-secondary:hover { border-color: rgba(43, 27, 79, .32); background: var(--tl-lilac); color: var(--tl-purple); }
.tl-auth .btn-outline-primary { border-color: rgba(118, 80, 173, .45); color: var(--tl-purple-3); }
.tl-auth .btn-outline-primary:hover { background: var(--tl-purple); border-color: var(--tl-purple); color: #fff; }

.tl-auth .auth-info-box { background: var(--tl-lilac); border-left-color: var(--tl-purple-3); }
.tl-auth .auth-review { background: #faf9fc; border: 1px solid var(--tl-line); }
.tl-auth .auth-unidade-bloco { border-color: var(--tl-line); }

.tl-auth .auth-app-logo { box-shadow: none; }
.tl-auth .auth-loja-badge { width: auto; max-width: none; height: auto; padding: 0; background: none; border: 0; border-radius: 8px; }
.tl-auth .auth-loja-badge:hover,
.tl-auth .auth-loja-badge:focus { background: none; box-shadow: none; transform: translateY(-2px); }
.tl-auth .auth-loja-badge img { display: block; height: 48px; width: auto; }

@media (max-width: 575.98px) {
    .tl-auth .auth-modal-body { padding: 1.25rem 1rem; }
    .tl-auth .auth-modal-footer { padding: .85rem 1rem; }
    .tl-auth .auth-profile-desc { padding-left: 0; margin-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
    .tl-auth *, .tl-auth *::before, .tl-auth *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
