/* ==========================================================================
   MÓDULO DE AUTENTICAÇÃO (LOGIN & RECUPERAÇÃO DE SENHA)
   Cores via tokens da marca (var(--app-primary), var(--app-slate))
   ========================================================================== */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #edf2f7 100%);
    padding: 2rem 1rem;
    font-family: var(--app-font-family, 'Manrope', -apple-system, sans-serif);
}

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

.auth-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--app-primary);
}

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

.auth-brand-logo {
    max-height: 52px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
    margin-bottom: 1rem;
}

.auth-brand-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--app-dark, var(--app-slate));
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.auth-brand-subtitle {
    font-size: 0.85rem;
    color: var(--app-text-muted, #718096);
    margin: 0;
}

.auth-form-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--app-dark, var(--app-slate));
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-form-title i {
    color: var(--app-primary);
}

.auth-alert {
    padding: 0.85rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.auth-alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.auth-alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.auth-alert-info {
    background-color: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.auth-card .form-group {
    margin-bottom: 1.25rem;
}

.auth-card .form-label {
    display: block;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--app-dark, var(--app-slate));
    margin-bottom: 0.4rem;
}

.auth-password-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.45rem;
}

.auth-password-header .form-label {
    margin-bottom: 0;
}

.auth-forgot-link {
    font-size: 0.8rem;
    color: var(--app-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.auth-forgot-link:hover {
    color: var(--app-primary-hover);
    text-decoration: underline;
}

.auth-input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
}

.auth-input-group .input-icon {
    position: absolute;
    left: 0.875rem;
    color: #a0aec0;
    font-size: 0.95rem;
    pointer-events: none;
    z-index: 2;
}

.auth-input-group .form-control {
    width: 100%;
    padding-left: 2.5rem;
}

/* Garante quebra de linha obrigatória e largura total para feedback de erro */
.invalid-feedback,
.auth-card .invalid-feedback,
.auth-input-group .invalid-feedback {
    display: none;
    width: 100% !important;
    flex-basis: 100% !important;
    order: 99 !important;
    margin-top: 0.375rem !important;
    font-size: 0.8rem !important;
    color: #dc2626 !important;
    font-weight: 500 !important;
    text-align: left !important;
    clear: both !important;
}

.auth-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.825rem;
}

.auth-link {
    color: var(--app-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.auth-link:hover {
    color: var(--app-primary-hover);
    text-decoration: underline;
}

.auth-btn-submit {
    width: 100%;
    padding: 0.75rem 1.25rem;
    font-size: 0.925rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.775rem;
    color: #a0aec0;
}
