.pdv-closed{display:grid;place-items:center;min-height:70dvh}.closed-cash{width:min(540px,100%);text-align:center;padding:40px;background:linear-gradient(150deg,#eff5ff,#fff)}.closed-cash>img{width:48px}.closed-lock{font-size:44px;margin:16px}.closed-cash button{display:flex;width:100%;margin-top:12px}.caixa-dialog{width:min(760px,95vw);max-height:90dvh;overflow:auto}.cash-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.cash-summary dt{color:#637389}.cash-summary dd{margin:5px 0;font-size:16px;font-weight:600}.caixa-dialog details{margin-top:10px}.caixa-dialog td{white-space:normal}
@media(min-width:1100px){
 body:has(.pdv-open){height:100dvh;overflow:hidden}
 body:has(.pdv-open) .top{height:56px;min-height:56px;padding:6px 18px}
 body:has(.pdv-open) .workspace{height:calc(100dvh - 56px);min-height:0}
 body:has(.pdv-open) aside{height:100%;overflow-y:auto;padding:12px}
 .pdv-open.content{height:100%;margin:0;padding:10px;display:flex;flex-direction:column;gap:6px;overflow:hidden}
 .pdv-open>.heading{margin:0;flex-shrink:0}.pdv-open>.heading h1{font-size:21px;margin:0}.pdv-open>.heading p{display:none}
 .pdv-open .cash-identification{margin:0;padding:6px 10px;gap:14px;font-size:12px;flex-shrink:0}
 .pdv-open .cash-operations{margin:0;flex-shrink:0}.pdv-open .cash-actions{margin:0;gap:5px;flex-wrap:nowrap}.pdv-open .cash-actions button{padding:8px 10px;white-space:nowrap}
 .pdv-open .whatsapp-card{padding:7px 12px;margin:0;gap:8px}.pdv-open .whatsapp-card .eyebrow{display:none}.pdv-open .whatsapp-card h2{font-size:15px;margin:0}.pdv-open .whatsapp-card p{font-size:12px;margin:2px 0}.pdv-open .whatsapp-card button{padding:8px 10px}
 .pdv-open .pdv-grid{flex:1;min-height:0;gap:10px;grid-template-columns:1.05fr 1fr}
 .pdv-open .pdv-grid>.panel{padding:12px;min-height:0;display:flex;flex-direction:column;gap:5px;overflow:hidden}
 .pdv-open .pdv-grid h2{margin:0;flex-shrink:0}.pdv-open .pdv-grid label{margin:0}.pdv-open .pdv-grid input,.pdv-open .pdv-grid select{margin-top:3px;padding:10px}
 .pdv-open .search{flex-shrink:0}.pdv-open .search button{margin:0}.pdv-open .products>.muted{margin:0;font-size:12px}
 .pdv-open #results{flex:1;min-height:0;overflow-y:auto}.pdv-open #cart{flex:1;min-height:40px;overflow-y:auto;overscroll-behavior:contain}
 .pdv-open .empty{padding:16px 8px;font-size:24px}.pdv-open .result{padding:10px}.pdv-open .cart-item{padding:8px 0}
 .pdv-open .exceptional-actions{flex-shrink:0}.pdv-open .basket{position:relative;margin:0}
 .pdv-open #client-results:not(:empty){position:absolute;top:99px;left:12px;right:12px;z-index:2;background:white;border:1px solid #d6deea;border-radius:8px;max-height:180px;overflow:auto}
 .pdv-open #customer{margin:0;flex-shrink:0;font-size:12px}.pdv-open #customer button{min-height:28px;padding:3px 8px}
 .pdv-open .total{margin:0;padding:8px 0;flex-shrink:0}.pdv-open .total strong{font-size:25px}
 .pdv-open .checkout{flex-shrink:0;min-height:44px;padding:9px}.pdv-open .basket>.muted{display:none}
 .pdv-open .shortcuts{margin:0;flex-shrink:0}.pdv-open .shortcuts kbd{padding:2px 6px}
}
@media(max-width:600px){.cash-summary{grid-template-columns:1fr}.closed-cash{padding:24px}.caixa-dialog{padding:16px}}
.pharmacy-entry{order:-1;flex-shrink:0;margin-bottom:8px;font-size:12px}
.pharmacy-dialog{width:min(900px,94vw);max-height:92dvh;overflow:auto}
.pharmacy-dialog header{display:flex;justify-content:space-between;gap:12px;align-items:center}
.pharmacy-dialog h2{font-size:18px;margin:0}
.pharmacy-chat{max-height:32dvh;overflow:auto;margin:12px 0}
.pharmacy-chat p{white-space:pre-wrap;margin:5px 0}
.chat-message{padding:10px;border-bottom:1px solid #ddd}
.pharmacy-dialog textarea{width:100%;min-height:80px;box-sizing:border-box}
.pharmacy-dialog [data-options]{display:grid;gap:10px}
.pharmacy-dialog .badge{white-space:normal}
@media(max-width:600px){.pharmacy-dialog header{align-items:flex-start}.pharmacy-dialog h2{font-size:14px}.pharmacy-dialog button{min-height:44px}.pharmacy-entry{white-space:normal}}
.exceptional-dialog{width:min(880px,94vw);max-height:94dvh;overflow:auto;padding:16px}
.exceptional-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.exceptional-dialog h2{font-size:20px;margin:0}
.exceptional-dialog p{margin:6px 0}
.exceptional-dialog form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.exceptional-dialog label{margin:0;gap:4px;font-size:14px}
.exceptional-dialog label:has([name=descricao]){grid-column:1/-1}
.exceptional-dialog textarea{min-height:54px;height:54px;resize:vertical}
.exceptional-dialog input,.exceptional-dialog select{min-height:40px;padding:8px}
.exceptional-dialog [data-lot]:not([hidden]){display:grid;grid-template-columns:1fr 1fr;gap:10px;grid-column:span 2}
.exceptional-dialog form>button{grid-column:1/-1;min-height:44px}
@media(max-width:600px){.exceptional-dialog form{grid-template-columns:1fr}.exceptional-dialog [data-lot]:not([hidden]){grid-column:1}.exceptional-dialog{padding:12px}.exceptional-dialog input,.exceptional-dialog select{min-height:44px}}
.workspace.sidebar-collapsed{grid-template-columns:minmax(0,1fr)}.sidebar-collapsed>aside{display:none}.sidebar-toggle{font-size:22px;padding:4px 12px}
.pharmacy-dialog{position:fixed;inset:auto 14px 14px auto;z-index:40;width:440px;height:min(600px,calc(100dvh - 80px));max-width:calc(100vw - 20px);box-sizing:border-box;background:white;border:1px solid #bdcbdc;border-radius:14px;box-shadow:0 8px 40px #182d4933;padding:12px;display:flex;flex-direction:column;overflow:hidden}
.pharmacy-dialog[hidden],.pharmacy-launcher[hidden]{display:none}.pharmacy-launcher{position:fixed;bottom:12px;right:16px;z-index:40}
.pharmacy-dialog header{flex-shrink:0}.pharmacy-dialog header h2{font-size:15px}.pharmacy-dialog header button{padding:6px;min-width:36px}
.pharmacy-dialog [data-assistant]{flex:1;min-height:0;display:flex;flex-direction:column;overflow:auto}.pharmacy-dialog .pharmacy-chat{flex:1;min-height:60px;max-height:none;overflow:auto;display:flex;flex-direction:column;gap:8px}.pharmacy-dialog [data-composer]{flex-shrink:0;position:sticky;bottom:0;background:white;padding-top:6px}.pharmacy-dialog textarea{min-height:44px;height:48px}.pharmacy-dialog .chat-message{max-width:85%;border:0;border-radius:12px;background:#edf3fc;padding:8px;align-self:flex-start}.pharmacy-dialog .from-staff{align-self:flex-end;background:#dceee7}.pharmacy-dialog .from-system{background:#fff0d0;align-self:center}.pharmacy-dialog .chat-message strong{font-size:11px}.pharmacy-dialog .chat-message p{font-size:14px}
.item-badge{font-size:10px;background:#e7ecf9;border-radius:4px;padding:2px 5px}.store-goal{font-size:12px;max-width:500px}.pdv-open .shortcuts{display:flex;flex-wrap:wrap;gap:2px}.pdv-open .shortcuts button{font-size:11px;padding:3px;min-height:24px}
@media(min-width:1100px){.pdv-open .pdv-grid>.panel{padding:8px;gap:3px}.pdv-open .pdv-grid h2{font-size:17px}.pdv-open .pdv-grid input,.pdv-open .pdv-grid select{padding:6px;min-height:32px}.pdv-open .basket .search label,.pdv-open .basket>label{font-size:12px}.pdv-open .checkout{min-height:36px;padding:6px}.pdv-open .total{padding:3px 0}.pdv-open .cart-item{min-height:48px;padding:5px 0}.pdv-open .cart-item small{font-size:10px}.pdv-open .cart-item strong{font-size:13px}.pdv-open .cart-item span{font-size:12px}.pdv-open .whatsapp-card{padding:4px 8px}.pdv-open .whatsapp-card h2{font-size:12px}.pdv-open .cash-actions button{padding:5px 8px;min-height:30px}.pdv-open #cart{min-height:210px}.pdv-open .heading .eyebrow{display:none}}
@media(max-width:800px){.workspace{display:block}.workspace>aside{position:fixed;top:56px;bottom:0;left:0;width:250px;z-index:50;background:white;overflow:auto;box-shadow:10px 0 40px #182d4933}.workspace.sidebar-collapsed>aside{display:none}.pharmacy-dialog{right:10px;bottom:10px}.top .brand span{display:none}}
.personal-card{padding:16px;margin:12px 0;border:1px solid #dce3ee;border-radius:10px}.personal-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px}.personal-stats strong,.personal-stats small{display:block}.personal-stats strong{font-size:20px;margin-top:5px}.personal-task{padding:10px 0;border-top:1px solid #e3e9f0}.personal-task p{margin:4px 0}
@media(min-width:1100px){.pdv-open .pdv-grid>.basket{display:grid;grid-template-columns:1.15fr 1fr;grid-template-rows:auto auto auto minmax(210px,1fr) auto auto auto;grid-template-areas:'title title' 'client seller' 'customer customer' 'cart cart' 'total total' 'pay pay' 'delivery delivery';column-gap:8px}.pdv-open .basket>h2{grid-area:title}.pdv-open #client-search{grid-area:client;min-width:0}.pdv-open .basket>label{grid-area:seller;min-width:0}.pdv-open #customer{grid-area:customer}.pdv-open #cart{grid-area:cart}.pdv-open .basket>.total{grid-area:total}.pdv-open #checkout{grid-area:pay}.pdv-open #checkout-delivery{grid-area:delivery}.pdv-open #client-results:empty{display:none}.pdv-open #client-search button{padding:5px}.pdv-open #client-search input{min-width:0;width:100%}}
@media(min-width:1100px){.pdv-open .cart-item>div{display:grid;grid-template-columns:1fr auto;gap:2px 8px}.pdv-open .cart-item>div>strong{grid-column:1/-1;font-size:14px;line-height:18px}.pdv-open .cart-item>div>span{grid-column:1;grid-row:2;font-size:13px;line-height:18px}.pdv-open .cart-item>div>small{grid-column:2;grid-row:2;line-height:18px}.pdv-open .cart-item>strong{font-size:14px}.pdv-open .cart-item .remove{padding:4px 8px;min-height:36px}}
@media(min-width:1100px){.pdv-open .shortcuts{display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-start;gap:3px;height:32px;min-height:32px;max-height:32px;padding:0;margin:0;white-space:nowrap;overflow:visible}.pdv-open .shortcuts button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:auto;min-width:0;gap:3px;font-size:11px;line-height:16px;min-height:26px;height:26px;padding:2px 4px;margin:0;white-space:nowrap}.pdv-open .shortcuts kbd{font-size:10px;line-height:16px;padding:0 3px;margin:0}.pdv-open .shortcuts span{white-space:nowrap;margin:0}}
.payment-dialog,.delivery-dialog{width:min(760px,96vw);max-height:94dvh;overflow:auto;padding:18px}.payment-dialog header,.delivery-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px}.payment-dialog form,.delivery-dialog form{display:grid;gap:8px}.payment-row{display:grid;grid-template-columns:minmax(180px,1fr) 140px 38px;gap:8px;padding:8px 0;border-bottom:1px solid #ddd}.payment-row [data-cash]{grid-column:1/-1;display:flex;align-items:center;gap:16px}.payment-row [data-cash][hidden],.payment-row [hidden]{display:none}.payment-row input,.payment-row select,.delivery-address-form input,.delivery-address-form select{padding:7px;min-height:34px}.payment-row label,.delivery-address-form label{margin:0;font-size:13px}.delivery-dialog .delivery-address-form{grid-template-columns:1fr 1fr;gap:8px 14px}.delivery-address-form button{grid-column:1/-1}.delivery-dialog p{margin:7px 0}.payment-dialog [data-payments],.delivery-dialog [data-payments]{max-height:42dvh;overflow:auto}.payment-dialog .confirm-total{font-size:24px;margin:8px 0}
@media(min-width:1100px){.pdv-open .pdv-grid>.basket{grid-template-rows:auto auto auto minmax(210px,1fr) auto auto;grid-template-areas:'title title' 'client seller' 'customer customer' 'cart cart' 'total total' 'pay delivery'}.pdv-open .basket #checkout,.pdv-open .basket #checkout-delivery{font-size:12px;min-height:40px;margin:0}}
@media(max-width:600px){.payment-row{grid-template-columns:1fr 90px 32px}.payment-row [data-cash]{flex-wrap:wrap}.delivery-dialog .delivery-address-form{grid-template-columns:1fr}}
.pharmacy-dialog header{gap:6px;flex-wrap:wrap}.pharmacy-dialog header>div{flex:1;min-width:180px}
.pharmacy-dialog header [data-new]{font-size:11px;padding:4px 8px;min-height:28px}
.pharmacy-dialog [data-assistant]{overflow:hidden}
.pharmacy-dialog .pharmacy-info{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:4px 0;flex-shrink:0}
.pharmacy-dialog .pharmacy-chat{min-height:0;margin:4px 0;overscroll-behavior:contain}
.pharmacy-dialog .chat-message{flex-shrink:0}
.pharmacy-dialog [data-state]{font-size:11px;flex-shrink:0}
.pharmacy-dialog [data-state]:empty,.pharmacy-dialog>p:empty,.pharmacy-dialog [data-options]:empty{display:none}
.pharmacy-dialog [data-composer]{position:static;flex-shrink:0}
.pharmacy-dialog [data-composer] label{font-size:12px;margin:0}
.pharmacy-dialog [data-composer] button{padding:6px 12px;min-height:32px}
.pharmacy-dialog [data-options]:not(:empty){max-height:25%;overflow:auto;flex-shrink:0}
.pharmacy-dialog .pharmacy-chat>[data-options]{max-height:none;overflow:visible;flex-shrink:0;display:grid;gap:5px}
.pharmacy-dialog .pharmacy-stock-item{padding:6px 8px;border:1px solid #dbe4ef;border-radius:8px;font-size:12px}
.pharmacy-dialog .pharmacy-stock-item p,.pharmacy-dialog [data-options] h3{margin:3px 0}
.pharmacy-dialog .pharmacy-stock-item button{font-size:11px;padding:4px 6px;min-height:28px}
.pdv-open>.pdv-clock-heading{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:12px}
.pdv-clock-heading>#cash{display:none!important}
.pdv-clock-heading>div:first-child,.pdv-clock-heading>.store-goal{min-width:0;overflow-wrap:anywhere}
.pdv-clock-heading>.store-goal{justify-self:end}
.pdv-clock{width:auto;max-width:100%;min-height:40px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:8px;padding:5px 10px;border:1px solid #e0e6ed;border-radius:9px;background:#f8fafc;box-shadow:0 2px 8px #172b4d08;color:#24364b;cursor:default}
.pdv-clock>.ico{width:22px;height:22px;flex-shrink:0;color:#65758a}
.pdv-clock>div{display:flex;align-items:center;gap:10px;min-width:0}
.pdv-clock-line{display:flex;align-items:baseline;gap:5px;white-space:nowrap}
.pdv-clock time{font-size:24px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.15}
.pdv-clock-period{font-size:13px;font-weight:600;color:#65758a}
.pdv-clock-date{font-size:13px;color:#65758a;white-space:nowrap}
@media(max-width:1099px){.pdv-clock{min-height:36px;padding:4px 8px;gap:6px}.pdv-clock time{font-size:22px}.pdv-clock>.ico{width:20px;height:20px}.pdv-clock>div{gap:8px}.pdv-clock-date{font-size:12px}}
@media(max-width:760px){.pdv-open>.pdv-clock-heading{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px}.pdv-clock-heading>div:first-child{grid-column:1;grid-row:1}.pdv-clock-heading>.store-goal{grid-column:2;grid-row:1}.pdv-clock{grid-column:1/-1;grid-row:2;justify-self:center;min-height:34px;padding:4px 6px}.pdv-clock time{font-size:20px}.pdv-clock-period{font-size:12px}.pdv-clock-date{font-size:11px}.pdv-clock>.ico{width:18px;height:18px}}


/* ============================================================
   MENU SUPERIOR DE AÇÕES — modernização de 22/09/2026
   Só aparência: nenhum botão criado, retirado, renomeado, e
   nenhum clique, rota, permissão ou atalho alterado.
   ============================================================ */

/* LARGURA PROPORCIONAL AO TEXTO, não fatia igual para todos.
   `flex:1 1 auto` faz a base de cada card ser o próprio conteúdo: "Histórico
   de caixas" e "Consultar produtos" nascem largos, "Sangria" e "Despesa"
   nascem estreitos, e a sobra é repartida entre eles. Antes era grade de
   colunas iguais: os títulos longos ficavam espremidos e os curtos
   desperdiçavam espaço — daí o ar de mal-acabado.

   Nada de `min-width:0`: o mínimo automático do item flex é o próprio
   conteúdo, e é isso que impede o card de encolher a ponto de cortar o
   título. `flex-wrap:wrap` é rede de segurança para telas menores que o
   monitor do PDV. */
.pdv-open .cash-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:stretch}
.pdv-open .cash-actions button{
 flex:1 1 auto;justify-content:flex-start;text-align:left;
 white-space:nowrap;border-radius:12px;font-weight:700}

.pdv-open .cash-actions button .ico{flex-shrink:0}

/* A legenda vem de `data-sub` como pseudo-elemento. NÃO transformar em nó de
   texto: os atalhos comparam `textContent` com o rótulo exato, e
   F1/F7/F8/F9/F12/Shift+F7/Shift+F11 parariam de achar o botão. Sem
   `text-overflow:ellipsis`: a legenda entra na conta da largura do card,
   então não há o que cortar — reticências eram sintoma de largura errada. */
.pdv-open .cash-actions button[data-sub]::after{
 content:attr(data-sub);flex-basis:100%;
 font-size:10.5px;font-weight:500;opacity:.85;white-space:nowrap}

/* ---- Onde a legenda cabe ----------------------------------
   O PDV a 1366x768 tem orçamento vertical apertado: a faixa foi desenhada
   compacta (min-height 30px, regra de min-width:1100px acima) justamente
   para o carrinho manter os 210px que `pdv-pagamentos-consolidado` exige.
   Uma segunda linha em cada card comia esse espaço e derrubava o carrinho
   para 112px — o operador perdia a lista de itens para ganhar legenda.

   Por isso a legenda só aparece quando há ALTURA sobrando. Em 1366x768 os
   cards ficam de uma linha, largos na medida do título; em 1440x900 e
   1920x1080 ganham a segunda linha. */
/* No monitor do PDV a faixa volta a ser UMA linha que não quebra, com o mesmo
   espaçamento compacto de antes desta etapa. O que muda em relação ao
   original é só a repartição: `flex:1 1 auto` dá a cada card a largura do seu
   próprio texto e distribui a sobra, em vez de fatias iguais. */
@media(min-width:1100px){
 .pdv-open .cash-actions{gap:5px;flex-wrap:nowrap}
 .pdv-open .cash-actions button[data-sub]::after{display:none}
}
@media(min-width:1500px) and (min-height:820px){
 .pdv-open .cash-actions{flex-wrap:nowrap;gap:6px}
 .pdv-open .cash-actions button{
  flex-wrap:wrap;align-items:center;padding:6px 11px;min-height:46px;line-height:1.25}
 .pdv-open .cash-actions button[data-sub]::after{display:block;margin-left:25px}
}
@media(min-width:1750px) and (min-height:820px){
 .pdv-open .cash-actions{gap:8px}
 .pdv-open .cash-actions button{padding:7px 13px;font-size:13px;min-height:50px}
 .pdv-open .cash-actions button[data-sub]::after{font-size:11px}
}

/* ---- Recolhido: os cards SAEM da tela ----------------------
   `display:none` devolve a altura inteira para a área de venda — é o motivo
   do retrátil. Os botões continuam no DOM, então `.click()` dos atalhos segue
   funcionando com o menu fechado. */
.pdv-open .cash-operations.acoes-recolhidas{display:none}

/* ---- Controle de expandir/recolher, na faixa do caixa ---- */
.pdv-open .cash-identification{position:relative;padding-right:150px}
.acoes-toggle{
 position:absolute;right:10px;top:50%;transform:translateY(-50%);
 display:inline-flex;align-items:center;gap:6px;
 padding:6px 12px;min-height:34px;border-radius:999px;
 font-size:12px;font-weight:650;color:var(--azul);
 background:var(--azul-claro);border:1px solid transparent;cursor:pointer}
.acoes-toggle:hover{background:var(--azul);color:#fff}
.acoes-toggle:hover .ico{color:#fff}
.acoes-toggle .ico{width:15px;height:15px;color:var(--azul)}

/* Telas estreitas: o controle volta ao fluxo para não cobrir o status. */
@media(max-width:900px){
 .pdv-open .cash-actions button{padding:7px 10px;min-height:44px}
 .pdv-open .cash-actions button[data-sub]::after{display:none}
 .pdv-open .cash-identification{padding-right:10px}
 .acoes-toggle{position:static;transform:none;margin-left:auto}
}
