/* Container Geral */
.sispeFinanceiroWrapper {
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    color: #334155;
    max-width: 1200px;
    margin: 20px auto;
    position: relative;
}

/* CARDS DE RESUMO */
.sispeSummaryCards {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.cardStat {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    flex: 1;
    min-width: 200px;
    border-left: 5px solid #2563eb;
    display: flex;
    flex-direction: column;
    transition: opacity 0.3s;
}

.cardStat.hidden { display: none; }
.cardStat.profit { border-left-color: #10b981; }

.cardStat .label {
    font-size: 12px;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.cardStat .value {
    font-size: 24px;
    font-weight: 800;
    color: #1e293b;
}

/* FILTROS */
.sispeFiltersBox {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    margin-bottom: 30px;
}

.sispeFiltersBox form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filterGroup {
    display: flex;
    flex-direction: column;
    flex: 1 1 140px;
}

.filterGroup.wide { flex: 2 1 250px; }
.filterGroup.small { flex: 0 1 100px; }

.filterGroup label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 5px;
}

.filterGroup input, 
.filterGroup select {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0 10px;
    height: 40px;
    color: #334155;
    width: 100%;
    box-sizing: border-box;
}

.filterActions {
    display: flex;
    gap: 10px;
    flex: 1 1 auto;
}

.sispeBtnFilter {
    background-color: #1e293b !important;
    border-color: #1e293b !important;
    font-weight: 600 !important;
    color: #fff !important;
    padding: 0 20px !important;
    height: 40px !important;
    line-height: 38px !important;
    cursor: pointer;
    border-radius: 4px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Botão PDF Específico */
.sispeBtnExport {
    background-color: #dc2626 !important; /* Vermelho */
    border-color: #dc2626 !important;
}

/* LOADING OVERLAY */
.sispeLoadingOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    z-index: 10;
    display: none; 
    justify-content: center;
    align-items: flex-start;
    padding-top: 200px;
    border-radius: 12px;
}

.sispeSpinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* TABELA */
.sispeTableContainer {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden; 
    border: 1px solid #e2e8f0;
    
    /* CORREÇÃO DO BUG DA BORDA */
    border-bottom: 2px solid #e2e8f0; /* Força uma borda no final do container */
    padding-bottom: 2px; /* Garante espaço para a borda não ser cortada */
}

.tableScroll {
    overflow-x: auto;
    width: 100%;
}

.sispeCustomTable {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

.sispeCustomTable thead th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    border-bottom: 2px solid #e2e8f0;
    padding: 15px;
    text-align: left;
    white-space: nowrap;
}

.sispeCustomTable tbody td {
    padding: 15px;
    vertical-align: middle;
    color: #334155;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.sispeCustomTable tbody tr:hover {
    background-color: #f8fafc;
}

/* Colunas e Tags */
.colId { color: #2563eb; font-family: monospace; font-weight: bold; }
.colValor { color: #059669; font-weight: bold; }

.sispe-icon {
    vertical-align: middle;
    color: #94a3b8;
    margin-right: 4px;
    font-size: 16px;
}

.payTag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}
.tagPix { background: #ecfdf5; color: #059669; }
.tagCard { background: #eff6ff; color: #2563eb; }

.licencaBadge {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    display: inline-block;
}

@media screen and (max-width: 768px) {
    .sispeSummaryCards { flex-direction: column; }
    .filterGroup, .filterGroup.wide, .filterGroup.small { flex: 1 1 100%; }
    .filterActions { width: 100%; margin-top: 10px; }
}