.dash {
    display: grid;
    gap: 16px;
}

.card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 12px;
}

.kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.kpi {
    text-align: center;
}

    .kpi .kpi-value {
        font-size: 1.35rem;
        font-weight: 700;
    }

    .kpi .kpi-title {
        color: #666;
        font-size: .9rem;
    }

    .kpi.neg .kpi-value {
        color: #c03;
    }

    .kpi.pos .kpi-value {
        color: #0a7;
    }

.table-wrap {
    overflow: auto;
}

.t {
    width: 100%;
    border-collapse: collapse;
}

    .t th, .t td {
        padding: 8px 10px;
        border-bottom: 1px solid #eee;
        white-space: nowrap;
    }

    .t thead th {
        position: sticky;
        top: 0;
        background: #fafafa;
        z-index: 1;
    }

    .t tfoot .total td {
        font-weight: 700;
        background: #fafbff;
    }

    .t td.pos {
        color: #0a7;
    }

    .t td.neg {
        color: #c03;
    }

.log-area {
    max-height: 320px; /* altura fixa do box */
    min-height: 320px;
    overflow-y: auto; /* scroll vertical */
    overflow-x: auto; /* scroll horizontal se precisar */
    background: #0d1117; /* estilo terminal escuro */
    color: #d9d9d9;
    padding: 1rem;
    border-radius: 6px;
    font-size: 13px;
    border: 1px solid rgba(255,255,255,0.15);
    /* barra de rolagem estilizada */
    scrollbar-width: thin;
    scrollbar-color: #555 #1a1a1a;
    white-space: pre-wrap; /* mantém formatação mas permite quebra */
}

    /* Para navegadores WebKit */
    .log-area::-webkit-scrollbar {
        width: 8px;
    }

    .log-area::-webkit-scrollbar-thumb {
        background-color: #444;
        border-radius: 4px;
    }

    .log-area::-webkit-scrollbar-track {
        background: #1a1a1a;
    }

@media (max-width: 1100px) {
    .kpis {
        grid-template-columns: repeat(2, 1fr);
    }
}
