/* Auth Page Styles */
.auth-page {
    /*
     * Redefinimos a paleta de cores somente para a página de autenticação.
     * As cores do tema principal foram escolhidas em tons de roxo, alinhando
     * com o visual da home (gradientes violeta) e afastando-se do vermelho
     * original.  Ao definir variáveis CSS neste escopo, os elementos
     * internos (botões, textos, ícones) herdarão automaticamente as novas
     * cores sem afetar outras páginas.  A propriedade background utiliza
     * o gradiente violeta definido em :root (style.css) para consistência.
     */
    --primary-color: #7C3AED;
    --primary-light: #C4B5FD;
    --primary-dark: #5B21B6;
    --secondary-color: #EDE9FE;
    --accent-color: #F3E8FF;
    --light-gray: var(--accent-color);
    /* Garantir contraste suave nos campos e elementos com borda */
    --border-color: #E5E7EB; /* cinza claro visível sobre fundo branco */
    background: var(--purple-gradient);
    min-height: 100vh;
    padding: 0;
}

.auth-header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.auth-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-header .back-btn {
    color: white;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.auth-header .back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-2px);
}

.auth-header .logo img {
    height: 40px;
    filter: brightness(0) invert(1);
}

.auth-main {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
}

.auth-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 450px;
    margin: 0 auto;
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tab Navigation */
.auth-tabs {
    display: flex;
    background: var(--light-gray);
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn.active {
    color: var(--primary-color);
    background: white;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
}

.tab-btn i {
    margin-right: 0.5rem;
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 2rem;
}

.tab-content.active {
    display: block;
}

/* Forms */
.auth-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-group label i {
    margin-right: 0.5rem;
    color: var(--primary-color);
    width: 16px;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    /* Leve sombra para dar profundidade sem pesar visualmente */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    /* Realce de foco alinhado à paleta roxa da página */
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.form-group input::placeholder {
    color: var(--text-secondary);
}

/* Password Input */
.password-input {
    position: relative;
}

.password-input input {
    padding-right: 3rem;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary-color);
}

/* Checkbox */
.checkbox-label {
    display: flex !important;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    margin-right: 0.75rem;
    margin-top: 2px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s ease;
    background: #FFFFFF; /* Evitar sumir em fundo branco */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label a {
    color: var(--primary-color);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Form Actions */
.form-actions {
    margin-top: 2rem;
}

.btn-full {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

/* Form Links */
.form-links {
    text-align: center;
    margin-top: 1rem;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.alert-error {
    background: #fee;
    color: #c53030;
    border: 1px solid #fed7d7;
}

.alert-success {
    background: #f0fff4;
    color: #2f855a;
    border: 1px solid #c6f6d5;
}


/* Benefits */
.auth-benefits {
    padding: 1.5rem 2rem 2rem;
    background: var(--light-gray);
}

.auth-benefits h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.auth-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-benefits li {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-benefits li i {
    margin-right: 0.75rem;
    color: var(--primary-color);
    width: 16px;
    text-align: center;
}

/*
 * Auth-specific button overrides
 *
 * O estilo global define .btn-primary e .btn-outline com cores coral.
 * Para a página de autenticação usaremos as novas variáveis em tons de
 * roxo definidos em .auth-page.  A maior especificidade
 * (.auth-page .btn-primary) garante que essas regras prevaleçam sobre
 * as definições globais de style.css.
 */
.auth-page .btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.auth-page .btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.auth-page .btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.auth-page .btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

/*
 * Ajustes de Bootstrap para a página de perfil e login
 *
 * O Bootstrap define cores padrão para classes como .text-primary e
 * .btn-outline-danger que entram em conflito com a nova paleta roxa.
 * Ao sobrescrever essas classes dentro de .auth-page garantimos
 * consistência visual sem alterar o restante do site.
 */
.auth-page .text-primary {
    color: var(--primary-color) !important;
}

.auth-page .btn-outline-danger {
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
    background-color: transparent;
}

.auth-page .btn-outline-danger:hover {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: var(--white) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-main {
        padding: 1rem 0;
    }
    
    .auth-container {
        margin: 0 1rem;
        border-radius: 16px;
    }
    
    .tab-content {
        padding: 1.5rem;
    }
    
    
    .auth-benefits {
        padding: 1.5rem;
    }
    
}

@media (max-width: 480px) {
    .auth-header .logo img {
        height: 35px;
    }
    
    .tab-btn {
        padding: 0.875rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .form-group input {
        padding: 0.75rem;
    }
    
    .btn-full {
        padding: 0.875rem;
    }
}
.checkbox-label:focus-within .checkmark {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}
