/*================================================================================
	Item Name: Modern Admin - Clean Bootstrap 4 Dashboard HTML Template
	Author: PIXINVENT
	Author URL: http://www.themeforest.net/user/pixinvent
================================================================================

NOTE:
------
PLACE HERE YOUR OWN SCSS CODES AND IF NEEDED, OVERRIDE THE STYLES FROM THE OTHER STYLESHEETS.
WE WILL RELEASE FUTURE UPDATES SO IN ORDER TO NOT OVERWRITE YOUR STYLES IT'S BETTER LIKE THIS.  */

/*
.main-menu.menu-fixed {
    position: fixed;
    top: 0;
    height: 100%;
    z-index: 1040;
}
*/

.vendas-grid-card {
    background: #ffffff;
    border: 1px solid #e7eaf3;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(34, 41, 47, 0.08);
    padding: 12px 12px 8px;
    margin: 12px 0 16px;
}

.vendas-grid-title {
    font-size: 1rem;
    font-weight: 700;
    color: #2c2c54;
    margin-bottom: 10px;
}

.vendas-grid-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table.vendas-grid-table {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 100%;
    margin-bottom: 0 !important;
}

table.vendas-grid-table thead th,
table.vendas-grid-table .vendas-grid-header th {
    background: #5f4b8b;
    color: #ffffff;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border: none !important;
    vertical-align: middle;
    white-space: nowrap;
}

table.vendas-grid-table tbody td,
table.vendas-grid-table .vendas-grid-row td {
    font-size: 0.82rem;
    color: #434a54;
    border-top: 1px solid #edf1f7;
    vertical-align: middle;
    white-space: nowrap;
}

table.vendas-grid-table tbody tr.vendas-pair-odd > td,
table.vendas-grid-table tbody tr.child.vendas-pair-odd > td.child {
    background: #ffffff !important;
}

table.vendas-grid-table tbody tr.vendas-pair-even > td,
table.vendas-grid-table tbody tr.child.vendas-pair-even > td.child {
    background: #f5f8ff !important;
}

table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
    display: none !important;
}

table.dataTable > tbody > tr.child ul.dtr-details {
    display: none;
}

table.dataTable > tbody > tr.child td.child {
    padding: 8px 10px !important;
}

.vendas-child-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.vendas-child-label {
    color: #5f4b8b;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-right: 4px;
}

.vendas-child-value {
    color: #253858;
    font-size: 0.82rem;
    font-weight: 600;
}

.vendas-child-pair {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.vendas-child-sep {
    color: #8d99ae;
    font-weight: 600;
}

.vendas-grid-empty {
    text-align: center;
    color: #7b8794;
    padding: 14px !important;
}

.vendas-totais {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    gap: 8px;
}

.vendas-total-card {
    background: #ffffff;
    border: 1px solid #e2e8f4;
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
}

.vendas-total-label {
    color: #5f4b8b;
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 700;
}

.vendas-total-value {
    color: #1f2d3d;
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 2px;
}

div.dataTables_wrapper div.dataTables_filter input {
    border-radius: 6px;
    border: 1px solid #d9e2ec;
    padding: 0.32rem 0.5rem;
}

div.dataTables_wrapper div.dataTables_length select {
    border-radius: 6px;
    border: 1px solid #d9e2ec;
}

@media (max-width: 767px) {
    .vendas-grid-card {
        padding: 10px 8px 6px;
        border-radius: 8px;
    }

    .vendas-grid-title {
        font-size: 0.92rem;
        margin-bottom: 8px;
    }

    table.vendas-grid-table {
        min-width: 100%;
    }

    .vendas-child-inline {
        gap: 4px;
    }

    .vendas-child-sep {
        display: none;
    }

    .vendas-totais {
        grid-template-columns: repeat(2, minmax(130px, 1fr));
    }
}

/* ================================================================
   RELATORIOS - UX MODERNA
   ================================================================ */

.rpt-page {
    background: #f1f5f9;
    min-height: 100vh;
    padding: 0 0 60px;
}

/* TOPBAR */
.rpt-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding: 22px 28px 18px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0;
}

.rpt-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.rpt-topbar-icon {
    font-size: 2rem;
    color: #4f46e5;
}

.rpt-topbar-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    line-height: 1.2;
}

.rpt-topbar-sub {
    font-size: 0.82rem;
    color: #64748b;
    display: block;
    margin-top: 2px;
}

.rpt-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rpt-empresa-label {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
}

.rpt-empresa-select {
    border: 1.5px solid #c7d2fe;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.88rem;
    color: #1e293b;
    background: #f8faff;
    min-width: 180px;
    outline: none;
}

.rpt-empresa-select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}

/* LAYOUT 2 COLUNAS */
.rpt-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    padding: 24px 28px;
    align-items: start;
}

/* CATEGORIAS */
.rpt-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    align-items: start;
}

.rpt-cat-card {
    background: #fff;
    border-radius: 14px;
    border: 1.5px solid #e2e8f0;
    overflow: hidden;
    transition: box-shadow .18s, border-color .18s;
}

.rpt-cat-card:hover {
    border-color: #c7d2fe;
    box-shadow: 0 4px 18px rgba(79,70,229,0.09);
}

.rpt-cat-card.rpt-cat-open {
    border-color: #4f46e5;
    box-shadow: 0 6px 24px rgba(79,70,229,0.13);
}

.rpt-cat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
    background: #fff;
    transition: background .15s;
}

.rpt-cat-header:hover {
    background: #f8faff;
}

.rpt-cat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.rpt-cat-name {
    font-size: 0.97rem;
    font-weight: 700;
    color: #1e293b;
    flex: 1;
    letter-spacing: .01em;
}

.rpt-cat-chevron {
    color: #94a3b8;
    font-size: 0.82rem;
    transition: transform .2s;
}

.rpt-cat-open .rpt-cat-chevron {
    transform: rotate(180deg);
    color: #4f46e5;
}

.rpt-cat-body {
    display: none;
    padding: 4px 0 10px;
    border-top: 1px solid #f1f5f9;
    background: #fafbff;
}

.rpt-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 22px;
    font-size: 0.875rem;
    color: #334155;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background .13s, color .13s, border-color .13s;
    cursor: pointer;
}

.rpt-item i {
    width: 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.rpt-item:hover {
    background: #ede9fe;
    color: #4338ca;
    border-left-color: #4f46e5;
    text-decoration: none;
}

.rpt-item:hover i {
    color: #4f46e5;
}

.rpt-item.rpt-item-active {
    background: #eef2ff;
    color: #4338ca;
    font-weight: 700;
    border-left-color: #4f46e5;
}

.rpt-item.rpt-item-active i {
    color: #4f46e5;
}

/* PAINEL DE FILTROS */
.rpt-filter-panel {
    background: #fff;
    border-radius: 16px;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 4px 24px rgba(79,70,229,0.07);
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 110px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rpt-filter-panel.rpt-filter-visible {
    display: flex;
}

.rpt-filter-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    font-size: 0.97rem;
    font-weight: 700;
    border-radius: 14px 14px 0 0;
    letter-spacing: .02em;
    flex-shrink: 0;
}

.rpt-filter-body {
    padding: 18px 20px;
    overflow-y: auto;
    flex: 1;
}

.rpt-filter-group {
    margin-bottom: 16px;
}

.rpt-filter-group-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #4f46e5;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rpt-filter-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 5px;
}

.rpt-zoom-btn {
    margin-left: auto;
    color: #4f46e5;
    font-size: 0.82rem;
    line-height: 1;
}

.rpt-zoom-btn:hover { color: #7c3aed; }

.rpt-input {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 0.875rem;
    color: #1e293b;
    background: #f8faff;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}

.rpt-input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
    background: #fff;
}

.rpt-time {
    margin-top: 5px;
    max-width: 110px;
}

.rpt-date-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.rpt-date-col {
    flex: 1;
    min-width: 0;
}

.rpt-date-sep {
    padding-top: 28px;
    color: #94a3b8;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.rpt-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.rpt-row-3 {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rpt-radio-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.rpt-radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: #334155;
    cursor: pointer;
    margin-bottom: 0;
}

.rpt-dre-mode {
    background: #f8faff;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid #c7d2fe;
}

.rpt-dre-options {
    display: flex;
    gap: 20px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.rpt-hint {
    color: #64748b;
    font-size: 0.75rem;
    margin-top: 6px;
    display: block;
}

.rpt-btn-search {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: .02em;
    cursor: pointer;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: opacity .2s, transform .1s;
}

.rpt-btn-search:hover {
    opacity: .92;
    transform: translateY(-1px);
}

.rpt-btn-search:active {
    transform: translateY(0);
}

/* RESPONSIVE */
@media (max-width: 1100px) {
    .rpt-layout {
        grid-template-columns: 1fr 320px;
    }
    .rpt-categories {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 820px) {
    .rpt-layout {
        grid-template-columns: 1fr;
        padding: 16px;
    }
    .rpt-categories {
        grid-template-columns: repeat(2, 1fr);
    }
    .rpt-filter-panel {
        position: static;
        max-height: none;
    }
    .rpt-topbar {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .rpt-categories {
        grid-template-columns: 1fr;
    }
}
