:root {
    --page-bg: #f3f4f6;
    --card-bg: #ffffff;
    --border: #e5e7eb;
    --radius: 16px;
    --pad: 16px;
    --gap: 12px;
    --card-h: auto;
    --shadow: 0 10px 25px rgba(0, 0, 0, .25);
    --focus: #888888;
    --ctrl-h: 38px;
    --muted: #6b7280;
    --title: #111827;
    --ok: #16a34a;
    --warn: #f59e0b;
}


/* @font-face {
    font-family: ""Open Sans", sans-serif";
    src: url("fontes/"Open Sans", sans-serif-Medium.ttf") format("truetype");
} */


* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: "Open Sans", sans-serif;
    background: #F9FAFB;
    color: var(--title);
    height: 100%;
}

[data-autoshrink] {
    white-space: nowrap;
    overflow: hidden;
    /* evita quebra enquanto ajusta */
}

.wrap {
    margin: 0;
    padding: 16px 12px;
    height: 100%;
    display: flex;
    flex-direction: column;
}


.filters {
    margin-bottom: 12px;
    flex: 0 0 auto;
}

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

.group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center
}

label {
    font-size: 12px;
    color: var(--muted)
}

select,
input,
button {
    appearance: none;
    background: #fff;
    color: var(--title);
    padding: 0 10px;
    border-radius: 10px;
    font-size: 14px;
    height: var(--ctrl-h);
    line-height: calc(var(--ctrl-h) - 2px);
}

input[type="number"] {
    width: 72px;
    text-align: center
}

input[type="date"] {
    min-width: 1px
}

button {
    cursor: pointer
}

.grid {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr
}

@media (min-width:640px) {
    .grid {
        grid-template-columns: 1fr 1fr
    }
}

@media (min-width:1024px) {
    .grid {
        grid-template-columns: repeat(4, 1fr)
    }
}


.grid-sinco-card {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr
}

@media (min-width:640px) {
    .grid-sinco-card {
        grid-template-columns: 1fr 1fr
    }
}


@media (min-width:1024px) {
    .grid-sinco-card {
        grid-template-columns: repeat(5, 1fr)
    }
}



.grid-seis-card {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr
}

@media (min-width:640px) {
    .grid-seis-card {
        grid-template-columns: 1fr 1fr
    }
}

@media (min-width:1024px) {
    .grid-seis-card {
        grid-template-columns: repeat(6, 1fr)
    }
}




.grid-seis-card-treplo {
    display: grid;
    width: 100%;
    justify-content: center;
    gap: 10px;
    grid-template-columns: 1fr;

}

@media (min-width:640px) {
    .grid-seis-card-treplo {
        grid-template-columns: 1fr 1fr
    }
}

@media (min-width:1024px) {
    .grid-seis-card-treplo {
        grid-template-columns: repeat(3, 1fr)
    }
}

/* ================== KPI CARD ================== */
.kpi-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    min-width: 100%;
}

.kpi-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px
}

kpi-head [data-autoshrink] span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(.85rem, 1.4vw, 1rem);
}

.kpi-title {
    font-weight: 400;
    color: var(--title);
    font-size: 15px
}

.kpi-count {
    font-weight: 500;
    color: var(--muted);
    margin-left: 6px;
    font-size: 12px
}

.linha-kpi {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.linha-kpi>span {
    white-space: nowrap;
    /* ✅ não quebra linha */
    min-width: 0;
}

.linha-kpi>span:first-child {
    text-overflow: ellipsis;
    /* ✅ se faltar espaço, corta com ... */
    font-size: clamp(.75rem, 1.2vw, .95rem);
    /* ✅ diminui conforme a tela */
}

.valor-kpi {
    white-space: nowrap;
    overflow: visible;
    text-overflow: ellipsis;
    max-width: 60%;
    text-align: right;
}




.kpi-ghost {
    opacity: .25;
    color: #9ca3af;
    flex: 0 0 auto;
}

.kpi-ghost svg {
    width: 22px;
    height: 22px;
    display: block
}

.kpi-main {
    min-width: 0;
}

.kpi-fixed {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}

#card-rev-estoque .kpi-foot {
    display: none;
}

.kpi-value {
    min-width: 0;
    /* deixa o conteúdo encolher */
    display: block;
    /* evita larguras “intrínsecas” teimosas */
    line-height: 1.1;
    /* ajuda a compactar verticalmente */
    margin-right: 10px;
}


.kpi-note {
    font-size: 12px;
    color: var(--muted)
}

.kpi-sep {
    height: 1px;
    background: var(--border);
    margin: 12px 0
}

.kpi-foot {
    display: flex;
    align-items: center;
    justify-content: space-between
}

.kpi-foot .label {
    font-size: 12px;
    color: var(--muted)
}

.kpi-foot .amount {
    font-weight: 600
}

.kpi-foot .pct {
    font-size: 12px;
    color: var(--muted);
    margin-left: 8px
}

.kpi-tags {
    display: flex;
    gap: 14px;
    margin-top: 10px
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted)
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: #9ca3af
}

.dot.ok {
    background: var(--ok)
}

.dot.warn {
    background: var(--warn)
}

/* ======== SELECT CUSTOM ======== */
.select {
    position: relative;
    display: inline-block;
    min-width: 140px;
}

.select-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0 10px;
    font-size: 14px;
    color: var(--title);
    cursor: pointer;
    height: var(--ctrl-h);
}

.select-toggle:focus {
    outline: 2px solid var(--focus);
    outline-offset: 2px
}

.select-chevron {
    width: 14px;
    height: 14px;
    transition: transform .2s ease;
}

.select[aria-expanded="true"] .select-chevron {
    transform: rotate(180deg);
}

.select-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 6px;
    margin: 0;
    list-style: none;
    display: none;
    max-height: 220px;
    overflow: auto;
}

.select[aria-expanded="true"] .select-menu {
    display: block
}

.select-option {
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.select-option[aria-selected="true"] {
    background: #EAEAEA;
}

.select-option:hover {
    background: #f3f4f6
}

.select-option:focus {
    outline: 2px solid var(--focus);
    outline-offset: 2px
}

/* ======== DATE RANGE ======== */
.daterange {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 9999px;
    padding: 0 10px;
    height: var(--ctrl-h);
    padding-right: 0;
}

.dr-field {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.dr-icon {
    width: 16px;
    height: 16px;
    color: var(--muted);
    flex: 0 0 16px;
}

.dr-input {
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 13px;
    color: var(--title);
    outline: none;
    height: 22px;
    line-height: 22px;
    min-width: 12ch;
    width: auto;
    white-space: nowrap;
    -webkit-appearance: none;
    appearance: none;
    padding-right: 0;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

.dr-input::-webkit-calendar-picker-indicator {
    opacity: 0;
    display: block;
    width: 0;
    margin: 0;
    pointer-events: none
}

.dr-input::-webkit-datetime-edit {
    padding: 0
}

.dr-input::-webkit-inner-spin-button,
.dr-input::-webkit-clear-button {
    display: none
}

.dr-sep {
    color: var(--muted);
    user-select: none;
}

.dr-field .dr-icon-btn {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 6px;
    cursor: pointer;
}

/* ======== ICON BUTTONS ======== */
.icon-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: var(--ctrl-h);
    height: var(--ctrl-h);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: #6b7280;
    padding: 0;
    cursor: pointer;
    transition: background .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.icon-btn:hover {
    background: #f9fafb
}

.icon-btn:focus {
    outline: 2px solid var(--focus);
    outline-offset: 2px
}

.icon-btn svg {
    width: 18px;
    height: 18px;
    display: block
}

/* ======== CARD LISTA ======== */
.bi-row {
    display: flex;
    gap: 16px;
    width: 100%;
    flex: 1 1 auto;
    /* cresce para ocupar espaço */
    min-height: 0;
    /* permite os filhos encolherem */
}

.list-card {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-top: 0;
    /* não precisa mais, já tem gap na bi-row */
    flex: 1 1 50%;
    box-sizing: border-box;
    min-width: 0;
    display: flex;
    /* 🔴 vira flex container */
    flex-direction: column;
    overflow: hidden;
    /* garante que o scroll fique só no conteúdo interno */
}

/* opcional: empilha no mobile */
@media (max-width: 960px) {
    .bi-row {
        flex-direction: column;
    }
}





.list-card-2-double {
    background: #fff;
    border: 1px solid var(--border, #ccc);
    border-radius: var(--radius, 8px);
    box-shadow: 0px 2px 9px 0px rgba(0, 0, 0, .25);
    padding: 16px;
    margin: 14px 0px;
    /* espaçamento horizontal e vertical */
    flex: 1;
    /* faz todos os cards terem mesma largura */
    display: flex;
    flex-direction: column;
    min-width: 200px;
    /* largura mínima */

    /* --- Limite de altura --- */
    max-height: 60vh;
    /* ajuste o valor conforme necessário */
    overflow-y: auto;
    /* ativa rolagem se o conteúdo ultrapassar */
}



@media (max-width: 768px) {

    /* tablets e celulares */
    .list-card-2-double {
        max-height: 75vh;
    }
}

@media (min-width: 1280px) {

    /* telas grandes */
    .list-card-2-double {
        max-height: 500px;
    }
}


/* Container para os cards lado a lado */


.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.searchbox {
    position: relative;
    flex: 1 1 320px;
    max-width: 680px;
}

.searchbox input {
    width: 100%;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0 14px 0 40px;
    font-size: 14px;
    color: var(--title);
    outline: none;
    background: #fff;
}

.searchbox input::placeholder {
    color: #9ca3af
}

.searchbox:focus-within input {
    border-color: #d1d5db;
    box-shadow: 0 0 0 4px rgba(147, 197, 253, .25)
}

.searchbox .icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.searchbox .icon svg {
    width: 18px;
    height: 18px;
    display: block
}

/* ======== Ordenar por — MODO PADRÃO (rolável) ======== */
.sort {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap
}

.sort .label {
    color: var(--muted);
    font-size: 14px
}

.seg {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border);
    border-radius: 9999px;
    height: var(--ctrl-h);
    max-width: 100%;
    overflow: auto;
    /* rolagem horizontal em telas pequenas */
    white-space: nowrap;
    scroll-snap-type: x mandatory;
    /* snap suave */
    -webkit-overflow-scrolling: touch;
}

.seg::-webkit-scrollbar {
    height: 0
}

/* esconde a barra */

.seg-btn {
    flex: 0 0 auto;
    /* não quebra, permite rolar */
    padding: 0 12px;
    height: calc(var(--ctrl-h) - 2px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #6b7280;
    background: #fff;
    border: 0;
    cursor: pointer;
    scroll-snap-align: start;
}

.seg-btn+.seg-btn {
    border-left: 1px solid var(--border)
}

.seg-btn.active {
    color: #16a34a;
    background: #ecfdf5;
    font-weight: 600
}

/* ======== Ajuste em telas pequenas (rolável mais compacto) ======== */
@media (max-width:560px) {
    .sort {
        width: 100%;
        gap: 8px
    }

    .sort .label {
        font-size: 13px
    }

    .seg {
        height: 34px
    }

    .seg-btn {
        padding: 0 10px;
        font-size: 12px
    }
}

/* ======== MODO "QUEBRA EM 2 LINHAS" MUITO PEQUENO ======== */
@media (max-width:430px) {
    .seg {
        overflow: visible;
        flex-wrap: wrap;
        height: auto;
        border-radius: 16px;
        scroll-snap-type: none;
    }

    .seg-btn {
        flex: 1 0 50%;
        min-width: 120px;
        border-top: 1px solid var(--border);
        scroll-snap-align: unset;
    }

    .seg-btn:nth-child(odd) {
        border-left: 0
    }

    .seg-btn:nth-child(even) {
        border-left: 1px solid var(--border)
    }

    .seg-btn:nth-child(1),
    .seg-btn:nth-child(2) {
        border-top: 0
    }
}

/* ======== PAINEL DE SUB-FILTROS (expandir/ocultar) ======== */
.filter-panel {
    display: none;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 12px;
    box-shadow: var(--shadow);
    transform-origin: top center;
    animation: none;
}

.filter-panel.open {
    display: block;
    animation: panelIn .22s ease;
}

@keyframes panelIn {
    from {
        opacity: .0;
        transform: translateY(-6px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.filter-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.field label {
    display: block;
    margin: 0 0 4px;
    font-size: 12px;
    color: var(--muted)
}

.field input,
.field select {
    width: 100%;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 10px;
    font-size: 14px;
}

.chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

.chip {
    padding: 6px 10px;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer
}

.chip.active {
    background: #ecfdf5;
    color: #16a34a;
    border-color: #bbf7d0;
    font-weight: 600
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 10px
}

.btn {
    border: 0;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 14px;
    cursor: pointer
}

.btn-primary {
    background: #111827;
    color: #fff
}

.btn-ghost {
    background: transparent;
    color: #6b7280
}

#menu-status .select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* _--------------------------------------
 */

select,
input,
button {
    appearance: none;
}

input[type="checkbox"] {
    appearance: auto;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #EAEAEA;
}

#menu-status {
    --opt-fs: 13px;
}

/* ajuste: 12–14px */
#menu-status .select-option {
    font-size: var(--opt-fs);
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* checkbox nativo não respeita font-size → use scale */
#menu-status .select-option input[type="checkbox"] {
    transform: scale(0.85);
    /* 0.8–0.9 conforme o gosto */
    transform-origin: center;
    margin-left: 8px;
}

/*-----------------------------------------------------------------------------*/
/*                                  Load                                       */
/*-----------------------------------------------------------------------------*/

body.loading-active *:not(#load):not(#loadReload):not(#loadNotificacao) {
    pointer-events: none;
}


#load,
#loadReload,
#loadNotificacao {
    position: fixed;
    overflow: hidden;
    inset: 0;
    background-color: rgba(249, 249, 249, 0.7);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}


#load .lds-dual-ring,
#loadReload .lds-dual-ring,
#loadNotificacao .lds-dual-ring {
    position: relative;
    width: 80px;
    height: 80px;
}

#load .lds-dual-ring .logo,
#loadReload .lds-dual-ring .logo,
#loadNotificacao .lds-dual-ring .logo {
    position: absolute;
    left: 35px;
    top: 35px;
}




#load .lds-dual-ring,
#loadReload .lds-dual-ring,
#loadNotificacao .lds-dual-ring {
    position: relative;
    width: 80px;
    height: 80px;
}


#load .lds-dual-ring .logo img,
#loadReload .lds-dual-ring .logo img,
#loadNotificacao .lds-dual-ring .logo img {
    width: 40px;
    animation: pulse 0.7s infinite;
    margin: 0 auto;
    animation-direction: alternate;
    -webkit-animation-name: pulse;
    animation-name: pulse;
}

#load .lds-dual-ring:after,
#loadReload .lds-dual-ring:after,
#loadNotificacao .lds-dual-ring:after {
    content: " ";
    display: block;
    width: 100px;
    height: 100px;
    margin: 2px;
    border-radius: 50%;
    border: 6px solid #fff;
    border-color: #11cc59 transparent #11cc59 transparent;
    animation: lds-dual-ring 1.2s linear infinite;
}

@keyframes lds-dual-ring {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#loadTable .lds-dual-ring {
    position: relative;
    width: 80px;
    height: 80px;
}

#loadTable .lds-dual-ring .logo {
    position: absolute;
    left: 40px;
    top: 40px;
}

#loadTable .lds-dual-ring .logo img {
    width: 40px;
    animation: pulse 0.7s infinite;
    margin: 0 auto;
    animation-direction: alternate;
    -webkit-animation-name: pulse;
    animation-name: pulse;
}

#loadTable .lds-dual-ring:after {
    content: " ";
    display: block;
    width: 100px;
    height: 100px;
    margin: 2px;
    border-radius: 50%;
    border: 6px solid #fff;
    border-color: #11cc59 transparent #11cc59 transparent;
    animation: lds-dual-ring 1.2s linear infinite;
}

@keyframes lds-dual-ring {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.dre-row--child {
    cursor: pointer;
}


#grafico_dre,
#dadosdireita {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Card de detalhes também precisa de flex p/ scroll interno funcionar bem */
.dre-card-detalhes {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}












.cards-row {
  display: flex;
  gap: 10px;
  height: 50vh;
  align-items: stretch;
  flex-wrap: nowrap;
  min-height: 0;
  margin: 14px 0;
}

.cards-row>.list-card-double {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

#graficotabela .tabela {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

#graficotabela .head,
#graficotabela .footer {
    flex: 0 0 auto;
}

#graficotabela .body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.head-row {
    height: 6vh;
}

.list-card-double {
  margin: 0;
  padding: 0;
  flex: 1 1 0;
  min-width: 0;

  background: #fff;
  border: 1px solid var(--border, #ccc);
  border-radius: var(--radius, 8px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .1);

  display: flex;
  flex-direction: column;
  overflow: hidden;

  height: 100%;
  min-height: 0;
}

.card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;   /* ESSENCIAL */
  padding: 5px;    /* seu padding do branco */
  box-sizing: border-box;
}

/* layout interno do gráfico */
#graficoRosquinha {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-between;

  /* respiro geral do conteúdo no card */
  padding: 10px 10px;
  box-sizing: border-box;
}


/* donut ocupa metade do card */
#donutChart {
    flex: 0 0 45%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* lista ocupa o resto e tem scroll */
#salesList {
  flex: 1;
  height: 100%;
  display: grid;
  overflow-y: auto;
  gap: 5px;

  /* espaço interno topo/baixo e laterais */
  padding: 12px 8px;
  box-sizing: border-box;
}







/* Scroll apenas no corpo da tabela */
.tabela .body {
    max-height: 30%;
    /* ajuste a altura conforme necessário */
    overflow-y: auto;
}

/* Tabela */
.tabela {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Cabeçalho */
.tabela .head .row {
    display: flex;
    background-color: #f1f1f1;
    /* font-weight: bold; */
    padding: 8px 10px;
    border-bottom: 1px solid #ddd;
    border-top-left-radius: 8px;
    /* canto superior esquerdo arredondado */
    border-top-right-radius: 8px;
    /* canto superior direito arredondado */
}



/* Última coluna sem borda */
.tabela .row .col:last-child {
    border-right: none;
}

/* Largura das colunas */
.col.mes {
    flex: 2;
}

.col.val {
    flex: 3;
    text-align: right;
}

.col.variacao {
    flex: 2;
    text-align: right;
}

.col.quant {
    flex: 2;
    text-align: right;
}

.col.custo {
    flex: 2;
    text-align: right;
}

.col.margem {
    flex: 2;
    text-align: right;
}

/* Linhas do corpo da tabela */
.tabela .body .row {
    display: flex;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.tabela .body .row:nth-child(even) {
    background-color: #f9f9f9;
}

.tabela .body .row:hover {
    background-color: #e6e6e6;
    cursor: pointer;
}

/* Percentual com setas */
.col.variacao img {
    margin-left: 5px;
    height: 16px;
    vertical-align: middle;
}

/* Rodapé */
.tabela .footer .row {
    display: flex;
    /* font-weight: bold; */
    background-color: #f1f1f1;
    padding: 8px 10px;
    border-top: 2px solid #ccc;

}
















/* Container tabela */
.tabela {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

/* Scroll apenas no corpo */
.tabela-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

/* Cabeçalho */
.tabela-header .tabela-row {
    display: flex;
    background-color: #f1f1f1;
    /* font-weight: bold; */
    padding: 8px 10px;
    border-bottom: 1px solid #ddd;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.tabela-header,
.tabela-footer {
    flex: 0 0 auto;
}

/* Colunas gerais */
.tabela-col {
    padding: 6px 8px;
    border-left: none !important;
    border-right: none !important;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Última coluna sem borda */
.tabela-col:last-child {
    border-right: none;
}

/* Larguras */
.ref {
    flex: 2;
}

.desc {
    flex: 4;
}

.valor {
    flex: 3;
    text-align: right;
}

.custo {
    flex: 3;
    text-align: right;
}

.margem {
    flex: 2;
    text-align: right;
}

.quantidade {
    flex: 2;
    text-align: right;
}

/* Corpo linha */
.tabela-body .tabela-row {
    display: flex;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.tabela-body .tabela-row:nth-child(even) {
    background-color: #f9f9f9;
}

.tabela-body .tabela-row:hover {
    background-color: #e6e6e6;
    cursor: pointer;
}

/* Rodapé */
.tabela-footer .tabela-row {
    display: flex;
    /* font-weight: bold; */
    background-color: #f1f1f1;
    padding: 8px 10px;
    border-top: 2px solid #ccc;
}



#graficotree{
  height: 100%;
  box-sizing: border-box;
  /* padding: 1vh;  */
}








/* Container geral */
.card_box {
    width: 100%;
    height: 100%;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* evita estourar */
}



/* Cabeçalho */
.tabela .head .row {
    display: flex;
    background-color: #f1f1f1;
    font-weight: bold;
    padding: 8px 10px;
    border-bottom: 1px solid #ddd;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}





/* Largura das colunas */
.col.rank {
    flex: 1;
}

.col.foto {
    flex: 0 0 48px;
    /* largura fixa */
    justify-content: center;
}


.col.vendedor {
    flex: 3;
}

.col.faturamento {
    flex: 2;
}

/* Corpo da tabela com scroll */
.tabela .body {
    max-height: 250px;
    /* ajuste a altura como quiser */
    overflow-y: auto;
}

/* Linhas do corpo */
.tabela .body .row {
    display: flex;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.tabela .body .row:nth-child(even) {
    background-color: #f9f9f9;
}

.tabela .body .row:hover {
    background-color: #e6e6e6;
    cursor: pointer;
}

/* Rodapé */
.tabela .footer .row {
    display: flex;
    font-weight: bold;
    background-color: #f1f1f1;
    padding: 8px 10px;
    border-top: 2px solid #ccc;
}

/* Ajustes de texto */
.tabela .row .col {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}








/* Corpo da tabela com scroll */
#tabelaprodutos .tabela .body {
    max-height: 250px;
    /* ajuste a altura conforme necessário */
    overflow-y: auto;
}

/* Linhas do corpo */
#tabelaprodutos .tabela .body .row {
    display: flex;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

#tabelaprodutos .tabela .body .row:nth-child(even) {
    background-color: #f9f9f9;
}

#tabelaprodutos .tabela .body .row:hover {
    background-color: #e6e6e6;
    cursor: pointer;
}

/* Colunas do produto */
#tabelaprodutos .col.referencia {
    flex: 2;
}

#tabelaprodutos .col.descricao_produto_simples {
    flex: 3;
}

#tabelaprodutos .col.quantidade_produtos {
    flex: 2;
    text-align: right;
}

#tabelaprodutos .col.valor_total_produtos {
    flex: 3;
    text-align: right;
}

/* Rodapé */
#tabelaprodutos .tabela{
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* 2) Head não cresce */
#tabelaprodutos .tabela .head{
  flex: 0 0 auto;
}

/* 3) Body ocupa o espaço e rola */
#tabelaprodutos .tabela .body{
  flex: 1 1 auto;
  overflow-y: auto;
  max-height: none !important; /* remove o max-height inline */
  min-height: 0;              /* importantíssimo pra scroll em flex */
}

/* 4) Footer fica no fim */
#tabelaprodutos .tabela .footer{
  flex: 0 0 auto;
  margin-top: auto;
}













.dadosselect {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    /* ✅ centraliza verticalmente */
    height: 3rem;
    /* ✅ dá referência para o meio */
}

/* Estilo do select */
.dadosselect select {
    height: 2.25rem;
    /* ✅ altura fixa (responsiva em rem) */
    line-height: 2.25rem;
    /* ✅ texto no meio */
    padding: 0 2.2rem 0 0.75rem;
    /* ✅ mantém espaço da seta (direita) */
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: #f9f9f9;
    color: #333;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;

    background-image: url("data:image/svg+xml,%3Csvg class='arrow' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    /* ✅ seta alinhada */
    background-size: 14px;

    box-sizing: border-box;
}

/* Hover */
.dadosselect select:hover {
    border-color: #888;
}

/* Active / focus */
.dadosselect select:focus {
    border-color: #4a90e2;
    background-color: #fff;
    box-shadow: 0 0 6px rgba(0, 120, 255, 0.2);
}












/* ---------------------------------------------------------------------- */






/* ---------------------------------------------------------------------- */
/* =--=-=-=-= vendas ranking =--=-=-=-=  */
/* Grafico 2 */
.zoomable_grafico2 {
    width: 38px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    background-color: #fff;
}

.card_box_frafico1 {
    border-radius: 4px;
    border: none;
    background-color: white;
    overflow: hidden;
    padding-bottom: 25px;
    padding-top: 10px;

    display: flex;
    flex: 1;
}

/* Grafico 3 */
.mensagemvendedor {
    display: flex;
    justify-content: center;
    align-items: center;
    align-content: center;
    height: 100%;
}

/* ---------------------------------------------------------------------- */


