*{
    font-family: museo_sans500;

}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f8f8f8;
}

th {
    text-align: center;
}

.calendar-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-right: 8px;
    color: #2c82c9;
}

.calendar-icon i,
.calendar-icon .material-icons,
.calendar-icon svg {
    font-size: 16px;
}

#dateRange,
#compareDateRange {
    border: none;
    outline: none;
    background: transparent;
    width: 205px;
    color: #2c82c9;
    font-weight: bold;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    width: 100%;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #2c82c9;
}

.dashboard-title {
    font-size: 24px;
    color: #2c82c9;
}

.containerDashboard {
    width: 100%;
    margin: auto;
    background: white;
}

header {
    text-align: center;
    color: #6a1b9a;
}

.filters-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 10px 20px;
    border-radius: 8px;
}

.filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.filters-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.filters-groups-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.filters-left {
    display: flex;
    align-items: flex-end;
    gap: 40px;
    width: 100%;
    margin-top: 10px;
}

.filter-group,
.compare-year-field {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.filter-label,
.compare-year-label {
    font-size: 14px;
    font-weight: bold;
    color: #313131;
    white-space: nowrap;
}

.filters-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-filter {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px 10px;
    background: white;
    height: 40px;
}

.date-filter button {
    border: none;
    padding: 5px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
}

.date-filter input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
}

.date-filter:hover{
    background: #e8f4fd;
}

select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    height: 40px;
    border-radius: 5px;
    width:260px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

select:hover {
    background: #e8f4fd;
}

.export-buttons {
    display: flex;
    gap: 11px;
}

.btn-excel,
.btn-pdf {
    background: #2c82c9;
    color: #FFFFFF;
    padding: 8px 12px;
    border: 1px solid #dfe6ee;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.btn-excel:hover,
.btn-pdf:hover {
    background: #1e3a6e;
}

.btn-comparativo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    background: #2c82c9;
    padding: 8px 14px;
    border: 1px solid #2c82c9;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.btn-comparativo:hover {
    background: #1e3a6e;
}

.btn-comparativo.active {
    background: #2c82c9;
    color: #ffffff;
}

.btn-comparativo.active:hover {
    background: #256fac;
}

.sales {
    margin-top: 20px;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.sales th,
.sales td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #ddd;
    border-right: 1px solid #ddd;
    color: #313131;
}

th {
    color: #6B7280;
}

/*th:last-child,*/
/*td:last-child {*/
/*    border-right: none;*/
/*}*/

.header-type {
    font-size: 15px;
}

.header-type th {
    background: #e8f4fd;
    color: #1e3a6e;
    white-space: nowrap;
    padding: 10px;
    border: 1px solid #d7e6f5;
    vertical-align: middle;
}

.header-type th:first-child {
    text-align: left !important;
    color: #2c82c9;
}

.header-compare-year th {
    padding: 0;
    border: 1px solid #d7e6f5;
    border-top: none;
}

.header-compare-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    table-layout: fixed;
}

.header-compare-table td {
    border: none;
    padding: 6px 8px;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    width: 33.33%;
    color: #1e3a6e !important;
    background: #e8f4fd;
}

.header-compare-table td:not(:last-child) {
    border-right: 1px solid #d7e6f5;
}

.header-compare-table td:nth-child(2) {
    background: #dcebfa;
}

.header-compare-table td.pct-var-col {
    background: #e1f0e6;
    color: #1f7a4d;
}

/*.sales thead tr:last-child th {*/
/*    border-bottom: 1px solid #d7e6f5;*/
/*}*/

.products {
    border: 2px solid #2c82c9;
}

.families {
    border: 2px solid #d53232;
}

.p-table {
    border-bottom: 1px solid #ddd;
}
.p-table tr {

    border-bottom: 1px solid #ddd;

}

.p-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.dashboardBorder {
    border: 2px solid #2c82c9;
    border-radius: 12px;
    padding: 20px;
    padding-top: 0px;
}

.products-families {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    color: #313131;
}

.products-families > div {
    width: calc(50% - 10px);
    background: white;
    padding: 15px;
    border-radius: 10px;
}

.text-p {
    color: #2c82c9;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px

}

.text-f {
    color: #d53232;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px
}

.p-table td {
    padding: 10px;
}

.text-justify {
    text-align: left !important;
}

.mainTableBody{
    border-left: 1px solid #ddd;
}

.cardHighlight{
    color: #1e3a6e !important;
}

@media (max-width: 768px) {
    .filters {
        flex-direction: column;
    }

    .products-families > div {
        width: 100%;
    }
}

/* Media Queries para responsividade */
@media (max-width: 1200px) {
    .products-families > div {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
    }

    .logo, .dashboard-title {
        width: 100%;
    }

    .filters-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .export-buttons {
        width: 100%;
        justify-content: flex-end;
        margin-top: 10px;
    }

    .filters-groups-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filters-left {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-top: 10px;
    }

    .filter-group {
        width: 100%;
    }

    #compareToggleBtn {
        width: 100%;
        justify-content: center;
    }

    .date-filter input {
        width: 150px;
    }

    .sales-title {
        font-size: 20px;
    }

    .header-type {
        font-size: 16px;
    }

    .text-p, .text-f {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .containerDashboard {
        margin-top : 60px;
        padding: 0 10px;
    }

    .filters {
        width: 100%;
    }

    .date-filter {
        width: 100%;
        justify-content: space-between;
    }

    .date-filter input {
        width: 100%;
    }

    select {
        width: 100%;
    }

    .export-buttons {
        justify-content: space-between;
    }

    .btn-excel, .btn-pdf {
        width: 48%;
        background: #2c82c9;
        color: #FFFFFF;
    }

    .sales-title {
        font-size: 18px;
        flex-direction: column;
        align-items: flex-start;
    }

    .sales-title::after {
        width: 100%;
        margin-left: 0;
        margin-top: 5px;
    }

    .dashboardBorder {
        padding: 10px;
    }

    .sales th,
    .sales td,
    .p-table td {
        padding: 8px 5px;
        font-size: 14px;
    }

    .header-type th {
        font-size: 14px;
    }
}

@media (max-width: 400px) {
    .logo {
        font-size: 20px;
    }

    .dashboard-title {
        font-size: 18px;
    }

    .btn-excel, .btn-pdf {
        font-size: 12px;
        padding: 6px 8px;
        background: #2c82c9;
        color: #FFFFFF;
    }
}

.sales-title {
    display: flex;
    align-items: center;
    font-size: 24px;
    color: #2c82c9;
}

.sales-title::after {
    content: "";
    flex-grow: 1;
    height: 2px;
    background-color: #d53232;
    margin-left: 10px;
}

#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    cursor: wait;
    pointer-events: all;
}

.spinner-wrapper img {
    z-index: 10000;
    width: 64px;
    height: 64px;
}

.text-center {
    text-align: center;
}

.kpi-compare-table {
    width: 100%;
    min-width: 170px;
    border-collapse: collapse;
    background: transparent;
    margin: 0 auto;
    table-layout: fixed;
}

.kpi-compare-table td {
    border: none;
    padding: 6px 8px;
    text-align: center;
    color: #313131;
    font-size: 12px;
    width: 33.33%;
}

.kpi-compare-values td:not(:last-child) {
    border-right: 1px solid #eef1f4;
    border-left: none !important;
}

.variation-positive {
    color: #1f9d6e !important;
    font-weight: bold;
}

.variation-negative {
    color: #e14c4c !important;
    font-weight: bold;
}

.variation-neutral {
    color: #c9a400 !important;
    font-weight: bold;
}

.sales tbody tr:nth-child(even) {
    background: #f8fafc;
}

.kpi-row-highlight {
    color: #3a9bdc;
    font-weight: bold;
}

/* Orders per Day Chart */
.chart-section {
    margin-top: 20px;
    padding: 15px;
    background: #fff;
    border: 2px solid #2c82c9;
    border-radius: 10px;
}

.chart-title {
    font-size: 18px;
    color: #2c82c9;
    font-weight: bold;
    margin: 0 0 10px;
}

.chart-label{
    margin-bottom: 10px;
    font-size: 14px;
    color: #767676
}

.chart-container {
    position: relative;
    width: 100%;
    height: 320px;
}
