* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --azul: #2563eb;
    --azul-escuro: #1e40af;
    --azul-claro: #eff6ff;

    --verde: #16a34a;
    --verde-claro: #f0fdf4;

    --laranja: #ea580c;
    --laranja-claro: #fff7ed;

    --vermelho: #dc2626;
    --vermelho-claro: #fef2f2;

    --roxo: #7c3aed;
    --roxo-claro: #f5f3ff;

    --fundo: #f5f7fb;
    --branco: #ffffff;

    --texto: #111827;
    --texto-secundario: #6b7280;

    --borda: #e5e7eb;

    --sidebar: #111827;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--fundo);
    color: var(--texto);
    min-height: 100vh;
}


/* =========================================
   SIDEBAR
========================================= */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;

    width: 250px;
    height: 100vh;

    background: var(--sidebar);
    color: white;

    display: flex;
    flex-direction: column;

    z-index: 100;
}


.logo {
    height: 90px;

    display: flex;
    align-items: center;

    gap: 12px;

    padding: 20px;

    border-bottom: 1px solid #273244;
}


.logo-icon {
    width: 42px;
    height: 42px;

    background: var(--azul);

    border-radius: 10px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: bold;
    font-size: 14px;
}


.logo strong {
    display: block;

    font-size: 16px;
}


.logo span {
    display: block;

    color: #9ca3af;

    font-size: 11px;

    margin-top: 3px;
}


.menu {
    padding: 20px 12px;

    display: flex;
    flex-direction: column;

    gap: 5px;
}


.menu-item {
    color: #d1d5db;

    text-decoration: none;

    padding: 13px 15px;

    border-radius: 8px;

    display: flex;
    align-items: center;

    gap: 12px;

    font-size: 14px;

    transition: 0.2s;
}


.menu-item:hover {
    background: #1f2937;

    color: white;
}


.menu-item.active {
    background: var(--azul);

    color: white;
}


.menu-item span {
    width: 20px;

    text-align: center;
}


.sidebar-footer {
    margin-top: auto;

    padding: 20px;

    border-top: 1px solid #273244;

    color: #9ca3af;

    font-size: 11px;
}


.sidebar-footer span {
    display: block;

    margin-top: 4px;
}


/* =========================================
   CONTEÚDO
========================================= */

.conteudo {
    margin-left: 250px;

    min-height: 100vh;

    padding: 30px;
}


.tela {
    display: none;
}


.tela.ativa {
    display: block;
}


.cabecalho-pagina {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 25px;
}


.cabecalho-pagina h1 {
    font-size: 27px;

    margin-bottom: 6px;
}


.cabecalho-pagina p {
    color: var(--texto-secundario);

    font-size: 14px;
}


.data-atual {
    color: var(--texto-secundario);

    font-size: 13px;
}


/* =========================================
   BOTÕES
========================================= */

.btn {
    border: none;

    border-radius: 7px;

    padding: 11px 16px;

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;

    transition: 0.2s;
}


.btn:hover {
    transform: translateY(-1px);

    opacity: 0.9;
}


.btn-principal {
    background: var(--azul);

    color: white;
}


.btn-secundario {
    background: #374151;

    color: white;
}


.btn-cinza {
    background: #e5e7eb;

    color: #374151;
}


.btn-perigo {
    background: var(--vermelho);

    color: white;
}


.btn-editar {
    background: var(--azul-claro);

    color: var(--azul);

    padding: 7px 10px;
}


.btn-excluir {
    background: var(--vermelho-claro);

    color: var(--vermelho);

    padding: 7px 10px;
}


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

.cards-dashboard {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 18px;

    margin-bottom: 22px;
}


.card {
    background: white;

    border: 1px solid var(--borda);

    border-radius: 12px;

    padding: 20px;

    display: flex;

    align-items: center;

    gap: 15px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}


.card-icone {
    width: 46px;
    height: 46px;

    border-radius: 10px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
}


.card-icone.azul {
    background: var(--azul-claro);
}


.card-icone.verde {
    background: var(--verde-claro);
}


.card-icone.laranja {
    background: var(--laranja-claro);
}


.card-icone.vermelho {
    background: var(--vermelho-claro);
}


.card-icone.roxo {
    background: var(--roxo-claro);
}


.card span {
    display: block;

    color: var(--texto-secundario);

    font-size: 12px;

    margin-bottom: 5px;
}


.card h2 {
    font-size: 22px;
}


/* =========================================
   DASHBOARD
========================================= */

.dashboard-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 20px;
}


.painel {
    background: white;

    border: 1px solid var(--borda);

    border-radius: 12px;

    padding: 20px;

    margin-bottom: 20px;
}


.painel-cabecalho {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-bottom: 18px;
}


.painel-cabecalho h3 {
    font-size: 16px;

    margin-bottom: 4px;
}


.painel-cabecalho p {
    color: var(--texto-secundario);

    font-size: 12px;
}


.lista-dashboard {
    display: flex;

    flex-direction: column;

    gap: 10px;
}


.movimentacao-item,
.estoque-baixo-item {
    border: 1px solid var(--borda);

    border-radius: 8px;

    padding: 12px;

    display: flex;

    align-items: center;

    justify-content: space-between;
}


.movimentacao-item strong,
.estoque-baixo-item strong {
    display: block;

    font-size: 13px;

    margin-bottom: 4px;
}


.movimentacao-item small,
.estoque-baixo-item small {
    color: var(--texto-secundario);

    font-size: 11px;
}


.vazio {
    color: var(--texto-secundario);

    text-align: center;

    padding: 25px 10px;

    font-size: 13px;
}


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

.filtros {
    background: white;

    border: 1px solid var(--borda);

    border-radius: 10px;

    padding: 16px;

    margin-bottom: 18px;

    display: flex;

    align-items: end;

    gap: 12px;

    flex-wrap: wrap;
}


.campo-filtro {
    display: flex;

    flex-direction: column;

    gap: 6px;

    min-width: 160px;
}


.campo-filtro label,
.campo label {
    font-size: 12px;

    font-weight: 600;

    color: #374151;
}


.campo-pesquisa {
    min-width: 280px;
}


input,
select {
    width: 100%;

    height: 39px;

    border: 1px solid #d1d5db;

    border-radius: 7px;

    padding: 0 11px;

    background: white;

    color: var(--texto);

    outline: none;

    font-size: 13px;
}


input:focus,
select:focus {
    border-color: var(--azul);

    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}


/* =========================================
   TABELAS
========================================= */

.tabela-container {
    width: 100%;

    overflow-x: auto;
}


table {
    width: 100%;

    border-collapse: collapse;

    min-width: 900px;
}


thead {
    background: #f9fafb;
}


th {
    text-align: left;

    color: #6b7280;

    font-size: 11px;

    text-transform: uppercase;

    letter-spacing: 0.03em;

    padding: 13px 10px;

    border-bottom: 1px solid var(--borda);

    white-space: nowrap;
}


td {
    padding: 13px 10px;

    border-bottom: 1px solid #f0f0f0;

    font-size: 12px;

    white-space: nowrap;
}


tbody tr:hover {
    background: #fafafa;
}


.acoes {
    display: flex;

    gap: 6px;
}


.badge {
    display: inline-block;

    padding: 5px 8px;

    border-radius: 20px;

    font-size: 10px;

    font-weight: bold;
}


.badge-normal {
    background: var(--verde-claro);

    color: var(--verde);
}


.badge-baixo {
    background: var(--vermelho-claro);

    color: var(--vermelho);
}


/* =========================================
   MODAL
========================================= */

.modal {
    position: fixed;

    inset: 0;

    background: rgba(17, 24, 39, 0.55);

    display: none;

    align-items: center;
    justify-content: center;

    padding: 20px;

    z-index: 1000;
}


.modal.aberto {
    display: flex;
}


.modal-conteudo {
    background: white;

    width: 100%;

    max-width: 720px;

    max-height: 90vh;

    overflow-y: auto;

    border-radius: 12px;

    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);

    padding: 25px;
}


.modal-cabecalho {
    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    margin-bottom: 25px;
}


.modal-cabecalho h2 {
    font-size: 20px;

    margin-bottom: 5px;
}


.modal-cabecalho p {
    color: var(--texto-secundario);

    font-size: 12px;
}


.btn-fechar {
    border: none;

    background: transparent;

    font-size: 28px;

    color: #6b7280;

    cursor: pointer;

    line-height: 1;
}


.form-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 16px;
}


.campo {
    display: flex;

    flex-direction: column;

    gap: 7px;
}


.campo-largo {
    grid-column: span 2;
}


.modal-acoes {
    display: flex;

    justify-content: flex-end;

    gap: 10px;

    margin-top: 25px;

    padding-top: 18px;

    border-top: 1px solid var(--borda);
}


/* =========================================
   RELATÓRIOS
========================================= */

.relatorio-cards {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 15px;

    margin-bottom: 20px;
}


.relatorio-card {
    background: white;

    border: 1px solid var(--borda);

    border-radius: 10px;

    padding: 20px;
}


.relatorio-card span {
    display: block;

    color: var(--texto-secundario);

    font-size: 12px;

    margin-bottom: 8px;
}


.relatorio-card strong {
    font-size: 22px;
}


/* =========================================
   LIMPEZA SELETIVA DE DADOS
========================================= */

.modal-limpar-dados {
    width: min(760px, calc(100% - 28px));
    max-height: min(82vh, 760px);
    overflow-y: auto;
}

.limpar-dados-aviso {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 14px;
    margin: 4px 0 16px;
    border: 1px solid rgba(255, 176, 0, .24);
    border-radius: 12px;
    background: rgba(255, 176, 0, .08);
    color: var(--texto);
    font-size: 13px;
}

.limpar-dados-aviso strong { color: #ffd166; white-space: nowrap; }
.limpar-dados-aviso span { color: var(--texto-secundario); line-height: 1.45; }

.limpar-dados-lista {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.limpar-dados-item {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.045));
    cursor: pointer;
    transition: .18s ease;
}

.limpar-dados-item:hover {
    border-color: rgba(44, 126, 255, .42);
    background: linear-gradient(135deg, rgba(44,126,255,.13), rgba(255,255,255,.055));
}

.limpar-dados-item input { width: 18px; height: 18px; flex: 0 0 18px; accent-color: #2878f0; }
.limpar-dados-item > span:not(.limpar-dados-icone) { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.limpar-dados-item strong { color: #fff; font-size: 13px; }
.limpar-dados-item small { color: var(--texto-secundario); font-size: 11px; line-height: 1.35; }

.limpar-dados-derivado { cursor: default; opacity: .78; }
.limpar-dados-derivado:hover { border-color: rgba(255,255,255,.12); background: linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.045)); }
.limpar-dados-icone { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: rgba(255,255,255,.08); color: #8ec5ff; font-weight: 700; }

.limpar-dados-selecionar-todos { display: flex; align-items: center; gap: 9px; margin-top: 14px; color: var(--texto); font-size: 12px; cursor: pointer; }
.limpar-dados-selecionar-todos input { width: 17px; height: 17px; accent-color: #2878f0; }
.limpar-dados-selecao { min-height: 20px; margin-top: 10px; color: var(--texto-secundario); font-size: 11px; }

.configuracoes .btn-perigo { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: auto; min-width: 210px; }

@media (max-width: 700px) {
    .limpar-dados-lista { grid-template-columns: 1fr; }
    .modal-limpar-dados { width: min(94vw, 760px); max-height: 88vh; }
}

/* =========================================
   CONFIGURAÇÕES
========================================= */

.configuracoes {
    max-width: 800px;
}


.config-item {
    padding: 18px 0;

    border-bottom: 1px solid var(--borda);

    margin-bottom: 5px;
}


.config-item strong {
    font-size: 14px;
}


.config-item p {
    color: var(--texto-secundario);

    font-size: 12px;

    margin-top: 5px;

    line-height: 1.5;
}


.configuracoes .btn-perigo {
    margin-top: 20px;
}


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

@media (max-width: 1100px) {

    .cards-dashboard {
        grid-template-columns: repeat(2, 1fr);
    }

    .relatorio-cards {
        grid-template-columns: repeat(2, 1fr);
    }

}


@media (max-width: 800px) {

    .sidebar {
        width: 70px;
    }

    .logo {
        justify-content: center;

        padding: 10px;
    }

    .logo > div:last-child {
        display: none;
    }

    .menu-item {
        justify-content: center;

        padding: 13px 5px;
    }

    .menu-item span {
        font-size: 18px;
    }

    .menu-item {
        font-size: 0;
    }

    .sidebar-footer {
        display: none;
    }

    .conteudo {
        margin-left: 70px;

        padding: 20px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 600px) {

    .cards-dashboard {
        grid-template-columns: 1fr;
    }

    .relatorio-cards {
        grid-template-columns: 1fr;
    }

    .cabecalho-pagina {
        align-items: flex-start;

        flex-direction: column;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .campo-largo {
        grid-column: span 1;
    }

    .filtros {
        align-items: stretch;

        flex-direction: column;
    }

    .campo-filtro,
    .campo-pesquisa {
        width: 100%;
        min-width: 0;
    }

    .filtros .btn {
        width: 100%;
    }

    .modal-conteudo {
        padding: 18px;
    }

}

/* =========================================================
   FUNDO INTERATIVO — ESTOQUE / LOGÍSTICA
   ========================================================= */

#fundoEstoque {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;

    overflow: hidden;

    pointer-events: none;

    z-index: 0;

    background:
        radial-gradient(
            circle at 18% 20%,
            rgba(0, 126, 255, 0.14),
            transparent 32%
        ),
        radial-gradient(
            circle at 82% 75%,
            rgba(255, 145, 45, 0.10),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #06101d 0%,
            #091827 45%,
            #07121f 100%
        );
}


/* =========================================================
   GRADE INDUSTRIAL
   ========================================================= */

.fundo-grade {
    position: absolute;
    inset: -10%;

    opacity: 0.55;

    background-image:
        linear-gradient(
            rgba(67, 150, 205, 0.10) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(67, 150, 205, 0.10) 1px,
            transparent 1px
        );

    background-size: 55px 55px;

    transform:
        perspective(900px)
        rotateX(58deg)
        scale(1.35);

    transform-origin: center bottom;

    animation: gradeMovimento 18s linear infinite;
}

@keyframes gradeMovimento {

    from {
        background-position:
            0 0,
            0 0;
    }

    to {
        background-position:
            0 55px,
            55px 0;
    }

}


/* =========================================================
   LUZES DO GALPÃO
   ========================================================= */

.fundo-luz {
    position: absolute;

    width: 420px;
    height: 420px;

    border-radius: 50%;

    filter: blur(45px);

    opacity: 0.45;

    mix-blend-mode: screen;
}

.luz-1 {
    top: -150px;
    left: 12%;

    background:
        rgba(0, 145, 255, 0.22);

    animation:
        luzMovimento1 9s ease-in-out infinite alternate;
}

.luz-2 {
    right: -130px;
    bottom: 5%;

    background:
        rgba(255, 137, 43, 0.15);

    animation:
        luzMovimento2 11s ease-in-out infinite alternate;
}

.luz-3 {
    left: 40%;
    bottom: -220px;

    background:
        rgba(0, 191, 255, 0.12);

    animation:
        luzMovimento3 13s ease-in-out infinite alternate;
}


@keyframes luzMovimento1 {

    from {
        transform: translate(-30px, -10px);
    }

    to {
        transform: translate(70px, 45px);
    }

}

@keyframes luzMovimento2 {

    from {
        transform: translate(20px, 30px);
    }

    to {
        transform: translate(-70px, -30px);
    }

}

@keyframes luzMovimento3 {

    from {
        transform: translate(-40px, 20px);
    }

    to {
        transform: translate(50px, -30px);
    }

}


/* =========================================================
   FLUXOS DE ENTRADA E SAÍDA
   ========================================================= */

.fluxo {
    position: absolute;

    height: 2px;

    transform-origin: left center;

    opacity: 0.75;
}


/* Entrada — azul */

.fluxo-1 {
    width: 38%;

    left: 4%;
    bottom: 24%;

    transform: rotate(-8deg);

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(40, 175, 255, 0.65),
            transparent
        );

    box-shadow:
        0 0 14px rgba(40, 175, 255, 0.35);

    animation:
        fluxoEntrada 4s linear infinite;
}


/* Fluxo central */

.fluxo-2 {
    width: 34%;

    left: 34%;
    top: 48%;

    transform: rotate(4deg);

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(42, 157, 214, 0.45),
            transparent
        );

    animation:
        fluxoCentro 5s linear infinite;
}


/* Saída — laranja */

.fluxo-3 {
    width: 38%;

    right: 2%;
    bottom: 20%;

    transform: rotate(8deg);

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 159, 67, 0.70),
            transparent
        );

    box-shadow:
        0 0 14px rgba(255, 159, 67, 0.35);

    animation:
        fluxoSaida 4s linear infinite;
}


/* Pontos percorrendo os fluxos */

.fluxo span {
    position: absolute;

    width: 6px;
    height: 6px;

    top: -2px;

    border-radius: 50%;

    background: #5bc5ff;

    box-shadow:
        0 0 10px #2aaeff,
        0 0 20px rgba(42, 174, 255, 0.55);

    animation:
        pontoFluxo 2.5s linear infinite;
}

.fluxo span:nth-child(2) {
    animation-delay: 0.8s;
}

.fluxo span:nth-child(3) {
    animation-delay: 1.6s;
}

.fluxo-3 span {
    background: #ffad5c;

    box-shadow:
        0 0 10px #ff9f43,
        0 0 20px rgba(255, 159, 67, 0.55);
}


@keyframes pontoFluxo {

    0% {
        left: -5px;
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    85% {
        opacity: 1;
    }

    100% {
        left: calc(100% + 5px);
        opacity: 0;
    }

}

@keyframes fluxoEntrada {

    0% {
        opacity: 0.2;
        transform:
            rotate(-8deg)
            translateX(-40px);
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 0.2;
        transform:
            rotate(-8deg)
            translateX(40px);
    }

}

@keyframes fluxoCentro {

    0% {
        opacity: 0.15;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 0.15;
    }

}

@keyframes fluxoSaida {

    0% {
        opacity: 0.2;
        transform:
            rotate(8deg)
            translateX(40px);
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 0.2;
        transform:
            rotate(8deg)
            translateX(-40px);
    }

}


/* =========================================================
   CAIXAS DE ESTOQUE
   ========================================================= */

.caixa-fundo {
    position: absolute;

    width: 90px;
    height: 70px;

    opacity: 0.32;

    transform-style: preserve-3d;

    filter:
        drop-shadow(
            0 10px 18px rgba(0, 0, 0, 0.25)
        );

    animation:
        caixaFlutuando 6s ease-in-out infinite;
}


/* Corpo */

.caixa-corpo {
    position: absolute;

    width: 100%;
    height: 65px;

    bottom: 0;

    border:
        1px solid
        rgba(222, 163, 91, 0.38);

    background:
        linear-gradient(
            135deg,
            rgba(166, 109, 50, 0.34),
            rgba(94, 61, 30, 0.28)
        );

    box-shadow:
        inset 0 0 20px rgba(255, 176, 82, 0.06);
}


/* Tampa */

.caixa-tampa {
    position: absolute;

    width: 100%;
    height: 16px;

    top: 0;

    transform:
        skewX(-25deg);

    transform-origin: left;

    background:
        linear-gradient(
            90deg,
            rgba(255, 187, 93, 0.34),
            rgba(144, 90, 38, 0.25)
        );

    border:
        1px solid
        rgba(255, 190, 100, 0.38);
}


.caixa-1 {
    left: 9%;
    top: 26%;

    animation-delay: -1s;
}

.caixa-2 {
    right: 12%;
    top: 32%;

    transform: scale(0.75);

    animation-delay: -3s;
}

.caixa-3 {
    right: 20%;
    bottom: 15%;

    transform: scale(0.55);

    animation-delay: -4.5s;
}


@keyframes caixaFlutuando {

    0%,
    100% {
        margin-top: 0;
    }

    50% {
        margin-top: -12px;
    }

}


/* =========================================================
   PALLETS
   ========================================================= */

.palete {
    position: absolute;

    width: 125px;
    height: 18px;

    opacity: 0.30;

    border:
        1px solid
        rgba(174, 129, 78, 0.42);

    background:
        repeating-linear-gradient(
            90deg,
            rgba(155, 109, 57, 0.42) 0,
            rgba(155, 109, 57, 0.42) 14px,
            transparent 14px,
            transparent 20px
        );

    transform:
        perspective(400px)
        rotateX(58deg)
        rotateZ(-4deg);

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.25);
}


.palete::before {
    content: "";

    position: absolute;

    left: 8px;
    right: 8px;

    top: -18px;

    height: 18px;

    background:
        repeating-linear-gradient(
            90deg,
            rgba(177, 126, 67, 0.30) 0,
            rgba(177, 126, 67, 0.30) 14px,
            transparent 14px,
            transparent 20px
        );
}


.palete-1 {
    left: 20%;
    bottom: 13%;

    animation:
        palletMovimento 7s ease-in-out infinite;
}


.palete-2 {
    right: 8%;
    top: 60%;

    transform:
        perspective(400px)
        rotateX(58deg)
        rotateZ(5deg)
        scale(0.75);

    animation:
        palletMovimento 8s ease-in-out infinite reverse;
}


@keyframes palletMovimento {

    0%,
    100% {
        margin-left: 0;
    }

    50% {
        margin-left: 18px;
    }

}


/* =========================================================
   PONTOS DE MONITORAMENTO
   ========================================================= */

.ponto {
    position: absolute;

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #35c58a;

    box-shadow:
        0 0 8px #35c58a,
        0 0 20px rgba(53, 197, 138, 0.45);

    animation:
        scannerPulse 2s ease-in-out infinite;
}


.p1 {
    left: 24%;
    top: 22%;
}

.p2 {
    left: 42%;
    top: 38%;

    animation-delay: 0.3s;
}

.p3 {
    left: 64%;
    top: 24%;

    animation-delay: 0.6s;
}

.p4 {
    right: 20%;
    top: 44%;

    animation-delay: 0.9s;
}

.p5 {
    left: 32%;
    bottom: 23%;

    animation-delay: 1.2s;
}

.p6 {
    left: 55%;
    bottom: 17%;

    animation-delay: 1.5s;
}

.p7 {
    right: 30%;
    bottom: 27%;

    animation-delay: 1.8s;
}

.p8 {
    right: 10%;
    bottom: 14%;

    animation-delay: 2.1s;
}


@keyframes scannerPulse {

    0%,
    100% {
        opacity: 0.35;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.5);
    }

}


/* =========================================================
   LINHAS DE CONEXÃO
   ========================================================= */

.linha {
    position: absolute;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(66, 184, 255, 0.32),
            transparent
        );

    opacity: 0.5;
}


.linha-1 {
    width: 22%;

    left: 13%;
    top: 35%;

    transform: rotate(18deg);
}

.linha-2 {
    width: 18%;

    left: 48%;
    top: 25%;

    transform: rotate(-12deg);
}

.linha-3 {
    width: 24%;

    right: 7%;
    top: 39%;

    transform: rotate(22deg);
}

.linha-4 {
    width: 19%;

    right: 26%;
    bottom: 30%;

    transform: rotate(-18deg);
}


/* =========================================================
   VINHETA
   ========================================================= */

#fundoEstoque::after {
    content: "";

    position: absolute;

    inset: 0;

    background:
        radial-gradient(
            ellipse at center,
            transparent 35%,
            rgba(3, 9, 16, 0.28) 75%,
            rgba(2, 7, 13, 0.65) 100%
        );

    pointer-events: none;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 900px) {

    .caixa-fundo {
        opacity: 0.20;
    }

    .palete {
        opacity: 0.18;
    }

    .fluxo {
        opacity: 0.45;
    }

    .fundo-grade {
        opacity: 0.35;
    }

}


/* =========================================================
   REDUÇÃO DE MOVIMENTO
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .fundo-grade,
    .fundo-luz,
    .fluxo,
    .fluxo span,
    .caixa-fundo,
    .palete,
    .ponto {
        animation: none !important;
    }

}

/* =========================================================
   LINHAS DECORATIVAS
   ========================================================= */

.linha {
    position: absolute;

    height: 1px;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(71, 85, 105, 0.08),
        transparent
    );

    transform: rotate(-25deg);
}

.linha-1 {
    width: 350px;
    top: 12%;
    left: -50px;
}

.linha-2 {
    width: 450px;
    top: 72%;
    right: -100px;
    transform: rotate(22deg);
}

.linha-3 {
    width: 300px;
    top: 45%;
    left: 25%;
    transform: rotate(12deg);
}

.linha-4 {
    width: 400px;
    bottom: 5%;
    left: 45%;
    transform: rotate(-15deg);
}


/* =========================================================
   ANIMAÇÕES
   ========================================================= */

@keyframes fluxoMovimento {

    0% {
        left: -10px;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        left: calc(100% + 10px);
        opacity: 0;
    }
}


@keyframes caixaFlutuando {

    0% {
        margin-top: 0;
    }

    50% {
        margin-top: -18px;
    }

    100% {
        margin-top: 0;
    }
}


@keyframes paleteMovimento {

    0% {
        transform:
            translateY(0)
            rotate(-5deg);
    }

    50% {
        transform:
            translateY(-12px)
            rotate(-2deg);
    }

    100% {
        transform:
            translateY(0)
            rotate(-5deg);
    }
}


@keyframes pontoPulso {

    0%,
    100% {
        opacity: 0.25;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.7);
    }
}


@keyframes luzMovimento1 {

    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(80px, 50px);
    }
}


@keyframes luzMovimento2 {

    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(-60px, -40px);
    }
}


@keyframes luzMovimento3 {

    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(70px, -30px);
    }
}


/* =========================================================
   CELULAR / TABLET
   ========================================================= */

@media (max-width: 768px) {

    .fundo-grade {
        background-size: 30px 30px;
        opacity: 0.45;
    }

    .caixa-fundo {
        opacity: 0.07;
    }

    .palete {
        opacity: 0.3;
    }

    .fluxo {
        opacity: 0.35;
    }

    .linha {
        opacity: 0.5;
    }
}


/* =========================================================
   REDUZIR ANIMAÇÕES SE O USUÁRIO PREFERIR
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .fundo-luz,
    .caixa-fundo,
    .palete,
    .ponto,
    .fluxo span {
        animation: none !important;
    }
}
/* =========================================================
   CORREÇÃO DEFINITIVA DO FUNDO INTERATIVO
   ========================================================= */

/* O fundo fica atrás do sistema */
#fundoEstoque {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;

    z-index: 0 !important;
    pointer-events: none !important;
}

/* MENU SEMPRE ACIMA DO FUNDO */
.sidebar {
    position: fixed !important;
    z-index: 100 !important;
}

/* ÁREA PRINCIPAL SEMPRE ACIMA DO FUNDO */
.main {
    position: relative !important;
    z-index: 10 !important;
}

/* BARRA SUPERIOR */
.topbar {
    position: relative;
    z-index: 11;
}

/* TODAS AS TELAS */
.tela {
    position: relative;
    z-index: 11;
}

/* CONTEÚDO DAS TELAS */
.dashboard,
.painel,
.card,
.historico-card,
.estoque-painel,
.usuarios-painel,
.tabela-container,
.graficos,
.movimentacoes {
    position: relative;
    z-index: 11;
}

/* BOTÃO DO MENU */
#btnMenu,
.btn-menu {
    z-index: 200 !important;
}

/* MODAIS SEMPRE NO TOPO */
.modal {
    z-index: 9999 !important;
}
/* =========================================================
   EFEITO VIDRO — PAINÉIS TRANSPARENTES
   ========================================================= */

.card,
.painel,
.filtros,
.relatorio-card,
.movimentacao-item,
.estoque-baixo-item {
    background: rgba(255, 255, 255, 0.10) !important;

    border: 1px solid rgba(255, 255, 255, 0.18) !important;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.18) !important;
}


/* Textos dos painéis */

.card span,
.painel-cabecalho p,
.relatorio-card span,
.movimentacao-item small,
.estoque-baixo-item small {
    color: rgba(255, 255, 255, 0.72) !important;
}


.card h2,
.painel-cabecalho h3,
.relatorio-card strong,
.movimentacao-item strong,
.estoque-baixo-item strong {
    color: rgba(255, 255, 255, 0.10) !important;
}


/* Cabeçalho das tabelas */

thead {
    background: rgba(255, 255, 255, 0.08) !important;
}


th {
    color: rgba(255, 255, 255, 0.70) !important;
}


td {
    color: rgba(255, 255, 255, 0.88) !important;
    border-bottom-color: rgba(255, 255, 255, 0.10) !important;
}


tbody tr:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}


/* Texto vazio */

.vazio {
    color: rgba(255, 255, 255, 0.60) !important;
}


/* =========================================================
   VISUAL FINAL — GALPÃO + VIDRO + INTERAÇÃO
   ========================================================= */

body {
    background: #07121f;
}

#fundoEstoque {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
    pointer-events: none !important;
    z-index: 0 !important;
    isolation: isolate;
    background: #07121f !important;
}

.fundo-imagem {
    position: absolute;
    inset: -2%;
    background-image: url("./img/estoque-fundo-leve.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.035);
    filter: brightness(.52) saturate(.82) contrast(1.06);
    opacity: .96;
    will-change: transform;
}

.fundo-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(90deg, rgba(3,10,18,.86), rgba(3,10,18,.30) 35%, rgba(3,10,18,.18) 66%, rgba(3,10,18,.78)),
        linear-gradient(180deg, rgba(2,9,17,.42), transparent 40%, rgba(2,9,17,.64));
}

.fundo-scan {
    position: absolute;
    inset: 0;
    z-index: 4;
    opacity: .16;
    background: repeating-linear-gradient(180deg, transparent 0, transparent 5px, rgba(255,255,255,.025) 6px);
    animation: scanMovimento 9s linear infinite;
}

@keyframes scanMovimento {
    from { transform: translateY(-20px); }
    to { transform: translateY(20px); }
}

#appSistema, .conteudo, .sidebar, .tela {
    position: relative;
}

.conteudo {
    background: transparent !important;
}

.sidebar {
    background: linear-gradient(180deg, rgba(4,15,27,.92), rgba(5,18,31,.78)) !important;
    border-right: 1px solid rgba(255,255,255,.12);
    box-shadow: 10px 0 35px rgba(0,0,0,.24);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.logo, .sidebar-footer {
    border-color: rgba(255,255,255,.10) !important;
}

.card,
.painel,
.filtros,
.relatorio-card,
.movimentacao-item,
.estoque-baixo-item {
    background: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.07)) !important;
    border: 1px solid rgba(255,255,255,.22) !important;
    box-shadow: 0 14px 35px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.10) !important;
    backdrop-filter: blur(14px) saturate(125%);
    -webkit-backdrop-filter: blur(14px) saturate(125%);
}

.card:hover,
.relatorio-card:hover,
.movimentacao-item:hover,
.estoque-baixo-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,.30) !important;
    box-shadow: 0 18px 42px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.12) !important;
}

.card span,
.painel-cabecalho p,
.relatorio-card span,
.movimentacao-item small,
.estoque-baixo-item small,
.cabecalho-pagina p,
.data-atual,
.vazio {
    color: rgba(255,255,255,.72) !important;
}

.card h2,
.painel-cabecalho h3,
.relatorio-card strong,
.movimentacao-item strong,
.estoque-baixo-item strong,
.cabecalho-pagina h1 {
    color: #fff !important;
    text-shadow: 0 2px 12px rgba(0,0,0,.22);
}

.filtros label,
.campo-filtro label,
.campo label {
    color: rgba(255,255,255,.80) !important;
}

input, select {
    background: rgba(255,255,255,.90) !important;
    border-color: rgba(255,255,255,.35) !important;
}

thead {
    background: rgba(255,255,255,.10) !important;
}

th {
    color: rgba(255,255,255,.76) !important;
}

td {
    color: rgba(255,255,255,.90) !important;
    border-bottom-color: rgba(255,255,255,.10) !important;
}

tbody tr:hover {
    background: rgba(255,255,255,.07) !important;
}

.modal-conteudo {
    background: rgba(9,20,33,.94) !important;
    border: 1px solid rgba(255,255,255,.16);
    box-shadow: 0 30px 80px rgba(0,0,0,.45);
    backdrop-filter: blur(20px);
}

.modal-cabecalho h2,
.modal-cabecalho p,
.modal-conteudo label {
    color: #fff;
}

.btn-sair {
    margin-top: 12px;
    width: 100%;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 8px;
    padding: 9px 10px;
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.78);
    cursor: pointer;
    transition: .2s ease;
}

.btn-sair:hover {
    background: rgba(239,68,68,.18);
    color: #fff;
    border-color: rgba(239,68,68,.35);
}

.indicador-central {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 13px;
    border: 1px solid rgba(90,190,255,.22);
    border-radius: 999px;
    background: rgba(4,19,33,.22);
    box-shadow: 0 0 35px rgba(0,145,255,.12);
    backdrop-filter: blur(8px);
}

.indicador-pulso {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #39b8ff;
    box-shadow: 0 0 0 0 rgba(57,184,255,.55);
    animation: indicadorPulso 1.8s infinite;
}

.indicador-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .18em;
    color: rgba(220,244,255,.72);
}

@keyframes indicadorPulso {
    70% { box-shadow: 0 0 0 10px rgba(57,184,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(57,184,255,0); }
}

#fundoCliques {
    position: absolute;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    overflow: hidden;
}

.clique-onda {
    position: fixed;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    border: 1px solid rgba(72,190,255,.55);
    box-shadow: 0 0 18px rgba(72,190,255,.25);
    animation: cliqueOnda .85s ease-out forwards;
}

@keyframes cliqueOnda {
    from { transform: scale(.3); opacity: .9; }
    to { transform: scale(9); opacity: 0; }
}

/* LOGIN */
.tela-login {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
    background: #06111d;
}

.tela-login.oculta { display: none; }

.login-backdrop {
    position: absolute;
    inset: -3%;
    background:
        linear-gradient(90deg, rgba(3,10,18,.78), rgba(3,10,18,.32), rgba(3,10,18,.78)),
        url("./img/estoque-fundo-leve.jpg") center/cover no-repeat;
    filter: brightness(.55) saturate(.82);
    transform: scale(1.04);
}

.login-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(24,128,214,.12), transparent 48%);
}

.login-card {
    position: relative;
    z-index: 2;
    width: min(420px, 100%);
    padding: 32px;
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(255,255,255,.17), rgba(255,255,255,.08));
    border: 1px solid rgba(255,255,255,.24);
    box-shadow: 0 30px 90px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.12);
    backdrop-filter: blur(22px) saturate(125%);
    -webkit-backdrop-filter: blur(22px) saturate(125%);
}

.login-logo { display:flex; align-items:center; gap:12px; margin-bottom:28px; }
.login-logo-icon { width:46px; height:46px; display:flex; align-items:center; justify-content:center; border-radius:13px; background:linear-gradient(135deg,#2563eb,#0ea5e9); color:#fff; font-weight:800; box-shadow:0 10px 25px rgba(37,99,235,.28); }
.login-logo strong { display:block; color:#fff; font-size:17px; }
.login-logo span { display:block; margin-top:3px; color:rgba(255,255,255,.60); font-size:11px; }
.login-titulo h1 { color:#fff; font-size:28px; margin-bottom:6px; }
.login-titulo p { color:rgba(255,255,255,.64); font-size:13px; margin-bottom:24px; }
.login-campo { margin-bottom:16px; }
.login-campo label { display:block; margin-bottom:7px; color:rgba(255,255,255,.82); font-size:12px; font-weight:700; }
.login-campo input { height:44px; background:rgba(255,255,255,.93) !important; }
.login-senha-wrap { position:relative; }
.login-senha-wrap input { padding-right:48px; }
.login-mostrar-senha { position:absolute; right:7px; top:6px; width:32px; height:32px; border:0; border-radius:8px; background:transparent; cursor:pointer; font-size:16px; }
.login-erro { min-height:18px; margin:3px 0 8px; color:#fca5a5; font-size:12px; }
.login-btn { width:100%; height:45px; border:0; border-radius:10px; background:linear-gradient(135deg,#2563eb,#0ea5e9); color:#fff; font-size:14px; font-weight:700; cursor:pointer; box-shadow:0 10px 25px rgba(37,99,235,.25); transition:.2s ease; }
.login-btn:hover { transform:translateY(-1px); filter:brightness(1.05); }
.login-acesso-inicial { margin-top:20px; padding:12px 14px; border:1px solid rgba(255,255,255,.12); border-radius:10px; background:rgba(255,255,255,.05); }
.login-acesso-inicial strong, .login-acesso-inicial span { display:block; color:rgba(255,255,255,.65); font-size:11px; line-height:1.6; }
.login-acesso-inicial strong { color:#fff; margin-bottom:2px; }

@media (max-width: 600px) {
    .login-card { padding:24px; }
    .indicador-central { display:none; }
}


/* =========================================================
   INVENTÁRIO FÍSICO
   ========================================================= */
.inventario-acoes-topo{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.inventario-resumo{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:18px}
.inventario-painel-superior{display:grid;grid-template-columns:minmax(280px,.8fr) minmax(320px,1.2fr);gap:18px;margin-bottom:18px}
.inventario-grafico-wrap{display:flex;justify-content:center;align-items:center;padding:20px}
.inventario-grafico{width:190px;height:190px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#1e88e5 var(--inventario-percent),rgba(255,255,255,.13) 0);position:relative;box-shadow:0 15px 35px rgba(0,0,0,.2)}
.inventario-grafico::before{content:"";position:absolute;inset:13px;border-radius:50%;background:rgba(7,18,31,.92);border:1px solid rgba(255,255,255,.12)}
.inventario-grafico-centro{position:relative;z-index:2;text-align:center;display:flex;flex-direction:column;gap:3px}
.inventario-grafico-centro strong{font-size:34px;color:#fff}
.inventario-grafico-centro span{font-size:12px;color:rgba(255,255,255,.7);text-transform:uppercase;letter-spacing:.08em}
.inventario-legenda{display:grid;gap:12px;margin:12px 0 20px}
.inventario-legenda>div{display:flex;align-items:center;gap:9px;color:rgba(255,255,255,.85)}
.inventario-dot{width:10px;height:10px;border-radius:50%;display:inline-block}.inventario-dot-ok{background:#35c77a}.inventario-dot-dif{background:#ff9f43}.inventario-dot-pendente{background:#8a98a8}
.inventario-observacao{margin:0;padding:14px;border-radius:12px;background:rgba(0,0,0,.12);color:rgba(255,255,255,.7);line-height:1.5}
.tabela-inventario th,.tabela-inventario td{vertical-align:middle}
.input-inventario{width:120px;max-width:100%;padding:10px 12px;border:1px solid rgba(255,255,255,.18);border-radius:9px;background:rgba(255,255,255,.09);color:#fff;outline:none}
.input-inventario:focus{border-color:rgba(30,136,229,.8);box-shadow:0 0 0 3px rgba(30,136,229,.14)}
.inventario-diferenca{font-weight:700}.dif-positiva{color:#ffb15c}.dif-negativa{color:#ff7777}
.inventario-ok,.inventario-diferente,.inventario-pendente{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:700}.inventario-ok{background:rgba(53,199,122,.14);color:#62e59c}.inventario-diferente{background:rgba(255,159,67,.14);color:#ffb15c}.inventario-pendente{background:rgba(138,152,168,.14);color:#b6c0cc}
.inventario-ultimo-painel{margin-top:18px}
@media (max-width:900px){.inventario-resumo{grid-template-columns:repeat(2,minmax(0,1fr))}.inventario-painel-superior{grid-template-columns:1fr}}
@media (max-width:600px){.inventario-resumo{grid-template-columns:1fr}.inventario-acoes-topo{width:100%}.inventario-acoes-topo .btn{flex:1}.input-inventario{width:100px}}

/* Ajustes finais do inventário */
.input-inventario { background: #ffffff !important; color: #0b2a43 !important; border: 2px solid #1e88e5 !important; font-weight: 800 !important; font-size: 16px !important; box-shadow: 0 0 0 2px rgba(30,136,229,.12) !important; }
.input-inventario::placeholder { color: #6b7c8f !important; opacity: 1; font-weight: 600; }
.input-inventario:focus { background: #ffffff !important; color: #061a2a !important; border-color: #00a8ff !important; box-shadow: 0 0 0 4px rgba(0,168,255,.18) !important; }
.tabela-inventario td:nth-child(5) { min-width: 150px; }

/* =========================================================
   AJUSTES FINAIS — PERFIL, INVENTÁRIO, RELATÓRIOS E DASHBOARD
   Mantém o fundo do galpão e as demais estruturas existentes.
   ========================================================= */

/* Perfil no topo — padrão compacto e profissional */
.usuario-logado-topo {
    position: absolute !important;
    top: 18px !important;
    right: 24px !important;
    z-index: 100 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 7px 10px 7px 7px !important;
    border: 1px solid rgba(255,255,255,.18) !important;
    border-radius: 14px !important;
    background: rgba(7,18,31,.42) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.18) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

.usuario-avatar-btn {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    border: 2px solid rgba(255,255,255,.55) !important;
    background: linear-gradient(145deg, rgba(255,255,255,.22), rgba(255,255,255,.08)) !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    cursor: pointer !important;
    box-shadow: 0 4px 14px rgba(0,0,0,.22) !important;
}

.usuario-avatar-btn img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
}

#avatarUsuarioInicial {
    width: 100% !important;
    height: 100% !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #fff !important;
}

.usuario-logado-info {
    min-width: 92px !important;
    display: flex !important;
    flex-direction: column !important;
    line-height: 1.15 !important;
}

.usuario-logado-info strong {
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 750 !important;
    white-space: nowrap !important;
}

.usuario-logado-info span {
    margin-top: 3px !important;
    color: rgba(255,255,255,.62) !important;
    font-size: 10px !important;
    white-space: nowrap !important;
}

/* Dashboard: listas com proporção consistente, como uma tabela operacional */
#listaEstoqueBaixo,
#ultimasMovimentacoes {
    width: 100% !important;
    min-height: 0 !important;
    max-height: 300px !important;
    overflow: hidden !important;
    overflow-x: hidden !important;
    border-radius: 10px !important;
}

/* No dashboard, "Mostrar tudo" libera a rolagem sem aumentar o painel. */
#listaEstoqueBaixo.dashboard-lista-completa,
#ultimasMovimentacoes.dashboard-lista-completa {
    max-height: 300px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-right: 4px !important;
}

.btn-mostrar-tudo-dashboard {
    width: 100% !important;
    min-height: 38px !important;
    margin: 8px 0 0 !important;
    padding: 9px 14px !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

#listaEstoqueBaixo + .btn-mostrar-tudo-dashboard,
#ultimasMovimentacoes + .btn-mostrar-tudo-dashboard {
    box-sizing: border-box !important;
}


.estoque-baixo-item,
.movimentacao-item {
    width: 100% !important;
    min-height: 54px !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 10px 12px !important;
    border-radius: 10px !important;
    background: rgba(255,255,255,.08) !important;
    border: 1px solid rgba(255,255,255,.14) !important;
}

.estoque-baixo-item > div:first-child,
.movimentacao-info {
    min-width: 0 !important;
}

.estoque-baixo-item strong,
.movimentacao-item strong {
    color: #fff !important;
    font-size: 12px !important;
    margin: 0 0 3px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.estoque-baixo-item span,
.movimentacao-item span {
    display: block !important;
    color: rgba(255,255,255,.62) !important;
    font-size: 10px !important;
    line-height: 1.25 !important;
}

.estoque-baixo-qtd {
    min-width: 92px !important;
    text-align: right !important;
}

.estoque-baixo-qtd strong {
    color: #ffb74d !important;
    font-size: 14px !important;
}

.estoque-baixo-qtd span {
    color: rgba(255,255,255,.55) !important;
    white-space: nowrap !important;
}

.movimentacao-item {
    grid-template-columns: 30px minmax(0,1fr) !important;
}

.movimentacao-tipo {
    width: 30px !important;
    height: 30px !important;
    border-radius: 9px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255,255,255,.10) !important;
}

.movimentacao-entrada { border: 1px solid rgba(76,175,80,.35) !important; }
.movimentacao-saida { border: 1px solid rgba(255,152,0,.35) !important; }

/* Relatório: entradas e saídas separadas, sem misturar as quantidades */
.relatorio-card-movimentacao {
    min-width: 0 !important;
}

.movimentacao-resumo-card {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    align-items: center !important;
    gap: 12px !important;
    margin-top: 8px !important;
}

.movimentacao-resumo-item {
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
}

.movimentacao-resumo-item small {
    color: rgba(255,255,255,.60) !important;
    font-size: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: .04em !important;
}

.movimentacao-resumo-item strong {
    font-size: 19px !important;
    line-height: 1 !important;
    margin: 0 !important;
}

.movimentacao-resumo-item.entrada strong { color: #6ee7a0 !important; }
.movimentacao-resumo-item.saida strong { color: #ffb56b !important; }
.movimentacao-resumo-divisor {
    width: 1px !important;
    height: 32px !important;
    background: rgba(255,255,255,.18) !important;
}

/* Inventário — campo de contagem no mesmo vidro da tabela */
.input-inventario {
    width: 120px !important;
    max-width: 100% !important;
    padding: 9px 10px !important;
    border: 1px solid rgba(255,255,255,.18) !important;
    border-radius: 9px !important;
    background: rgba(255,255,255,.09) !important;
    color: rgba(255,255,255,.92) !important;
    font: inherit !important;
    font-weight: 500 !important;
    font-size: inherit !important;
    outline: none !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04) !important;
}

.input-inventario::placeholder {
    color: rgba(255,255,255,.42) !important;
    opacity: 1 !important;
    font-weight: 400 !important;
}

.input-inventario:focus {
    background: rgba(255,255,255,.14) !important;
    color: #fff !important;
    border-color: rgba(30,136,229,.75) !important;
    box-shadow: 0 0 0 3px rgba(30,136,229,.14) !important;
}

/* Histórico dos inventários */
.tabela-historico-inventario th,
.tabela-historico-inventario td {
    white-space: nowrap !important;
}

.inventario-historico-status {
    display: inline-flex !important;
    align-items: center !important;
    padding: 4px 8px !important;
    border-radius: 999px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
}

.inventario-historico-status.finalizado {
    color: #9af0b8 !important;
    background: rgba(46,125,50,.18) !important;
    border: 1px solid rgba(76,175,80,.28) !important;
}

.inventario-historico-status.andamento {
    color: #ffd18a !important;
    background: rgba(255,152,0,.14) !important;
    border: 1px solid rgba(255,152,0,.25) !important;
}

.historico-diferenca {
    font-weight: 700 !important;
}

@media (max-width: 800px) {
    .usuario-logado-topo {
        top: 12px !important;
        right: 12px !important;
    }
    .usuario-logado-info { display: none !important; }
    .movimentacao-resumo-card { gap: 8px !important; }
    .movimentacao-resumo-item strong { font-size: 16px !important; }
}


/* =========================================================
   PERFIL NA BARRA LATERAL + HISTÓRICO MENSAL DE INVENTÁRIOS
   ========================================================= */
.usuario-logado-sidebar {
    width: calc(100% - 28px) !important;
    margin: 42px 14px 18px !important;
    padding: 10px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    border: 1px solid rgba(255,255,255,.14) !important;
    border-radius: 14px !important;
    background: rgba(255,255,255,.07) !important;
    box-shadow: 0 8px 22px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.08) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    flex-shrink: 0 !important;
}
.usuario-logado-sidebar .usuario-avatar-btn {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
}
.usuario-logado-sidebar .usuario-logado-info {
    min-width: 0 !important;
    overflow: hidden !important;
}
.usuario-logado-sidebar .usuario-logado-info strong,
.usuario-logado-sidebar .usuario-logado-info span {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
}
.usuario-logado-sidebar + .sidebar-footer {
    margin-top: 0 !important;
}

.inventario-historico-painel { margin-top: 18px !important; }
.inventario-historico-cabecalho { align-items: flex-end !important; }
.inventario-filtro-mes { display:flex; flex-direction:column; gap:5px; min-width:180px; }
.inventario-filtro-mes label { color:rgba(255,255,255,.62); font-size:11px; font-weight:700; }
.inventario-filtro-mes select {
    min-height:38px !important;
    padding:8px 34px 8px 12px !important;
    border-radius:10px !important;
    border:1px solid rgba(255,255,255,.22) !important;
    background:linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.07)) !important;
    color:#fff !important;
    font-size:13px !important;
    font-weight:600 !important;
    outline:none !important;
    box-shadow:0 8px 20px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.10) !important;
    backdrop-filter:blur(14px) saturate(125%) !important;
    -webkit-backdrop-filter:blur(14px) saturate(125%) !important;
    appearance:auto !important;
    -webkit-appearance:auto !important;
}
.inventario-filtro-mes select:hover {
    border-color:rgba(255,255,255,.34) !important;
    background:linear-gradient(135deg, rgba(255,255,255,.19), rgba(255,255,255,.09)) !important;
}
.inventario-filtro-mes select:focus {
    border-color:rgba(30,136,229,.70) !important;
    box-shadow:0 0 0 3px rgba(30,136,229,.14), 0 8px 20px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.10) !important;
}
.inventario-filtro-mes select option { color:#102030; background:#fff; }
.tabela-historico-inventario th, .tabela-historico-inventario td { white-space:nowrap !important; }
@media (max-width:700px) {
    .usuario-logado-sidebar { margin-top:28px !important; }
    .usuario-logado-sidebar .usuario-logado-info { display:flex !important; }
    .inventario-historico-cabecalho { align-items:stretch !important; }
    .inventario-filtro-mes { width:100%; }
}

/* =========================================================
   CONTROLES DE TABELAS E STATUS DE FORNECEDORES
   ========================================================= */
.btn-mostrar-tudo-tabela {
    margin: 8px 0 2px;
    align-self: flex-start;
    border: 1px solid rgba(255,255,255,.20) !important;
    background: linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,255,255,.07)) !important;
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(0,0,0,.14), inset 0 1px 0 rgba(255,255,255,.08) !important;
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
}

.btn-mostrar-tudo-tabela:hover {
    background: linear-gradient(135deg, rgba(255,255,255,.19), rgba(255,255,255,.09)) !important;
    border-color: rgba(255,255,255,.30) !important;
}

.status-fornecedor {
    display: inline-flex;
    align-items: center;
    margin-left: 7px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.08);
}

.status-fornecedor-ativo {
    color: #b9f6ca;
}

.status-fornecedor-inativo {
    color: #ffc4c4;
}

.btn-toggle-fornecedor {
    margin-top: 7px;
    padding: 6px 9px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 8px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.btn-toggle-fornecedor:hover {
    background: rgba(255,255,255,.14);
    border-color: rgba(255,255,255,.28);
}

.tabela-container + .btn-mostrar-tudo-tabela {
    display: inline-flex;
}

/* =========================================================
   RESPONSIVIDADE DO BOTÃO SAIR + MENSAGENS DO SISTEMA
   O botão acompanha automaticamente o tamanho do aparelho.
   ========================================================= */
.usuario-logado-sidebar {
    position: relative !important;
    min-width: 0 !important;
}

.btn-sair-perfil {
    margin-left: auto !important;
    flex: 0 0 auto !important;
    min-height: 36px !important;
    padding: 8px 11px !important;
    border: 1px solid rgba(255,255,255,.20) !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, rgba(30,136,229,.28), rgba(4,15,27,.38)) !important;
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    box-shadow: 0 6px 16px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.08) !important;
    transition: .2s ease !important;
}

.btn-sair-perfil:hover {
    transform: translateY(-1px) !important;
    border-color: rgba(96,165,250,.65) !important;
    background: linear-gradient(135deg, rgba(30,136,229,.46), rgba(4,15,27,.45)) !important;
}

.btn-sair-perfil:active {
    transform: translateY(0) !important;
}

.sidebar-footer .btn-sair {
    display: none !important;
}

/* Telas menores: mantém o acesso ao logout mesmo com sidebar recolhida. */
@media (max-width: 800px) {
    .usuario-logado-sidebar {
        width: 46px !important;
        margin-left: 12px !important;
        margin-right: 12px !important;
        padding: 4px !important;
        justify-content: center !important;
        gap: 0 !important;
        border-radius: 12px !important;
        flex-direction: column !important;
    }

    .usuario-logado-sidebar .usuario-logado-info {
        display: none !important;
    }

    .usuario-logado-sidebar .usuario-avatar-btn {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
    }

    .btn-sair-perfil {
        width: 38px !important;
        min-width: 38px !important;
        height: 34px !important;
        min-height: 34px !important;
        padding: 5px !important;
        margin: 5px 0 0 !important;
        border-radius: 9px !important;
        font-size: 17px !important;
        line-height: 1 !important;
    }

    .btn-sair-perfil span {
        display: none !important;
    }
}

/* Celulares muito estreitos: botão ainda mais compacto, sem desaparecer. */
@media (max-width: 420px) {
    .sidebar {
        width: 62px !important;
    }

    .usuario-logado-sidebar {
        width: 42px !important;
        margin-left: 10px !important;
        margin-right: 10px !important;
    }

    .usuario-logado-sidebar .usuario-avatar-btn {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
    }

    .btn-sair-perfil {
        width: 34px !important;
        min-width: 34px !important;
        height: 32px !important;
        min-height: 32px !important;
        font-size: 16px !important;
    }

    .conteudo {
        margin-left: 62px !important;
    }
}

/* =========================================================
   TOASTS — mensagens dentro da identidade visual do sistema
   ========================================================= */
#mensagensSistema {
    position: fixed;
    top: 20px;
    right: 20px;
    width: min(390px, calc(100vw - 32px));
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 99999;
    pointer-events: none;
}

.mensagem-sistema {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 10px;
    min-height: 62px;
    padding: 12px 12px;
    border: 1px solid rgba(255,255,255,.20);
    border-left: 3px solid rgba(96,165,250,.90);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(8,27,47,.94), rgba(10,36,60,.84));
    color: #fff;
    box-shadow: 0 16px 35px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.09);
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
    pointer-events: auto;
    overflow: hidden;
    animation: mensagemSistemaEntrada .25s ease-out;
}

.mensagem-sistema.saida {
    animation: mensagemSistemaSaida .25s ease-in forwards;
}

.mensagem-sistema .mensagem-icone {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255,255,255,.10);
    font-size: 16px;
}

.mensagem-sistema .mensagem-texto {
    min-width: 0;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
    white-space: pre-line;
}

.mensagem-sistema .mensagem-fechar {
    border: 0;
    background: transparent;
    color: rgba(255,255,255,.62);
    cursor: pointer;
    font-size: 17px;
    padding: 2px;
}

.mensagem-sistema.sucesso { border-left-color: #35c77a; }
.mensagem-sistema.sucesso .mensagem-icone { color: #72f0a4; background: rgba(53,199,122,.14); }
.mensagem-sistema.erro { border-left-color: #ff6b6b; }
.mensagem-sistema.erro .mensagem-icone { color: #ff9898; background: rgba(255,107,107,.14); }
.mensagem-sistema.aviso { border-left-color: #ffad4d; }
.mensagem-sistema.aviso .mensagem-icone { color: #ffd18a; background: rgba(255,173,77,.14); }
.mensagem-sistema.info { border-left-color: #4da3ff; }
.mensagem-sistema.info .mensagem-icone { color: #8bc7ff; background: rgba(77,163,255,.14); }

@keyframes mensagemSistemaEntrada {
    from { opacity: 0; transform: translate3d(20px,-8px,0) scale(.98); }
    to { opacity: 1; transform: translate3d(0,0,0) scale(1); }
}

@keyframes mensagemSistemaSaida {
    from { opacity: 1; transform: translate3d(0,0,0) scale(1); }
    to { opacity: 0; transform: translate3d(20px,-6px,0) scale(.98); }
}

@media (max-width: 600px) {
    #mensagensSistema {
        top: 12px;
        right: 12px;
        left: 12px;
        width: auto;
    }

    .mensagem-sistema {
        min-height: 58px;
        padding: 10px;
    }
}

/* =========================================================
   AJUSTE FINAL — POSICIONAMENTO PROPORCIONAL DO LOGOUT
   O perfil permanece no rodapé da barra lateral, mas o botão
   Sair ocupa somente o espaço necessário e se adapta à tela.
   ========================================================= */
.usuario-logado-sidebar {
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: center !important;
    width: calc(100% - 28px) !important;
    min-height: 60px !important;
    box-sizing: border-box !important;
}

.usuario-logado-sidebar .usuario-logado-info {
    flex: 1 1 auto !important;
}

.btn-sair-perfil {
    width: auto !important;
    min-width: 64px !important;
    max-width: 76px !important;
    margin: 0 0 0 auto !important;
    padding: 8px 11px !important;
    flex: 0 0 auto !important;
}

/* Em telas menores, mantém avatar e logout lado a lado.
   Isso evita a caixa vertical desproporcional vista anteriormente. */
@media (max-width: 800px) {
    .usuario-logado-sidebar {
        width: 88px !important;
        min-height: 50px !important;
        height: auto !important;
        margin: 28px auto 18px !important;
        padding: 5px !important;
        flex-direction: row !important;
        justify-content: center !important;
        gap: 5px !important;
    }

    .usuario-logado-sidebar .usuario-logado-info {
        display: none !important;
    }

    .usuario-logado-sidebar .usuario-avatar-btn {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
    }

    .btn-sair-perfil {
        width: 36px !important;
        min-width: 36px !important;
        max-width: 36px !important;
        height: 34px !important;
        min-height: 34px !important;
        padding: 5px !important;
        margin: 0 !important;
        border-radius: 9px !important;
        font-size: 16px !important;
        line-height: 1 !important;
    }

    .btn-sair-perfil span {
        display: none !important;
    }
}

@media (max-width: 420px) {
    .usuario-logado-sidebar {
        width: 80px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding: 4px !important;
        gap: 4px !important;
    }

    .usuario-logado-sidebar .usuario-avatar-btn,
    .btn-sair-perfil {
        width: 33px !important;
        min-width: 33px !important;
        max-width: 33px !important;
    }

    .usuario-logado-sidebar .usuario-avatar-btn {
        height: 33px !important;
    }

    .btn-sair-perfil {
        height: 31px !important;
        min-height: 31px !important;
        font-size: 15px !important;
    }
}


/* =========================================================
   NOVO LAYOUT — AÇÕES DA CONTA + SIDEBAR RECOLHÍVEL
   ========================================================= */
.sidebar {
    transition: width .25s ease, transform .25s ease, box-shadow .25s ease !important;
}

.logo {
    position: relative !important;
}

.logo-texto {
    min-width: 0;
    flex: 1 1 auto;
}

.sidebar-toggle {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border: 1px solid rgba(255,255,255,.14) !important;
    border-radius: 9px !important;
    background: rgba(255,255,255,.06) !important;
    color: rgba(255,255,255,.84) !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 17px !important;
    line-height: 1 !important;
    transition: .2s ease !important;
}

.sidebar-toggle:hover {
    background: rgba(37,99,235,.28) !important;
    border-color: rgba(96,165,250,.45) !important;
}

.sidebar-open-floating {
    position: fixed !important;
    left: 14px !important;
    top: 14px !important;
    z-index: 10050 !important;
    width: 40px !important;
    height: 40px !important;
    border: 1px solid rgba(255,255,255,.18) !important;
    border-radius: 11px !important;
    background: rgba(5,18,31,.88) !important;
    color: #fff !important;
    box-shadow: 0 10px 28px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.08) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}

.sidebar-overlay {
    display: none;
}

.conteudo {
    transition: margin-left .25s ease, padding .25s ease !important;
}

/* Desktop: menu aberto */
body.sidebar-recolhida .sidebar {
    width: 78px !important;
}

body.sidebar-recolhida .conteudo {
    margin-left: 78px !important;
}

body.sidebar-recolhida .logo {
    justify-content: center !important;
    padding: 16px 10px !important;
}

body.sidebar-recolhida .logo-texto {
    display: none !important;
}

body.sidebar-recolhida .sidebar-toggle {
    position: absolute !important;
    right: 8px !important;
    bottom: 8px !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    font-size: 12px !important;
    opacity: .78;
}

body.sidebar-recolhida .menu {
    padding-left: 10px !important;
    padding-right: 10px !important;
}

body.sidebar-recolhida .menu-item {
    justify-content: center !important;
    padding: 13px 5px !important;
    gap: 0 !important;
    font-size: 0 !important;
}

body.sidebar-recolhida .menu-item span {
    width: auto !important;
    font-size: 18px !important;
}

body.sidebar-recolhida .sidebar-footer {
    display: none !important;
}

/* Ações de conta no cabeçalho */
.cabecalho-direita-sistema {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 12px !important;
    min-width: 0 !important;
}

.cabecalho-sistema-acoes {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 4px !important;
    border: 1px solid rgba(255,255,255,.17) !important;
    border-radius: 13px !important;
    background: rgba(5,18,31,.46) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.08) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    flex: 0 0 auto !important;
}

.cabecalho-perfil,
.cabecalho-sair {
    border: 1px solid rgba(255,255,255,.14) !important;
    cursor: pointer !important;
    transition: .2s ease !important;
}

.cabecalho-perfil {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, rgba(37,99,235,.55), rgba(8,31,52,.75)) !important;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    font-size: 17px !important;
}

.cabecalho-perfil:hover {
    border-color: rgba(96,165,250,.60) !important;
    transform: translateY(-1px) !important;
}

.cabecalho-avatar-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.cabecalho-avatar-inicial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #fff;
}

.cabecalho-sair {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border-radius: 10px !important;
    background: rgba(255,255,255,.07) !important;
    color: rgba(255,255,255,.88) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    padding: 0 !important;
}

.cabecalho-sair:hover {
    background: rgba(239,68,68,.18) !important;
    border-color: rgba(239,68,68,.40) !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
}

/* Botões de cadastro agora ficam junto dos filtros */
.filtros .filtro-acao-principal {
    align-self: flex-end !important;
    flex: 0 0 auto !important;
    min-height: 40px !important;
    white-space: nowrap !important;
}

.tabela-acoes-topo {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    margin-bottom: 14px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid rgba(255,255,255,.10) !important;
}

.tabela-acoes-topo .btn {
    min-height: 40px !important;
}

/* Inventário: ações do inventário + conta no mesmo conjunto, sem esmagar os botões */
.inventario-acoes-topo {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.inventario-acoes-topo .cabecalho-sistema-acoes {
    margin-left: 2px !important;
}

/* Quando o menu está recolhido, os cabeçalhos ganham o espaço liberado */
body.sidebar-recolhida .cabecalho-pagina {
    padding-right: 2px !important;
}

@media (max-width: 800px) {
    /* No celular a sidebar vira um painel sobre o conteúdo. */
    .sidebar {
        width: 250px !important;
        transform: translateX(0) !important;
        box-shadow: 14px 0 40px rgba(0,0,0,.35) !important;
    }

    body.sidebar-recolhida .sidebar {
        width: 250px !important;
        transform: translateX(-102%) !important;
    }

    .conteudo,
    body.sidebar-recolhida .conteudo {
        margin-left: 0 !important;
        padding: 20px !important;
    }

    body.sidebar-recolhida .sidebar-open-floating {
        display: inline-flex !important;
    }

    body:not(.sidebar-recolhida) .sidebar-overlay {
        display: block !important;
        position: fixed !important;
        inset: 0 !important;
        z-index: 90 !important;
        background: rgba(0,0,0,.36) !important;
        backdrop-filter: blur(2px) !important;
        -webkit-backdrop-filter: blur(2px) !important;
    }

    .sidebar-toggle {
        display: inline-flex !important;
    }

    .logo-texto {
        display: block !important;
    }

    .menu-item {
        font-size: 14px !important;
        justify-content: flex-start !important;
        padding: 13px 15px !important;
    }

    .menu-item span {
        font-size: inherit !important;
        width: 20px !important;
    }

    .sidebar-footer {
        display: block !important;
    }

    body.sidebar-recolhida .sidebar-footer {
        display: none !important;
    }

    body.sidebar-recolhida .sidebar-toggle {
        right: 10px !important;
        bottom: 8px !important;
    }

    .cabecalho-pagina {
        flex-direction: row !important;
        align-items: center !important;
        gap: 12px !important;
    }

    .cabecalho-pagina > div:first-child {
        min-width: 0 !important;
        flex: 1 1 auto !important;
    }

    .cabecalho-sistema-acoes {
        gap: 5px !important;
        padding: 3px !important;
    }

    .cabecalho-perfil,
    .cabecalho-sair {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
    }

    .cabecalho-direita-sistema .data-atual {
        display: none !important;
    }

    .inventario-acoes-topo {
        justify-content: flex-end !important;
    }
}

@media (max-width: 600px) {
    .conteudo,
    body.sidebar-recolhida .conteudo {
        padding: 16px !important;
    }

    .cabecalho-pagina h1 {
        font-size: 23px !important;
    }

    .cabecalho-pagina p {
        font-size: 12px !important;
    }

    .cabecalho-sistema-acoes {
        border-radius: 11px !important;
    }

    .cabecalho-perfil,
    .cabecalho-sair {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        border-radius: 9px !important;
    }

    .inventario-acoes-topo {
        width: auto !important;
        max-width: 100% !important;
    }

    .inventario-acoes-topo .btn {
        flex: 0 1 auto !important;
    }

    .inventario-acoes-topo .cabecalho-sistema-acoes {
        flex: 0 0 auto !important;
    }

    .filtros .filtro-acao-principal {
        width: 100% !important;
    }
}

@media (max-width: 420px) {
    .cabecalho-pagina {
        gap: 8px !important;
    }

    .cabecalho-perfil,
    .cabecalho-sair {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        font-size: 16px !important;
    }

    .cabecalho-sistema-acoes {
        gap: 4px !important;
    }
}


/* Exclusão de movimentações — visível somente ao Administrador */
.coluna-acoes-movimentacao {
    width: 108px !important;
    min-width: 108px !important;
    text-align: center !important;
    white-space: nowrap !important;
}
.btn-excluir-movimentacao-admin {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    padding: 0 !important;
    border-radius: 9px !important;
    border: 1px solid rgba(239,68,68,.28) !important;
    background: rgba(239,68,68,.10) !important;
    color: #fff !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: .18s ease !important;
}
.btn-editar-movimentacao {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    padding: 0 !important;
    margin-right: 4px !important;
    border-radius: 9px !important;
    border: 1px solid rgba(59,130,246,.30) !important;
    background: rgba(59,130,246,.12) !important;
    color: inherit !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.btn-editar-movimentacao:hover { background: rgba(59,130,246,.22) !important; }
.btn-excluir-movimentacao-admin:hover {
    background: rgba(239,68,68,.22) !important;
    border-color: rgba(239,68,68,.48) !important;
    transform: translateY(-1px) !important;
}
@media (max-width: 700px) {
    .coluna-acoes-movimentacao { width: 58px !important; min-width: 58px !important; }
    .btn-excluir-movimentacao-admin, .btn-editar-movimentacao { width: 31px !important; height: 31px !important; min-width: 31px !important; }
}

/* =========================================================
   SEGURANÇA / SENHAS
   ========================================================= */
.menu-item-botao {
    width: 100%;
    border: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
    color: #d1d5db;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
}

.menu-item-botao:hover {
    background: #1f2937;
    color: #fff;
}

.menu-item-botao.active {
    background: var(--azul);
    color: #fff;
}

.modal-conta-seguranca {
    max-width: 620px;
}

.conta-resumo {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 14px;
    background: rgba(255,255,255,.06);
}

.conta-resumo strong {
    color: #fff;
    font-size: 16px;
}

.conta-resumo span {
    color: rgba(255,255,255,.68);
    font-size: 13px;
}

.modal-aviso-seguranca {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(12,34,54,.58);
    color: rgba(255,255,255,.76);
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width:700px) {
    .modal-conta-seguranca {
        width: calc(100% - 24px);
        max-width: none;
    }
}
/* Dashboard — Últimas movimentações separadas em duas colunas */
#ultimasMovimentacoes {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 14px !important;
    align-items: stretch !important;
    overflow: hidden !important;
}

.movimentacoes-coluna {
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding: 10px !important;
    border: 1px solid rgba(255,255,255,.14) !important;
    border-radius: 12px !important;
    background: rgba(255,255,255,.045) !important;
    box-sizing: border-box !important;
}

.movimentacoes-coluna-titulo {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 2px 2px 8px !important;
    border-bottom: 1px solid rgba(255,255,255,.10) !important;
}

.movimentacoes-coluna-titulo strong {
    color: #fff !important;
    font-size: 12px !important;
}

.movimentacoes-coluna-lista {
    min-width: 0 !important;
    min-height: 0 !important;
    max-height: 215px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
    padding-right: 3px !important;
}

.movimentacoes-coluna-lista .movimentacao-item {
    flex: 0 0 auto !important;
}

@media (max-width: 700px) {
    #ultimasMovimentacoes {
        grid-template-columns: 1fr !important;
    }
}


/* Validade dos produtos — Relatórios e Entradas */
.campo-ajuda {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    opacity: .72;
}

.status-validade {
    min-width: 170px;
    vertical-align: middle;
}

.status-validade strong,
.status-validade span {
    display: block;
}

.status-validade strong {
    font-size: 12px;
}

.status-validade span {
    margin-top: 3px;
    font-size: 11px;
    opacity: .82;
    line-height: 1.35;
}

.status-validade.validade-normal strong { color: #69d391 !important; }
.status-validade.validade-atencao strong { color: #f4c95d !important; }
.status-validade.validade-critica strong,
.status-validade.validade-vencida strong { color: #ff7272 !important; }
.status-validade.validade-sem-informacao strong { color: #b9c0ca !important; }

@media (max-width: 900px) {
    .status-validade { min-width: 145px; }
}

/* Relatório — consumo mensal e indicador de variação */
.consumo-produto,
.indicador-consumo {
    white-space: nowrap !important;
    text-align: center !important;
}

.consumo-produto strong,
.indicador-consumo strong {
    display: block !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
}

.consumo-produto span,
.indicador-consumo span {
    display: block !important;
    margin-top: 3px !important;
    font-size: 9px !important;
    color: rgba(255,255,255,.58) !important;
}

.indicador-consumo-aumento strong {
    color: #ffb56b !important;
}

.indicador-consumo-reducao strong {
    color: #6ee7a0 !important;
}

.indicador-consumo-neutro strong {
    color: rgba(255,255,255,.72) !important;
}

/* =========================================================
   RELATÓRIO — TABELA PROPORCIONAL E CENTRALIZADA
   ========================================================= */
.tabela-relatorio-produtos {
    width: 100% !important;
    min-width: 1120px !important;
    table-layout: fixed !important;
}

.tabela-relatorio-produtos th,
.tabela-relatorio-produtos td {
    text-align: center !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
}

.tabela-relatorio-produtos th:nth-child(1),
.tabela-relatorio-produtos td:nth-child(1) { width: 9% !important; }
.tabela-relatorio-produtos th:nth-child(2),
.tabela-relatorio-produtos td:nth-child(2) { width: 18% !important; }
.tabela-relatorio-produtos th:nth-child(3),
.tabela-relatorio-produtos td:nth-child(3) { width: 10% !important; }
.tabela-relatorio-produtos th:nth-child(4),
.tabela-relatorio-produtos td:nth-child(4) { width: 10% !important; }
.tabela-relatorio-produtos th:nth-child(5),
.tabela-relatorio-produtos td:nth-child(5) { width: 11% !important; }
.tabela-relatorio-produtos th:nth-child(6),
.tabela-relatorio-produtos td:nth-child(6) { width: 12% !important; }
.tabela-relatorio-produtos th:nth-child(7),
.tabela-relatorio-produtos td:nth-child(7) { width: 15% !important; }
.tabela-relatorio-produtos th:nth-child(8),
.tabela-relatorio-produtos td:nth-child(8) { width: 15% !important; }

.tabela-relatorio-produtos td:nth-child(2) {
    white-space: normal !important;
    overflow-wrap: anywhere;
    line-height: 1.3;
}

.tabela-relatorio-produtos th {
    padding: 12px 8px !important;
}

.tabela-relatorio-produtos td {
    padding: 12px 8px !important;
}

/* =========================================================
   RELATÓRIO — DOWNLOAD
   ========================================================= */
.painel-cabecalho-relatorio {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
}

.btn-baixar-relatorio {
    flex: 0 0 auto !important;
    min-width: 110px;
}

.modal-download-relatorio {
    width: min(520px, calc(100vw - 32px)) !important;
}

.opcoes-download-relatorio {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 22px;
}

/* Opções de download — mesma identidade visual azul/verde do sistema */
.opcao-download-relatorio {
    min-height: 150px;
    border: 1px solid rgba(255,255,255,.22) !important;
    border-radius: 14px !important;
    color: #fff !important;
    padding: 20px 16px !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: transform .18s ease, filter .18s ease, box-shadow .18s ease !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    box-shadow: 0 10px 28px rgba(0,0,0,.22) !important;
}

.opcao-download-pdf {
    background: linear-gradient(135deg, #2563eb, #1e40af) !important;
}

.opcao-download-excel {
    background: linear-gradient(135deg, #16a34a, #15803d) !important;
}

.opcao-download-relatorio:hover {
    transform: translateY(-3px) !important;
    filter: brightness(1.08) !important;
    box-shadow: 0 14px 34px rgba(0,0,0,.30) !important;
}

.icone-download-relatorio {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 52px !important;
    height: 52px !important;
    border-radius: 12px !important;
    margin-bottom: 6px !important;
    background: rgba(255,255,255,.18) !important;
    border: 1px solid rgba(255,255,255,.30) !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    letter-spacing: .4px !important;
}

.opcao-download-relatorio strong {
    display: block !important;
    color: #fff !important;
    font-size: 18px !important;
    margin: 0 !important;
}

.opcao-download-relatorio > span:last-child {
    display: block !important;
    color: rgba(255,255,255,.88) !important;
    font-size: 11px !important;
    line-height: 1.45 !important;
    opacity: 1 !important;
}

.btn-baixar-inventario {
    flex: 0 0 auto !important;
    min-width: 110px !important;
}

@media (max-width: 560px) {
    .painel-cabecalho-relatorio {
        align-items: flex-start !important;
        flex-direction: column !important;
    }

    .opcoes-download-relatorio {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   PESQUISA RÁPIDA DE PRODUTO — ENTRADA / SAÍDA
   ========================================================= */
.pesquisa-produto-movimentacao{
    width:100%;
    margin-bottom:8px;
    padding:10px 12px;
    border:1px solid rgba(30,136,229,.35);
    border-radius:9px;
    background:#fff;
    color:#0b2a43;
    outline:none;
    font-size:14px;
}
.pesquisa-produto-movimentacao:focus{border-color:#1e88e5;box-shadow:0 0 0 3px rgba(30,136,229,.12)}

/* =========================================================
   RELATÓRIO FINANCEIRO
   ========================================================= */
.relatorio-acoes{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.modal-financeiro{width:min(1180px,94vw);max-height:92vh;overflow:auto}
.financeiro-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}
.financeiro-card{padding:18px;border-radius:14px;background:linear-gradient(145deg,rgba(255,255,255,.96),rgba(235,242,249,.96));border:1px solid rgba(12,47,75,.08);box-shadow:0 8px 20px rgba(0,0,0,.07)}
.financeiro-card span,.financeiro-card small{display:block;color:#536779;font-size:12px}
.financeiro-card strong{display:block;margin:8px 0 4px;font-size:22px;color:#0b2a43}
.financeiro-graficos{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}
.financeiro-painel{margin-bottom:18px}
.financeiro-barras{display:grid;gap:14px;padding-top:4px}
.financeiro-barra-item{display:grid;gap:6px}
.financeiro-barra-topo{display:flex;justify-content:space-between;gap:12px;font-size:13px;color:#29465e}
.financeiro-barra-topo strong{white-space:nowrap;color:#0b2a43}
.financeiro-barra-fundo{height:10px;background:#e5edf4;border-radius:999px;overflow:hidden}
.financeiro-barra-preenchida{height:100%;border-radius:999px;background:linear-gradient(90deg,#1e88e5,#00a8ff)}
.financeiro-vazio{padding:20px;border-radius:10px;background:#f3f6f9;color:#6a7c8c;text-align:center}
.financeiro-custo-comparacao{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.financeiro-custo-comparacao>div{padding:16px;border-radius:12px;background:#f5f8fb;border:1px solid #e3eaf0}
.financeiro-custo-comparacao span{display:block;color:#65788a;font-size:12px;margin-bottom:6px}
.financeiro-custo-comparacao strong{font-size:20px;color:#0b2a43}
.tabela-financeiro{width:100%;border-collapse:collapse}
.tabela-financeiro th,.tabela-financeiro td{padding:11px 12px;border-bottom:1px solid rgba(30,50,70,.09);text-align:left}
.tabela-financeiro th{font-size:12px;color:#52697b;text-transform:uppercase}
@media(max-width:900px){.financeiro-cards{grid-template-columns:repeat(2,1fr)}.financeiro-graficos{grid-template-columns:1fr}}
@media(max-width:600px){.financeiro-cards,.financeiro-custo-comparacao{grid-template-columns:1fr}.relatorio-acoes{width:100%}.relatorio-acoes .btn{flex:1}}


/* =========================================================
   AJUSTES SOLICITADOS — SELETOR DE PRODUTO / TABELAS / DASHBOARD / FINANCEIRO
   ========================================================= */
.produto-seletor-pesquisavel{position:relative;width:100%;}
.produto-seletor-input{width:100%;height:42px;padding:10px 38px 10px 12px;border:1px solid var(--borda,#d7dee7);border-radius:9px;background:#fff;color:#172b3a;font-size:14px;outline:none;box-sizing:border-box;}
.produto-seletor-input:focus{border-color:#2563eb;box-shadow:0 0 0 2px rgba(37,99,235,.12)}
.produto-seletor-seta{position:absolute;right:12px;top:10px;color:#64748b;font-size:18px;pointer-events:none;line-height:20px;}
.produto-seletor-opcoes{position:absolute;z-index:1000;left:0;right:0;top:calc(100% + 4px);display:none;max-height:250px;overflow:auto;background:#fff;border:1px solid #d7dee7;border-radius:9px;box-shadow:0 12px 28px rgba(15,23,42,.16);padding:5px;}
.produto-seletor-opcoes.aberta{display:block;}
.produto-seletor-opcao{display:block;width:100%;padding:10px 11px;border:0;border-radius:7px;background:transparent;color:#243746;text-align:left;cursor:pointer;font-size:13px;}
.produto-seletor-opcao:hover,.produto-seletor-opcao.selecionada{background:#eef5ff;color:#1d4ed8;}
.produto-seletor-vazio{padding:12px;color:#718096;text-align:center;font-size:13px;}
.produto-select-oculto{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;}
.status-cadastro{display:inline-flex;align-items:center;justify-content:center;min-width:66px;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:700;}
.status-cadastro.ativo{background:#dcfce7;color:#166534;}
.status-cadastro.inativo{background:#fee2e2;color:#991b1b;}

/* Dashboard */
.dashboard-graficos-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:18px;margin-bottom:18px;}
.dashboard-grafico-painel{min-width:0;}
.dashboard-barras{display:grid;gap:13px;padding:5px 2px 4px;min-height:170px;}
.dashboard-barra-item{display:grid;gap:6px;}
.dashboard-barra-topo{display:flex;justify-content:space-between;gap:10px;font-size:12px;color:#dbeafe;}
.dashboard-barra-topo span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.dashboard-barra-topo strong{white-space:nowrap;}
.dashboard-barra-fundo{height:12px;background:rgba(255,255,255,.12);border-radius:999px;overflow:hidden;}
.dashboard-barra-preenchida{height:100%;border-radius:999px;background:linear-gradient(90deg,#f59e0b,#ef4444);}
.dashboard-grafico-vazio{display:flex;align-items:center;justify-content:center;min-height:160px;color:rgba(255,255,255,.65);font-size:13px;}
.dashboard-mov-grafico{display:flex;align-items:flex-end;justify-content:space-around;gap:10px;min-height:190px;padding:12px 8px 4px;}
.dashboard-mov-coluna{flex:1;max-width:70px;display:flex;flex-direction:column;align-items:center;gap:8px;color:rgba(255,255,255,.7);font-size:11px;}
.dashboard-mov-valores{height:145px;display:flex;align-items:flex-end;justify-content:center;gap:5px;}
.dashboard-mov-barra{width:16px;min-height:0;border-radius:5px 5px 2px 2px;position:relative;transition:height .2s ease;}
.dashboard-mov-barra.entrada{background:#22c55e;}.dashboard-mov-barra.saida{background:#f59e0b;}
.dashboard-mov-barra span{position:absolute;bottom:calc(100% + 3px);left:50%;transform:translateX(-50%);font-size:9px;color:rgba(255,255,255,.8);white-space:nowrap;}

/* Todas as tabelas operacionais com proporção uniforme */
.tabela-container>table{width:100%;table-layout:fixed;}
.tabela-container>table th,.tabela-container>table td{text-align:center;vertical-align:middle;}
.tabela-container>table th:nth-child(1),.tabela-container>table td:nth-child(1),
.tabela-container>table th:nth-child(2),.tabela-container>table td:nth-child(2){text-align:left;}
.tabela-container>table th:last-child,.tabela-container>table td:last-child{text-align:center;}

/* Financeiro com contraste maior e cards/gráficos legíveis */
.modal-financeiro{background:#f5f8fc!important;color:#172b3a!important;}
.modal-financeiro .modal-cabecalho{border-bottom:1px solid #dbe4ee;margin-bottom:18px;}
.modal-financeiro .modal-cabecalho h2{color:#0f2740!important;}
.modal-financeiro .modal-cabecalho p{color:#5b6f82!important;}
.financeiro-card{background:linear-gradient(145deg,#ffffff,#eef4f9)!important;border:1px solid #d8e2ec!important;box-shadow:0 7px 18px rgba(15,23,42,.08)!important;}
.financeiro-card span,.financeiro-card small{color:#53677a!important;}
.financeiro-card strong{color:#0f2740!important;}
.modal-financeiro .financeiro-painel{background:#fff!important;border:1px solid #d9e3ec!important;box-shadow:0 7px 18px rgba(15,23,42,.07)!important;}
.modal-financeiro .financeiro-painel .painel-cabecalho h3{color:#18364f!important;}
.modal-financeiro .financeiro-painel .painel-cabecalho p{color:#667b8e!important;}
.financeiro-barra-topo{color:#28445c!important;}
.financeiro-barra-topo strong{color:#0f2740!important;}
.financeiro-barra-fundo{height:13px;background:#e1e9f1!important;border:1px solid #d5e0ea;}
.financeiro-barra-preenchida{background:linear-gradient(90deg,#2563eb,#0ea5e9)!important;}
.financeiro-vazio{background:#eef3f7!important;color:#66798b!important;}
.financeiro-custo-comparacao>div{background:#f8fafc!important;border-color:#dbe4ec!important;}
.financeiro-custo-comparacao span{color:#667b8e!important;}
.financeiro-custo-comparacao strong{color:#102a43!important;}
.tabela-financeiro th,.tabela-financeiro td{color:#334e63!important;border-bottom-color:#e3eaf0!important;}
.tabela-financeiro th{background:#f3f6f9!important;color:#52697b!important;}

@media(max-width:900px){.dashboard-graficos-grid{grid-template-columns:1fr;}}

/* =========================================================
   AJUSTE VISUAL V3 — GRÁFICOS, TABELAS, FINANCEIRO, TEMA E DESEMPENHO
   ========================================================= */

/* Gráficos do dashboard: compactos e proporcionais aos cards */
.dashboard-graficos-grid {
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:18px;
    margin-top:18px;
    margin-bottom:18px;
}
.dashboard-grafico-painel { min-width:0; overflow:hidden; }
.dashboard-donut-layout {
    min-height:220px;
    display:grid;
    grid-template-columns:190px minmax(0,1fr);
    align-items:center;
    gap:22px;
    padding:10px 6px 4px;
}
.dashboard-donut {
    width:170px;
    height:170px;
    margin:0 auto;
    border-radius:50%;
    background:conic-gradient(#ef4444 0 var(--donut-angulo), rgba(255,255,255,.12) var(--donut-angulo) 360deg);
    position:relative;
    display:grid;
    place-items:center;
}
.dashboard-donut::before {
    content:"";
    position:absolute;
    inset:25px;
    border-radius:50%;
    background:#111c2b;
}
.dashboard-donut-centro { position:relative; z-index:1; text-align:center; }
.dashboard-donut-centro strong { display:block; font-size:34px; line-height:1; color:#fff; }
.dashboard-donut-centro span { display:block; margin-top:6px; color:rgba(255,255,255,.65); font-size:11px; text-transform:uppercase; letter-spacing:.08em; }
.dashboard-donut-legenda { min-width:0; display:grid; gap:9px; }
.dashboard-donut-resumo { display:flex; align-items:baseline; gap:8px; margin-bottom:3px; }
.dashboard-donut-resumo strong { color:#fff; font-size:24px; }
.dashboard-donut-resumo span { color:rgba(255,255,255,.68); font-size:12px; line-height:1.35; }
.dashboard-donut-item { min-width:0; display:grid; grid-template-columns:9px minmax(0,1fr) auto; gap:8px; align-items:center; }
.dashboard-donut-ponto { width:8px; height:8px; border-radius:50%; background:#ef4444; }
.dashboard-donut-nome { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:rgba(255,255,255,.78); font-size:12px; }
.dashboard-donut-item strong { color:#fff; font-size:11px; white-space:nowrap; }
.dashboard-donut-legenda small { color:rgba(255,255,255,.52); font-size:11px; }
.dashboard-donut-item.vazio { display:block; color:rgba(255,255,255,.6); }

.dashboard-linhas-grafico { min-height:220px; padding:4px 4px 0; display:flex; flex-direction:column; }
.dashboard-grafico-legenda { display:flex; justify-content:flex-end; gap:16px; padding:2px 8px 2px; color:rgba(255,255,255,.7); font-size:11px; }
.dashboard-grafico-legenda span { display:flex; align-items:center; gap:6px; }
.dashboard-grafico-legenda i { width:9px; height:9px; border-radius:50%; display:inline-block; }
.dashboard-grafico-legenda .legenda-entrada { background:#22c55e; }
.dashboard-grafico-legenda .legenda-saida { background:#f59e0b; }
.dashboard-linha-svg { width:100%; height:230px; min-height:230px; display:block; overflow:visible; }
.dashboard-grade-linha { stroke:rgba(255,255,255,.10); stroke-width:1; }
.dashboard-linha { fill:none; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.dashboard-linha.entrada { stroke:#22c55e; }
.dashboard-linha.saida { stroke:#f59e0b; }
.dashboard-ponto { stroke:#162235; stroke-width:2; }
.dashboard-ponto.entrada { fill:#22c55e; }
.dashboard-ponto.saida { fill:#f59e0b; }
.dashboard-eixo-texto { fill:rgba(255,255,255,.58); font-size:10px; }
.dashboard-valor-texto { font-size:9px; font-weight:700; }
.dashboard-valor-texto.entrada { fill:#86efac; }
.dashboard-valor-texto.saida { fill:#fcd34d; }

/* Tabelas: sem sobreposição, com colunas proporcionais e rolagem horizontal quando necessária. */
.tabela-container { overflow-x:auto; overflow-y:hidden; }
.tabela-container>table { width:100%; table-layout:auto; }
.tabela-container>table th,
.tabela-container>table td { white-space:nowrap; vertical-align:middle; }
.tabela-produtos { min-width:1240px; }
.tabela-produtos .col-produto-codigo { width:72px; }
.tabela-produtos .col-produto-nome { width:190px; }
.tabela-produtos .col-produto-categoria { width:115px; }
.tabela-produtos .col-produto-fornecedor { width:145px; }
.tabela-produtos .col-produto-situacao { width:90px; }
.tabela-produtos .col-produto-unidade { width:72px; }
.tabela-produtos .col-produto-estoque { width:90px; }
.tabela-produtos .col-produto-custo { width:105px; }
.tabela-produtos .col-produto-valor { width:125px; }
.tabela-produtos .col-produto-minimo { width:82px; }
.tabela-produtos .col-produto-status { width:105px; }
.tabela-produtos .col-produto-acoes { width:180px; }
.tabela-produtos th,
.tabela-produtos td { padding-left:10px; padding-right:10px; }
.tabela-produtos th:nth-child(2),
.tabela-produtos td:nth-child(2),
.tabela-produtos th:nth-child(3),
.tabela-produtos td:nth-child(3),
.tabela-produtos th:nth-child(4),
.tabela-produtos td:nth-child(4) { text-align:left; }
.tabela-produtos td:last-child { white-space:nowrap; }
.status-cadastro { min-width:72px; }

/* Financeiro: cards sem estouro de texto e modal realmente largo. */
.modal-financeiro {
    width:min(1180px,94vw) !important;
    max-width:1180px !important;
    min-width:0 !important;
    padding:24px !important;
}
.financeiro-cards { grid-template-columns:repeat(4,minmax(0,1fr)); }
.financeiro-card { min-width:0; overflow:hidden; }
.financeiro-card span,
.financeiro-card small { overflow-wrap:anywhere; word-break:break-word; }
.financeiro-card strong {
    font-size:clamp(17px,1.65vw,23px) !important;
    line-height:1.15;
    overflow-wrap:anywhere;
    word-break:break-word;
}
.financeiro-graficos { grid-template-columns:repeat(2,minmax(0,1fr)); }
.financeiro-painel { min-width:0; overflow:hidden; }
.financeiro-barra-topo span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.financeiro-barra-topo strong { font-size:12px; }

/* Minha conta — escolha de tema */
.conta-tema {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:18px;
    margin:0 0 18px;
    padding:14px 16px;
    border:1px solid rgba(255,255,255,.13);
    border-radius:12px;
    background:rgba(255,255,255,.05);
}
.conta-tema>div:first-child { min-width:0; }
.conta-tema strong { display:block; color:#fff; font-size:13px; margin-bottom:4px; }
.conta-tema span { color:rgba(255,255,255,.62); font-size:11px; line-height:1.4; }
.conta-tema-opcoes { display:flex; gap:8px; flex-shrink:0; }
.btn-tema {
    border:1px solid rgba(255,255,255,.16);
    border-radius:9px;
    padding:9px 12px;
    background:rgba(255,255,255,.07);
    color:rgba(255,255,255,.78);
    cursor:pointer;
    font-weight:700;
    font-size:12px;
}
.btn-tema.selecionado { background:#2563eb; border-color:#2563eb; color:#fff; }


/* Atalho para retornar à tela de início — mesma identidade visual do menu. */
.menu-item-inicio { margin-bottom: 4px; }
.menu-item-inicio:hover { background:rgba(37,99,235,.12) !important; }
body.tema-claro .menu-item-inicio:hover { background:#eef5ff !important; color:#1d4ed8 !important; }

/* Tema claro */
body.tema-claro { background:#f4f7fb; color:#172b3a; }
body.tema-claro #fundoEstoque { background:#eef3f8 !important; }
body.tema-claro .fundo-imagem { opacity:.12; filter:brightness(1.1) saturate(.55) contrast(.95); transform:none; }
body.tema-claro .fundo-overlay { background:linear-gradient(90deg,rgba(245,248,252,.96),rgba(245,248,252,.90)); }
body.tema-claro .fundo-scan { display:none !important; }
body.tema-claro .sidebar { background:#fff !important; color:#172b3a; border-right:1px solid #dbe3ec; box-shadow:2px 0 12px rgba(15,23,42,.06) !important; }
body.tema-claro .logo, body.tema-claro .sidebar-footer { border-color:#e3eaf1 !important; }
body.tema-claro .logo strong, body.tema-claro .menu-item { color:#23384b !important; }
body.tema-claro .logo span, body.tema-claro .sidebar-footer { color:#718096 !important; }
body.tema-claro .menu-item:hover { background:#eef5ff !important; color:#1d4ed8 !important; }
body.tema-claro .menu-item.active { color:#fff !important; background:#2563eb !important; }
body.tema-claro .card,
body.tema-claro .painel,
body.tema-claro .filtros,
body.tema-claro .relatorio-card,
body.tema-claro .movimentacao-item,
body.tema-claro .estoque-baixo-item {
    background:#fff !important;
    color:#172b3a !important;
    border:1px solid #dbe3ec !important;
    box-shadow:0 5px 16px rgba(15,23,42,.06) !important;
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;
}
body.tema-claro .card span,
body.tema-claro .painel-cabecalho p,
body.tema-claro .relatorio-card span,
body.tema-claro .movimentacao-item small,
body.tema-claro .estoque-baixo-item small,
body.tema-claro .cabecalho-pagina p,
body.tema-claro .data-atual,
body.tema-claro .vazio { color:#64748b !important; }
body.tema-claro .card h2,
body.tema-claro .painel-cabecalho h3,
body.tema-claro .cabecalho-pagina h1,
body.tema-claro .painel,
body.tema-claro td { color:#172b3a !important; }
body.tema-claro th { color:#64748b !important; background:#f7f9fc !important; }
body.tema-claro td { border-bottom-color:#e5eaf0 !important; }
body.tema-claro tbody tr:hover { background:#f8fbff !important; }
body.tema-claro .dashboard-donut::before { background:#fff; }
body.tema-claro .dashboard-donut-centro strong,
body.tema-claro .dashboard-donut-resumo strong,
body.tema-claro .dashboard-donut-item strong { color:#172b3a; }
body.tema-claro .dashboard-donut-centro span,
body.tema-claro .dashboard-donut-resumo span,
body.tema-claro .dashboard-donut-nome,
body.tema-claro .dashboard-donut-legenda small { color:#64748b; }
body.tema-claro .dashboard-grade-linha { stroke:#dbe3ec; }
body.tema-claro .dashboard-eixo-texto { fill:#64748b; }
body.tema-claro .dashboard-valor-texto.entrada { fill:#15803d; }
body.tema-claro .dashboard-valor-texto.saida { fill:#b45309; }
body.tema-claro .dashboard-ponto { stroke:#fff; }
body.tema-claro .conta-tema { background:#f7f9fc; border-color:#dbe3ec; }
body.tema-claro .conta-tema strong { color:#172b3a; }
body.tema-claro .conta-tema span { color:#64748b; }
body.tema-claro .btn-tema { background:#fff; color:#334e63; border-color:#dbe3ec; }
body.tema-claro .btn-tema.selecionado { background:#2563eb; border-color:#2563eb; color:#fff; }
body.tema-claro .modal-conteudo { background:#fff !important; color:#172b3a; border-color:#dbe3ec; box-shadow:0 16px 40px rgba(15,23,42,.15); backdrop-filter:none !important; -webkit-backdrop-filter:none !important; }
body.tema-claro .modal-cabecalho h2,
body.tema-claro .modal-cabecalho p,
body.tema-claro .modal-conteudo label { color:#172b3a !important; }
body.tema-claro .modal-cabecalho p { color:#64748b !important; }

/* Desempenho: remove animações, parallax, scans, ondas e desfoques pesados. */
.fundo-imagem { transform:none !important; will-change:auto !important; }
.fundo-scan, #fundoCliques, .clique-onda { display:none !important; }
.sidebar, .card, .painel, .filtros, .relatorio-card, .movimentacao-item, .estoque-baixo-item, .modal-conteudo, .usuario-logado-topo, .cabecalho-sistema-acoes {
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;
}
.sidebar, .card, .painel, .filtros, .relatorio-card, .movimentacao-item, .estoque-baixo-item { box-shadow:0 5px 16px rgba(0,0,0,.10) !important; }
.card:hover, .relatorio-card:hover, .movimentacao-item:hover, .estoque-baixo-item:hover { transform:none !important; }

@media(max-width:1100px) {
    .financeiro-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:900px) {
    .dashboard-graficos-grid, .financeiro-graficos { grid-template-columns:1fr; }
    .dashboard-donut-layout { grid-template-columns:170px minmax(0,1fr); }
}
@media(max-width:650px) {
    .dashboard-donut-layout { grid-template-columns:1fr; padding-bottom:14px; }
    .conta-tema { flex-direction:column; align-items:stretch; }
    .conta-tema-opcoes { width:100%; }
    .btn-tema { flex:1; }
    .financeiro-cards { grid-template-columns:1fr; }
    .modal-financeiro { width:96vw !important; padding:18px !important; }
}

/* Elementos decorativos animados do fundo permanecem fora do fluxo para reduzir CPU/GPU. */
.fundo-grade,
.fundo-luz,
.fluxo,
.caixa-fundo,
.palete,
.ponto,
.linha,
.indicador-central { display:none !important; }

/* =========================================================
   TEMA CLARO — PALETA DE ALTO CONTRASTE
   Ajuste somente visual. Não altera regras do tema escuro.
   ========================================================= */
body.tema-claro {
    background:#eef2f7 !important;
    color:#172033 !important;
}
body.tema-claro .conteudo,
body.tema-claro .tela {
    color:#172033 !important;
}
body.tema-claro .cabecalho-pagina h1,
body.tema-claro .painel-cabecalho h3,
body.tema-claro .card h2,
body.tema-claro .modal-cabecalho h2,
body.tema-claro .campo label,
body.tema-claro .filtros label,
body.tema-claro .relatorio-card strong,
body.tema-claro .conta-resumo strong {
    color:#172033 !important;
}
body.tema-claro .cabecalho-pagina p,
body.tema-claro .painel-cabecalho p,
body.tema-claro .modal-cabecalho p,
body.tema-claro .campo small,
body.tema-claro .filtros small,
body.tema-claro .conta-resumo span {
    color:#526176 !important;
}

/* Campos de formulário */
body.tema-claro input:not([type="checkbox"]):not([type="radio"]),
body.tema-claro select,
body.tema-claro textarea {
    background:#ffffff !important;
    color:#172033 !important;
    border:1px solid #b9c5d4 !important;
    box-shadow:inset 0 1px 2px rgba(15,23,42,.04) !important;
}
body.tema-claro input::placeholder,
body.tema-claro textarea::placeholder {
    color:#718096 !important;
    opacity:1 !important;
}
body.tema-claro input:not([type="checkbox"]):not([type="radio"]):focus,
body.tema-claro select:focus,
body.tema-claro textarea:focus {
    border-color:#2563eb !important;
    outline:2px solid rgba(37,99,235,.13) !important;
    box-shadow:0 0 0 1px #2563eb !important;
}
body.tema-claro option {
    background:#ffffff !important;
    color:#172033 !important;
}

/* Filtros e painéis */
body.tema-claro .filtros,
body.tema-claro .painel,
body.tema-claro .card,
body.tema-claro .relatorio-card,
body.tema-claro .movimentacao-item,
body.tema-claro .estoque-baixo-item,
body.tema-claro .conta-tema {
    background:#ffffff !important;
    color:#172033 !important;
    border-color:#cbd5e1 !important;
}

/* Tabelas */
body.tema-claro table {
    color:#172033 !important;
    background:#ffffff !important;
}
body.tema-claro th {
    color:#334155 !important;
    background:#e9eef5 !important;
    border-bottom:1px solid #c4cfdd !important;
}
body.tema-claro td {
    color:#172033 !important;
    border-bottom:1px solid #e2e8f0 !important;
}
body.tema-claro tbody tr:nth-child(even) {
    background:#f8fafc !important;
}
body.tema-claro tbody tr:hover {
    background:#eef5ff !important;
}

/* Botões secundários e de filtro */
body.tema-claro .btn-secundario,
body.tema-claro .btn-cinza,
body.tema-claro .btn-tema:not(.selecionado) {
    background:#ffffff !important;
    color:#334155 !important;
    border:1px solid #b9c5d4 !important;
}
body.tema-claro .btn-secundario:hover,
body.tema-claro .btn-cinza:hover,
body.tema-claro .btn-tema:not(.selecionado):hover {
    background:#eef5ff !important;
    color:#1d4ed8 !important;
    border-color:#93b4e8 !important;
}

/* Seletor pesquisável de produto */
body.tema-claro .produto-seletor-pesquisavel {
    background:#ffffff !important;
    border-color:#b9c5d4 !important;
}
body.tema-claro .produto-seletor-input {
    background:#ffffff !important;
    color:#172033 !important;
}
body.tema-claro .produto-seletor-seta {
    color:#526176 !important;
}
body.tema-claro .produto-seletor-opcoes {
    background:#ffffff !important;
    border-color:#b9c5d4 !important;
    box-shadow:0 10px 24px rgba(15,23,42,.14) !important;
}
body.tema-claro .produto-seletor-opcao {
    color:#172033 !important;
    background:#ffffff !important;
}
body.tema-claro .produto-seletor-opcao:hover,
body.tema-claro .produto-seletor-opcao.selecionada {
    background:#eef5ff !important;
    color:#1d4ed8 !important;
}
body.tema-claro .produto-seletor-vazio {
    color:#64748b !important;
}

/* Modal */
body.tema-claro .modal-conteudo {
    background:#ffffff !important;
    color:#172033 !important;
    border-color:#cbd5e1 !important;
}
body.tema-claro .modal-cabecalho {
    border-bottom-color:#dbe3ec !important;
}
body.tema-claro .btn-fechar {
    color:#526176 !important;
}
body.tema-claro .btn-fechar:hover {
    background:#eef2f7 !important;
    color:#172033 !important;
}

/* Inventário, relatórios e elementos de apoio */
body.tema-claro .inventario-observacao,
body.tema-claro .vazio,
body.tema-claro .data-atual,
body.tema-claro .cabecalho-direita-sistema {
    color:#526176 !important;
}

/* =========================================================
   TEMA CLARO — CORREÇÃO FINAL DE LEGIBILIDADE
   Somente cores; nenhuma regra funcional alterada.
   ========================================================= */
body.tema-claro .estoque-baixo-item strong,
body.tema-claro .movimentacao-item strong {
    color:#1e293b !important;
}
body.tema-claro .estoque-baixo-item span,
body.tema-claro .movimentacao-item span,
body.tema-claro .estoque-baixo-item small,
body.tema-claro .movimentacao-item small {
    color:#475569 !important;
}
body.tema-claro .estoque-baixo-qtd strong {
    color:#b45309 !important;
}
body.tema-claro .estoque-baixo-qtd span {
    color:#64748b !important;
}
body.tema-claro .movimentacao-tipo {
    background:#e8f0f8 !important;
    color:#0f4c81 !important;
}
body.tema-claro .movimentacao-entrada {
    border-color:#86efac !important;
}
body.tema-claro .movimentacao-saida {
    border-color:#fdba74 !important;
}
body.tema-claro .dashboard-barra-topo,
body.tema-claro .dashboard-barra-topo span,
body.tema-claro .dashboard-barra-topo strong {
    color:#334155 !important;
}
body.tema-claro .dashboard-barra-fundo {
    background:#e2e8f0 !important;
}
body.tema-claro .dashboard-grafico-vazio,
body.tema-claro .dashboard-mov-coluna {
    color:#64748b !important;
}
body.tema-claro .dashboard-mov-barra span {
    color:#334155 !important;
}
body.tema-claro .dashboard-grafico-painel .painel-cabecalho h3 {
    color:#172033 !important;
}
body.tema-claro .dashboard-grafico-painel .painel-cabecalho p {
    color:#64748b !important;
}
body.tema-claro .dashboard-donut-centro strong,
body.tema-claro .dashboard-donut-resumo strong,
body.tema-claro .dashboard-donut-item strong {
    color:#172033 !important;
}
body.tema-claro .dashboard-donut-centro span,
body.tema-claro .dashboard-donut-resumo span,
body.tema-claro .dashboard-donut-nome,
body.tema-claro .dashboard-donut-legenda small {
    color:#64748b !important;
}

/* Tema claro — títulos das colunas de últimas movimentações */
body.tema-claro .movimentacoes-coluna {
    border-color:#cbd5e1 !important;
    background:#f8fafc !important;
}
body.tema-claro .movimentacoes-coluna-titulo {
    border-bottom-color:#dbe3ec !important;
}
body.tema-claro .movimentacoes-coluna-titulo strong {
    color:#1e293b !important;
}
body.tema-claro .movimentacoes-coluna-titulo span {
    color:#1e293b !important;
}

/* =========================================================
   TEMA CLARO — REVISÃO GERAL DE LEGIBILIDADE V7
   Somente cores/contraste. Nenhuma função ou estrutura alterada.
   ========================================================= */

/* Inventário — legenda, status e histórico */
body.tema-claro .inventario-legenda > div {
    color:#334155 !important;
}
body.tema-claro .inventario-observacao {
    background:#f1f5f9 !important;
    color:#475569 !important;
    border:1px solid #dbe3ec !important;
}
body.tema-claro .inventario-ok {
    background:#dcfce7 !important;
    color:#166534 !important;
    border:1px solid #bbf7d0 !important;
}
body.tema-claro .inventario-diferente {
    background:#fff7ed !important;
    color:#c2410c !important;
    border:1px solid #fed7aa !important;
}
body.tema-claro .inventario-pendente {
    background:#f1f5f9 !important;
    color:#475569 !important;
    border:1px solid #cbd5e1 !important;
}
body.tema-claro .dif-positiva {
    color:#c2410c !important;
}
body.tema-claro .dif-negativa {
    color:#b91c1c !important;
}
body.tema-claro .inventario-historico-status.finalizado {
    color:#166534 !important;
    background:#dcfce7 !important;
    border-color:#bbf7d0 !important;
}
body.tema-claro .inventario-historico-status.andamento {
    color:#9a3412 !important;
    background:#ffedd5 !important;
    border-color:#fed7aa !important;
}
body.tema-claro .inventario-filtro-mes label {
    color:#526176 !important;
}

/* Relatórios — resumo de Entradas e Saídas */
body.tema-claro .movimentacao-resumo-item small {
    color:#64748b !important;
}
body.tema-claro .movimentacao-resumo-item.entrada strong {
    color:#15803d !important;
}
body.tema-claro .movimentacao-resumo-item.saida strong {
    color:#c2410c !important;
}
body.tema-claro .movimentacao-resumo-divisor {
    background:#cbd5e1 !important;
}

/* Produtos/Fornecedores — status e botão de alteração */
body.tema-claro .status-fornecedor {
    color:#334155 !important;
    background:#f1f5f9 !important;
    border-color:#cbd5e1 !important;
}
body.tema-claro .status-fornecedor-ativo {
    color:#166534 !important;
}
body.tema-claro .status-fornecedor-inativo {
    color:#b91c1c !important;
}
body.tema-claro .btn-toggle-fornecedor {
    background:#ffffff !important;
    color:#334155 !important;
    border-color:#b9c5d4 !important;
}
body.tema-claro .btn-toggle-fornecedor:hover {
    background:#eef5ff !important;
    color:#1d4ed8 !important;
    border-color:#93b4e8 !important;
}

/* Relatórios — status de validade */
body.tema-claro .status-validade.validade-normal strong {
    color:#15803d !important;
}
body.tema-claro .status-validade.validade-atencao strong {
    color:#a16207 !important;
}
body.tema-claro .status-validade.validade-critica strong,
body.tema-claro .status-validade.validade-vencida strong {
    color:#b91c1c !important;
}
body.tema-claro .status-validade.validade-sem-informacao strong {
    color:#64748b !important;
}
body.tema-claro .status-validade span {
    color:#64748b !important;
}

/* Configurações — janela de limpeza de dados */
body.tema-claro .limpar-dados-aviso {
    background:#fff7ed !important;
    border-color:#fed7aa !important;
    color:#9a3412 !important;
}
body.tema-claro .limpar-dados-aviso strong {
    color:#9a3412 !important;
}
body.tema-claro .limpar-dados-aviso span {
    color:#7c2d12 !important;
}
body.tema-claro .limpar-dados-item {
    background:#ffffff !important;
    border-color:#cbd5e1 !important;
}
body.tema-claro .limpar-dados-item:hover {
    background:#eef5ff !important;
    border-color:#93b4e8 !important;
}
body.tema-claro .limpar-dados-item strong {
    color:#1e293b !important;
}
body.tema-claro .limpar-dados-item small {
    color:#64748b !important;
}
body.tema-claro .limpar-dados-derivado {
    background:#f8fafc !important;
    opacity:1 !important;
}
body.tema-claro .limpar-dados-derivado:hover {
    background:#f8fafc !important;
    border-color:#cbd5e1 !important;
}
body.tema-claro .limpar-dados-icone {
    background:#e8f0f8 !important;
    color:#1d4ed8 !important;
}
body.tema-claro .limpar-dados-selecionar-todos {
    color:#334155 !important;
}
body.tema-claro .limpar-dados-selecao {
    color:#64748b !important;
}

/* Conta e ações do usuário — contraste sobre o fundo claro */
body.tema-claro .usuario-logado-topo {
    border-color:#cbd5e1 !important;
    background:#ffffff !important;
    box-shadow:0 6px 18px rgba(15,23,42,.08) !important;
}
body.tema-claro .usuario-logado-info strong {
    color:#172033 !important;
}
body.tema-claro .usuario-logado-info span {
    color:#64748b !important;
}
body.tema-claro .cabecalho-sistema-acoes {
    border-color:#cbd5e1 !important;
    background:#ffffff !important;
    box-shadow:0 5px 14px rgba(15,23,42,.08) !important;
}
body.tema-claro .cabecalho-sair {
    background:#f1f5f9 !important;
    color:#334155 !important;
    border-color:#cbd5e1 !important;
}
body.tema-claro .cabecalho-sair:hover {
    background:#fee2e2 !important;
    color:#b91c1c !important;
    border-color:#fecaca !important;
}

/* Mensagens do sistema — mantém destaque, mas sem texto claro perdido */
body.tema-claro .mensagem-sistema {
    box-shadow:0 10px 24px rgba(15,23,42,.14) !important;
}


/* =========================================================
   RELATÓRIO — FILTRO POR MÊS
   ========================================================= */
.relatorio-filtro-mes-painel {
    margin-bottom: 18px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #dbe3ec;
    border-radius: 12px;
}

.relatorio-filtro-mes-conteudo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.relatorio-filtro-mes-conteudo > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.relatorio-filtro-mes-conteudo strong {
    color: #172033;
    font-size: 14px;
}

.relatorio-filtro-mes-conteudo span {
    color: #526176;
    font-size: 12px;
}

.relatorio-filtro-mes-controle {
    display: flex;
    align-items: center;
    gap: 9px;
}

.relatorio-filtro-mes-controle label {
    color: #172033;
    font-size: 12px;
    font-weight: 600;
}

.relatorio-filtro-mes-controle select {
    min-width: 190px;
    padding: 9px 12px;
    border: 1px solid #b9c5d4;
    border-radius: 8px;
    background: #fff;
    color: #172033;
    font-size: 13px;
    cursor: pointer;
}

/* =========================================================
   TEMA CLARO — CONTRASTE DE TEXTOS E NÚMEROS
   ========================================================= */
body.tema-claro .relatorio-filtro-mes-painel,
body.tema-claro .relatorio-filtro-mes-painel * {
    color: #172033 !important;
}

body.tema-claro .relatorio-filtro-mes-painel span {
    color: #526176 !important;
}

body.tema-claro .relatorio-filtro-mes-controle select,
body.tema-claro .relatorio-filtro-mes-controle option {
    color: #172033 !important;
    background: #fff !important;
}

body.tema-claro .tabela-relatorio-produtos,
body.tema-claro .tabela-relatorio-produtos th,
body.tema-claro .tabela-relatorio-produtos td,
body.tema-claro .tabela-relatorio-produtos strong {
    color: #172033 !important;
}

body.tema-claro .tabela-relatorio-produtos th {
    color: #172033 !important;
    background: #f7f9fc !important;
}

body.tema-claro .consumo-produto span,
body.tema-claro .indicador-consumo span,
body.tema-claro .indicador-consumo-neutro strong,
body.tema-claro .indicador-consumo-aumento strong,
body.tema-claro .indicador-consumo-reducao strong {
    color: #172033 !important;
}

body.tema-claro .status-validade.validade-normal strong,
body.tema-claro .status-validade.validade-atencao strong,
body.tema-claro .status-validade.validade-critica strong,
body.tema-claro .status-validade.validade-vencida strong,
body.tema-claro .status-validade.validade-sem-informacao strong {
    color: #172033 !important;
}

body.tema-claro .relatorio-card,
body.tema-claro .relatorio-card span,
body.tema-claro .relatorio-card strong,
body.tema-claro .relatorio-card small,
body.tema-claro .movimentacao-resumo-item strong,
body.tema-claro .movimentacao-resumo-item small {
    color: #172033 !important;
}

@media (max-width: 650px) {
    .relatorio-filtro-mes-conteudo {
        align-items: stretch;
        flex-direction: column;
    }
    .relatorio-filtro-mes-controle {
        align-items: stretch;
        flex-direction: column;
    }
    .relatorio-filtro-mes-controle select {
        width: 100%;
        min-width: 0;
    }
}

/* =========================================================
   INVENTÁRIO — RESOLUÇÃO DE CONFLITOS
   ========================================================= */
.inventario-validacao { min-width: 190px; text-align: center; }
.btn-validar-conflito {
    border: 1px solid rgba(255,159,67,.45);
    background: rgba(255,159,67,.12);
    color: #ffb15c;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: .18s ease;
}
.btn-validar-conflito:hover { transform: translateY(-1px); filter: brightness(1.08); }
.inventario-validacao-resolvida { display:flex; flex-direction:column; align-items:center; gap:3px; }
.inventario-validacao-resolvida strong { font-size:13px; }
.inventario-validacao-resolvida small { font-size:10px; opacity:.72; }
.inventario-validacao-resolvida .btn-validar-conflito { margin-top:3px; }
.inventario-sem-conflito { opacity:.45; }
body.tema-claro .btn-validar-conflito {
    background:#fff7ed !important;
    color:#9a3412 !important;
    border-color:#fdba74 !important;
}
body.tema-claro .inventario-validacao-resolvida strong { color:#0f172a !important; }
body.tema-claro .inventario-validacao-resolvida small { color:#475569 !important; }

/* =========================================================
   INVENTÁRIO — SUBJANELA DE VALIDAÇÃO DE CONFLITOS
   ========================================================= */
.modal-validar-conflito-inventario {
    z-index: 1200;
    background: rgba(15, 23, 42, 0.62);
}

.modal-conteudo-validar-conflito {
    max-width: 620px;
    padding: 24px;
}

.conflito-produto-destaque {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    margin-bottom: 18px;
    border: 1px solid var(--borda);
    border-radius: 10px;
    background: var(--fundo-secundario, #f8fafc);
}

.conflito-produto-destaque span,
.conflito-secao-titulo,
.conflito-manual label {
    font-size: 11px;
    font-weight: 800;
    color: var(--texto-secundario);
    text-transform: uppercase;
    letter-spacing: .03em;
}

.conflito-produto-destaque strong {
    color: var(--texto-principal, #172033);
    font-size: 17px;
}

.conflito-produto-destaque small {
    color: var(--texto-secundario);
    font-size: 11px;
}

.conflito-secao-titulo { margin-bottom: 9px; }

.conflito-opcoes-contagem {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.conflito-opcao-contagem {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    text-align: left;
    padding: 13px;
    border: 1px solid var(--borda);
    border-radius: 10px;
    background: var(--fundo, #fff);
    color: var(--texto-principal, #172033);
    cursor: pointer;
    transition: .18s ease;
}

.conflito-opcao-contagem:hover {
    border-color: var(--azul);
    transform: translateY(-1px);
}

.conflito-opcao-numero,
.conflito-opcao-contagem small { color: var(--texto-secundario); font-size: 10px; }
.conflito-opcao-contagem strong { font-size: 19px; color: var(--texto-principal, #172033); }

.conflito-sugestao {
    margin-top: 16px;
    padding: 13px 15px;
    border: 1px solid rgba(37, 99, 235, .25);
    border-radius: 10px;
    background: rgba(37, 99, 235, .07);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 12px;
}

.conflito-sugestao span { font-size: 11px; font-weight: 800; color: var(--azul); width: 100%; }
.conflito-sugestao strong { font-size: 20px; color: var(--texto-principal, #172033); }
.conflito-sugestao small { flex: 1; min-width: 180px; color: var(--texto-secundario); font-size: 10px; line-height: 1.4; }

.btn-aplicar-sugestao {
    border: 1px solid var(--azul);
    background: var(--azul);
    color: #fff;
    border-radius: 7px;
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.conflito-manual { margin-top: 18px; }
.conflito-manual-linha { display: flex; gap: 8px; margin-top: 7px; }
.conflito-manual-linha input { flex: 1; min-width: 0; }

body.tema-claro .modal-conteudo-validar-conflito,
body.tema-claro .conflito-opcao-contagem { color: #172033; }
body.tema-claro .conflito-produto-destaque { background: #f8fafc; }
body.tema-claro .conflito-produto-destaque strong,
body.tema-claro .conflito-opcao-contagem strong,
body.tema-claro .conflito-sugestao strong { color: #172033 !important; }

@media (max-width: 650px) {
    .conflito-opcoes-contagem { grid-template-columns: 1fr; }
    .conflito-manual-linha { flex-direction: column; }
    .conflito-manual-linha button { width: 100%; }
}

/* =========================================================
   TELA DE INÍCIO PÓS-LOGIN
   ========================================================= */
.tela-inicio{position:fixed;inset:0;z-index:99998;display:none;align-items:center;justify-content:center;padding:28px;overflow:auto;background:#07111d;color:#fff}
.tela-inicio.ativa{display:flex}
.inicio-backdrop{position:absolute;inset:0;background:linear-gradient(120deg,rgba(5,14,25,.97),rgba(9,28,48,.94),rgba(7,17,29,.98)),url("./img/estoque-fundo-leve.jpg") center/cover no-repeat}
.inicio-backdrop::after{content:"";position:absolute;inset:0;background:radial-gradient(circle at 76% 25%,rgba(37,99,235,.20),transparent 32%),radial-gradient(circle at 18% 80%,rgba(14,165,233,.10),transparent 28%)}
.inicio-conteudo{position:relative;z-index:2;width:min(1120px,100%);max-height:calc(100vh - 56px);overflow:auto;padding:8px 4px 24px}
.inicio-topo{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:38px}
.inicio-marca{display:flex;align-items:center;gap:15px}.inicio-logo-marca{width:138px;height:86px;border:1px solid rgba(96,165,250,.28);border-radius:14px;background:linear-gradient(135deg,rgba(37,99,235,.18),rgba(14,165,233,.08));display:flex;align-items:center;justify-content:center;padding:7px;box-shadow:0 10px 26px rgba(15,23,42,.20);overflow:hidden}.inicio-logo-marca img{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 3px 8px rgba(0,0,0,.20))}
.inicio-marca strong{display:block;font-size:17px}.inicio-marca span{display:block;margin-top:3px;font-size:11px;color:rgba(255,255,255,.55)}.inicio-data{font-size:12px;color:rgba(255,255,255,.55)}
.inicio-hero{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(280px,.7fr);gap:24px;align-items:stretch;margin-bottom:24px}
.inicio-hero-texto{padding:18px 4px}.inicio-kicker{display:inline-block;color:#60a5fa;font-size:11px;font-weight:800;letter-spacing:.14em;margin-bottom:13px}.inicio-hero h1{font-size:clamp(34px,5vw,54px);line-height:1.05;letter-spacing:-.035em;margin-bottom:16px}.inicio-hero h1 strong{color:#60a5fa}.inicio-hero p{max-width:680px;color:rgba(255,255,255,.66);font-size:15px;line-height:1.7;margin-bottom:27px}
.inicio-btn-principal{border:0;border-radius:11px;padding:13px 19px;background:linear-gradient(135deg,#2563eb,#0ea5e9);color:#fff;font-weight:800;font-size:13px;cursor:pointer;box-shadow:0 12px 28px rgba(37,99,235,.25);transition:.2s ease}.inicio-btn-principal span{margin-left:8px;font-size:17px}.inicio-btn-principal:hover{transform:translateY(-2px);filter:brightness(1.06)}
.inicio-hero-painel{border:1px solid rgba(255,255,255,.10);background:linear-gradient(145deg,rgba(255,255,255,.08),rgba(255,255,255,.035));border-radius:18px;padding:24px;display:flex;flex-direction:column;justify-content:center;box-shadow:0 18px 45px rgba(0,0,0,.20);backdrop-filter:blur(14px)}
.inicio-status{display:flex;align-items:center;gap:8px;color:rgba(255,255,255,.75);font-size:12px;margin-bottom:26px}.inicio-status span{width:8px;height:8px;border-radius:50%;background:#35c77a;box-shadow:0 0 0 5px rgba(53,199,122,.10)}.inicio-status-numero{font-size:11px;color:rgba(255,255,255,.45);text-transform:uppercase;letter-spacing:.08em;margin-bottom:5px}.inicio-hero-painel>strong{font-size:24px;margin-bottom:8px}.inicio-hero-painel small{color:rgba(255,255,255,.55);font-size:11px;line-height:1.6}
.inicio-indicadores{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:30px}.inicio-indicador{min-width:0;display:flex;align-items:center;gap:13px;padding:16px;border-radius:14px;border:1px solid rgba(255,255,255,.09);background:rgba(255,255,255,.045)}.inicio-indicador>span{width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:rgba(37,99,235,.16);color:#60a5fa;font-weight:800}.inicio-indicador.alerta>span{background:rgba(234,88,12,.14);color:#fb923c}.inicio-indicador.entrada>span{background:rgba(22,163,74,.14);color:#4ade80}.inicio-indicador.saida>span{background:rgba(124,58,237,.14);color:#a78bfa}.inicio-indicador small{display:block;color:rgba(255,255,255,.46);font-size:10px;margin-bottom:3px}.inicio-indicador strong{font-size:21px}.inicio-acessos{border-top:1px solid rgba(255,255,255,.09);padding-top:23px;display:flex;align-items:center;justify-content:space-between;gap:25px}.inicio-acessos h2{font-size:15px;margin-bottom:5px}.inicio-acessos p{font-size:11px;color:rgba(255,255,255,.46)}.inicio-acoes{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.inicio-acoes button{border:1px solid rgba(255,255,255,.11);background:rgba(255,255,255,.045);color:rgba(255,255,255,.78);border-radius:9px;padding:10px 12px;font-size:11px;font-weight:700;cursor:pointer;transition:.2s ease}.inicio-acoes button:hover{background:rgba(37,99,235,.18);border-color:rgba(96,165,250,.35);color:#fff;transform:translateY(-1px)}
body.tema-claro .tela-inicio{background:#eef3f8;color:#172b3a}.tema-claro .inicio-logo-marca{background:#ffffff;border-color:#cbdcf2}.tema-claro .inicio-logo-marca img{filter:none !important;opacity:1 !important;mix-blend-mode:normal !important}.tema-claro .inicio-backdrop{background:linear-gradient(120deg,rgba(245,248,252,.98),rgba(235,242,249,.97)),url("./img/estoque-fundo-leve.jpg") center/cover no-repeat}.tema-claro .inicio-backdrop::after{background:radial-gradient(circle at 76% 25%,rgba(37,99,235,.10),transparent 32%),radial-gradient(circle at 18% 80%,rgba(14,165,233,.07),transparent 28%)}.tema-claro .inicio-marca strong,.tema-claro .inicio-hero h1,.tema-claro .inicio-hero-painel>strong,.tema-claro .inicio-acessos h2,.tema-claro .inicio-indicador strong{color:#172b3a}.tema-claro .inicio-marca span,.tema-claro .inicio-data,.tema-claro .inicio-hero p,.tema-claro .inicio-hero-painel small,.tema-claro .inicio-status,.tema-claro .inicio-indicador small,.tema-claro .inicio-acessos p{color:#64748b}.tema-claro .inicio-hero-painel,.tema-claro .inicio-indicador{background:rgba(255,255,255,.82);border-color:#dbe3ec;box-shadow:0 12px 30px rgba(15,23,42,.07)}.tema-claro .inicio-acessos{border-top-color:#dbe3ec}.tema-claro .inicio-acoes button{background:#fff;color:#334e63;border-color:#dbe3ec}.tema-claro .inicio-acoes button:hover{background:#eef5ff;color:#1d4ed8;border-color:#bcd0ed}
@media(max-width:800px){.inicio-hero{grid-template-columns:1fr}.inicio-indicadores{grid-template-columns:repeat(2,1fr)}.inicio-acessos{align-items:flex-start;flex-direction:column}.inicio-acoes{justify-content:flex-start}}
@media(max-width:520px){.tela-inicio{padding:18px}.inicio-conteudo{max-height:calc(100vh - 36px)}.inicio-topo{margin-bottom:22px}.inicio-data{display:none}.inicio-hero h1{font-size:35px}.inicio-indicadores{grid-template-columns:1fr}.inicio-acoes button{flex:1 1 calc(50% - 8px)}}

/* =========================================================
   ASSISTENTE DE VOZ
   ========================================================= */
.assistente-voz-flutuante{position:fixed;right:24px;bottom:24px;z-index:99990;border:1px solid rgba(96,165,250,.32);background:linear-gradient(135deg,#2563eb,#0ea5e9);color:#fff;border-radius:999px;padding:11px 16px 11px 12px;display:flex;align-items:center;gap:9px;font-weight:800;font-size:12px;box-shadow:0 14px 34px rgba(15,23,42,.24);cursor:pointer;transition:.2s ease}.assistente-voz-flutuante:hover{transform:translateY(-2px);box-shadow:0 18px 38px rgba(15,23,42,.30)}.assistente-voz-icone{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.16);font-size:15px}.assistente-voz-flutuante.ouvindo{animation:assistentePulso 1.2s ease-in-out infinite}@keyframes assistentePulso{0%,100%{box-shadow:0 14px 34px rgba(15,23,42,.24),0 0 0 0 rgba(37,99,235,.35)}50%{box-shadow:0 14px 34px rgba(15,23,42,.24),0 0 0 10px rgba(37,99,235,0)}}
.assistente-voz-modal{position:fixed;inset:0;z-index:99999;display:none;align-items:center;justify-content:center;padding:20px;background:rgba(2,10,20,.52);backdrop-filter:blur(6px)}.assistente-voz-modal.ativa{display:flex}.assistente-voz-card{width:min(520px,100%);border:1px solid rgba(96,165,250,.22);border-radius:20px;background:linear-gradient(145deg,#0b1c2f,#0d263f);color:#fff;box-shadow:0 28px 70px rgba(0,0,0,.35);padding:24px}.assistente-voz-cabecalho{display:flex;justify-content:space-between;gap:16px}.assistente-voz-kicker{font-size:10px;font-weight:900;letter-spacing:.14em;color:#60a5fa}.assistente-voz-cabecalho h2{font-size:23px;margin:6px 0 5px}.assistente-voz-cabecalho p{margin:0;color:rgba(255,255,255,.58);font-size:12px}.assistente-voz-fechar{border:0;background:rgba(255,255,255,.08);color:#fff;width:34px;height:34px;border-radius:9px;font-size:22px;cursor:pointer}.assistente-voz-status{margin-top:20px;padding:10px 12px;border-radius:10px;background:rgba(53,199,122,.10);color:#8de0b1;font-size:12px;font-weight:700}.assistente-voz-transcricao,.assistente-voz-resposta{margin-top:10px;padding:14px;border-radius:12px;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.045);font-size:13px;line-height:1.55}.assistente-voz-transcricao{color:rgba(255,255,255,.66);min-height:20px}.assistente-voz-resposta{color:#fff;min-height:46px}.assistente-voz-acoes{display:flex;gap:9px;margin-top:15px}.assistente-voz-acoes button{border-radius:10px;padding:11px 15px;border:1px solid rgba(255,255,255,.12);cursor:pointer;font-weight:800}.assistente-voz-ouvir{background:linear-gradient(135deg,#2563eb,#0ea5e9);color:#fff;flex:1}.assistente-voz-parar{background:rgba(255,255,255,.07);color:#fff}.assistente-voz-parar:disabled{opacity:.45;cursor:not-allowed}.assistente-voz-ajuda{margin-top:18px;padding-top:16px;border-top:1px solid rgba(255,255,255,.08);font-size:11px;color:rgba(255,255,255,.52)}.assistente-voz-ajuda div{display:flex;flex-wrap:wrap;gap:7px;margin-top:9px}.assistente-voz-ajuda button{border:1px solid rgba(96,165,250,.18);background:rgba(37,99,235,.10);color:#9bc9ff;border-radius:8px;padding:8px 9px;font-size:10px;cursor:pointer}.tema-claro .assistente-voz-card{background:#fff;color:#172b3a;border-color:#dbe3ec}.tema-claro .assistente-voz-cabecalho p,.tema-claro .assistente-voz-transcricao,.tema-claro .assistente-voz-ajuda{color:#64748b}.tema-claro .assistente-voz-resposta{color:#172b3a;background:#f8fafc;border-color:#dbe3ec}.tema-claro .assistente-voz-fechar,.tema-claro .assistente-voz-parar{color:#334e63;background:#f1f5f9;border-color:#dbe3ec}.tema-claro .assistente-voz-ajuda{border-top-color:#dbe3ec}.tema-claro .assistente-voz-ajuda button{background:#eef5ff;color:#1d4ed8;border-color:#c7dbf4}
body:not(.sistema-autenticado) .assistente-voz-flutuante{display:none}@media(max-width:600px){.assistente-voz-flutuante{right:14px;bottom:14px}.assistente-voz-texto{display:none}.assistente-voz-flutuante{padding:9px}.assistente-voz-card{padding:19px}}

/* Assistente de voz — confirmação de operações */
.assistente-voz-confirmacao{display:none;margin-top:16px;padding:15px;border:1px solid rgba(96,165,250,.28);border-radius:14px;background:rgba(37,99,235,.10)}
.assistente-voz-confirmacao.ativa{display:block}
.assistente-voz-confirmacao-titulo{font-size:13px;font-weight:900;color:#93c5fd;margin-bottom:8px}
.assistente-voz-confirmacao-texto{font-size:12px;line-height:1.6;color:rgba(255,255,255,.78)}
.assistente-voz-confirmacao-acoes{display:flex;gap:9px;margin-top:13px}
.assistente-voz-confirmacao-acoes button{flex:1;border:0;border-radius:10px;padding:10px 12px;font-weight:800;cursor:pointer}
.assistente-voz-confirmar{background:linear-gradient(135deg,#2563eb,#0ea5e9);color:#fff}
.assistente-voz-cancelar{background:rgba(255,255,255,.08);color:#fff;border:1px solid rgba(255,255,255,.12)!important}
.tema-claro .assistente-voz-confirmacao{background:#eef5ff;border-color:#c7dbf4}
.tema-claro .assistente-voz-confirmacao-titulo{color:#1d4ed8}
.tema-claro .assistente-voz-confirmacao-texto{color:#334e63}
.tema-claro .assistente-voz-cancelar{background:#f1f5f9;color:#334e63;border-color:#dbe3ec!important}


/* Consultas históricas: NFs e inventários */
.modal-historico-consulta { max-width: 1180px !important; width: min(1180px, 96vw); }
.historico-consulta-filtros { margin: 0 0 14px 0; }
.painel-resumo-historico { margin: 0 0 14px; padding: 12px 14px; border: 1px solid rgba(127,145,165,.25); border-radius: 10px; font-weight: 600; }
.btn-consultar-inventario { padding: 7px 11px !important; font-size: 12px !important; white-space: nowrap; }
body.tema-claro .painel-resumo-historico { background:#f5f8fb; border-color:#dbe3ec; }


/* Rastreabilidade de produto */
.tabela-produtos tbody tr { cursor:pointer; }
.tabela-produtos tbody tr:hover { background:#f0f6ff; }
.modal-detalhes-produto { max-width:1100px !important; width:min(1100px,96vw); }
.modal-detalhes-produto table { min-width:800px; }
.modal-detalhes-produto td { vertical-align:middle; }

/* Consumo por setor */
.consumo-setor-painel { margin-bottom:20px; }
.consumo-setor-total { font-size:12px; color:var(--texto-secundario); white-space:nowrap; }
.consumo-setor-total strong { font-size:20px; color:var(--texto); }
.consumo-setor-destaque { margin:0 0 14px; padding:12px 14px; border:1px solid var(--borda); border-radius:10px; background:var(--azul-claro); color:var(--azul-escuro); font-weight:700; }
.tabela-consumo-setor { min-width:500px; }
.tabela-consumo-setor th, .tabela-consumo-setor td { text-align:center; }
.tabela-consumo-setor th:first-child, .tabela-consumo-setor td:first-child { text-align:left; }

/* =========================================================
   CONSUMO POR SETOR — PALETA GERENCIAL ATUALIZADA
   ========================================================= */
.consumo-setor-painel {
    background: linear-gradient(145deg, #172231 0%, #1b2736 100%) !important;
    border: 1px solid #2d3b4d !important;
}
.consumo-setor-painel .painel-cabecalho {
    border-bottom-color: #2d3b4d !important;
}
.consumo-setor-painel .painel-cabecalho h3,
.consumo-setor-painel .painel-cabecalho p {
    color: #eef4fb !important;
}
.consumo-setor-total {
    color: #9aaabd !important;
}
.consumo-setor-total strong {
    color: #dce8f5 !important;
}
.consumo-setor-destaque {
    background: #24364b !important;
    border: 1px solid #38516c !important;
    color: #dbeafe !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03) !important;
}
.tabela-consumo-setor {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    overflow: hidden !important;
    border: 1px solid #334154 !important;
    border-radius: 10px !important;
    background: #192532 !important;
}
.tabela-consumo-setor thead th {
    background: #273548 !important;
    color: #cbd5e1 !important;
    border-bottom: 1px solid #3a4a5e !important;
    font-size: 11px !important;
    letter-spacing: .03em !important;
}
.tabela-consumo-setor tbody td {
    background: #1b2836 !important;
    color: #d7e0ea !important;
    border-bottom: 1px solid #2d3b4d !important;
}
.tabela-consumo-setor tbody tr:last-child td { border-bottom: 0 !important; }
.tabela-consumo-setor tbody tr:hover td {
    background: #223448 !important;
    color: #f4f8fc !important;
}
.tabela-consumo-setor tbody td:first-child {
    color: #edf3f9 !important;
    font-weight: 650 !important;
}

/* Modal de detalhes das movimentações do Dashboard */
.movimentacao-item {
    cursor: pointer !important;
}
.movimentacao-item:focus-visible {
    outline: 2px solid #4f8fe8 !important;
    outline-offset: 2px !important;
}
.modal-detalhes-movimentacao {
    max-width: 980px !important;
    width: min(980px, 94vw) !important;
}
.movimentacao-detalhes-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.movimentacao-detalhe-card {
    min-width: 0;
    padding: 14px 15px;
    border: 1px solid #334154;
    border-radius: 10px;
    background: #1b2836;
}
.movimentacao-detalhe-card span {
    display: block;
    margin-bottom: 6px;
    color: #8fa1b5;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.movimentacao-detalhe-card strong {
    display: block;
    color: #edf3f9;
    font-size: 14px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.movimentacao-detalhe-card-largo { grid-column: 1 / -1; }

body.tema-claro .consumo-setor-painel {
    background: #f7f9fc !important;
    border-color: #d9e2ec !important;
}
body.tema-claro .consumo-setor-painel .painel-cabecalho {
    border-bottom-color: #e1e8f0 !important;
}
body.tema-claro .consumo-setor-painel .painel-cabecalho h3 { color: #172033 !important; }
body.tema-claro .consumo-setor-painel .painel-cabecalho p,
body.tema-claro .consumo-setor-total { color: #64748b !important; }
body.tema-claro .consumo-setor-total strong { color: #172033 !important; }
body.tema-claro .consumo-setor-destaque {
    background: #edf4fb !important;
    border-color: #cdddec !important;
    color: #1d4f85 !important;
}
body.tema-claro .tabela-consumo-setor {
    background: #ffffff !important;
    border-color: #d7e0e9 !important;
}
body.tema-claro .tabela-consumo-setor thead th {
    background: #e9eef4 !important;
    color: #475569 !important;
    border-bottom-color: #d5dee8 !important;
}
body.tema-claro .tabela-consumo-setor tbody td {
    background: #ffffff !important;
    color: #334155 !important;
    border-bottom-color: #e3e8ef !important;
}
body.tema-claro .tabela-consumo-setor tbody tr:hover td { background: #f3f7fb !important; color: #172033 !important; }
body.tema-claro .tabela-consumo-setor tbody td:first-child { color: #172033 !important; }
body.tema-claro .movimentacao-detalhe-card { background:#f8fafc; border-color:#dbe3ec; }
body.tema-claro .movimentacao-detalhe-card span { color:#64748b; }
body.tema-claro .movimentacao-detalhe-card strong { color:#172033; }

@media (max-width: 760px) {
    .movimentacao-detalhes-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
    .movimentacao-detalhes-grid { grid-template-columns: 1fr; }
    .movimentacao-detalhe-card-largo { grid-column: auto; }
}

/* =========================================================
   CONSUMO POR SETOR — TABELA GLASS / VIDRO
   ========================================================= */
.consumo-setor-painel {
    background: linear-gradient(145deg, rgba(20, 34, 50, .78), rgba(30, 45, 62, .64)) !important;
    border: 1px solid rgba(148, 163, 184, .24) !important;
    box-shadow: 0 18px 45px rgba(2, 8, 23, .18), inset 0 1px 0 rgba(255,255,255,.055) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.consumo-setor-destaque {
    background: rgba(59, 130, 246, .11) !important;
    border: 1px solid rgba(147, 197, 253, .20) !important;
    color: #e5efff !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05) !important;
}
.tabela-consumo-setor {
    background: rgba(255,255,255,.035) !important;
    border: 1px solid rgba(148,163,184,.18) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.035) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.tabela-consumo-setor thead th {
    background: rgba(148,163,184,.11) !important;
    color: #cbd5e1 !important;
    border-bottom: 1px solid rgba(148,163,184,.22) !important;
}
.tabela-consumo-setor tbody td {
    background: rgba(255,255,255,.025) !important;
    color: #dce5ef !important;
    border-bottom: 1px solid rgba(148,163,184,.12) !important;
}
.tabela-consumo-setor tbody tr {
    cursor: pointer;
    transition: background .18s ease, transform .18s ease;
}
.tabela-consumo-setor tbody tr:hover td {
    background: rgba(96,165,250,.10) !important;
    color: #f8fbff !important;
}
.tabela-consumo-setor tbody tr:focus-visible {
    outline: 2px solid rgba(96,165,250,.8);
    outline-offset: -2px;
}

/* =========================================================
   MODAL — DETALHAMENTO DO CONSUMO POR SETOR
   ========================================================= */
.modal-detalhes-consumo-setor {
    max-width: 900px !important;
    width: min(900px, 94vw) !important;
    background: linear-gradient(145deg, rgba(14, 27, 42, .90), rgba(27, 43, 59, .82)) !important;
    border: 1px solid rgba(148,163,184,.26) !important;
    box-shadow: 0 28px 80px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.055) !important;
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}
.consumo-setor-detalhes-resumo {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.consumo-setor-detalhes-resumo > div {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,.18);
    background: rgba(255,255,255,.055);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.consumo-setor-detalhes-resumo span {
    display:block;
    margin-bottom:6px;
    color:#91a3b8;
    font-size:10px;
    text-transform:uppercase;
    letter-spacing:.06em;
}
.consumo-setor-detalhes-resumo strong {
    color:#eef5ff;
    font-size:17px;
}
.tabela-consumo-setor-detalhes {
    min-width: 620px;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 1px solid rgba(148,163,184,.18) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    background: rgba(255,255,255,.025) !important;
}
.tabela-consumo-setor-detalhes thead th {
    background: rgba(148,163,184,.11) !important;
    color: #cbd5e1 !important;
    border-bottom: 1px solid rgba(148,163,184,.20) !important;
}
.tabela-consumo-setor-detalhes tbody td {
    background: rgba(255,255,255,.025) !important;
    color: #dce5ef !important;
    border-bottom: 1px solid rgba(148,163,184,.11) !important;
}
.tabela-consumo-setor-detalhes tbody tr:last-child td { border-bottom:0 !important; }
.tabela-consumo-setor-detalhes tbody tr:hover td { background:rgba(96,165,250,.08) !important; }

body.tema-claro .consumo-setor-painel {
    background: linear-gradient(145deg, rgba(255,255,255,.82), rgba(244,248,252,.74)) !important;
    border-color: rgba(148,163,184,.30) !important;
    box-shadow: 0 18px 45px rgba(15,23,42,.08), inset 0 1px 0 rgba(255,255,255,.8) !important;
}
body.tema-claro .consumo-setor-destaque {
    background: rgba(59,130,246,.07) !important;
    border-color: rgba(59,130,246,.18) !important;
    color:#1d4f85 !important;
}
body.tema-claro .tabela-consumo-setor {
    background: rgba(255,255,255,.60) !important;
    border-color: rgba(148,163,184,.25) !important;
}
body.tema-claro .tabela-consumo-setor thead th { background:rgba(226,232,240,.62) !important; color:#475569 !important; border-bottom-color:rgba(148,163,184,.25) !important; }
body.tema-claro .tabela-consumo-setor tbody td { background:rgba(255,255,255,.45) !important; color:#334155 !important; border-bottom-color:rgba(148,163,184,.16) !important; }
body.tema-claro .tabela-consumo-setor tbody tr:hover td { background:rgba(59,130,246,.07) !important; color:#172033 !important; }
body.tema-claro .modal-detalhes-consumo-setor {
    background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(245,248,252,.88)) !important;
    border-color:rgba(148,163,184,.30) !important;
    box-shadow:0 28px 80px rgba(15,23,42,.18), inset 0 1px 0 rgba(255,255,255,.9) !important;
}
body.tema-claro .consumo-setor-detalhes-resumo > div { background:rgba(255,255,255,.64); border-color:rgba(148,163,184,.20); }
body.tema-claro .consumo-setor-detalhes-resumo span { color:#64748b; }
body.tema-claro .consumo-setor-detalhes-resumo strong { color:#172033; }
body.tema-claro .tabela-consumo-setor-detalhes { background:rgba(255,255,255,.58) !important; border-color:rgba(148,163,184,.22) !important; }
body.tema-claro .tabela-consumo-setor-detalhes thead th { background:rgba(226,232,240,.65) !important; color:#475569 !important; }
body.tema-claro .tabela-consumo-setor-detalhes tbody td { background:rgba(255,255,255,.48) !important; color:#334155 !important; }
body.tema-claro .tabela-consumo-setor-detalhes tbody tr:hover td { background:rgba(59,130,246,.07) !important; }

@media (max-width: 760px) {
    .consumo-setor-detalhes-resumo { grid-template-columns: 1fr; }
    .modal-detalhes-consumo-setor { width: min(96vw, 900px) !important; }
}

/* =========================================================
   AUDITORIA — LAYOUT PROPORCIONAL DESKTOP + MOBILE
   ========================================================= */
.auditoria-resumo-grid {
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
    margin-bottom:18px;
}
.auditoria-resumo-card {
    min-width:0;
    padding:16px 18px;
    border-radius:14px;
    border:1px solid rgba(148,163,184,.22);
    background:linear-gradient(145deg,rgba(31,45,61,.72),rgba(22,35,49,.58));
    box-shadow:0 12px 30px rgba(2,8,23,.14),inset 0 1px 0 rgba(255,255,255,.045);
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
    overflow:hidden;
}
.auditoria-resumo-card span {
    display:block;
    color:#9fb0c2;
    font-size:11px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.045em;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.auditoria-resumo-card strong {
    display:block;
    margin-top:7px;
    color:#f4f8fc;
    font-size:24px;
    line-height:1.1;
}
.auditoria-painel { min-width:0; overflow:hidden; }
.auditoria-painel .painel-cabecalho { gap:16px; align-items:center; }
.auditoria-filtros {
    display:grid !important;
    grid-template-columns:minmax(0,2fr) repeat(3,minmax(150px,1fr)) auto;
    gap:12px;
    align-items:end;
    margin:0 0 16px;
}
.auditoria-filtros .campo-filtro { min-width:0; }
.auditoria-filtros .campo-filtro label {
    display:block;
    margin-bottom:6px;
    font-size:11px;
    font-weight:700;
    color:#9fb0c2;
}
.auditoria-filtros input,
.auditoria-filtros select {
    width:100%;
    min-width:0;
    height:42px;
    box-sizing:border-box;
}
.auditoria-filtros > .btn {
    height:42px;
    white-space:nowrap;
    margin:0;
}
.auditoria-tabela-container {
    width:100%;
    min-width:0;
    overflow-x:auto;
    overflow-y:auto;
    max-height:calc(100vh - 430px);
    border-radius:12px;
    scrollbar-width:thin;
}
.auditoria-tabela {
    width:100% !important;
    min-width:880px;
    table-layout:fixed !important;
    border-collapse:separate !important;
    border-spacing:0 !important;
}
.auditoria-tabela th,
.auditoria-tabela td {
    box-sizing:border-box;
    padding:11px 10px !important;
    vertical-align:middle !important;
    overflow:hidden;
    text-overflow:ellipsis;
}
.auditoria-tabela th {
    white-space:nowrap !important;
    font-size:10px !important;
    letter-spacing:.035em;
}
.auditoria-tabela td {
    font-size:12px !important;
    white-space:nowrap !important;
}
.auditoria-tabela th:nth-child(1), .auditoria-tabela td:nth-child(1) { width:14%; }
.auditoria-tabela th:nth-child(2), .auditoria-tabela td:nth-child(2) { width:12%; }
.auditoria-tabela th:nth-child(3), .auditoria-tabela td:nth-child(3) { width:10%; }
.auditoria-tabela th:nth-child(4), .auditoria-tabela td:nth-child(4) { width:9%; }
.auditoria-tabela th:nth-child(5), .auditoria-tabela td:nth-child(5) { width:21%; }
.auditoria-tabela th:nth-child(6), .auditoria-tabela td:nth-child(6) { width:13%; }
.auditoria-tabela th:nth-child(7), .auditoria-tabela td:nth-child(7) { width:8%; text-align:center; }
.auditoria-tabela th:nth-child(8), .auditoria-tabela td:nth-child(8) { width:13%; }
.auditoria-tabela tbody tr { transition:background .16s ease; }
.auditoria-tabela tbody tr:hover td { background:rgba(59,130,246,.075) !important; }
.auditoria-tabela td:first-child { color:#b9c8d7; }
.auditoria-tabela td:nth-child(2) strong { color:#edf4fb; }
.auditoria-tabela .tabela-vazia { text-align:center !important; padding:24px !important; }

body.tema-claro .auditoria-resumo-card {
    background:linear-gradient(145deg,rgba(255,255,255,.86),rgba(244,248,252,.76));
    border-color:rgba(148,163,184,.25);
    box-shadow:0 10px 28px rgba(15,23,42,.07),inset 0 1px 0 rgba(255,255,255,.9);
}
body.tema-claro .auditoria-resumo-card span,
body.tema-claro .auditoria-filtros .campo-filtro label { color:#64748b; }
body.tema-claro .auditoria-resumo-card strong { color:#172033; }
body.tema-claro .auditoria-tabela td:first-child { color:#475569; }
body.tema-claro .auditoria-tabela td:nth-child(2) strong { color:#172033; }

@media (max-width:1100px) {
    .auditoria-filtros {
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    .auditoria-filtros .campo-pesquisa { grid-column:1 / -1; }
    .auditoria-filtros > .btn { width:max-content; }
}
@media (max-width:760px) {
    .auditoria-resumo-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
    .auditoria-resumo-card { padding:13px 14px; }
    .auditoria-resumo-card strong { font-size:21px; }
    .auditoria-painel .painel-cabecalho { align-items:flex-start; flex-direction:column; }
    .auditoria-painel .painel-cabecalho .btn { width:100%; }
    .auditoria-filtros { grid-template-columns:1fr; gap:10px; }
    .auditoria-filtros .campo-pesquisa { grid-column:auto; }
    .auditoria-filtros > .btn { width:100%; }
    .auditoria-tabela-container {
        margin-left:-2px;
        width:calc(100% + 4px);
        max-height:55vh;
        -webkit-overflow-scrolling:touch;
    }
    .auditoria-tabela { min-width:820px; }
    .auditoria-tabela th,
    .auditoria-tabela td { padding:10px 8px !important; }
}
@media (max-width:480px) {
    .auditoria-resumo-grid { grid-template-columns:1fr 1fr; }
    .auditoria-resumo-card span { font-size:9px; }
    .auditoria-resumo-card strong { font-size:19px; }
    .auditoria-tabela { min-width:790px; }
}

/* =========================================================
   RELATÓRIO — CONSUMO POR UNIDADE DE MEDIDA
   ========================================================= */
.consumo-setor-cabecalho-gerencial{align-items:flex-start !important}
.consumo-unidades-area{margin:0 0 16px;padding:14px;border:1px solid rgba(148,163,184,.18);border-radius:14px;background:rgba(255,255,255,.025);box-shadow:inset 0 1px 0 rgba(255,255,255,.035)}
.consumo-unidades-cabecalho{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:12px}
.consumo-unidades-label{display:block;color:#e6eef8;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.045em}
.consumo-unidades-cabecalho small{display:block;margin-top:3px;color:#91a3b8;font-size:11px}
.consumo-unidade-filtro{display:flex;align-items:center;gap:9px;flex:0 0 auto}
.consumo-unidade-filtro label{color:#aebdcd;font-size:11px;font-weight:700;white-space:nowrap}
.consumo-unidade-filtro select{min-width:180px;height:38px;padding:0 34px 0 12px;border-radius:9px;border:1px solid rgba(148,163,184,.25);background:rgba(255,255,255,.07);color:#e8f0f8;font-weight:700;outline:none}
.consumo-unidade-filtro select:focus{border-color:rgba(96,165,250,.65);box-shadow:0 0 0 3px rgba(59,130,246,.12)}
.consumo-unidades-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:10px}
.consumo-unidade-card{min-width:0;text-align:left;padding:12px 13px;border:1px solid rgba(148,163,184,.20);border-radius:11px;background:rgba(255,255,255,.045);color:#fff;cursor:pointer;transition:transform .16s ease,border-color .16s ease,background .16s ease,box-shadow .16s ease}
.consumo-unidade-card:hover{transform:translateY(-1px);border-color:rgba(96,165,250,.48);background:rgba(96,165,250,.09);box-shadow:0 8px 22px rgba(2,8,23,.13)}
.consumo-unidade-card.selecionado{border-color:rgba(96,165,250,.72);background:linear-gradient(145deg,rgba(59,130,246,.16),rgba(14,165,233,.08));box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 0 0 1px rgba(59,130,246,.08)}
.consumo-unidade-card-titulo{display:block;color:#9fb1c4;font-size:10px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.consumo-unidade-card strong{display:block;margin-top:5px;color:#f5f9fd;font-size:18px;line-height:1.1}
.consumo-unidade-card small{display:block;margin-top:5px;color:#8193a7;font-size:10px}
.consumo-unidades-vazio{padding:16px;border:1px dashed rgba(148,163,184,.22);border-radius:10px;color:#91a3b8;text-align:center;font-size:12px}
.unidade-tabela-tag{display:inline-flex;align-items:center;margin-left:5px;padding:2px 6px;border:1px solid rgba(96,165,250,.25);border-radius:999px;background:rgba(96,165,250,.08);color:#9ecbff;font-size:9px;font-weight:800;vertical-align:middle}

body.tema-claro .consumo-unidades-area{background:rgba(255,255,255,.55);border-color:rgba(148,163,184,.22)}
body.tema-claro .consumo-unidades-label{color:#334155}
body.tema-claro .consumo-unidades-cabecalho small{color:#64748b}
body.tema-claro .consumo-unidade-filtro label{color:#475569}
body.tema-claro .consumo-unidade-filtro select{background:rgba(255,255,255,.85);border-color:#d4dde7;color:#334155}
body.tema-claro .consumo-unidade-card{background:rgba(255,255,255,.72);border-color:rgba(148,163,184,.23);color:#172033}
body.tema-claro .consumo-unidade-card:hover{background:rgba(59,130,246,.06)}
body.tema-claro .consumo-unidade-card.selecionado{background:linear-gradient(145deg,rgba(59,130,246,.09),rgba(14,165,233,.045));border-color:rgba(59,130,246,.38)}
body.tema-claro .consumo-unidade-card-titulo{color:#64748b}
body.tema-claro .consumo-unidade-card strong{color:#172033}
body.tema-claro .consumo-unidade-card small{color:#64748b}
body.tema-claro .consumo-unidades-vazio{color:#64748b;border-color:#d5dee8}
body.tema-claro .unidade-tabela-tag{color:#1d4f85;background:rgba(59,130,246,.07);border-color:rgba(59,130,246,.18)}

@media (max-width: 760px){
    .consumo-unidades-cabecalho{align-items:stretch;flex-direction:column;gap:11px}
    .consumo-unidade-filtro{width:100%;justify-content:space-between}
    .consumo-unidade-filtro select{flex:1;min-width:0}
    .consumo-unidades-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 430px){
    .consumo-unidades-area{padding:11px}
    .consumo-unidades-cards{grid-template-columns:1fr 1fr;gap:8px}
    .consumo-unidade-card{padding:10px}
    .consumo-unidade-card strong{font-size:16px}
    .consumo-unidade-filtro{display:block}
    .consumo-unidade-filtro label{display:block;margin-bottom:6px}
    .consumo-unidade-filtro select{width:100%;height:40px}
}

/* =========================================================
   RELATÓRIOS — IDENTIDADE VIDRO / LAYOUT GERENCIAL FINAL
   ========================================================= */
#tela-relatorios {
    --relatorio-vidro: rgba(255,255,255,.075);
    --relatorio-vidro-forte: rgba(255,255,255,.105);
    --relatorio-borda: rgba(148,163,184,.22);
    --relatorio-texto: #edf4fb;
    --relatorio-secundario: #9fb0c3;
}

#tela-relatorios .relatorio-filtro-mes-painel,
#tela-relatorios .relatorio-card,
#tela-relatorios .painel {
    background: linear-gradient(145deg, rgba(255,255,255,.105), rgba(255,255,255,.045)) !important;
    border: 1px solid rgba(255,255,255,.16) !important;
    box-shadow: 0 14px 34px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.075) !important;
    backdrop-filter: blur(16px) saturate(125%);
    -webkit-backdrop-filter: blur(16px) saturate(125%);
}

#tela-relatorios .relatorio-filtro-mes-painel {
    padding: 15px 17px !important;
    border-radius: 15px !important;
}

#tela-relatorios .relatorio-filtro-mes-conteudo strong,
#tela-relatorios .relatorio-card strong,
#tela-relatorios .painel-cabecalho h3 {
    color: var(--relatorio-texto) !important;
}

#tela-relatorios .relatorio-filtro-mes-conteudo span,
#tela-relatorios .relatorio-card > span,
#tela-relatorios .painel-cabecalho p,
#tela-relatorios .consumo-unidades-cabecalho small {
    color: var(--relatorio-secundario) !important;
}

/* Seletor de mês — não usar branco sólido */
#tela-relatorios .relatorio-filtro-mes-controle select,
#tela-relatorios #filtroMesRelatorio,
#tela-relatorios .consumo-unidade-filtro select,
#tela-relatorios #filtroUnidadeConsumo {
    appearance: auto !important;
    -webkit-appearance: auto !important;
    color-scheme: dark;
    min-height: 40px !important;
    border: 1px solid rgba(148,163,184,.30) !important;
    border-radius: 10px !important;
    background: rgba(8,24,40,.78) !important;
    color: #eaf2fb !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 5px 16px rgba(0,0,0,.12) !important;
}

#tela-relatorios .relatorio-filtro-mes-controle select:hover,
#tela-relatorios .consumo-unidade-filtro select:hover {
    border-color: rgba(96,165,250,.52) !important;
    background: rgba(10,30,49,.90) !important;
}

#tela-relatorios .relatorio-filtro-mes-controle select:focus,
#tela-relatorios .consumo-unidade-filtro select:focus {
    outline: none !important;
    border-color: rgba(96,165,250,.72) !important;
    box-shadow: 0 0 0 3px rgba(59,130,246,.12), inset 0 1px 0 rgba(255,255,255,.06) !important;
}

#tela-relatorios .relatorio-filtro-mes-controle option,
#tela-relatorios #filtroMesRelatorio option,
#tela-relatorios #filtroUnidadeConsumo option {
    background: #102235 !important;
    color: #edf4fb !important;
}

#tela-relatorios .relatorio-cards {
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 15px;
}

#tela-relatorios .relatorio-card {
    min-width: 0;
    min-height: 96px;
    border-radius: 15px !important;
    padding: 17px 18px !important;
}

#tela-relatorios .relatorio-card:hover {
    transform: translateY(-1px) !important;
    border-color: rgba(96,165,250,.28) !important;
    box-shadow: 0 18px 40px rgba(0,0,0,.21), inset 0 1px 0 rgba(255,255,255,.09) !important;
}

#tela-relatorios .relatorio-card strong {
    font-size: 23px !important;
    line-height: 1.15 !important;
}

#tela-relatorios .relatorio-card-movimentacao .movimentacao-resumo-item small,
#tela-relatorios .relatorio-card-movimentacao .movimentacao-resumo-item strong {
    color: #eaf2fb !important;
}

/* Painel de consumo: mesma identidade dos demais painéis */
#tela-relatorios .consumo-setor-painel {
    background: linear-gradient(145deg, rgba(255,255,255,.105), rgba(255,255,255,.045)) !important;
    border: 1px solid rgba(255,255,255,.16) !important;
    border-radius: 16px !important;
    overflow: hidden;
}

#tela-relatorios .consumo-unidades-area {
    background: rgba(7,22,37,.30) !important;
    border: 1px solid rgba(148,163,184,.18) !important;
    border-radius: 13px !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.045) !important;
}

#tela-relatorios .consumo-unidade-card {
    background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.035)) !important;
    border-color: rgba(148,163,184,.20) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05) !important;
}

#tela-relatorios .consumo-unidade-card.selecionado {
    background: linear-gradient(145deg, rgba(37,99,235,.22), rgba(14,165,233,.09)) !important;
    border-color: rgba(96,165,250,.62) !important;
}

#tela-relatorios .consumo-setor-destaque {
    background: linear-gradient(145deg, rgba(96,165,250,.12), rgba(255,255,255,.035)) !important;
    border: 1px solid rgba(96,165,250,.25) !important;
    color: #e8f2fd !important;
}

#tela-relatorios .tabela-consumo-setor,
#tela-relatorios .tabela-relatorio-produtos {
    background: rgba(5,18,31,.30) !important;
    border: 1px solid rgba(148,163,184,.16) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

#tela-relatorios .tabela-consumo-setor thead th,
#tela-relatorios .tabela-relatorio-produtos thead th {
    background: rgba(148,163,184,.10) !important;
    color: #b9c7d6 !important;
    border-bottom: 1px solid rgba(148,163,184,.20) !important;
}

#tela-relatorios .tabela-consumo-setor tbody td,
#tela-relatorios .tabela-relatorio-produtos tbody td {
    background: rgba(255,255,255,.018) !important;
    color: #e1eaf3 !important;
    border-bottom: 1px solid rgba(148,163,184,.11) !important;
}

#tela-relatorios .tabela-consumo-setor tbody tr:hover td,
#tela-relatorios .tabela-relatorio-produtos tbody tr:hover td {
    background: rgba(96,165,250,.065) !important;
}

/* Subjanela do consumo */
#tela-relatorios ~ .modal .modal-detalhes-consumo-setor,
.modal-detalhes-consumo-setor {
    background: linear-gradient(145deg, rgba(11,28,47,.94), rgba(13,38,63,.91)) !important;
    border: 1px solid rgba(148,163,184,.24) !important;
    box-shadow: 0 28px 70px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.06) !important;
    backdrop-filter: blur(18px) saturate(125%);
    -webkit-backdrop-filter: blur(18px) saturate(125%);
}

/* Tema claro: vidro claro, sem perder contraste */
body.tema-claro #tela-relatorios {
    --relatorio-texto: #172033;
    --relatorio-secundario: #64748b;
}

body.tema-claro #tela-relatorios .relatorio-filtro-mes-painel,
body.tema-claro #tela-relatorios .relatorio-card,
body.tema-claro #tela-relatorios .painel {
    background: linear-gradient(145deg, rgba(255,255,255,.78), rgba(239,245,251,.62)) !important;
    border-color: rgba(148,163,184,.24) !important;
    box-shadow: 0 12px 30px rgba(15,23,42,.07), inset 0 1px 0 rgba(255,255,255,.85) !important;
    backdrop-filter: blur(14px) saturate(120%);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
}

body.tema-claro #tela-relatorios .relatorio-filtro-mes-controle select,
body.tema-claro #tela-relatorios #filtroMesRelatorio,
body.tema-claro #tela-relatorios .consumo-unidade-filtro select,
body.tema-claro #tela-relatorios #filtroUnidadeConsumo {
    color-scheme: light;
    background: rgba(255,255,255,.72) !important;
    color: #334155 !important;
    border-color: rgba(148,163,184,.30) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 4px 14px rgba(15,23,42,.05) !important;
}

body.tema-claro #tela-relatorios .relatorio-filtro-mes-controle option,
body.tema-claro #tela-relatorios #filtroMesRelatorio option,
body.tema-claro #tela-relatorios #filtroUnidadeConsumo option {
    background: #ffffff !important;
    color: #334155 !important;
}

body.tema-claro #tela-relatorios .consumo-unidades-area {
    background: rgba(255,255,255,.38) !important;
    border-color: rgba(148,163,184,.22) !important;
}

body.tema-claro #tela-relatorios .consumo-unidade-card {
    background: rgba(255,255,255,.58) !important;
    color: #172033 !important;
}

body.tema-claro #tela-relatorios .consumo-setor-destaque {
    background: linear-gradient(145deg, rgba(59,130,246,.09), rgba(255,255,255,.45)) !important;
    color: #172033 !important;
}

body.tema-claro #tela-relatorios .tabela-consumo-setor,
body.tema-claro #tela-relatorios .tabela-relatorio-produtos {
    background: rgba(255,255,255,.40) !important;
    border-color: rgba(148,163,184,.20) !important;
}

body.tema-claro #tela-relatorios .tabela-consumo-setor thead th,
body.tema-claro #tela-relatorios .tabela-relatorio-produtos thead th {
    background: rgba(226,232,240,.50) !important;
    color: #475569 !important;
}

body.tema-claro #tela-relatorios .tabela-consumo-setor tbody td,
body.tema-claro #tela-relatorios .tabela-relatorio-produtos tbody td {
    background: rgba(255,255,255,.34) !important;
    color: #334155 !important;
}

@media (max-width: 900px) {
    #tela-relatorios .relatorio-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 650px) {
    #tela-relatorios .relatorio-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
    #tela-relatorios .relatorio-card { min-height: 88px; padding: 14px !important; }
    #tela-relatorios .relatorio-card strong { font-size: 20px !important; }
    #tela-relatorios .relatorio-filtro-mes-painel { padding: 13px !important; }
    #tela-relatorios .relatorio-filtro-mes-controle { width: 100%; }
    #tela-relatorios .relatorio-filtro-mes-controle select { flex: 1; min-width: 0; width: 100%; }
}

@media (max-width: 430px) {
    #tela-relatorios .relatorio-cards { grid-template-columns: 1fr; }
    #tela-relatorios .relatorio-card { min-height: 82px; }
    #tela-relatorios .consumo-unidades-cards { grid-template-columns: 1fr 1fr; }
}

/* =========================================================
   SISTEMA INTEGRAL — IDENTIDADE VIDRO UNIFICADA
   Aplicado sobre todas as telas, tabelas, cards e modais.
   ========================================================= */
:root{
  --vidro-bg: rgba(8,25,42,.62);
  --vidro-bg-2: rgba(255,255,255,.075);
  --vidro-borda: rgba(170,205,235,.20);
  --vidro-borda-forte: rgba(96,165,250,.36);
  --vidro-texto: #f3f7fb;
  --vidro-texto-2: #c4d1de;
  --vidro-texto-3: #91a4b8;
  --vidro-sombra: 0 16px 38px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.075);
  --vidro-blur: blur(16px) saturate(125%);
}

/* PAINÉIS PRINCIPAIS */
.conteudo .tela > .painel,
.conteudo .tela > .card,
.conteudo .tela > .filtros,
.conteudo .tela > .relatorio-card,
.conteudo .tela > .tabela-container,
.conteudo .tela .historico-card,
.conteudo .tela .estoque-painel,
.conteudo .tela .usuarios-painel,
.conteudo .tela .graficos,
.conteudo .tela .movimentacoes,
.conteudo .tela .auditoria-painel,
.conteudo .tela .relatorio-filtro-mes-painel,
.conteudo .tela .consumo-setor-painel{
  background: linear-gradient(145deg, rgba(255,255,255,.105), rgba(7,25,42,.48)) !important;
  border: 1px solid var(--vidro-borda) !important;
  border-radius: 16px !important;
  box-shadow: var(--vidro-sombra) !important;
  backdrop-filter: var(--vidro-blur) !important;
  -webkit-backdrop-filter: var(--vidro-blur) !important;
}

/* CABEÇALHOS */
.cabecalho-pagina h1,
.cabecalho-pagina h2,
.painel-cabecalho h3,
.painel-cabecalho h2,
.tela h1,
.tela h2{
  line-height: 1.15 !important;
}
.cabecalho-pagina h1{font-size:clamp(24px,2vw,32px) !important}
.cabecalho-pagina p,
.painel-cabecalho p{font-size:12px !important;line-height:1.45 !important;color:var(--vidro-texto-2) !important}

/* CARDS: hierarquia tipográfica proporcional */
.card,
.relatorio-card,
.auditoria-resumo-card,
.movimentacao-resumo-card,
.inicio-indicador{
  min-width:0;
}
.card span,
.relatorio-card > span,
.auditoria-resumo-card span{
  font-size:10px !important;
  line-height:1.3 !important;
  letter-spacing:.035em !important;
}
.card h2,
.relatorio-card strong,
.auditoria-resumo-card strong{
  font-size:clamp(18px,1.8vw,24px) !important;
  line-height:1.12 !important;
  letter-spacing:-.01em !important;
  color:var(--vidro-texto) !important;
}

/* FILTROS E CAMPOS — vidro, não branco sólido */
.conteudo input:not([type="checkbox"]):not([type="radio"]),
.conteudo select,
.conteudo textarea{
  background:rgba(8,25,42,.68) !important;
  color:#eef5fb !important;
  border:1px solid rgba(148,163,184,.30) !important;
  border-radius:10px !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.045) !important;
  min-height:40px;
  font-size:12px !important;
}
.conteudo input::placeholder,
.conteudo textarea::placeholder{color:#8ea1b4 !important;opacity:1 !important}
.conteudo input:focus,
.conteudo select:focus,
.conteudo textarea:focus{
  border-color:rgba(96,165,250,.72) !important;
  box-shadow:0 0 0 3px rgba(59,130,246,.13), inset 0 1px 0 rgba(255,255,255,.06) !important;
  outline:none !important;
}
.conteudo option{background:#102235 !important;color:#edf4fb !important}
.conteudo label{font-size:10px !important;font-weight:800 !important;color:#b9c8d7 !important}

/* TABELAS */
.conteudo .tabela-container,
.conteudo .tabela-scroll,
.conteudo .auditoria-tabela-container{
  background:rgba(5,18,31,.28) !important;
  border:1px solid rgba(148,163,184,.16) !important;
  border-radius:13px !important;
  overflow:auto !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035) !important;
}
.conteudo table{
  width:100%;
  border-collapse:separate !important;
  border-spacing:0 !important;
}
.conteudo thead th,
.conteudo table th{
  background:rgba(91,112,134,.24) !important;
  color:#d3deea !important;
  font-size:10px !important;
  font-weight:800 !important;
  letter-spacing:.035em !important;
  line-height:1.25 !important;
  padding:11px 10px !important;
  border-bottom:1px solid rgba(148,163,184,.22) !important;
  white-space:nowrap;
}
.conteudo table td{
  background:rgba(255,255,255,.018) !important;
  color:#e6edf5 !important;
  font-size:12px !important;
  line-height:1.35 !important;
  padding:10px !important;
  border-bottom:1px solid rgba(148,163,184,.10) !important;
  vertical-align:middle !important;
}
.conteudo table tbody tr:hover td{background:rgba(96,165,250,.065) !important}
.conteudo table td strong{color:#f4f8fc !important}

/* BOTÕES */
.conteudo .btn{
  min-height:38px;
  border-radius:10px !important;
  font-size:11px !important;
  font-weight:800 !important;
  line-height:1.2 !important;
  padding:9px 13px !important;
}

/* MODAIS / SUBJANELAS */
.modal-conteudo,
.conteudo ~ .modal .modal-conteudo{
  background:linear-gradient(145deg,rgba(9,27,46,.96),rgba(8,23,39,.94)) !important;
  border:1px solid rgba(148,163,184,.24) !important;
  border-radius:18px !important;
  box-shadow:0 30px 85px rgba(0,0,0,.48),inset 0 1px 0 rgba(255,255,255,.065) !important;
  backdrop-filter:blur(20px) saturate(125%) !important;
  -webkit-backdrop-filter:blur(20px) saturate(125%) !important;
}
.modal-cabecalho h2{font-size:clamp(17px,1.6vw,22px) !important;line-height:1.2 !important;color:#f5f8fc !important}
.modal-cabecalho p{font-size:11px !important;line-height:1.4 !important;color:#9fb0c3 !important}
.modal-conteudo label{font-size:10px !important;color:#b9c8d7 !important}
.modal-conteudo .card,
.modal-conteudo .painel,
.modal-conteudo .relatorio-card{
  background:rgba(255,255,255,.065) !important;
  border-color:rgba(148,163,184,.18) !important;
}

/* AUDITORIA */
#auditoria .auditoria-resumo-card,
#auditoria .auditoria-painel,
#tela-auditoria .auditoria-resumo-card,
#tela-auditoria .auditoria-painel{
  background:linear-gradient(145deg,rgba(255,255,255,.09),rgba(7,25,42,.46)) !important;
  border-color:rgba(148,163,184,.20) !important;
  backdrop-filter:var(--vidro-blur) !important;
}
.auditoria-tabela td,.auditoria-tabela th{font-size:11px !important}

/* RELATÓRIOS: proporção dos textos */
#tela-relatorios .painel-cabecalho h3{font-size:17px !important}
#tela-relatorios .painel-cabecalho p{font-size:11px !important}
#tela-relatorios .relatorio-card strong{font-size:clamp(19px,1.7vw,23px) !important}
#tela-relatorios .consumo-unidades-label{font-size:11px !important}
#tela-relatorios .consumo-unidade-card-titulo{font-size:9px !important}
#tela-relatorios .consumo-unidade-card strong{font-size:clamp(16px,1.5vw,20px) !important}
#tela-relatorios .consumo-unidade-card small{font-size:9px !important}
#tela-relatorios .consumo-setor-destaque{font-size:14px !important;line-height:1.25 !important}
#tela-relatorios .tabela-consumo-setor th,
#tela-relatorios .tabela-relatorio-produtos th{font-size:9px !important}
#tela-relatorios .tabela-consumo-setor td,
#tela-relatorios .tabela-relatorio-produtos td{font-size:11px !important}

/* INVENTÁRIO */
#tela-inventario .painel,
#tela-inventario .tabela-container,
#tela-inventario .inventario-resumo,
#tela-inventario .inventario-acoes-topo{
  backdrop-filter:var(--vidro-blur) !important;
  -webkit-backdrop-filter:var(--vidro-blur) !important;
}
.input-inventario{
  background:rgba(8,25,42,.74) !important;
  color:#f4f8fc !important;
  border:1px solid rgba(96,165,250,.42) !important;
  min-height:40px !important;
  font-size:13px !important;
}

/* SIDEBAR / CABEÇALHO */
.sidebar{
  background:linear-gradient(180deg,rgba(4,17,30,.88),rgba(5,22,37,.72)) !important;
  border-right:1px solid rgba(148,163,184,.14) !important;
  backdrop-filter:blur(18px) saturate(120%) !important;
  -webkit-backdrop-filter:blur(18px) saturate(120%) !important;
}
.topbar,
.cabecalho-sistema-acoes,
.usuario-logado-topo{
  background:rgba(8,25,42,.30) !important;
  border-color:rgba(148,163,184,.14) !important;
}

/* TELA INICIAL */
.tela-inicio .inicio-hero-painel,
.tela-inicio .inicio-indicador{
  background:linear-gradient(145deg,rgba(255,255,255,.10),rgba(7,25,42,.48)) !important;
  border:1px solid rgba(148,163,184,.20) !important;
  box-shadow:var(--vidro-sombra) !important;
  backdrop-filter:var(--vidro-blur) !important;
}
.tela-inicio .inicio-hero h1{font-size:clamp(30px,4vw,48px) !important;line-height:1.05 !important}
.tela-inicio .inicio-hero p{font-size:13px !important;line-height:1.6 !important}
.tela-inicio .inicio-indicador small{font-size:9px !important}
.tela-inicio .inicio-indicador strong{font-size:22px !important}

/* =========================================================
   TEMA CLARO — VIDRO CLARO COM CONTRASTE
   ========================================================= */
body.tema-claro .conteudo .tela > .painel,
body.tema-claro .conteudo .tela > .card,
body.tema-claro .conteudo .tela > .filtros,
body.tema-claro .conteudo .tela > .relatorio-card,
body.tema-claro .conteudo .tela > .tabela-container,
body.tema-claro .conteudo .tela .historico-card,
body.tema-claro .conteudo .tela .estoque-painel,
body.tema-claro .conteudo .tela .usuarios-painel,
body.tema-claro .conteudo .tela .graficos,
body.tema-claro .conteudo .tela .movimentacoes,
body.tema-claro .conteudo .tela .auditoria-painel,
body.tema-claro .conteudo .tela .relatorio-filtro-mes-painel,
body.tema-claro .conteudo .tela .consumo-setor-painel{
  background:linear-gradient(145deg,rgba(255,255,255,.72),rgba(226,236,246,.48)) !important;
  border-color:rgba(148,163,184,.25) !important;
  box-shadow:0 14px 34px rgba(15,23,42,.08),inset 0 1px 0 rgba(255,255,255,.92) !important;
  backdrop-filter:blur(14px) saturate(120%) !important;
  -webkit-backdrop-filter:blur(14px) saturate(120%) !important;
}
body.tema-claro .conteudo input:not([type="checkbox"]):not([type="radio"]),
body.tema-claro .conteudo select,
body.tema-claro .conteudo textarea{
  background:rgba(255,255,255,.66) !important;
  color:#243447 !important;
  border-color:rgba(148,163,184,.34) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.92) !important;
}
body.tema-claro .conteudo input::placeholder,
body.tema-claro .conteudo textarea::placeholder{color:#708196 !important}
body.tema-claro .conteudo option{background:#fff !important;color:#243447 !important}
body.tema-claro .conteudo label{color:#52657a !important}
body.tema-claro .conteudo thead th,
body.tema-claro .conteudo table th{background:rgba(226,232,240,.58) !important;color:#52657a !important;border-bottom-color:rgba(148,163,184,.26) !important}
body.tema-claro .conteudo table td{background:rgba(255,255,255,.30) !important;color:#34495e !important;border-bottom-color:rgba(148,163,184,.15) !important}
body.tema-claro .conteudo table td strong{color:#1f3348 !important}
body.tema-claro .conteudo table tbody tr:hover td{background:rgba(59,130,246,.065) !important}
body.tema-claro .conteudo .tabela-container,
body.tema-claro .conteudo .tabela-scroll,
body.tema-claro .conteudo .auditoria-tabela-container{background:rgba(255,255,255,.26) !important;border-color:rgba(148,163,184,.22) !important}
body.tema-claro .modal-conteudo,
body.tema-claro .conteudo ~ .modal .modal-conteudo{
  background:linear-gradient(145deg,rgba(255,255,255,.88),rgba(232,240,248,.78)) !important;
  border-color:rgba(148,163,184,.28) !important;
  box-shadow:0 28px 70px rgba(15,23,42,.18),inset 0 1px 0 rgba(255,255,255,.95) !important;
  backdrop-filter:blur(18px) saturate(120%) !important;
  -webkit-backdrop-filter:blur(18px) saturate(120%) !important;
}
body.tema-claro .modal-cabecalho h2{color:#1f3348 !important}
body.tema-claro .modal-cabecalho p{color:#64748b !important}
body.tema-claro .modal-conteudo label{color:#52657a !important}
body.tema-claro .sidebar{
  background:linear-gradient(180deg,rgba(255,255,255,.78),rgba(238,245,251,.70)) !important;
  border-right-color:rgba(148,163,184,.25) !important;
  backdrop-filter:blur(18px) saturate(120%) !important;
  -webkit-backdrop-filter:blur(18px) saturate(120%) !important;
}
body.tema-claro .topbar,
body.tema-claro .cabecalho-sistema-acoes,
body.tema-claro .usuario-logado-topo{background:rgba(255,255,255,.28) !important}
body.tema-claro .tela-inicio .inicio-hero-painel,
body.tema-claro .tela-inicio .inicio-indicador{
  background:linear-gradient(145deg,rgba(255,255,255,.72),rgba(226,236,246,.50)) !important;
  border-color:rgba(148,163,184,.25) !important;
  box-shadow:0 14px 34px rgba(15,23,42,.08),inset 0 1px 0 rgba(255,255,255,.92) !important;
}

/* RESPONSIVIDADE GLOBAL — tipografia e proporções */
@media (max-width:900px){
  .conteudo .tela > .painel,
  .conteudo .tela > .card,
  .conteudo .tela > .filtros,
  .conteudo .tela > .relatorio-card{border-radius:14px !important}
  .painel-cabecalho h3{font-size:15px !important}
  .painel-cabecalho p{font-size:10px !important}
  .conteudo table th{font-size:9px !important}
  .conteudo table td{font-size:11px !important}
}
@media (max-width:600px){
  .cabecalho-pagina h1{font-size:23px !important}
  .cabecalho-pagina p{font-size:10px !important}
  .card h2,.relatorio-card strong,.auditoria-resumo-card strong{font-size:18px !important}
  .card span,.relatorio-card > span,.auditoria-resumo-card span{font-size:9px !important}
  .conteudo .btn{min-height:38px !important;font-size:10px !important;padding:9px 11px !important}
  .modal-conteudo{width:min(94vw,760px) !important;max-height:90vh !important}
}

/* =========================================================
   AJUSTE FINAL — RELATÓRIO FINANCEIRO NO PADRÃO VIDRO
   Cards e conteúdos seguem a mesma lógica de contraste do sistema.
   ========================================================= */

/* TEMA ESCURO — vidro escuro + texto branco */
.modal-financeiro{
  background:linear-gradient(145deg,rgba(9,27,46,.94),rgba(6,22,38,.90)) !important;
  color:#ffffff !important;
  border:1px solid rgba(148,163,184,.22) !important;
  box-shadow:0 30px 85px rgba(0,0,0,.48),inset 0 1px 0 rgba(255,255,255,.06) !important;
  backdrop-filter:blur(20px) saturate(125%) !important;
  -webkit-backdrop-filter:blur(20px) saturate(125%) !important;
}

.modal-financeiro .modal-cabecalho{
  border-bottom-color:rgba(255,255,255,.16) !important;
}
.modal-financeiro .modal-cabecalho h2,
.modal-financeiro .modal-cabecalho p,
.modal-financeiro .financeiro-card,
.modal-financeiro .financeiro-painel,
.modal-financeiro .financeiro-custo-comparacao,
.modal-financeiro .tabela-financeiro{
  color:#ffffff !important;
}
.modal-financeiro .modal-cabecalho p,
.modal-financeiro .financeiro-card span,
.modal-financeiro .financeiro-card small,
.modal-financeiro .painel-cabecalho p,
.modal-financeiro .financeiro-custo-comparacao span,
.modal-financeiro .financeiro-vazio{
  color:rgba(255,255,255,.70) !important;
}

.modal-financeiro .financeiro-card,
.modal-financeiro .financeiro-painel,
.modal-financeiro .financeiro-custo-comparacao>div{
  background:linear-gradient(145deg,rgba(255,255,255,.09),rgba(7,25,42,.44)) !important;
  border:1px solid rgba(148,163,184,.20) !important;
  box-shadow:0 12px 28px rgba(0,0,0,.16),inset 0 1px 0 rgba(255,255,255,.045) !important;
  backdrop-filter:blur(14px) saturate(120%) !important;
  -webkit-backdrop-filter:blur(14px) saturate(120%) !important;
}
.modal-financeiro .financeiro-card strong,
.modal-financeiro .financeiro-custo-comparacao strong,
.modal-financeiro .financeiro-barra-topo,
.modal-financeiro .financeiro-barra-topo strong{
  color:#ffffff !important;
}
.modal-financeiro .financeiro-painel .painel-cabecalho h3{
  color:#ffffff !important;
}
.modal-financeiro .financeiro-barra-fundo{
  background:rgba(255,255,255,.13) !important;
  border-color:rgba(255,255,255,.12) !important;
}
.modal-financeiro .financeiro-vazio{
  background:rgba(255,255,255,.06) !important;
  border:1px solid rgba(148,163,184,.16) !important;
}
.modal-financeiro .tabela-financeiro th{
  background:rgba(255,255,255,.10) !important;
  color:rgba(255,255,255,.82) !important;
  border-bottom-color:rgba(255,255,255,.18) !important;
}
.modal-financeiro .tabela-financeiro td{
  background:rgba(255,255,255,.025) !important;
  color:#ffffff !important;
  border-bottom-color:rgba(255,255,255,.10) !important;
}
.modal-financeiro .tabela-financeiro tbody tr:hover td{
  background:rgba(59,130,246,.12) !important;
}

/* TEMA CLARO — vidro claro + texto preto */
body.tema-claro .modal-financeiro{
  background:linear-gradient(145deg,rgba(255,255,255,.88),rgba(226,236,246,.72)) !important;
  color:#000000 !important;
  border-color:rgba(148,163,184,.28) !important;
  box-shadow:0 28px 70px rgba(15,23,42,.18),inset 0 1px 0 rgba(255,255,255,.95) !important;
  backdrop-filter:blur(18px) saturate(120%) !important;
  -webkit-backdrop-filter:blur(18px) saturate(120%) !important;
}
body.tema-claro .modal-financeiro .modal-cabecalho{
  border-bottom-color:rgba(15,23,42,.14) !important;
}
body.tema-claro .modal-financeiro .modal-cabecalho h2,
body.tema-claro .modal-financeiro .financeiro-card,
body.tema-claro .modal-financeiro .financeiro-painel,
body.tema-claro .modal-financeiro .financeiro-custo-comparacao,
body.tema-claro .modal-financeiro .tabela-financeiro{
  color:#000000 !important;
}
body.tema-claro .modal-financeiro .modal-cabecalho p,
body.tema-claro .modal-financeiro .financeiro-card span,
body.tema-claro .modal-financeiro .financeiro-card small,
body.tema-claro .modal-financeiro .painel-cabecalho p,
body.tema-claro .modal-financeiro .financeiro-custo-comparacao span,
body.tema-claro .modal-financeiro .financeiro-vazio{
  color:rgba(0,0,0,.64) !important;
}
body.tema-claro .modal-financeiro .financeiro-card,
body.tema-claro .modal-financeiro .financeiro-painel,
body.tema-claro .modal-financeiro .financeiro-custo-comparacao>div{
  background:linear-gradient(145deg,rgba(255,255,255,.62),rgba(226,236,246,.48)) !important;
  border-color:rgba(148,163,184,.25) !important;
  box-shadow:0 12px 28px rgba(15,23,42,.08),inset 0 1px 0 rgba(255,255,255,.92) !important;
  backdrop-filter:blur(14px) saturate(120%) !important;
  -webkit-backdrop-filter:blur(14px) saturate(120%) !important;
}
body.tema-claro .modal-financeiro .financeiro-card strong,
body.tema-claro .modal-financeiro .financeiro-custo-comparacao strong,
body.tema-claro .modal-financeiro .financeiro-barra-topo,
body.tema-claro .modal-financeiro .financeiro-barra-topo strong,
body.tema-claro .modal-financeiro .financeiro-painel .painel-cabecalho h3{
  color:#000000 !important;
}
body.tema-claro .modal-financeiro .financeiro-barra-fundo{
  background:rgba(15,23,42,.10) !important;
  border-color:rgba(15,23,42,.10) !important;
}
body.tema-claro .modal-financeiro .financeiro-vazio{
  background:rgba(255,255,255,.34) !important;
  border-color:rgba(148,163,184,.20) !important;
}
body.tema-claro .modal-financeiro .tabela-financeiro th{
  background:rgba(15,23,42,.07) !important;
  color:rgba(0,0,0,.78) !important;
  border-bottom-color:rgba(15,23,42,.16) !important;
}
body.tema-claro .modal-financeiro .tabela-financeiro td{
  background:rgba(255,255,255,.22) !important;
  color:#000000 !important;
  border-bottom-color:rgba(15,23,42,.10) !important;
}
body.tema-claro .modal-financeiro .tabela-financeiro tbody tr:hover td{
  background:rgba(37,99,235,.07) !important;
}

/* Proporção dos cards financeiros em telas menores */
@media(max-width:900px){
  .modal-financeiro .financeiro-card strong{font-size:20px !important;}
  .modal-financeiro .financeiro-card{padding:16px !important;}
}
@media(max-width:600px){
  .modal-financeiro .financeiro-cards{grid-template-columns:1fr !important;gap:10px !important;}
  .modal-financeiro .financeiro-card strong{font-size:19px !important;}
  .modal-financeiro .financeiro-card span,
  .modal-financeiro .financeiro-card small{font-size:10px !important;}
  .modal-financeiro .financeiro-painel{padding:14px !important;}
}

/* =========================================================
   ENTRADAS — CUSTO POR NF / HISTÓRICO DE PREÇOS
   ========================================================= */
.campo-custo-entrada .campo-moeda{display:flex;align-items:center;gap:0}
.campo-custo-entrada .campo-moeda span{display:flex;align-items:center;justify-content:center;min-width:42px;height:42px;padding:0 10px;border:1px solid rgba(148,163,184,.28);border-right:0;border-radius:10px 0 0 10px;background:rgba(148,163,184,.10);font-weight:700}
.campo-custo-entrada .campo-moeda input{border-radius:0 10px 10px 0;flex:1;min-width:0}
.painel-resumo-nf-precos{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 14px;padding:12px;border:1px solid rgba(148,163,184,.22);border-radius:14px;background:rgba(148,163,184,.08);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
.painel-resumo-nf-precos>div{min-width:0;padding:11px 13px;border:1px solid rgba(148,163,184,.18);border-radius:11px;background:rgba(255,255,255,.035)}
.painel-resumo-nf-precos span{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.04em;opacity:.68;margin-bottom:5px}
.painel-resumo-nf-precos strong{display:block;font-size:17px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.variacao-preco-alta{color:#ffb4b4!important;font-weight:700}
.variacao-preco-baixa{color:#86efac!important;font-weight:700}
.tabela-historico-nfs-precos{min-width:1080px}
.tabela-historico-nfs-precos th,.tabela-historico-nfs-precos td{white-space:nowrap}
body.tema-claro .painel-resumo-nf-precos{background:rgba(255,255,255,.58);border-color:rgba(15,23,42,.10)}
body.tema-claro .painel-resumo-nf-precos>div{background:rgba(255,255,255,.52);border-color:rgba(15,23,42,.08)}
body.tema-claro .variacao-preco-alta{color:#b42318!important}
body.tema-claro .variacao-preco-baixa{color:#15803d!important}
@media(max-width:900px){.painel-resumo-nf-precos{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.painel-resumo-nf-precos{grid-template-columns:1fr}.campo-custo-entrada .campo-moeda span,.campo-custo-entrada .campo-moeda input{height:40px}}


/* =========================================================
   AJUSTES DE INTERAÇÃO — PROGRESSO, PERFIL E DASHBOARD
   ========================================================= */
.inicio-progresso { margin-top: 16px; width: 100%; }
.inicio-progresso-trilho { height: 9px; width: 100%; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.12); }
.inicio-progresso-trilho span { display:block; width:0; height:100%; border-radius:inherit; background: linear-gradient(90deg,#2585ff,#42d6c5); transition: width .25s ease; box-shadow: 0 0 14px rgba(37,133,255,.4); }
.inicio-progresso-meta { display:flex; justify-content:space-between; gap:12px; margin-top:7px; color:rgba(255,255,255,.76); font-size:11px; }
.inicio-progresso-meta strong { color:#fff; font-variant-numeric:tabular-nums; }
#btnEntrarSistema:disabled, [data-inicio-tela]:disabled { opacity:.45; cursor:not-allowed; filter:grayscale(.45); transform:none; }
.card-interativo { cursor:pointer; transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card-interativo:hover, .card-interativo:focus-visible { transform:translateY(-3px); border-color:rgba(37,99,235,.45); box-shadow:0 8px 22px rgba(0,0,0,.10); outline:none; }
.dashboard-ponto { cursor:pointer; stroke-width:2; transition:r .15s ease,stroke-width .15s ease; }
.dashboard-ponto:hover, .dashboard-ponto:focus { r:7; stroke:#fff; stroke-width:2; outline:none; }
.dashboard-detalhe-movimentacao { margin-top:16px; padding-top:13px; border-top:1px solid var(--borda); min-width:0; }
.dashboard-detalhe-titulo { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:10px; font-size:12px; }
.dashboard-detalhe-titulo span { color:var(--texto-secundario); }
.dashboard-detalhe-tabela { min-width:0; table-layout:fixed; }
.dashboard-detalhe-tabela th:nth-child(1), .dashboard-detalhe-tabela td:nth-child(1) { width:55%; white-space:normal; overflow-wrap:anywhere; }
.dashboard-detalhe-tabela th:nth-child(2), .dashboard-detalhe-tabela td:nth-child(2) { width:27%; text-align:right; }
.dashboard-detalhe-tabela th:nth-child(3), .dashboard-detalhe-tabela td:nth-child(3) { width:18%; text-align:center; }
.perfil-foto-conteudo { max-width:440px; text-align:center; }
.perfil-foto-conteudo .modal-cabecalho { text-align:left; }
.perfil-foto-preview-wrap { width:150px; height:150px; margin:4px auto 14px; border-radius:50%; overflow:hidden; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,#1e40af,#2563eb); color:#fff; font-size:54px; font-weight:700; border:4px solid rgba(37,99,235,.18); }
.perfil-foto-preview-wrap img { width:100%; height:100%; object-fit:cover; display:none; }
.perfil-foto-preview-wrap span { display:flex; align-items:center; justify-content:center; }
.perfil-foto-dados { display:flex; flex-direction:column; gap:4px; margin-bottom:20px; }
.perfil-foto-dados strong { font-size:17px; }
.perfil-foto-dados span,.perfil-foto-dados small { color:var(--texto-secundario); font-size:12px; }
.perfil-foto-acoes { display:grid; grid-template-columns:1fr; gap:9px; }
.perfil-foto-acoes .btn { width:100%; }
#btnAtualizarAuditoria:disabled { opacity:.65; cursor:wait; }
@media (max-width:700px) {
 .dashboard-detalhe-titulo { align-items:flex-start; flex-direction:column; }
 .perfil-foto-conteudo { padding:20px; }
}


/* Detalhe das movimentações: lista compacta, com expansão controlada */
.dashboard-detalhe-movimentacao {
    min-width: 0;
}
.dashboard-detalhe-conteudo {
    max-height: 270px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
    scrollbar-width: thin;
}
.dashboard-detalhe-conteudo.expandido {
    max-height: 320px;
}
.dashboard-detalhe-grupo {
    margin: 8px 0 12px;
}
.dashboard-detalhe-grupo > strong {
    display: block;
    margin: 0 0 7px;
    color: var(--texto-secundario);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.dashboard-detalhe-lista {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.dashboard-detalhe-produto {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--borda);
    border-radius: 7px;
    background: #fff;
    font-size: 12px;
}
.dashboard-detalhe-produto > span {
    min-width: 0;
    overflow-wrap: anywhere;
}
.dashboard-detalhe-produto > strong {
    flex: 0 0 auto;
    color: #374151;
    font-size: 11px;
}
.dashboard-detalhe-produto-oculto {
    display: none;
}
.dashboard-detalhe-mostrar-tudo {
    margin-top: 9px;
    width: 100%;
    justify-content: center;
}
.dashboard-grafico-legenda {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px 14px;
}
.dashboard-grafico-legenda .legenda-entrada.kg { background: #22c55e; }
.dashboard-grafico-legenda .legenda-saida.kg { background: #f59e0b; }
.dashboard-grafico-legenda .legenda-entrada.und { background: #0ea5e9; }
.dashboard-grafico-legenda .legenda-saida.und { background: #a78bfa; }
.dashboard-linha.entrada.und,
.dashboard-linha.saida.und {
    stroke-dasharray: 7 5;
}
.dashboard-linha.entrada.und { stroke: #0ea5e9; }
.dashboard-linha.saida.und { stroke: #a78bfa; }
.dashboard-ponto.entrada.und { fill: #0ea5e9; }
.dashboard-ponto.saida.und { fill: #a78bfa; }
.dashboard-ponto.entrada.kg { fill: #22c55e; }
.dashboard-ponto.saida.kg { fill: #f59e0b; }

@media (max-width: 640px) {
    .dashboard-detalhe-titulo {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
    .dashboard-detalhe-produto {
        align-items: flex-start;
    }
}


/* Dashboard: entradas e saídas em painéis independentes e proporcionais */
#listaEstoqueBaixo, #ultimasMovimentacoes { display:flex !important; flex-direction:column !important; gap:8px !important; min-height:215px; max-height:280px; overflow-y:auto !important; overflow-x:hidden !important; }
#listaEstoqueBaixo .movimentacao-item, #ultimasMovimentacoes .movimentacao-item { flex:0 0 auto; width:100%; box-sizing:border-box; }
.dashboard-grid > .painel { min-width:0; display:flex; flex-direction:column; }
.dashboard-grid > .painel > #listaEstoqueBaixo, .dashboard-grid > .painel > #ultimasMovimentacoes { flex:1; }
.btn-mostrar-todos-minimos { width:100%; margin-top:8px; border:0; border-radius:9px; padding:10px 12px; cursor:pointer; font-weight:700; color:#263244; background:#e7eaf0; }
.relatorio-filtros-produtos { display:grid; grid-template-columns:minmax(220px,1.5fr) minmax(220px,1fr); gap:14px; margin:0 0 16px; align-items:end; }
.relatorio-filtros-produtos .campo { margin:0; }
.relatorio-filtros-produtos input, .relatorio-filtros-produtos select { width:100%; min-height:42px; }
@media(max-width:700px){ .relatorio-filtros-produtos { grid-template-columns:1fr; } }

/* Legenda interativa do gráfico de movimentações: alvos maiores e acessíveis. */
.dashboard-legenda-botao {
    appearance: none;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.055);
    color: inherit;
    border-radius: 999px;
    min-height: 34px;
    padding: 6px 11px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.dashboard-legenda-botao:hover,
.dashboard-legenda-botao:focus-visible {
    background: rgba(59,130,246,.18);
    border-color: rgba(96,165,250,.7);
    outline: none;
    transform: translateY(-1px);
}
.dashboard-legenda-botao i { flex: 0 0 9px; }
.dashboard-ponto-area {
    fill: transparent;
    stroke: transparent;
    cursor: pointer;
    pointer-events: all;
}
.dashboard-ponto-area:focus-visible { stroke: rgba(255,255,255,.8); stroke-width: 2; outline: none; }
body.tema-claro .dashboard-legenda-botao { color: #243247; border-color: rgba(30,41,59,.18); background: rgba(255,255,255,.72); }


/* Ajuste de dimensões dos dois painéis de gráficos do Dashboard.
   Mantém os cards lado a lado e com altura visual uniforme, sem afetar outras tabelas. */
.dashboard-graficos-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
}
.dashboard-graficos-grid > .dashboard-grafico-painel {
    min-width: 0;
    min-height: 414px;
    height: 100%;
    box-sizing: border-box;
}
.dashboard-graficos-grid > .dashboard-grafico-painel #graficoDashboardMinimos,
.dashboard-graficos-grid > .dashboard-grafico-painel #graficoDashboardMovimentacoes {
    min-width: 0;
}
.dashboard-graficos-grid > .dashboard-grafico-painel #graficoDashboardMinimos {
    min-height: 300px;
}
.dashboard-graficos-grid > .dashboard-grafico-painel #graficoDashboardMovimentacoes {
    min-height: 220px;
}
@media (max-width: 900px) {
    .dashboard-graficos-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .dashboard-graficos-grid > .dashboard-grafico-painel {
        min-height: 0;
    }
    .dashboard-graficos-grid > .dashboard-grafico-painel #graficoDashboardMinimos,
    .dashboard-graficos-grid > .dashboard-grafico-painel #graficoDashboardMovimentacoes {
        min-height: 220px;
    }
}


/* v1.0.1 — listas expansíveis com rolagem independente e cards de dimensões iguais */
.dashboard-graficos-grid {
    align-items: stretch;
}
.dashboard-graficos-grid > .dashboard-grafico-painel {
    height: 414px;
    min-height: 414px;
    max-height: 414px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}
.dashboard-graficos-grid > .dashboard-grafico-painel > .painel-cabecalho {
    flex: 0 0 auto;
}
.dashboard-graficos-grid > .dashboard-grafico-painel > #graficoDashboardMinimos {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
.dashboard-donut-layout {
    min-height: 0;
    height: 100%;
    align-items: center;
}
.dashboard-donut-legenda {
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}
.dashboard-donut-itens {
    max-height: 154px;
    overflow: hidden;
    min-height: 0;
    padding-right: 5px;
}
.dashboard-donut-itens.expandida {
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
}
.dashboard-graficos-grid > .dashboard-grafico-painel > #graficoDashboardMovimentacoes {
    flex: 0 0 155px;
    min-height: 155px;
    max-height: 155px;
    overflow: hidden;
}
.dashboard-graficos-grid > .dashboard-grafico-painel > #dashboardDetalheMovimentacao {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.dashboard-detalhe-titulo {
    flex: 0 0 auto;
}
.dashboard-detalhe-conteudo {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 172px;
    overflow: hidden;
}
.dashboard-detalhe-conteudo.expandido {
    max-height: 172px;
    overflow-y: auto;
    overflow-x: hidden;
}
.dashboard-detalhe-mostrar-tudo {
    flex: 0 0 auto;
}
@media (max-width: 900px) {
    .dashboard-graficos-grid > .dashboard-grafico-painel {
        height: auto;
        min-height: 414px;
        max-height: none;
    }
    .dashboard-graficos-grid > .dashboard-grafico-painel > #graficoDashboardMinimos {
        min-height: 300px;
    }
    .dashboard-graficos-grid > .dashboard-grafico-painel > #graficoDashboardMovimentacoes {
        flex-basis: 155px;
        min-height: 155px;
        max-height: 155px;
    }
    .dashboard-graficos-grid > .dashboard-grafico-painel > #dashboardDetalheMovimentacao {
        min-height: 150px;
    }
}


/* v1.0.3 — painel do gráfico independente, gráfico integral e seis produtos visíveis */
.dashboard-graficos-grid > .dashboard-grafico-painel:nth-child(2) {
    height: 650px;
    min-height: 650px;
    max-height: 650px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.dashboard-graficos-grid > .dashboard-grafico-painel:nth-child(2) > .painel-cabecalho {
    flex: 0 0 auto;
}
.dashboard-graficos-grid > .dashboard-grafico-painel:nth-child(2) > #graficoDashboardMovimentacoes {
    flex: 0 0 255px;
    height: 255px;
    min-height: 255px;
    max-height: 255px;
    overflow: visible;
    display: flex;
    flex-direction: column;
}
.dashboard-graficos-grid > .dashboard-grafico-painel:nth-child(2) .dashboard-grafico-legenda {
    flex: 0 0 auto;
    min-height: 34px;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px 10px;
}
.dashboard-graficos-grid > .dashboard-grafico-painel:nth-child(2) .dashboard-linha-svg {
    flex: 1 1 auto;
    width: 100%;
    height: 250px;
    min-height: 250px;
    max-height: none;
    overflow: visible;
}
.dashboard-graficos-grid > .dashboard-grafico-painel:nth-child(2) > #dashboardDetalheMovimentacao {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.dashboard-graficos-grid > .dashboard-grafico-painel:nth-child(2) .dashboard-detalhe-titulo {
    flex: 0 0 auto;
    min-height: 28px;
}
.dashboard-graficos-grid > .dashboard-grafico-painel:nth-child(2) .dashboard-detalhe-conteudo {
    flex: 0 0 auto;
    min-height: 0;
    max-height: 260px;
    overflow: hidden;
    padding-right: 6px;
}
.dashboard-graficos-grid > .dashboard-grafico-painel:nth-child(2) .dashboard-detalhe-conteudo.expandido {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 260px;
    overflow-y: auto;
    overflow-x: hidden;
}
.dashboard-graficos-grid > .dashboard-grafico-painel:nth-child(2) .dashboard-detalhe-produto {
    box-sizing: border-box;
    min-height: 32px;
    padding: 5px 10px;
}
.dashboard-graficos-grid > .dashboard-grafico-painel:nth-child(2) .dashboard-detalhe-mostrar-tudo {
    flex: 0 0 auto;
}
@media (max-width: 900px) {
    .dashboard-graficos-grid > .dashboard-grafico-painel:nth-child(2) {
        height: 650px;
        min-height: 650px;
        max-height: 650px;
    }
    .dashboard-graficos-grid > .dashboard-grafico-painel:nth-child(2) > #graficoDashboardMovimentacoes {
        flex-basis: 255px;
        min-height: 255px;
        max-height: 255px;
    }
}


/* v1.0.4 — correção de visibilidade do botão e limite de seis produtos */
.dashboard-graficos-grid > .dashboard-grafico-painel:nth-child(2) > #dashboardDetalheMovimentacao {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}
.dashboard-graficos-grid > .dashboard-grafico-painel:nth-child(2) #dashboardDetalheMovimentacao .dashboard-detalhe-conteudo {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: 205px !important;
    overflow: hidden !important;
    padding-right: 6px;
}
.dashboard-graficos-grid > .dashboard-grafico-painel:nth-child(2) #dashboardDetalheMovimentacao .dashboard-detalhe-conteudo.expandido {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
}
.dashboard-graficos-grid > .dashboard-grafico-painel:nth-child(2) #dashboardDetalheMovimentacao .dashboard-detalhe-produto-oculto {
    display: none !important;
}
.dashboard-graficos-grid > .dashboard-grafico-painel:nth-child(2) #dashboardDetalheMovimentacao .dashboard-detalhe-mostrar-tudo {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    flex: 0 0 38px !important;
    min-height: 38px !important;
    width: 100% !important;
    margin: 8px 0 0 !important;
    z-index: 2;
}
.dashboard-graficos-grid > .dashboard-grafico-painel:nth-child(2) #dashboardDetalheMovimentacao .dashboard-detalhe-titulo {
    flex: 0 0 auto !important;
}


/* v1.0.7 — listas financeiras com expansão independente e custo por produto */
.financeiro-barras-lista{display:grid;gap:14px;padding-top:4px;min-width:0;}
.financeiro-barras-lista.rolagem-ativa{max-height:310px;overflow-y:auto;overflow-x:hidden;padding-right:8px;overscroll-behavior:contain;}
.financeiro-mostrar-tudo{width:100%;margin-top:12px;min-height:38px;}
.financeiro-custo-seletor{display:grid;gap:7px;margin:12px 0 16px;max-width:100%;}
.financeiro-custo-seletor label{font-size:12px;font-weight:700;color:var(--texto-secundario,#64748b);}
.financeiro-custo-seletor input{width:100%;height:42px;box-sizing:border-box;padding:10px 12px;border:1px solid var(--borda,#cbd5e1);border-radius:9px;background:var(--campo-fundo,#fff);color:var(--texto,#172b3a);font-size:14px;outline:none;}
.financeiro-custo-seletor input:focus{border-color:#2563eb;box-shadow:0 0 0 2px rgba(37,99,235,.14);}
.financeiro-custo-seletor small{font-size:12px;color:var(--texto-secundario,#64748b);}
@media(max-width:600px){.financeiro-barras-lista.rolagem-ativa{max-height:260px;}.financeiro-mostrar-tudo{min-height:42px;}}


/* v1.0.8 — módulo de compras integrado ao histórico de entradas */
#tela-compras{min-width:0}.compras-indicadores{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:18px 0}.compras-indicadores article{padding:17px;border:1px solid rgba(148,163,184,.25);border-radius:14px;background:rgba(17,39,59,.78);display:grid;gap:7px;min-width:0}.compras-indicadores small{color:#b8c6d5;font-size:12px}.compras-indicadores strong{font-size:25px;color:#fff}.compras-indicadores span{font-size:11px;color:#91a4b8}.compras-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:22px 0 12px}.compras-toolbar h2,.compras-secao-historico h2{font-size:18px;margin:0 0 5px}.compras-toolbar p,.compras-secao-historico p{font-size:12px;color:#91a4b8;margin:0}.compras-filtros{display:flex;gap:10px;margin:12px 0}.compras-filtros input,.compras-filtros select{min-width:0;flex:1;padding:11px 13px;border-radius:9px;border:1px solid rgba(148,163,184,.3);background:#102235;color:#eef5ff}.compras-tabela-wrap{overflow:auto;max-width:100%;border-radius:12px}.compras-tabela{min-width:1000px;width:100%}.compras-tabela td small{display:block;color:#8fa5ba;font-size:10px;margin-top:3px}.compras-status{display:inline-flex;padding:5px 8px;border-radius:20px;background:rgba(59,130,246,.16);color:#9bcaff;font-size:11px;white-space:nowrap}.status-alerta{background:rgba(239,68,68,.16);color:#ffaaaa}.compras-status-select{max-width:160px;padding:7px;border-radius:8px;background:#102235;color:#fff;border:1px solid rgba(148,163,184,.3)}.compras-secao-historico{margin-top:24px}.compras-nota{margin-top:18px;padding:14px 16px;border:1px solid rgba(59,130,246,.35);border-radius:12px;background:rgba(37,99,235,.09);color:#cbd9e8;font-size:12px;line-height:1.6}.compras-tabela .btn{padding:7px 10px;font-size:11px;white-space:nowrap}
@media(max-width:900px){.compras-indicadores{grid-template-columns:repeat(2,minmax(0,1fr))}.compras-toolbar{align-items:flex-start;flex-direction:column}.compras-filtros{flex-direction:column}}
@media(max-width:520px){.compras-indicadores{grid-template-columns:1fr 1fr;gap:8px}.compras-indicadores article{padding:12px}.compras-indicadores strong{font-size:20px}}


/* v1.0.9 — editor de permissões por perfil */
.modal-permissoes-perfis { width:min(620px, calc(100vw - 32px)); max-height:88vh; overflow:auto; }
.lista-permissoes-modulos { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:18px 0; }
.permissao-modulo-item { display:flex; align-items:center; gap:10px; padding:12px 14px; border:1px solid rgba(148,163,184,.28); border-radius:10px; background:rgba(148,163,184,.07); cursor:pointer; }
.permissao-modulo-item input { width:17px; height:17px; accent-color:#2563eb; flex:0 0 auto; }
.aviso-permissao-admin { grid-column:1/-1; padding:14px; border-radius:10px; background:rgba(37,99,235,.10); }
@media(max-width:560px){ .lista-permissoes-modulos{grid-template-columns:1fr;} }


/* v1.1.4 — compras com lista compacta, filtros visíveis e relatório por categoria */
#tela-compras .compras-toolbar h2,#tela-compras .compras-secao-historico h2{color:#f3f7ff!important;font-weight:750;}
#tela-compras .compras-toolbar p,#tela-compras .compras-secao-historico p{color:#b8c8d9!important;}
#tela-compras .compras-toolbar,#tela-compras .compras-filtros{position:relative;z-index:1;}
#tela-compras .compras-filtros input,#tela-compras .compras-filtros select{color:#f4f8ff!important;background:#102235!important;border-color:rgba(148,163,184,.42)!important;}
#tela-compras .compras-filtros input::placeholder{color:#aebed0!important;opacity:1;}
#tela-compras .compras-tabela-wrap{max-height:none;overflow-x:auto;overflow-y:visible;}
#tela-compras .compras-tabela-wrap.rolagem-ativa{max-height:430px;overflow-y:auto;overflow-x:auto;overscroll-behavior:contain;scrollbar-gutter:stable;}
#tela-compras .compras-tabela thead th{position:sticky;top:0;z-index:2;background:#3b4655;color:#f4f7fb;}
#tela-compras .compras-tabela tbody td{color:#e5edf7;}
#tela-compras .compras-tabela tbody td b{color:#fff;}
#tela-compras .compras-tabela tbody td small{color:#b5c6d8;}
.compras-mostrar-tudo{width:100%;margin-top:10px;min-height:40px;color:#172b3a;font-weight:700;}
.modal-relatorio-categorias{width:min(1120px,96vw);max-width:1120px;max-height:90vh;overflow:auto;}
.categoria-relatorio-indicadores{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:14px 0;}
.categoria-relatorio-indicadores>div{display:grid;gap:7px;padding:14px 16px;border:1px solid rgba(148,163,184,.25);border-radius:12px;background:rgba(17,39,59,.78);}
.categoria-relatorio-indicadores span{font-size:12px;color:#bdcbd9;}
.categoria-relatorio-indicadores strong{font-size:22px;color:#fff;}
.categoria-relatorio-acoes{display:flex;justify-content:flex-end;gap:9px;margin:12px 0;}
.categoria-relatorio-tabela-wrap{max-width:100%;overflow:auto;border:1px solid rgba(148,163,184,.22);border-radius:10px;}
.categoria-relatorio-tabela{width:100%;min-width:650px;}
.categoria-relatorio-tabela th{position:sticky;top:0;background:#3b4655;color:#fff;z-index:1;}
.categoria-relatorio-tabela td{color:#e6edf6;}
.categoria-relatorio-subtitulo{margin:22px 0 10px;color:#f3f7ff;font-size:15px;}
.categoria-relatorio-detalhe-wrap{max-height:390px;overflow-y:auto;}
@media(max-width:700px){.categoria-relatorio-indicadores{grid-template-columns:1fr;}.categoria-relatorio-acoes{flex-direction:column;}.categoria-relatorio-acoes .btn{width:100%;}}


/* Relatório por produto: 12 linhas na visualização inicial e expansão com rolagem interna. */
#tela-relatorios .relatorio-produtos-container {
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-gutter: stable;
}
#tela-relatorios .relatorio-produtos-container.relatorio-produtos-expandido {
    max-height: 735px;
    overflow-y: auto;
    overscroll-behavior: contain;
}
#tela-relatorios .relatorio-produtos-container.relatorio-produtos-expandido .tabela-relatorio-produtos thead th {
    position: sticky;
    top: 0;
    z-index: 3;
}
#tela-relatorios .relatorio-produtos-container + .btn-mostrar-tudo-tabela {
    margin-top: 10px;
    min-width: 145px;
    justify-content: center;
}

/* Ações seguras no histórico de Compras */
#tela-compras .compras-acoes-pedido{display:flex;align-items:center;gap:7px;min-width:230px;}
#tela-compras .btn-excluir-compra{border:1px solid rgba(248,113,113,.48);border-radius:8px;padding:7px 10px;background:rgba(185,28,28,.16);color:#fecaca;font-size:11px;font-weight:700;cursor:pointer;white-space:nowrap;}
#tela-compras .btn-excluir-compra:hover:not(:disabled){background:rgba(185,28,28,.34);color:#fff;}
#tela-compras .btn-excluir-compra:disabled{opacity:.38;cursor:not-allowed;}
#tela-compras .compras-acoes-pedido{display:flex;align-items:center;gap:7px;min-width:230px;flex-wrap:wrap;}
#tela-compras .btn-excluir-compra,#tela-compras .btn-restaurar-compra{border:1px solid rgba(248,113,113,.48);border-radius:8px;padding:7px 10px;background:rgba(185,28,28,.16);color:#fecaca;font-size:11px;font-weight:700;cursor:pointer;white-space:nowrap;}
#tela-compras .btn-excluir-compra:hover:not(:disabled){background:rgba(185,28,28,.34);color:#fff;}
#tela-compras .btn-excluir-compra:disabled{opacity:.38;cursor:not-allowed;}
#tela-compras .btn-restaurar-compra{border-color:rgba(34,197,94,.45);background:rgba(22,163,74,.14);color:#bbf7d0;}
#tela-compras .compras-exclusao-info{display:block;color:#fca5a5;font-size:10px;}
#tela-compras tr.compra-excluida{opacity:.72;}

/* Relatório gerencial do módulo Compras — v1.1.9 */
#tela-compras .compras-relatorio{margin-top:28px;padding:20px;border:1px solid rgba(148,163,184,.28);border-radius:16px;background:linear-gradient(145deg,rgba(17,39,59,.94),rgba(10,25,41,.96));}
#tela-compras .compras-relatorio-cabecalho{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap;margin-bottom:16px;}
#tela-compras .compras-relatorio-cabecalho h2{margin:0 0 6px;color:#f4f8ff;font-size:19px;}
#tela-compras .compras-relatorio-cabecalho p,#tela-compras .compras-relatorio-legenda{margin:0;color:#aebed0;font-size:12px;line-height:1.5;}
#tela-compras .compras-relatorio-acoes{display:flex;gap:8px;flex-wrap:wrap;}
#tela-compras .compras-relatorio-filtros{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:14px 0 18px;}
#tela-compras .compras-relatorio-filtros label{display:grid;gap:6px;color:#c8d5e3;font-size:11px;font-weight:700;}
#tela-compras .compras-relatorio-filtros input,#tela-compras .compras-relatorio-filtros select{width:100%;min-width:0;padding:10px 12px;border:1px solid rgba(148,163,184,.35);border-radius:9px;background:#102235;color:#f4f8ff;color-scheme:dark;}
#tela-compras .compras-relatorio-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:16px 0;}
#tela-compras .compras-relatorio-kpis article{display:grid;gap:7px;padding:15px;border:1px solid rgba(148,163,184,.25);border-radius:12px;background:rgba(30,55,78,.7);min-width:0;}
#tela-compras .compras-relatorio-kpis small{color:#b8c6d5;font-size:11px;}
#tela-compras .compras-relatorio-kpis strong{color:#fff;font-size:21px;overflow-wrap:anywhere;}
#tela-compras .compras-relatorio-kpis span{color:#91a4b8;font-size:10px;}
#tela-compras .compras-relatorio-unidades{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin-top:2px;}
#tela-compras .compras-relatorio-unidades span{display:block;padding:5px 6px;border-radius:6px;background:rgba(15,31,46,.55);color:#c5d5e5;font-size:10px;white-space:nowrap;text-align:center;}
@media(max-width:560px){#tela-compras .compras-relatorio-unidades{grid-template-columns:1fr;gap:3px;}#tela-compras .compras-relatorio-unidades span{text-align:left;}}
#tela-compras .compras-relatorio-grade{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:16px 0;}
#tela-compras .compras-relatorio-bloco{min-width:0;margin-top:14px;}
#tela-compras .compras-relatorio-bloco h3{margin:0 0 10px;color:#edf4fc;font-size:14px;}
#tela-compras .compras-relatorio-bloco .tabela-container{max-height:340px;overflow:auto;border:1px solid rgba(148,163,184,.18);border-radius:10px;}
#tela-compras .compras-relatorio-bloco .compras-tabela{min-width:650px;}
#tela-compras .compras-relatorio-bloco .compras-tabela th{position:sticky;top:0;z-index:1;}
#tela-compras .compras-relatorio-bloco .compras-tabela td{color:#e5edf7;}
#tela-compras .compras-relatorio-bloco .compras-tabela td small{display:block;color:#aebed0;font-size:10px;margin-top:3px;}
@media(max-width:900px){#tela-compras .compras-relatorio-kpis{grid-template-columns:repeat(2,minmax(0,1fr));}#tela-compras .compras-relatorio-grade{grid-template-columns:1fr;}}
@media(max-width:560px){#tela-compras .compras-relatorio{padding:13px;}#tela-compras .compras-relatorio-filtros{grid-template-columns:1fr;}#tela-compras .compras-relatorio-kpis{gap:8px;}#tela-compras .compras-relatorio-kpis article{padding:11px;}#tela-compras .compras-relatorio-kpis strong{font-size:17px;}#tela-compras .compras-relatorio-acoes{width:100%;}#tela-compras .compras-relatorio-acoes .btn{flex:1;}}

/* Cadastro de setores diretamente no campo de saída */
.novo-setor-controles{display:flex;gap:8px;margin-top:8px;align-items:center;flex-wrap:wrap}
.novo-setor-controles input{flex:1;min-width:180px;max-width:100%;}
.btn-adicionar-setor{white-space:nowrap;min-height:40px}
@media(max-width:600px){.novo-setor-controles{flex-direction:column;align-items:stretch}.novo-setor-controles input,.novo-setor-controles button{width:100%;max-width:none}}

/* Assistente conversacional: entrada por texto e saudação contextual discreta */
.assistente-chat-form{display:flex;gap:8px;margin-top:14px}
.assistente-chat-form input{min-width:0;flex:1;border:1px solid rgba(148,163,184,.35);border-radius:11px;padding:12px 13px;background:rgba(255,255,255,.08);color:inherit;font:inherit;font-size:13px;outline:none}
.assistente-chat-form input::placeholder{color:rgba(255,255,255,.48)}
.assistente-chat-form input:focus{border-color:#60a5fa;box-shadow:0 0 0 3px rgba(96,165,250,.15)}
.assistente-chat-form button{border:0;border-radius:11px;padding:0 17px;background:#2563eb;color:#fff;font-weight:800;cursor:pointer}
.tema-claro .assistente-chat-form input{background:#f8fafc;color:#172b3a;border-color:#cbd5e1}
.tema-claro .assistente-chat-form input::placeholder{color:#64748b}
.assistente-boas-vindas{position:fixed;right:24px;bottom:84px;z-index:99989;display:flex;align-items:center;gap:10px;max-width:min(460px,calc(100vw - 32px));padding:12px 14px;border:1px solid rgba(96,165,250,.25);border-radius:14px;background:#10263d;color:#f8fafc;box-shadow:0 16px 40px rgba(15,23,42,.25);font-size:12px;line-height:1.45;opacity:0;transform:translateY(8px);transition:.22s ease}
.assistente-boas-vindas.visivel{opacity:1;transform:translateY(0)}
.assistente-boas-vindas button{border:0;border-radius:8px;padding:8px 10px;background:#2563eb;color:#fff;font-weight:800;cursor:pointer;white-space:nowrap}
.assistente-boas-vindas button:last-child{background:transparent;color:#cbd5e1;padding:4px 6px;font-size:18px}
@media(max-width:600px){.assistente-boas-vindas{right:12px;bottom:72px;left:12px;max-width:none;gap:7px}.assistente-chat-form button{padding:0 12px}}

/* =========================================================
   FORNECEDORES 2.0 — PAINEL ESTRATÉGICO
   ========================================================= */
#tela-fornecedores{padding-bottom:34px}
.forn2-cabecalho{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 22px}
.forn2-cabecalho h1{margin:4px 0 5px;font-size:clamp(25px,3vw,34px);font-weight:800;letter-spacing:-.7px}
.forn2-cabecalho p,.forn2-painel-titulo p{margin:0;color:var(--texto-secundario,#a9b8c9);font-size:13px}
.forn2-eyebrow{font-size:10px;font-weight:800;letter-spacing:1.8px;color:#49a5ff}
.forn2-acoes{display:flex;gap:8px;flex-wrap:wrap}
.forn2-filtros{display:grid;grid-template-columns:repeat(4,minmax(140px,1fr));gap:12px;padding:15px;background:rgba(17,34,52,.72);border:1px solid rgba(116,157,197,.2);border-radius:14px;margin-bottom:16px}
.forn2-filtros label{display:flex;flex-direction:column;gap:7px;font-size:11px;font-weight:700;color:#aebed0}
.forn2-filtros input,.forn2-filtros select{width:100%;min-height:39px;border:1px solid rgba(138,168,199,.28);border-radius:9px;background:#0d1c2b;color:#edf5ff;padding:8px 10px;font:inherit;font-size:12px;outline:none}
.forn2-filtros input:focus,.forn2-filtros select:focus{border-color:#2387ff;box-shadow:0 0 0 2px rgba(35,135,255,.13)}
.forn2-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}
.forn2-kpis article{min-width:0;padding:17px 18px;border-radius:14px;background:linear-gradient(145deg,rgba(29,53,76,.96),rgba(17,34,52,.96));border:1px solid rgba(119,161,201,.23);box-shadow:0 8px 24px rgba(0,0,0,.12)}
.forn2-kpis article span{display:block;color:#bdcbd9;font-size:11px;font-weight:600;margin-bottom:9px}
.forn2-kpis article strong{display:block;color:#f4f8ff;font-size:clamp(19px,2.1vw,26px);line-height:1.2;overflow-wrap:anywhere}
.forn2-kpis article small{display:block;margin-top:8px;color:#91a5ba;font-size:10px;line-height:1.4}
.forn2-grade-principal,.forn2-grade-secundaria{display:grid;grid-template-columns:1.2fr 1fr;gap:14px;margin-bottom:14px}
.forn2-grade-secundaria{grid-template-columns:1.15fr 1fr}
.forn2-painel{min-width:0;padding:17px;border:1px solid rgba(119,161,201,.22);border-radius:15px;background:linear-gradient(145deg,rgba(18,34,51,.98),rgba(12,26,41,.98));box-shadow:0 8px 24px rgba(0,0,0,.1)}
.forn2-painel-titulo{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:17px}
.forn2-painel-titulo h2{font-size:15px;margin:0 0 5px;color:#f0f5fb;font-weight:750}
.forn2-painel-titulo p{font-size:11px}
.forn2-tag{padding:5px 9px;border-radius:7px;background:rgba(31,119,237,.16);color:#65b0ff;font-size:10px;font-weight:800}
.forn2-grafico-colunas{height:220px;display:flex;align-items:flex-end;gap:clamp(8px,2vw,20px);padding:14px 8px 0;border-bottom:1px solid rgba(154,180,207,.2);background:repeating-linear-gradient(to bottom,transparent 0,transparent 48px,rgba(145,171,198,.09) 49px,transparent 50px)}
.forn2-coluna-item{height:100%;flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:7px}
.forn2-coluna-item>span{font-size:10px;color:#aebed0;padding-bottom:7px}
.forn2-coluna-valor{font-size:9px;color:#a9bfd5;white-space:nowrap}
.forn2-coluna{width:min(48px,75%);min-height:4px;border-radius:6px 6px 0 0;background:linear-gradient(180deg,#36a0ff,#1261d6);box-shadow:0 0 16px rgba(30,126,242,.16);transition:height .25s}
.forn2-barras-lista{display:flex;flex-direction:column;gap:15px;padding:5px 0}
.forn2-barra-linha>div:first-child{display:flex;justify-content:space-between;gap:12px;margin-bottom:7px}
.forn2-barra-linha strong{font-size:11px;color:#e2ebf5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:58%}
.forn2-barra-linha span{font-size:10px;color:#9fb2c6;white-space:nowrap}
.forn2-barra-trilho{height:8px;background:rgba(139,166,194,.14);border-radius:20px;overflow:hidden}
.forn2-barra-trilho i{display:block;height:100%;border-radius:20px;background:linear-gradient(90deg,#1469db,#40a8ff)}
.forn2-tabela{width:100%;min-width:520px;border-collapse:collapse}
.forn2-tabela th{font-size:10px;white-space:nowrap}
.forn2-tabela td{font-size:11px;vertical-align:middle}
.forn2-tabela td small{display:block;color:#8fa5bb;font-size:9px;margin-top:3px}
.forn2-historico-precos{margin-bottom:14px}
.forn2-historico-precos .tabela-container{max-height:390px;overflow:auto}
.forn2-vazio{color:#8fa5bb;font-size:12px;text-align:center;width:100%;align-self:center}
.forn2-rodape-info{padding:11px 14px;border-radius:9px;background:rgba(23,54,82,.42);border:1px solid rgba(110,155,197,.16);color:#9db1c5;font-size:10px;line-height:1.5}
@media(max-width:1100px){.forn2-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.forn2-grade-principal,.forn2-grade-secundaria{grid-template-columns:1fr}}
@media(max-width:700px){.forn2-cabecalho{align-items:flex-start;flex-direction:column}.forn2-acoes{width:100%}.forn2-acoes button{flex:1}.forn2-filtros{grid-template-columns:repeat(2,minmax(0,1fr));padding:11px}.forn2-kpis{gap:8px}.forn2-kpis article{padding:13px}.forn2-kpis article strong{font-size:19px}.forn2-painel{padding:13px}.forn2-grafico-colunas{height:185px;gap:5px}.forn2-coluna-valor{font-size:8px}}
body.tema-claro .forn2-filtros,body.tema-claro .forn2-painel{background:#fff;border-color:#dce5ef;box-shadow:0 5px 18px rgba(30,55,80,.06)}
body.tema-claro .forn2-filtros label,body.tema-claro .forn2-painel-titulo h2,body.tema-claro .forn2-kpis article strong,body.tema-claro .forn2-barra-linha strong{color:#1d3147}
body.tema-claro .forn2-filtros input,body.tema-claro .forn2-filtros select{background:#f6f9fc;color:#1d3147;border-color:#d5e0eb}
body.tema-claro .forn2-kpis article{background:linear-gradient(145deg,#fff,#f3f7fb);border-color:#dce5ef}
body.tema-claro .forn2-kpis article span,body.tema-claro .forn2-painel-titulo p,body.tema-claro .forn2-kpis article small{color:#63788e}
body.tema-claro .forn2-barra-trilho{background:#e7edf4}
body.tema-claro .forn2-rodape-info{background:#f2f7fc;color:#526b84;border-color:#dce7f1}

/* =========================================================
   FORNECEDORES 2.0 — VIDRO + GRÁFICO DE PRODUTOS + TABELAS FIXAS
   ========================================================= */
#tela-fornecedores .forn2-filtros,
#tela-fornecedores .forn2-kpis article,
#tela-fornecedores .forn2-painel,
#tela-fornecedores .forn2-rodape-info {
    background: linear-gradient(135deg, rgba(255,255,255,.115), rgba(255,255,255,.045)) !important;
    border: 1px solid rgba(255,255,255,.19) !important;
    box-shadow: 0 10px 28px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.08) !important;
    backdrop-filter: blur(18px) saturate(145%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(145%) !important;
}
#tela-fornecedores .forn2-filtros input,
#tela-fornecedores .forn2-filtros select {
    background: rgba(5,19,34,.48) !important;
    border-color: rgba(190,218,245,.25) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
#tela-fornecedores .forn2-grafico-produtos {
    height: 260px;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 13px;
    padding: 8px 8px 8px 2px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid rgba(190,218,245,.10);
    border-radius: 10px;
    background: rgba(4,17,31,.17);
}
#tela-fornecedores .forn2-produto-grafico { min-width:0; flex:0 0 auto; }
#tela-fornecedores .forn2-produto-grafico-info { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:6px; }
#tela-fornecedores .forn2-produto-grafico-info strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#eaf3fc; font-size:11px; }
#tela-fornecedores .forn2-produto-grafico-info span { flex:0 0 auto; color:#b7cbe0; font-size:10px; font-weight:700; }
#tela-fornecedores .forn2-produto-grafico-trilho { height:9px; overflow:hidden; border-radius:20px; background:rgba(172,202,232,.15); }
#tela-fornecedores .forn2-produto-grafico-trilho i { display:block; height:100%; min-width:2px; border-radius:20px; background:linear-gradient(90deg,#1475e8,#56b6ff); box-shadow:0 0 14px rgba(48,150,255,.28); }
#tela-fornecedores .forn2-tabela-scroll { max-height:306px; overflow-y:auto; overflow-x:auto; border-radius:10px; scrollbar-width:thin; scrollbar-color:rgba(105,169,224,.55) rgba(255,255,255,.05); }
#tela-fornecedores .forn2-tabela-scroll .tabela-container { overflow:visible !important; max-height:none !important; }
#tela-fornecedores .forn2-tabela-scroll:not(.expandido) tbody tr:nth-child(n+7) { display:none; }
#tela-fornecedores .forn2-tabela-scroll.expandido { max-height:306px; overflow-y:auto; }
#tela-fornecedores .forn2-tabela thead { position:sticky; top:0; z-index:2; background:rgba(25,48,70,.94) !important; backdrop-filter:blur(12px); }
#tela-fornecedores .forn2-mostrar-tudo { display:block; width:100%; margin-top:9px; padding:8px 12px; border:1px solid rgba(125,184,235,.28); border-radius:9px; color:#a9d4ff; background:rgba(28,104,177,.17); font-size:11px; font-weight:750; cursor:pointer; transition:background .2s,border-color .2s; }
#tela-fornecedores .forn2-mostrar-tudo:hover { background:rgba(35,126,211,.29); border-color:rgba(125,184,235,.5); }
#tela-fornecedores .forn2-mostrar-tudo[hidden] { display:none !important; }
#tela-fornecedores .forn2-tabela-scroll::-webkit-scrollbar,
#tela-fornecedores .forn2-grafico-produtos::-webkit-scrollbar { width:7px; height:7px; }
#tela-fornecedores .forn2-tabela-scroll::-webkit-scrollbar-thumb,
#tela-fornecedores .forn2-grafico-produtos::-webkit-scrollbar-thumb { background:rgba(105,169,224,.48); border-radius:10px; }
body.tema-claro #tela-fornecedores .forn2-filtros,
body.tema-claro #tela-fornecedores .forn2-kpis article,
body.tema-claro #tela-fornecedores .forn2-painel,
body.tema-claro #tela-fornecedores .forn2-rodape-info { background:rgba(255,255,255,.68) !important; border-color:rgba(255,255,255,.82) !important; backdrop-filter:blur(18px) saturate(140%) !important; }
body.tema-claro #tela-fornecedores .forn2-produto-grafico-info strong { color:#1d3147; }
body.tema-claro #tela-fornecedores .forn2-produto-grafico-info span { color:#526b84; }
body.tema-claro #tela-fornecedores .forn2-tabela thead { background:rgba(239,246,253,.94) !important; }

/* v1.3.0 — filtros textuais das movimentações */
.campo-filtro-busca-movimentacao {
    min-width: min(250px, 100%);
}
.campo-filtro-busca-movimentacao input[type="search"] {
    width: 100%;
    min-height: 42px;
}
@media (max-width: 760px) {
    .campo-filtro-busca-movimentacao {
        width: 100%;
        min-width: 100%;
    }
}

/* =========================================================
   v1.3.4 — ROLAGEM DO MENU LATERAL
   Mantém cabeçalho e rodapé fixos e libera rolagem apenas
   na lista de módulos, em telas grandes e pequenas.
   ========================================================= */
.sidebar {
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}
.sidebar .logo { flex: 0 0 auto !important; }
.sidebar .menu {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior-y: contain !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(148,163,184,.55) rgba(255,255,255,.04);
}
.sidebar .menu::-webkit-scrollbar { width: 7px; }
.sidebar .menu::-webkit-scrollbar-track {
    background: rgba(255,255,255,.035);
    border-radius: 10px;
}
.sidebar .menu::-webkit-scrollbar-thumb {
    background: rgba(148,163,184,.48);
    border-radius: 10px;
}
.sidebar .menu::-webkit-scrollbar-thumb:hover {
    background: rgba(148,163,184,.75);
}
.sidebar .menu-item { flex: 0 0 auto !important; }
.sidebar .sidebar-footer { flex: 0 0 auto !important; }

/* v1.3.5 — exportação de produtos */
.btn-exportar-produtos {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    font-weight: 700;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}
.btn-exportar-excel {
    background: #167447;
    border: 1px solid #21885a;
    color: #fff;
}
.btn-exportar-excel:hover { background: #12613b; }
.btn-exportar-pdf {
    background: #a83232;
    border: 1px solid #c34848;
    color: #fff;
}
.btn-exportar-pdf:hover { background: #872626; }
@media (max-width: 900px) {
    .btn-exportar-produtos { flex: 1 1 110px; }
}

/* v1.3.6 — menu suspenso de exportação */
.dropdown-exportar-produtos {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
}
.btn-exportar-principal {
    min-width: 105px;
    background: #167447;
    border: 1px solid #21885a;
    color: #fff;
}
.btn-exportar-principal:hover { background: #12613b; }
.opcoes-exportacao-produtos {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1000;
    min-width: 160px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #101e2d;
    border: 1px solid rgba(148,163,184,.35);
    border-radius: 11px;
    box-shadow: 0 12px 30px rgba(0,0,0,.38);
}
.opcoes-exportacao-produtos[hidden] { display: none !important; }
.opcao-exportacao-produtos {
    width: 100%;
    min-height: 38px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 0;
    border-radius: 7px;
    color: #f8fafc;
    background: transparent;
    text-align: left;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
}
.opcao-exportacao-produtos:hover { background: rgba(148,163,184,.16); }
.opcao-excel span { color: #43c783; }
.opcao-pdf span { color: #ff7777; }

/* v1.3.7 — seleção de formato em subjanela modal */
.modal-exportacao-produtos {
    z-index: 20000 !important;
    background: rgba(2, 8, 18, .78) !important;
    backdrop-filter: blur(5px);
}
.modal-exportacao-produtos-conteudo {
    width: min(440px, 100%);
    max-width: 440px;
    max-height: min(90vh, 520px);
    overflow: visible;
    padding: 24px;
    color: #f8fafc;
    background: linear-gradient(145deg, #142538, #0b1725);
    border: 1px solid rgba(148,163,184,.35);
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(0,0,0,.55);
}
.modal-exportacao-produtos-conteudo .modal-cabecalho {
    margin-bottom: 20px;
    align-items: flex-start;
}
.modal-exportacao-produtos-conteudo .modal-cabecalho h2 {
    margin: 0 0 6px;
    color: #f8fafc;
    font-size: 20px;
}
.modal-exportacao-produtos-conteudo .modal-cabecalho p {
    margin: 0;
    color: #b8c5d4;
    font-size: 13px;
}
.opcoes-exportacao-modal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.opcoes-exportacao-modal .opcao-exportacao-produtos {
    min-height: 112px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    border: 1px solid rgba(148,163,184,.28);
    border-radius: 12px;
    background: rgba(255,255,255,.06);
    color: #f8fafc;
    text-align: left;
    cursor: pointer;
}
.opcoes-exportacao-modal .opcao-exportacao-produtos:hover {
    background: rgba(255,255,255,.12);
    border-color: rgba(96,165,250,.7);
    transform: translateY(-1px);
}
.opcoes-exportacao-modal .opcao-exportacao-produtos > span:first-child {
    font-size: 28px;
}
.opcoes-exportacao-modal .opcao-excel > span:first-child { color: #43c783; }
.opcoes-exportacao-modal .opcao-pdf > span:first-child { color: #ff7777; }
.opcoes-exportacao-modal strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}
.opcoes-exportacao-modal small {
    display: block;
    color: #b8c5d4;
    font-size: 11px;
    line-height: 1.35;
}
@media (max-width: 480px) {
    .opcoes-exportacao-modal { grid-template-columns: 1fr; }
    .opcoes-exportacao-modal .opcao-exportacao-produtos { min-height: 76px; }
}

/* v1.3.8 — ajuste exclusivo para mobile do botão Baixar em Produtos.
   Impede que flex-grow:1 aumente a altura do botão quando .filtros
   passa a usar direção column em telas estreitas. Desktop permanece igual. */
@media (max-width: 600px) {
    #tela-produtos #btnAbrirExportacaoProdutos {
        flex: 0 0 auto !important;
        align-self: stretch !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 72px !important;
        height: 72px !important;
        max-height: 72px !important;
        padding: 12px 16px !important;
        box-sizing: border-box !important;
        line-height: 1.2 !important;
    }
}

/* v1.3.9 — ação de exportação individual dos pedidos de compra */
#tela-compras .btn-baixar-pedido-compra {
    border: 1px solid rgba(96,165,250,.45);
    border-radius: 8px;
    padding: 7px 10px;
    background: rgba(37,99,235,.18);
    color: #bfdbfe;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
#tela-compras .btn-baixar-pedido-compra:hover {
    background: rgba(37,99,235,.38);
    color: #fff;
}

/* v1.3.12 — exportação agrupada de pedidos por fornecedor */
.compras-exportar-fornecedor {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0;
    padding: 14px;
    border: 1px solid rgba(148,163,184,.22);
    border-radius: 12px;
    background: rgba(15,23,42,.28);
}
.compras-exportar-fornecedor label {
    display: block;
    flex: 1 1 100%;
    color: var(--texto-secundario, #aebdce);
    font-size: 12px;
    font-weight: 700;
}
.compras-exportar-fornecedor select {
    flex: 1 1 240px;
    min-width: 0;
}
.compras-exportar-fornecedor button {
    flex: 0 0 auto;
}
@media (max-width: 600px) {
    .compras-exportar-fornecedor { align-items: stretch; }
    .compras-exportar-fornecedor select,
    .compras-exportar-fornecedor button { width: 100%; min-height: 46px; }
}


/* v1.3.13 — refinamento visual da tabela de solicitações de compra */
#tela-compras .compras-secao-historico .compras-tabela-wrap {
    border: 1px solid rgba(148, 163, 184, .22);
    background: rgba(8, 20, 33, .42);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}
#tela-compras .compras-secao-historico .compras-tabela {
    width: 100%;
    min-width: 1120px;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
}
#tela-compras .compras-secao-historico .compras-tabela thead th {
    padding: 13px 12px;
    font-size: 10px;
    line-height: 1.25;
    letter-spacing: .035em;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: middle;
}
#tela-compras .compras-secao-historico .compras-tabela tbody td {
    padding: 12px;
    height: 62px;
    font-size: 12px;
    line-height: 1.4;
    vertical-align: middle;
    white-space: nowrap;
}
#tela-compras .compras-secao-historico .compras-tabela tbody tr {
    transition: background .16s ease;
}
#tela-compras .compras-secao-historico .compras-tabela tbody tr:hover {
    background: rgba(96, 165, 250, .075);
}
#tela-compras .compras-secao-historico .compras-tabela tbody td:nth-child(1) b {
    display: inline-block;
    min-width: 94px;
    font-size: 11px;
    letter-spacing: .01em;
}
#tela-compras .compras-secao-historico .compras-tabela tbody td:nth-child(2) {
    min-width: 170px;
    white-space: normal;
    font-weight: 600;
}
#tela-compras .compras-secao-historico .compras-tabela tbody td:nth-child(2) small {
    margin-top: 4px;
    font-weight: 500;
}
#tela-compras .compras-secao-historico .compras-tabela tbody td:nth-child(3) {
    min-width: 125px;
}
#tela-compras .compras-secao-historico .compras-tabela tbody td:nth-child(4),
#tela-compras .compras-secao-historico .compras-tabela tbody td:nth-child(5),
#tela-compras .compras-secao-historico .compras-tabela tbody td:nth-child(6) {
    text-align: center;
    min-width: 92px;
    font-variant-numeric: tabular-nums;
}
#tela-compras .compras-secao-historico .compras-tabela tbody td:nth-child(7),
#tela-compras .compras-secao-historico .compras-tabela tbody td:nth-child(8) {
    text-align: center;
}
#tela-compras .compras-secao-historico .compras-tabela .compras-acoes-pedido {
    min-width: 230px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 7px;
    white-space: nowrap;
}
#tela-compras .compras-secao-historico .compras-acoes-pedido .btn,
#tela-compras .compras-secao-historico .compras-acoes-pedido button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    margin: 0;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 10px;
    line-height: 1;
    white-space: nowrap;
}
#tela-compras .compras-secao-historico .compras-acoes-pedido .compras-status-select {
    width: 142px;
    min-width: 142px;
    max-width: 142px;
    min-height: 34px;
    padding: 6px 8px;
    font-size: 10px;
}
#tela-compras .compras-secao-historico .compras-acoes-pedido .btn-excluir-compra {
    min-width: 58px;
}
#tela-compras .compras-secao-historico .compras-acoes-pedido .compras-exclusao-info {
    max-width: 125px;
    white-space: normal;
}
@media (max-width: 900px) {
    #tela-compras .compras-secao-historico .compras-tabela {
        min-width: 1080px;
    }
}


/* Dashboard: área reservada para os rótulos de data no eixo inferior. */
.dashboard-graficos-grid > .dashboard-grafico-painel:nth-child(2) .dashboard-linhas-grafico {
    min-width: 0;
    padding: 4px 8px 12px;
    overflow: visible;
}
.dashboard-graficos-grid > .dashboard-grafico-painel:nth-child(2) .dashboard-linha-svg {
    box-sizing: border-box;
    overflow: visible;
}
@media (max-width: 520px) {
    .dashboard-graficos-grid > .dashboard-grafico-painel:nth-child(2) .dashboard-linha-svg {
        height: 225px;
        min-height: 225px;
    }
    .dashboard-eixo-texto { font-size: 11px; }
}


/* IDENTIFICAÇÃO PERMANENTE DO AMBIENTE ACADÊMICO */
.faixa-demonstracao{position:sticky;top:0;z-index:99999;width:100%;box-sizing:border-box;padding:8px 14px;text-align:center;background:#8b3d12;color:#fff;font:800 11px/1.35 Arial,sans-serif;letter-spacing:.09em;box-shadow:0 2px 10px rgba(0,0,0,.18)}
body{padding-top:0!important}


/* AJUSTE v1.3.29-DEMO — grade padrão do dashboard: três painéis alinhados */
#tela-dashboard .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 18px;
}
#tela-dashboard .dashboard-grid > .painel {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0;
}
#tela-dashboard .dashboard-grid > .painel .lista-dashboard {
    min-width: 0;
}
#tela-dashboard .dashboard-graficos-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 18px;
}
#tela-dashboard .dashboard-graficos-grid > .painel {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}
@media (max-width: 1100px) {
    #tela-dashboard .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    #tela-dashboard .dashboard-grid,
    #tela-dashboard .dashboard-graficos-grid { grid-template-columns: minmax(0, 1fr); }
}


/* v1.3.30-DEMO — estrutura do dashboard alinhada à referência fornecida */
#tela-dashboard .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 18px;
    margin-bottom: 18px;
}
#tela-dashboard .dashboard-grid > .painel {
    min-width: 0;
    width: 100%;
    min-height: 390px;
    box-sizing: border-box;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}
#tela-dashboard .dashboard-grid > .painel .lista-dashboard {
    flex: 1;
    min-width: 0;
    max-height: 345px;
    overflow-y: auto;
}
#tela-dashboard .dashboard-graficos-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 18px;
    margin-top: 18px;
    margin-bottom: 18px;
}
#tela-dashboard .dashboard-graficos-grid > .dashboard-grafico-painel {
    min-width: 0;
    min-height: 414px;
    height: 100%;
    box-sizing: border-box;
    margin-bottom: 0;
}
#tela-dashboard .dashboard-lista-legada { display: none !important; }
@media (max-width: 900px) {
    #tela-dashboard .dashboard-grid,
    #tela-dashboard .dashboard-graficos-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    #tela-dashboard .dashboard-grid > .painel,
    #tela-dashboard .dashboard-graficos-grid > .dashboard-grafico-painel {
        min-height: 0;
    }
}
