/*!
 * Guiné PDV — overrides de marca e convenções de UI.
 * Carregado SEMPRE após style.css (tema Dreams POS).
 * Regras: asterisco obrigatório vermelho + backdrop de modal desfocado.
 */

/* ------------------------------------------------------------------ */
/* Campos obrigatórios — asterisco vermelho                            */
/* Uso: <label>Nome <span class="required">*</span></label>            */
/* (guine-pdv.js também marca automaticamente [required] sem asterisco)*/
/* ------------------------------------------------------------------ */
.required {
    color: #dc3545;
    font-weight: 600;
}
label .required {
    margin-left: 2px;
}

/* ------------------------------------------------------------------ */
/* Modais — backdrop desfocado (blur) atrás do modal                   */
/* ------------------------------------------------------------------ */
.modal-backdrop.show {
    background-color: rgba(15, 23, 42, 0.45);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 1 !important;
}
/* Fallback para navegadores sem backdrop-filter: escurece um pouco mais */
@supports not ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
    .modal-backdrop.show {
        background-color: rgba(15, 23, 42, 0.6);
    }
}

/* ------------------------------------------------------------------ */
/* SweetAlert2 — z-index acima de modais/overlays do tema              */
/* ------------------------------------------------------------------ */
.swal2-container {
    z-index: 11000;
}

/* ------------------------------------------------------------------ */
/* Ajustes finos do dashboard shell                                    */
/* ------------------------------------------------------------------ */
.guine-kpi-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 22px;
}

/* ------------------------------------------------------------------ */
/* Ações das listas — botões (dentro de <a>/<form>) sempre na horizontal*/
/* Uso: <td class="text-end tabela-acoes"> ... </td>                    */
/* Os !important são necessários para bater o `.d-inline{display:inline */
/* !important}` do Bootstrap nos <form> e o `.btn` block-level do tema.  */
/* ------------------------------------------------------------------ */
.tabela-acoes {
    white-space: nowrap !important;
    text-align: right;
}
.tabela-acoes > a,
.tabela-acoes > form,
.tabela-acoes > button,
.tabela-acoes .btn {
    display: inline-flex !important;
    vertical-align: middle;
    float: none !important;
}
.tabela-acoes > * + * {
    margin-left: 0.25rem;
}

/* ------------------------------------------------------------------ */
/* Logo do sistema (Guiné PDV)                                         */
/* .guine-logo      = logo completo (header/sidebar expandidos)        */
/* .guine-logo-lg   = logo grande (tela de login)                      */
/* .guine-logo-icon = só o ícone, recortado via CSS (menu recolhido)   */
/* ------------------------------------------------------------------ */
.guine-logo {
    height: 57px;
    width: auto;
    max-width: 100%;
}
.guine-logo-lg {
    height: 60px;
    width: auto;
    max-width: 100%;
}
.guine-logo-icon {
    width: 34px;
    height: 34px;
    object-fit: cover;
    object-position: left center;
}
/* O tema Dreams POS força `.logo img { width:130px }` (sidebar e header)
   com especificidade maior que `.guine-logo` sozinha — sem repetir o
   seletor completo do tema aqui, a logo nova ficava espremida em 130px
   de largura em vez dos 187px que casam com a proporção real do arquivo. */
.sidebar .sidebar-logo .logo img.guine-logo,
.header .header-left .logo img.guine-logo {
    width: 187px;
    height: 57px;
}

/* ------------------------------------------------------------------ */
/* Header — botões (POS/Mesas/…) sempre na barra fixa de 65px           */
/* O tema usa float:left no logo. Se o user-menu ficar largo demais     */
/* (ex.: rótulo "WhatsApp Desconectado"), o float:right CAI abaixo do  */
/* logo e os botões aparecem "lá embaixo". Flex mantém tudo numa linha. */
/* ------------------------------------------------------------------ */
.header .main-header {
    display: flex;
    align-items: center;
    height: inherit;
}
.header .main-header .header-left {
    float: none;
    flex: 0 0 auto;
}
.header .main-header .user-menu {
    float: none;
    margin-left: auto;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    justify-content: flex-end;
    /* NÃO recortar aqui (nada de overflow-x:auto/scroll). Pela spec do CSS,
       overflow-x:auto força overflow-y a virar auto/hidden, e isso RECORTAVA
       os dropdowns do header que abrem para baixo (perfil, WhatsApp,
       Integrações): o menu abria no DOM mas ficava invisível, fora da caixa.
       Para os botões não vazarem sobre o logo em telas estreitas, a busca
       (o item mais largo) só aparece em telas grandes — ver regra abaixo. */
    overflow: visible;
}
/* Busca de menu: só a partir de ~1400px, onde sobra espaço para ela sem
   empurrar os botões (POS/Mesas/…) por cima do logo. Entre lg e ~1400px os
   botões cabem sem a busca; abaixo de lg o menu vira o botão mobile. */
@media (max-width: 1399.98px) {
    .header .main-header .user-menu .nav-search-box {
        display: none !important;
    }
}

/* Avatar da inicial do usuário — círculo perfeito (evita ficar oval). */
/* aspect-ratio + flex:0 0 auto impedem que o flex do header o achate. */
.header .user-menu .avatar {
    flex: 0 0 auto;
    aspect-ratio: 1 / 1;
    line-height: 1;
    padding: 0;
    border-radius: 50%;
}

/* ------------------------------------------------------------------ */
/* Botões de ação no topo das listas (.table-top-head)                  */
/* O tema força `.table-top-head li a { width:35px; height:35px }`      */
/* (botão de ÍCONE quadrado). Botões COM TEXTO ("Adicionar", "Gerar",   */
/* filtros) ficavam menores que o texto, ilegíveis. Aqui devolvemos o   */
/* tamanho normal de botão e aplicamos a cor PRETA pedida.              */
/* ------------------------------------------------------------------ */
.page-header .table-top-head {
    flex-shrink: 0;          /* o grupo de botões nunca encolhe */
}
.page-header .add-item {
    min-width: 0;            /* o título cede espaço em vez do botão */
}

/* Reset de tamanho: qualquer .btn dentro do topo volta a ser um botão
   de texto normal (vence o 35x35 do tema por especificidade). */
.table-top-head li a.btn,
.table-top-head li button.btn,
.table-top-head li .btn {
    width: auto;
    height: auto;
    min-height: 38px;
    padding: 0.45rem 0.9rem;
    white-space: nowrap;     /* texto numa linha só */
    font-weight: 500;
    line-height: 1.2;
}
/* Cantos arredondados só nos botões avulsos; dentro de .btn-group o
   próprio Bootstrap cuida de arredondar apenas as pontas do grupo. */
.table-top-head li > a.btn,
.table-top-head li > button.btn {
    border-radius: 6px;
}
.table-top-head li a.btn i,
.table-top-head li .btn i {
    font-size: 16px;
}

/* Botão sólido (Adicionar / Gerar / filtro ativo) → PRETO */
.table-top-head li a.btn-primary,
.table-top-head li .btn-primary {
    background-color: #1b1b1b;
    border-color: #1b1b1b;
    color: #ffffff;
}
.table-top-head li a.btn-primary:hover,
.table-top-head li a.btn-primary:focus,
.table-top-head li .btn-primary:hover,
.table-top-head li .btn-primary:focus {
    background-color: #000000;
    border-color: #000000;
    color: #ffffff;
}

/* Botão contornado (Gerar mesas / filtros inativos) → contorno PRETO */
.table-top-head li a.btn-outline-primary,
.table-top-head li .btn-outline-primary {
    background-color: #ffffff;
    border-color: #1b1b1b;
    color: #1b1b1b;
}
.table-top-head li a.btn-outline-primary:hover,
.table-top-head li a.btn-outline-primary:focus,
.table-top-head li .btn-outline-primary:hover,
.table-top-head li .btn-outline-primary:focus {
    background-color: #1b1b1b;
    border-color: #1b1b1b;
    color: #ffffff;
}

/* ------------------------------------------------------------------ */
/* Seletor de cor — amostra + hex alinhados ao form-control           */
/* ------------------------------------------------------------------ */
.pdv-color-control {
    display: flex;
    align-items: stretch;
    max-width: 100%;
}

.pdv-color-swatch {
    position: relative;
    flex: 0 0 42px;
    width: 42px;
    min-height: 38px;
    margin: 0;
    border: 1px solid #E6EAED;
    border-right: 0;
    border-radius: 6px 0 0 6px;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.15s ease;
}

.pdv-color-swatch:hover,
.pdv-color-swatch:focus-within {
    box-shadow: inset 0 0 0 2px rgba(254, 159, 67, 0.35);
}

.pdv-color-swatch input[type="color"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
}

.pdv-color-control .pdv-color-hex {
    flex: 1 1 auto;
    min-width: 0;
    border-radius: 0 6px 6px 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.875rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background-color: #fff;
    color: #5B6670;
}

.pdv-color-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0.75rem 1rem;
    border: 1px dashed #E6EAED;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.pdv-color-preview span {
    line-height: 1.3;
    word-break: break-word;
}

/* ------------------------------------------------------------------ */
/* Seletor de ícone da categoria (Tabler Icons)                        */
/* ------------------------------------------------------------------ */
.pdv-icon-trigger {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    background-color: #fff;
    border: 1px solid #E6EAED;
    border-radius: 6px;
    text-align: left;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.pdv-icon-trigger:hover,
.pdv-icon-trigger:focus {
    border-color: #FE9F43;
    box-shadow: inset 0 0 0 2px rgba(254, 159, 67, 0.35);
}

.pdv-icon-trigger-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    font-size: 1.25rem;
    background-color: #F8F9FA;
    border-radius: 6px;
    color: #5B6670;
}

.pdv-icon-trigger-label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.875rem;
    color: #5B6670;
    text-transform: capitalize;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pdv-icon-clear {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 50%;
    color: #99A1A8;
    line-height: 1;
}

.pdv-icon-clear:hover {
    background-color: #F8F9FA;
    color: #E63757;
}

.pdv-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: 0.4rem;
    max-height: 360px;
    overflow-y: auto;
    padding: 0.25rem;
}

.pdv-icon-grid-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    font-size: 1.25rem;
    background-color: #fff;
    border: 1px solid #E6EAED;
    border-radius: 6px;
    color: #5B6670;
    cursor: pointer;
    transition: background-color 0.1s ease, border-color 0.1s ease, transform 0.1s ease, color 0.1s ease;
}

.pdv-icon-grid-item:hover {
    background-color: rgba(254, 159, 67, 0.12);
    border-color: #FE9F43;
    color: #FE9F43;
    transform: scale(1.08);
}

.pdv-icon-grid-item.selecionado {
    background-color: #FE9F43;
    border-color: #FE9F43;
    color: #fff;
}

/* =====================================================================
   PDV — Modal de pagamento: legibilidade (azul-marinho da logo #0A2A50)
   ===================================================================== */

/* O tema pinta ::selection de laranja (#FE9F43), deixando o valor destacado
   (o campo já vem selecionado) ilegível. Aqui usamos o azul da logo. */
#pdvPagamentoModal ::selection { background: #0A2A50; color: #fff; }
#pdvPagamentoModal ::-moz-selection { background: #0A2A50; color: #fff; }

/* Botão "Adicionar forma": o outline laranja tinha baixo contraste no branco.
   Azul-marinho da logo → alto contraste e leitura fácil. */
.btn-guine-navy {
    color: #0A2A50;
    border: 1px solid #0A2A50;
    background-color: transparent;
}
.btn-guine-navy:hover,
.btn-guine-navy:focus {
    color: #fff;
    background-color: #0A2A50;
    border-color: #0A2A50;
}

/* =====================================================================
   Botões primários → azul-marinho da logo (nítido) em TODO o sistema.
   O tema Dreams POS pinta btn-primary/btn-outline-primary de laranja
   (#FE9F43 !important); o contornado (laranja no branco) fica ilegível.
   Recolorimos para #0A2A50, seguindo o seletor/!important do tema para
   vencer a cascata (guine-pdv.css carrega depois do style.css).
   Overrides mais específicos (ex.: .table-top-head → preto) continuam valendo.
   ===================================================================== */
.btn.btn-primary {
    background-color: #0A2A50 !important;
    border: 1px solid #0A2A50 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 20px rgba(10, 42, 80, .15);
}
.btn.btn-primary:hover,
.btn.btn-primary:focus,
.btn.btn-primary.focus,
.btn.btn-primary:active,
.btn.btn-primary.active {
    background-color: #08213f !important;
    border: 1px solid #08213f !important;
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(10, 42, 80, .35);
}
.btn-outline-primary {
    border: 1px solid #0A2A50 !important;
    color: #0A2A50 !important;
    background-color: transparent !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary.focus,
.btn-outline-primary:active,
.btn-outline-primary.active {
    background-color: #0A2A50 !important;
    border: 1px solid #0A2A50 !important;
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(10, 42, 80, .35);
}

/* =====================================================================
   Select2 — destaque legível em TODO o sistema. O tema Dreams POS pinta a
   opção ativa de laranja (#FE9F43) com fonte branca, o que quase não lê.
   Aqui usamos o azul-marinho da logo (#0A2A50) com fonte branca (alto contraste).
   ===================================================================== */
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted {
    background-color: #0A2A50 !important;
    color: #fff !important;
}

/* =====================================================================
   Compra de Estoque — modal de importação de NF-e (maior + dropzone)
   ===================================================================== */
.modal-importar-nfe { max-width: 92vw; }
.modal-importar-nfe .modal-content { min-height: 82vh; }
@media (max-width: 992px) { .modal-importar-nfe { max-width: 96vw; } }

.dropzone-xml {
    border: 2px dashed #b8c4d6;
    border-radius: .75rem;
    background: #f6f9ff;
    padding: 2rem 1rem;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}
.dropzone-xml:hover { border-color: #0A2A50; background: #eef4ff; }
.dropzone-xml.is-dragover { border-color: #0A2A50; background: #e2ecff; }
.dropzone-xml__inner { text-align: center; pointer-events: none; }
.dropzone-xml__icon { font-size: 2.25rem; color: #0A2A50; display: block; margin-bottom: .35rem; }

/* =====================================================================
   PDV / Frente de Caixa — tela de venda (layout pos-five do tema)
   A maior parte do visual vem de style.css (.pos-five, .product-order-list,
   .pos-categories, .product-info…). Aqui ficam só ajustes específicos do Guiné.
   ===================================================================== */

/* Placeholder de imagem quando o produto/categoria não tem foto */
.pdv-produto .pro-img .pdv-noimg,
.pos-category5 li a:has(> i) {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #9AA4AE;
    background: #F7F8FA;
    font-size: 1.6rem;
}

.pos-category5 li a > i {
    font-size: 1.6rem;
    color: #6c757d;
}

/* Cabeçalho de seção de categoria na grade (visível só no filtro "Todas").
   Marca cada bloco de produtos com o nome da categoria para o operador se
   situar ao rolar. No desktop fica "grudado" no topo da área rolável
   (.pos-products) — ver regra sticky no @media (min-width: 992px). */
.pdv-cat-sep-title {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0.4rem 0.65rem;
    background: #EEF2F8;
    border-left: 3px solid #FE9F43;
    border-radius: 6px;
    color: #0A2A50;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.pdv-cat-sep-title i {
    color: #FE9F43;
}

/* Card de produto: ponteiro (todo o card adiciona ao carrinho) */
.pdv-produto {
    cursor: pointer;
}

.pdv-produto .product-name a,
.pdv-produto .cat-name a,
.pdv-produto .pro-img {
    pointer-events: none;
}

/* Quantidade dentro da tabela do pedido (somente leitura) */
.product-order-list .qty-item input.pdv-item-q {
    pointer-events: none;
    background: transparent;
}

/* ---- Modal de pagamento ---- */
.pdv-resumo-pagto {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
    padding: 0.85rem 1rem;
    background: #F7F8FA;
    border-radius: 8px;
}

.pdv-resumo-pagto > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

/* Uma linha por total. Usado na tela de receber da mesa (coluna estreita), onde
   as 2 colunas embaralhavam rótulos longos ("Taxa de serviço (10%)") com valores.
   O modal do balcão continua em 2 colunas — lá o espaço é horizontal. */
.pdv-resumo-pagto--lista {
    grid-template-columns: 1fr;
    gap: 0.4rem;
}

/* Modal de pagamentos rolável (.modal-dialog-scrollable): o rodapé
   (Cancelar/Confirmar) fica SEMPRE visível e o corpo rola quando há muitas
   formas de pagamento. O resumo (Total/Restante/Troco) fica fixo no topo. */
#pdvPagamentoModal .pdv-resumo-pagto {
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 6px 8px -6px rgba(0, 0, 0, 0.15);
}

.pg-forma-linha .pg-metodo {
    max-width: 42%;
}

/* Botão de fechar dos modais do PDV — o tema força um círculo vermelho grande
   (.modal .btn-close { background:#FF0000; border-radius:50px }). Aqui devolvemos
   o "x" discreto padrão (igual ao modal de pagamentos) em TODOS os modais. */
.modal .btn-close {
    width: 1em;
    height: 1em;
    padding: 0.35em;
    border-radius: 6px;
    background-color: transparent;
    color: #6C757D;
    opacity: 0.6;
    box-sizing: content-box;
}
.modal .btn-close:hover {
    background-color: #F1F3F5;
    color: #212B36;
    opacity: 1;
}

/* Espaçamento entre os botões do rodapé (o tema zera a margem dos .btn no
   modal-footer, deixando "Cancelar" e "Confirmar" colados). */
#pdvPagamentoModal .modal-footer,
#pdvClienteModal .modal-footer,
#qdDetalheModal .modal-footer,
#qdPagamentoModal .modal-footer {
    gap: 0.5rem;
}

/* ===================================================================== */
/*  Salão — grade operacional de mesas (estilo app) + painel na mesa      */
/* ===================================================================== */
.salao-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.salao-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid #E5E7EB;
    background: #fff;
    color: #495057;
    border-radius: 999px;
    padding: 0.3rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.salao-chip:hover { border-color: #FF2D37; }

.salao-chip.active {
    border-color: #FF2D37;
    color: #FF2D37;
    background: #FFF1F1;
}

.salao-chip-num {
    background: #F1F3F5;
    border-radius: 999px;
    padding: 0 0.45rem;
    font-size: 0.75rem;
}

.salao-chip.active .salao-chip-num { background: #FFE1E2; }

.salao-chip-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.salao-dot--livre        { background: #C7CBD1; }
.salao-dot--ocupada      { background: #FF2D37; }
.salao-dot--reservada    { background: #F5C518; }
.salao-dot--paga_parcial { background: #1E90D6; }
.salao-dot--bloqueada    { background: #6C757D; }

.salao-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.9rem;
}

.salao-tile-wrap { position: relative; }

.salao-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 130px;
    padding: 0.9rem 0.5rem 0;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    background: #D5D7DB;
    color: #1F2937;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease, color 0.12s ease;
}

.salao-tile:hover,
.salao-tile:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
    text-decoration: none;
    /* Não usar color:inherit — herda cinza do wrap e some no vermelho/azul. */
}

/* Livre (cinza) e demais sem modifier explícito. */
.salao-tile:not([class*="salao-tile--"]):hover,
.salao-tile:not([class*="salao-tile--"]):focus {
    background: #C4C8CE;
    color: #1F2937 !important;
}

.salao-tile-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    opacity: 0.85;
}

.salao-tile-num {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
    margin-top: 0.15rem;
    margin-bottom: 0.9rem;
}

.salao-tile-valor {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: #111;
    color: #fff;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.35rem 0.25rem;
}

/* Cores por status (espelham o mapa de badges das mesas). */
.salao-tile--ocupada      { background: #FF2D37; color: #fff; }
.salao-tile--reservada    { background: #F5C518; color: #1F2937; }
.salao-tile--paga_parcial { background: #1E90D6; color: #fff; }
.salao-tile--bloqueada    { background: #6C757D; color: #fff; }

/* Hover por status: escurece o fundo e mantém texto legível (vence a:hover global). */
.salao-tile--ocupada:hover,
.salao-tile--ocupada:focus      { background: #E0242E; color: #fff !important; }
.salao-tile--reservada:hover,
.salao-tile--reservada:focus    { background: #E0AD10; color: #1F2937 !important; }
.salao-tile--paga_parcial:hover,
.salao-tile--paga_parcial:focus { background: #187BBF; color: #fff !important; }
.salao-tile--bloqueada:hover,
.salao-tile--bloqueada:focus    { background: #5A6268; color: #fff !important; }

.salao-tile-acao {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
    color: #111;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.salao-tile-acao:hover { background: #fff; color: #FF2D37; }

/* Botão "i" (detalhes/ações) no canto do tile ocupado. */
.salao-tile-info {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
    color: #FF2D37;
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.12s ease, background 0.12s ease;
}

.salao-tile-info:hover { background: #fff; transform: scale(1.08); }
.salao-tile-info i { pointer-events: none; }

/* ===================================================================== */
/*  Modal dinâmico de detalhes/ações da mesa (botão "i" do salão)         */
/* ===================================================================== */
.salao-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(17, 24, 39, 0.38);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: salaoFade 0.16s ease;
}

.salao-modal-backdrop[hidden] { display: none; }
body.salao-modal-aberto { overflow: hidden; }

@keyframes salaoFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes salaoPop {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

.salao-modal {
    --acento: #FF2D37;
    --acento-bg: #FFE1E2;
    width: 100%;
    max-width: 460px;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    background: #F4F5F7;
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
    animation: salaoPop 0.2s ease;
}

.salao-modal[data-status="paga_parcial"] { --acento: #1E90D6; --acento-bg: #E1F0FA; }
.salao-modal[data-status="reservada"]    { --acento: #C79A00; --acento-bg: #FDF4CF; }
.salao-modal[data-status="bloqueada"]    { --acento: #6C757D; --acento-bg: #E9ECEF; }

.salao-modal-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
}

/* Cabeçalho colorido por status. */
.salao-modal-head {
    padding: 1.15rem 1.25rem;
    border-radius: 22px 22px 18px 18px;
    color: #fff;
    background: #FF2D37;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.salao-modal-head--reservada    { background: #F5C518; color: #1F2937; }
.salao-modal-head--paga_parcial { background: #1E90D6; }
.salao-modal-head--bloqueada    { background: #6C757D; }
.salao-modal-head--livre        { background: #7A828E; }

.salao-modal-mesa-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    opacity: 0.9;
}

.salao-modal-mesa-num {
    display: block;
    font-size: 2.7rem;
    font-weight: 800;
    line-height: 1;
}

.salao-modal-mesa-nome {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.95;
}

.salao-modal-mesa-nome:empty { display: none; }

.salao-modal-head-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.salao-modal-badge {
    background: rgba(0, 0, 0, 0.18);
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.salao-modal-close {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.18);
    color: inherit;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.salao-modal-close:hover { background: rgba(0, 0, 0, 0.3); }

/* Cards de info (abertura / garçom / tempo). */
.salao-modal-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    padding: 0.9rem 1rem 0.2rem;
}

.salao-modal-card {
    background: #fff;
    border-radius: 14px;
    padding: 0.75rem 0.4rem;
    text-align: center;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.salao-modal-card-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--acento-bg);
    color: var(--acento);
    font-size: 18px;
    margin-bottom: 0.4rem;
}

.salao-modal-card strong {
    display: block;
    font-size: 0.95rem;
    line-height: 1.2;
    color: #1F2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.salao-modal-card small {
    color: #8A9099;
    font-size: 0.75rem;
}

.salao-modal-sec-title {
    padding: 0.9rem 1.25rem 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9AA0A9;
}

/* Consumo. */
.salao-modal-consumo {
    margin: 0 1rem;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.salao-modal-item,
.salao-modal-total {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.9rem;
}

.salao-modal-item + .salao-modal-item { border-top: 1px solid #F0F1F3; }

.salao-modal-item-qtd {
    flex: 0 0 auto;
    background: var(--acento-bg);
    color: var(--acento);
    font-weight: 700;
    font-size: 0.8rem;
    border-radius: 8px;
    padding: 0.15rem 0.45rem;
}

.salao-modal-item-nome { flex: 1 1 auto; font-weight: 500; color: #1F2937; }
.salao-modal-item-valor { flex: 0 0 auto; font-weight: 600; color: #1F2937; }
.salao-modal-vazio { padding: 0.9rem; text-align: center; color: #9AA0A9; }

.salao-modal-total {
    border-top: 1px solid #EEF0F2;
    background: #FAFAFB;
    justify-content: space-between;
    font-weight: 700;
}

.salao-modal-total strong { color: var(--acento); font-size: 1.05rem; }

/* Ações rápidas. */
.salao-modal-acoes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    padding: 0.35rem 1rem 1.1rem;
}

.salao-acao {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    border: none;
    border-radius: 14px;
    padding: 1rem 0.5rem;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    color: #fff;
    transition: transform 0.12s ease, filter 0.12s ease;
}

.salao-acao:hover { transform: translateY(-2px); filter: brightness(1.03); }
.salao-acao:active { transform: translateY(0); }

.salao-acao-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.22);
    font-size: 22px;
}

.salao-acao--vermelho { background: #FF2D37; }
.salao-acao--azul     { background: #1E90D6; }
.salao-acao--verde    { background: #1E9E4A; }
.salao-acao--cinza    { background: #EDEFF2; color: #4B5563; }
.salao-acao--cinza .salao-acao-ico { background: #DFE3E8; color: #4B5563; }
.salao-acao--full { grid-column: 1 / -1; }

@media (max-width: 400px) {
    .salao-modal-mesa-num { font-size: 2.2rem; }
    .salao-modal-cards { gap: 0.4rem; padding: 0.75rem 0.75rem 0.2rem; }
    .salao-modal-acoes { gap: 0.5rem; }
}

/* Telas maiores (tablet/desktop): modal mais largo, ações numa fileira só —
   evita o layout "esticado na vertical" de celular quando há espaço de sobra. */
@media (min-width: 640px) {
    .salao-modal { max-width: 640px; }
    .salao-modal-acoes { grid-template-columns: repeat(4, 1fr); }
}

/* Painel "Já na mesa" dentro do carrinho do PDV (modo mesa). */
.pdv-mesa-lancados {
    border-bottom: 1px solid #EEF0F2;
    background: #F7F8FA;
    padding: 0.6rem 1rem;
    max-height: 30vh;
    overflow-y: auto;
}

.pdv-mesa-lancados-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6C757D;
    margin-bottom: 0.4rem;
}

.pdv-mesa-lancados-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    padding: 0.15rem 0;
}

.pdv-mesa-lancados-q { font-weight: 700; color: #FF2D37; min-width: 2.2rem; }
.pdv-mesa-lancados-nome { flex: 1 1 auto; }
.pdv-mesa-lancados-sub { font-weight: 600; }

/* Logo do sistema no header do POS — garante que apareça e fique bem dimensionada
   (o layout pos-five não tem sidebar; forçamos o header-left e a logo visíveis). */
.pos-five .header .header-left {
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    float: left !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 16px !important;
    text-align: left !important;
}
.pos-five .header .header-left .logo.logo-normal {
    display: inline-flex !important;
    align-items: center;
}
.pos-five .header .header-left .logo.logo-normal img {
    height: 57px !important;
    width: auto !important;
}
.pos-five .header .header-left .logo-small { display: none !important; }

/* =====================================================================
   PDV — layout de altura de tela (desktop): categorias e cabeçalho fixos,
   só a grade de produtos rola; painel do pedido rola por dentro; rodapé
   sempre visível. Escopo em .pos-five e apenas em telas grandes — no mobile
   o tema mantém o comportamento empilhado/rolável padrão.
   ===================================================================== */
@media (min-width: 992px) {
    /* Toda a cadeia usa flex + min-height:0 (nunca height:%), pois altura
       percentual depende de pai com altura "definida" e colapsa — foi o que
       quebrava as rolagens. Aqui cada área rola por flex, de forma robusta. */

    /* Conteúdo do POS ocupa a viewport (menos a navbar fixa de 65px) e vira
       coluna flex: a grade cresce, o rodapé fica colado embaixo. */
    .pos-five .content.pos-design {
        height: calc(100vh - 65px);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    .pos-five .pos-wrapper {          /* .row (display:flex) */
        flex: 1 1 auto;
        min-height: 0;
    }
    .pos-five .pos-footer { flex: 0 0 auto; }

    .pos-five .pos-wrapper > [class*="col-"] { min-height: 0; }

    /* Coluna da esquerda: pos-categories vira coluna flex (sem rolagem externa). */
    .pos-five .pos-categories {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
        padding: 0;
    }
    .pos-five .content-wrap {         /* theme: display:flex (linha) */
        flex: 1 1 auto;
        min-height: 0;
        align-items: stretch;
    }

    /* Trilho de categorias: rola sozinho (independente da grade). O scroll fica
       no próprio .pos-category5 (o .owl-stage-outer recorta, então não adianta
       rolar o .tab-wrap). */
    .pos-five .tab-wrap {
        display: flex;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
        /* Menos margem à esquerda; a folga da direita fica no .pos-category5
           (padding-right) para a barra de rolagem não cobrir as categorias. */
        padding-left: 12px;
        padding-right: 4px;
    }
    /* !important vence o estilo inline (height:100%; overflow:hidden) que o
       script.js do tema aplica no .pos-category5 após inicializar o Owl —
       era isso que impedia a rolagem vertical das categorias. */
    .pos-five .pos-category5 {
        flex: 1 1 auto;
        min-height: 0;
        height: auto !important;
        max-height: none !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        /* Folga à direita: afasta as categorias da barra de rolagem. */
        padding-right: 8px;
    }

    /* Coluna de produtos: cabeçalho (Mesa/busca) fixo, só a grade rola. */
    .pos-five .tab-content-wrap {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
    }
    .pos-five .tab-content-wrap > .pdv-pos-head { flex: 0 0 auto; }
    /* overflow-x: hidden explícito — sem ele, como a grade usa .row (margens
       negativas do Bootstrap), o overflow-x computava para auto junto com o
       overflow-y e surgia uma barra de rolagem horizontal indesejada. */
    .pos-five .pos-products {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
    }

    /* Cabeçalho de categoria grudado no topo da grade enquanto a seção rola.
       Só faz sentido aqui, onde .pos-products é o container de rolagem; no
       mobile a página inteira rola e o cabeçalho fica como divisor normal. */
    .pos-five .pos-products .pdv-cat-sep {
        position: sticky;
        top: 0;
        z-index: 2;
    }

    /* Painel do pedido (direita): rola por dentro. */
    .pos-five .product-order-list {
        min-height: 0;
        overflow-y: auto;
    }
}

/* Campo de cliente (select2) no painel do pedido — ocupa toda a largura. */
.customer-info .select2-container { width: 100% !important; }
.customer-info .select2-selection--single {
    height: 38px;
    display: flex;
    align-items: center;
    border-color: #E6EAED;
}
.customer-info .select2-selection__rendered { padding-left: 10px; }
.pdv-cli-extra { font-size: 0.78rem; color: #7A8086; }

/* Modal de cadastro rápido de cliente — etapas (o !important vence o
   display:flex do .d-flex nos rodapés das etapas). */
.pdv-cli-etapa[hidden] { display: none !important; }

/* =====================================================================
   Modal de emissão fiscal (NF-e 55 / NFC-e 65) — escolha do documento.
   Injetado por fiscal-emissao.js; usado na listagem de Vendas e no
   checkout do PDV (ambas carregam este CSS via partials/head.php).
   ===================================================================== */
.fe-modal .modal-content { border: 0; border-radius: 14px; overflow: hidden; box-shadow: 0 20px 60px rgba(10, 42, 80, .25); }
.fe-modal .modal-header { background: #0A2A50; color: #fff; border: 0; padding: 1rem 1.25rem; }
.fe-modal .modal-header .modal-title { font-weight: 700; display: flex; align-items: center; color: #fff; }
.fe-modal .modal-header .btn-close { filter: brightness(0) invert(1); opacity: .85; }
.fe-modal .modal-body { padding: 1.25rem 1.25rem 1rem; }
.fe-modal-sub { color: #64748b; font-size: .9rem; margin: 0 0 .9rem; }

.fe-amb-wrap { margin-bottom: .9rem; }
.fe-amb { display: inline-flex; align-items: center; font-size: .74rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .03em; border-radius: 20px; padding: .25rem .7rem; }
.fe-amb-homolog { color: #92600a; background: #fff4e0; border: 1px solid #ffd591; }
.fe-amb-prod { color: #0f5132; background: #e7f6ec; border: 1px solid #a3d9b6; }

.fe-cards { display: grid; gap: .7rem; }
.fe-card { position: relative; display: flex; align-items: center; gap: .85rem; margin: 0;
    padding: .9rem 1rem; border: 2px solid #e5e9f0; border-radius: 12px; cursor: pointer;
    transition: border-color .15s, background .15s, box-shadow .15s; }
.fe-card:hover { border-color: #ffcf9a; background: #fffdf9; }
.fe-card input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.fe-card.is-selected { border-color: #FE9F43; background: #fff8f0; box-shadow: inset 0 0 0 1px #FE9F43; }
.fe-card-icon { flex: 0 0 46px; width: 46px; height: 46px; display: grid; place-items: center;
    border-radius: 10px; background: #eef2f8; color: #0A2A50; font-size: 1.5rem; transition: background .15s, color .15s; }
.fe-card.is-selected .fe-card-icon { background: #FE9F43; color: #fff; }
.fe-card-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.fe-card-tit { font-weight: 700; color: #17324f; font-size: 1.02rem; }
.fe-card-tit small { font-weight: 600; color: #90a0b6; font-size: .72rem; text-transform: uppercase;
    letter-spacing: .03em; margin-left: .4rem; }
.fe-card-desc { font-size: .84rem; color: #64748b; margin-top: .15rem; line-height: 1.35; }
.fe-card-check { flex: 0 0 auto; color: #FE9F43; font-size: 1.4rem; opacity: 0; transition: opacity .15s; }
.fe-card.is-selected .fe-card-check { opacity: 1; }

.fe-modal-erro { margin-top: .9rem; color: #b02a37; background: #fdecee; border: 1px solid #f5c2c7;
    border-radius: 8px; padding: .55rem .75rem; font-size: .86rem; }
.fe-modal .modal-footer { border-top: 1px solid #eef1f5; padding: .85rem 1.25rem; }
.fe-btn-emitir { background: #FE9F43; border-color: #FE9F43; color: #fff; font-weight: 600; }
.fe-btn-emitir:hover:not(:disabled), .fe-btn-emitir:focus:not(:disabled) { background: #ef8f30; border-color: #ef8f30; color: #fff; }
.fe-btn-emitir:disabled { opacity: .65; }

/* =====================================================================
   Modal de pagamento PIX (Asaas) — reaproveita o padrão .fe-modal.
   ===================================================================== */
.pix-modal .pix-valor { color: #17324f; font-size: .9rem; margin-bottom: .4rem; }
.pix-modal .pix-valor strong { display: inline-block; font-size: 1.5rem; color: #0A2A50; }
.pix-modal .pix-qr-wrap { text-align: center; margin: .25rem 0 .6rem; }
.pix-modal .pix-qr-wrap img { width: 220px; height: 220px; max-width: 70vw; image-rendering: pixelated;
    border: 1px solid #e5e9f0; border-radius: 12px; padding: 8px; background: #fff; }
.pix-modal .pix-progress { height: 8px; background: #eef2f8; border-radius: 6px; overflow: hidden; margin: .2rem 0 .35rem; }
.pix-modal .pix-progress-bar { height: 100%; width: 100%; background: #2fb56a; border-radius: 6px;
    transition: width 1s linear, background .3s; }
.pix-modal .pix-progress-bar.is-baixo { background: #e0a800; }
.pix-modal .pix-timer { text-align: center; font-size: .82rem; color: #64748b; font-weight: 600; }
.pix-modal .pix-copia { font-family: monospace; font-size: .78rem; }
.pix-modal .pix-status-msg { text-align: center; margin-top: .9rem; color: #64748b; font-size: .88rem; }
.pix-modal .pix-sucesso { padding: 1.5rem .5rem; color: #0f5132; }
.pix-modal .pix-sucesso i { font-size: 3.4rem; display: block; margin-bottom: .3rem; }
.pix-modal .pix-sucesso div { font-size: 1.15rem; font-weight: 700; }
.pix-modal .pix-expirado { padding: 1.3rem .5rem; color: #92600a; }
.pix-modal .pix-expirado i { font-size: 3rem; display: block; margin-bottom: .3rem; }
.pix-modal .pix-expirado div { font-weight: 600; }

/* =====================================================================
   Modal de prêmio — Fidelidade (passo 1: tipo; passo 2: formulário).
   Reutiliza .fe-card do bloco fiscal acima.
   ===================================================================== */
.fid-premio-modal { overflow: hidden; }
.fid-premio-form {
    display: flex;
    flex-direction: column;
    max-height: min(90vh, 720px);
    margin: 0;
}
.fid-premio-form .modal-body {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}
.fid-premio-form .modal-footer {
    flex-shrink: 0;
    border-top: 1px solid #eef1f5;
}
.fid-premio-preview {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
    padding: .85rem;
    margin-bottom: 1rem;
    border: 1px solid #e5e9f0;
    border-radius: 12px;
    background: #f8fafc;
}
.fid-premio-preview-img {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    background: #eef2f8 center/cover no-repeat;
    display: grid;
    place-items: center;
    color: #90a0b6;
    font-size: 1.6rem;
}
.fid-premio-preview-img:not(.has-img) {
    background: #eef2f8;
    color: #90a0b6;
    font-size: 1.6rem;
}
.fid-premio-preview-body { min-width: 0; flex: 1 1 auto; }
.fid-premio-preview-nome { color: #17324f; font-size: .98rem; }
.fid-premio-preview-desc { margin-top: .2rem; line-height: 1.35; }
.fid-premio-img-atual img { max-height: 80px; object-fit: cover; }

/* ---- Modal de SUCESSO da emissão (verde) + ações (DANFE/XML/E-mail/WhatsApp) ---- */
.fe-modal.fe-sucesso .modal-header { background: linear-gradient(135deg, #16a34a, #12813c); }
.fe-sucesso-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: .35rem 0 1rem; }
.fe-sucesso-ico { width: 74px; height: 74px; border-radius: 50%; background: #e7f7ec; color: #16a34a;
    display: grid; place-items: center; font-size: 2.5rem; margin-bottom: .65rem;
    box-shadow: 0 0 0 6px rgba(22, 163, 74, .10); animation: feSucessoPop .35s ease; }
@keyframes feSucessoPop { 0% { transform: scale(.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.fe-sucesso-hero h6 { font-weight: 700; color: #0f5132; margin: 0; font-size: 1.05rem; }
.fe-sucesso-hero p { color: #64748b; font-size: .86rem; margin: .2rem 0 0; }
.fe-info { border: 1px solid #eef1f5; border-radius: 12px; overflow: hidden; margin-top: .2rem; }
.fe-info .fe-kv { display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding: .6rem .85rem; border-bottom: 1px solid #f1f4f8; }
.fe-info .fe-kv:last-child { border-bottom: 0; }
.fe-info .fe-kv > span { color: #90a0b6; font-size: .72rem; text-transform: uppercase; letter-spacing: .03em;
    font-weight: 700; flex: 0 0 auto; }
.fe-info .fe-chave { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .78rem;
    word-break: break-all; color: #17324f; text-align: right; }
.fe-info .fe-kv strong { color: #17324f; }
.fe-acoes-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin-top: 1rem; }
.fe-acoes-grid .btn { font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.fe-btn-whats { background: #25D366; border-color: #25D366; color: #fff; }
.fe-btn-whats:hover, .fe-btn-whats:focus { background: #1fb457; border-color: #1fb457; color: #fff; }
.fe-modal.fe-sucesso .modal-footer .btn-success { font-weight: 600; }
.fe-whats-input { text-align: center; letter-spacing: .04em; }

/* ================================================================ */
/* Badges de situação (financeiro: contas a pagar / receber, etc.)  */
/* Cores sólidas que combinam com o status e SEMPRE legíveis:       */
/* fundo saturado -> texto branco; fundo claro (amarelo) -> texto   */
/* escuro. Sobrescreve o tema (este CSS carrega por último).        */
/* ================================================================ */
.badge.badge-success,
.badge.badge-danger,
.badge.badge-info,
.badge.badge-warning,
.badge.badge-secondary,
.badge.badge-primary {
    display: inline-block;
    padding: 0.34em 0.72em;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.1;
    border-radius: 6px;
    letter-spacing: 0.1px;
    white-space: nowrap;
    border: 0;
}
.badge.badge-success   { background-color: #16a34a !important; color: #ffffff !important; } /* Pago / ok    */
.badge.badge-danger    { background-color: #dc2626 !important; color: #ffffff !important; } /* Vencida      */
.badge.badge-info      { background-color: #0ea5e9 !important; color: #ffffff !important; } /* Parcial      */
.badge.badge-secondary { background-color: #64748b !important; color: #ffffff !important; } /* Cancelado    */
.badge.badge-primary   { background-color: #3b82f6 !important; color: #ffffff !important; }
/* Em aberto: amarelo é claro -> texto escuro (não branco). */
.badge.badge-warning   { background-color: #f6b41e !important; color: #4a2f00 !important; } /* Em aberto    */

/* Tags contornadas (canais, pizza, flags…) — o tema usa laranja/amarelo claro
   no branco (#FE9F43 / #FFCA18), quase ilegível. Fundo suave + texto escuro. */
.badge.bg-outline-primary {
    background-color: #eef3f8 !important;
    border: 1px solid #0A2A50 !important;
    color: #0A2A50 !important;
    font-weight: 600;
}
.badge.bg-outline-warning {
    background-color: #fff8e6 !important;
    border: 1px solid #c78f00 !important;
    color: #6b4500 !important;
    font-weight: 600;
}

/* PDV — grupo Balcão/Delivery/Retirada: tema global (.btn-outline-secondary)
   pinta borda azul-marinho (#092C4C); aqui fica sem borda. */
#pdvTipoAtendimento .btn-outline-secondary,
#pdvTipoAtendimento .btn-outline-secondary:hover,
#pdvTipoAtendimento .btn-outline-secondary:focus,
#pdvTipoAtendimento .btn-outline-secondary.active,
#pdvTipoAtendimento .btn-check:checked + .btn-outline-secondary {
    border: 0 !important;
    box-shadow: none !important;
}

/* ------------------------------------------------------------------ */
/* Busca de menu no header — filtra os itens do sidebar em tempo real  */
/* ------------------------------------------------------------------ */
.menu-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 240px;
    max-width: 240px;
}
.menu-search .menu-search-icon {
    position: absolute;
    left: 12px;
    font-size: 16px;
    color: #9ca3af;
    pointer-events: none;
}
.menu-search #menu-search-input {
    height: 40px;
    padding: 0 34px 0 34px;
    border-radius: 8px;
    background-color: #f6f7f8;
    border: 1px solid #e6e8eb;
    font-size: 0.875rem;
}
.menu-search #menu-search-input:focus {
    background-color: #fff;
    border-color: #ff9f43;         /* laranja da marca */
    box-shadow: 0 0 0 0.15rem rgba(255, 159, 67, 0.15);
}
.menu-search .menu-search-clear {
    position: absolute;
    right: 8px;
    display: none;                 /* mostrado via JS quando há texto */
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
}
.menu-search .menu-search-clear:hover {
    background-color: #e6e8eb;
    color: #4b5563;
}

/* Mensagem "nenhum menu encontrado" (injetada por JS no sidebar). */
.sidebar-menu .menu-search-empty {
    display: none;
    padding: 14px 18px;
    color: #9ca3af;
    font-size: 0.85rem;
    text-align: center;
}

/* Durante a busca, força os dropdowns abertos e esconde itens filtrados. */
#sidebar-menu.menu-searching > ul > li.submenu > ul {
    display: block !important;
}
#sidebar-menu .menu-search-hide {
    display: none !important;
}

/* Compra de estoque — campos de busca (fornecedor / item) sempre em MAIÚSCULO.
   A classe é injetada via containerCssClass/dropdownCssClass do Select2. */
.select2-uppercase .select2-selection__rendered,
.select2-uppercase .select2-search__field,
.select2-uppercase .select2-results__option {
    text-transform: uppercase;
}

/* Modal de autorização (override de gerente) — window.pdvAutorizar(). */
.pdv-aut-icone {
    border-color: #FE9F43;
    color: #FE9F43;
}
.pdv-aut-icone i {
    font-size: 2.1rem;
    line-height: 1;
}
.pdv-aut-msg {
    margin: 0 0 1rem;
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.4;
}
.pdv-aut-campos {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
}
.pdv-aut-campos .swal2-input {
    margin: 0.35rem auto;
    width: 100%;
    max-width: 22rem;
}

/* ------------------------------------------------------------------ */
/* Contas a receber/pagar — bloco "Descrição" na listagem              */
/* ------------------------------------------------------------------ */
.conta-desc {
    line-height: 1.35;
    max-width: 22rem;          /* não deixa fornecedor/cliente longo esticar a tabela */
    overflow-wrap: anywhere;   /* quebra nomes longos em vez de empurrar a coluna Ações */
}
.conta-desc .cd-cat {
    font-size: 0.72rem;
    color: #8a94a6;
}
.conta-desc .cd-main {
    font-weight: 600;
    color: #1f2937;
}
.conta-desc .cd-sub {
    font-size: 0.78rem;
    color: #6b7280;
}
.conta-desc .cd-meta {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.15rem;
}

/* ------------------------------------------------------------------------- */
/* Listagens do painel: SEM rolagem horizontal.                              */
/* Regra global para toda tabela de listagem que tem coluna de Ações         */
/* (td.tabela-acoes) dentro de um .table-responsive no conteúdo autenticado. */
/*                                                                           */
/* table-layout: fixed prende a largura em 100% do card — a tabela nunca     */
/* fica mais larga que o container, então o .table-responsive não cria barra */
/* de rolagem horizontal. As colunas com largura definida (inclusive Ações,  */
/* que traz os botões sempre visíveis em uma linha) são respeitadas; as sem  */
/* largura são flexíveis e QUEBRAM o texto (overflow-wrap) em vez de empurrar */
/* a tabela. Substitui a antiga coluna de ações "sticky" com fundo branco.   */
/* Relatórios (DRE/Vendas etc.) não têm td.tabela-acoes e seguem intactos.   */
/* :has() é suportado em todos os navegadores atuais; as views das telas     */
/* mais largas (Contas a Pagar/Receber, Notas Fiscais) também trazem o       */
/* table-layout: fixed inline, como reforço.                                 */
/* ------------------------------------------------------------------------- */
.content .table-responsive > table:has(td.tabela-acoes) {
    table-layout: fixed;
    width: 100%;
}
.content .table-responsive > table:has(td.tabela-acoes) > tbody > tr > td,
.content .table-responsive > table:has(td.tabela-acoes) > thead > tr > th {
    /* Reseta o white-space: nowrap herdado do tema. Sem isto o texto NÃO quebra
       (o overflow-wrap fica inerte) e nomes longos — ex.: "Fornecedor: LUNAR
       TECNOLOGIA DA INFORMACAO LTDA" — invadem a coluna vizinha (Total). */
    white-space: normal;
    overflow-wrap: anywhere;
}
.content .table-responsive > table:has(td.tabela-acoes) td.tabela-acoes {
    white-space: nowrap;
    overflow-wrap: normal;
}

/* ------------------------------------------------------------------------- */
/* DataTables: a largura declarada na coluna é a largura FINAL dela.          */
/*                                                                           */
/* O dataTables.bootstrap5.css aplica box-sizing: content-box nos th/td. Com  */
/* isso um <th style="width:120px"> passa a medir 120px + padding + o espaço  */
/* do ícone de ordenação (~46px a mais por coluna). Numa tabela com           */
/* table-layout: fixed (Notas Fiscais, Contas a Pagar/Receber, Perfis) esse   */
/* excesso é roubado da única coluna SEM largura declarada — que colapsa para */
/* poucos pixels e passa a escrever o texto letra por letra, na vertical      */
/* (era o caso da coluna "Cliente" em Notas Fiscais).                         */
/*                                                                           */
/* Devolvendo o border-box, a soma das larguras declaradas volta a bater com  */
/* o que a coluna realmente ocupa e a coluna flexível fica com a sobra.       */
/* ------------------------------------------------------------------------- */
.content table.dataTable > thead > tr > th,
.content table.dataTable > thead > tr > td,
.content table.dataTable > tbody > tr > th,
.content table.dataTable > tbody > tr > td {
    box-sizing: border-box;
}

/* ------------------------------------------------------------------------- */
/* Sidebar — "Sair da conta" como última opção, destacada em vermelho.        */
/* Usa !important porque o tema pinta os links do menu com cor própria e      */
/* maior especificidade; aqui a intenção é o acento vermelho vencer sempre.   */
/* ------------------------------------------------------------------------- */
.sidebar-menu li.menu-logout > a,
.sidebar-menu li.menu-logout > a i,
.sidebar-menu li.menu-logout > a span {
    color: #dc3545 !important;
}
.sidebar-menu li.menu-logout > a:hover,
.sidebar-menu li.menu-logout > a:hover i,
.sidebar-menu li.menu-logout > a:hover span {
    color: #b02a37 !important;
    background: rgba(220, 53, 69, 0.08);
}
