/* =========================================================
   BASE
========================================================= */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    overflow-x: hidden;
    background: #f4f6f8;
}

h1 {
    margin-bottom: 20px;
}

/* =========================================================
   LAYOUT GERAL
========================================================= */

.main-content {
    padding: 20px;
}

/* =========================================================
   NAVBAR
========================================================= */

.navbar-top {
    width: 100%;
    background: #000;
    padding: 12px 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.navbar-content {
    max-width: 1600px;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-logo {
    height: 42px;
}

.navbar-title {
    font-size: 22px;
    font-weight: bold;
    color: #fff;
    letter-spacing: 0.5px;
}

/* =========================================================
   CARDS
========================================================= */

.cards {
    display: flex;
    gap: 15px;
    flex-wrap: nowrap;
    margin-bottom: 25px;
}

.card {
    width: calc(25% - 15px);
    min-width: 180px;
    background: #ffffff;
    padding: 20px;
    text-align: center;
    font-size: 26px;
    font-weight: bold;
    border-radius: 10px;
    border: 2px solid #ddd;
}

.card span {
    font-size: 14px;
    color: #666;
}

/* =========================================================
   FILTROS
========================================================= */

.filtros-container {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.filtros-bloco h3 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.linha-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.campo {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.campo label {
    font-size: 13px;
    color: #444;
    margin-bottom: 3px;
}

.campo input,
.campo select {
    padding: 6px 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* =========================================================
   QUICK FILTERS / PERÍODO
========================================================= */

.quick-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 10px;
}

.btnPeriodo {
    padding: 6px 12px;
    border: 1px solid #bbb;
    border-radius: 8px;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 13px;
    transition: 0.2s;
    white-space: nowrap;
}

.btnPeriodo:hover{
    background: #e3e3e3;
}

/* =========================================================
   BOTÕES DE AÇÃO
========================================================= */

.acoes {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.btnOk {
    background: #4CAF50;
    color: #fff;
    padding: 7px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

.btnClear, .btnLimparDatas {
    background: #d9534f;
    color: #fff;
    padding: 7px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

.btnOk:hover {
    background: #46a049;
}

.btnClear:hover, .btnLimparDatas:hover {
    background: #c9302c;
}

/* =========================================================
   GRÁFICOS
========================================================= */

.charts {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.chart-container {
    flex: 1 1 45%;
    min-width: 320px;
    height: 320px;
    background: #ffffff;
    padding: 10px;
    border-radius: 10px;
    position: relative;
}

/* =========================================================
   TABELA
========================================================= */

#tabela {
    margin-top: 30px;
}

/* =========================================================
   RESPONSIVO
========================================================= */

@media (max-width: 900px) {
    .cards {
        flex-wrap: wrap;
    }

    .card {
        width: calc(50% - 15px);
    }
}

@media (max-width: 700px) {
    .linha-filtros {
        flex-direction: column;
    }

    .card {
        width: 100%;
    }
}

#tabela {
    font-size: 13px;
}

#tabela thead th {
    background: #f3f5f7;
    font-weight: bold;
    white-space: nowrap;
}

#tabela tbody tr:hover {
    background: #f0f7ff;
}

#tabela a {
    color: #0d6efd;
    font-weight: bold;
    text-decoration: none;
}

#tabela a:hover {
    text-decoration: underline;
}

#tabela td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

#tabela td:nth-child(11) {
    max-width: 280px;
}
