/* =========================================
   1. Variáveis e Cores Premium
   ========================================= */
:root {
    --bg-card: rgba(12, 15, 22, 0.75); /* Escuro, transparente para mostrar o fundo, sem ser fosco demais */
    --text-main: #ffffff;
    --text-secondary: #94a3b8;
    --gold: #f59e0b;
    --border: rgba(255, 255, 255, 0.08);
    
    /* Efeitos Neon */
    --neon-red: 0 0 12px rgba(239, 68, 68, 0.4), inset 0 0 6px rgba(239, 68, 68, 0.1);
    --neon-green: 0 0 12px rgba(16, 185, 129, 0.4), inset 0 0 6px rgba(16, 185, 129, 0.1);
    --neon-gold: 0 0 12px rgba(245, 158, 11, 0.4), inset 0 0 6px rgba(245, 158, 11, 0.1);
}

/* =========================================
   2. Reset e Configurações Base
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    /* Fundo puro, sem degradê escuro por cima */
    background: url('../img/fundo.png') no-repeat center center fixed;
    background-color: #05070c; /* Cor de segurança */
    background-size: cover;
    color: var(--text-main);
    padding-bottom: 80px; /* Espaço para o menu inferior no mobile */
    min-height: 100vh;
}

.container {
    padding: 20px 16px;
    width: 100%;
}

/* =========================================
   3. Header (Cabeçalho)
   ========================================= */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
}
.user-greeting h1 { font-size: 1.5rem; font-weight: 800; }
.current-date { font-size: 0.8rem; color: var(--gold); font-weight: 600; }
.status-badge {
    background: rgba(245, 158, 11, 0.1);
    color: var(--gold);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 5px 14px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 800;
}

/* =========================================
   4. Cards de Indicadores (Dashboard)
   ========================================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1 coluna no celular */
    gap: 16px;
    margin-bottom: 40px;
}

.kpi-card {
    background: var(--bg-card);
    padding: 22px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 18px;
    border: 1px solid var(--border);
    transition: transform 0.2s ease;
}

/* Bordas Neon e Sombras */
.card-saida { border-bottom: 2px solid #ef4444; box-shadow: var(--neon-red); }
.card-entrada { border-bottom: 2px solid #10b981; box-shadow: var(--neon-green); }
.card-lucro { border-bottom: 2px solid var(--gold); box-shadow: var(--neon-gold); }

.kpi-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon-svg { width: 22px; height: 22px; }
.card-saida .icon-svg { color: #ef4444; }
.card-entrada .icon-svg { color: #10b981; }
.card-lucro .icon-svg { color: var(--gold); }

.kpi-info { display: flex; flex-direction: column; }
.kpi-title { font-size: 0.75rem; color: var(--text-secondary); font-weight: 700; text-transform: uppercase; }
.kpi-value { font-size: 1.4rem; font-weight: 800; margin-top: 4px; }
.gold-text { color: var(--gold) !important; text-shadow: 0 0 10px rgba(245, 158, 11, 0.2); }

/* =========================================
   5. Lista de Cobranças
   ========================================= */
.secao-titulo {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cobranca-item {
    background: var(--bg-card);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cliente-info { display: flex; align-items: center; gap: 14px; }
.cliente-avatar-fallback {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.05); color: var(--gold);
    display: flex; align-items: center; justify-content: center;
}

.cliente-detalhes { display: flex; flex-direction: column; gap: 2px; }
.cliente-nome { font-size: 0.95rem; font-weight: 700; }
.parcela-valor { font-size: 1.05rem; font-weight: 800; color: var(--gold); }
.vencimento-tag {
    font-size: 0.65rem; font-weight: 800; padding: 2px 8px;
    border-radius: 4px; text-transform: uppercase; width: max-content;
}

.tag-hoje { background: rgba(245, 158, 11, 0.15); color: var(--gold); border: 1px solid var(--gold); }
.tag-atrasado { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid #ef4444; }

.btn-whatsapp {
    background-color: #25d366; color: white; width: 40px; height: 40px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 10px rgba(37, 211, 102, 0.3);
}

/* =========================================
   6. Menu Mobile (Padrão)
   ========================================= */
.nav-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    /* 100% transparente e sem desfoque */
    background: transparent; 
    backdrop-filter: none; 
    -webkit-backdrop-filter: none;
    border-top: 1px solid var(--border); /* Mantém só uma linha super fina separando */
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    z-index: 999;
}

/* Esconde a logo no mobile para não ocupar a tela toda */
.sidebar-logo { display: none; }
.nav-links { display: flex; width: 100%; justify-content: space-around; }

.nav-item {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-weight: 600;
}
.nav-item.active { color: var(--gold); text-shadow: 0 0 8px rgba(245, 158, 11, 0.3); }
.nav-icon { font-size: 1.3rem; margin-bottom: 4px; }

/* =========================================
   7. Desktop Breakpoint (Acima de 992px)
   ========================================= */
@media (min-width: 992px) {
    body { padding-bottom: 0; }
    
    .nav-menu {
        top: 0;
        width: 250px;
        height: 100vh;
        flex-direction: column;
        justify-content: flex-start;
        border-top: none;
        border-right: 1px solid var(--border); /* Mantém só a linha divisória lateral */
        padding: 40px 16px;
        
        /* 100% transparente e sem desfoque no PC */
        background: transparent; 
        backdrop-filter: none; 
        -webkit-backdrop-filter: none;
    }

    /* Exibe a logo no topo da Sidebar */
    .sidebar-logo {
        display: flex;
        justify-content: center;
        margin-bottom: 40px;
    }
    .sidebar-logo img {
        max-width: 160px; /* Tamanho ajustável para a sua logo.png */
        height: auto;
    }

    .nav-links { flex-direction: column; gap: 12px; }

    .nav-item {
        font-size: 0.9rem;
        flex-direction: row;
        gap: 14px;
        padding: 14px 18px;
        border-radius: 10px;
        width: 100%;
    }
    .nav-item:hover { background-color: rgba(255, 255, 255, 0.05); color: #ffffff; }
    .nav-item.active { background-color: rgba(245, 158, 11, 0.1); }
    .nav-icon { margin-bottom: 0; }

    .main-content { margin-left: 250px; padding: 45px 50px; }
    .container { max-width: 1200px; margin: 0 auto; }
    
    /* Coloca os 3 cards lado a lado no PC */
    .dashboard-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
    .kpi-card:hover { transform: translateY(-4px); }
}