/* ============================================================
   CréditoFácil - CSS de Autenticação
   Versão Responsiva Corrigida
   ============================================================ */

body.auth-page {
    background: var(--gray-light);
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

.auth-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ============================================================
   LADO ESQUERDO (Painel Promocional)
   ============================================================ */
.auth-left {
    width: 420px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-3) 50%, var(--primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    pointer-events: none;
}

.auth-left::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 250px;
    height: 250px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    pointer-events: none;
}

.auth-left-content {
    position: relative;
    z-index: 1;
    color: #fff;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
    color: #fff;
    font-size: 1.3rem;
    font-weight: 800;
    text-decoration: none;
}

.auth-logo-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.auth-left-content h2 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.auth-left-content p {
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
}

.auth-features li svg {
    color: var(--success);
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

/* ============================================================
   LADO DIREITO (Formulário)
   ============================================================ */
.auth-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
    min-width: 0;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 520px;
}

.auth-header {
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-light);
    margin: 0;
}

.form-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
    margin: 1.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-border);
}

/* Divisor OR */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-light);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-border);
}

/* ============================================================
   RESPONSIVIDADE
   ============================================================ */
@media (max-width: 900px) {
    .auth-left { display: none; }
    .auth-right { padding: 1.5rem; }
    .auth-form-wrapper { max-width: 480px; }
}

@media (max-width: 600px) {
    .auth-right { 
        display: block !important; 
        padding: 1.5rem 1rem !important; 
        overflow-y: visible !important;
        min-height: auto !important;
        align-items: flex-start; 
        padding-top: 2rem; 
    }
    .auth-container {
        display: block !important;
        height: auto !important;
        min-height: 100vh !important;
    }
    .auth-form-wrapper { 
        max-width: 100%; 
        margin: 0 auto !important;
        padding-bottom: 100px !important; /* Espaço para o banner PWA */
    }
    .auth-header h1 { font-size: 1.5rem; }
    .grid-2 { grid-template-columns: 1fr; }
    
    /* Garantir que o botão de submit seja visível */
    button[type="submit"] {
        display: flex !important;
        width: 100% !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

@media (max-width: 480px) {
    .auth-right { padding: 1rem; padding-top: 1.5rem; }
    .auth-header { margin-bottom: 1.5rem; }
    .auth-header h1 { font-size: 1.35rem; }
    .form-section-title { margin: 1.25rem 0 0.75rem; }
}
