/* --- CONFIGURAÇÕES GERAIS --- */
:root {
    --primary: #c5a065; /* Dourado */
    --dark: #1a1a1a;    /* Fundo Principal */
    --darker: #111111;  /* Fundo Menu/Header */
    --light: #f4f4f4;   /* Texto Claro */
    --gray: #333333;    /* Elementos/Cards */
}

* {
    box-sizing: border-box; /* Garante que padding não estoure largura */
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--dark);
    color: var(--light);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    /* Removido o display:flex do body para evitar colapso */
    display: flex; 
    flex-direction: row;
    min-height: 100vh;
}

/* Links e Botões Gerais */
a { text-decoration: none; transition: 0.3s; color: inherit; }

.cta-button {
    background-color: var(--primary);
    color: var(--darker);
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 5px;
    text-transform: uppercase;
    display: inline-block;
    text-align: center;
}
.cta-button:hover { background-color: #fff; color: #000; }

.btn-outline {
    display: inline-block;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 12px 35px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    background: transparent;
}
.btn-outline:hover { background-color: var(--primary); color: var(--darker); }

/* --- SIDEBAR (Menu Lateral) --- */
.sidebar {
    width: 260px;
    background-color: var(--darker);
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
    padding: 20px;
    height: 100vh;
    position: sticky;
    top: 0;
    flex-shrink: 0; /* Impede o menu de encolher */
    z-index: 1000;
}

.sidebar .brand { 
    color: var(--primary); 
    font-size: 1.5rem; 
    font-weight: bold; 
    margin-bottom: 40px; 
    display: block; 
}

.menu-item { 
    color: #888; 
    padding: 15px; 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    border-radius: 8px; 
    margin-bottom: 5px; 
}
.menu-item:hover, .menu-item.active { background-color: #222; color: var(--primary); }
.menu-item i { width: 20px; text-align: center; }

/* --- CONTEÚDO PRINCIPAL (MAIN) --- */
.main-content {
    flex: 1; /* Ocupa todo o espaço restante */
    padding: 40px;
    background-color: var(--dark);
    width: 100%; /* Força largura */
    overflow-y: auto;
    height: 100vh;
}

/* Cards e Grids (Painel) */
.stats-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 20px; 
    margin-bottom: 30px; 
}

.stat-card { 
    background: #222; 
    padding: 25px; 
    border-radius: 8px; 
    border: 1px solid #333; 
    color: #fff;
}

.stat-title { color: #888; display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.stat-value { font-size: 2.5rem; font-weight: bold; color: #fff; }
.stat-card.credits { border-left: 4px solid var(--primary); }
.stat-card.credits .stat-value { color: var(--primary); }

.btn-whatsapp { 
    background: #25D366; 
    color: #fff; 
    padding: 10px 20px; 
    border-radius: 5px; 
    font-weight: bold; 
    display: inline-flex; 
    align-items: center; 
    gap: 10px; 
}

.btn-add-credits { 
    background: var(--primary); 
    color: #000; 
    font-size: 0.8rem; 
    padding: 5px 10px; 
    border-radius: 4px; 
}

/* --- SITE INSTITUCIONAL (INDEX) --- */
header {
    background-color: var(--darker);
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    width: 100%;
}
/* Correção para o header não quebrar no flex do body */
body:not(:has(.sidebar)) { display: block; } 


/* Grids Institucional */
.grid, .gallery-grid, .pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}
.features, .gallery-section, .pricing-section { padding: 80px 5%; }
.card, .pricing-card { background-color: var(--gray); padding: 30px; border-radius: 8px; border: 1px solid #444; }
.hero { 
    padding: 100px 20px; text-align: center; 
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), url('https://source.unsplash.com/1600x900/?woodworking');
    background-size: cover; background-position: center;
}

/* --- MOBILE (CELULAR) --- */
.mobile-menu-btn { display: none; background: none; border: none; color: var(--primary); font-size: 1.8rem; cursor: pointer; }
.mobile-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 998; }

@media (max-width: 768px) {
    /* Layout vira bloco (um embaixo do outro) */
    body { display: block; overflow-x: hidden; height: auto; }
    
    .sidebar {
        position: fixed;
        left: -100%; /* Esconde totalmente */
        top: 0;
        width: 280px;
        height: 100vh;
        z-index: 1001;
        transition: 0.3s;
    }
    
    .sidebar.active { left: 0; box-shadow: 10px 0 20px rgba(0,0,0,0.5); }
    .mobile-overlay.active { display: block; }
    .mobile-menu-btn { display: block; }

    .main-content {
        width: 100%;
        height: auto;
        padding: 20px;
        overflow: visible;
    }
    
    .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .header-top > div { width: 100%; display: flex; align-items: center; }
    .btn-whatsapp { width: 100%; justify-content: center; margin-top: 10px; }
    
    /* Tabelas responsivas */
    table { min-width: 600px; }
    div[style*="overflow-x"] { overflow-x: auto; padding-bottom: 10px; }
    
    /* Ajustes Index */
    .hero h1 { font-size: 2rem; }
}

/* --- BADGES DE STATUS NA TABELA --- */
.status-badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
}

.status-analise { background-color: rgba(241, 196, 15, 0.2); color: #f1c40f; border: 1px solid #f1c40f; }
.status-dev     { background-color: rgba(52, 152, 219, 0.2); color: #3498db; border: 1px solid #3498db; }
.status-ok      { background-color: rgba(46, 204, 113, 0.2); color: #2ecc71; border: 1px solid #2ecc71; }
.status-cancel  { background-color: rgba(231, 76, 60, 0.2);  color: #e74c3c; border: 1px solid #e74c3c; }

/* Botão de Ver Detalhes */
.btn-view {
    color: #ccc;
    font-size: 0.9rem;
    padding: 5px;
    transition: 0.3s;
}
.btn-view:hover { color: var(--primary); }

/* --- MODAL DE DETALHES DO PROJETO --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85); /* Fundo bem escuro */
    z-index: 2000; /* Acima de tudo */
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex; /* Flex para centralizar */
}

.modal-content {
    background: #1a1a1a;
    width: 100%;
    max-width: 800px; /* Largura máxima */
    border-radius: 10px;
    border: 1px solid #333;
    position: relative;
    max-height: 90vh; /* Não ultrapassa a altura da tela */
    overflow-y: auto; /* Rolagem interna se for muito grande */
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #111;
    position: sticky;
    top: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
}
.modal-close:hover { color: #fff; }

.modal-body {
    padding: 30px;
}

/* Grid de Imagens dentro do Modal */
.modal-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.file-preview {
    background: #222;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #333;
    text-align: center;
}

.file-preview img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
    cursor: pointer;
}
.file-preview img:hover { opacity: 0.8; }

.btn-download {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
    border: 1px solid var(--primary);
    padding: 5px 10px;
    border-radius: 4px;
}
.btn-download:hover { background: var(--primary); color: #000; }

/* --- BOTÕES DE COMPRA (PLANOS - MERCADO PAGO) --- */
.btn-plan {
    display: flex;                
    justify-content: center;
    align-items: center;
    gap: 10px;                    
    width: 100%;                  
    padding: 16px;                
    margin-top: 25px;
    
    background-color: transparent;
    border: 2px solid #555;       
    border-radius: 8px;           
    
    color: #fff;
    font-size: 1rem;
    font-weight: 800;             
    text-transform: uppercase;    
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;    
}

.btn-plan:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: rgba(197, 160, 101, 0.1); 
    transform: translateY(-3px);  
}

/* Estilo Destaque (Elite) */
.btn-plan.btn-gold {
    background-color: var(--primary); 
    border-color: var(--primary);
    color: #000;                      
    box-shadow: 0 4px 15px rgba(197, 160, 101, 0.4); 
}

.btn-plan.btn-gold:hover {
    background-color: #fff;       
    border-color: #fff;
    color: #000;
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3); 
    transform: translateY(-3px) scale(1.02); 
}

/* --- NOVOS BOTÕES DO DASHBOARD (INSIDE.PHP) --- */

/* Botão Novo Projeto (Cabeçalho - Verde) */
.btn-new-project {
    background-color: #27ae60; /* Verde forte */
    color: #fff;
    padding: 12px 30px;
    border-radius: 50px; /* Redondinho */
    font-weight: bold;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4); /* Sombra verde */
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn-new-project:hover {
    background-color: #2ecc71; /* Verde mais claro no hover */
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.6);
}

/* Botão Comprar Créditos (Dentro do Card - Destaque Dourado) */
.btn-buy-credits {
    background-color: var(--primary); /* Dourado */
    color: #000;
    font-size: 0.75rem;
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
    float: right;
    box-shadow: 0 0 10px rgba(197, 160, 101, 0.5); /* Brilho */
    animation: pulse-gold 2s infinite; /* Efeito pulsante */
}

.btn-buy-credits:hover {
    background-color: #fff;
    color: #000;
}

/* Animação pulsante para chamar atenção */
@keyframes pulse-gold {
    0% { box-shadow: 0 0 0 0 rgba(197, 160, 101, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(197, 160, 101, 0); }
    100% { box-shadow: 0 0 0 0 rgba(197, 160, 101, 0); }
}

/* --- ESTILO AUTH COM ABAS (TABS) --- */

.auth-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: radial-gradient(circle at center, #222 0%, #111 100%);
}

.auth-box {
    background-color: #1a1a1a;
    width: 100%;
    max-width: 450px; /* Largura focada para uma coluna só */
    border-radius: 10px;
    border: 1px solid #333;
    box-shadow: 0 0 50px rgba(0,0,0,0.6);
    overflow: hidden;
    position: relative;
}

/* Cabeçalho das Abas */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid #333;
    background: #111;
}

.tab-btn {
    flex: 1; /* Divide espaço igual */
    padding: 20px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.3s;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover { color: #fff; background: #222; }

/* Aba Ativa */
.tab-btn.active {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
    background: #1a1a1a;
}

/* Corpo do Formulário */
.auth-content {
    padding: 30px;
}

/* Inputs Grandes e Alinhados */
.auth-input-group { margin-bottom: 15px; }

.auth-input-group label {
    display: block; margin-bottom: 8px; color: #ccc; font-weight: bold; font-size: 0.9rem;
}

.auth-input {
    width: 100%;
    padding: 15px;
    background-color: #000;
    border: 1px solid #444;
    border-radius: 5px;
    color: #fff;
    font-size: 1rem;
    transition: 0.3s;
}

.auth-input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 10px rgba(197, 160, 101, 0.2);
}

.btn-block {
    width: 100%;
    margin-top: 15px;
    padding: 15px;
    font-size: 1rem;
}

.auth-link {
    color: #666; font-size: 0.85rem; margin-top: 15px; display: block; text-align: center;
}
.auth-link:hover { color: var(--primary); }

/* --- FOOTER --- */
.main-footer {
    background-color: #111;       /* Fundo bem preto para diferenciar do corpo */
    border-top: 1px solid #333;   /* AQUI ESTÁ A LINHA DE SEPARAÇÃO */
    padding: 40px 20px;
    margin-top: auto;             /* Empurra o footer para o final da tela */
    width: 100%;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.footer-info p, .footer-credits p {
    margin: 5px 0;
    color: #888;
    font-size: 0.9rem;
}

.footer-credits a {
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
}

.footer-credits a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
    }
}

/* --- FORMULÁRIOS INTERNOS (PERFIL) --- */
.panel-card {
    background: #222;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    color: #ccc;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 0.9rem;
}

.input-dark {
    width: 100%;
    padding: 12px;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 5px;
    color: #fff;
    font-size: 1rem;
    transition: 0.3s;
}

.input-dark:focus {
    border-color: var(--primary);
    outline: none;
    background-color: #000;
}

.input-dark[readonly] {
    background-color: #151515;
    color: #666;
    border-color: #333;
    cursor: not-allowed;
}