/* ====== FINANCEIRO ====== */
#financeiro { padding: 20px; }

/* TITULO - CORRIGIDO */
#financeiro .titulo {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 10px 0 20px; margin-bottom: 20px; flex-wrap: wrap; gap: 10px;
}
#financeiro .titulo h2 {
    display: flex; align-items: center; gap: 12px;
    font-size: 24px; font-weight: 700; color: #2f0375; margin: 0;
}
#financeiro .titulo h2 i { color: #7163ba; font-size: 24px; }
#financeiro .subtitulo {
    font-size: 13px; color: #6b7280; margin: 4px 0 0 36px;
}

/* INPUT COM ICONE - SEM SOBREPOSIÇÃO */
.input-icon {
    position: relative;
}
.input-icon i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 14px;
    pointer-events: none;
}
.input-icon input, .input-icon select {
    width: 100%;
    height: 38px;
    padding: 0 12px 0 38px; /* espaço pro ícone */
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #fff;
    font-size: 14px;
    outline: none;
}
.input-icon input:focus, .input-icon select:focus { border-color: #8978df; }

/* BOTOES */
.btn-fin {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: none; border-radius: 6px; font-weight: 600; cursor: pointer;
    transition: all 0.2s ease; white-space: nowrap; height: 38px; padding: 0 16px;
    font-size: 14px;
}
.btn-fin-primary { background-color: #fff; color: #8978df; 
    border: 1px solid #d1d5db; }
.btn-fin-primary:hover { background-color: #f9fafb; border-color: #8978df; }
.btn-fin-success {background-color: #8978df; color: #fff; 
    box-shadow: 0 2px 6px rgba(137, 120, 223, 0.25); }
.btn-fin-success:hover { background-color: #0b8b40; transform: translateY(-1px); }

/* CARDS STATS */
.stats-grid-fin {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px; margin-bottom: 20px;
}
.stat-card-fin {
    background: #fff; padding: 16px; border-radius: 8px; border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.stat-label-fin { font-size: 12px; color: #6b7280; margin-bottom: 4px; display: block; }
.stat-value-fin { font-size: 22px; font-weight: 700; color: #111827; }
.stat-value-fin.pago { color: #10b981; }
.stat-value-fin.pendente { color: #f59e0b; }

/* TOOLBAR */
.toolbar-fin {
    background: #fff; padding: 14px 16px; border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); margin-bottom: 20px;
    display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
}
.search-box-fin { flex: 1 1 320px; min-width: min(100%, 260px); max-width: none; height: 40px; }
.search-box-fin input { min-width: 0; height: 100%; color: #1e293b; }
#barraFiltrosFin { display:flex; align-items:center; gap:8px; }
#barraFiltrosFin label { color:#475569; font-size:11px; font-weight:700; }
#barraFiltrosFin select {
    height: 40px; padding: 0 12px; border-radius: 6px; border: 1px solid #cbd5e1;
    background: #fff; color:#1e293b; font-size: 13px; min-width: 160px;
}

/* TABELA */
.table-container-fin {
    background: #fff; border-radius: 8px; border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04); overflow-x: auto;
}
.por-pagina-fin { display:flex; align-items:center; gap:8px; color:#475569; font-size:11px; font-weight:700; }
.por-pagina-fin select { height:32px; padding:0 8px; border:1px solid #cbd5e1; border-radius:5px; color:#1e293b; background:#fff; }
#paginacaoFin .botoes { display:flex; align-items:center; gap:4px; }
@media (max-width: 640px) {
    #financeiro .toolbar-fin { align-items:stretch; }
    #financeiro .search-box-fin { flex-basis:100%; }
    #financeiro #barraFiltrosFin { margin-left:0; flex:1; }
}
.tabela-fin {
    width: 100%; border-collapse: collapse; font-size: 13px;
}
.tabela-fin thead { background: #f9fafb; }
.tabela-fin th,.tabela-fin td {
    padding: 12px 14px; text-align: left; border-bottom: 1px solid #f1f5f9; white-space: nowrap;
}
.badge-fin {
    padding: 4px 10px; border-radius: 16px; font-size: 11px; font-weight: 700;
    text-transform: uppercase;
}
.badge-fin.pago { background: #d1fae5; color: #065f46; }

/* MODAL NEUTRO */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; }
.modal.active { display: flex; }
.modal-content {
    background: #fff; border-radius: 12px; width: 90%; max-width: 520px; max-height: 90vh; overflow-y: auto;
}
.modal-header { padding: 16px 20px; border-bottom: 1px solid #e5e7eb; display: flex; justify-content: space-between; align-items: center; border-radius: 12px 12px 0 0; }
.modal-header h3 { font-size: 16px; font-weight: 600; margin: 0; display: flex; gap: 8px; align-items: center; color: #fff !important; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: #6b7280; }
.modal-body { padding: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 500; color: #374151; margin-bottom: 6px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* CHECKBOX CLASSES */
.checkbox-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    padding: 10px; border: 1px solid #e5e7eb; border-radius: 6px; max-height: 150px; overflow-y: auto;
}
.checkbox-item { display: flex; align-items: center; gap: 6px; font-size: 13px; }

/* BUSCA ALUNO */
.busca-aluno-container { position: relative; }
.busca-resultados {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border: 1px solid #d1d5db; border-top: none; border-radius: 0 0 6px 6px;
    max-height: 180px; overflow-y: auto; z-index: 10;
}
.busca-item { padding: 10px 12px; cursor: pointer; font-size: 13px; }
.busca-item:hover { background: #f3f4f6; }
.valor-input { font-size: 18px; font-weight: 700; color: #10b981; }
.actions-menu-ano {
    position: absolute; background: #fff; border: 1px solid #e5e7eb;
    border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none; z-index: 1001; min-width: 140px; padding: 6px;
}
.actions-menu-ano.active { display: block; }
.actions-menu-ano button {
    width: 100%; text-align: left; padding: 8px 10px; border: none;
    background: none; cursor: pointer; font-size: 13px; display: flex; gap: 8px; align-items: center;
    border-radius: 4px; color: #374151;
}
.actions-menu-ano button:hover { background: #f3f4f6; }
.checkbox-grid{ grid-template-columns: repeat(4, 1fr)!important; } /* 4 classes por linha */
#financeiro .fin-table thead th { background:#f8fafc !important; }
#paginacaoFin button.active { background:#1e293b; color:#fff; border-color:#1e293b; }