/* ============================================= */
/* HYFIN DASHBOARD - ESTILOS FINANCEIROS         */
/* ============================================= */

/* --- Cards de Resumo (Money Cards) --- */
.money-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.money-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.money-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.money-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}

/* --- Cores Financeiras (Utilitários) --- */
.text-success { color: #16a34a !important; } /* Verde (Receita) */
.text-danger  { color: #dc2626 !important; } /* Vermelho (Despesa) */
.text-blue    { color: #2563eb !important; } /* Azul (Saldo) */
.text-warning { color: #d97706 !important; } /* Laranja (A Pagar) */

/* --- Badges de Vencimento (Tabela) --- */
.date-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-block;
    white-space: nowrap;
}

/* Vence Hoje (Amarelo) */
.vence-hoje {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fcd34d;
}

/* Vencido (Vermelho) */
.vencido {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Futuro/Normal (Cinza) */
.futuro {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* --- Badges de Status (Pequenos) --- */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.badge-warning { background: #fff7ed; color: #c2410c; border: 1px solid #ffedd5; }

/* --- Botão de Ação Pequeno (Tabela) --- */
.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    border: none;
    color: white;
    cursor: pointer;
    transition: opacity 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-small:hover { opacity: 0.9; }

/* ============================================= */
/* BARRA DE FERRAMENTAS E FILTROS (FIX)          */
/* ============================================= */

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Permite quebrar linha em telas pequenas */
    gap: 1rem;
    margin-bottom: 1.5rem;
    background-color: transparent; /* Garante que não tenha fundo estranho */
}

.search-box {
    flex-grow: 1;       /* Cresce para ocupar espaço */
    max-width: 400px;   /* Mas tem um limite, para não espremer os filtros */
    min-width: 250px;
}

/* Grupo dos Selects (Filtros) */
.filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: nowrap; /* Força ficar na mesma linha em telas grandes */
}

/* Estilo dos Selects */
.form-select {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background-color: white;
    color: #475569;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    min-width: 140px; /* Largura mínima para não cortar texto */
    transition: border-color 0.2s;
}

.form-select:hover {
    border-color: #cbd5e1;
}

.form-select:focus {
    border-color: var(--primary-color, #2563eb);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    .toolbar {
        flex-direction: column; /* Um embaixo do outro */
        align-items: stretch;
    }
    
    .search-box {
        max-width: 100%;
    }

    .filter-group {
        display: grid;
        grid-template-columns: 1fr 1fr; /* Filtros dividem a linha */
    }
}



/* ============================================= */
/* ESTILOS DO MODAL DE LANÇAMENTO                */
/* ============================================= */

/* Toggle de Tipo (Receita vs Despesa) */
.toggle-type-container {
    display: flex;
    gap: 15px;
    margin-bottom: 1.5rem;
}

.type-option {
    flex: 1;
    cursor: pointer;
}

.type-option input {
    display: none; /* Esconde o radio button real */
}

.type-card {
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    color: #64748b;
    font-weight: 700;
    transition: all 0.2s;
}

.type-card:hover {
    background: #f1f5f9;
}

/* Estilos Ativos */
.type-active-receita {
    background: #dcfce7 !important;
    border-color: #16a34a !important;
    color: #16a34a !important;
}

.type-active-despesa {
    background: #fee2e2 !important;
    border-color: #dc2626 !important;
    color: #991b1b !important;
}

/* Grid do Formulário */
.grid-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.full-width {
    grid-column: span 2;
}

/* Inputs do Modal */
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.4rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    box-sizing: border-box;
    background-color: #fff;
}

.form-group input:focus, 
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

/* Checkbox bonito */
.checkbox-container label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #1e293b;
    background: #f8fafc;
    padding: 10px;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
}

.checkbox-container input {
    width: 18px;
    height: 18px;
}


