/* ============================================= */
/* HYFIN CONFIG - ESTILOS                        */
/* ============================================= */

.main-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Grid de Layout */
.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Duas colunas iguais */
    gap: 2rem;
}

@media (max-width: 768px) {
    .config-grid { grid-template-columns: 1fr; }
}

/* Cards de Configuração */
.config-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 400px;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-radius: 12px 12px 0 0;
}

.card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1e293b;
    font-weight: 700;
}

.card-body {
    padding: 0; /* Lista encosta nas bordas */
    flex-grow: 1;
    overflow-y: auto;
    max-height: 600px;
}

/* Listas de Itens */
.item-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.item-list li {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.item-list li:hover {
    background-color: #f8fafc;
}

.item-list li:last-child {
    border-bottom: none;
}

/* Detalhes do Item */
.item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.item-name {
    font-weight: 600;
    color: #334155;
    font-size: 0.95rem;
}

.item-meta {
    font-size: 0.8rem;
    color: #94a3b8;
}

.loading-state {
    padding: 2rem;
    text-align: center;
    color: #94a3b8;
}

/* Badges (Etiquetas) */
.badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-left: 8px;
    display: inline-block;
}

.badge-receita { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.badge-despesa { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* Modal Styles (Centralizado) */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; z-index: 999;
}
.modal-content {
    background: white; width: 90%; max-width: 450px; border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); overflow: hidden;
}
.modal-header { padding: 1.2rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f1f5f9; }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; background: #f8fafc; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid #f1f5f9; }
.hidden { display: none !important; }

/* Inputs e Botões */
.form-group { margin-bottom: 1rem; }
label { display: block; font-size: 0.85rem; font-weight: 600; color: #475569; margin-bottom: 0.4rem; }
input, select { width: 100%; padding: 0.7rem; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 0.95rem; box-sizing: border-box; }
input:focus, select:focus { border-color: #2563eb; outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

.btn-small { padding: 0.5rem 1rem; font-size: 0.85rem; }



