/* Auth screens — fundo fixo claro; card e controles seguem data-bs-theme */

.auth-page {
    --auth-primary: #1d7dfc;
    --auth-heading: #0d1b3e;
    --auth-muted: #6b7280;
    --auth-border: #e5e7eb;
    --auth-card-radius: 28px;
    --auth-control-radius: 12px;
    --auth-card-shadow: 0 18px 50px rgba(15, 35, 80, 0.1);

    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background-color: #f3f5f9;
    background-image: url("../media/auth/bg-mobile.png");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

@media (min-width: 768px) {
    .auth-page {
        background-image: url("../media/auth/bg-web.png");
        padding: 2.5rem;
    }
}

.auth-page__inner {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--auth-card-radius);
    box-shadow: var(--auth-card-shadow);
    padding: 2rem 1.75rem 1.5rem;
}

@media (min-width: 576px) {
    .auth-card {
        padding: 2.5rem 2.25rem 1.75rem;
    }
}

html[data-bs-theme="dark"] .auth-page {
    --auth-heading: #f5f8ff;
    --auth-muted: #99a1b7;
    --auth-border: var(--bs-border-color);
    --auth-card-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
}

html[data-bs-theme="dark"] .auth-card {
    background-color: var(--bs-body-bg);
}

.auth-brand {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-brand__logo {
    display: block;
    height: 52px;
    width: auto;
    max-width: 220px;
    margin: 0 auto 0.65rem;
    object-fit: contain;
}

@media (min-width: 576px) {
    .auth-brand__logo {
        height: 60px;
    }
}

html[data-bs-theme="dark"] .auth-brand__logo {
    /* "toodo" é azul escuro; leve clareamento no tema escuro */
    filter: brightness(1.25) saturate(1.05);
}

.auth-brand__tagline {
    margin: 0;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--auth-muted);
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-header__title {
    margin: 0 0 0.4rem;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--auth-heading);
}

.auth-header__subtitle {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--auth-muted);
}

.auth-field {
    position: relative;
    margin-bottom: 0.85rem;
}

.auth-field__icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: var(--auth-muted);
    font-size: 1rem;
    pointer-events: none;
    z-index: 2;
}

.auth-field__toggle {
    position: absolute;
    top: 50%;
    right: 0.95rem;
    transform: translateY(-50%);
    color: var(--auth-muted);
    font-size: 1rem;
    cursor: pointer;
    z-index: 2;
    background: none;
    border: 0;
    padding: 0;
    line-height: 1;
}

.auth-field__toggle:hover,
.auth-field__toggle:focus-visible {
    color: var(--auth-primary);
}

.auth-field .form-control,
.auth-card .form-control {
    min-height: 48px;
    border-radius: var(--auth-control-radius);
    border-color: var(--auth-border);
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    box-shadow: none;
}

.auth-field--icon .form-control {
    padding-left: 2.75rem;
}

.auth-field--toggle .form-control {
    padding-right: 2.75rem;
}

.auth-field .form-control:focus,
.auth-card .form-control:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 0.2rem rgba(29, 125, 252, 0.15);
}

.auth-field .form-control::placeholder,
.auth-card .form-control::placeholder {
    color: var(--auth-muted);
}

.auth-card .invalid-feedback {
    display: block;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

.auth-submit {
    --bs-btn-bg: var(--auth-primary);
    --bs-btn-border-color: var(--auth-primary);
    --bs-btn-hover-bg: #1568d6;
    --bs-btn-hover-border-color: #1568d6;
    --bs-btn-active-bg: #125bbb;
    --bs-btn-active-border-color: #125bbb;
    --bs-btn-disabled-bg: var(--auth-primary);
    --bs-btn-disabled-border-color: var(--auth-primary);
    min-height: 48px;
    border-radius: var(--auth-control-radius);
    font-weight: 600;
    font-size: 1rem;
}

.auth-submit .auth-submit__arrow {
    margin-left: 0.35rem;
    font-weight: 500;
}

.auth-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--auth-primary);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.auth-link:hover,
.auth-link:focus-visible {
    color: #1568d6;
    text-decoration: underline;
}

.auth-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.auth-actions .btn {
    min-height: 44px;
    border-radius: var(--auth-control-radius);
    font-weight: 600;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.auth-actions .btn-primary {
    --bs-btn-bg: var(--auth-primary);
    --bs-btn-border-color: var(--auth-primary);
    --bs-btn-hover-bg: #1568d6;
    --bs-btn-hover-border-color: #1568d6;
    --bs-btn-active-bg: #125bbb;
    --bs-btn-active-border-color: #125bbb;
}

.auth-method {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.auth-method .btn {
    min-height: 48px;
    border-radius: var(--auth-control-radius);
    font-weight: 600;
    justify-content: center;
}

.auth-method .btn-primary {
    --bs-btn-bg: var(--auth-primary);
    --bs-btn-border-color: var(--auth-primary);
    --bs-btn-hover-bg: #1568d6;
    --bs-btn-hover-border-color: #1568d6;
}

.auth-code-inputs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.auth-code-inputs .form-control {
    width: 44px;
    height: 48px;
    padding: 0;
    text-align: center;
    font-size: 1.125rem;
    font-weight: 700;
}

@media (min-width: 400px) {
    .auth-code-inputs .form-control {
        width: 48px;
        height: 52px;
    }
}

.auth-timer {
    text-align: center;
    color: var(--auth-muted);
    font-size: 0.9rem;
    margin: 0.5rem 0 0;
}

.auth-footer {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--bs-border-color);
    text-align: center;
    font-size: 0.8rem;
    color: var(--auth-muted);
}

.auth-footer a {
    color: var(--auth-muted);
    text-decoration: none;
}

.auth-footer a:hover,
.auth-footer a:focus-visible {
    color: var(--auth-primary);
    text-decoration: underline;
}

.auth-footer__sep {
    margin: 0 0.4rem;
    color: var(--auth-muted);
    opacity: 0.7;
}

.auth-modal .modal-content {
    border-radius: 16px;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color);
}

.auth-modal .modal-header {
    border-bottom-color: var(--bs-border-color);
}

.auth-modal .modal-footer {
    border-top-color: var(--bs-border-color);
    justify-content: flex-end;
    gap: 0.75rem;
}

.auth-modal .btn-primary {
    --bs-btn-bg: var(--auth-primary);
    --bs-btn-border-color: var(--auth-primary);
    --bs-btn-hover-bg: #1568d6;
    --bs-btn-hover-border-color: #1568d6;
}

.auth-recover-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
}

.auth-recover-options .btn {
    min-height: 48px;
    border-radius: var(--auth-control-radius);
    font-weight: 600;
}
