/*
 * Ajustes do SistCon sobre o tema Velonic (carregado depois do app-tema.min.css).
 *
 * Densidade de ERP (responsável, 18/11/2026: "espaço conta muito num ERP; é produtividade"):
 * tabelas com menos espaçamento e fonte um pouco menor, para caber mais linhas na tela;
 * título da página mais baixo. Vale para todas as telas (listagens do SistList, itens do pedido etc.).
 */

/* tabelas: o tema usa .95rem de padding em cada célula */
.table { font-size: .8125rem; }
.table > :not(caption) > * > * { padding: .3rem .5rem; line-height: 1.3; }
.table-sm > :not(caption) > * > * { padding: .2rem .4rem; }
.table > thead th { white-space: nowrap; font-weight: 600; vertical-align: bottom; }
/* conteúdo de cada linha no meio, na vertical (o botão Ações é o mais alto e o resto subia para o topo) */
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th { vertical-align: middle; }
.table .form-switch { margin-bottom: 0; min-height: 0; }
.table .btn-sm, .table .btn-group-sm > .btn { padding: .1rem .45rem; font-size: .75rem; line-height: 1.3; }
.table .badge { font-size: .7rem; }
.table .form-check-input { margin-top: .15em; }

/* título da página: o tema usa 75px de altura */
.page-title-box .page-title { line-height: 46px; font-size: 16px; }
.page-title-box .page-title-right { margin-top: 10px; }

/* cards um pouco mais justos */
.card { margin-bottom: 1rem; }

/* todas as grids: a linha entre o título (thead) e o conteúdo é mais grossa e na cor principal da identidade visual (responsável, 18/11/2026) */
.table > thead > tr:last-child > * { border-bottom: 2px solid var(--tz-primary); }
/* grid com resumo/somatório embaixo (tfoot): a linha da cor principal separa o conteúdo do somatório; abaixo dele, sem linha (responsável, 19/11/2026) */
.table > tfoot > tr:first-child > * { border-top: 2px solid var(--tz-primary); }
.table > tfoot > tr:last-child > * { border-bottom: 0; }

/* paginador das listagens mais compacto: texto "Exibindo..." e botões das páginas menores (responsável, 18/11/2026) */
.dataTables_info { font-size: .875rem; font-weight: 500; }
.pagination { --tz-pagination-padding-x: .65rem; --tz-pagination-padding-y: .25rem; --tz-pagination-font-size: .875rem; }
.pagination-rounded .page-link { margin: 0 2px !important; min-width: 30px; text-align: center; }

/* etiqueta redonda da modalidade (listagem de pedidos; legado: "A" roxo, "V" verde/laranja) */
.etiqueta-modalidade { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 10px; color: #fff; font-weight: 700; font-size: .7rem; line-height: 1; }

/* submenu do botão Ações (como o menu do legado: Correio Eletrônico ›, Gerenciamento › ...): abre à esquerda ao passar o mouse */
.dropdown-submenu { position: relative; }
.dropdown-submenu > .dropdown-menu { top: -.35rem; right: 100%; left: auto; margin-right: .1rem; display: none; }
.dropdown-submenu:hover > .dropdown-menu, .dropdown-submenu:focus-within > .dropdown-menu { display: block; }
.dropdown-menu .dropdown-item.disabled small { font-size: .7rem; }

/* bolinha da situação (coluna PC da listagem de pedidos; legado: imagens branca, vermelha, roxa, amarela, verde, azul) */
.bola-situacao { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid; vertical-align: middle; }

/* menu no topo (empresa escolhe na Identidade visual): faixa baixa, itens juntos, lista suspensa compacta */
html[data-layout=topnav] .topnav .navbar-nav .nav-link { padding: .55rem .8rem; font-size: .875rem; }
html[data-layout=topnav] .topnav .navbar-nav .nav-link i { font-size: 1.05rem; margin-right: .35rem; }
html[data-layout=topnav] .topnav .navbar-nav .nav-link.active { color: var(--tz-menu-item-active-color, var(--tz-primary)); font-weight: 600; }
html[data-layout=topnav] .topnav .navbar-nav .dropdown .dropdown-menu { margin-top: 0; max-height: 75vh; overflow-y: auto; }
html[data-layout=topnav] .topnav .navbar-nav .dropdown .dropdown-menu .dropdown-item { padding: .3rem 1.1rem; font-size: .8125rem; }
html[data-layout=topnav] .container-fluid { padding-right: 1rem; padding-left: 1rem; }
/* lista suspensa com o mesmo visual do menu lateral (fundo e cores do menu, item ativo destacado) */
html[data-layout=topnav] .topnav .navbar-nav .dropdown .dropdown-menu { background-color: var(--tz-menu-bg); border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 6px 18px rgba(0,0,0,.25); padding: .35rem 0; min-width: 210px; }
html[data-layout=topnav] .topnav .navbar-nav .dropdown .dropdown-menu .dropdown-item { color: var(--tz-menu-item-color); background: transparent; }
html[data-layout=topnav] .topnav .navbar-nav .dropdown .dropdown-menu .dropdown-item:hover,
html[data-layout=topnav] .topnav .navbar-nav .dropdown .dropdown-menu .dropdown-item:focus { color: var(--tz-menu-item-hover-color); background: rgba(255,255,255,.06); }
html[data-layout=topnav] .topnav .navbar-nav .dropdown .dropdown-menu .dropdown-item.active { color: var(--tz-menu-item-active-color); font-weight: 600; }
html[data-layout=topnav] .topnav .navbar-nav .dropdown .dropdown-menu .dropdown-item::before { content: "\2022"; margin-right: .5rem; opacity: .6; }
/* faixa fixa do módulo aberto: itens do submenu sempre à vista, o atual sublinhado */
html[data-layout=topnav] .submenu-modulo { background: var(--tz-secondary-bg, #fff); border-bottom: 1px solid var(--tz-border-color); }
.submenu-modulo-titulo { font-weight: 600; font-size: .8125rem; padding: .4rem .9rem .4rem 0; margin-right: .4rem; border-right: 1px solid var(--tz-border-color); white-space: nowrap; }
.submenu-modulo-titulo i { margin-right: .35rem; }
.submenu-modulo-item { display: inline-block; font-size: .8125rem; padding: .4rem .75rem; color: var(--tz-body-color); border-bottom: 2px solid transparent; white-space: nowrap; }
a.submenu-modulo-item:hover { color: var(--tz-primary); }
.submenu-modulo-item.active { color: var(--tz-primary); font-weight: 600; border-bottom-color: var(--tz-primary); }
/* menu no topo: usar a largura toda (o tema limita a 85%/95%) e quebrar em mais de uma linha quando os módulos não cabem */
@media (min-width: 992px) {
    html[data-layout=topnav] .container-fluid { max-width: 100%; }
    html[data-layout=topnav] .topnav .navbar-nav { flex-wrap: wrap; }
    html[data-layout=topnav] .topnav .navbar-nav .nav-link { padding: .5rem .6rem; }
}

/*
 * Detalhar o pedido (maquete aprovada pelo responsável em 18/11/2026, D31): cards arredondados com ícone no título,
 * datas em destaque, dados em duas colunas, resumo comercial em faixa, encargos e resumos só da largura do conteúdo.
 */
.detalhe-card { background: var(--tz-secondary-bg); border-radius: 10px; box-shadow: 0 1px 3px rgba(30, 40, 80, .08); }
.detalhe-titulo { display: flex; align-items: center; gap: .5rem; padding: .45rem .9rem .2rem; min-height: 38px; }
.detalhe-titulo h4, .detalhe-titulo-texto { font-size: 15px; font-weight: 600; margin: 0; }
.detalhe-icone { width: 24px; height: 24px; flex: 0 0 24px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--tz-primary-bg-subtle); color: var(--tz-primary); font-size: 14px; }
.detalhe-corpo { padding: .1rem .9rem .45rem; }
.detalhe-rotulo { font-size: 12px; color: var(--tz-secondary-color); }
.detalhe-card .table thead th { font-weight: 600; }
/* card que termina em tabela: respiro embaixo, igual ao de cima (responsável, 18/11/2026) */
.detalhe-card-tabela { padding-bottom: .6rem; }
/* abas (histórico e observações): espaço acima e abaixo dos títulos das abas; linhas com o mesmo espaçamento, com ou sem registro */
.detalhe-abas .nav { padding-top: .3rem; }
.detalhe-abas .tab-content { padding-top: .5rem; }
.detalhe-abas .table td { padding-top: .45rem; padding-bottom: .45rem; }

/* datas: fundo azul claro, datas grandes */
.detalhe-datas { flex: 0 0 560px; max-width: 100%; background: color-mix(in srgb, var(--tz-primary) 9%, var(--tz-secondary-bg)); }
.detalhe-datas .col + .col { border-left: 1px solid color-mix(in srgb, var(--tz-primary) 18%, transparent); }
.detalhe-data { font-size: 18px; font-weight: 700; color: var(--tz-emphasis-color); }

/* dados: situação e Nº no título, duas colunas */
.detalhe-situacao .badge { font-size: 12px; font-weight: 600; padding: .3em .7em; border-radius: 6px; }
.detalhe-numero { font-size: 20px; font-weight: 800; color: var(--tz-danger); line-height: 1; letter-spacing: .3px; }
.detalhe-dados th { width: 1%; white-space: nowrap; font-weight: 400; color: var(--tz-secondary-color); padding: .05rem 1.2rem .05rem 0; line-height: 1.35; }
.detalhe-dados td { padding: .05rem 0; line-height: 1.35; font-weight: 600; font-size: 12.5px; }
@media (min-width: 768px) { .detalhe-coluna2 { border-left: 1px solid var(--tz-border-color); } }

/* resumo comercial em faixa */
.detalhe-faixa > div { padding: 0 1.1rem; }
.detalhe-faixa > div + div { border-left: 1px solid var(--tz-border-color); }
.detalhe-faixa > div:first-child { padding-left: 0; }

/* tabela de itens no Detalhar: sem grade, # na frente, linha mais grossa entre um item e outro */
.tabela-itens-detalhe td { white-space: nowrap; }
.tabela-itens-detalhe td.detalhe-produto { white-space: normal; min-width: 160px; }
.tabela-itens-detalhe .detalhe-num { padding-left: .9rem; width: 1%; }
.tabela-itens-detalhe tr > :last-child { padding-right: .9rem; }
.tabela-itens-detalhe tbody tr.detalhe-item-inicio > * { border-top: 2px solid color-mix(in srgb, var(--tz-secondary-color) 35%, transparent); padding-top: .4rem; }
.tabela-itens-detalhe tbody tr.detalhe-item-inicio:first-child > * { border-top: 0; }

/* encargos: só a largura do texto */
.detalhe-ajustado { width: fit-content; max-width: 100%; }
.detalhe-ajustado .table { width: auto; }
.detalhe-ajustado .table th, .detalhe-ajustado .table td { white-space: nowrap; }

/* resumos (sem encargo e com encargo): tiras estreitas */
.detalhe-resumo { flex: 0 0 290px; max-width: 100%; }
.detalhe-resumo th { text-align: left; padding-left: .9rem; font-weight: 400; color: var(--tz-secondary-color); }
.detalhe-resumo td { text-align: right; white-space: nowrap; width: 1%; padding-right: .9rem; font-variant-numeric: tabular-nums; }
.detalhe-resumo .detalhe-total > * { font-weight: 700; color: var(--tz-body-color); border-top: 1px solid var(--tz-border-color); }
.detalhe-resumo .detalhe-total td { font-size: 14px; }
.detalhe-resumo .detalhe-separa > * { border-top: 1px solid var(--tz-border-color); }

/* Menu recolhido: o Velonic força min-height de 1500px (--tz-leftbar-condensed-height) no conteúdo,
   deixando telas curtas compridas e vazias. Usa a mesma altura mínima do menu aberto (a janela)... */
html[data-sidenav-size=condensed]:not([data-layout=topnav]) .wrapper .content-page { min-height: calc(100vh - var(--tz-topbar-height) - 2px); }
/* ...e o menu recolhido (position: absolute; top/bottom 0) deixa de ter a altura da página: cresce até
   caber todos os ícones (bottom: auto) e no mínimo ocupa a janela, sem o fundo escuro terminar no meio. */
html[data-sidenav-size=condensed]:not([data-layout=topnav]) .wrapper .leftside-menu { bottom: auto; min-height: 100vh; }

/* Sininho e tela de notificações: a não lida em destaque (fundo leve da cor principal + título em negrito) */
.notify-item.notify-nao-lida { background: rgba(var(--tz-primary-rgb), .06); }
.notify-item.notify-nao-lida .notify-details { font-weight: 600; }
tr.notificacao-nao-lida > td { background: rgba(var(--tz-primary-rgb), .04); }
