/* GOTHAM LIGHT (Para textos finos) */
@font-face {
    font-family: 'Gotham Light';
    src: url('fonts/Gotham-Light.otf') format('opentype'); /* Ajuste a extensão se for .ttf */
    font-weight: 300;
    font-style: normal;
}

/* GOTHAM BOOK/REGULAR (Para corpo de texto) */
@font-face {
    font-family: 'Gotham'; /* Vamos chamar só de Gotham */
    src: url('fonts/Gotham-Book.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

/* GOTHAM BOLD (Para títulos fortes) */
@font-face {
    font-family: 'Gotham';
    src: url('fonts/Gotham-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

/* AGaramond-Regular (Para títulos serifados) */
@font-face {
    font-family: 'AGaramond-Regular';
    src: url('fonts/AGaramond-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

/* ========================
   ESTRUTURA GERAL DASHBOARD
   ======================== */
.auth-body, .dash-body {
    background-color: #f4f6f8; /* Fundo cinza bem claro */
    font-family: 'Gotham Book', Sans-serif;
    color: #333;
    margin: 0;
    padding: 0;
    height: 100vh;
}

/* ========================
   TELA DE LOGIN (AUTH)
   ======================== */
.auth-body {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--navy); /* Fundo azul escuro */
}

.auth-container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    text-align: center;
}

.auth-logo { margin-bottom: 30px; }
.auth-logo a { text-decoration: none; }

.auth-box {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
}

.auth-tab {
    flex: 1;
    padding: 20px;
    background: #f9f9f9;
    border: none;
    font-family: 'Gotham Book', Sans-serif;
    font-weight: 600;
    cursor: pointer;
    color: #888;
    transition: 0.3s;
}

.auth-tab.active {
    background: #fff;
    color: var(--navy);
    border-top: 3px solid var(--gold);
}

.auth-content {
    padding: 40px 30px;
    display: none; /* Escondido por padrão */
}
.auth-content.active { display: block; }

.auth-desc {
    font-family: 'Gotham Light', sans-serif;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 25px;
}

/* Inputs e Forms */
.input-group {
    text-align: left;
    margin-bottom: 20px;
    display: hidden;
}

.input-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 8px;
}

.input-group input, .input-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Gotham Book', Sans-serif;
    font-size: 1rem;
    transition: border 0.3s;
}

.input-group input:focus {
    border-color: var(--gold);
    outline: none;
}

.form-row {
    display: flex;
    gap: 15px;
}
.form-row .input-group { flex: 1; }

.btn-auth {
    width: 100%;
    padding: 15px;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
    font-family: 'Gotham Book', Sans-serif;
}

.btn-auth:hover {
    background: #1a2f45; /* Azul um pouco mais claro */
}

.auth-footer {
    margin-top: 20px;
}
.auth-footer a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.9rem;
}

/* ========================
   DASHBOARD (SIDEBAR + MAIN)
   ======================== */
.dash-body {
    display: flex;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--navy);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 30px 0;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 0 25px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 45px;
    height: 45px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--navy);
}

.user-info { display: flex; flex-direction: column; }
.u-name { font-weight: 600; font-size: 0.95rem; }
.u-role { font-size: 0.75rem; opacity: 0.7; font-family: 'Gotham Light', sans-serif; }

.sidebar-menu { flex-grow: 1; }

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: 0.3s;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
}

.menu-item:hover, .menu-item.active {
    background: rgba(255,255,255,0.05);
    color: #fff;
    border-left-color: var(--gold);
}

.logout { margin-top: auto; color: #ff6b6b !important; }

/* Conteúdo */
.dash-content {
    flex-grow: 1;
    padding: 40px;
    overflow-y: auto;
}

.dash-header { 
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Permite quebrar linha */
    gap: 15px; /* Espaço entre título e botão */
    margin-bottom: 30px; }

.page-title {
    font-family: 'AGaramond-Regular', serif;
    font-size: 2.5rem;
    color: var(--navy);
    margin-bottom: 20px;
}

.steps-nav {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.step {
    font-size: 0.9rem;
    color: #888;
    cursor: pointer;
    padding-bottom: 10px;
    position: relative;
    top: 11px;
}
.step.active {
    color: var(--navy);
    font-weight: 600;
    border-bottom: 3px solid var(--navy);
}

/* Card Branco */
.dash-card {
    background: #fff;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.card-header { margin-bottom: 30px; }
.card-header h3 { color: var(--navy); font-size: 1.4rem; margin-bottom: 5px; }
.card-header p { color: #888; font-size: 0.9rem; }

.disabled-input {
    background: #f0f0f0;
    color: #888;
    cursor: not-allowed;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.btn-save {
    background: var(--navy);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.btn-delete {
    background: transparent;
    color: #ff4d4d;
    border: 1px dashed #ff4d4d;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
}

/* Utilitário para esconder elementos */
.hidden {
    display: none !important;
}

/* Responsividade Dashboard */
@media (max-width: 900px) {
    .dash-body { flex-direction: column; }
    .sidebar { width: 100%; height: auto; padding: 15px; }
    .sidebar-menu { display: flex; overflow-x: auto; padding-bottom: 10px; }
    .menu-item { flex-shrink: 0; border-left: none; border-bottom: 3px solid transparent; }
    .menu-item:hover, .menu-item.active { border-left-color: transparent; border-bottom-color: var(--gold); }
    
    .form-row { flex-direction: column; gap: 0; }
}

@media (max-width: 768px) {
    .dash-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .page-title {
        font-size: 1.8rem; /* Diminui um pouco o título no mobile */
        margin-bottom: 5px;
    }
    .btn-save {
        width: 100%; /* Botão ocupa largura total no mobile */
    }
}

/* --- SEÇÕES (ABAS) --- */
.dash-section {
    display: none; /* Esconde tudo por padrão */
    animation: fadeIn 0.5s ease;
}
.dash-section.active {
    display: block; /* Mostra a ativa */
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- ÁREA DE DOCUMENTOS --- */
.docs-area {
    border: 2px dashed #ddd;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    margin-top: 20px;
    background: #fafafa;
}
.doc-list {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}
.doc-card {
    background: white; border: 1px solid #eee; padding: 15px; border-radius: 8px;
    text-align: center; font-size: 0.8rem;
}
.doc-icon { font-size: 2rem; display: block; margin-bottom: 10px; color: var(--navy); }

/* --- GRÁFICOS (INVESTIMENTOS) --- */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}
.chart-box {
    background: white; padding: 20px; border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
@media (max-width: 768px) { .charts-grid { grid-template-columns: 1fr; } }


/* --- TABELAS FINANCEIRAS --- */
.finance-table, #investor-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    min-width: 600px; /* FORÇA o scroll se a tela for menor que 600px */
}

/* 1. Esta classe faltava. Ela cria a barra de rolagem horizontal APENAS na tabela */
.table-responsive {
    width: 100%;
    overflow-x: auto; /* Permite rolar horizontalmente se estourar */
    -webkit-overflow-scrolling: touch; /* Rolagem suave no iPhone/iOS */
    margin-bottom: 20px;
}

/* Ajustes gerais de tabela */
.finance-table th, #investor-table th { 
    background: var(--navy); 
    color: white; 
    padding: 12px 15px; /* Aumentei um pouco o padding lateral */
    text-align: left; 
    font-size: 0.9rem;
    white-space: nowrap; /* Impede que o título da coluna quebre linha feio */
}

.finance-table td, #investor-table td { 
    padding: 12px 15px; 
    border-bottom: 1px solid #eee; 
    font-size: 0.9rem;
    white-space: nowrap; /* Opcional: Impede que dados (como datas) quebrem linha */
}

.status-pago { color: #27ae60; font-weight: bold; }
.status-pendente { color: #f39c12; font-weight: bold; }
.status-atrasado { color: #c0392b; font-weight: bold; }
.tipo-entrada { color: #27ae60; }
.tipo-saida { color: #c0392b; }

/* --- CHAT (MENSAGENS) --- */
.chat-container {
    background: white; border-radius: 8px; height: 500px;
    display: flex; flex-direction: column; border: 1px solid #ddd;
}
.chat-messages {
    flex-grow: 1; padding: 20px; overflow-y: auto; background: #f4f6f8;
}
.message-bubble {
    max-width: 70%; padding: 10px 15px; border-radius: 10px; margin-bottom: 10px; font-size: 0.9rem;
}
.msg-me {
    background: var(--navy); color: white; align-self: flex-end; margin-left: auto;
    border-bottom-right-radius: 0;
}
.msg-support {
    background: #e9e9eb; color: #333; align-self: flex-start;
    border-bottom-left-radius: 0;
}
.chat-input-area {
    padding: 15px; border-top: 1px solid #ddd; display: flex; gap: 10px;
}
.chat-input-area input { flex-grow: 1; }

