/**
 * ClickRadios - Estilos de Autenticação
 * Páginas: Login, Registro, Recuperar Senha
 * Padrão visual: Tema escuro com gradientes roxos
 */

/* ============================================
   VARIÁVEIS DO CLICKRADIOS
   ============================================ */
:root {
    --cr-primaria: #667eea;
    --cr-secundaria: #764ba2;
    --cr-escuro: #1a1a2e;
    --cr-mais-escuro: #0f0f1e;
    --cr-borda: #2a2a3e;
    --cr-texto: #e0e0e0;
    --cr-texto-suave: #a0a0a0;
    --cr-card: #1e1e2e;
}

/* ============================================
   RESET E BASE
   ============================================ */
body {
    background: var(--cr-mais-escuro);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
}

/* ============================================
   WRAPPER PRINCIPAL
   ============================================ */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--cr-mais-escuro);
}

/* ============================================
   LADO ESQUERDO - FORMULÁRIO
   ============================================ */
.auth-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--cr-escuro);
}

.auth-content {
    width: 100%;
    max-width: 450px;
}

/* Link Voltar */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cr-texto-suave);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 30px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--cr-primaria);
}

.back-link i {
    font-size: 1rem;
}

/* Cabeçalho */
.auth-header {
    margin-bottom: 30px;
}

.auth-header h1 {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--cr-texto-suave);
    font-size: 1rem;
    margin: 0;
}

/* Alertas */
.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ef4444;
}

.alert-error i {
    font-size: 1.2rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #10b981;
}

.alert-success i {
    font-size: 1.2rem;
}

/* ============================================
   FORMULÁRIO
   ============================================ */
.auth-form {
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--cr-texto);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper > i:first-child {
    position: absolute;
    left: 15px;
    color: var(--cr-texto-suave);
    font-size: 1rem;
    z-index: 1;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 45px 12px 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--cr-borda);
    border-radius: 8px;
    color: var(--cr-texto);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--cr-primaria);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-wrapper input::placeholder {
    color: var(--cr-texto-suave);
}

/* Botão Toggle Senha */
.input-wrapper .password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--cr-texto-suave);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    z-index: 2;
    line-height: 1;
    height: auto;
    width: auto;
}

.input-wrapper .password-toggle:hover {
    color: var(--cr-primaria);
}

.input-wrapper .password-toggle i {
    font-size: 1.1rem;
    position: relative !important;
    left: 0 !important;
    margin: 0;
}

/* Erro de Campo */
.error-text {
    display: block;
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 5px;
}

/* Opções do Formulário */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--cr-primaria);
}

.checkbox-wrapper span {
    color: var(--cr-texto);
    font-size: 0.9rem;
}

.forgot-link {
    color: var(--cr-primaria);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: var(--cr-secundaria);
}

/* Checkbox de Termos */
.terms-checkbox {
    margin-bottom: 25px;
}

.terms-checkbox span {
    font-size: 0.9rem;
    line-height: 1.5;
}

.terms-checkbox a {
    color: var(--cr-primaria);
    text-decoration: none;
    transition: color 0.3s ease;
}

.terms-checkbox a:hover {
    color: var(--cr-secundaria);
    text-decoration: underline;
}

/* Botão Submit */
.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--cr-primaria) 0%, var(--cr-secundaria) 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--cr-borda);
}

.divider span {
    padding: 0 15px;
    color: var(--cr-texto-suave);
    font-size: 0.9rem;
}

/* Botão Google */
.btn-google {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--cr-borda);
    border-radius: 8px;
    color: var(--cr-texto);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-google:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--cr-primaria);
    color: var(--cr-primaria);
}

.btn-google i {
    font-size: 1.2rem;
}

/* Footer do Auth */
.auth-footer {
    text-align: center;
    color: var(--cr-texto-suave);
    font-size: 0.9rem;
    margin-top: 25px;
}

.auth-footer a {
    color: var(--cr-primaria);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: var(--cr-secundaria);
}

/* ============================================
   REQUISITOS DE SENHA (Registro)
   ============================================ */
.password-requirements {
    margin-top: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid var(--cr-borda);
}

.requirement {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--cr-texto-suave);
    font-size: 0.85rem;
}

.requirement:last-child {
    margin-bottom: 0;
}

.requirement i {
    font-size: 1rem;
    color: #ef4444;
}

.requirement.valid i {
    color: #10b981;
}

.requirement.valid span {
    color: var(--cr-texto);
}

/* Força da Senha */
.password-strength {
    margin-top: 10px;
    display: none;
}

.strength-bars {
    display: flex;
    gap: 5px;
    margin-bottom: 8px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--cr-borda);
    border-radius: 2px;
    transition: background 0.3s ease;
}

.strength-bar.active-weak {
    background: #ef4444;
}

.strength-bar.active-medium {
    background: #f59e0b;
}

.strength-bar.active-good {
    background: #3b82f6;
}

.strength-bar.active-strong {
    background: #10b981;
}

#strength-text {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ============================================
   LADO DIREITO - ILUSTRAÇÃO
   ============================================ */
.auth-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: linear-gradient(135deg, var(--cr-primaria) 0%, var(--cr-secundaria) 100%);
    position: relative;
    overflow: hidden;
}

.auth-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
}

.illustration-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 500px;
}

.illustration-card {
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.illustration-card i {
    font-size: 5rem;
    color: #fff;
}

.illustration-content h2 {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.illustration-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* ============================================
   MODAIS (Termos e Privacidade)
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--cr-escuro);
    border: 1px solid var(--cr-borda);
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--cr-borda);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--cr-texto-suave);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--cr-primaria);
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    color: var(--cr-texto);
    line-height: 1.6;
}

.modal-body h3 {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 10px;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body p {
    margin-bottom: 15px;
}

.modal-body strong {
    color: var(--cr-primaria);
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid var(--cr-borda);
    display: flex;
    justify-content: flex-end;
}

.btn-modal-close {
    padding: 10px 25px;
    background: var(--cr-primaria);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-modal-close:hover {
    background: var(--cr-secundaria);
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */
@media (max-width: 991px) {
    .auth-right {
        display: none;
    }
    
    .auth-left {
        flex: 1;
    }
}

@media (max-width: 576px) {
    .auth-header h1 {
        font-size: 1.75rem;
    }
    
    .auth-content {
        max-width: 100%;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .modal-content {
        max-height: 90vh;
    }
    
    .modal-header h2 {
        font-size: 1.25rem;
    }
}
