/* RESET E PADRÕES */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background-color: #f8f9fa; color: #1e293b; overflow-x: hidden; }

/* NAVBAR (Padrão) */
.navbar {
    background-color: #0F4D3A; height: 70px; width: 100%;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 40px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.logo { height: 48px; filter: brightness(0) invert(1); }
.nav-links { display: flex; gap: 30px; list-style: none; }
.nav-links a { text-decoration: none; color: #cbd5e1; font-weight: 500; }
.nav-links a.active { color: white; }
.nav-right { display: flex; gap: 20px; align-items: center; }
.user-info { text-align: right; color: white; }
.user-name { display: block; font-weight: 600; font-size: 0.85rem; }
.user-email { font-size: 0.75rem; color: #cbd5e1; }
.btn-logout { background: none; border: 1px solid rgba(255,255,255,0.3); color: white; padding: 6px 14px; border-radius: 4px; cursor: pointer; }

/* LAYOUT PRINCIPAL */
.dashboard-container { max-width: 1100px; margin: 0 auto; padding: 40px 20px; }
.page-title { font-size: 1.8rem; color: #0F4D3A; margin-bottom: 30px; font-weight: 700; }

.profile-grid {
    display: grid;
    grid-template-columns: 320px 1fr; /* Sidebar fixa, resto fluido */
    gap: 30px;
}

/* --- SIDEBAR DE PERFIL --- */
.user-card, .usage-card {
    background: white; border-radius: 12px; padding: 25px;
    border: 1px solid #e2e8f0; text-align: center; margin-bottom: 20px;
}

.avatar-wrapper { position: relative; width: 100px; height: 100px; margin: 0 auto 15px; }
.avatar-wrapper img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid #f1f5f9; }
.btn-edit-avatar {
    position: absolute; bottom: 0; right: 0; background: #0F4D3A; color: white;
    border: 3px solid white; width: 32px; height: 32px; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}

.user-card h3 { font-size: 1.2rem; color: #1e293b; margin-bottom: 2px; }
.user-card .role { color: #0F4D3A; font-weight: 600; font-size: 0.9rem; margin-bottom: 2px; }
.user-card .email { color: #64748b; font-size: 0.85rem; margin-bottom: 20px; }

.btn-outline-full {
    width: 100%; padding: 10px; border: 1px solid #cbd5e1; background: white;
    border-radius: 6px; color: #475569; font-weight: 500; cursor: pointer; transition: 0.2s;
}
.btn-outline-full:hover { border-color: #0F4D3A; color: #0F4D3A; }

/* Usage Card */
.usage-card h4 { text-align: left; font-size: 0.95rem; color: #334155; margin-bottom: 15px; }
.usage-item { margin-bottom: 15px; }
.usage-label { display: flex; justify-content: space-between; font-size: 0.8rem; color: #64748b; margin-bottom: 5px; }
.progress-bar { width: 100%; height: 6px; background: #f1f5f9; border-radius: 3px; overflow: hidden; }
.fill { height: 100%; background: #0F4D3A; border-radius: 3px; }
.fill.warning { background: #f59e0b; }

/* --- CONTEÚDO PRINCIPAL (DIREITA) --- */
.subscription-content { display: flex; flex-direction: column; gap: 20px; }

/* Card do Plano (Destaque) */
.plan-card {
    background: linear-gradient(135deg, #0F4D3A 0%, #0a3528 100%);
    color: white; border-radius: 12px; padding: 30px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 10px 20px rgba(15, 77, 58, 0.15);
}

.plan-tag {
    background: rgba(255,255,255,0.2); padding: 4px 10px; border-radius: 20px;
    font-size: 0.75rem; text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px;
}
.plan-header h2 { font-size: 2rem; margin: 10px 0 5px; }
.plan-header p { color: rgba(255,255,255,0.8); font-size: 0.9rem; }

.plan-price { text-align: right; }
.plan-price .currency { font-size: 1rem; vertical-align: top; }
.plan-price .amount { font-size: 2.5rem; font-weight: 700; line-height: 1; }
.plan-price .period { font-size: 0.9rem; color: rgba(255,255,255,0.7); }

.plan-actions { display: flex; gap: 10px; margin-top: 20px; }
.btn-white {
    background: white; color: #0F4D3A; border: none; padding: 10px 20px;
    border-radius: 6px; font-weight: 600; cursor: pointer; transition: 0.2s;
}
.btn-white:hover { background: #f1f5f9; }
.btn-link-danger {
    background: none; border: none; color: #fca5a5; cursor: pointer;
    font-size: 0.9rem; text-decoration: underline; padding: 0 10px;
}
.btn-link-danger:hover { color: #fecaca; }

/* Cards Genéricos */
.section-card {
    background: white; border-radius: 12px; padding: 25px; border: 1px solid #e2e8f0;
}
.card-header-row {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;
}
.card-header-row h3 { font-size: 1.1rem; color: #1e293b; display: flex; align-items: center; gap: 8px; }
.btn-text { background: none; border: none; color: #0F4D3A; font-weight: 600; cursor: pointer; }

/* Método de Pagamento */
.payment-method {
    display: flex; align-items: center; gap: 15px; border: 1px solid #e2e8f0; padding: 15px; border-radius: 8px;
}
.card-icon {
    width: 50px; height: 35px; background: #f1f5f9; border-radius: 4px;
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #334155;
}
.card-details { flex: 1; }
.card-details strong { display: block; color: #1e293b; font-size: 0.95rem; }
.card-details p { font-size: 0.8rem; color: #64748b; }
.badge-success { background: #dcfce7; color: #166534; padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; }

/* Tabela de Faturas */
.invoice-table { width: 100%; border-collapse: collapse; }
.invoice-table th { text-align: left; font-size: 0.8rem; color: #64748b; text-transform: uppercase; padding: 10px 0; border-bottom: 1px solid #e2e8f0; }
.invoice-table td { padding: 15px 0; border-bottom: 1px solid #f1f5f9; font-size: 0.9rem; color: #334155; }
.status-pill.paid { color: #166534; font-weight: 600; font-size: 0.85rem; display: flex; align-items: center; gap: 5px; }
.status-pill.paid::before { content: '●'; font-size: 0.6rem; }
.btn-icon {
    background: none; border: 1px solid #cbd5e1; border-radius: 4px;
    padding: 4px 10px; cursor: pointer; color: #64748b; font-size: 0.8rem;
    display: flex; align-items: center; gap: 5px;
}
.btn-icon:hover { border-color: #0F4D3A; color: #0F4D3A; }

/* RESPONSIVO */
@media (max-width: 900px) {
    .profile-grid { grid-template-columns: 1fr; }
    .plan-card { flex-direction: column; align-items: flex-start; gap: 20px; }
    .plan-price { text-align: left; }
    .nav-links, .nav-right .user-info { display: none; }
}
/* --- ÁREA DO USUÁRIO (DIREITA) --- */
.nav-right {
    display: flex;
    align-items: center; /* Centraliza verticalmente todos os itens */
    gap: 24px; /* Espaço entre o bloco do perfil e o botão sair */
    height: 100%; /* Garante que o container use a altura da navbar */
}

/* Container da foto e texto */
.user-profile {
    display: flex;
    align-items: center; /* Alinha foto e texto no centro vertical */
    gap: 12px; /* Espaço entre o texto e a foto */
    text-align: right; /* Alinha o texto para a direita (perto da foto) */
    
    /* Opcional: Linha vertical separando do botão sair */
    padding-right: 24px;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    height: 40px; /* Altura da linha divisória */
}

/* Container dos Textos (Nome e Email) */
.user-info {
    display: flex;
    flex-direction: column; /* Coloca um texto embaixo do outro */
    justify-content: center;
    line-height: 1.3; /* Espaçamento entre as linhas de texto */
}

.user-name {
    color: white;
    font-size: 0.9rem; /* 14px */
    font-weight: 600;
    white-space: nowrap; /* Evita que o nome quebre linha */
}

.user-email {
    color: #cbd5e1; /* Cinza claro */
    font-size: 0.75rem; /* 12px */
    font-weight: 400;
}

/* Foto do Usuário */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%; /* Círculo perfeito */
    object-fit: cover; /* Garante que a imagem não distorça */
    border: 2px solid rgba(255, 255, 255, 0.2); /* Borda sutil */
    flex-shrink: 0; /* Garante que a foto não amasse */
}

/* Botão Sair */
.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px; /* Espaço entre texto e ícone se houver */
    
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    height: 36px; /* Altura fixa para alinhar bem */
}

.btn-logout:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* AJUSTE MOBILE (Esconde informações para não quebrar) */
@media (max-width: 768px) {
    .user-info {
        display: none; /* Esconde nome/email em telas pequenas */
    }
    
    .user-profile {
        padding-right: 0;
        border-right: none;
    }
}
/* Botão de Perfil (Destaque) */
.btn-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    
    /* Estilo Diferenciado (Cápsula Translúcida) */
    background-color: rgba(255, 255, 255, 0.15); 
    color: white;
    text-decoration: none;
    
    padding: 8px 16px;
    border-radius: 20px; /* Bordas bem redondas */
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent; /* Para evitar pulo no hover */
}

/* Efeito Hover: Fica branco com texto verde */
.btn-profile:hover {
    background-color: #ffffff;
    color: #0F4D3A; /* Verde da marca */
    transform: translateY(-1px); /* Leve subida */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Ajuste no botão de Sair para ficar harmônico ao lado */
.btn-logout {
    /* Se quiser, pode deixar o botão sair apenas como ícone para economizar espaço */
    padding: 8px 12px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    display: flex; align-items: center; justify-content: center;
}

.btn-logout:hover {
    border-color: #fca5a5; /* Vermelho claro ao passar o mouse */
    color: #fca5a5;
    background: rgba(255, 0, 0, 0.05);
}

/* Responsividade: No mobile, esconde o texto 'Minha Conta' e deixa só o ícone */
@media (max-width: 900px) {
    .btn-profile {
        font-size: 0; /* Esconde o texto */
        padding: 10px; /* Ajusta padding para ficar quadrado/redondo */
        border-radius: 50%;
        width: 38px;
        height: 38px;
        justify-content: center;
    }
    
    .btn-profile i {
        font-size: 1.2rem; /* Aumenta o ícone */
    }
}
/* --- MODAL STYLES --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Fundo escuro transparente */
    backdrop-filter: blur(4px); /* Efeito de desfoque */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 { margin: 0; font-size: 1.25rem; color: #1e293b; }

.btn-close-modal {
    background: none; border: none; font-size: 1.5rem;
    cursor: pointer; color: #64748b;
}

/* Inputs da Modal */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.875rem; color: #475569; margin-bottom: 0.5rem; }
.form-group input {
    width: 100%; padding: 0.75rem;
    border: 1px solid #cbd5e1; border-radius: 6px;
    font-size: 0.95rem;
}
.input-disabled { background-color: #f1f5f9; color: #94a3b8; cursor: not-allowed; }

.modal-actions {
    display: flex; justify-content: flex-end; gap: 10px; margin-top: 1.5rem;
}

.btn-ghost {
    background: transparent; border: 1px solid #cbd5e1;
    color: #475569; padding: 0.6rem 1.2rem; border-radius: 6px; cursor: pointer;
}

.btn-primary {
    background: #0F4D3A; color: white; border: none;
    padding: 0.6rem 1.2rem; border-radius: 6px; cursor: pointer;
}
.btn-primary:hover { background: #0b3d2e; }
/* --- TOAST NOTIFICATION (BADGE) --- */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000; /* Acima de tudo, inclusive da modal */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #fff;
    color: #1e293b;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    border-left: 5px solid #0F4D3A; /* A cor da marca Getconstru */
    
    /* Animação de entrada */
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    transform: translateX(0);
}

/* Ícone dentro do toast */
.toast i {
    font-size: 1.5rem;
    color: #0F4D3A;
}

.toast-content strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.toast-content span {
    font-size: 0.85rem;
    color: #64748b;
}

/* Variação para Erro (Opcional) */
.toast.error {
    border-left-color: #ef4444;
}
.toast.error i {
    color: #ef4444;
}
.preview-container-modal {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f8fafc;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

#editPreviewAvatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-upload-link {
    font-size: 0.85rem;
    color: #2563eb;
    cursor: pointer;
    font-weight: 500;
}

.btn-upload-link:hover {
    text-decoration: underline;
}